wifi: ath12k: move peer delete after vdev stop of station for WCN7850
authorKang Yang <quic_kangyang@quicinc.com>
Mon, 5 Feb 2024 17:03:30 +0000 (19:03 +0200)
committerKalle Valo <quic_kvalo@quicinc.com>
Wed, 7 Feb 2024 15:07:00 +0000 (17:07 +0200)
commitc9e4e41e71ffaf3f6ff1fafcb96fda92a12dc2f5
tree6f4f8c309dea81e2954a6846db4385f949debd59
parent32e7b12e2611e6b49510a3b36c0ba4deafac10c7
wifi: ath12k: move peer delete after vdev stop of station for WCN7850

In current code, when STA/P2P Client connect to AP/P2P GO, the WMI
command sequence is:

peer_create->vdev_start->vdev_up

And sequence of STA/P2P Client disconnect from AP/P2P GO is:

peer_delete->vdev_down->vdev_stop

This sequence of disconnect is not opposite of connect. For STA or P2P
GO, bss peer is not needed by firmware during handling vdev stop
command. So with this sequence, STA and P2P GO can work normally.

But for P2P Client, firmware needs bss peer in some functions during
handling vdev stop command. The opposite sequence of disconnect should
be:

vdev_down->vdev_stop->peer_delete

So change the sequence of disconnect as above opposite sequence for
WCN7850.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1

Signed-off-by: Kang Yang <quic_kangyang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240130040303.370590-10-quic_kangyang@quicinc.com
drivers/net/wireless/ath/ath12k/mac.c