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)
Tento commit je obsažen v:
Mahesh A Saptasagar
2016-07-21 18:11:38 +05:30
odevzdal qcabuildsw
rodič 04dbf6de4d
revize ebb47fa293

Zobrazit soubor

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