mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: fix MBSS index condition in DBDC mode
MT7915_MAX_INTERFACES is per-band declaration in MT7915/MT7986/MT7916. Enlarge vif_mask to 64 bits wide, including the bit operation. Reviewed-by: Shayne Chen <[email protected]> Signed-off-by: Evelyn Tsai <[email protected]> Signed-off-by: Bo Jiao <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
5b7dd093c8
commit
c692aacb9b
+3
-3
@@ -194,7 +194,7 @@ static int mt7615_add_interface(struct ieee80211_hw *hw,
|
||||
is_zero_ether_addr(vif->addr))
|
||||
phy->monitor_vif = vif;
|
||||
|
||||
mvif->mt76.idx = ffs(~dev->mt76.vif_mask) - 1;
|
||||
mvif->mt76.idx = __ffs64(~dev->mt76.vif_mask);
|
||||
if (mvif->mt76.idx >= MT7615_MAX_INTERFACES) {
|
||||
ret = -ENOSPC;
|
||||
goto out;
|
||||
@@ -212,7 +212,7 @@ static int mt7615_add_interface(struct ieee80211_hw *hw,
|
||||
if (ext_phy)
|
||||
mvif->mt76.wmm_idx += 2;
|
||||
|
||||
dev->mt76.vif_mask |= BIT(mvif->mt76.idx);
|
||||
dev->mt76.vif_mask |= BIT_ULL(mvif->mt76.idx);
|
||||
dev->omac_mask |= BIT_ULL(mvif->mt76.omac_idx);
|
||||
phy->omac_mask |= BIT_ULL(mvif->mt76.omac_idx);
|
||||
|
||||
@@ -268,7 +268,7 @@ static void mt7615_remove_interface(struct ieee80211_hw *hw,
|
||||
|
||||
rcu_assign_pointer(dev->mt76.wcid[idx], NULL);
|
||||
|
||||
dev->mt76.vif_mask &= ~BIT(mvif->mt76.idx);
|
||||
dev->mt76.vif_mask &= ~BIT_ULL(mvif->mt76.idx);
|
||||
dev->omac_mask &= ~BIT_ULL(mvif->mt76.omac_idx);
|
||||
phy->omac_mask &= ~BIT_ULL(mvif->mt76.omac_idx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user