]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
wifi: rtw89: add MLD capabilities declaration
authorPo-Hao Huang <phhuang@realtek.com>
Mon, 28 Apr 2025 11:24:53 +0000 (19:24 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 5 May 2025 01:48:25 +0000 (09:48 +0800)
Add MLD capabilities so association requests can carry multi-link
element with correct content.

Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250428112456.13165-8-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/core.c

index 93e7889eec960392f4afe45b45ed8231b90ab3be..fe482a923e8e40011f629a89a61efc358ccd63d2 100644 (file)
@@ -203,6 +203,23 @@ static const struct ieee80211_iface_combination rtw89_iface_combs[] = {
        },
 };
 
+static const u8 rtw89_ext_capa_sta[] = {
+       [2] = WLAN_EXT_CAPA3_MULTI_BSSID_SUPPORT,
+       [7] = WLAN_EXT_CAPA8_OPMODE_NOTIF,
+};
+
+static const struct wiphy_iftype_ext_capab rtw89_iftypes_ext_capa[] = {
+       {
+               .iftype = NL80211_IFTYPE_STATION,
+               .extended_capabilities = rtw89_ext_capa_sta,
+               .extended_capabilities_mask = rtw89_ext_capa_sta,
+               .extended_capabilities_len = sizeof(rtw89_ext_capa_sta),
+               /* relevant only if EHT is supported */
+               .eml_capabilities = 0,
+               .mld_capa_and_ops = 0,
+       },
+};
+
 #define RTW89_6GHZ_SPAN_HEAD 6145
 #define RTW89_6GHZ_SPAN_IDX(center_freq) \
        ((((int)(center_freq) - RTW89_6GHZ_SPAN_HEAD) / 5) / 2)
@@ -5316,8 +5333,11 @@ static int rtw89_core_register_hw(struct rtw89_dev *rtwdev)
        if (chip->chip_gen == RTW89_CHIP_BE)
                hw->wiphy->flags |= WIPHY_FLAG_DISABLE_WEXT;
 
-       if (rtwdev->support_mlo)
+       if (rtwdev->support_mlo) {
                hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_MLO;
+               hw->wiphy->iftype_ext_capab = rtw89_iftypes_ext_capa;
+               hw->wiphy->num_iftype_ext_capab = ARRAY_SIZE(rtw89_iftypes_ext_capa);
+       }
 
        hw->wiphy->features |= NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR;