From 0d10445f64e5b6a62e6775ad13752b7dd5679dcc Mon Sep 17 00:00:00 2001 From: jinbao liu Date: Thu, 16 Mar 2023 01:13:49 -0700 Subject: [PATCH] qcacld-3.0: Fix the issue of mcs=255 in relatively high rate mode Currently the RX link speed reported is taken from driver instead of FW. In light of performance, driver will stop reporting rates info when throughput exceeds certain threshold. In that case, the rates info to be reported is from parsing the rateflags from FW. However, driver sometimes fails to get an appropriate MCS index and has to assign 0 to it, which has unfriendly user experience when too much MCS=0 occurs. To address this issue, first, update the logic to ignore the throughput judgement to make sure that the rates info to be reported is always from driver. Second, add the function wlan_hdd_get_peer_rx_rate_stats() where wma_get_mcs _idx() has been called, to prevent the already updated rates info from corrupting by FW due to multi-thread. This change has little impact on throughput because the function is not called frequently. Change-Id: I73e874caa8e77325c9e81d0e5929e1ba539946a5 CRs-Fixed: 3434764 --- core/hdd/src/wlan_hdd_stats.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index 2b09920e80..4dcad3e072 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -2091,6 +2091,7 @@ static void cache_station_stats_cb(struct stats_event *ev, void *cookie) continue; } copy_station_stats_to_adapter(adapter, ev); + wlan_hdd_get_peer_rx_rate_stats(adapter); /* dev_put has to be done here */ hdd_adapter_dev_put_debug(adapter, dbgid); if (next_adapter) @@ -7573,13 +7574,6 @@ void wlan_hdd_get_peer_rx_rate_stats(struct hdd_adapter *adapter) soc = cds_get_context(QDF_MODULE_ID_SOC); - /* - * If througput is high, do not get rx rate - * info to avoid the performance penalty - */ - if (cdp_get_bus_lvl_high(soc)) - return; - peer_stats = qdf_mem_malloc(sizeof(*peer_stats)); if (!peer_stats) return;