On 9/14/2023 2:07 AM, Wen Gong wrote:
Add handler for WMI_11D_NEW_COUNTRY_EVENTID, WMI_11D_SCAN_START_CMDID, WMI_11D_SCAN_STOP_CMDID. The priority of 11d scan WMI_SCAN_PRIORITY_MEDIUM in firmware, the priority of hw scan is WMI_SCAN_PRIORITY_LOW, then the 11d scan will cancel the hw scan which is running. To avoid this, change the priority of the 1st hw scan to WMI_SCAN_PRIORITY_MEDIUM. Add wait_for_completion_timeout for ar->scan.completed in ath12k_reg_update_chan_list(), plus the existing wait in ath12k_scan_stop(), then ath12k have 2 place to wait the ar->scan.completed, they run in different thread, thus it is possible to happen that the two threads both enter wait status. To handle this scenario, ath12k should change the complete() to complete_all() for the ar->scan.completed, this also work well when it is only one thread wait for ar->scan.completed. 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@xxxxxxxxxxx>
Acked-by: Jeff Johnson <quic_jjohnson@xxxxxxxxxxx>