summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajeev Kumar Sirasanagandla <rsirasan@codeaurora.org>2016-09-08 19:19:47 +0530
committerqcabuildsw <qcabuildsw@localhost>2016-10-12 09:24:18 -0700
commit0be56dfdbcc3f8d720910db5fdea2125160dac4e (patch)
tree16e2edf5524aef44f68f502884839870b74aa9fd
parent29ac683dd2726d3f9a7d4076cba973b5993abf8c (diff)
qcacld-3.0: Add ini to configure RTS profiles to FW
qcacld-2.0 to qcacld-3.0 propagation INI parameter to configure different RTS profiles to firmware during wlan startup. Based on this value the FW shall configure any of the following parameters: - RTSCTS_DISABLED - RTSCTS_ENABLED_4_SECOND_RATESERIES - CTS2SELF_ENABLED_4_SECOND_RATESERIES - RTSCTS_ENABLED_4_SWRETRIES - CTS2SELF_ENABLED_4_SWRETRIES Change-Id: Id2a9d64e626288920e0d0a73badca9f9e241decb CRs-Fixed: 940886
-rw-r--r--core/hdd/inc/wlan_hdd_cfg.h18
-rw-r--r--core/hdd/src/wlan_hdd_cfg.c7
-rw-r--r--core/hdd/src/wlan_hdd_main.c9
3 files changed, 34 insertions, 0 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 4ba70e7ca1cb..c3cead689893 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -1279,6 +1279,21 @@ typedef enum {
#define CFG_ENABLE_FW_MODULE_LOG_LEVEL "gFwDebugModuleLoglevel"
#define CFG_ENABLE_FW_MODULE_LOG_DEFAULT ""
+/*
+ * gEnableRTSProfiles for configuring different RTS profiles
+ * to firmware.
+ * Following are the valid values for the rtsprofile:
+ * RTSCTS_DISABLED 0
+ * RTSCTS_ENABLED_4_SECOND_RATESERIES 17
+ * CTS2SELF_ENABLED_4_SECOND_RATESERIES 18
+ * RTSCTS_ENABLED_4_SWRETRIES 33
+ * CTS2SELF_ENABLED_4_SWRETRIES 34
+ */
+#define CFG_ENABLE_FW_RTS_PROFILE "gEnableRTSProfiles"
+#define CFG_ENABLE_FW_RTS_PROFILE_MIN (0)
+#define CFG_ENABLE_FW_RTS_PROFILE_MAX (34)
+#define CFG_ENABLE_FW_RTS_PROFILE_DEFAULT (33)
+
#ifdef FEATURE_GREEN_AP
#define CFG_ENABLE_GREEN_AP_FEATURE "gEnableGreenAp"
#define CFG_ENABLE_GREEN_AP_FEATURE_MIN (0)
@@ -4024,6 +4039,9 @@ struct hdd_config {
uint32_t enableFwLogLevel;
uint8_t enableFwModuleLogLevel[FW_MODULE_LOG_LEVEL_STRING_LENGTH];
+ /* RTS profile parameter */
+ uint32_t rts_profile;
+
#ifdef WLAN_FEATURE_11W
uint32_t pmfSaQueryMaxRetries;
uint32_t pmfSaQueryRetryInterval;
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index 4ad684334918..b76a3c0bf566 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -3052,6 +3052,13 @@ REG_TABLE_ENTRY g_registry_table[] = {
CFG_ENABLE_FW_DEBUG_LOG_LEVEL_MIN,
CFG_ENABLE_FW_DEBUG_LOG_LEVEL_MAX),
+ REG_VARIABLE(CFG_ENABLE_FW_RTS_PROFILE, WLAN_PARAM_Integer,
+ struct hdd_config, rts_profile,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_ENABLE_FW_RTS_PROFILE_DEFAULT,
+ CFG_ENABLE_FW_RTS_PROFILE_MIN,
+ CFG_ENABLE_FW_RTS_PROFILE_MAX),
+
REG_VARIABLE_STRING(CFG_ENABLE_FW_MODULE_LOG_LEVEL, WLAN_PARAM_String,
struct hdd_config, enableFwModuleLogLevel,
VAR_FLAGS_OPTIONAL,
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index bfbee90dfc03..2dc3cf390050 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -3114,6 +3114,15 @@ int hdd_set_fw_params(hdd_adapter_t *adapter)
hdd_set_fw_log_params(hdd_ctx, adapter);
+ 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;
+ }
+
EXIT();
return 0;