wpa_printf(MSG_DEBUG,
"MLD: Reported link not part of MLD");
} else if (!(BIT(link_id) & *seen)) {
- struct wpa_bss *neigh_bss =
- wpa_bss_get_bssid(wpa_s, pos + 1);
+ struct wpa_bss *neigh_bss;
+
+ if (ssid && ssid->ssid_len)
+ neigh_bss = wpa_bss_get(wpa_s, pos + 1,
+ ssid->ssid,
+ ssid->ssid_len);
+ else
+ neigh_bss = wpa_bss_get_bssid(wpa_s, pos + 1);
*seen |= BIT(link_id);
wpa_printf(MSG_DEBUG, "MLD: mld ID=%u, link ID=%u",
#ifdef CONFIG_TESTING_OPTIONS
static struct wpa_bss * wpas_ml_connect_pref(struct wpa_supplicant *wpa_s,
- struct wpa_bss *bss)
+ struct wpa_bss *bss,
+ struct wpa_ssid *ssid)
{
unsigned int low, high, i;
MAC2STR(wpa_s->links[i].bssid));
/* Get the BSS entry and do the switch */
- bss = wpa_bss_get_bssid(wpa_s, wpa_s->links[i].bssid);
+ if (ssid && ssid->ssid_len)
+ bss = wpa_bss_get(wpa_s, wpa_s->links[i].bssid, ssid->ssid,
+ ssid->ssid_len);
+ else
+ bss = wpa_bss_get_bssid(wpa_s, wpa_s->links[i].bssid);
wpa_s->mlo_assoc_link_id = i;
return bss;
static void wpas_sme_set_mlo_links(struct wpa_supplicant *wpa_s,
- struct wpa_bss *bss)
+ struct wpa_bss *bss, struct wpa_ssid *ssid)
{
u8 i;
if (bss->mld_link_id == i)
wpa_s->links[i].bss = bss;
+ else if (ssid && ssid->ssid_len)
+ wpa_s->links[i].bss = wpa_bss_get(wpa_s, bssid,
+ ssid->ssid,
+ ssid->ssid_len);
else
wpa_s->links[i].bss = wpa_bss_get_bssid(wpa_s, bssid);
}
NULL, ssid, NULL) &&
bss->valid_links) {
wpa_printf(MSG_DEBUG, "MLD: In authentication");
- wpas_sme_set_mlo_links(wpa_s, bss);
+ wpas_sme_set_mlo_links(wpa_s, bss, ssid);
#ifdef CONFIG_TESTING_OPTIONS
- bss = wpas_ml_connect_pref(wpa_s, bss);
+ bss = wpas_ml_connect_pref(wpa_s, bss, ssid);
if (wpa_s->conf->mld_force_single_link) {
wpa_printf(MSG_DEBUG, "MLD: Force single link");