qcacld-3.0: Add configuration option for mpdu density

qcacld-2.0 to qcacld-3.0 propagation

Add configuration option for mpdu density through INI. Update
the default value of mpdu density from 0 to 7.

Change-Id: Ib97869d4aec160065c945cd62876d6fd191d63a5
CRs-Fixed: 941182
This commit is contained in:
Krishna Kumaar Natarajan 2015-11-23 18:54:58 -08:00 • committed by Satish Singh
commit 22b59a7689
4 changed files with 45 additions and 8 deletions

View file

@ -138,6 +138,21 @@
#define CFG_MAX_RX_AMPDU_FACTOR_MAX WNI_CFG_MAX_RX_AMPDU_FACTOR_STAMAX
#define CFG_MAX_RX_AMPDU_FACTOR_DEFAULT WNI_CFG_MAX_RX_AMPDU_FACTOR_STADEF
/* Configuration option for HT MPDU density (Table 8-125 802.11-2012)
* 0 for no restriction
* 1 for 1/4 micro sec
* 2 for 1/2 micro sec
* 3 for 1 micro sec
* 4 for 2 micro sec
* 5 for 4 micro sec
* 6 for 8 micro sec
* 7 for 16 micro sec
*/
#define CFG_HT_MPDU_DENSITY_NAME "ght_mpdu_density"
#define CFG_HT_MPDU_DENSITY_MIN WNI_CFG_MPDU_DENSITY_STAMIN
#define CFG_HT_MPDU_DENSITY_MAX WNI_CFG_MPDU_DENSITY_STAMAX
#define CFG_HT_MPDU_DENSITY_DEFAULT WNI_CFG_MPDU_DENSITY_STADEF
/* Configuration added to enable/disable CTS2SELF in */
/* Adaptive RX drain feature */
#define CFG_ENABLE_ADAPT_RX_DRAIN_NAME "gEnableAdaptRxDrain"
@ -3384,6 +3399,7 @@ struct hdd_config {
int8_t early_stop_scan_min_threshold;
int8_t early_stop_scan_max_threshold;
int8_t first_scan_bucket_threshold;
uint8_t ht_mpdu_density;
};
#define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))

View file

@ -500,6 +500,13 @@ REG_TABLE_ENTRY g_registry_table[] = {
CFG_MAX_RX_AMPDU_FACTOR_MIN,
CFG_MAX_RX_AMPDU_FACTOR_MAX),
REG_VARIABLE(CFG_HT_MPDU_DENSITY_NAME, WLAN_PARAM_Integer,
struct hdd_config, ht_mpdu_density,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK ,
CFG_HT_MPDU_DENSITY_DEFAULT,
CFG_HT_MPDU_DENSITY_MIN,
CFG_HT_MPDU_DENSITY_MAX),
REG_VARIABLE(CFG_FIXED_RATE_NAME, WLAN_PARAM_Integer,
struct hdd_config, TxRate,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
@ -5182,6 +5189,10 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
hddLog(LOGE, "Name = [%s] Value = [%d]",
CFG_FIRST_SCAN_BUCKET_THRESHOLD_NAME,
pHddCtx->config->first_scan_bucket_threshold);
hddLog(LOGE, "Name = [%s] Value = [%u]",
CFG_HT_MPDU_DENSITY_NAME,
pHddCtx->config->ht_mpdu_density);
}
@ -5609,6 +5620,14 @@ bool hdd_update_config_dat(hdd_context_t *pHddCtx)
"Could not pass on WNI_CFG_HT_AMPDU_PARAMS_MAX_RX_AMPDU_FACTOR to CFG");
}
if (sme_cfg_set_int(pHddCtx->hHal, WNI_CFG_MPDU_DENSITY,
pConfig->ht_mpdu_density) ==
CDF_STATUS_E_FAILURE) {
fStatus = false;
hddLog(LOGE,
"Could not pass on WNI_CFG_MPDU_DENSITY to CFG");
}
if (sme_cfg_set_int
(pHddCtx->hHal, WNI_CFG_SHORT_PREAMBLE,
pConfig->fIsShortPreamble) == CDF_STATUS_E_FAILURE) {

View file

@ -1158,7 +1158,7 @@ enum {
#define WNI_CFG_MPDU_DENSITY_STAMIN 0
#define WNI_CFG_MPDU_DENSITY_STAMAX 7
#define WNI_CFG_MPDU_DENSITY_STADEF 0
#define WNI_CFG_MPDU_DENSITY_STADEF 7
#define WNI_CFG_NUM_BUFF_ADVERT_STAMIN 0
#define WNI_CFG_NUM_BUFF_ADVERT_STAMAX 128

View file

@ -449,22 +449,24 @@ static tSirRetStatus __lim_init_config(tpAniSirGlobal pMac)
if (wlan_cfg_get_int(pMac, WNI_CFG_HT_AMPDU_PARAMS, &val1) !=
eSIR_SUCCESS) {
PELOGE(lim_log
(pMac, LOGE,
FL("could not retrieve HT AMPDU Param CFG"));
)
lim_log(pMac, LOGE, FL("could not retrieve HT AMPDU Param"));
return eSIR_FAILURE;
}
if (wlan_cfg_get_int(pMac, WNI_CFG_MAX_RX_AMPDU_FACTOR, &val2) !=
eSIR_SUCCESS) {
PELOGE(lim_log
(pMac, LOGE, FL("could not retrieve AMPDU Factor CFG"));
)
lim_log(pMac, LOGE, FL("could not retrieve AMPDU Factor CFG"));
return eSIR_FAILURE;
}
if (wlan_cfg_get_int(pMac, WNI_CFG_MPDU_DENSITY, &val3) !=
eSIR_SUCCESS) {
lim_log(pMac, LOGE, FL("could not retrieve MPDU Density CFG"));
return eSIR_FAILURE;
}
val16 = (uint16_t) val1;
pAmpduParamInfo = (tSirMacHTParametersInfo *) &val16;
pAmpduParamInfo->maxRxAMPDUFactor = (uint8_t) val2;
pAmpduParamInfo->mpduDensity = (uint8_t)val3;
if (cfg_set_int
(pMac, WNI_CFG_HT_AMPDU_PARAMS,
*(uint8_t *) pAmpduParamInfo) != eSIR_SUCCESS) {