]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
MLD: Add support for disabled APs
authorIlan Peer <ilan.peer@intel.com>
Thu, 21 Dec 2023 11:08:20 +0000 (13:08 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 22 Dec 2023 13:56:41 +0000 (15:56 +0200)
An affiliated AP of an AP MLD can temporarily be disabled. Other
affiliated APs of the AP MLD indicate this in the Reduced Neighbor
Report (RNR) elements added to their Beacon and Probe Response frames.

When an affiliated AP is disabled, it should be included in the
association exchange, but can be activated only after it is enabled.

Add support identifying disabled APs and propagate the information
to the driver within the associate() callback.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
src/common/ieee802_11_defs.h
src/drivers/driver.h
wpa_supplicant/bss.c
wpa_supplicant/bss.h
wpa_supplicant/sme.c
wpa_supplicant/wpa_supplicant_i.h

index 9bf98518e388df9c776202ce45c15b98c95627a6..1f762707b469c74247690d1181fc681edba6ba00 100644 (file)
@@ -2522,6 +2522,15 @@ struct ieee80211_he_mu_edca_parameter_set {
 #define RNR_BSS_PARAM_CO_LOCATED                    BIT(6)
 #define RNR_20_MHZ_PSD_MAX_TXPOWER                  255 /* dBm */
 
+/* IEEE P802.11be/D5.0, Figure 9-704c - MLD Parameters subfield format */
+/* B0..B7: AP MLD ID */
+/* B8..B11: Link ID */
+/* B12..B19: BSS Parameters Change Count */
+/* B20: All Updates Included */
+#define RNR_TBTT_INFO_MLD_PARAM2_ALL_UPDATE_INC 0x10
+/* B21: Disabled Link Indication */
+#define RNR_TBTT_INFO_MLD_PARAM2_LINK_DISABLED  0x20
+
 /* IEEE P802.11be/D2.3, 9.4.2.311 - EHT Operation element */
 
 /* Figure 9-1002b: EHT Operation Parameters field subfields */
index 5c0e4b15cf8b6dcea2efbd73ffcf948524354046..4974bbdc8711198b5cdb4df438ffdffe784bca61 100644 (file)
@@ -950,6 +950,7 @@ struct wpa_driver_mld_params {
                const u8 *ies;
                size_t ies_len;
                int error;
+               bool disabled;
        } mld_links[MAX_NUM_MLD_LINKS];
 };
 
index e07061abb57164db814d0887a8f27bda2a253188..ae71d2777b59090e52a242c4d84afca974735e05 100644 (file)
@@ -1553,6 +1553,8 @@ wpa_bss_parse_ml_rnr_ap_info(struct wpa_supplicant *wpa_s,
                                os_memcpy(l->bssid, ap_info->data + 1,
                                          ETH_ALEN);
                                l->freq = neigh_bss->freq;
+                               l->disabled = mld_params[2] &
+                                       RNR_TBTT_INFO_MLD_PARAM2_LINK_DISABLED;
                                bss->n_mld_links++;
                        }
                }
index 7b13ef96b80c2c0c27610ccbef970049596695a2..c06c20acf7811b8dca7952331a0b8e78b6d95a1d 100644 (file)
@@ -133,6 +133,9 @@ struct wpa_bss {
                u8 link_id;
                u8 bssid[ETH_ALEN];
                int freq;
+
+               /* Whether the link is valid but currently disabled */
+               bool disabled;
        } mld_links[MAX_NUM_MLD_LINKS];
 
        /* followed by ie_len octets of IEs */
index 23f151a4de3eea3df87c8937762ccef393090a83..c791e116b4d4acc984bc69b3b28ca064a5d21b53 100644 (file)
@@ -536,6 +536,7 @@ static void wpas_sme_set_mlo_links(struct wpa_supplicant *wpa_s,
                os_memcpy(wpa_s->links[link_id].bssid, bssid, ETH_ALEN);
                wpa_s->links[link_id].freq = bss->mld_links[i].freq;
                wpa_s->links[link_id].bss = wpa_bss_get_bssid(wpa_s, bssid);
+               wpa_s->links[link_id].disabled = bss->mld_links[i].disabled;
        }
 }
 
@@ -2591,9 +2592,13 @@ mscs_fail:
                                wpa_s->links[i].bssid;
                        params.mld_params.mld_links[i].freq =
                                wpa_s->links[i].freq;
+                       params.mld_params.mld_links[i].disabled =
+                               wpa_s->links[i].disabled;
 
-                       wpa_printf(MSG_DEBUG, "MLD: id=%u, freq=%d, " MACSTR,
+                       wpa_printf(MSG_DEBUG,
+                                  "MLD: id=%u, freq=%d, disabled=%u, " MACSTR,
                                   i, wpa_s->links[i].freq,
+                                  wpa_s->links[i].disabled,
                                   MAC2STR(wpa_s->links[i].bssid));
                }
        }
index b3f1cd1b4e1ade0f637db36f3e212ed8ed95fa83..ba21fcbd11dd343277840f54225acc3649395a15 100644 (file)
@@ -735,6 +735,7 @@ struct wpa_supplicant {
                u8 bssid[ETH_ALEN];
                unsigned int freq;
                struct wpa_bss *bss;
+               bool disabled;
        } links[MAX_NUM_MLD_LINKS];
        u8 *last_con_fail_realm;
        size_t last_con_fail_realm_len;