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>
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 ||