summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajeev Kumar <rajekuma@codeaurora.org>2017-07-28 08:42:46 -0700
committersnandini <snandini@codeaurora.org>2017-08-03 23:06:56 -0700
commit3a8a6a5bf4ea900e20ef05ee15c3a151181bb258 (patch)
treebd2a6ae676759a6aa3880e3612384fdbc8c16624
parenta8c9ed75d86a6d5cfa4f264358eecdccf8872266 (diff)
qcacld-3.0: Hold wake lock for SAP client disconnect notification
Hold wake lock in driver for SAP client disconnect notification to user space inorder to avoid hostapd and driver going out of sync. Change-Id: If81cf836b8fc047731735aa28831d1efa2f4e7b2 CRs-Fixed: 2084282
-rw-r--r--core/hdd/inc/wlan_hdd_main.h3
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.c5
2 files changed, 8 insertions, 0 deletions
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index c3ab6ed94495..9cb9a0820f33 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -262,6 +262,9 @@
#define WLAN_HDD_QOS_MAP_CONFIGURE 4
#define HDD_SAP_WAKE_LOCK_DURATION 10000 /* in msecs */
+/* SAP client disconnect wake lock duration in milli seconds */
+#define HDD_SAP_CLIENT_DISCONNECT_WAKE_LOCK_DURATION (1000)
+
#if defined(CONFIG_HL_SUPPORT)
#define HDD_MOD_EXIT_SSR_MAX_RETRIES 200
#else
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index ce87461b173a..30adf1cc0878 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -2124,6 +2124,11 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
wlan_hdd_auto_shutdown_enable(pHddCtx, true);
#endif
+ cds_host_diag_log_work(&pHddCtx->sap_wake_lock,
+ HDD_SAP_WAKE_LOCK_DURATION,
+ WIFI_POWER_EVENT_WAKELOCK_SAP);
+ qdf_wake_lock_timeout_acquire(&pHddCtx->sap_wake_lock,
+ HDD_SAP_CLIENT_DISCONNECT_WAKE_LOCK_DURATION);
cfg80211_del_sta(dev,
(const u8 *)&pSapEvent->sapevt.
sapStationDisassocCompleteEvent.staMac.