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
This commit is contained in:
Jianmin Zhu 2021-08-17 21:54:26 +08:00 • committed by Gerrit - the friendly Code Review server
commit 8c2706ef81

View file

@ -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