diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h index 9bf98518e..1f762707b 100644 --- a/src/common/ieee802_11_defs.h +++ b/src/common/ieee802_11_defs.h @@ -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 */ diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 5c0e4b15c..4974bbdc8 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -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]; }; diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c index e07061abb..ae71d2777 100644 --- a/wpa_supplicant/bss.c +++ b/wpa_supplicant/bss.c @@ -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++; } } diff --git a/wpa_supplicant/bss.h b/wpa_supplicant/bss.h index 7b13ef96b..c06c20acf 100644 --- a/wpa_supplicant/bss.h +++ b/wpa_supplicant/bss.h @@ -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 */ diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c index 23f151a4d..c791e116b 100644 --- a/wpa_supplicant/sme.c +++ b/wpa_supplicant/sme.c @@ -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)); } } diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h index b3f1cd1b4..ba21fcbd1 100644 --- a/wpa_supplicant/wpa_supplicant_i.h +++ b/wpa_supplicant/wpa_supplicant_i.h @@ -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;