This is a preliminary patch to add ethtool stats to mt7921 driver.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
__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, \
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;
{
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;
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];
unsigned long jiffies;
unsigned long ampdu_state;
- struct mt7915_sta_stats stats;
+ struct mt76_sta_stats stats;
struct mt7915_sta_key_conf bip;