Thread (5 messages) 5 messages, 1 author, 2021-01-27
STALE1969d

[PATCH 2/3] mt76: mt7915: fix vif sta index for DBDC

From: Felix Fietkau <nbd@nbd.name>
Date: 2021-01-19 18:28:41
Subsystem: mediatek mt76 wireless lan driver, the rest · Maintainers: Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Linus Torvalds

Since vif indexes are per-phy, we need to factor in the phy index to avoid
collisions on the WTBL index

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 drivers/net/wireless/mediatek/mt76/mt7915/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
index 8b8d0d2d532b..cbd9892f5bf9 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
@@ -189,7 +189,8 @@ static int mt7915_add_interface(struct ieee80211_hw *hw,
 	phy->mt76->vif_mask |= BIT(mvif->idx);
 	phy->omac_mask |= BIT_ULL(mvif->omac_idx);
 
-	idx = MT7915_WTBL_RESERVED - mvif->idx;
+	idx = MT7915_WTBL_RESERVED - mvif->idx -
+	      ext_phy * MT7915_MAX_INTERFACES / 2;
 
 	INIT_LIST_HEAD(&mvif->sta.rc_list);
 	INIT_LIST_HEAD(&mvif->sta.stats_list);
-- 
2.28.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help