mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt7603: track tx airtime for airtime fairness and survey
Poll per-station hardware counters after tx status events Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -66,6 +66,7 @@ mt7603_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
|
||||
|
||||
idx = MT7603_WTBL_RESERVED - 1 - mvif->idx;
|
||||
dev->vif_mask |= BIT(mvif->idx);
|
||||
INIT_LIST_HEAD(&mvif->sta.poll_list);
|
||||
mvif->sta.wcid.idx = idx;
|
||||
mvif->sta.wcid.hw_key_idx = -1;
|
||||
|
||||
@@ -325,6 +326,7 @@ mt7603_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
|
||||
if (idx < 0)
|
||||
return -ENOSPC;
|
||||
|
||||
INIT_LIST_HEAD(&msta->poll_list);
|
||||
__skb_queue_head_init(&msta->psq);
|
||||
msta->ps = ~0;
|
||||
msta->smps = ~0;
|
||||
@@ -361,6 +363,11 @@ mt7603_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
|
||||
mt7603_filter_tx(dev, wcid->idx, true);
|
||||
spin_unlock_bh(&dev->ps_lock);
|
||||
|
||||
spin_lock_bh(&dev->sta_poll_lock);
|
||||
if (!list_empty(&msta->poll_list))
|
||||
list_del_init(&msta->poll_list);
|
||||
spin_unlock_bh(&dev->sta_poll_lock);
|
||||
|
||||
mt7603_wtbl_clear(dev, wcid->idx);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user