Selaa lähdekoodia

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
jinbaoliu 2 vuotta sitten
vanhempi
sitoutus
46796f2eb5
2 muutettua tiedostoa jossa 5 lisäystä ja 3 poistoa
  1. 4 2
      dp/wifi3.0/dp_main.c
  2. 1 1
      dp/wifi3.0/dp_rx.c

+ 4 - 2
dp/wifi3.0/dp_main.c

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

+ 1 - 1
dp/wifi3.0/dp_rx.c

@@ -2291,7 +2291,7 @@ dp_rx_rates_stats_update(struct dp_soc *soc, qdf_nbuf_t nbuf,
 	DP_PEER_EXTD_STATS_UPD(txrx_peer, rx.rx_rate, mcs);
 
 	/* In 11b mode, the nss we get from tlv is 0, invalid and should be 1 */
-	if (pkt_type == DOT11_B)
+	if (qdf_unlikely(pkt_type == DOT11_B))
 		nss = 1;
 
 	/* here pkt_type corresponds to preamble */