Skip to content

Commit c36f39a

Browse files
csyuancgregkh
authored andcommitted
wifi: mt76: mt7996: fix iface combination for different chipsets
[ Upstream commit 5ef0e8e ] MT7992 and MT7990 support up to 19 interfaces per band and 32 in total. Fixes: 8df63a4 ("wifi: mt76: mt7996: adjust interface num and wtbl size for mt7992") Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Link: https://patch.msgid.link/20251215063728.3013365-7-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent efdf1f0 commit c36f39a

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

  • drivers/net/wireless/mediatek/mt76/mt7996

drivers/net/wireless/mediatek/mt76/mt7996/init.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@ static const struct ieee80211_iface_combination if_comb_global = {
3434
BIT(NL80211_CHAN_WIDTH_40) |
3535
BIT(NL80211_CHAN_WIDTH_80) |
3636
BIT(NL80211_CHAN_WIDTH_160),
37+
.beacon_int_min_gcd = 100,
38+
};
39+
40+
static const struct ieee80211_iface_combination if_comb_global_7992 = {
41+
.limits = &if_limits_global,
42+
.n_limits = 1,
43+
.max_interfaces = 32,
44+
.num_different_channels = MT7996_MAX_RADIOS - 1,
45+
.radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
46+
BIT(NL80211_CHAN_WIDTH_20) |
47+
BIT(NL80211_CHAN_WIDTH_40) |
48+
BIT(NL80211_CHAN_WIDTH_80) |
49+
BIT(NL80211_CHAN_WIDTH_160),
50+
.beacon_int_min_gcd = 100,
3751
};
3852

3953
static const struct ieee80211_iface_limit if_limits[] = {
@@ -485,7 +499,8 @@ mt7996_init_wiphy(struct ieee80211_hw *hw, struct mtk_wed_device *wed)
485499
hw->vif_data_size = sizeof(struct mt7996_vif);
486500
hw->chanctx_data_size = sizeof(struct mt76_chanctx);
487501

488-
wiphy->iface_combinations = &if_comb_global;
502+
wiphy->iface_combinations = is_mt7996(&dev->mt76) ? &if_comb_global :
503+
&if_comb_global_7992;
489504
wiphy->n_iface_combinations = 1;
490505

491506
wiphy->radio = dev->radios;

0 commit comments

Comments
 (0)