diff options
| author | Padma, Santhosh Kumar <skpadma@qti.qualcomm.com> | 2016-07-04 17:11:11 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-07-07 15:36:27 +0530 |
| commit | db6b747ff9d9be5814ab05004f8968cf099a3252 (patch) | |
| tree | a7480ea9c0a8851e5df25a231a04056a52b301d6 | |
| parent | a10e352f0dd152798da858267408b366ebfc91c2 (diff) | |
qcacld-2.0: Fix pmfComebackTimer during roaming
Currently pmfComebackTimer is not initialized during roaming. This
can lead to error in peDeleteSession when driver tries to destroy
pmfComebackTimer. Fix this by initializing pmfComebackTimer during
roaming. Also, handle status eSIR_MAC_TRY_AGAIN_LATER as failure
during roaming.
Change-Id: Ic9c4e996c4078d09ef7cd9b3b073105d94eb53fb
CRs-Fixed: 1037640
| -rw-r--r-- | CORE/MAC/src/pe/lim/limFT.c | 15 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c | 29 |
2 files changed, 42 insertions, 2 deletions
diff --git a/CORE/MAC/src/pe/lim/limFT.c b/CORE/MAC/src/pe/lim/limFT.c index f6f86b0340ba..5d285fe5b907 100644 --- a/CORE/MAC/src/pe/lim/limFT.c +++ b/CORE/MAC/src/pe/lim/limFT.c @@ -827,6 +827,7 @@ void limFillFTSession(tpAniSirGlobal pMac, tSchBeaconStruct *pBeaconStruct; tANI_U32 selfDot11Mode; ePhyChanBondState cbEnabledMode; + VOS_STATUS vosStatus; pBeaconStruct = vos_mem_malloc(sizeof(tSchBeaconStruct)); if (NULL == pBeaconStruct) { @@ -989,6 +990,20 @@ void limFillFTSession(tpAniSirGlobal pMac, pftSessionEntry->encryptType = psessionEntry->encryptType; #ifdef WLAN_FEATURE_11W pftSessionEntry->limRmfEnabled = psessionEntry->limRmfEnabled; + + if (psessionEntry->limRmfEnabled) { + psessionEntry->pmfComebackTimerInfo.pMac = pMac; + psessionEntry->pmfComebackTimerInfo.sessionID = + psessionEntry->smeSessionId; + vosStatus = vos_timer_init(&psessionEntry->pmfComebackTimer, + VOS_TIMER_TYPE_SW, + limPmfComebackTimerCallback, + (void *)&psessionEntry->pmfComebackTimerInfo); + if (VOS_STATUS_SUCCESS != vosStatus) { + limLog(pMac, LOGP, + FL("cannot init pmf comeback timer.")); + } + } #endif if (pftSessionEntry->limRFBand == SIR_BAND_2_4_GHZ) diff --git a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c index 722a6c3f97bf..cf803cb8add7 100644 --- a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c +++ b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -676,8 +676,15 @@ limProcessAssocRspFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tANI_U8 sub if (pAssocRsp->statusCode != eSIR_MAC_SUCCESS_STATUS #ifdef WLAN_FEATURE_11W + /* + * Consider eSIR_MAC_TRY_AGAIN_LATER as failure in re-assoc + * case as waiting for come back time and retrying reassociation + * again will increase roam time. Its better to allow supplicant + * to select new candiadte + */ && (!psessionEntry->limRmfEnabled || - pAssocRsp->statusCode != eSIR_MAC_TRY_AGAIN_LATER) + pAssocRsp->statusCode != eSIR_MAC_TRY_AGAIN_LATER || + (subType == LIM_REASSOC)) #endif /* WLAN_FEATURE_11W */ ) { @@ -747,11 +754,29 @@ limProcessAssocRspFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tANI_U8 sub timeout_value)) { PELOGE(limLog(pMac, LOGE, FL("Failed to start comeback timer."));) + + mlmAssocCnf.resultCode = eSIR_SME_ASSOC_REFUSED; + mlmAssocCnf.protStatusCode = eSIR_MAC_UNSPEC_FAILURE_STATUS; + + /* Delete Pre-auth context for the associated BSS */ + if (limSearchPreAuthList(pMac, pHdr->sa)) + limDeletePreAuthNode(pMac, pHdr->sa); + + goto assocReject; } } else { PELOGE(limLog(pMac, LOG1, FL("ASSOC response with eSIR_MAC_TRY_AGAIN_LATER recvd." "But try again time interval IE is wrong."));) + + mlmAssocCnf.resultCode = eSIR_SME_ASSOC_REFUSED; + mlmAssocCnf.protStatusCode = eSIR_MAC_UNSPEC_FAILURE_STATUS; + + /* Delete Pre-auth context for the associated BSS */ + if (limSearchPreAuthList(pMac, pHdr->sa)) + limDeletePreAuthNode(pMac, pHdr->sa); + + goto assocReject; } /* callback will send Assoc again */ /* DO NOT send ASSOC CNF to MLM state machine */ |
