diff options
| author | Mushtaq A Mujale <mmujale@qca.qualcomm.com> | 2013-10-04 20:16:53 -0700 |
|---|---|---|
| committer | Madan Mohan Koyyalamudi <mkoyyala@qca.qualcomm.com> | 2013-10-23 19:57:13 -0700 |
| commit | c89f92a8bca7ade9030efedd076d6c466ff08c20 (patch) | |
| tree | 3d4cb287e8cba7d9fad3b0fa73f1d06bd88005e1 | |
| parent | cbab5b6f8de6b3fb903a0a52407693c994f97978 (diff) | |
cld: Considering peer's AMPDU receive capability during connection setup
When the peer STA is configured in the hardware, peer receive AMPDU size
should be considered, which was not done so far. Also, self capabilities
should be updated based on the operating capability during self-sta
configuration
Merge of:https://review-android.quicinc.com/#/c/439346/
Change-Id: Id0a0d53589d9fdc6d5444427d2ee15b0a4651f28
CRs-Fixed: 542279
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_cfg.h | 10 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg.c | 21 | ||||
| -rw-r--r-- | CORE/MAC/src/include/dphGlobal.h | 4 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limAssocUtils.c | 13 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limIbssPeerMgmt.c | 4 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c | 8 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c | 14 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/inc/legacy/halMsgApi.h | 2 | ||||
| -rw-r--r-- | firmware_bin/WCNSS_qcom_cfg.ini | 4 |
9 files changed, 75 insertions, 5 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h index df033dc034b5..52352a13358c 100644 --- a/CORE/HDD/inc/wlan_hdd_cfg.h +++ b/CORE/HDD/inc/wlan_hdd_cfg.h @@ -1780,6 +1780,13 @@ typedef enum #define CFG_P2P_LISTEN_OFFLOAD_ENABLE ( 1 ) #define CFG_P2P_LISTEN_OFFLOAD_DEFAULT ( CFG_P2P_LISTEN_OFFLOAD_DISABLE ) +#ifdef WLAN_FEATURE_11AC +//Macro to handle maximum receive AMPDU size configuration +#define CFG_VHT_AMPDU_LEN_EXPONENT_NAME "gVhtAmpduLenExponent" +#define CFG_VHT_AMPDU_LEN_EXPONENT_MIN ( 0 ) +#define CFG_VHT_AMPDU_LEN_EXPONENT_MAX ( 7 ) +#define CFG_VHT_AMPDU_LEN_EXPONENT_DEFAULT ( 3 ) +#endif /*--------------------------------------------------------------------------- Type declarations @@ -2163,6 +2170,9 @@ typedef struct v_BOOL_t enablefwprint; v_BOOL_t enablefwlog; v_BOOL_t fP2pListenOffload; +#ifdef WLAN_FEATURE_11AC + v_U8_t fVhtAmpduLenExponent; +#endif } hdd_config_t; /*--------------------------------------------------------------------------- Function declarations and documenation diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c index 0303b0aaa9fb..a553effd2776 100644 --- a/CORE/HDD/src/wlan_hdd_cfg.c +++ b/CORE/HDD/src/wlan_hdd_cfg.c @@ -2282,6 +2282,16 @@ REG_VARIABLE( CFG_P2P_LISTEN_OFFLOAD_NAME, WLAN_PARAM_Integer, CFG_P2P_LISTEN_OFFLOAD_DEFAULT, CFG_P2P_LISTEN_OFFLOAD_DISABLE, CFG_P2P_LISTEN_OFFLOAD_ENABLE ), + +#ifdef WLAN_FEATURE_11AC +REG_VARIABLE( CFG_VHT_AMPDU_LEN_EXPONENT_NAME, WLAN_PARAM_Integer, + hdd_config_t, fVhtAmpduLenExponent, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK , + CFG_VHT_AMPDU_LEN_EXPONENT_DEFAULT, + CFG_VHT_AMPDU_LEN_EXPONENT_MIN, + CFG_VHT_AMPDU_LEN_EXPONENT_MAX), +#endif + }; /* @@ -3748,6 +3758,17 @@ v_BOOL_t hdd_update_config_dat( hdd_context_t *pHddCtx ) fStatus = FALSE; hddLog(LOGE, "Could not pass on WNI_CFG_VHT_TX_MCS_MAP to CCM\n"); } + + // Hardware is capable of doing 128K AMPDU in 11AC mode + if(ccmCfgSetInt(pHddCtx->hHal, WNI_CFG_VHT_AMPDU_LEN_EXPONENT, + pConfig->fVhtAmpduLenExponent, NULL, + eANI_BOOLEAN_FALSE) + == eHAL_STATUS_FAILURE) + { + fStatus = FALSE; + hddLog(LOGE, "Could not pass on WNI_CFG_VHT_AMPDU_LEN_EXPONENT to CCM\n"); + } + } } #endif diff --git a/CORE/MAC/src/include/dphGlobal.h b/CORE/MAC/src/include/dphGlobal.h index 60fae8d80e1d..1d5fb46b0398 100644 --- a/CORE/MAC/src/include/dphGlobal.h +++ b/CORE/MAC/src/include/dphGlobal.h @@ -498,7 +498,7 @@ typedef struct sDphHashNode // Maximum Rx A-MPDU factor - tANI_U8 htMaxRxAMpduFactor:2; + tANI_U8 htMaxRxAMpduFactor:3; // @@ -512,7 +512,7 @@ typedef struct sDphHashNode tANI_U8 htSupportedChannelWidthSet:1; tANI_U8 htSecondaryChannelOffset:2; - tANI_U8 rsvd1:3; + tANI_U8 rsvd1:2; /////////////////////////////////////////////////////////////////////// diff --git a/CORE/MAC/src/pe/lim/limAssocUtils.c b/CORE/MAC/src/pe/lim/limAssocUtils.c index 85a41e1dbc5a..ab852fc24420 100644 --- a/CORE/MAC/src/pe/lim/limAssocUtils.c +++ b/CORE/MAC/src/pe/lim/limAssocUtils.c @@ -2550,6 +2550,8 @@ limAddStaSelf(tpAniSirGlobal pMac,tANI_U16 staIdx, tANI_U8 updateSta, tpPESessio tSirRetStatus retCode = eSIR_SUCCESS; tSirMacAddr staMac; tANI_U32 listenInterval = WNI_CFG_LISTEN_INTERVAL_STADEF; + tANI_U32 ampduLenExponent = 0; + /*This self Sta dot 11 mode comes from the cfg and the expectation here is * that cfg carries the systemwide capability that device under * consideration can support. This capability gets plumbed into the cfg @@ -2658,6 +2660,17 @@ limAddStaSelf(tpAniSirGlobal pMac,tANI_U16 staIdx, tANI_U8 updateSta, tpPESessio limLog( pMac, LOG1, FL("VHT WIDTH SET %d"),pAddStaParams->vhtTxChannelWidthSet); } pAddStaParams->vhtTxBFCapable = psessionEntry->txBFIniFeatureEnabled; + + // In 11ac mode, the hardware is capable of supporting 128K AMPDU size + if ( IS_DOT11_MODE_VHT(selfStaDot11Mode) ) + { + if(wlan_cfgGetInt(pMac, WNI_CFG_VHT_AMPDU_LEN_EXPONENT, &duLenExponent) + != eSIR_SUCCESS) + { + limLog(pMac, LOGP, FL("Couldn't get WNI_CFG_VHT_AMPDU_LEN_EXPONENT")); + } + pAddStaParams->maxAmpduSize = (tANI_U8)ampduLenExponent; + } #endif /* For Self STA get the LDPC capability from session i.e config.ini*/ diff --git a/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c b/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c index ffab18b79e45..9f95dccea238 100644 --- a/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c +++ b/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c @@ -276,6 +276,10 @@ ibss_sta_caps_update( if ( pPeerNode->vhtCapable ) { pStaDs->vhtSupportedChannelWidthSet = pPeerNode->vhtSupportedChannelWidthSet; + + // If in 11AC mode and if session requires 11AC mode, consider peer's + // max AMPDU length factor + pStaDs->htMaxRxAMpduFactor = pPeerNode->VHTCaps.maxAMPDULenExp; } } #endif diff --git a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c index cf01c6e4fb25..5197df933cbc 100644 --- a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c +++ b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c @@ -145,6 +145,14 @@ void limUpdateAssocStaDatas(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpSirAsso { pStaDs->mlmStaContext.vhtCapability = pAssocRsp->VHTCaps.present; } + + // If 11ac is supported and if the peer is sending VHT capabilities, + // then htMaxRxAMpduFactor should be overloaded with VHT maxAMPDULenExp + if (pAssocRsp->VHTCaps.present) + { + pStaDs->htMaxRxAMpduFactor = pAssocRsp->VHTCaps.maxAMPDULenExp; + } + if (limPopulateOwnRateSet(pMac, &pStaDs->supportedRates, pAssocRsp->HTCaps.supportedMCSSet, false,psessionEntry , &pAssocRsp->VHTCaps) != eSIR_SUCCESS) diff --git a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c index 2ce6ae59bde3..39e7728d5678 100644 --- a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c @@ -1384,8 +1384,9 @@ mlm_add_sta( { tANI_U32 val; int i; - + tANI_U32 selfStaDot11Mode = 0; + wlan_cfgGetInt(pMac, WNI_CFG_DOT11_MODE, &selfStaDot11Mode); pSta->staType = STA_ENTRY_SELF; // Identifying self palCopyMemory( pMac->hHdd, pSta->bssId, pBssid, sizeof( tSirMacAddr )); @@ -1407,7 +1408,7 @@ mlm_add_sta( pSta->uAPSD = 0; pSta->maxSPLen = 0; pSta->us32MaxAmpduDuration = 0; - pSta->maxAmpduSize = 0; // 0: 8k, 1: 16k,2: 32k,3: 64k + pSta->maxAmpduSize = 0; // 0: 8k, 1: 16k,2: 32k,3: 64k, 4:128k /* For Self STA get the LDPC capability from config.ini*/ @@ -1437,6 +1438,15 @@ mlm_add_sta( pSta->vhtCapable = VOS_TRUE; pSta->vhtTxBFCapable = psessionEntry->txBFIniFeatureEnabled; } + + // Since this is Self-STA, need to populate Self MAX_AMPDU_SIZE capabilities + if( IS_DOT11_MODE_VHT(selfStaDot11Mode) ) + { + val = 0; // Default 8K AMPDU size + if( eSIR_SUCCESS != wlan_cfgGetInt( pMac, WNI_CFG_VHT_AMPDU_LEN_EXPONENT, &val )) + limLog(pMac, LOGE, FL("Couldn't get WNI_CFG_VHT_AMPDU_LEN_EXPONENT")); + pSta->maxAmpduSize = (tANI_U8) val; + } #endif #ifdef WLAN_FEATURE_11AC limPopulateOwnRateSet(pMac, &pSta->supportedRates, NULL, false,psessionEntry,NULL); diff --git a/CORE/SERVICES/WMA/inc/legacy/halMsgApi.h b/CORE/SERVICES/WMA/inc/legacy/halMsgApi.h index 9b56c2ac1290..bde725abc54e 100644 --- a/CORE/SERVICES/WMA/inc/legacy/halMsgApi.h +++ b/CORE/SERVICES/WMA/inc/legacy/halMsgApi.h @@ -189,7 +189,7 @@ typedef struct // FIXME //Add these fields to message tANI_U8 us32MaxAmpduDuration; //in units of 32 us. - tANI_U8 maxAmpduSize; // 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k + tANI_U8 maxAmpduSize; // 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k, 4 : 128k tANI_U8 maxAmpduDensity; // 3 : 0~7 : 2^(11nAMPDUdensity -4) tANI_U8 maxAmsduSize; // 1 : 3839 bytes, 0 : 7935 bytes diff --git a/firmware_bin/WCNSS_qcom_cfg.ini b/firmware_bin/WCNSS_qcom_cfg.ini index 36a34e6c020f..881ef79cf4e2 100644 --- a/firmware_bin/WCNSS_qcom_cfg.ini +++ b/firmware_bin/WCNSS_qcom_cfg.ini @@ -415,6 +415,10 @@ gEnablefwlog=1 #P2P Listen offload gEnableP2pListenOffload=1 + +# Maximum Receive AMPDU size (VHT only. Valid values: 0->8k 1->16k 2->32k 3->64k 4->128k) +gVhtAmpduLenExponent=4 + END # Note: Configuration parser would not read anything past the END marker |
