OSDN Git Service

wifi: mt76: mt7996: rely on mib_stats shared definition
authorLorenzo Bianconi <lorenzo@kernel.org>
Fri, 12 May 2023 22:29:54 +0000 (00:29 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 25 Jul 2023 19:59:40 +0000 (21:59 +0200)
Get rid of private copy of mib_stats structure.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c
drivers/net/wireless/mediatek/mt76/mt7996/mac.c
drivers/net/wireless/mediatek/mt76/mt7996/main.c
drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h

index 513ab4b..4d40ec7 100644 (file)
@@ -474,10 +474,10 @@ mt7996_ampdu_stat_read_phy(struct mt7996_phy *phy, struct seq_file *file)
 static void
 mt7996_txbf_stat_read_phy(struct mt7996_phy *phy, struct seq_file *s)
 {
+       struct mt76_mib_stats *mib = &phy->mib;
        static const char * const bw[] = {
                "BW20", "BW40", "BW80", "BW160"
        };
-       struct mib_stats *mib = &phy->mib;
 
        /* Tx Beamformer monitor */
        seq_puts(s, "\nTx Beamformer applied PPDU counts: ");
@@ -523,7 +523,7 @@ mt7996_tx_stats_show(struct seq_file *file, void *data)
 {
        struct mt7996_phy *phy = file->private;
        struct mt7996_dev *dev = phy->dev;
-       struct mib_stats *mib = &phy->mib;
+       struct mt76_mib_stats *mib = &phy->mib;
        int i;
        u32 attempts, success, per;
 
index 25c5deb..d05d7e7 100644 (file)
@@ -2196,8 +2196,8 @@ void mt7996_reset(struct mt7996_dev *dev)
 
 void mt7996_mac_update_stats(struct mt7996_phy *phy)
 {
+       struct mt76_mib_stats *mib = &phy->mib;
        struct mt7996_dev *dev = phy->dev;
-       struct mib_stats *mib = &phy->mib;
        u8 band_idx = phy->mt76->band_idx;
        u32 cnt;
        int i;
index 0dbfb0d..9362f84 100644 (file)
@@ -815,7 +815,7 @@ mt7996_get_stats(struct ieee80211_hw *hw,
 {
        struct mt7996_phy *phy = mt7996_hw_phy(hw);
        struct mt7996_dev *dev = mt7996_hw_dev(hw);
-       struct mib_stats *mib = &phy->mib;
+       struct mt76_mib_stats *mib = &phy->mib;
 
        mutex_lock(&dev->mt76.mutex);
 
@@ -1221,11 +1221,11 @@ void mt7996_get_et_stats(struct ieee80211_hw *hw,
        struct mt7996_dev *dev = mt7996_hw_dev(hw);
        struct mt7996_phy *phy = mt7996_hw_phy(hw);
        struct mt7996_vif *mvif = (struct mt7996_vif *)vif->drv_priv;
+       struct mt76_mib_stats *mib = &phy->mib;
        struct mt76_ethtool_worker_info wi = {
                .data = data,
                .idx = mvif->mt76.idx,
        };
-       struct mib_stats *mib = &phy->mib;
        /* See mt7996_ampdu_stat_read_phy, etc */
        int i, ei = 0;
 
index 4d7dcb9..348d3ad 100644 (file)
@@ -130,60 +130,6 @@ struct mt7996_vif {
        u8 beacon_rates_idx;
 };
 
-/* per-phy stats.  */
-struct mib_stats {
-       u32 ack_fail_cnt;
-       u32 fcs_err_cnt;
-       u32 rts_cnt;
-       u32 rts_retries_cnt;
-       u32 ba_miss_cnt;
-       u32 tx_mu_bf_cnt;
-       u32 tx_mu_mpdu_cnt;
-       u32 tx_mu_acked_mpdu_cnt;
-       u32 tx_su_acked_mpdu_cnt;
-       u32 tx_bf_ibf_ppdu_cnt;
-       u32 tx_bf_ebf_ppdu_cnt;
-
-       u32 tx_bf_rx_fb_all_cnt;
-       u32 tx_bf_rx_fb_eht_cnt;
-       u32 tx_bf_rx_fb_he_cnt;
-       u32 tx_bf_rx_fb_vht_cnt;
-       u32 tx_bf_rx_fb_ht_cnt;
-
-       u32 tx_bf_rx_fb_bw; /* value of last sample, not cumulative */
-       u32 tx_bf_rx_fb_nc_cnt;
-       u32 tx_bf_rx_fb_nr_cnt;
-       u32 tx_bf_fb_cpl_cnt;
-       u32 tx_bf_fb_trig_cnt;
-
-       u32 tx_ampdu_cnt;
-       u32 tx_stop_q_empty_cnt;
-       u32 tx_mpdu_attempts_cnt;
-       u32 tx_mpdu_success_cnt;
-       /* BF counter is PPDU-based, so remove MPDU-based BF counter */
-
-       u32 tx_rwp_fail_cnt;
-       u32 tx_rwp_need_cnt;
-
-       /* rx stats */
-       u32 rx_fifo_full_cnt;
-       u32 channel_idle_cnt;
-       u32 rx_vector_mismatch_cnt;
-       u32 rx_delimiter_fail_cnt;
-       u32 rx_len_mismatch_cnt;
-       u32 rx_mpdu_cnt;
-       u32 rx_ampdu_cnt;
-       u32 rx_ampdu_bytes_cnt;
-       u32 rx_ampdu_valid_subframe_cnt;
-       u32 rx_ampdu_valid_subframe_bytes_cnt;
-       u32 rx_pfdrop_cnt;
-       u32 rx_vec_queue_overflow_drop_cnt;
-       u32 rx_ba_cnt;
-
-       u32 tx_amsdu[8];
-       u32 tx_amsdu_cnt;
-};
-
 /* crash-dump */
 struct mt7996_crash_data {
        guid_t guid;
@@ -222,7 +168,7 @@ struct mt7996_phy {
        u32 rx_ampdu_ts;
        u32 ampdu_ref;
 
-       struct mib_stats mib;
+       struct mt76_mib_stats mib;
        struct mt76_channel_state state_ts;
 };