forked from rubenslte/android_kernel_samsung_msm8226
prima: Send assoc reject upon failing to post ASSOC_IND
Currently, lim silently drops the association if it fails to post ASSOC_IND due to some reason(e.g. invalid contents of assoc request) and the MLM state is stuck in eLIM_MLM_WT_ASSOC_CNF_STATE. Station context is not cleaned up till the next association. Gracefully cleanup the association in such failure cases. Change-Id: I348a7d3ffc537cf89dc311da7bb9846e27635efe CRs-Fixed: 2857049
This commit is contained in:
committed by
Francescodario Cuzzocrea
parent
e92fee434d
commit
0feadfa2a1
@@ -1501,7 +1501,7 @@ error:
|
||||
\param pMac
|
||||
\param *pStaDs - Station DPH hash entry
|
||||
\param psessionEntry - PE session entry
|
||||
\return None
|
||||
\return tSirRetStatus
|
||||
|
||||
* ?????? How do I get
|
||||
* - subtype =====> psessionEntry->parsedAssocReq.reassocRequest
|
||||
@@ -1511,7 +1511,7 @@ error:
|
||||
* - pHdr->seqControl =====> no longer needed
|
||||
* - pStaDs
|
||||
------------------------------------------------------------------*/
|
||||
void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry)
|
||||
tSirRetStatus limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry)
|
||||
{
|
||||
tpLimMlmAssocInd pMlmAssocInd = NULL;
|
||||
tpLimMlmReassocInd pMlmReassocInd;
|
||||
@@ -1550,7 +1550,7 @@ void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession p
|
||||
{
|
||||
limReleasePeerIdx(pMac, pStaDs->assocId, psessionEntry);
|
||||
limLog(pMac, LOGP, FL("AllocateMemory failed for pMlmAssocInd"));
|
||||
return;
|
||||
return eSIR_MEM_ALLOC_FAILED;
|
||||
}
|
||||
vos_mem_set(pMlmAssocInd, temp ,0);
|
||||
|
||||
@@ -1603,7 +1603,7 @@ void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession p
|
||||
PELOGE(limLog(pMac, LOGE, FL("rsnIEdata index out of bounds %d"),
|
||||
pMlmAssocInd->rsnIE.length);)
|
||||
vos_mem_free(pMlmAssocInd);
|
||||
return;
|
||||
return eSIR_FAILURE;
|
||||
}
|
||||
pMlmAssocInd->rsnIE.rsnIEdata[pMlmAssocInd->rsnIE.length] = SIR_MAC_WPA_EID;
|
||||
pMlmAssocInd->rsnIE.rsnIEdata[pMlmAssocInd->rsnIE.length + 1] = pAssocReq->wpa.length;
|
||||
@@ -1674,7 +1674,7 @@ void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession p
|
||||
limLog(pMac, LOGP, FL("call to AllocateMemory failed for "
|
||||
"pMlmReassocInd"));
|
||||
limReleasePeerIdx(pMac, pStaDs->assocId, psessionEntry);
|
||||
return;
|
||||
return eSIR_MEM_ALLOC_FAILED;
|
||||
}
|
||||
vos_mem_set(pMlmReassocInd, temp, 0);
|
||||
|
||||
@@ -1798,6 +1798,6 @@ void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession p
|
||||
vos_mem_free(pMlmReassocInd);
|
||||
}
|
||||
|
||||
return;
|
||||
return eSIR_SUCCESS;
|
||||
|
||||
} /*** end limSendMlmAssocInd() ***/
|
||||
|
||||
@@ -2518,7 +2518,13 @@ void limProcessBtAmpApMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPES
|
||||
* 2) PE receives eWNI_SME_ASSOC_CNF from SME
|
||||
* 3) BTAMP-AP sends Re/Association Response to BTAMP-STA
|
||||
*/
|
||||
limSendMlmAssocInd(pMac, pStaDs, psessionEntry);
|
||||
if (eSIR_SUCCESS != limSendMlmAssocInd(pMac, pStaDs, psessionEntry))
|
||||
limRejectAssociation(pMac, pStaDs->staAddr,
|
||||
pStaDs->mlmStaContext.subType,
|
||||
true, pStaDs->mlmStaContext.authType,
|
||||
pStaDs->assocId, true,
|
||||
(tSirResultCodes) eSIR_MAC_UNSPEC_FAILURE_STATUS,
|
||||
psessionEntry);
|
||||
// fall though to reclaim the original Add STA Response message
|
||||
end:
|
||||
if( 0 != limMsgQ->bodyptr )
|
||||
|
||||
@@ -664,7 +664,7 @@ tSirRetStatus limProcessAuthFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *, void
|
||||
#endif
|
||||
|
||||
void limProcessAssocReqFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8, tpPESession);
|
||||
void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry);
|
||||
tSirRetStatus limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry);
|
||||
|
||||
|
||||
void limProcessAssocRspFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8,tpPESession);
|
||||
|
||||
Reference in New Issue
Block a user