[PATCH] hostapd: Fix multiple BSSID STA aid count

Allen Ye Allen.Ye at mediatek.com
Thu Aug 3 05:33:55 PDT 2023


From: "Allen.Ye" <allen.ye at mediatek.com>

When STAs connect to transmitted-bss and non-transmitted-bss, the
AP should count the aid in the same pool.

Use transmitted-bss aid pool to count aids when AP enable mbssid.

Signed-off-by: Allen.Ye <allen.ye at mediatek.com>
---
 src/ap/ieee802_11.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index d40a821fe..3a19c81a8 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -3312,6 +3312,9 @@ int hostapd_get_aid(struct hostapd_data *hapd, struct sta_info *sta)
 {
 	int i, j = 32, aid;
 
+	if (hapd->iconf->mbssid)
+		hapd = hostapd_mbssid_get_tx_bss(hapd);
+
 	/* get a unique AID */
 	if (sta->aid > 0) {
 		wpa_printf(MSG_DEBUG, "  old AID %d", sta->aid);
-- 
2.18.0




More information about the Hostap mailing list