summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCNSS_WLAN Service <cnssbldsw@qualcomm.com>2017-06-02 23:14:11 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-06-02 23:14:11 -0700
commitb804b1a7012be38e9ddaaf33d645ac7cb7703c49 (patch)
treef73ce22a3ebe973e62791dbaae604d8a8f19b433
parent1162d5c2b594e1d70ac9a4d5ae8991c60149be3c (diff)
parent9421f06fe91b49ff2c68f77e5c99a0bdb4622357 (diff)
Merge "qcacld-2.0: Update dot11mode properly for roamable AP" into wlan-cld2.driver.lnx.1.0-dev
-rw-r--r--CORE/MAC/src/pe/include/limFTDefs.h3
-rw-r--r--CORE/MAC/src/pe/lim/limFT.c10
-rw-r--r--CORE/SME/src/csr/csrApiRoam.c68
3 files changed, 75 insertions, 6 deletions
diff --git a/CORE/MAC/src/pe/include/limFTDefs.h b/CORE/MAC/src/pe/include/limFTDefs.h
index 9d3ba2a9dad8..ca224c8fbc5e 100644
--- a/CORE/MAC/src/pe/include/limFTDefs.h
+++ b/CORE/MAC/src/pe/include/limFTDefs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2015, 2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -56,6 +56,7 @@ typedef struct sSirFTPreAuthReq
{
tANI_U16 messageType; // eWNI_SME_FT_PRE_AUTH_REQ
tANI_U16 length;
+ tANI_U32 dot11mode;
tANI_BOOLEAN bPreAuthRspProcessed; /* Track if response is processed for this request
We expect only one response per request. */
tANI_U8 preAuthchannelNum;
diff --git a/CORE/MAC/src/pe/lim/limFT.c b/CORE/MAC/src/pe/lim/limFT.c
index 526fd404b1f4..59d12a49da6d 100644
--- a/CORE/MAC/src/pe/lim/limFT.c
+++ b/CORE/MAC/src/pe/lim/limFT.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -834,7 +834,6 @@ void limFillFTSession(tpAniSirGlobal pMac,
tPowerdBm localPowerConstraint;
tPowerdBm regMax;
tSchBeaconStruct *pBeaconStruct;
- tANI_U32 selfDot11Mode;
ePhyChanBondState cbEnabledMode;
#ifdef WLAN_FEATURE_11W
VOS_STATUS vosStatus;
@@ -881,9 +880,10 @@ void limFillFTSession(tpAniSirGlobal pMac,
vos_mem_copy(pftSessionEntry->ssId.ssId, pBeaconStruct->ssId.ssId,
pftSessionEntry->ssId.length);
- wlan_cfgGetInt(pMac, WNI_CFG_DOT11_MODE, &selfDot11Mode);
- limLog(pMac, LOG1, FL("selfDot11Mode %d"),selfDot11Mode );
- pftSessionEntry->dot11mode = selfDot11Mode;
+
+ pftSessionEntry->dot11mode =
+ psessionEntry->ftPEContext.pFTPreAuthReq->dot11mode;
+ limLog(pMac, LOG1, FL("dot11mode %d"), pftSessionEntry->dot11mode);
pftSessionEntry->vhtCapability =
(IS_DOT11_MODE_VHT(pftSessionEntry->dot11mode)
&& IS_BSS_VHT_CAPABLE(pBeaconStruct->VHTCaps));
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index b59ce7c417e5..f28870377e05 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -3481,6 +3481,8 @@ eHalStatus csrRoamPrepareBssConfig(tpAniSirGlobal pMac, tCsrRoamProfile *pProfil
pBssConfig->uCfgDot11Mode = eCSR_CFG_DOT11_MODE_11A;
}
}
+ smsLog(pMac, LOG1, FL("phyMode %d uCfgDot11Mode %d"),
+ pProfile->phyMode, pBssConfig->uCfgDot11Mode);
//Qos
if ((pBssConfig->uCfgDot11Mode != eCSR_CFG_DOT11_MODE_11N) &&
(pMac->roam.configParam.WMMSupportMode == eCsrRoamWmmNoQos))
@@ -14065,6 +14067,10 @@ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDe
//Need to disable VHT operation in 2.4 GHz band
ucDot11Mode = WNI_CFG_DOT11_MODE_11N;
}
+
+ smsLog(pMac, LOG1, FL("dot11mode %d uCfgDot11Mode %d"),
+ ucDot11Mode, pSession->bssParams.uCfgDot11Mode);
+
*pBuf = (tANI_U8)ucDot11Mode;
pBuf++;
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
@@ -19193,6 +19199,60 @@ eHalStatus csrRoamUpdateWPARSNIEs( tpAniSirGlobal pMac, tANI_U32 sessionId, tSir
return ( status );
}
+tANI_U32 csrGetdot11Mode(tHalHandle hHal, tANI_U32 sessionId,
+ tpSirBssDescription pBssDescription)
+{
+ tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+ tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId);
+ eCsrCfgDot11Mode uCfgDot11Mode, cfgDot11Mode;
+ eHalStatus status;
+ tDot11fBeaconIEs *ies_local = NULL;
+ tANI_U32 dot11mode = 0;
+
+ smsLog(pMac, LOG1, FL("phyMode %d"), pSession->pCurRoamProfile->phyMode);
+
+ /* Get IE's */
+ status = csrGetParsedBssDescriptionIEs(pMac, pBssDescription, &ies_local);
+ if (!HAL_STATUS_SUCCESS(status)) {
+ smsLog(pMac, LOGE,
+ FL("csrGetParsedBssDescriptionIEs failed"));
+ return 0;
+ }
+ if(ies_local == NULL) {
+ smsLog(pMac, LOGE,
+ FL("ies_local is NULL"));
+ return 0;
+ }
+
+ if(csrIsPhyModeMatch(pMac, pSession->pCurRoamProfile->phyMode,
+ pBssDescription, pSession->pCurRoamProfile, &cfgDot11Mode, ies_local))
+ uCfgDot11Mode = cfgDot11Mode;
+ else
+ {
+ smsLog(pMac, LOGE, "Can not find match phy mode");
+ if(CSR_IS_CHANNEL_5GHZ(pBssDescription->channelId))
+ uCfgDot11Mode = eCSR_CFG_DOT11_MODE_11A;
+ else
+ uCfgDot11Mode = eCSR_CFG_DOT11_MODE_11G;
+ }
+
+ /* dot11mode */
+ dot11mode = csrTranslateToWNICfgDot11Mode(pMac, uCfgDot11Mode);
+ smsLog(pMac, LOG1,
+ FL("dot11mode %d uCfgDot11Mode %d"), dot11mode, uCfgDot11Mode);
+
+ if (pBssDescription->channelId <= 14 &&
+ FALSE == pMac->roam.configParam.enableVhtFor24GHz &&
+ WNI_CFG_DOT11_MODE_11AC == dot11mode)
+ {
+ /* Need to disable VHT operation in 2.4 GHz band */
+ dot11mode = WNI_CFG_DOT11_MODE_11N;
+ }
+ vos_mem_free(ies_local);
+ return dot11mode;
+}
+
+
#ifdef WLAN_FEATURE_VOWIFI_11R
eHalStatus
csrRoamIssueFTPreauthReq(tHalHandle hHal, tANI_U32 sessionId,
@@ -19234,6 +19294,14 @@ csrRoamIssueFTPreauthReq(tHalHandle hHal, tANI_U32 sessionId,
pftPreAuthReq->messageType = pal_cpu_to_be16(eWNI_SME_FT_PRE_AUTH_REQ);
pftPreAuthReq->preAuthchannelNum = pBssDescription->channelId;
+ pftPreAuthReq->dot11mode =
+ csrGetdot11Mode(hHal, sessionId, pBssDescription);
+ if (!pftPreAuthReq->dot11mode)
+ {
+ smsLog(pMac, LOGE, FL("pftPreAuthReq->dot11mode is zero"));
+ vos_mem_free(pftPreAuthReq);
+ return eHAL_STATUS_FAILURE;
+ }
vos_mem_copy((void *)&pftPreAuthReq->currbssId,
(void *)pSession->connectedProfile.bssid, sizeof(tSirMacAddr));