]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP MLD: Fix AID allocation for legacy STA
authorHarish Rachakonda <quic_rachakon@quicinc.com>
Tue, 30 Jan 2024 09:15:58 +0000 (14:45 +0530)
committerJouni Malinen <j@w1.fi>
Tue, 30 Jan 2024 09:50:21 +0000 (11:50 +0200)
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 <quic_rachakon@quicinc.com>
src/ap/ieee802_11.c

index 88906a61ee6c5c2d4b3eddf7b51f6ba7ad5083cf..975fdc12c90605ce2285bb83fc6907b9ec08c6e0 100644 (file)
@@ -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++) {