wlan:Sessionize WME configuration
If device in STA mode connects to an AP having WME disabled then
CSR disabling WME CFG item which is getting reflected in
SAP mode i.e WME is disabled for both modes while operating in
concurrency mode.
WME CFG item is not sessionized and it is getting used commonly
in SAP and STA mode.
As part of this change WME configuration is sessionized.
Change-Id: I3e4ec1c10ef06bb8e7597fe6e9b46725abd57657
CRs-Fixed: 573384
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h
index b591339..c4d34b9 100644
--- a/CORE/MAC/inc/sirApi.h
+++ b/CORE/MAC/inc/sirApi.h
@@ -1073,7 +1073,8 @@
tANI_U8 txBFCsnValue;
#endif
tANI_U8 isAmsduSupportInAMPDU;
-
+ tAniBool isWMEenabled;
+ tAniBool isQosEnabled;
tAniTitanCBNeighborInfo cbNeighbors;
tAniBool spectrumMgtIndicator;
tSirMacPowerCapInfo powerCap;
diff --git a/CORE/MAC/src/pe/lim/limProcessCfgUpdates.c b/CORE/MAC/src/pe/lim/limProcessCfgUpdates.c
index 3b5858c..dd3240b 100644
--- a/CORE/MAC/src/pe/lim/limProcessCfgUpdates.c
+++ b/CORE/MAC/src/pe/lim/limProcessCfgUpdates.c
@@ -744,9 +744,13 @@
limLog(pMac, LOGP, FL("cfg get short preamble failed"));
psessionEntry->beaconParams.fShortPreamble = (val) ? 1 : 0;
- if (wlan_cfgGetInt(pMac, WNI_CFG_WME_ENABLED, &val) != eSIR_SUCCESS)
- limLog(pMac, LOGP, FL("cfg get wme enabled failed"));
- psessionEntry->limWmeEnabled = (val) ? 1 : 0;
+ /* In STA case this parameter is filled during the join request */
+ if (psessionEntry->limSystemRole == eLIM_AP_ROLE)
+ {
+ if (wlan_cfgGetInt(pMac, WNI_CFG_WME_ENABLED, &val) != eSIR_SUCCESS)
+ limLog(pMac, LOGP, FL("cfg get wme enabled failed"));
+ psessionEntry->limWmeEnabled = (val) ? 1 : 0;
+ }
if (wlan_cfgGetInt(pMac, WNI_CFG_WSM_ENABLED, &val) != eSIR_SUCCESS)
limLog(pMac, LOGP, FL("cfg get wsm enabled failed"));
@@ -757,11 +761,13 @@
PELOGE(limLog(pMac, LOGE, FL("Can't enable WSM without WME"));)
psessionEntry->limWsmEnabled = 0;
}
-
- if (wlan_cfgGetInt(pMac, WNI_CFG_QOS_ENABLED, &val) != eSIR_SUCCESS)
- limLog(pMac, LOGP, FL("cfg get qos enabled failed"));
- psessionEntry->limQosEnabled = (val) ? 1 : 0;
-
+ /* In STA , this parameter is filled during the join request */
+ if (psessionEntry->limSystemRole== eLIM_AP_ROLE)
+ {
+ if (wlan_cfgGetInt(pMac, WNI_CFG_QOS_ENABLED, &val) != eSIR_SUCCESS)
+ limLog(pMac, LOGP, FL("cfg get qos enabled failed"));
+ psessionEntry->limQosEnabled = (val) ? 1 : 0;
+ }
if (wlan_cfgGetInt(pMac, WNI_CFG_HCF_ENABLED, &val) != eSIR_SUCCESS)
limLog(pMac, LOGP, FL("cfg get hcf enabled failed"));
psessionEntry->limHcfEnabled = (val) ? 1 : 0;
diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index d968013..6cb401a 100644
--- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -1695,6 +1695,8 @@
psessionEntry->bssType = pSmeJoinReq->bsstype;
psessionEntry->statypeForBss = STA_ENTRY_PEER;
+ psessionEntry->limWmeEnabled = pSmeJoinReq->isWMEenabled;
+ psessionEntry->limQosEnabled = pSmeJoinReq->isQosEnabled;
/* Copy the dot 11 mode in to the session table */
diff --git a/CORE/MAC/src/pe/lim/limSerDesUtils.c b/CORE/MAC/src/pe/lim/limSerDesUtils.c
index 2b539d2..1e50438 100644
--- a/CORE/MAC/src/pe/lim/limSerDesUtils.c
+++ b/CORE/MAC/src/pe/lim/limSerDesUtils.c
@@ -1174,6 +1174,18 @@
if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE)
return eSIR_FAILURE;
+ pJoinReq->isWMEenabled = (tAniBool)limGetU32(pBuf);
+ pBuf += sizeof(tAniBool);
+ len -= sizeof(tAniBool);
+ if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE)
+ return eSIR_FAILURE;
+
+ pJoinReq->isQosEnabled = (tAniBool)limGetU32(pBuf);
+ pBuf += sizeof(tAniBool);
+ len -= sizeof(tAniBool);
+ if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE)
+ return eSIR_FAILURE;
+
// Extract Titan CB Neighbor BSS info
pJoinReq->cbNeighbors.cbBssFoundPri = *pBuf;
pBuf++;
diff --git a/CORE/SME/inc/csrInternal.h b/CORE/SME/inc/csrInternal.h
index 8e62a77..03be8a3 100644
--- a/CORE/SME/inc/csrInternal.h
+++ b/CORE/SME/inc/csrInternal.h
@@ -927,6 +927,8 @@
tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED];
#endif
tANI_BOOLEAN fWMMConnection;
+ tANI_BOOLEAN fQOSConnection;
+
#ifdef FEATURE_WLAN_BTAMP_UT_RF
//To retry a join later when it fails if so desired
vos_timer_t hTimerJoinRetry;
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index 5a899ca..17ca2cc 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -3305,8 +3305,7 @@
}
//save the WMM setting for later use
pMac->roam.roamSession[sessionId].fWMMConnection = (tANI_BOOLEAN)WmeEnabled;
- status = ccmCfgSetInt(pMac, WNI_CFG_QOS_ENABLED, QoSEnabled, NULL, eANI_BOOLEAN_FALSE);
- status = ccmCfgSetInt(pMac, WNI_CFG_WME_ENABLED, WmeEnabled, NULL, eANI_BOOLEAN_FALSE);
+ pMac->roam.roamSession[sessionId].fQOSConnection = (tANI_BOOLEAN)QoSEnabled;
return (status);
}
static eHalStatus csrGetRateSet( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, eCsrPhyMode phyMode, tSirBssDescription *pBssDesc,
@@ -12870,6 +12869,35 @@
*pBuf = (tANI_U8)pMac->roam.configParam.isAmsduSupportInAMPDU;
pBuf++;
+ // WME
+ if(pMac->roam.roamSession[sessionId].fWMMConnection)
+ {
+ //WME enabled
+ dwTmp = pal_cpu_to_be32(TRUE);
+ vos_mem_copy(pBuf, &dwTmp, sizeof(tAniBool));
+ pBuf += sizeof(tAniBool);
+ }
+ else
+ {
+ dwTmp = pal_cpu_to_be32(FALSE);
+ vos_mem_copy(pBuf, &dwTmp, sizeof(tAniBool));
+ pBuf += sizeof(tAniBool);
+ }
+
+ // QOS
+ if(pMac->roam.roamSession[sessionId].fQOSConnection)
+ {
+ //QOS enabled
+ dwTmp = pal_cpu_to_be32(TRUE);
+ vos_mem_copy(pBuf, &dwTmp, sizeof(tAniBool));
+ pBuf += sizeof(tAniBool);
+ }
+ else
+ {
+ dwTmp = pal_cpu_to_be32(FALSE);
+ vos_mem_copy(pBuf, &dwTmp, sizeof(tAniBool));
+ pBuf += sizeof(tAniBool);
+ }
//BssDesc
csrPrepareJoinReassocReqBuffer( pMac, pBssDescription, pBuf,
(tANI_U8)pProfile->uapsd_mask);