diff options
| author | Mahesh A Saptasagar <msapta@codeaurora.org> | 2016-07-21 18:11:38 +0530 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-09-10 19:06:43 -0700 |
| commit | ebb47fa2937e5783ae74dda74fabd81cf2d1f641 (patch) | |
| tree | 0bd9cded32b49677529a53dfeef93284ce9aaa1f | |
| parent | 04dbf6de4d4808691ecad548ea7e81a04f280245 (diff) | |
qcacld-3.0: Block interface down until pending scan request is aborted
qcacld-2.0 to qcacld-3.0 propagation
From Kernel-3.18 onwards pending scan request is handled
as part of NETDEV_DOWN event, by invoking the cfg80211_scan_done
callback which frees the scan request structure. To support this,
driver will not invoke scan_done_callback if interface is down.
In case, if interface down and up are called back to back there
is a chance that kernel frees scan request as part of NETDEV_DOWN
and after which before driver triggers scan_done_callback if
interface is made up, driver scan_done_callback is through its
execution and accesses the freed scan request results in kernel
panic.
To mitigate this, don't return from hdd_stop until scan request
is aborted. Though this fix is to avoid kernel panic due to 3.18
kernel specific changes, it is acceptable across all the kernel
versions.
Change-Id: Iba8bd7a32fac33e8a0c3eea293aad682a1105397
CRs-Fixed: 977264
(cherry picked from commit 153dba8b716c3d10a1745df6e2da09c0c05d9b01)
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index d246ec631bdd..2bb04036b553 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -3471,8 +3471,7 @@ QDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter, wireless_send_event(adapter->dev, SIOCGIWAP, &wrqu, NULL); } else { - hdd_abort_mac_scan(hdd_ctx, adapter->sessionId, - eCSR_SCAN_ABORT_DEFAULT); + wlan_hdd_scan_abort(adapter); } hdd_lro_disable(hdd_ctx, adapter); wlan_hdd_cleanup_remain_on_channel_ctx(adapter); |
