From 8c2706ef812b0e069b3be968723f2e27fc9834be Mon Sep 17 00:00:00 2001 From: Jianmin Zhu Date: Tue, 17 Aug 2021 21:54:26 +0800 Subject: [PATCH] qcacld-3.0: Fix issue that rx_mpdu is 0 for 11a/g mcs 0 For 11a/g mcs 0, preamble:OFDM 0, nss 1x1:0, channel width:20M, 0, mcs 0 rate:0. so (((_pream)) | ((_nss) << 3) | ((_bw) << 5) | ((_rate) << 8)) is 0, so wmi_rate_stats.rate is 0, rx_mpdu is set to 0. Fix it by not setting rx_mpdu to 0 when rate is 0. Change-Id: Ie12660480af42e26c2ea957b6576dbd395730522 CRs-Fixed: 3008693 --- core/wma/src/wma_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c index 5482ef859e7d..d978ba13d9fb 100644 --- a/core/wma/src/wma_utils.c +++ b/core/wma/src/wma_utils.c @@ -1767,7 +1767,7 @@ static int wma_unified_link_peer_stats_event_handler(void *handle, for (count = 0; count < peer_stats->num_rates; count++) { mcs_index = RATE_STAT_GET_MCS_INDEX(rate_stats->rate); if (QDF_IS_STATUS_SUCCESS(status)) { - if (rate_stats->rate && mcs_index < MAX_MCS) + if (mcs_index < MAX_MCS) rate_stats->rx_mpdu = dp_stats->rx.rx_mpdu_cnt[mcs_index]; else