From 959b38c51acf00eab4cd033170d704d8891907a6 Mon Sep 17 00:00:00 2001 From: Ashish Kumar Dhanotiya Date: Fri, 6 Apr 2018 21:07:57 +0530 Subject: [PATCH] qcacld-3.0: Add ini to control for Secondary Retry Feature Add ini "gEnableSecondaryRate" to Enable/Disable control for Secondary Retry Feature Set. It is a 32 bit value such that the various bits represents different values. Change-Id: I1348465932f32ee19cd3efb2347ca8d2f59e0904 CRs-Fixed: 2219933 --- core/hdd/inc/wlan_hdd_cfg.h | 26 ++++++++++++++++++++++++++ core/hdd/src/wlan_hdd_cfg.c | 12 ++++++++++++ core/hdd/src/wlan_hdd_main.c | 10 ++++++++++ 3 files changed, 48 insertions(+) diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 891a3f719abf..af963ee32ece 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -14194,6 +14194,31 @@ enum hdd_external_acs_policy { #define CFG_ENABLE_RTT_MAC_RANDOMIZATION_MAX (1) #define CFG_ENABLE_RTT_MAC_RANDOMIZATION_DEFAULT (0) +/* + * + * gEnableSecondaryRate - Enable/Disable Secondary Retry Rate feature subset + * + * @Min: 0x0 + * @Max: 0x3F + * @Default: 0x18 + * + * It is a 32 bit value such that the various bits represent as below - + * Bit-0 : is Enable/Disable Control for "PPDU Secondary Retry Support" + * Bit-1 : is Enable/Disable Control for "RTS Black/White-listing Support" + * Bit-2 : is Enable/Disable Control for "Higher MCS retry restriction + * on XRETRY failures" + * Bit 3-5 : is "Xretry threshold" to use + * Bit 3~31 : reserved for future use. + * + * Usage: External + * + * + */ +#define CFG_ENABLE_SECONDARY_RATE_NAME "gEnableSecondaryRate" +#define CFG_ENABLE_SECONDARY_RATE_MIN (0) +#define CFG_ENABLE_SECONDARY_RATE_MAX (0x3F) +#define CFG_ENABLE_SECONDARY_RATE_DEFAULT (0x18) + /* * Type declarations */ @@ -15075,6 +15100,7 @@ struct hdd_config { uint32_t channel_select_logic_conc; bool enable_bt_chain_separation; uint8_t enable_tx_sch_delay; + uint32_t enable_secondary_rate; HDD_GREEN_AP_CFG_FIELDS bool is_unit_test_framework_enabled; bool enable_ftopen; diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 2cb8c73ee267..3e0585093bad 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -5416,6 +5416,14 @@ struct reg_table_entry g_registry_table[] = { CFG_ENABLE_RTT_MAC_RANDOMIZATION_DEFAULT, CFG_ENABLE_RTT_MAC_RANDOMIZATION_MIN, CFG_ENABLE_RTT_MAC_RANDOMIZATION_MAX), + + REG_VARIABLE(CFG_ENABLE_SECONDARY_RATE_NAME, + WLAN_PARAM_HexInteger, + struct hdd_config, enable_secondary_rate, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_ENABLE_SECONDARY_RATE_DEFAULT, + CFG_ENABLE_SECONDARY_RATE_MIN, + CFG_ENABLE_SECONDARY_RATE_MAX), }; @@ -7301,6 +7309,10 @@ void hdd_cfg_print(struct hdd_context *hdd_ctx) hdd_debug("Name = [%s] Value = [%u]", CFG_ROAM_FT_OPEN_ENABLE_NAME, hdd_ctx->config->enable_ftopen); + + hdd_debug("Name = [%s] value = [0x%x]", + CFG_ENABLE_SECONDARY_RATE_NAME, + hdd_ctx->config->enable_secondary_rate); } diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 1ad3d1401216..c5d06c42a099 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -4420,6 +4420,16 @@ int hdd_set_fw_params(struct hdd_adapter *adapter) goto error; } + ret = sme_cli_set_command( + adapter->session_id, + WMI_PDEV_PARAM_SECONDARY_RETRY_ENABLE, + hdd_ctx->config->enable_secondary_rate, + PDEV_CMD); + if (ret) { + hdd_err("Failed to set WMI_PDEV_PARAM_SECONDARY_RETRY_ENABLE"); + goto error; + } + if (adapter->device_mode == QDF_STA_MODE) { sme_set_smps_cfg(adapter->session_id, HDD_STA_SMPS_PARAM_UPPER_BRSSI_THRESH,