@@ -773,6 +773,13 @@ enum mt76_phy_type {
__MT_PHY_TYPE_HE_MAX,
};
+struct mt76_sta_stats {
+ u64 tx_mode[__MT_PHY_TYPE_HE_MAX];
+ u64 tx_bw[4]; /* 20, 40, 80, 160 */
+ u64 tx_nss[4]; /* 1, 2, 3, 4 */
+ u64 tx_mcs[16]; /* mcs idx */
+};
+
#define CCK_RATE(_idx, _rate) { \
.bitrate = _rate, \
.flags = IEEE80211_RATE_SHORT_PREAMBLE, \
@@ -1347,7 +1347,7 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, struct sk_buff *skb)
static bool
mt7915_mac_add_txs_skb(struct mt7915_dev *dev, struct mt76_wcid *wcid, int pid,
- __le32 *txs_data, struct mt7915_sta_stats *stats)
+ __le32 *txs_data, struct mt76_sta_stats *stats)
{
struct ieee80211_supported_band *sband;
struct mt76_dev *mdev = &dev->mt76;
@@ -1199,10 +1199,10 @@ static void mt7915_ethtool_worker(void *wi_data, struct ieee80211_sta *sta)
{
struct mt7915_ethtool_worker_info *wi = wi_data;
struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv;
+ struct mt76_sta_stats *mstats = &msta->stats;
int ei = wi->initial_stat_idx;
int q;
u64 *data = wi->data;
- struct mt7915_sta_stats *mstats = &msta->stats;
if (msta->vif != wi->mvif)
return;
@@ -65,13 +65,6 @@ enum mt7915_rxq_id {
MT7915_RXQ_MCU_WA_EXT,
};
-struct mt7915_sta_stats {
- unsigned long tx_mode[__MT_PHY_TYPE_HE_MAX]; /* See mt76_phy_type */
- unsigned long tx_bw[4]; /* 20, 40, 80, 160 */
- unsigned long tx_nss[4]; /* 1, 2, 3, 4 */
- unsigned long tx_mcs[16]; /* mcs idx */
-};
-
struct mt7915_sta_key_conf {
s8 keyidx;
u8 key[16];
@@ -106,7 +99,7 @@ struct mt7915_sta {
unsigned long jiffies;
unsigned long ampdu_state;
- struct mt7915_sta_stats stats;
+ struct mt76_sta_stats stats;
struct mt7915_sta_key_conf bip;
This is a preliminary patch to add ethtool stats to mt7921 driver. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> --- drivers/net/wireless/mediatek/mt76/mt76.h | 7 +++++++ drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 9 +-------- 4 files changed, 10 insertions(+), 10 deletions(-)