summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVarun Reddy Yeturu <vyeturu@qca.qualcomm.com>2015-09-01 13:36:28 -0700
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2015-09-02 11:16:37 +0530
commit5199248490fcb2373b7e5c6025cd41c871a6d773 (patch)
treebd7c35700adda4f4c7cd440922d093447c1b50a9
parent90a722c00e9ade19250aa0c204efd3a7c4b5a3c3 (diff)
qcacld-2.0: Handle sta kick out during roaming
If roaming is happening, then ignore the sta kick out and let the connection go through. CRs-Fixed: 900654 Change-Id: I3c6794a3ebd6c8e217d58c97cab3d7dbfaeda72c
-rw-r--r--CORE/MAC/src/pe/include/limSession.h1
-rw-r--r--CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c24
-rw-r--r--CORE/MAC/src/pe/lim/limSendSmeRspMessages.c10
-rw-r--r--CORE/MAC/src/pe/lim/limSession.c1
4 files changed, 36 insertions, 0 deletions
diff --git a/CORE/MAC/src/pe/include/limSession.h b/CORE/MAC/src/pe/include/limSession.h
index 34395236ff26..02fa77c47ae7 100644
--- a/CORE/MAC/src/pe/include/limSession.h
+++ b/CORE/MAC/src/pe/include/limSession.h
@@ -494,6 +494,7 @@ typedef struct sPESession // Added to Support BT-AMP
/* flag to indicate country code in beacon */
tANI_U8 countryInfoPresent;
uint8_t vdev_nss;
+ bool roaming_in_progress;
} tPESession, *tpPESession;
/*-------------------------------------------------------------------------
diff --git a/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c b/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c
index e7ca100c0e2f..b83484b93288 100644
--- a/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c
+++ b/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c
@@ -118,6 +118,30 @@ limDeleteStaContext(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
{
case HAL_DEL_STA_REASON_CODE_KEEP_ALIVE:
if (LIM_IS_STA_ROLE(psessionEntry) && !pMsg->is_tdls) {
+ /*
+ * If roaming is in progress, then ignore the STA kick out
+ * and let the connection happen. The roaming_in_progress
+ * flag is set whenever a candidate found indication is
+ * received. It is enabled on the PE session for which
+ * the indication is received. There is really no need to
+ * re-set the flag, since the PE session on which it was
+ * set will be deleted, even if roaming is success or failure.
+ * When roaming is a success, the PE session for AP1 is
+ * deleted. When we get a candidate indication, it would be
+ * on the PE session of the AP1. AP2 to which we are about to
+ * roam will have a new PE session ID.If roaming fails for
+ * any reason, then it will anyways delete the PE session of
+ * of the AP1.
+ */
+ if (psessionEntry->roaming_in_progress ||
+ limIsReassocInProgress(pMac, psessionEntry)) {
+ limLog(pMac, LOGE,
+ FL("roam_progress=%d, reassoc=%d. Not disconnecting"),
+ psessionEntry->roaming_in_progress,
+ limIsReassocInProgress(pMac, psessionEntry));
+ vos_mem_free(pMsg);
+ return;
+ }
pStaDs = dphGetHashEntry(pMac,
DPH_STA_HASH_INDEX_PEER,
&psessionEntry->dph.dphHashTable);
diff --git a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
index 43661607a75c..cda0285eab75 100644
--- a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
+++ b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
@@ -3119,6 +3119,7 @@ limSendSmeCandidateFoundInd(tpAniSirGlobal pMac, tANI_U8 sessionId)
{
tSirMsgQ mmhMsg;
tSirSmeCandidateFoundInd *pSirSmeCandidateFoundInd;
+ tpPESession pe_session;
pSirSmeCandidateFoundInd = vos_mem_malloc(sizeof(tSirSmeCandidateFoundInd));
if (NULL == pSirSmeCandidateFoundInd) {
@@ -3131,6 +3132,15 @@ limSendSmeCandidateFoundInd(tpAniSirGlobal pMac, tANI_U8 sessionId)
pSirSmeCandidateFoundInd->length = sizeof(tSirSmeCandidateFoundInd);
pSirSmeCandidateFoundInd->sessionId = sessionId;
+ pe_session = pe_find_session_by_sme_session_id(pMac, sessionId);
+ if (pe_session == NULL) {
+ limLog(pMac, LOGE,FL("Session %d is invalid. Roaming will fail"),
+ sessionId);
+ return;
+ }
+ limLog(pMac, LOGE,FL("Set roaming_in_progress for SME:%d, PE:%d session"),
+ sessionId, pe_session->peSessionId);
+ pe_session->roaming_in_progress = true;
limLog( pMac, LOG1, FL("posting candidate ind to SME"));
mmhMsg.type = eWNI_SME_CANDIDATE_FOUND_IND;
diff --git a/CORE/MAC/src/pe/lim/limSession.c b/CORE/MAC/src/pe/lim/limSession.c
index 9c0989a6453d..7d6f760adcdd 100644
--- a/CORE/MAC/src/pe/lim/limSession.c
+++ b/CORE/MAC/src/pe/lim/limSession.c
@@ -337,6 +337,7 @@ tpPESession peCreateSession(tpAniSirGlobal pMac,
MAC_ADDRESS_STR " Max No. of STA %d",
pMac->lim.gpSession[i].peSessionId,
MAC_ADDR_ARRAY(bssid), numSta);
+ pMac->lim.gpSession[i].roaming_in_progress = false;
/* Initialize PMM Ps Offload Module */
if(pMac->psOffloadEnabled)