summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajeev Kumar Sirasanagandla <rsirasan@codeaurora.org>2017-01-05 21:04:58 +0530
committerqcabuildsw <qcabuildsw@localhost>2017-01-24 23:00:29 -0800
commit64037743dbcb20351e5b139198fe02c8857c067f (patch)
tree5b154680cc4728e33324afc5a76a0db46bc30ab0
parentccc6431da416382c8ce9c2fde9caa4a0f21f3ade (diff)
qcacld-3.0: Avoid immediate power collapse on receiving PNO indication
qcacld-2.0 to qcacld-3.0 propagation Connect request will be dishonored if apps power collapses immediately after updating the sched scan results to supplicant. To mitigate this issue, take a wakelock for 1 second before updating the sched scan results to supplicant. Change-Id: Ib0b8b6c6b149f0bf66d1cf9a60bd876f4a003245 CRs-Fixed: 924837
-rw-r--r--core/hdd/src/wlan_hdd_scan.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c
index dda89ddd31cb..c5d529757f73 100644
--- a/core/hdd/src/wlan_hdd_scan.c
+++ b/core/hdd/src/wlan_hdd_scan.c
@@ -2483,8 +2483,19 @@ hdd_sched_scan_callback(void *callbackContext,
ret = wlan_hdd_cfg80211_update_bss(pHddCtx->wiphy, pAdapter, 0);
- if (0 > ret)
+ if (ret < 0) {
hdd_notice("NO SCAN result");
+ } else {
+ /*
+ * Acquire wakelock to handle the case where APP's tries to
+ * suspend immediately after the driver gets connect
+ * request(i.e after pno) from supplicant, this result in
+ * app's is suspending and not able to process the connect
+ * request to AP
+ */
+ hdd_prevent_suspend_timeout(1000,
+ WIFI_POWER_EVENT_WAKELOCK_SCAN);
+ }
cfg80211_sched_scan_results(pHddCtx->wiphy);
hdd_notice("cfg80211 scan result database updated");