Ver Fonte

qcacmn: Add Tx AMPDU statistics

Count of MSDUs Tx with AMPDU aggregation and
MSDUs without AMPDU aggregation is maintained. This
count is obtained from per ppdu stats.

Change-Id: I7c38846534bbe5f2fd0a9b3602a9d453e1c1f449
Chaitanya Kiran Godavarthi há 6 anos atrás
pai
commit
e541e9ccda
3 ficheiros alterados com 16 adições e 0 exclusões
  1. 2 0
      dp/wifi3.0/dp_htt.c
  2. 6 0
      dp/wifi3.0/dp_internal.h
  3. 8 0
      dp/wifi3.0/dp_main.c

+ 2 - 0
dp/wifi3.0/dp_htt.c

@@ -269,6 +269,8 @@ static void dp_tx_stats_update(struct dp_soc *soc, struct dp_peer *peer,
 	DP_STATS_INCC(peer,
 			tx.pkt_type[preamble].mcs_count[mcs], num_msdu,
 			((mcs < (MAX_MCS - 1)) && (preamble == DOT11_AX)));
+	DP_STATS_INCC(peer, tx.ampdu_cnt, num_msdu, ppdu->is_ampdu);
+	DP_STATS_INCC(peer, tx.non_ampdu_cnt, num_msdu, !(ppdu->is_ampdu));
 
 	dp_peer_stats_notify(peer);
 

+ 6 - 0
dp/wifi3.0/dp_internal.h

@@ -325,6 +325,8 @@ static inline void dp_update_pdev_stats(struct dp_pdev *tgtobj,
 	tgtobj->stats.tx.retries += srcobj->tx.retries;
 	tgtobj->stats.tx.non_amsdu_cnt += srcobj->tx.non_amsdu_cnt;
 	tgtobj->stats.tx.amsdu_cnt += srcobj->tx.amsdu_cnt;
+	tgtobj->stats.tx.non_ampdu_cnt += srcobj->tx.non_ampdu_cnt;
+	tgtobj->stats.tx.ampdu_cnt += srcobj->tx.ampdu_cnt;
 	tgtobj->stats.tx.dropped.fw_rem.num += srcobj->tx.dropped.fw_rem.num;
 	tgtobj->stats.tx.dropped.fw_rem.bytes +=
 			srcobj->tx.dropped.fw_rem.bytes;
@@ -509,6 +511,8 @@ static inline void dp_update_vdev_stats(struct cdp_vdev_stats *tgtobj,
 	tgtobj->tx.retries += srcobj->stats.tx.retries;
 	tgtobj->tx.non_amsdu_cnt += srcobj->stats.tx.non_amsdu_cnt;
 	tgtobj->tx.amsdu_cnt += srcobj->stats.tx.amsdu_cnt;
+	tgtobj->tx.non_ampdu_cnt += srcobj->stats.tx.non_ampdu_cnt;
+	tgtobj->tx.ampdu_cnt += srcobj->stats.tx.ampdu_cnt;
 	tgtobj->tx.dropped.fw_rem.num += srcobj->stats.tx.dropped.fw_rem.num;
 	tgtobj->tx.dropped.fw_rem.bytes +=
 			srcobj->stats.tx.dropped.fw_rem.bytes;
@@ -623,6 +627,8 @@ static inline void dp_update_vdev_stats(struct cdp_vdev_stats *tgtobj,
 		DP_STATS_AGGR(_tgtobj, _srcobj, tx.retries); \
 		DP_STATS_AGGR(_tgtobj, _srcobj, tx.non_amsdu_cnt); \
 		DP_STATS_AGGR(_tgtobj, _srcobj, tx.amsdu_cnt); \
+		DP_STATS_AGGR(_tgtobj, _srcobj, tx.non_ampdu_cnt); \
+		DP_STATS_AGGR(_tgtobj, _srcobj, tx.ampdu_cnt); \
 		DP_STATS_AGGR_PKT(_tgtobj, _srcobj, tx.dropped.fw_rem); \
 		DP_STATS_AGGR(_tgtobj, _srcobj, tx.dropped.fw_rem_tx); \
 		DP_STATS_AGGR(_tgtobj, _srcobj, tx.dropped.fw_rem_notx); \

+ 8 - 0
dp/wifi3.0/dp_main.c

@@ -7246,6 +7246,10 @@ dp_print_tx_rates(struct dp_vdev *vdev)
 	DP_PRINT_STATS("Last ack rssi = %d\n", pdev->stats.tx.last_ack_rssi);
 
 	DP_PRINT_STATS("Aggregation:\n");
+	DP_PRINT_STATS("Number of Msdu's Part of Ampdus = %d",
+		       pdev->stats.tx.ampdu_cnt);
+	DP_PRINT_STATS("Number of Msdu's With No Mpdu Level Aggregation : %d",
+		       pdev->stats.tx.non_ampdu_cnt);
 	DP_PRINT_STATS("Number of Msdu's Part of Amsdu = %d",
 			pdev->stats.tx.amsdu_cnt);
 	DP_PRINT_STATS("Number of Msdu's With No Msdu Level Aggregation = %d",
@@ -7299,6 +7303,10 @@ static inline void dp_print_peer_stats(struct dp_peer *peer)
 			peer->stats.tx.retries);
 	DP_PRINT_STATS("MSDU's Part of AMSDU = %d",
 			peer->stats.tx.amsdu_cnt);
+	DP_PRINT_STATS("Msdu's As Part of Ampdu = %d",
+		       peer->stats.tx.non_ampdu_cnt);
+	DP_PRINT_STATS("Msdu's As Ampdu = %d",
+		       peer->stats.tx.ampdu_cnt);
 	DP_PRINT_STATS("Last Packet RSSI = %d",
 			peer->stats.tx.last_ack_rssi);
 	DP_PRINT_STATS("Dropped At FW: Removed Pkts = %u",