summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhishek Singh <absingh@qti.qualcomm.com>2015-10-06 16:43:14 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2015-11-27 12:40:31 +0530
commit7405d41e229c446ea83b65ca44d8e924a3d078b9 (patch)
tree023da23dcd812ad299f58322c3deebcb6c51457c
parent01ce87eed1e131faa415606b367ca731045c2348 (diff)
qcacld-2.0: Dont allow Channel switch if link is already suspended
prima to qcacld-2.0 propagation If channel change is received win non zero switch count, a timer is started and actual channel is channged after timer expire. It may happen that the scan has already started before this channel switch timer expire. There is no handling in timer callback to check if driver is already in scan state and thus it may send finish scan req once channel change is completed as link is in suspended state due to scan in progress. This leads to change in scan states and scan is stuck. As part of the fix drop change channel req if link is in suspended state. Change-Id: I288503eb1d570c2848d7fc64015d31d24b9887a1 CRs-Fixed: 916864
-rw-r--r--CORE/MAC/src/pe/lim/limUtils.c40
1 files changed, 27 insertions, 13 deletions
diff --git a/CORE/MAC/src/pe/lim/limUtils.c b/CORE/MAC/src/pe/lim/limUtils.c
index e512121167b8..18c4c14d5a2d 100644
--- a/CORE/MAC/src/pe/lim/limUtils.c
+++ b/CORE/MAC/src/pe/lim/limUtils.c
@@ -2123,19 +2123,6 @@ void limProcessChannelSwitchTimeout(tpAniSirGlobal pMac)
channel = psessionEntry->gLimChannelSwitch.primaryChannel;
/*
- * If Lim allows Switch channel on same channel on which preauth
- * is going on then LIM will not post resume link(WDA_FINISH_SCAN)
- * during preauth rsp handling hence firmware may crash on ENTER/
- * EXIT BMPS request.
- */
- if(psessionEntry->ftPEContext.pFTPreAuthReq)
- {
- limLog(pMac, LOGE,
- FL("Avoid Switch Channel req during pre auth"));
- return;
- }
-
- /*
* This potentially can create issues if the function tries to set
* channel while device is in power-save, hence putting an extra check
* to verify if the device is in power-save or not
@@ -2152,6 +2139,33 @@ void limProcessChannelSwitchTimeout(tpAniSirGlobal pMac)
/* Channel-switch timeout has occurred. reset the state */
psessionEntry->gLimSpecMgmt.dot11hChanSwState = eLIM_11H_CHANSW_END;
+ /*
+ * If Lim allows Switch channel on same channel on which preauth
+ * is going on then LIM will not post resume link(WDA_FINISH_SCAN)
+ * during preauth rsp handling hence firmware may crash on ENTER/
+ * EXIT BMPS request.
+ */
+ if(psessionEntry->ftPEContext.pFTPreAuthReq)
+ {
+ limLog(pMac, LOGE,
+ FL("Avoid Switch Channel req during pre auth"));
+ return;
+ }
+ /* If link is already suspended mean some off
+ * channel operation or scan is in progress, Allowing
+ * Change channel here will lead to either Init Scan
+ * sent twice or missing Finish scan when change
+ * channel is completed, this may lead
+ * to driver in invalid state and crash.
+ */
+ if (limIsLinkSuspended(pMac))
+ {
+ limLog(pMac, LOGE, FL("Link is already suspended for "
+ "some other reason. Return here for sessionId:%d"),
+ pMac->lim.limTimers.gLimChannelSwitchTimer.sessionId);
+ return;
+ }
+
/* Check if the AP is switching to a channel that we support.
* Else, just don't bother to switch. Indicate HDD to look for a
* better AP to associate