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
This commit is contained in:
Sachin Ahuja 2016-09-15 17:16:25 +05:30 • committed by Gerrit - the friendly Code Review server
commit 988fd105c5

View file

@ -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);