diff mbox series

[08/13] mbssid: make the AID space shared

Message ID 20220302222634.22185-9-quic_alokad@quicinc.com
State Changes Requested
Headers show
Series hostapd: MBSSID and EMA support | expand

Commit Message

Aloka Dixit March 2, 2022, 10:26 p.m. UTC
From: John Crispin <john@phrozen.org>

As described in IEEE Std 802.11-2020 11.1.3.8 Multiple BSSID procedure,
set the lowest AID value assigned to any client equal to 2^n,
where n is the maximum BSSID indicator of the MBSSID set.

Signed-off-by: John Crispin <john@phrozen.org>
Co-developed-by: Aloka Dixit <quic_alokad@quicinc.com>
Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
---
 src/ap/ieee802_11.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 4daf442bb242..33db7b411a8a 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -3998,7 +3998,10 @@  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;
+
+	aid += (1 << hostapd_max_bssid_indicator(hapd));
+
 	if (aid > 2007)
 		return -1;