From f972420e8222e0fc73826ecd3b9570f444ce86c6 Mon Sep 17 00:00:00 2001 From: Harish Rachakonda Date: Tue, 30 Jan 2024 14:45:58 +0530 Subject: [PATCH] AP MLD: Fix AID allocation for legacy STA Currently, AID is not allocated properly in hostapd for legacy non-MLD STA in case of an AP MLD. All such stations have same AID. Fix this issue by allocating AID properly in hostapd when operating as an AP MLD and the STA is not an MLD. Fixes: d924be3bd06a ("AP: AID allocation for MLD") Signed-off-by: Harish Rachakonda --- src/ap/ieee802_11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index 88906a61e..975fdc12c 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -3292,7 +3292,7 @@ static u32 hostapd_get_aid_word(struct hostapd_data *hapd, /* Do not assign an AID that is in use on any of the affiliated links * when finding an AID for a non-AP MLD. */ - if (hapd->conf->mld_ap) { + if (hapd->conf->mld_ap && sta->mld_info.mld_sta) { int j; for (j = 0; j < MAX_NUM_MLD_LINKS; j++) { -- 2.47.2