Browse Source

qcacld-3.0: Don't reset tcp_adv_win_scale if any adapter is conn

In connected STA scenario, tcp_adv_win_scale is reset to 1
on runtime suspend. If any TCP connection gets initiated, the
SYN packet will cause a runtime resume. The bus bandwidth
work gets scheduled ~100msecs after resume is done. This
can result in a smaller TCP window value to get used for
the TCP connection initially and the window size does not
increase even with tcp_adv_win_scale updated to 2 as part
of bus bandwidth work.

Fix is to not reset the tcp_adv_win_scale config if any
adapter is connected on runtime suspend.

Change-Id: If10a1e1fd0efc8217f8136a60cfb01b03485a21d
CRs-Fixed: 2969041
Yeshwanth Sriram Guntuka 3 years ago
parent
commit
1827b94fc3
1 changed files with 7 additions and 2 deletions
  1. 7 2
      core/hdd/src/wlan_hdd_main.c

+ 7 - 2
core/hdd/src/wlan_hdd_main.c

@@ -15615,12 +15615,17 @@ void hdd_bus_bw_compute_timer_try_start(struct hdd_context *hdd_ctx)
 static void __hdd_bus_bw_compute_timer_stop(struct hdd_context *hdd_ctx)
 {
 	struct bbm_params param = {0};
+	bool is_any_adapter_conn = hdd_is_any_adapter_connected(hdd_ctx);
+
 	if (!qdf_periodic_work_stop_sync(&hdd_ctx->bus_bw_work))
 		goto exit;
 
 	ucfg_ipa_set_perf_level(hdd_ctx->pdev, 0, 0);
 	hdd_reset_tcp_delack(hdd_ctx);
-	hdd_reset_tcp_adv_win_scale(hdd_ctx);
+
+	if (!is_any_adapter_conn)
+		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),
@@ -15637,7 +15642,7 @@ exit:
 	param.policy_info.tput_level = TPUT_LEVEL_NONE;
 	hdd_bbm_apply_independent_policy(hdd_ctx, &param);
 
-	if (!hdd_is_any_adapter_connected(hdd_ctx))
+	if (!is_any_adapter_conn)
 		qdf_atomic_set(&hdd_ctx->num_latency_critical_clients, 0);
 }