diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index d8f8fd0b1664..db40615eae06 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -2880,8 +2880,7 @@ hdd_add_latency_critical_client(struct hdd_adapter *adapter, switch (phymode) { case QCA_WLAN_802_11_MODE_11A: case QCA_WLAN_802_11_MODE_11G: - if (adapter->device_mode == QDF_STA_MODE) - qdf_atomic_inc(&hdd_ctx->num_latency_critical_clients); + qdf_atomic_inc(&hdd_ctx->num_latency_critical_clients); hdd_debug("Adding latency critical connection for vdev %d", adapter->vdev_id); @@ -2914,8 +2913,7 @@ hdd_del_latency_critical_client(struct hdd_adapter *adapter, switch (phymode) { case QCA_WLAN_802_11_MODE_11A: case QCA_WLAN_802_11_MODE_11G: - if (adapter->device_mode == QDF_STA_MODE) - qdf_atomic_dec(&hdd_ctx->num_latency_critical_clients); + qdf_atomic_dec(&hdd_ctx->num_latency_critical_clients); hdd_info("Removing latency critical connection for vdev %d", adapter->vdev_id); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 9101f575aaf2..780dc0eac213 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9973,6 +9973,7 @@ void wlan_hdd_set_pm_qos_request(struct hdd_context *hdd_ctx, * hdd_low_tput_gro_flush_skip_handler() - adjust GRO flush for low tput * @hdd_ctx: handle to hdd context * @next_vote_level: next bus bandwidth level + * @legacy_client: legacy connection mode active * * If bus bandwidth level is PLD_BUS_WIDTH_LOW consistently and hit * the bus_low_cnt_threshold, set flag to skip GRO flush. @@ -9983,13 +9984,14 @@ void wlan_hdd_set_pm_qos_request(struct hdd_context *hdd_ctx, */ static inline void hdd_low_tput_gro_flush_skip_handler( struct hdd_context *hdd_ctx, - enum pld_bus_width_type next_vote_level) + enum pld_bus_width_type next_vote_level, + bool legacy_client) { 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 (next_vote_level == PLD_BUS_WIDTH_LOW && legacy_client) { if (++hdd_ctx->bus_low_vote_cnt >= threshold) qdf_atomic_set(&hdd_ctx->low_tput_gro_enable, 1); } else { @@ -10043,6 +10045,7 @@ static void hdd_pld_request_bus_bandwidth(struct hdd_context *hdd_ctx, cpumask_t pm_qos_cpu_mask; bool is_rx_pm_qos_high = false; bool is_tx_pm_qos_high = false; + bool legacy_client = false; cpumask_clear(&pm_qos_cpu_mask); @@ -10061,7 +10064,12 @@ static void hdd_pld_request_bus_bandwidth(struct hdd_context *hdd_ctx, dptrace_high_tput_req = next_vote_level > PLD_BUS_WIDTH_IDLE ? true : false; - hdd_low_tput_gro_flush_skip_handler(hdd_ctx, next_vote_level); + + if (qdf_atomic_read(&hdd_ctx->num_latency_critical_clients)) + legacy_client = true; + + hdd_low_tput_gro_flush_skip_handler(hdd_ctx, next_vote_level, + legacy_client); if (hdd_ctx->cur_vote_level != next_vote_level) { hdd_debug("BW Vote level %d, tx_packets: %lld, rx_packets: %lld",