[PATCH] Fix build without CONFIG_IEEE80211BE

Nick Hainke vincent at systemli.org
Sat Feb 7 10:13:10 PST 2026


Building hostapd without IEEE 802.11be support fails due to undefined
references.

One call to clear_wpa_sm_for_all_sta() was not guarded by
CONFIG_IEEE80211BE, and the first_sta_seen_mbssid callback pulled in
functions that are only built when CONFIG_IEEE80211BE is enabled.

Guard both the call site and the callback helper/registration with
CONFIG_IEEE80211BE to restore successful builds when it is disabled.

Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 src/ap/ieee802_11.c    | 2 ++
 src/ap/wpa_auth_glue.c | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 51004064d..fe1d6a14f 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -4932,7 +4932,9 @@ out:
 	if (resp != WLAN_STATUS_SUCCESS || assoc_wpa_sm) {
 		struct wpa_state_machine *sm = sta->wpa_sm;
 
+#ifdef CONFIG_IEEE80211BE
 		clear_wpa_sm_for_all_sta(hapd, sm);
+#endif /* CONFIG_IEEE80211BE */
 		wpa_auth_sta_deinit(sm);
 
 		/* Only keep a reference to the main wpa_sm and drop the
diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c
index 6bff35a88..76669d2b3 100644
--- a/src/ap/wpa_auth_glue.c
+++ b/src/ap/wpa_auth_glue.c
@@ -1670,6 +1670,7 @@ static int hostapd_set_ltf_keyseed(void *ctx, const u8 *peer_addr,
 #endif /* CONFIG_PASN */
 
 
+#ifdef CONFIG_IEEE80211BE
 static bool hostapd_first_sta_seen_mbssid(void *ctx, int vlan_id)
 {
 	struct hostapd_data *hapd = ctx;
@@ -1688,6 +1689,7 @@ static bool hostapd_first_sta_seen_mbssid(void *ctx, int vlan_id)
 
 	return false;
 }
+#endif /* CONFIG_IEEE80211BE */
 
 
 #ifdef CONFIG_IEEE80211BE
@@ -1841,7 +1843,9 @@ int hostapd_setup_wpa(struct hostapd_data *hapd)
 #endif /* CONFIG_IEEE80211BE */
 		.get_drv_flags = hostapd_wpa_auth_get_drv_flags,
 		.remove_pmkid = hostapd_wpa_auth_remove_pmkid,
+#ifdef CONFIG_IEEE80211BE
 		.first_sta_seen_mbssid = hostapd_first_sta_seen_mbssid,
+#endif /* CONFIG_IEEE80211BE */
 	};
 	const u8 *wpa_ie;
 	size_t wpa_ie_len;
-- 
2.53.0




More information about the Hostap mailing list