summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrakash Manjunathappa <prakashpm@codeaurora.org>2018-02-27 18:56:22 -0800
committersnandini <snandini@codeaurora.org>2018-02-28 18:21:10 -0800
commit34ba4734bd44eee7c7ca668effdc34eab9174a54 (patch)
treecd660b904095795bbb8e2464d28754d7da37d6d5
parent9ec591c3f42641ec898cf95a2fb5336570e92998 (diff)
qcacld-3.0: Add INI to control tcp_limit_output_bytes tuning
Current driver posts the high and low Tx TPUT indications to cnss-daemon to tune the tcp_limit_output_byte system parameter. Add option to disable it. Change-Id: Ic65fe0bd762024425cabf2f1f07123211dce5dce CRs-Fixed: 2197112
-rw-r--r--core/hdd/inc/wlan_hdd_cfg.h24
-rw-r--r--core/hdd/src/wlan_hdd_cfg.c10
-rw-r--r--core/hdd/src/wlan_hdd_main.c3
3 files changed, 36 insertions, 1 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 282bc2a6a2ca..c39fd2bd6f9e 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -8227,6 +8227,29 @@ enum hdd_link_speed_rpt_type {
#define CFG_BUS_BANDWIDTH_COMPUTE_INTERVAL_DEFAULT (100)
#define CFG_BUS_BANDWIDTH_COMPUTE_INTERVAL_MIN (0)
#define CFG_BUS_BANDWIDTH_COMPUTE_INTERVAL_MAX (10000)
+
+/*
+ * <ini>
+ * gEnableTcpLimitOutput - Control to enable TCP limit output byte
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to enable dynamic configuration of TCP limit output bytes
+ * tcp_limit_output_bytes param. Enabling this will let driver post message to
+ * cnss-daemon, accordingly cnss-daemon will modify the tcp_limit_output_bytes.
+ *
+ * Supported Feature: Tcp limit output bytes
+ *
+ * Usage: Internal
+ *
+ * </ini>
+ */
+#define CFG_ENABLE_TCP_LIMIT_OUTPUT "gTcpLimitOutputEnable"
+#define CFG_ENABLE_TCP_LIMIT_OUTPUT_DEFAULT (1)
+#define CFG_ENABLE_TCP_LIMIT_OUTPUT_MIN (0)
+#define CFG_ENABLE_TCP_LIMIT_OUTPUT_MAX (1)
+
/*
* <ini>
* gTcpAdvWinScaleEnable - Control to enable TCP adv window scaling
@@ -14754,6 +14777,7 @@ struct hdd_config {
uint32_t busBandwidthLowThreshold;
uint32_t busBandwidthComputeInterval;
uint32_t enable_tcp_delack;
+ bool enable_tcp_limit_output;
uint32_t enable_tcp_adv_win_scale;
uint32_t tcpDelackThresholdHigh;
uint32_t tcpDelackThresholdLow;
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index 70c0233531c5..83fdac8cdc87 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -3229,6 +3229,13 @@ struct reg_table_entry g_registry_table[] = {
CFG_BUS_BANDWIDTH_COMPUTE_INTERVAL_MIN,
CFG_BUS_BANDWIDTH_COMPUTE_INTERVAL_MAX),
+ REG_VARIABLE(CFG_ENABLE_TCP_LIMIT_OUTPUT, WLAN_PARAM_Integer,
+ struct hdd_config, enable_tcp_limit_output,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_ENABLE_TCP_LIMIT_OUTPUT_DEFAULT,
+ CFG_ENABLE_TCP_LIMIT_OUTPUT_MIN,
+ CFG_ENABLE_TCP_LIMIT_OUTPUT_MAX),
+
REG_VARIABLE(CFG_ENABLE_TCP_ADV_WIN_SCALE, WLAN_PARAM_Integer,
struct hdd_config, enable_tcp_adv_win_scale,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -6835,6 +6842,9 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
hdd_debug("Name = [gbusBandwidthComputeInterval] Value = [%u] ",
pHddCtx->config->busBandwidthComputeInterval);
hdd_debug("Name = [%s] Value = [%u] ",
+ CFG_ENABLE_TCP_LIMIT_OUTPUT,
+ pHddCtx->config->enable_tcp_limit_output);
+ hdd_debug("Name = [%s] Value = [%u] ",
CFG_ENABLE_TCP_ADV_WIN_SCALE,
pHddCtx->config->enable_tcp_adv_win_scale);
hdd_debug("Name = [%s] Value = [%u] ",
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index fc1b9177cb02..171d9832cba3 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -6908,7 +6908,8 @@ static void hdd_pld_request_bus_bandwidth(hdd_context_t *hdd_ctx,
else
next_tx_level = WLAN_SVC_TP_LOW;
- if (hdd_ctx->cur_tx_level != next_tx_level) {
+ if ((hdd_ctx->config->enable_tcp_limit_output) &&
+ (hdd_ctx->cur_tx_level != next_tx_level)) {
hdd_debug("change TCP TX trigger level %d, average_tx: %llu",
next_tx_level, temp_tx);
hdd_ctx->cur_tx_level = next_tx_level;