blob: d4a1f0dcdfa389176fb32668aab53defd13c7792 [file] [log] [blame]
developerd0c89452024-10-11 16:53:27 +08001From fe7a769deaeb995f9657dc160ec670192464e8e4 Mon Sep 17 00:00:00 2001
developer05f3b2b2024-08-19 19:17:34 +08002From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
3Date: Wed, 3 Jul 2024 10:34:39 +0800
developerd0c89452024-10-11 16:53:27 +08004Subject: [PATCH 161/223] mtk: mt76: mt7996: add kite if_comb
developer05f3b2b2024-08-19 19:17:34 +08005
6Add Kite (dual band) if_comb
7
8Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
9---
10 mt7996/init.c | 33 ++++++++++++++++++++++++++++++---
11 1 file changed, 30 insertions(+), 3 deletions(-)
12
13diff --git a/mt7996/init.c b/mt7996/init.c
developerd0c89452024-10-11 16:53:27 +080014index fe2958f5..18847ff5 100644
developer05f3b2b2024-08-19 19:17:34 +080015--- a/mt7996/init.c
16+++ b/mt7996/init.c
17@@ -46,6 +46,22 @@ static const struct ieee80211_iface_combination if_comb[] = {
18 }
19 };
20
21+static const struct ieee80211_iface_combination if_comb_7992[] = {
22+ {
23+ .limits = if_limits,
24+ .n_limits = ARRAY_SIZE(if_limits),
25+ .max_interfaces = MT7996_MAX_INTERFACES * 2,
26+ .num_different_channels = 2,
27+ .beacon_int_infra_match = true,
28+ .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
29+ BIT(NL80211_CHAN_WIDTH_20) |
30+ BIT(NL80211_CHAN_WIDTH_40) |
31+ BIT(NL80211_CHAN_WIDTH_80) |
32+ BIT(NL80211_CHAN_WIDTH_160),
33+ .beacon_int_min_gcd = 100,
34+ }
35+};
36+
37 static const u8 mt7996_if_types_ext_capa[] = {
38 [0] = WLAN_EXT_CAPA1_EXT_CHANNEL_SWITCHING,
39 [2] = WLAN_EXT_CAPA3_MULTI_BSSID_SUPPORT,
40@@ -417,11 +433,22 @@ mt7996_init_wiphy(struct ieee80211_hw *hw, struct mtk_wed_device *wed)
41 hw->vif_data_size = sizeof(struct mt7996_vif);
42 hw->chanctx_data_size = sizeof(struct mt7996_chanctx);
43
44- wiphy->iface_combinations = if_comb;
45- wiphy->n_iface_combinations = ARRAY_SIZE(if_comb);
46+ switch (mt76_chip(mdev)) {
47+ case 0x7990:
48+ wiphy->iface_combinations = if_comb;
49+ wiphy->n_iface_combinations = ARRAY_SIZE(if_comb);
50+ wiphy->mbssid_max_interfaces = 16 * 3;
51+ break;
52+ case 0x7992:
53+ default:
54+ wiphy->iface_combinations = if_comb_7992;
55+ wiphy->n_iface_combinations = ARRAY_SIZE(if_comb_7992);
56+ wiphy->mbssid_max_interfaces = 16 * 2;
57+ break;
58+ }
59+
60 wiphy->reg_notifier = mt7996_regd_notifier;
61 wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH;
62- wiphy->mbssid_max_interfaces = 16 * 3;
63
64 wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_BSS_COLOR);
65 wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_VHT_IBSS);
66--
developerd0c89452024-10-11 16:53:27 +0800672.45.2
developer05f3b2b2024-08-19 19:17:34 +080068