summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt7915/main.c
diff options
context:
space:
mode:
authorRyder Lee <ryder.lee@mediatek.com>2023-05-17 19:34:43 +0200
committerFelix Fietkau <nbd@nbd.name>2023-07-25 21:59:41 +0200
commit1258c156f2537786468c7fe04f547f64c97c1e12 (patch)
tree3096a46df47ef2ebb5a2b2bda8a371e331171509 /drivers/net/wireless/mediatek/mt76/mt7915/main.c
parentwifi: mt76: add tx_nss histogram to ethtool stats (diff)
downloadlinux-1258c156f2537786468c7fe04f547f64c97c1e12.tar.xz
linux-1258c156f2537786468c7fe04f547f64c97c1e12.zip
wifi: mt76: mt7915: accumulate mu-mimo ofdma muru stats
The stats are clear-on-read, which makes it very difficult for tools to adequately deal with wrapped stats and with keeping good totals. So, accumulate these values when they are read from the firmware/radio and present totals to user-space. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7915/main.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7915/main.c63
1 files changed, 63 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
index ecb27da27c6d..64c02734a3f2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
@@ -1254,6 +1254,38 @@ static const char mt7915_gstrings_stats[][ETH_GSTRING_LEN] = {
"rx_vec_queue_overflow_drop_cnt",
"rx_ba_cnt",
+ /* muru mu-mimo and ofdma related stats */
+ "dl_cck_cnt",
+ "dl_ofdm_cnt",
+ "dl_htmix_cnt",
+ "dl_htgf_cnt",
+ "dl_vht_su_cnt",
+ "dl_vht_2mu_cnt",
+ "dl_vht_3mu_cnt",
+ "dl_vht_4mu_cnt",
+ "dl_he_su_cnt",
+ "dl_he_ext_su_cnt",
+ "dl_he_2ru_cnt",
+ "dl_he_2mu_cnt",
+ "dl_he_3ru_cnt",
+ "dl_he_3mu_cnt",
+ "dl_he_4ru_cnt",
+ "dl_he_4mu_cnt",
+ "dl_he_5to8ru_cnt",
+ "dl_he_9to16ru_cnt",
+ "dl_he_gtr16ru_cnt",
+
+ "ul_hetrig_su_cnt",
+ "ul_hetrig_2ru_cnt",
+ "ul_hetrig_3ru_cnt",
+ "ul_hetrig_4ru_cnt",
+ "ul_hetrig_5to8ru_cnt",
+ "ul_hetrig_9to16ru_cnt",
+ "ul_hetrig_gtr16ru_cnt",
+ "ul_hetrig_2mu_cnt",
+ "ul_hetrig_3mu_cnt",
+ "ul_hetrig_4mu_cnt",
+
/* per vif counters */
"v_tx_mode_cck",
"v_tx_mode_ofdm",
@@ -1408,6 +1440,37 @@ void mt7915_get_et_stats(struct ieee80211_hw *hw,
data[ei++] = mib->rx_vec_queue_overflow_drop_cnt;
data[ei++] = mib->rx_ba_cnt;
+ data[ei++] = mib->dl_cck_cnt;
+ data[ei++] = mib->dl_ofdm_cnt;
+ data[ei++] = mib->dl_htmix_cnt;
+ data[ei++] = mib->dl_htgf_cnt;
+ data[ei++] = mib->dl_vht_su_cnt;
+ data[ei++] = mib->dl_vht_2mu_cnt;
+ data[ei++] = mib->dl_vht_3mu_cnt;
+ data[ei++] = mib->dl_vht_4mu_cnt;
+ data[ei++] = mib->dl_he_su_cnt;
+ data[ei++] = mib->dl_he_ext_su_cnt;
+ data[ei++] = mib->dl_he_2ru_cnt;
+ data[ei++] = mib->dl_he_2mu_cnt;
+ data[ei++] = mib->dl_he_3ru_cnt;
+ data[ei++] = mib->dl_he_3mu_cnt;
+ data[ei++] = mib->dl_he_4ru_cnt;
+ data[ei++] = mib->dl_he_4mu_cnt;
+ data[ei++] = mib->dl_he_5to8ru_cnt;
+ data[ei++] = mib->dl_he_9to16ru_cnt;
+ data[ei++] = mib->dl_he_gtr16ru_cnt;
+
+ data[ei++] = mib->ul_hetrig_su_cnt;
+ data[ei++] = mib->ul_hetrig_2ru_cnt;
+ data[ei++] = mib->ul_hetrig_3ru_cnt;
+ data[ei++] = mib->ul_hetrig_4ru_cnt;
+ data[ei++] = mib->ul_hetrig_5to8ru_cnt;
+ data[ei++] = mib->ul_hetrig_9to16ru_cnt;
+ data[ei++] = mib->ul_hetrig_gtr16ru_cnt;
+ data[ei++] = mib->ul_hetrig_2mu_cnt;
+ data[ei++] = mib->ul_hetrig_3mu_cnt;
+ data[ei++] = mib->ul_hetrig_4mu_cnt;
+
/* Add values for all stations owned by this vif */
wi.initial_stat_idx = ei;
ieee80211_iterate_stations_atomic(hw, mt7915_ethtool_worker, &wi);