summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrakash Dhavali <pdhavali@qca.qualcomm.com>2014-01-15 16:51:32 -0800
committerPrakash Dhavali <pdhavali@codeaurora.org>2014-01-16 21:46:19 -0800
commit80c789574136e02b9385b82d43547aebd28a87a3 (patch)
treea14c3a35fd176b0671248dfe5ffd354b90ede44d
parent0d8f40f8a5e1fc2d830f698c5f2fbd554269aed4 (diff)
cld: wma: Hold wakelock when host wakeup for PNO
When the host is in suspended state and wow is enabled & PNO is progress in firmware, firmware will wakeup the host and send wake reason as WOW_REASON_NLOD when desired AP is found. On receiving such event, Host should stay alive some more time to enable wpa_supplicant to perform association with that AP. . Change-Id: I5074060ef0dcecc7cb0e5262693702ba35689be4 CRs-fixed: 567665
-rw-r--r--CORE/SERVICES/WMA/wma.c11
-rw-r--r--CORE/SERVICES/WMA/wma.h8
2 files changed, 19 insertions, 0 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index e7c8044de378..684cb2a161b7 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -9149,13 +9149,17 @@ static int wma_wow_wakeup_host_event(void *handle, u_int8_t *event,
if(wake_info->wake_reason == WOW_REASON_AP_ASSOC_LOST)
wma_beacon_miss_handler(wma, wake_info->vdev_id);
+#ifdef FEATURE_WLAN_SCAN_PNO
if (wake_info->wake_reason == WOW_REASON_NLOD) {
node = &wma->interfaces[wake_info->vdev_id];
if (node) {
WMA_LOGD("NLO match happened");
node->nlo_match_evt_received = TRUE;
}
+ vos_wake_lock_timeout_acquire(&wma->pno_wake_lock,
+ WMA_PNO_WAKE_LOCK_TIMEOUT);
}
+#endif
if (wake_info->wake_reason == WOW_REASON_CSA_EVENT) {
WMI_CSA_HANDLING_EVENTID_param_tlvs param;
@@ -12923,6 +12927,10 @@ VOS_STATUS wma_start(v_VOID_t *vos_ctx)
goto end;
}
+#ifdef FEATURE_WLAN_SCAN_PNO
+ vos_wake_lock_init(&wma_handle->pno_wake_lock, "wlan_pno_wl");
+#endif
+
end:
WMA_LOGD("%s: Exit", __func__);
return vos_status;
@@ -13031,6 +13039,9 @@ VOS_STATUS wma_close(v_VOID_t *vos_ctx)
ptrn_id++)
wma_free_wow_ptrn(wma_handle, ptrn_id);
+#ifdef FEATURE_WLAN_SCAN_PNO
+ vos_wake_lock_destroy(&wma_handle->pno_wake_lock);
+#endif
/* unregister Firmware debug log */
vos_status = dbglog_deinit(wma_handle->wmi_handle);
if(vos_status != VOS_STATUS_SUCCESS)
diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h
index 2d6e87cfc9b2..ef0438a01a20 100644
--- a/CORE/SERVICES/WMA/wma.h
+++ b/CORE/SERVICES/WMA/wma.h
@@ -499,6 +499,12 @@ typedef struct {
/*DFS umac interface information*/
struct ieee80211com *dfs_ic;
+#ifdef FEATURE_CESIUM_PROPRIETARY
+ txFailIndCallback hddTxFailCb;
+#endif
+#ifdef FEATURE_WLAN_SCAN_PNO
+ vos_wake_lock_t pno_wake_lock;
+#endif
}t_wma_handle, *tp_wma_handle;
struct wma_target_cap {
@@ -1137,6 +1143,8 @@ VOS_STATUS wma_send_snr_request(tp_wma_handle wma_handle, void *pGetRssiReq);
/* Default rssi threshold defined in CFG80211 */
#define WMA_RSSI_THOLD_DEFAULT -300
+#define WMA_PNO_WAKE_LOCK_TIMEOUT (30 * 1000) /* in msec */
+
#endif
/* U-APSD maximum service period of peer station */