wlan-ap-Telecominfraproject/feeds/wifi-ax/hostapd/patches/806-multiple_bssid-make-the-AID-space-shared.patch
John Crispin 04f6078da6 ipq807x: update AX support
Signed-off-by: John Crispin <john@phrozen.org>
2020-10-04 14:28:57 +02:00

44 lines
1.3 KiB
Diff

From e2cc970761955596b04ecfcaee4f09ad970295a1 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Wed, 3 Jun 2020 16:36:42 +0200
Subject: [PATCH 806/820] multiple_bssid: make the AID space shared
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@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