From 3c0448206e861dcf85ebdc5bfaaee83c45c07532 Mon Sep 17 00:00:00 2001 From: Amit Mehta Date: Tue, 19 Sep 2023 02:49:38 -0700 Subject: [PATCH] qcacmn: Add support to update MCAST stats for STA mode Currently host does not maintain TX completion stats for MCAST frames separately for STA mode. Add support to update MCAST stats for STA mode. CRs-Fixed: 3608640 Change-Id: Ia28a4cd332783a6767704cd0c479235ff27ddd8b --- dp/wifi3.0/dp_tx.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index ce7a5e9358..3e443c60e8 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -5931,6 +5931,32 @@ void dp_tx_update_uplink_delay(struct dp_soc *soc, struct dp_vdev *vdev, } #endif /* WLAN_FEATURE_TSF_UPLINK_DELAY */ +#ifndef CONFIG_AP_PLATFORM +/** + * dp_update_mcast_stats() - Update Tx Mcast stats + * @txrx_peer: txrx_peer pointer + * @link_id: Link ID + * @length: packet length + * @nbuf: nbuf handle + * + * Return: None + */ +static inline void +dp_update_mcast_stats(struct dp_txrx_peer *txrx_peer, uint8_t link_id, + uint32_t length, qdf_nbuf_t nbuf) +{ + if (QDF_NBUF_CB_GET_IS_MCAST(nbuf)) + DP_PEER_PER_PKT_STATS_INC_PKT(txrx_peer, tx.mcast, 1, + length, link_id); +} +#else +static inline void +dp_update_mcast_stats(struct dp_txrx_peer *txrx_peer, uint8_t link_id, + uint32_t length, qdf_nbuf_t nbuf) +{ +} +#endif + void dp_tx_comp_process_tx_status(struct dp_soc *soc, struct dp_tx_desc_s *tx_desc, struct hal_tx_completion_status *ts, @@ -6041,6 +6067,8 @@ void dp_tx_comp_process_tx_status(struct dp_soc *soc, 1, length, link_id); } + + dp_update_mcast_stats(txrx_peer, link_id, length, nbuf); } }