diff --git a/dp/wifi3.0/dp_htt.c b/dp/wifi3.0/dp_htt.c index 83c2842bae..ac4c9a20e0 100644 --- a/dp/wifi3.0/dp_htt.c +++ b/dp/wifi3.0/dp_htt.c @@ -110,7 +110,15 @@ dp_tx_rate_stats_update(struct dp_peer *peer, DP_STATS_UPD(peer, tx.rnd_avg_tx_rate, ppdu_tx_rate); if (peer->vdev) { - if (peer->bss_peer) { + /* + * In STA mode: + * We get ucast stats as BSS peer stats. + * + * In AP mode: + * We get mcast stats as BSS peer stats. + * We get ucast stats as assoc peer stats. + */ + if (peer->vdev->opmode == wlan_op_mode_ap && peer->bss_peer) { peer->vdev->stats.tx.mcast_last_tx_rate = ratekbps; peer->vdev->stats.tx.mcast_last_tx_rate_mcs = ppdu->mcs; } else { diff --git a/dp/wifi3.0/dp_stats.c b/dp/wifi3.0/dp_stats.c index c084bb69f3..b0d08c4d5c 100644 --- a/dp/wifi3.0/dp_stats.c +++ b/dp/wifi3.0/dp_stats.c @@ -5260,7 +5260,7 @@ dp_print_pdev_tx_stats(struct dp_pdev *pdev) pdev->stats.tx.dropped.age_out); DP_PRINT_STATS(" headroom insufficient = %d", pdev->stats.tx_i.dropped.headroom_insufficient); - DP_PRINT_STATS(" Multicast:"); + DP_PRINT_STATS("Multicast:"); DP_PRINT_STATS(" Packets: %u", pdev->stats.tx.mcast.num); DP_PRINT_STATS(" Bytes: %llu", diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index 7c6096d999..4925a3e5c5 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -3090,12 +3090,7 @@ void dp_tx_comp_process_tx_status(struct dp_tx_desc_s *tx_desc, goto out; } - if (qdf_likely(!peer->bss_peer)) { - DP_STATS_INC_PKT(peer, tx.ucast, 1, length); - - if (ts->status == HAL_TX_TQM_RR_FRAME_ACKED) - DP_STATS_INC_PKT(peer, tx.tx_success, 1, length); - } else { + if (qdf_unlikely(peer->bss_peer && vdev->opmode == wlan_op_mode_ap)) { if (ts->status != HAL_TX_TQM_RR_REM_CMD_REM) { DP_STATS_INC_PKT(peer, tx.mcast, 1, length); @@ -3105,6 +3100,10 @@ void dp_tx_comp_process_tx_status(struct dp_tx_desc_s *tx_desc, DP_STATS_INC_PKT(peer, tx.bcast, 1, length); } } + } else { + DP_STATS_INC_PKT(peer, tx.ucast, 1, length); + if (ts->status == HAL_TX_TQM_RR_FRAME_ACKED) + DP_STATS_INC_PKT(peer, tx.tx_success, 1, length); } dp_tx_update_peer_stats(tx_desc, ts, peer, ring_id);