From 84a762d85d17340ce33435d0b8b15d744bcbeb61 Mon Sep 17 00:00:00 2001 From: Harsh Kumar Bijlani Date: Wed, 30 Mar 2022 19:16:38 +0530 Subject: [PATCH] qcacmn: Consider tqm bypass frames for stats accounting Parse the tqm bypass frames packet count and byte count and consider them for stats updation in the vdev. Change-Id: I644eb9819b8a68fbf9da2e2f2588c80dfaa61fa5 CRs-Fixed: 3163215 --- dp/wifi3.0/dp_htt.c | 12 ++++++++++++ dp/wifi3.0/dp_htt.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/dp/wifi3.0/dp_htt.c b/dp/wifi3.0/dp_htt.c index 9a40aa5811..785f3ae3f8 100644 --- a/dp/wifi3.0/dp_htt.c +++ b/dp/wifi3.0/dp_htt.c @@ -2401,6 +2401,18 @@ static void dp_vdev_txrx_hw_stats_handler(struct htt_soc *soc, tx_comp.bytes += byte_count; tx_failed.bytes += byte_count; + /* Extract tqm bypass packet count from buffer */ + tag_buf = tlv_buf_temp + + HTT_VDEV_STATS_GET_INDEX(TX_TQM_BYPASS_PKT_CNT); + pkt_count = HTT_VDEV_GET_STATS_U64(tag_buf); + tx_comp.num += pkt_count; + + /* Extract tx bypass packet byte count from buffer */ + tag_buf = tlv_buf_temp + + HTT_VDEV_STATS_GET_INDEX(TX_TQM_BYPASS_BYTE_CNT); + byte_count = HTT_VDEV_GET_STATS_U64(tag_buf); + tx_comp.bytes += byte_count; + DP_STATS_UPD(vdev, tx.comp_pkt.num, tx_comp.num); DP_STATS_UPD(vdev, tx.comp_pkt.bytes, tx_comp.bytes); diff --git a/dp/wifi3.0/dp_htt.h b/dp/wifi3.0/dp_htt.h index 515cd5c7c6..1e57a4e59c 100644 --- a/dp/wifi3.0/dp_htt.h +++ b/dp/wifi3.0/dp_htt.h @@ -159,6 +159,8 @@ void htt_htc_pkt_pool_free(struct htt_soc *soc); #define HTT_VDEV_STATS_TLV_TX_RETRY_BYTE_CNT_OFFSET 16 #define HTT_VDEV_STATS_TLV_TX_DROP_BYTE_CNT_OFFSET 18 #define HTT_VDEV_STATS_TLV_TX_AGE_OUT_BYTE_CNT_OFFSET 20 +#define HTT_VDEV_STATS_TLV_TX_TQM_BYPASS_PKT_CNT_OFFSET 22 +#define HTT_VDEV_STATS_TLV_TX_TQM_BYPASS_BYTE_CNT_OFFSET 24 #define HTT_VDEV_STATS_GET_INDEX(index) \ HTT_VDEV_STATS_TLV_##index##_OFFSET