[PATCH 2/2] AP: Fix various CONFIG_IEEE80211BE compilation issues

Andrei Otcheretianski andrei.otcheretianski at intel.com
Mon Feb 2 08:07:30 PST 2026


Fix the compilation without CONFIG_IEEE80211BE.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
 src/ap/ieee802_11.c | 3 +++
 src/ap/sta_info.c   | 4 ++--
 src/ap/wpa_auth.c   | 6 ++++--
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 51004064d1..720d97be0c 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -4932,7 +4932,10 @@ 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/sta_info.c b/src/ap/sta_info.c
index 0fea6c4fba..420205bff8 100644
--- a/src/ap/sta_info.c
+++ b/src/ap/sta_info.c
@@ -1418,8 +1418,8 @@ int ap_sta_set_vlan(struct hostapd_data *hapd, struct sta_info *sta,
 	int ret;
 #ifdef CONFIG_IEEE80211BE
 	size_t i;
-#endif /* CONFIG_IEEE80211BE */
 	struct hapd_interfaces *interfaces = hapd->iface->interfaces;
+#endif /* CONFIG_IEEE80211BE */
 
 	ret = ap_sta_set_vlan_helper(hapd, sta, vlan_desc);
 	if (ret)
@@ -1547,8 +1547,8 @@ int ap_sta_bind_vlan(struct hostapd_data *hapd, struct sta_info *sta)
 	int ret;
 #ifdef CONFIG_IEEE80211BE
 	size_t i;
-#endif /* CONFIG_IEEE80211BE */
 	struct hapd_interfaces *interfaces = hapd->iface->interfaces;
+#endif /* CONFIG_IEEE80211BE */
 
 	ret = ap_sta_bind_vlan_helper(hapd, sta);
 	if (ret)
diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c
index eb3f9bb244..c5fdac7496 100644
--- a/src/ap/wpa_auth.c
+++ b/src/ap/wpa_auth.c
@@ -70,8 +70,10 @@ static void wpa_group_get(struct wpa_authenticator *wpa_auth,
 			  struct wpa_group *group);
 static void wpa_group_put(struct wpa_authenticator *wpa_auth,
 			  struct wpa_group *group);
+#ifdef CONFIG_IEEE80211BE
 static void wpa_group_put_vlan(struct wpa_authenticator *wpa_auth,
 			       int vlan_id);
+#endif /* CONFIG_IEEE80211BE */
 static int ieee80211w_kde_len(struct wpa_state_machine *sm);
 static u8 * ieee80211w_kde_add(struct wpa_state_machine *sm, u8 *pos);
 static void wpa_group_update_gtk(struct wpa_authenticator *wpa_auth,
@@ -7063,6 +7065,7 @@ static void wpa_group_put(struct wpa_authenticator *wpa_auth,
 }
 
 
+#ifdef CONFIG_IEEE80211BE
 static void wpa_group_put_vlan(struct wpa_authenticator *wpa_auth,
 			       int vlan_id)
 {
@@ -7071,6 +7074,7 @@ static void wpa_group_put_vlan(struct wpa_authenticator *wpa_auth,
 
 	wpa_group_put(wpa_auth, vlan_group);
 }
+#endif /* CONFIG_IEEE80211BE */
 
 
 /*
@@ -7927,7 +7931,6 @@ void wpa_reset_assoc_sm_info(struct wpa_state_machine *assoc_sm,
 }
 
 
-#ifdef CONFIG_IEEE80211BE
 /* wpa_select_vlan_wpa_group - Traverse through the wpa_group list and select
  * the one that matches the vlan_id.
  *
@@ -7955,7 +7958,6 @@ struct wpa_group * wpa_select_vlan_wpa_group(struct wpa_group *gsm, int vlan_id)
 
 	return vlan_gsm;
 }
-#endif /* CONFIG_IEEE80211BE */
 
 
 void wpa_auth_set_sae_pw_id(struct wpa_state_machine *sm,
-- 
2.52.0




More information about the Hostap mailing list