diff options
| author | gaurank kathpalia <gkathpal@codeaurora.org> | 2018-06-22 19:13:22 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-07-15 23:31:49 -0700 |
| commit | 268c7c39c3f8ecfa19fa7a9ecd56c74f25c3eed8 (patch) | |
| tree | c945362f5c8a336c8da891073f9ea89085c83961 | |
| parent | f77e2cd9a2412bbe72a95f40bd84679127e9f113 (diff) | |
qcacld-2.0: Prioritize connection req frames in pe queue
If there are many beacon/probe received and posted to pe queue
the connection req frames may get delayed and thus effect the
connection. This may also lead to connection failures.
To avoid this prioritize the connection req frames in pe queue.
Also ignore auth frame if same seq no frame is received after
sending assoc resp in case of SAP
Change-Id: I3d82657fc6f9b43742dafcd2835eb770bd524ef9
CRs-Fixed: 2266108
| -rw-r--r-- | CORE/MAC/src/include/dphGlobal.h | 10 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c | 20 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessAuthFrame.c | 8 |
3 files changed, 31 insertions, 7 deletions
diff --git a/CORE/MAC/src/include/dphGlobal.h b/CORE/MAC/src/include/dphGlobal.h index 4cd9bfc65647..661c4a38be9c 100644 --- a/CORE/MAC/src/include/dphGlobal.h +++ b/CORE/MAC/src/include/dphGlobal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -274,6 +274,14 @@ typedef struct sDphHashNode tANI_U8 staAuthenticated:1; + /// Previous Sequence number of auth packet + + tANI_U16 PrevAuthSeqno; + + /// Previous Sequence number of assoc packet + + tANI_U16 PrevAssocSeqno; + tANI_U8 fAniCount:1; tANI_U8 rmfEnabled:1; diff --git a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c index 34c6dd2cd7d9..cb1e79416431 100644 --- a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c +++ b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -235,6 +235,7 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tLimMlmStates mlmPrevState; tDot11fIERSN Dot11fIERSN; tDot11fIEWPA Dot11fIEWPA; + tANI_U16 prevAuthSeqno = 0xFFFF; tANI_U32 phyMode; tHalBitVal qosMode; tHalBitVal wsmMode, wmeMode; @@ -303,7 +304,8 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, if (NULL != pStaDs) { - if (pHdr->fc.retry > 0) { + if (pStaDs->PrevAssocSeqno == ((pHdr->seqControl.seqNumHi << 4) | + (pHdr->seqControl.seqNumLo))) { /* Ignore the Retry */ limLog(pMac, LOGE, FL("STA is initiating Assoc Req after ACK lost. " @@ -951,6 +953,10 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, /// Delete 'pre-auth' context of STA authType = pStaPreAuthContext->authType; + + /// Store the seq number of previous auth frame + prevAuthSeqno = pStaPreAuthContext->seqNum; + limDeletePreAuthNode(pMac, pHdr->sa); // All is well. Assign AID (after else part) @@ -1186,6 +1192,16 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, goto error; } + /// Store the previous auth frame's seq no + if (prevAuthSeqno != 0xFFFF) + { + pStaDs->PrevAuthSeqno = prevAuthSeqno; + } + /// Store the current assoc seq no + pStaDs->PrevAssocSeqno = ((pHdr->seqControl.seqNumHi << 4) | + (pHdr->seqControl.seqNumLo)); + limLog(pMac, LOG1, FL("Prev auth seq no %d Prev Assoc seq no. %d"), + pStaDs->PrevAuthSeqno, pStaDs->PrevAssocSeqno); sendIndToSme: diff --git a/CORE/MAC/src/pe/lim/limProcessAuthFrame.c b/CORE/MAC/src/pe/lim/limProcessAuthFrame.c index 3a88aa4bbc90..9993d6eccdf2 100644 --- a/CORE/MAC/src/pe/lim/limProcessAuthFrame.c +++ b/CORE/MAC/src/pe/lim/limProcessAuthFrame.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -662,11 +662,11 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse * SA-Query procedure determines that the original SA is * invalid. */ - if (isConnected + if (isConnected && pStaDs->PrevAuthSeqno != currSeqNum #ifdef WLAN_FEATURE_11W && !pStaDs->rmfEnabled #endif - ) + ) { limLog(pMac, LOGE, FL("STA is already connected but received auth frame" @@ -683,7 +683,7 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse if (pAuthNode) { /// Pre-auth context exists for the STA - if (pHdr->fc.retry == 0 || pAuthNode->seqNum != currSeqNum) + if (pAuthNode->seqNum != currSeqNum) { /** * STA is initiating brand-new Authentication |
