From 73a6f5c37ec223fbee77eaad2912642d51c09924 Mon Sep 17 00:00:00 2001 From: Ilan Peer Date: Tue, 21 Nov 2023 01:51:22 +0200 Subject: [PATCH] AP MLD: Make BSS parameter change variable As a preparation to support link removal, make the BSS parameter change count variable. Signed-off-by: Ilan Peer --- hostapd/main.c | 3 +++ src/ap/hostapd.h | 4 ++++ src/ap/ieee802_11_eht.c | 4 +--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/hostapd/main.c b/hostapd/main.c index aac2a81de..fcb01f60e 100644 --- a/hostapd/main.c +++ b/hostapd/main.c @@ -338,6 +338,9 @@ setup_mld: return -1; } + /* Initialize the BSS parameter change to 1 */ + hapd->eht_mld_bss_param_change = 1; + wpa_printf(MSG_DEBUG, "MLD: Set link_id=%u, mld_addr=" MACSTR ", own_addr=" MACSTR, diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h index 2994b2788..6dbe569cb 100644 --- a/src/ap/hostapd.h +++ b/src/ap/hostapd.h @@ -468,6 +468,10 @@ struct hostapd_data { #ifdef CONFIG_CTRL_IFACE_UDP unsigned char ctrl_iface_cookie[CTRL_IFACE_COOKIE_LEN]; #endif /* CONFIG_CTRL_IFACE_UDP */ + +#ifdef CONFIG_IEEE80211BE + u8 eht_mld_bss_param_change; +#endif /* CONFIG_IEEE80211BE */ }; diff --git a/src/ap/ieee802_11_eht.c b/src/ap/ieee802_11_eht.c index d3c1f20f4..dce2acf74 100644 --- a/src/ap/ieee802_11_eht.c +++ b/src/ap/ieee802_11_eht.c @@ -563,9 +563,7 @@ u8 * hostapd_eid_eht_basic_ml(struct hostapd_data *hapd, u8 *eid, wpabuf_put_le16(buf, link_bss->conf->dtim_period); /* BSS Parameters Change Count */ - /* TODO: Currently hard code the BSS Parameters Change Count to - * 0x1 */ - wpabuf_put_u8(buf, 0x1); + wpabuf_put_u8(buf, hapd->eht_mld_bss_param_change); /* Fragment the sub element if needed */ if (total_len <= 255) {