Commit cf592be1 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

mt76: mt7921: update mib counters dumping phy stats

mt7921 mac work can be idle for a long time due to runtime-pm so
update mib counters dumping phy stats
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 56900874
...@@ -68,6 +68,8 @@ mt7921_ampdu_stat_read_phy(struct mt7921_phy *phy, ...@@ -68,6 +68,8 @@ mt7921_ampdu_stat_read_phy(struct mt7921_phy *phy,
if (!phy) if (!phy)
return; return;
mt7921_mac_update_mib_stats(phy);
/* Tx ampdu stat */ /* Tx ampdu stat */
for (i = 0; i < ARRAY_SIZE(range); i++) for (i = 0; i < ARRAY_SIZE(range); i++)
range[i] = mt76_rr(dev, MT_MIB_ARNG(0, i)); range[i] = mt76_rr(dev, MT_MIB_ARNG(0, i));
......
...@@ -1483,8 +1483,7 @@ void mt7921_reset(struct mt76_dev *mdev) ...@@ -1483,8 +1483,7 @@ void mt7921_reset(struct mt76_dev *mdev)
queue_work(dev->mt76.wq, &dev->reset_work); queue_work(dev->mt76.wq, &dev->reset_work);
} }
static void void mt7921_mac_update_mib_stats(struct mt7921_phy *phy)
mt7921_mac_update_mib_stats(struct mt7921_phy *phy)
{ {
struct mt7921_dev *dev = phy->dev; struct mt7921_dev *dev = phy->dev;
struct mib_stats *mib = &phy->mib; struct mib_stats *mib = &phy->mib;
......
...@@ -338,6 +338,7 @@ void mt7921_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif, ...@@ -338,6 +338,7 @@ void mt7921_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
struct ieee80211_sta *sta); struct ieee80211_sta *sta);
void mt7921_mac_work(struct work_struct *work); void mt7921_mac_work(struct work_struct *work);
void mt7921_mac_reset_work(struct work_struct *work); void mt7921_mac_reset_work(struct work_struct *work);
void mt7921_mac_update_mib_stats(struct mt7921_phy *phy);
void mt7921_reset(struct mt76_dev *mdev); void mt7921_reset(struct mt76_dev *mdev);
void mt7921_tx_cleanup(struct mt7921_dev *dev); void mt7921_tx_cleanup(struct mt7921_dev *dev);
int mt7921_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr, int mt7921_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment