]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
SME: Add support for handling association with MLD
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Tue, 6 Dec 2022 09:46:07 +0000 (11:46 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 17 Dec 2022 15:33:11 +0000 (17:33 +0200)
In case both the local driver and the AP support MLD, request an MLD
association from the driver.

When processing the association event from the driver verify that the
multi link information in the (Re)Association Response frame ML element
matches the links on which the association was expected.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
wpa_supplicant/sme.c

index 7d44fe0fa82c6fcc0096a646e2ccb75d8f536fb1..af906448dc2f282aba7b1448b4c90727b8741fe4 100644 (file)
@@ -2431,6 +2431,31 @@ mscs_fail:
        else
                params.uapsd = -1;
 
+       if (wpa_s->valid_links) {
+               unsigned int i;
+
+               wpa_printf(MSG_DEBUG,
+                          "MLD: In association. assoc_link_id=%u, valid_links=0x%x",
+                          wpa_s->mlo_assoc_link_id, wpa_s->valid_links);
+
+               params.mld_params.mld_addr = wpa_s->ap_mld_addr;
+               params.mld_params.valid_links = wpa_s->valid_links;
+               params.mld_params.assoc_link_id = wpa_s->mlo_assoc_link_id;
+               for (i = 0; i < MAX_NUM_MLD_LINKS; i++) {
+                       if (!(wpa_s->valid_links & BIT(i)))
+                               continue;
+
+                       params.mld_params.mld_links[i].bssid =
+                               wpa_s->links[i].bssid;
+                       params.mld_params.mld_links[i].freq =
+                               wpa_s->links[i].freq;
+
+                       wpa_printf(MSG_DEBUG, "MLD: id=%u, freq=%d, " MACSTR,
+                                  i, wpa_s->links[i].freq,
+                                  MAC2STR(wpa_s->links[i].bssid));
+               }
+       }
+
        if (wpa_drv_associate(wpa_s, &params) < 0) {
                wpa_msg(wpa_s, MSG_INFO, "SME: Association request to the "
                        "driver failed");