diff options
| author | Abhishek Singh <absingh@codeaurora.org> | 2017-10-03 15:50:00 +0530 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2017-10-03 05:33:59 -0700 |
| commit | e1bc69444ddd99e61df00f9280ce51c595f6bc9a (patch) | |
| tree | 76ef873247ed2245098cb621cf9e6aef4f1864cc | |
| parent | eeec2bbac9440ea9dec9843bb4fdd6e962fc29e9 (diff) | |
qcacld-3.0: Reset the mScanPending flag after cleaning scan queue
As part of hdd_cleanup_scan_queue, all the pending scan are removed
from the queue but mScanPending flag remain true for the adapter.
And thus in stop adapter, driver assume that scan is pending and
driver waits for 5 sec waiting for scan abort.
To fix this set mScanPending to false while removing all scan req
from the hdd scan queue.
Change-Id: Ifa72f3840f1dfbbc1a0cc56d237a69fdf960c4c2
CRs-Fixed: 2119520
| -rw-r--r-- | core/hdd/src/wlan_hdd_scan.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c index 0393a5a2abdb..274a7e93a828 100644 --- a/core/hdd/src/wlan_hdd_scan.c +++ b/core/hdd/src/wlan_hdd_scan.c @@ -3716,6 +3716,8 @@ void hdd_cleanup_scan_queue(hdd_context_t *hdd_ctx) hdd_adapter_t *adapter; uint8_t source; bool aborted = true; + QDF_STATUS status; + hdd_adapter_list_node_t *adapter_node = NULL, *next_node = NULL; if (NULL == hdd_ctx) { hdd_err("HDD context is Null"); @@ -3758,6 +3760,17 @@ void hdd_cleanup_scan_queue(hdd_context_t *hdd_ctx) } qdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock); + status = hdd_get_front_adapter(hdd_ctx, &adapter_node); + while (NULL != adapter_node && QDF_IS_STATUS_SUCCESS(status)) { + adapter = adapter_node->pAdapter; + if (adapter->scan_info.mScanPending) { + adapter->scan_info.mScanPending = false; + complete(&adapter->scan_info.abortscan_event_var); + } + status = hdd_get_next_adapter(hdd_ctx, adapter_node, + &next_node); + adapter_node = next_node; + } } /** |
