|
@@ -5622,6 +5622,7 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx, uint8_t sessio
|
|
|
INIT_WORK(&adapter->scan_block_work, wlan_hdd_cfg80211_scan_block_cb);
|
|
|
qdf_list_create(&adapter->blocked_scan_request_q, WLAN_MAX_SCAN_COUNT);
|
|
|
qdf_mutex_create(&adapter->blocked_scan_request_q_lock);
|
|
|
+ qdf_event_create(&adapter->acs_complete_event);
|
|
|
|
|
|
if (QDF_STATUS_SUCCESS == status) {
|
|
|
/* Add it to the hdd's session list. */
|
|
@@ -5679,7 +5680,7 @@ static void __hdd_close_adapter(struct hdd_context *hdd_ctx,
|
|
|
qdf_list_destroy(&adapter->blocked_scan_request_q);
|
|
|
qdf_mutex_destroy(&adapter->blocked_scan_request_q_lock);
|
|
|
policy_mgr_clear_concurrency_mode(hdd_ctx->psoc, adapter->device_mode);
|
|
|
-
|
|
|
+ qdf_event_destroy(&adapter->acs_complete_event);
|
|
|
hdd_cleanup_adapter(hdd_ctx, adapter, rtnl_held);
|
|
|
|
|
|
if (hdd_ctx->current_intf_count != 0)
|
|
@@ -5970,7 +5971,12 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx,
|
|
|
|
|
|
case QDF_P2P_GO_MODE:
|
|
|
cds_flush_work(&adapter->sap_stop_bss_work);
|
|
|
- qdf_atomic_set(&adapter->session.ap.acs_in_progress, 0);
|
|
|
+ if (qdf_atomic_read(&adapter->session.ap.acs_in_progress)) {
|
|
|
+ hdd_info("ACS in progress, wait for complete");
|
|
|
+ qdf_wait_for_event_completion(
|
|
|
+ &adapter->acs_complete_event,
|
|
|
+ ACS_COMPLETE_TIMEOUT);
|
|
|
+ }
|
|
|
wlan_hdd_undo_acs(adapter);
|
|
|
|
|
|
if (adapter->device_mode == QDF_P2P_GO_MODE)
|