diff options
| author | Sachin Ahuja <sahuja@codeaurora.org> | 2016-09-15 17:16:25 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-09-21 17:04:14 -0700 |
| commit | 988fd105c59b9d110fb6fa21bdb0db0bae1d8a05 (patch) | |
| tree | 02c3ab00b14a8a1a5b95cc587c4ed0f683083bf0 | |
| parent | a69c72a9fb5a0e540162df8f1984ab49ddae73fd (diff) | |
qcacld-3.0: Abort Scan during IBSS stop adapter
qcacld-2.0 to qcacld-3.0 propagation
After interface down, kernel frees the ongoing scan
request memory and call cfg80211_scan_done.
Now, during IBSS change iface, stop adapter is called
which does not abort the scan. Once the ongoing scan is
done, HDD calls the cfg80211_scan_done for which kernel
has already freed scan req memory and this leads to crash.
Abort the scan during stop adapter for IBSS case also.
Change-Id: Ie53576399926cc3a07e6f66c0f3997b6617f9f04
CRs-Fixed: 1047004
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index e89eba40cb63..357114a45e10 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -3419,9 +3419,11 @@ QDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter, union iwreq_data wrqu; tSirUpdateIE updateIE; unsigned long rc; + hdd_scaninfo_t *scan_info = NULL; ENTER(); + scan_info = &adapter->scan_info; hdd_notice("Disabling queues"); wlan_hdd_netif_queue_control(adapter, WLAN_NETIF_TX_DISABLE_N_CARRIER, WLAN_CONTROL_PATH); @@ -3474,7 +3476,8 @@ QDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter, memset(wrqu.ap_addr.sa_data, '\0', ETH_ALEN); wireless_send_event(adapter->dev, SIOCGIWAP, &wrqu, NULL); - } else { + } + if (scan_info != NULL && scan_info->mScanPending) { wlan_hdd_scan_abort(adapter); } hdd_lro_disable(hdd_ctx, adapter); |
