summaryrefslogtreecommitdiff
path: root/CORE/MAC/src
diff options
context:
space:
mode:
authorMushtaq A Mujale <mmujale@qca.qualcomm.com>2014-04-16 19:06:33 -0700
committerPitani Venkata Rajesh Kumar <c_vpitan@qti.qualcomm.com>2014-04-22 11:48:40 +0530
commit2547cff3e99361cb739545ce3cbb35b4d6021bc4 (patch)
tree95bebc7a914a827ff1325571b5dbed5aa72f1508 /CORE/MAC/src
parentf17f1dbcfd5cb2c190dc54841622f729e3b5bbb6 (diff)
qcacld: Send the correct Rx NSS to fw.
Parse the Assoc req frame and override the Rx Nss if operating Mode notification IE is present. Parse the Operating Mode action frame and update the Rx Nss to fw. Change-Id: Ia6a6355c66ec76b54f3bb38b4106d16733cbd928 CRs-Fixed: 645346
Diffstat (limited to 'CORE/MAC/src')
-rw-r--r--CORE/MAC/src/include/dphGlobal.h1
-rw-r--r--CORE/MAC/src/include/sirParams.h4
-rw-r--r--CORE/MAC/src/pe/lim/limAssocUtils.c2
-rw-r--r--CORE/MAC/src/pe/lim/limProcessActionFrame.c10
-rw-r--r--CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c12
-rw-r--r--CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c4
-rw-r--r--CORE/MAC/src/pe/lim/limSendMessages.c41
-rw-r--r--CORE/MAC/src/pe/lim/limSendMessages.h3
-rw-r--r--CORE/MAC/src/pe/lim/limUtils.c22
-rw-r--r--CORE/MAC/src/pe/lim/limUtils.h6
-rw-r--r--CORE/MAC/src/pe/sch/schBeaconProcess.c4
11 files changed, 101 insertions, 8 deletions
diff --git a/CORE/MAC/src/include/dphGlobal.h b/CORE/MAC/src/include/dphGlobal.h
index 37fc1f3c8b8c..b6d4e4d8bd96 100644
--- a/CORE/MAC/src/include/dphGlobal.h
+++ b/CORE/MAC/src/include/dphGlobal.h
@@ -611,6 +611,7 @@ typedef struct sDphHashNode
#ifdef WLAN_FEATURE_11AC
tANI_U8 vhtSupportedChannelWidthSet;
+ tANI_U8 vhtSupportedRxNss;
tANI_U8 vhtBeamFormerCapable;
#endif
diff --git a/CORE/MAC/src/include/sirParams.h b/CORE/MAC/src/include/sirParams.h
index 0e60943ce69b..f9e7c418e5c0 100644
--- a/CORE/MAC/src/include/sirParams.h
+++ b/CORE/MAC/src/include/sirParams.h
@@ -664,6 +664,10 @@ typedef struct sSirMbMsgP2p
#define SIR_HAL_DISASSOC_TX_COMP (SIR_HAL_ITC_MSG_TYPES_BEGIN + 255)
#define SIR_HAL_DEAUTH_TX_COMP (SIR_HAL_ITC_MSG_TYPES_BEGIN + 256)
+#ifdef WLAN_FEATURE_11AC
+#define SIR_HAL_UPDATE_RX_NSS (SIR_HAL_ITC_MSG_TYPES_BEGIN + 257)
+#endif
+
#define SIR_HAL_MSG_TYPES_END (SIR_HAL_MSG_TYPES_BEGIN + 0x1FF)
// CFG message types
diff --git a/CORE/MAC/src/pe/lim/limAssocUtils.c b/CORE/MAC/src/pe/lim/limAssocUtils.c
index 8f7f7de51a77..9ad28527bb5b 100644
--- a/CORE/MAC/src/pe/lim/limAssocUtils.c
+++ b/CORE/MAC/src/pe/lim/limAssocUtils.c
@@ -2505,6 +2505,7 @@ limAddSta(
if(pAddStaParams->vhtCapable)
{
pAddStaParams->vhtTxChannelWidthSet = pStaDs->vhtSupportedChannelWidthSet;
+ pAddStaParams->vhtSupportedRxNss = pStaDs->vhtSupportedRxNss;
pAddStaParams->vhtTxBFCapable =
#ifdef FEATURE_WLAN_TDLS
(( STA_ENTRY_PEER == pStaDs->staType ) || (STA_ENTRY_TDLS_PEER == pStaDs->staType)) ?
@@ -3966,6 +3967,7 @@ tSirRetStatus limStaSendAddBss( tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp,
if (psessionEntry->vhtCapability && pBeaconStruct->VHTCaps.present)
{
pAddBssParams->staContext.vhtCapable = 1;
+ pAddBssParams->staContext.vhtSupportedRxNss = pStaDs->vhtSupportedRxNss;
if ((pAssocRsp->VHTCaps.suBeamFormerCap ||
pAssocRsp->VHTCaps.muBeamformerCap) &&
psessionEntry->txBFIniFeatureEnabled)
diff --git a/CORE/MAC/src/pe/lim/limProcessActionFrame.c b/CORE/MAC/src/pe/lim/limProcessActionFrame.c
index 9437dd284b7e..00e1474ca498 100644
--- a/CORE/MAC/src/pe/lim/limProcessActionFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessActionFrame.c
@@ -474,8 +474,16 @@ __limProcessOperatingModeActionFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo
pSta->htSupportedChannelWidthSet = eHT_CHANNEL_WIDTH_20MHZ;
}
limCheckVHTOpModeChange( pMac, psessionEntry,
- (pOperatingModeframe->OperatingMode.chanWidth), pSta->staIndex);
+ (pOperatingModeframe->OperatingMode.chanWidth),
+ pSta->staIndex, pHdr->sa);
}
+
+ if (pSta->vhtSupportedRxNss != (pOperatingModeframe->OperatingMode.rxNSS + 1)) {
+ pSta->vhtSupportedRxNss = pOperatingModeframe->OperatingMode.rxNSS + 1;
+ limSetNssChange( pMac, psessionEntry, pSta->vhtSupportedRxNss,
+ pSta->staIndex, pHdr->sa);
+ }
+
vos_mem_free(pOperatingModeframe);
return;
}
diff --git a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
index 086d974294ac..10a813263733 100644
--- a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
@@ -1197,6 +1197,18 @@ if (limPopulateMatchingRateSet(pMac,
goto error;
}
+#ifdef WLAN_FEATURE_11AC
+ if(pAssocReq->operMode.present)
+ {
+ pStaDs->vhtSupportedRxNss = pAssocReq->operMode.rxNSS + 1;
+ }
+ else
+ {
+ pStaDs->vhtSupportedRxNss = ((pStaDs->supportedRates.vhtRxMCSMap & MCSMAPMASK2x2)
+ == MCSMAPMASK2x2) ? 1 : 2;
+ }
+#endif
+
vos_mem_copy((tANI_U8 *) &pStaDs->mlmStaContext.propRateSet,
(tANI_U8 *) &(pAssocReq->propIEinfo.propRates),
pAssocReq->propIEinfo.propRates.numPropRates + 1);
diff --git a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
index 495b3ec64a81..09b00e676ea5 100644
--- a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
@@ -163,6 +163,10 @@ void limUpdateAssocStaDatas(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpSirAsso
return;
}
+#ifdef WLAN_FEATURE_11AC
+ pStaDs->vhtSupportedRxNss = ((pStaDs->supportedRates.vhtRxMCSMap & MCSMAPMASK2x2)
+ == MCSMAPMASK2x2) ? 1 : 2;
+#endif
//If one of the rates is 11g rates, set the ERP mode.
if ((phyMode == WNI_CFG_PHY_MODE_11G) && sirIsArate(pStaDs->supportedRates.llaRates[0] & 0x7f))
pStaDs->erpEnabled = eHAL_SET;
diff --git a/CORE/MAC/src/pe/lim/limSendMessages.c b/CORE/MAC/src/pe/lim/limSendMessages.c
index 0164f6de6f81..466ff6983aa4 100644
--- a/CORE/MAC/src/pe/lim/limSendMessages.c
+++ b/CORE/MAC/src/pe/lim/limSendMessages.c
@@ -783,6 +783,47 @@ tSirRetStatus limSendModeUpdate(tpAniSirGlobal pMac,
return retCode;
}
+tSirRetStatus limSendRxNssUpdate(tpAniSirGlobal pMac,
+ tUpdateRxNss *pTempParam,
+ tpPESession psessionEntry )
+{
+ tUpdateRxNss *pRxNss = NULL;
+ tSirRetStatus retCode = eSIR_SUCCESS;
+ tSirMsgQ msgQ;
+
+ pRxNss = vos_mem_malloc(sizeof(tUpdateRxNss));
+ if ( NULL == pRxNss )
+ {
+ limLog( pMac, LOGP,
+ FL( "Unable to allocate memory during Update Rx Nss" ));
+ return eSIR_MEM_ALLOC_FAILED;
+ }
+ vos_mem_copy((tANI_U8 *)pRxNss, pTempParam, sizeof(tUpdateRxNss));
+ msgQ.type = WDA_UPDATE_RX_NSS;
+ msgQ.reserved = 0;
+ msgQ.bodyptr = pRxNss;
+ msgQ.bodyval = 0;
+ PELOG3(limLog( pMac, LOG3,
+ FL( "Sending WDA_UPDATE_RX_NSS" ));)
+ if(NULL == psessionEntry)
+ {
+ MTRACE(macTraceMsgTx(pMac, NO_SESSION, msgQ.type));
+ }
+ else
+ {
+ MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
+ }
+ if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
+ {
+ vos_mem_free(pRxNss);
+ limLog( pMac, LOGP,
+ FL("Posting WDA_UPDATE_RX_NSS to WDA failed, reason=%X"),
+ retCode );
+ }
+
+ return retCode;
+}
+
tSirRetStatus limSetMembership(tpAniSirGlobal pMac,
tUpdateMembership *pTempParam,
tpPESession psessionEntry )
diff --git a/CORE/MAC/src/pe/lim/limSendMessages.h b/CORE/MAC/src/pe/lim/limSendMessages.h
index 383ff76b461a..3d0136c289c7 100644
--- a/CORE/MAC/src/pe/lim/limSendMessages.h
+++ b/CORE/MAC/src/pe/lim/limSendMessages.h
@@ -52,6 +52,9 @@ tSirRetStatus limSendBeaconParams(tpAniSirGlobal pMac,
tSirRetStatus limSendModeUpdate(tpAniSirGlobal pMac,
tUpdateVHTOpMode *tempParam,
tpPESession psessionEntry );
+tSirRetStatus limSendRxNssUpdate(tpAniSirGlobal pMac,
+ tUpdateRxNss *tempParam,
+ tpPESession psessionEntry );
tANI_U32 limGetCenterChannel(tpAniSirGlobal pMac,
tANI_U8 primarychanNum,
diff --git a/CORE/MAC/src/pe/lim/limUtils.c b/CORE/MAC/src/pe/lim/limUtils.c
index 00b22614bbd2..be3294ef5cce 100644
--- a/CORE/MAC/src/pe/lim/limUtils.c
+++ b/CORE/MAC/src/pe/lim/limUtils.c
@@ -7802,22 +7802,38 @@ void limPmfSaQueryTimerHandler(void *pMacGlobal, tANI_U32 param)
#ifdef WLAN_FEATURE_11AC
-tANI_BOOLEAN limCheckVHTOpModeChange( tpAniSirGlobal pMac, tpPESession psessionEntry, tANI_U8 chanWidth, tANI_U8 staId)
+tANI_BOOLEAN limCheckVHTOpModeChange( tpAniSirGlobal pMac, tpPESession psessionEntry,
+ tANI_U8 chanWidth, tANI_U8 staId, tANI_U8 *peerMac)
{
tUpdateVHTOpMode tempParam;
tempParam.opMode = chanWidth;
tempParam.staId = staId;
tempParam.smesessionId = psessionEntry->smeSessionId;
- vos_mem_copy(tempParam.peer_mac, psessionEntry->bssId,
+ vos_mem_copy(tempParam.peer_mac, peerMac,
sizeof(tSirMacAddr));
-
limSendModeUpdate( pMac, &tempParam, psessionEntry );
return eANI_BOOLEAN_TRUE;
}
+tANI_BOOLEAN limSetNssChange( tpAniSirGlobal pMac, tpPESession psessionEntry, tANI_U8 rxNss,
+ tANI_U8 staId, tANI_U8 *peerMac)
+{
+ tUpdateRxNss tempParam;
+
+ tempParam.rxNss = rxNss;
+ tempParam.staId = staId;
+ tempParam.smesessionId = psessionEntry->smeSessionId;
+ vos_mem_copy(tempParam.peer_mac, peerMac,
+ sizeof(tSirMacAddr));
+
+ limSendRxNssUpdate( pMac, &tempParam, psessionEntry );
+
+ return eANI_BOOLEAN_TRUE;
+}
+
tANI_BOOLEAN limCheckMembershipUserPosition( tpAniSirGlobal pMac, tpPESession psessionEntry,
tANI_U32 membership, tANI_U32 userPosition,
tANI_U8 staId)
diff --git a/CORE/MAC/src/pe/lim/limUtils.h b/CORE/MAC/src/pe/lim/limUtils.h
index 99057f85cde6..5b2cb5011681 100644
--- a/CORE/MAC/src/pe/lim/limUtils.h
+++ b/CORE/MAC/src/pe/lim/limUtils.h
@@ -403,8 +403,10 @@ tANI_BOOLEAN limIsconnectedOnDFSChannel(tANI_U8 currentChannel);
tANI_U8 limGetCurrentOperatingChannel(tpAniSirGlobal pMac);
#ifdef WLAN_FEATURE_11AC
-tANI_BOOLEAN limCheckVHTOpModeChange( tpAniSirGlobal pMac,
- tpPESession psessionEntry, tANI_U8 chanWidth, tANI_U8 staId);
+tANI_BOOLEAN limCheckVHTOpModeChange( tpAniSirGlobal pMac, tpPESession psessionEntry,
+ tANI_U8 chanWidth, tANI_U8 staId, tANI_U8 *peerMac);
+tANI_BOOLEAN limSetNssChange( tpAniSirGlobal pMac, tpPESession psessionEntry,
+ tANI_U8 rxNss, tANI_U8 staId, tANI_U8 *peerMac);
tANI_BOOLEAN limCheckMembershipUserPosition( tpAniSirGlobal pMac, tpPESession psessionEntry,
tANI_U32 membership, tANI_U32 userPosition,
tANI_U8 staId);
diff --git a/CORE/MAC/src/pe/sch/schBeaconProcess.c b/CORE/MAC/src/pe/sch/schBeaconProcess.c
index 965e085bbb1d..be6e136205c7 100644
--- a/CORE/MAC/src/pe/sch/schBeaconProcess.c
+++ b/CORE/MAC/src/pe/sch/schBeaconProcess.c
@@ -530,7 +530,7 @@ static void __schBeaconProcessForSession( tpAniSirGlobal pMac,
}
limCheckVHTOpModeChange(pMac, psessionEntry,
pBeacon->OperatingMode.chanWidth,
- pStaDs->staIndex);
+ pStaDs->staIndex, pMh->sa);
}
}
else if (psessionEntry->vhtCapability && pBeacon->VHTOperation.present)
@@ -583,7 +583,7 @@ static void __schBeaconProcessForSession( tpAniSirGlobal pMac,
}
}
limCheckVHTOpModeChange(pMac, psessionEntry,
- chWidth, pStaDs->staIndex);
+ chWidth, pStaDs->staIndex, pMh->sa);
}
}
}