Browse Source

qcacld-3.0: Reset tcp adv window scale value to default

When gTcpAdvWinScaleEnable is enabled, tcp_adv_win_scale value
changes according to tput threshold. When wifi is disconnected,
tcp_adv_win_scale value is not reset to default value.

Reset the TCP advance window scale value to default when
bus bw timer stops.

Change-Id: I9b0ae2e8db11a626b3bdc4afc6e051af8943baab
CRs-Fixed: 2696481
Alok Kumar 4 years ago
parent
commit
6a42b53a9d
3 changed files with 23 additions and 0 deletions
  1. 11 0
      core/hdd/inc/wlan_hdd_tx_rx.h
  2. 1 0
      core/hdd/src/wlan_hdd_main.c
  3. 11 0
      core/hdd/src/wlan_hdd_tx_rx.c

+ 11 - 0
core/hdd/inc/wlan_hdd_tx_rx.h

@@ -401,6 +401,16 @@ void wlan_hdd_classify_pkt(struct sk_buff *skb);
 
 #ifdef WLAN_FEATURE_DP_BUS_BANDWIDTH
 void hdd_reset_tcp_delack(struct hdd_context *hdd_ctx);
+
+/**
+ * hdd_reset_tcp_adv_win_scale() - Reset tcp adv window scale value to default
+ * @hdd_ctx: Handle to hdd context
+ *
+ * Function used to reset TCP advance window scale value to its default value
+ *
+ * Return: None
+ */
+void hdd_reset_tcp_adv_win_scale(struct hdd_context *hdd_ctx);
 #ifdef RX_PERFORMANCE
 bool hdd_is_current_high_throughput(struct hdd_context *hdd_ctx);
 #else
@@ -412,6 +422,7 @@ static inline bool hdd_is_current_high_throughput(struct hdd_context *hdd_ctx)
 #define HDD_MSM_CFG(msm_cfg)	msm_cfg
 #else
 static inline void hdd_reset_tcp_delack(struct hdd_context *hdd_ctx) {}
+static inline void hdd_reset_tcp_adv_win_scale(struct hdd_context *hdd_ctx) {}
 static inline bool hdd_is_current_high_throughput(struct hdd_context *hdd_ctx)
 {
 	return false;

+ 1 - 0
core/hdd/src/wlan_hdd_main.c

@@ -14454,6 +14454,7 @@ static void __hdd_bus_bw_compute_timer_stop(struct hdd_context *hdd_ctx)
 
 	ucfg_ipa_set_perf_level(hdd_ctx->pdev, 0, 0);
 	hdd_reset_tcp_delack(hdd_ctx);
+	hdd_reset_tcp_adv_win_scale(hdd_ctx);
 	cdp_pdev_reset_driver_del_ack(cds_get_context(QDF_MODULE_ID_SOC),
 				      OL_TXRX_PDEV_ID);
 	cdp_pdev_reset_bundle_require_flag(cds_get_context(QDF_MODULE_ID_SOC),

+ 11 - 0
core/hdd/src/wlan_hdd_tx_rx.c

@@ -2990,6 +2990,17 @@ void hdd_reset_tcp_delack(struct hdd_context *hdd_ctx)
 	wlan_hdd_update_tcp_rx_param(hdd_ctx, &rx_tp_data);
 }
 
+void hdd_reset_tcp_adv_win_scale(struct hdd_context *hdd_ctx)
+{
+	enum wlan_tp_level next_level = WLAN_SVC_TP_NONE;
+	struct wlan_rx_tp_data rx_tp_data = {0};
+
+	rx_tp_data.rx_tp_flags |= TCP_ADV_WIN_SCL;
+	rx_tp_data.level = next_level;
+	hdd_ctx->cur_rx_level = WLAN_SVC_TP_NONE;
+	wlan_hdd_update_tcp_rx_param(hdd_ctx, &rx_tp_data);
+}
+
 /**
  * hdd_is_current_high_throughput() - Check if vote level is high
  * @hdd_ctx: Handle to hdd context