diff --git a/core/hdd/inc/wlan_hdd_tx_rx.h b/core/hdd/inc/wlan_hdd_tx_rx.h index 8f9adbe3edc7..ba842d058a2a 100644 --- a/core/hdd/inc/wlan_hdd_tx_rx.h +++ b/core/hdd/inc/wlan_hdd_tx_rx.h @@ -188,8 +188,10 @@ void wlan_hdd_classify_pkt(struct sk_buff *skb); #ifdef MSM_PLATFORM void hdd_reset_tcp_delack(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) {} +#define HDD_MSM_CFG(msm_cfg) 0 #endif #ifdef FEATURE_WLAN_DIAG_SUPPORT diff --git a/core/hdd/src/wlan_hdd_lro.c b/core/hdd/src/wlan_hdd_lro.c index 189f5456fe73..0dd94ff098fe 100644 --- a/core/hdd/src/wlan_hdd_lro.c +++ b/core/hdd/src/wlan_hdd_lro.c @@ -142,7 +142,7 @@ hdd_lro_set_reset(struct hdd_context *hdd_ctx, struct hdd_adapter *adapter, adapter->dev->features &= ~NETIF_F_LRO; hdd_debug("LRO Disabled"); - if (hdd_ctx->en_tcp_delack_no_lro) { + if (hdd_ctx->config->enable_tcp_delack) { struct wlan_rx_tp_data rx_tp_data; hdd_debug("Enable TCP delack as LRO is disabled"); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index a58499c76c36..98818e055eff 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -7140,7 +7140,7 @@ static void hdd_pld_request_bus_bandwidth(struct hdd_context *hdd_ctx, * to default delayed ack. Note that this will disable the * dynamic delayed ack mechanism across the system */ - if (hdd_ctx->config->enable_tcp_delack) + if (hdd_ctx->en_tcp_delack_no_lro) rx_tp_data.rx_tp_flags |= TCP_DEL_ACK_IND; if (hdd_ctx->config->enable_tcp_adv_win_scale) @@ -7437,7 +7437,7 @@ void wlan_hdd_display_tx_rx_histogram(struct hdd_context *hdd_ctx) hdd_ctx->config->busBandwidthMediumThreshold, hdd_ctx->config->busBandwidthLowThreshold); hdd_debug("Enable TCP DEL ACK: %d", - hdd_ctx->config->enable_tcp_delack); + hdd_ctx->en_tcp_delack_no_lro); hdd_debug("TCP DEL High TH: %d TCP DEL Low TH: %d", hdd_ctx->config->tcpDelackThresholdHigh, hdd_ctx->config->tcpDelackThresholdLow); diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index 569b486319d3..539deee79afd 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -1620,6 +1620,8 @@ static void hdd_register_rx_ol(void) if (!hdd_ctx) hdd_err("HDD context is NULL"); + hdd_ctx->en_tcp_delack_no_lro = 0; + if (hdd_ctx->ol_enable == CFG_LRO_ENABLED) { cdp_register_rx_offld_flush_cb(soc, hdd_qdf_lro_flush); hdd_ctx->receive_offload_cb = hdd_lro_rx; @@ -1633,6 +1635,8 @@ static void hdd_register_rx_ol(void) hdd_hif_napi_gro_flush); hdd_ctx->receive_offload_cb = hdd_gro_rx; hdd_debug("GRO is enabled"); + } else if (HDD_MSM_CFG(hdd_ctx->config->enable_tcp_delack)) { + hdd_ctx->en_tcp_delack_no_lro = 1; } } @@ -1685,7 +1689,7 @@ void hdd_disable_rx_ol_in_concurrency(bool disable) } if (disable) { - if (hdd_ctx->en_tcp_delack_no_lro) { + if (HDD_MSM_CFG(hdd_ctx->config->enable_tcp_delack)) { struct wlan_rx_tp_data rx_tp_data; hdd_info("Enable TCP delack as LRO disabled in concurrency"); @@ -1699,7 +1703,7 @@ void hdd_disable_rx_ol_in_concurrency(bool disable) } qdf_atomic_set(&hdd_ctx->disable_lro_in_concurrency, 1); } else { - if (hdd_ctx->en_tcp_delack_no_lro) { + if (HDD_MSM_CFG(hdd_ctx->config->enable_tcp_delack)) { hdd_info("Disable TCP delack as LRO is enabled"); hdd_ctx->en_tcp_delack_no_lro = 0; hdd_reset_tcp_delack(hdd_ctx);