mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: move vif_mask back from mt76_phy to mt76_dev
Since it is global for all drivers, it belongs to the main device Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+4
-4
@@ -304,7 +304,7 @@ mt76x02_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
|
||||
unsigned int idx = 0;
|
||||
|
||||
/* Allow to change address in HW if we create first interface. */
|
||||
if (!dev->mphy.vif_mask &&
|
||||
if (!dev->mt76.vif_mask &&
|
||||
(((vif->addr[0] ^ dev->mphy.macaddr[0]) & ~GENMASK(4, 1)) ||
|
||||
memcmp(vif->addr + 1, dev->mphy.macaddr + 1, ETH_ALEN - 1)))
|
||||
mt76x02_mac_setaddr(dev, vif->addr);
|
||||
@@ -329,11 +329,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->mphy.vif_mask & BIT(idx) ||
|
||||
if (dev->mt76.vif_mask & BIT(idx) ||
|
||||
(vif->type != NL80211_IFTYPE_STATION && idx > 7))
|
||||
return -EBUSY;
|
||||
|
||||
dev->mphy.vif_mask |= BIT(idx);
|
||||
dev->mt76.vif_mask |= BIT(idx);
|
||||
|
||||
mt76x02_vif_init(dev, vif, idx);
|
||||
return 0;
|
||||
@@ -346,7 +346,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->mphy.vif_mask &= ~BIT(mvif->idx);
|
||||
dev->mt76.vif_mask &= ~BIT(mvif->idx);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76x02_remove_interface);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user