Skip to content

Commit cf592be

Browse files
LorenzoBianconinbd168
authored andcommitted
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: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
1 parent 5690087 commit cf592be

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ mt7921_ampdu_stat_read_phy(struct mt7921_phy *phy,
6868
if (!phy)
6969
return;
7070

71+
mt7921_mac_update_mib_stats(phy);
72+
7173
/* Tx ampdu stat */
7274
for (i = 0; i < ARRAY_SIZE(range); i++)
7375
range[i] = mt76_rr(dev, MT_MIB_ARNG(0, i));

drivers/net/wireless/mediatek/mt76/mt7921/mac.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,8 +1483,7 @@ void mt7921_reset(struct mt76_dev *mdev)
14831483
queue_work(dev->mt76.wq, &dev->reset_work);
14841484
}
14851485

1486-
static void
1487-
mt7921_mac_update_mib_stats(struct mt7921_phy *phy)
1486+
void mt7921_mac_update_mib_stats(struct mt7921_phy *phy)
14881487
{
14891488
struct mt7921_dev *dev = phy->dev;
14901489
struct mib_stats *mib = &phy->mib;

drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ void mt7921_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
338338
struct ieee80211_sta *sta);
339339
void mt7921_mac_work(struct work_struct *work);
340340
void mt7921_mac_reset_work(struct work_struct *work);
341+
void mt7921_mac_update_mib_stats(struct mt7921_phy *phy);
341342
void mt7921_reset(struct mt76_dev *mdev);
342343
void mt7921_tx_cleanup(struct mt7921_dev *dev);
343344
int mt7921_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,

0 commit comments

Comments
 (0)