qcacmn: Fix failing to get rx rates stats when in MLO mode

In MLO mode, there are 2 link peers and 1 MLD peer. TX/RX stats
is kept in txrx_peer, which only exists in MLD peer. This change
aims at fixing HDD failing to get rx rates info when in MLO mode.

Change-Id: If476216a6b0d1c006fbc0d45a3cbfbb0be79efd3
CRs-Fixed: 3287090
This commit is contained in:
jinbaoliu
2022-09-16 04:32:52 -07:00
committed by Madan Koyyalamudi
parent 276f3b27ac
commit 46796f2eb5
2 changed files with 5 additions and 3 deletions

View File

@@ -9874,9 +9874,11 @@ void dp_get_peer_extd_stats(struct dp_peer *peer,
struct dp_txrx_peer *txrx_peer;
struct dp_peer_extd_stats *extd_stats;
txrx_peer = peer->txrx_peer;
if (!txrx_peer)
txrx_peer = dp_get_txrx_peer(peer);
if (qdf_unlikely(!txrx_peer)) {
dp_err_rl("txrx_peer NULL");
return;
}
extd_stats = &txrx_peer->stats.extd_stats;
DP_UPDATE_EXTD_STATS(peer_stats, extd_stats);