]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: mt76: mt7996: fix iface combination for different chipsets
authorShayne Chen <shayne.chen@mediatek.com>
Mon, 15 Dec 2025 06:37:28 +0000 (14:37 +0800)
committerFelix Fietkau <nbd@nbd.name>
Mon, 23 Mar 2026 09:14:42 +0000 (09:14 +0000)
MT7992 and MT7990 support up to 19 interfaces per band and 32 in total.

Fixes: 8df63a4bbe3d ("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>
drivers/net/wireless/mediatek/mt76/mt7996/init.c

index 7e8bd3b142e7ead219542e7987864cad80b1e9e8..2e439f0815d4e00bfbb19d9fbeacd6a92387c1f3 100644 (file)
@@ -34,6 +34,20 @@ static const struct ieee80211_iface_combination if_comb_global = {
                               BIT(NL80211_CHAN_WIDTH_40) |
                               BIT(NL80211_CHAN_WIDTH_80) |
                               BIT(NL80211_CHAN_WIDTH_160),
+       .beacon_int_min_gcd = 100,
+};
+
+static const struct ieee80211_iface_combination if_comb_global_7992 = {
+       .limits = &if_limits_global,
+       .n_limits = 1,
+       .max_interfaces = 32,
+       .num_different_channels = MT7996_MAX_RADIOS - 1,
+       .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
+                              BIT(NL80211_CHAN_WIDTH_20) |
+                              BIT(NL80211_CHAN_WIDTH_40) |
+                              BIT(NL80211_CHAN_WIDTH_80) |
+                              BIT(NL80211_CHAN_WIDTH_160),
+       .beacon_int_min_gcd = 100,
 };
 
 static const struct ieee80211_iface_limit if_limits[] = {
@@ -485,7 +499,8 @@ mt7996_init_wiphy(struct ieee80211_hw *hw, struct mtk_wed_device *wed)
        hw->vif_data_size = sizeof(struct mt7996_vif);
        hw->chanctx_data_size = sizeof(struct mt76_chanctx);
 
-       wiphy->iface_combinations = &if_comb_global;
+       wiphy->iface_combinations = is_mt7996(&dev->mt76) ? &if_comb_global :
+                                                           &if_comb_global_7992;
        wiphy->n_iface_combinations = 1;
 
        wiphy->radio = dev->radios;