From 5f03cb5ebf931c7a52e1025760bf5b04ee8394b0 Mon Sep 17 00:00:00 2001 From: Yu Tian Date: Tue, 29 Sep 2020 17:41:56 +0800 Subject: [PATCH] qcacld-3.0: Flush only GRO when bus change to idle GRO queue more pkts is enabled in bus vote low, when bus vote back to idle, these frames may not flushed to stack, use force flush to reduce latency. This change I22b5cf994fe02b7e3156a845ee13a5acbf791b22 added FISA flush too, however FISA currently is not handled in concurrent context, which leads to access violations. Change-Id: Ia682ec80a196fb913455c63bd165b0a5184b94b7 CRs-Fixed: 2786842 --- core/hdd/src/wlan_hdd_main.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index e7bd77ba2c24..194e52aade4a 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -142,6 +142,7 @@ #include "enet.h" #include #include +#include #include "wlan_hdd_sysfs.h" #include "wlan_disa_ucfg_api.h" #include "wlan_disa_obj_mgmt_api.h" @@ -9680,21 +9681,24 @@ static inline void hdd_low_tput_gro_flush_skip_handler( struct hdd_context *hdd_ctx, enum pld_bus_width_type next_vote_level) { - uint32_t bus_low_cnt_threshold = - hdd_ctx->config->bus_low_cnt_threshold; - struct hdd_adapter *adapter; + uint32_t threshold = hdd_ctx->config->bus_low_cnt_threshold; + ol_txrx_soc_handle soc = cds_get_context(QDF_MODULE_ID_SOC); + int i; if (next_vote_level == PLD_BUS_WIDTH_LOW) { - if (++hdd_ctx->bus_low_vote_cnt >= bus_low_cnt_threshold) + if (++hdd_ctx->bus_low_vote_cnt >= threshold) qdf_atomic_set(&hdd_ctx->low_tput_gro_enable, 1); } else { - if (qdf_atomic_read(&hdd_ctx->low_tput_gro_enable)) { + if (qdf_atomic_read(&hdd_ctx->low_tput_gro_enable) && + hdd_ctx->enable_dp_rx_threads) { /* flush pending rx pkts when LOW->IDLE */ hdd_debug("flush queued GRO pkts"); - hdd_for_each_adapter(hdd_ctx, adapter) - hdd_rx_flush_packet_cbk(adapter, - adapter->vdev_id); + for (i = 0; i < cdp_get_num_rx_contexts(soc); i++) { + dp_rx_gro_flush_ind(soc, i, + DP_RX_GRO_NORMAL_FLUSH); + } } + hdd_ctx->bus_low_vote_cnt = 0; qdf_atomic_set(&hdd_ctx->low_tput_gro_enable, 0); }