wlan:Fix for wlan_hdd_scan_abort timeout
Initializing abortscan_event_var before checking the scan pending
to avoid wlan_hdd_scan_abort() timeout.
Change-Id: If0569a67297286002e8cf58307956b7b3be56b48
CRs-Fixed: 863659
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 6dee690..3730c18 100755
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -11368,6 +11368,7 @@
tSirAbortScanStatus abortScanStatus;
pScanInfo = &pHddCtx->scan_info;
+ INIT_COMPLETION(pScanInfo->abortscan_event_var);
if (pScanInfo->mScanPending)
{
abortScanStatus = hdd_abort_mac_scan(pHddCtx, pScanInfo->sessionId,
@@ -11381,7 +11382,6 @@
*/
if (abortScanStatus == eSIR_ABORT_ACTIVE_SCAN_LIST_NOT_EMPTY)
{
- INIT_COMPLETION(pScanInfo->abortscan_event_var);
status = wait_for_completion_interruptible_timeout(
&pScanInfo->abortscan_event_var,
msecs_to_jiffies(5000));