On 9/4/2024 7:35 PM, Kang Yang wrote: > From: Wen Gong <quic_wgong@xxxxxxxxxxx> > > Add process of event WMI_11D_NEW_COUNTRY_EVENTID. Add handler for > WMI_11D_SCAN_START_CMDID, WMI_11D_SCAN_STOP_CMDID. > Use WMI_11D_SCAN_START_CMDID to trigger 11d scan then firmware will > report 11d scan result by WMI_11D_NEW_COUNTRY_EVENTID. Host will > update the new country code back to firmware. > > The priority of 11d scan is WMI_SCAN_PRIORITY_MEDIUM in firmware, the > priority of hw scan is WMI_SCAN_PRIORITY_LOW. Then hw scan will be > canceled when 11d scan is running. > > To avoid this, need to change the priority of first hw scan to > WMI_SCAN_PRIORITY_MEDIUM. Add wait_for_completion_timeout() for > scan.complete in ath12k_reg_update_chan_list(). Plus another existing > wait in ath12k_scan_stop(), there are two places to wait the > scan.complete. They run in different threads so it is possible that both > of the enter into wait status. Therefore use complete_all() instead of > complete() for scan.complete. complete_all() can work well when it is > only one thread wait for scan.complete. > > Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 > > Signed-off-by: Wen Gong <quic_wgong@xxxxxxxxxxx> > Co-developed-by: Kang Yang <quic_kangyang@xxxxxxxxxxx> > Signed-off-by: Kang Yang <quic_kangyang@xxxxxxxxxxx> Acked-by: Jeff Johnson <quic_jjohnson@xxxxxxxxxxx>