summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGupta, Kapil <kapgupta@qti.qualcomm.com>2016-04-01 15:00:31 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-04-04 15:43:50 +0530
commita4218feb8575e8ace04dee1871cb3b689cc12d71 (patch)
tree51f93c00a2e20ee81cbcd2fad4716178cccca7d7
parent1ee3ecfbcd6ce184a3ee22e310493d87b1220137 (diff)
qcacld-2.0: Prevent suspend if scan is in progress
wlan SDIO driver unlike pci will try to put firmware into WOW mode as part of cfg80211_suspend. In cfg80211_suspend host driver will abort any supplicant initiated scan which gets tracked as part of mscanpending flag in HDD. Other scans like ccx, 11k are not detected due to which suspend may be allowed and firmware will be kept in WOW mode. Now if scan is in progress and if firmware is kept in WOW mode then host will miss SCAN_DONE indication from firmware which will lead to scan stuck issue. To fix this check whether scan is in progress at WMA layer and abort suspend. If scan is in progress at WMA layer means the scan is triggered internally by MAC to do ccx/11k scans which are important so abort suspend instead of scan. Change-Id: I12db1417087ad56b6ca29cccacf3f78ae58cca33 CRs-Fixed: 997976
-rw-r--r--CORE/SERVICES/WMA/wma.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 64b30a2507b5..5f0411befba9 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -35476,6 +35476,11 @@ int wma_suspend_fw(void)
if (!wma)
return -EINVAL;
+ if (wma_check_scan_in_progress(wma)) {
+ WMA_LOGE("%s: Scan in progress, Aborting suspend", __func__);
+ return -EBUSY;
+ }
+
is_wow_enabled = wma_is_wow_mode_selected(wma);
if (is_wow_enabled)
ret = wma_enable_wow_in_fw(wma, 0);