wifi: ath12k: indicate scan complete for scan canceled when scan running
authorWen Gong <quic_wgong@quicinc.com>
Wed, 6 Sep 2023 08:57:46 +0000 (04:57 -0400)
committerKalle Valo <quic_kvalo@quicinc.com>
Thu, 28 Sep 2023 15:04:58 +0000 (18:04 +0300)
commit870c6a72739c4905e592da9c01731f975e46c30a
tree4e1fe13a37cc293979924bbce7d04a27a892cd0e
parentc2ebb1d11ab95cdb56529182a9673ed05c33e7fd
wifi: ath12k: indicate scan complete for scan canceled when scan running

ath12k prints "Received scan event for unknown vdev" when doing the
following test:
1. trigger scan
2. wait 0.2 second
3. iw reg set is issued or 11d scan complete event is sent from firmware

Reason is:
When iw reg set is issues or the 11d scan complete event is received, the
new country code will be set to the firmware, and the new regdomain info
indicated to ath12k, then the new channel list will be sent to the firmware.
The firmware will cancel the current scan after receiving WMI_SCAN_CHAN_LIST_CMDID
which is used for the new channel list, and the state of ath12k is
ATH12K_SCAN_RUNNING, then ath12k_get_ar_on_scan_abort() returns NULL and
ath12k_scan_event() returns at this point and does not indicate scan
completion to mac80211.

Indicate scan completion to mac80211 and get rid of the "Received scan
event for unknown vdev" print for the above case.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4

Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230906085746.18968-1-quic_wgong@quicinc.com
drivers/net/wireless/ath/ath12k/wmi.c