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
@@ -328,11 +328,11 @@ mt76x02_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
|
||||
idx += 8;
|
||||
|
||||
/* vif is already set or idx is 8 for AP/Mesh/... */
|
||||
if (dev->mt76.vif_mask & BIT(idx) ||
|
||||
if (dev->mt76.vif_mask & BIT_ULL(idx) ||
|
||||
(vif->type != NL80211_IFTYPE_STATION && idx > 7))
|
||||
return -EBUSY;
|
||||
|
||||
dev->mt76.vif_mask |= BIT(idx);
|
||||
dev->mt76.vif_mask |= BIT_ULL(idx);
|
||||
|
||||
mt76x02_vif_init(dev, vif, idx);
|
||||
return 0;
|
||||
@@ -345,7 +345,7 @@ void mt76x02_remove_interface(struct ieee80211_hw *hw,
|
||||
struct mt76x02_dev *dev = hw->priv;
|
||||
struct mt76x02_vif *mvif = (struct mt76x02_vif *)vif->drv_priv;
|
||||
|
||||
dev->mt76.vif_mask &= ~BIT(mvif->idx);
|
||||
dev->mt76.vif_mask &= ~BIT_ULL(mvif->idx);
|
||||
rcu_assign_pointer(dev->mt76.wcid[mvif->group_wcid.idx], NULL);
|
||||
mt76_packet_id_flush(&dev->mt76, &mvif->group_wcid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user