]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP MLD: Clean up disassoc handling for non-AP MLD link validity check
authorJouni Malinen <quic_jouni@quicinc.com>
Wed, 28 Feb 2024 20:16:09 +0000 (22:16 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 28 Feb 2024 20:17:57 +0000 (22:17 +0200)
The check for the non-AP MLD link being valid can be done one level
outside the loop that tries to find a matching AP link.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/ap/sta_info.c

index 042a5a28622c57ba4f60010493359f1024921caf..9de5b0a1c65abeb0400f24a9deffa568defff957 100644 (file)
@@ -970,12 +970,12 @@ static bool ap_sta_ml_disconnect(struct hostapd_data *hapd,
        interfaces = assoc_hapd->iface->interfaces;
 
        for (link_id = 0; link_id < MAX_NUM_MLD_LINKS; link_id++) {
+               if (!assoc_sta->mld_info.links[link_id].valid)
+                       continue;
+
                for (i = 0; i < interfaces->count; i++) {
                        struct sta_info *tmp_sta;
 
-                       if (!assoc_sta->mld_info.links[link_id].valid)
-                               continue;
-
                        tmp_hapd = interfaces->iface[i]->bss[0];
 
                        if (!tmp_hapd->conf->mld_ap ||