[PATCH v3 7/7] multiple_bssid: make the AID space shared
John Crispin
john at phrozen.org
Wed Aug 12 12:52:27 EDT 2020
There is only one shared TIM field in the transmitted beacon for all BSSs.
AID0 becomes AIDx where x is the bss_index. The STA AID offset needs to be
shifted accordingly.
Signed-off-by: John Crispin <john at phrozen.org>
---
src/ap/ieee802_11.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 06286378f..61793999c 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -2701,7 +2701,11 @@ int hostapd_get_aid(struct hostapd_data *hapd, struct sta_info *sta)
}
if (j == 32)
return -1;
- aid = i * 32 + j + 1;
+ aid = i * 32 + j;
+ if (hapd->iconf->multiple_bssid)
+ aid += hapd->iface->num_bss;
+ else
+ aid += 1;
if (aid > 2007)
return -1;
@@ -4368,7 +4372,7 @@ static void handle_assoc(struct hostapd_data *hapd,
goto fail;
omit_rsnxe = !get_ie(pos, left, WLAN_EID_RSNX);
- if (hostapd_get_aid(hapd, sta) < 0) {
+ if (hostapd_get_aid(hostapd_get_primary_bss(hapd), sta) < 0) {
hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_INFO, "No room for more AIDs");
resp = WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA;
--
2.25.1
More information about the Hostap
mailing list