[PATCH v2 1/3] AP: Use a constant for mld_sta if support is disabled
Benjamin Berg
benjamin at sipsolutions.net
Mon Jan 26 08:03:02 PST 2026
From: Benjamin Berg <benjamin.berg at intel.com>
Doing this allows removing some of the #ifdef's as the branches become
dead code and will be removed by the compiler.
Signed-off-by: Benjamin Berg <benjamin.berg at intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
src/ap/ieee802_11.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 1988d3c8a1..61a99cc293 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -3275,6 +3275,8 @@ static void handle_auth(struct hostapd_data *hapd,
const u8 *dst, *sa;
#ifdef CONFIG_IEEE80211BE
bool mld_sta = false;
+#else
+ const bool mld_sta = false;
#endif /* CONFIG_IEEE80211BE */
if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) {
@@ -3480,7 +3482,6 @@ static void handle_auth(struct hostapd_data *hapd,
if (res == HOSTAPD_ACL_PENDING)
return;
-#ifdef CONFIG_IEEE80211BE
if (mld_sta) {
res = ieee802_11_allowed_address(hapd, mgmt->sa,
(const u8 *) mgmt, len,
@@ -3495,7 +3496,6 @@ static void handle_auth(struct hostapd_data *hapd,
if (res == HOSTAPD_ACL_PENDING)
return;
}
-#endif /* CONFIG_IEEE80211BE */
#ifdef CONFIG_SAE
if (auth_alg == WLAN_AUTH_SAE && !from_queue &&
--
2.52.0
More information about the Hostap
mailing list