]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP MLD: Skip over Extended MLD Capabilities And Operations field
authorAdil Saeed Musthafa <quic_adilm@quicinc.com>
Wed, 22 Jan 2025 08:57:08 +0000 (00:57 -0800)
committerJouni Malinen <j@w1.fi>
Fri, 24 Jan 2025 16:18:46 +0000 (18:18 +0200)
Skip over the Extended MLD Capabilities And Operations field in the
Common Info field of the Basic Multi-Link element so that processing of
the information after the Common Info field can continue from the
correct offset.

Signed-off-by: Adil Saeed Musthafa <quic_adilm@quicinc.com>
src/ap/ieee802_11_eht.c
src/common/ieee802_11_defs.h

index 47526a836379cd57bebfa8e6e335796319982767..1355170e633b0d9b5ba6f477cd9c9483c56f580f 100644 (file)
@@ -1236,6 +1236,12 @@ u16 hostapd_process_ml_assoc_req(struct hostapd_data *hapd,
                goto out;
        }
 
+       if (ml_control & BASIC_MULTI_LINK_CTRL_PRES_EXT_MLD_CAP) {
+               common_info_len += 2;
+       } else {
+               wpa_printf(MSG_DEBUG, "MLD: EXT ML capabilities not present");
+       }
+
        wpa_printf(MSG_DEBUG, "MLD: expected_common_info_len=%lu",
                   common_info_len);
 
@@ -1266,6 +1272,10 @@ u16 hostapd_process_ml_assoc_req(struct hostapd_data *hapd,
        info->common_info.mld_capa = WPA_GET_LE16(pos);
        pos += 2;
 
+       if (ml_control & BASIC_MULTI_LINK_CTRL_PRES_EXT_MLD_CAP) {
+               pos += 2;
+       }
+
        wpa_printf(MSG_DEBUG, "MLD: addr=" MACSTR ", eml=0x%x, mld=0x%x",
                   MAC2STR(info->common_info.mld_addr),
                   info->common_info.eml_capa, info->common_info.mld_capa);
index 4755facabb09405416166adbb2b2c0eee18b65bf..b4d21a867311399a4401b588a7fcdb0e6adaef9e 100644 (file)
@@ -2766,15 +2766,16 @@ struct ieee80211_eht_capabilities {
 #define MULTI_LINK_SUB_ELEM_ID_VENDOR                  221
 #define MULTI_LINK_SUB_ELEM_ID_FRAGMENT                        254
 
-/* IEEE P802.11be/D2.2, 9.4.2.312.2 - Basic Multi-Link element */
+/* IEEE P802.11be/D7.0, 9.4.2.322.2 - Basic Multi-Link element */
 
-/* Figure 9-1002g: Presence Bitmap subfield of the Basic Multi-Link element */
+/* Figure 9-1074o: Presence Bitmap subfield of the Basic Multi-Link element */
 #define BASIC_MULTI_LINK_CTRL_PRES_LINK_ID             0x0010
 #define BASIC_MULTI_LINK_CTRL_PRES_BSS_PARAM_CH_COUNT  0x0020
 #define BASIC_MULTI_LINK_CTRL_PRES_MSD_INFO            0x0040
 #define BASIC_MULTI_LINK_CTRL_PRES_EML_CAPA            0x0080
 #define BASIC_MULTI_LINK_CTRL_PRES_MLD_CAPA            0x0100
 #define BASIC_MULTI_LINK_CTRL_PRES_AP_MLD_ID           0x0200
+#define BASIC_MULTI_LINK_CTRL_PRES_EXT_MLD_CAP         0x0400
 
 /*
  * STA Control field definitions of Per-STA Profile subelement in Basic