From 613f1c9bbda45c00a621be54567cfe52b37bd287 Mon Sep 17 00:00:00 2001 From: Krishna Kumaar Natarajan Date: Thu, 30 Jul 2015 21:48:09 -0700 Subject: qcacld-2.0: Set phymode in SME considering HT and VHT capability. Set phymode to 11ac only when HT Caps and VHT Caps are present. Earlier we were setting phymode in SME based on HT/VHT capability independently. If a rogue AP sends only VHT Capability but not HT capability, our phymode computation was incorrect. Change-Id: Id3db66798a1a1e3ebc42da59a66cea04093e78aa CRs-Fixed: 879830 --- CORE/MAC/src/pe/lim/limSendManagementFrames.c | 2 ++ CORE/SME/src/csr/csrUtil.c | 10 +++++----- CORE/SYS/legacy/src/utils/src/parserApi.c | 2 ++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CORE/MAC/src/pe/lim/limSendManagementFrames.c b/CORE/MAC/src/pe/lim/limSendManagementFrames.c index 26f7e6912567..d81c5d29e33c 100644 --- a/CORE/MAC/src/pe/lim/limSendManagementFrames.c +++ b/CORE/MAC/src/pe/lim/limSendManagementFrames.c @@ -1292,6 +1292,7 @@ limSendAssocRspMgmtFrame(tpAniSirGlobal pMac, if ( pSta->mlmStaContext.htCapability && psessionEntry->htCapability ) { + limLog(pMac, LOG1, FL("Populate HT IEs in Assoc Response")); PopulateDot11fHTCaps( pMac, psessionEntry, &frm.HTCaps ); PopulateDot11fHTInfo( pMac, &frm.HTInfo, psessionEntry ); } @@ -2176,6 +2177,7 @@ limSendAssocReqMgmtFrame(tpAniSirGlobal pMac, * when AP is also operating in 11n mode */ if (psessionEntry->htCapability && pMac->lim.htCapabilityPresentInBeacon) { + limLog(pMac, LOG1, FL("Populate HT IEs in Assoc Request")); PopulateDot11fHTCaps(pMac, psessionEntry, &pFrm->HTCaps); } #ifdef WLAN_FEATURE_11AC diff --git a/CORE/SME/src/csr/csrUtil.c b/CORE/SME/src/csr/csrUtil.c index fa0d9ef7d959..a001604023ac 100644 --- a/CORE/SME/src/csr/csrUtil.c +++ b/CORE/SME/src/csr/csrUtil.c @@ -1626,13 +1626,13 @@ eHalStatus csrGetPhyModeFromBss(tpAniSirGlobal pMac, tSirBssDescription *pBSSDes if (pIes) { if (pIes->HTCaps.present) { phyMode = eCSR_DOT11_MODE_11n; - } - #ifdef WLAN_FEATURE_11AC - if (IS_BSS_VHT_CAPABLE(pIes->VHTCaps)) { - phyMode = eCSR_DOT11_MODE_11ac; - } + if (IS_BSS_VHT_CAPABLE(pIes->VHTCaps)) { + phyMode = eCSR_DOT11_MODE_11ac; + } #endif + } + *pPhyMode = phyMode; } diff --git a/CORE/SYS/legacy/src/utils/src/parserApi.c b/CORE/SYS/legacy/src/utils/src/parserApi.c index 5a6aff37e15a..8e53f8ee270e 100644 --- a/CORE/SYS/legacy/src/utils/src/parserApi.c +++ b/CORE/SYS/legacy/src/utils/src/parserApi.c @@ -2750,11 +2750,13 @@ sirConvertAssocRespFrame2Struct(tpAniSirGlobal pMac, if ( ar.HTCaps.present ) { + limLog(pMac, LOG1, FL("Received Assoc Response with HT Cap")); vos_mem_copy( &pAssocRsp->HTCaps, &ar.HTCaps, sizeof( tDot11fIEHTCaps ) ); } if ( ar.HTInfo.present ) { + limLog(pMac, LOG1, FL("Received Assoc Response with HT Info")); vos_mem_copy( &pAssocRsp->HTInfo, &ar.HTInfo, sizeof( tDot11fIEHTInfo ) ); } -- cgit v1.2.3