mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7996: Add all active links to poll list in mt7996_mac_tx_free()
Add all valid links to poll list for Airtime Fairness/AQL accounting when tx-free event occurs. Co-developed-by: Bo Jiao <[email protected]> Signed-off-by: Bo Jiao <[email protected]> Co-developed-by: Shayne Chen <[email protected]> Signed-off-by: Shayne Chen <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
304226bc45
commit
7cf18f8ebb
+18
-1
@@ -1253,6 +1253,9 @@ mt7996_mac_tx_free(struct mt7996_dev *dev, void *data, int len)
|
||||
info = le32_to_cpu(*cur_info);
|
||||
if (info & MT_TXFREE_INFO_PAIR) {
|
||||
struct ieee80211_sta *sta;
|
||||
unsigned long valid_links;
|
||||
struct mt7996_sta *msta;
|
||||
unsigned int id;
|
||||
u16 idx;
|
||||
|
||||
idx = FIELD_GET(MT_TXFREE_INFO_WLAN_ID, info);
|
||||
@@ -1267,7 +1270,21 @@ mt7996_mac_tx_free(struct mt7996_dev *dev, void *data, int len)
|
||||
if (!link_sta)
|
||||
goto next;
|
||||
|
||||
mt76_wcid_add_poll(&dev->mt76, wcid);
|
||||
msta = (struct mt7996_sta *)sta->drv_priv;
|
||||
valid_links = sta->valid_links ?: BIT(0);
|
||||
|
||||
/* For MLD STA, add all link's wcid to sta_poll_list */
|
||||
for_each_set_bit(id, &valid_links,
|
||||
IEEE80211_MLD_MAX_NUM_LINKS) {
|
||||
struct mt7996_sta_link *msta_link;
|
||||
|
||||
msta_link = rcu_dereference(msta->link[id]);
|
||||
if (!msta_link)
|
||||
continue;
|
||||
|
||||
mt76_wcid_add_poll(&dev->mt76,
|
||||
&msta_link->wcid);
|
||||
}
|
||||
next:
|
||||
/* ver 7 has a new DW with pair = 1, skip it */
|
||||
if (ver == 7 && ((void *)(cur_info + 1) < end) &&
|
||||
|
||||
Reference in New Issue
Block a user