diff mbox series

[06/15] mt76: mt7915: rename amsdu_pack_stats to tx_amsdu_pack_stats

Message ID 20210811214439.17458-7-greearb@candelatech.com (mailing list archive)
State Rejected
Delegated to: Felix Fietkau
Headers show
Series mt7915 stats and debugging improvements. | expand

Commit Message

Ben Greear Aug. 11, 2021, 9:44 p.m. UTC
From: Ben Greear <greearb@candelatech.com>

Make it more clear that this is a tx-stat, and move it to
the tx section of the mib stats struct.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
 drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c | 8 ++++----
 drivers/net/wireless/mediatek/mt76/mt7915/mac.c     | 4 ++--
 drivers/net/wireless/mediatek/mt76/mt7915/main.c    | 2 +-
 drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h  | 3 +--
 4 files changed, 8 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c b/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c
index 885c60ea2a71..688641ea4bb5 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c
@@ -488,11 +488,11 @@  mt7915_tx_stats_show(struct seq_file *file, void *data)
 
 	/* Tx amsdu info */
 	seq_puts(file, "Tx MSDU statistics:\n");
-	for (i = 0, n = 0; i < ARRAY_SIZE(mib->amsdu_pack_stats); i++)
-		n += mib->amsdu_pack_stats[i];
+	for (i = 0, n = 0; i < ARRAY_SIZE(mib->tx_amsdu_pack_stats); i++)
+		n += mib->tx_amsdu_pack_stats[i];
 
-	for (i = 0; i < ARRAY_SIZE(mib->amsdu_pack_stats); i++) {
-		long si = mib->amsdu_pack_stats[i];
+	for (i = 0; i < ARRAY_SIZE(mib->tx_amsdu_pack_stats); i++) {
+		long si = mib->tx_amsdu_pack_stats[i];
 
 		seq_printf(file, "AMSDU pack count of %d MSDU in TXD: %ld ",
 			   i + 1, si);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
index b44ca71e7d06..f1cff26cbc36 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -2204,8 +2204,8 @@  mt7915_mac_update_stats(struct mt7915_phy *phy)
 	}
 
 	/* Tx amsdu info (pack-count histogram) */
-	for (i = 0; i < ARRAY_SIZE(mib->amsdu_pack_stats); i++)
-		mib->amsdu_pack_stats[i] += mt76_rr(dev,  MT_PLE_AMSDU_PACK_MSDU_CNT(i));
+	for (i = 0; i < ARRAY_SIZE(mib->tx_amsdu_pack_stats); i++)
+		mib->tx_amsdu_pack_stats[i] += mt76_rr(dev,  MT_PLE_AMSDU_PACK_MSDU_CNT(i));
 
 }
 
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
index b3f3b53da843..427b275f123a 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
@@ -1255,7 +1255,7 @@  void mt7915_get_et_stats(struct ieee80211_hw *hw,
 
 	/* Tx amsdu info (pack-count histogram) */
 	for (i = 0; i < 8; i++)
-		data[ei++] = mib->amsdu_pack_stats[i];
+		data[ei++] = mib->tx_amsdu_pack_stats[i];
 
 	/* rx counters */
 	data[ei++] = mib->rx_fifo_full_cnt;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h b/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
index 8086233d6e2b..b446a5c73aa5 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
@@ -147,6 +147,7 @@  struct mib_stats {
 
 	u32 tx_rwp_fail_cnt;
 	u32 tx_rwp_need_cnt;
+	u32 tx_amsdu_pack_stats[8]; /* histogram of how many sub-frames in amsdu */
 
 	/* rx stats */
 	u32 rx_fifo_full_cnt;
@@ -162,8 +163,6 @@  struct mib_stats {
 	u32 rx_pfdrop_cnt;
 	u32 rx_vec_queue_overflow_drop_cnt;
 	u32 rx_ba_cnt;
-
-	u32 amsdu_pack_stats[8]; /* histogram of how many sub-frames in amsdu */
 };
 
 struct mt7915_hif {