mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-10 04:42:22 -05:00
qcacld-3.0: add gEnableCckTxFirOverride ini item
When operating in an 802.11b mode, CCK TX FIR Override forces a 2x2 radio configuration into 1x for Tx and 2x for Rx (ie 1x2) for regulatory compliance reasons. Add gEnableCckTxFirOverride to allow this firmware feature to be enabled/disabled via ini configuration. Change-Id: I359fc908fa27113e2500a28c343cf90dea518212 CRs-Fixed: 2062111
This commit is contained in:
parent
9ab8bb99a6
commit
732ab9c2c8
3 changed files with 72 additions and 24 deletions
|
|
@ -4991,6 +4991,31 @@ enum hdd_link_speed_rpt_type {
|
|||
#define CFG_ENABLE_MEMORY_DEEP_SLEEP_MAX (1)
|
||||
#define CFG_ENABLE_MEMORY_DEEP_SLEEP_DEFAULT (1)
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
*
|
||||
* gEnableCckTxFirOverride - Enable/disable CCK TxFIR Override
|
||||
* @Min: 0 (disabled)
|
||||
* @Max: 1 (enabled)
|
||||
* @Default: 0 (disabled)
|
||||
*
|
||||
* When operating in an 802.11b mode, this configuration item forces a 2x2 radio
|
||||
* configuration into 1x for Tx and 2x for Rx (ie 1x2) for regulatory compliance
|
||||
* reasons.
|
||||
*
|
||||
* Related: enable2x2
|
||||
*
|
||||
* Supported Feature: 802.11b, 2x2
|
||||
*
|
||||
* Usage: Internal/External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_ENABLE_CCK_TX_FIR_OVERRIDE_NAME "gEnableCckTxFirOverride"
|
||||
#define CFG_ENABLE_CCK_TX_FIR_OVERRIDE_MIN (0)
|
||||
#define CFG_ENABLE_CCK_TX_FIR_OVERRIDE_MAX (1)
|
||||
#define CFG_ENABLE_CCK_TX_FIR_OVERRIDE_DEFAULT (0)
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* gDefaultRateIndex24Ghz -Set the rate index for 24Ghz
|
||||
|
|
@ -10806,6 +10831,7 @@ struct hdd_config {
|
|||
uint8_t apMaxOffloadReorderBuffs;
|
||||
bool advertiseConcurrentOperation;
|
||||
bool enableMemDeepSleep;
|
||||
bool enable_cck_tx_fir_override;
|
||||
|
||||
uint32_t defaultRateIndex24Ghz;
|
||||
#ifdef MEMORY_DEBUG
|
||||
|
|
|
|||
|
|
@ -2973,6 +2973,13 @@ struct reg_table_entry g_registry_table[] = {
|
|||
CFG_ENABLE_MEMORY_DEEP_SLEEP_MIN,
|
||||
CFG_ENABLE_MEMORY_DEEP_SLEEP_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_ENABLE_CCK_TX_FIR_OVERRIDE_NAME, WLAN_PARAM_Integer,
|
||||
struct hdd_config, enable_cck_tx_fir_override,
|
||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||
CFG_ENABLE_CCK_TX_FIR_OVERRIDE_DEFAULT,
|
||||
CFG_ENABLE_CCK_TX_FIR_OVERRIDE_MIN,
|
||||
CFG_ENABLE_CCK_TX_FIR_OVERRIDE_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_DEFAULT_RATE_INDEX_24GH, WLAN_PARAM_Integer,
|
||||
struct hdd_config, defaultRateIndex24Ghz,
|
||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||
|
|
@ -5601,6 +5608,9 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
|
|||
pHddCtx->config->apMaxOffloadPeers);
|
||||
hdd_info("Name = [gMaxOffloadReorderBuffs] value = [%u] ",
|
||||
pHddCtx->config->apMaxOffloadReorderBuffs);
|
||||
hdd_info("Name = [%s] Value = [%d]",
|
||||
CFG_ENABLE_CCK_TX_FIR_OVERRIDE_NAME,
|
||||
pHddCtx->config->enable_cck_tx_fir_override);
|
||||
hdd_info("Name = [gAllowDFSChannelRoam] Value = [%u] ",
|
||||
pHddCtx->config->allowDFSChannelRoam);
|
||||
hdd_info("Name = [gMaxConcurrentActiveSessions] Value = [%u] ",
|
||||
|
|
|
|||
|
|
@ -3539,10 +3539,28 @@ int hdd_set_fw_params(hdd_adapter_t *adapter)
|
|||
if (!hdd_ctx)
|
||||
return -EINVAL;
|
||||
|
||||
if ((cds_get_conparam() != QDF_GLOBAL_FTM_MODE) &&
|
||||
(!hdd_ctx->config->enable2x2)) {
|
||||
if (cds_get_conparam() == QDF_GLOBAL_FTM_MODE) {
|
||||
hdd_debug("FTM Mode is active; nothing to do");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (hdd_ctx->config->enable2x2) {
|
||||
hdd_debug("configuring 2x2 mode fw params");
|
||||
|
||||
ret = wma_cli_set_command(adapter->sessionId,
|
||||
WMI_PDEV_PARAM_ENABLE_CCK_TXFIR_OVERRIDE,
|
||||
hdd_ctx->config->enable_cck_tx_fir_override,
|
||||
PDEV_CMD);
|
||||
if (ret) {
|
||||
hdd_err("WMI_PDEV_PARAM_ENABLE_CCK_TXFIR_OVERRIDE set failed %d",
|
||||
ret);
|
||||
goto error;
|
||||
}
|
||||
} else {
|
||||
#define HDD_DTIM_1CHAIN_RX_ID 0x5
|
||||
#define HDD_SMPS_PARAM_VALUE_S 29
|
||||
hdd_debug("configuring 1x1 mode fw params");
|
||||
|
||||
/*
|
||||
* Disable DTIM 1 chain Rx when in 1x1,
|
||||
* we are passing two value
|
||||
|
|
@ -3580,35 +3598,29 @@ int hdd_set_fw_params(hdd_adapter_t *adapter)
|
|||
}
|
||||
#undef HDD_DTIM_1CHAIN_RX_ID
|
||||
#undef HDD_SMPS_PARAM_VALUE_S
|
||||
} else {
|
||||
hdd_debug("FTM Mode or 2x2 mode - Do not set 1x1 params");
|
||||
}
|
||||
|
||||
if (QDF_GLOBAL_FTM_MODE != cds_get_conparam()) {
|
||||
ret = wma_cli_set_command(adapter->sessionId,
|
||||
WMI_PDEV_PARAM_HYST_EN,
|
||||
hdd_ctx->config->enableMemDeepSleep,
|
||||
PDEV_CMD);
|
||||
ret = wma_cli_set_command(adapter->sessionId,
|
||||
WMI_PDEV_PARAM_HYST_EN,
|
||||
hdd_ctx->config->enableMemDeepSleep,
|
||||
PDEV_CMD);
|
||||
if (ret) {
|
||||
hdd_err("WMI_PDEV_PARAM_HYST_EN set failed %d", ret);
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
hdd_err("WMI_PDEV_PARAM_HYST_EN set failed %d",
|
||||
ret);
|
||||
goto error;
|
||||
}
|
||||
|
||||
ret = wma_cli_set_command(adapter->sessionId,
|
||||
WMI_VDEV_PARAM_ENABLE_RTSCTS,
|
||||
hdd_ctx->config->rts_profile,
|
||||
VDEV_CMD);
|
||||
if (ret) {
|
||||
hdd_err("FAILED TO SET RTSCTS Profile ret:%d", ret);
|
||||
goto error;
|
||||
}
|
||||
ret = wma_cli_set_command(adapter->sessionId,
|
||||
WMI_VDEV_PARAM_ENABLE_RTSCTS,
|
||||
hdd_ctx->config->rts_profile,
|
||||
VDEV_CMD);
|
||||
if (ret) {
|
||||
hdd_err("FAILED TO SET RTSCTS Profile ret:%d", ret);
|
||||
goto error;
|
||||
}
|
||||
|
||||
hdd_set_fw_log_params(hdd_ctx, adapter);
|
||||
|
||||
EXIT();
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
|
|
|
|||
Loading…
Reference in a new issue