diff options
| author | Ashish Kumar Dhanotiya <adhanoti@codeaurora.org> | 2018-02-08 17:43:09 +0530 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2018-02-19 07:00:05 -0800 |
| commit | 7cf4d587685d02aeecfb0db4463144a055fbd7d2 (patch) | |
| tree | c309e1a216ac78b921e1d038b0005f33782bc721 | |
| parent | 0c3b646e3465f9a8707cf0c463c53950dec52c90 (diff) | |
qcacld-3.0: Add ini parameter for chain selection optimization
Add ini support to Enable/Disable chain selection optimization
for one chain dtim.
Change-Id: I95999a4204f2d978abc9951688332400b9670f0e
CRs-Fixed: 2189150
| -rw-r--r-- | core/hdd/inc/wlan_hdd_cfg.h | 18 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg.c | 11 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 11 |
3 files changed, 40 insertions, 0 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 780bd4e86a36..1ca8d72d25ef 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -14219,6 +14219,23 @@ enum hw_filter_mode { #define CFG_CHANNEL_SELECT_LOGIC_CONC_MAX (0xFFFFFFFF) #define CFG_CHANNEL_SELECT_LOGIC_CONC_DEFAULT (0x00000003) +/* + * <ini> + * gEnableDTIMSelectionDiversity - Enable/Disable chain + * selection optimization for one chain dtim + * @Min: 0 + * @Max: 30 + * @Default: 5 + * + * Usage: External + * + * </ini> + */ +#define CFG_DTIM_SELECTION_DIVERSITY_NAME "gEnableDTIMSelectionDiversity" +#define CFG_DTIM_SELECTION_DIVERSITY_MIN (0) +#define CFG_DTIM_SELECTION_DIVERSITY_MAX (30) +#define CFG_DTIM_SELECTION_DIVERSITY_DEFAULT (5) + /*--------------------------------------------------------------------------- Type declarations -------------------------------------------------------------------------*/ @@ -15121,6 +15138,7 @@ struct hdd_config { uint32_t neighbor_report_offload_cache_timeout; uint32_t neighbor_report_offload_max_req_cap; uint32_t channel_select_logic_conc; + bool enable_dtim_selection_diversity; }; #define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var)) diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index b7dcd6860f49..86294557957f 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -5515,6 +5515,14 @@ struct reg_table_entry g_registry_table[] = { CFG_CHANNEL_SELECT_LOGIC_CONC_DEFAULT, CFG_CHANNEL_SELECT_LOGIC_CONC_MIN, CFG_CHANNEL_SELECT_LOGIC_CONC_MAX), + + REG_VARIABLE(CFG_DTIM_SELECTION_DIVERSITY_NAME, + WLAN_PARAM_Integer, + struct hdd_config, enable_dtim_selection_diversity, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_DTIM_SELECTION_DIVERSITY_DEFAULT, + CFG_DTIM_SELECTION_DIVERSITY_MIN, + CFG_DTIM_SELECTION_DIVERSITY_MAX), }; /** @@ -7376,6 +7384,9 @@ void hdd_cfg_print(hdd_context_t *pHddCtx) hdd_debug("Name = [%s] value = [%d]", CFG_ENABLE_GCMP_NAME, pHddCtx->config->gcmp_enabled); + hdd_debug("Name = [%s] value = [%d]", + CFG_DTIM_SELECTION_DIVERSITY_NAME, + pHddCtx->config->enable_dtim_selection_diversity); hdd_cfg_print_11k_offload_params(pHddCtx); hdd_debug("Name = [%s] value = [0x%x]", diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 9daf256edfd3..bfe09221814f 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -3835,6 +3835,17 @@ int hdd_set_fw_params(hdd_adapter_t *adapter) hdd_err("Failed to set LPRx"); goto error; } + + ret = sme_cli_set_command( + adapter->sessionId, + WMI_PDEV_PARAM_1CH_DTIM_OPTIMIZED_CHAIN_SELECTION, + hdd_ctx->config->enable_dtim_selection_diversity, + PDEV_CMD); + if (ret) { + hdd_err("Failed to set DTIM_OPTIMIZED_CHAIN_SELECTION"); + goto error; + } + if (adapter->device_mode == QDF_STA_MODE) { sme_set_smps_cfg(adapter->sessionId, HDD_STA_SMPS_PARAM_UPPER_BRSSI_THRESH, |
