wlan: Fix for APPS going into suspend immediatly after driver gets connect request after scan.
Acquire wakelock to handle the case where APP's tries to suspend
immediatly after the driver gets connect request(i.e after scan) from
supplicant, this result in app's is suspending and not able to process
the connect request to AP.
Change-Id: I2419ed396b5e34a6a414db87c10f47ef1e69070f
CR-Fixed: 404528
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index b369ce5..8c15812 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -3163,6 +3163,15 @@
#endif
}
+void hdd_allow_suspend_timeout(v_U32_t timeout)
+{
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,5))
+ wake_lock_timeout(&wlan_wake_lock, timeout);
+#else
+ /* Do nothing as there is no API in wcnss for timeout*/
+#endif
+}
+
/**---------------------------------------------------------------------------
\brief hdd_wlan_startup() - HDD init function