summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaochang Duan <xduan@qca.qualcomm.com>2014-01-24 16:59:05 -0800
committerPrakash Dhavali <pdhavali@qca.qualcomm.com>2014-01-29 12:06:37 -0800
commit8f3607eeddd2340f1f2c15ea2a3683c3d563a25a (patch)
tree244ef142c0325da62cd8f37306c3544666135742
parent24f87d073f28f74b186e324eb39ce576ea02a210 (diff)
wlan: Add proper mcs set negotiation between 2x2 and 1x1 devices
Added mcs support for data transfer between 2x2 devices and 1x1 devices. Proper MCS Set negotiation was added to support up to 2x2 wlan devices. Also added code such that 2x2 enable parameter from WCNSS_qcom_cfg.ini was properly passed to PE in IBSS mode. Change-Id: Id9494dbbeab4de635fee43751fa1f0064852ba14 CRs-Fixed: 597004
-rw-r--r--CORE/MAC/src/pe/lim/limAssocUtils.c36
-rw-r--r--CORE/MAC/src/pe/lim/limAssocUtils.h2
-rw-r--r--CORE/SME/src/csr/csrApiRoam.c1
3 files changed, 35 insertions, 4 deletions
diff --git a/CORE/MAC/src/pe/lim/limAssocUtils.c b/CORE/MAC/src/pe/lim/limAssocUtils.c
index d668a36da4ac..aaa76daec0e5 100644
--- a/CORE/MAC/src/pe/lim/limAssocUtils.c
+++ b/CORE/MAC/src/pe/lim/limAssocUtils.c
@@ -1581,6 +1581,7 @@ tSirRetStatus limPopulateVhtMcsSet(tpAniSirGlobal pMac,
if( pPeerVHTCaps != NULL)
{
tANI_U16 mcsMapMask = MCSMAPMASK1x1;
+ tANI_U16 mcsMapMask2x2 = 0;
pRates->vhtTxHighestDataRate = SIR_MIN(pRates->vhtTxHighestDataRate, pPeerVHTCaps->txSupDataRate);
pRates->vhtRxHighestDataRate = SIR_MIN(pRates->vhtRxHighestDataRate, pPeerVHTCaps->rxHighSupDataRate);
@@ -1592,16 +1593,19 @@ tSirRetStatus limPopulateVhtMcsSet(tpAniSirGlobal pMac,
(IS_24G_CH(psessionEntry->currentOperChannel)))
{
if(IS_2X2_CHAIN(psessionEntry->chainMask))
- mcsMapMask = MCSMAPMASK2x2;
+ mcsMapMask2x2 = MCSMAPMASK2x2;
+ else
+ PELOGE(limLog(pMac, LOGE, FL("2x2 not enabled %d"),
+ psessionEntry->chainMask);)
}
else
{
- mcsMapMask = MCSMAPMASK2x2;
+ mcsMapMask2x2 = MCSMAPMASK2x2;
}
}
else
{
- mcsMapMask = MCSMAPMASK2x2;
+ mcsMapMask2x2 = MCSMAPMASK2x2;
}
}
@@ -1613,6 +1617,32 @@ tSirRetStatus limPopulateVhtMcsSet(tpAniSirGlobal pMac,
pRates->vhtTxMCSMap &= ~(mcsMapMask);
pRates->vhtTxMCSMap |= (pPeerVHTCaps->txMCSMap & mcsMapMask);
}
+
+ if (mcsMapMask2x2) {
+
+ tANI_U16 peerMcsMap, selfMcsMap;
+
+ peerMcsMap = pPeerVHTCaps->rxMCSMap & mcsMapMask2x2;
+ selfMcsMap = pRates->vhtRxMCSMap & mcsMapMask2x2;
+
+ if ((selfMcsMap != mcsMapMask2x2) &&
+ ((peerMcsMap == mcsMapMask2x2) ||
+ (peerMcsMap < selfMcsMap))) {
+ pRates->vhtRxMCSMap &= ~mcsMapMask2x2;
+ pRates->vhtRxMCSMap |= peerMcsMap;
+ }
+
+ peerMcsMap = (pPeerVHTCaps->txMCSMap & mcsMapMask2x2);
+ selfMcsMap = (pRates->vhtTxMCSMap & mcsMapMask2x2);
+
+ if ((selfMcsMap != mcsMapMask2x2) &&
+ ((peerMcsMap == mcsMapMask2x2) ||
+ (peerMcsMap < selfMcsMap))) {
+ pRates->vhtTxMCSMap &= ~mcsMapMask2x2;
+ pRates->vhtTxMCSMap |= peerMcsMap;
+ }
+ }
+
limLog( pMac, LOG1, FL("enable2x2 - %d vhtRxMCSMap - %x vhtTxMCSMap - %x\n"), pMac->roam.configParam.enable2x2, pRates->vhtRxMCSMap, pRates->vhtTxMCSMap);
}
diff --git a/CORE/MAC/src/pe/lim/limAssocUtils.h b/CORE/MAC/src/pe/lim/limAssocUtils.h
index 8a3ddb0fb799..d1ccbf359a61 100644
--- a/CORE/MAC/src/pe/lim/limAssocUtils.h
+++ b/CORE/MAC/src/pe/lim/limAssocUtils.h
@@ -116,7 +116,7 @@ tSirRetStatus limPopulateMatchingRateSet(tpAniSirGlobal,
#ifdef WLAN_FEATURE_11AC
#define MCSMAPMASK1x1 0x3
-#define MCSMAPMASK2x2 0xF
+#define MCSMAPMASK2x2 0xC
#endif
tSirRetStatus limAddSta(tpAniSirGlobal, tpDphHashNode, tANI_U8, tpPESession);
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index 64fcbc431b83..45a49711be2e 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -1891,6 +1891,7 @@ eHalStatus csrGetConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
pParam->txBFCsnValue = pMac->roam.configParam.txBFCsnValue;
pParam->enableMuBformee = pMac->roam.configParam.txMuBformee;
pParam->enableVhtFor24GHz = pMac->roam.configParam.enableVhtFor24GHz;
+ pParam->enable2x2 = pMac->roam.configParam.enable2x2;
#endif
#ifdef WLAN_FEATURE_VOWIFI_11R
vos_mem_copy(&pMac->roam.configParam.csr11rConfig,