wlan: Disallow suspend req from OS, when STA is associating with SAP
Disallow suspend req from OS, when STA is associating with SAP
Change-Id: I207e91a53e8e1276f3349a2b41a6d883323d71ef
CR-Fixed: 424985
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 5aa92f9..72869e9 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -2933,6 +2933,8 @@
/* Destroy the wake lock */
wake_lock_destroy(&pHddCtx->rx_wake_lock);
#endif
+ /* Destroy the wake lock */
+ wake_lock_destroy(&pHddCtx->sap_wake_lock);
//Close VOSS
//This frees pMac(HAL) context. There should not be any call that requires pMac access after this.
@@ -3889,6 +3891,10 @@
WAKE_LOCK_SUSPEND,
"qcom_rx_wakelock");
#endif
+ /* Initialize the wake lcok */
+ wake_lock_init(&pHddCtx->sap_wake_lock,
+ WAKE_LOCK_SUSPEND,
+ "qcom_sap_wakelock");
vos_event_init(&pHddCtx->scan_info.scan_finished_event);
pHddCtx->scan_info.scan_pending_option = WEXT_SCAN_PENDING_GIVEUP;