pos += sizeof(*ap_info);
for (i = 0; i < count; i++, pos += ap_info->tbtt_info_len) {
- u8 bss_params;
-
if (end - pos < ap_info->tbtt_info_len)
break;
- bss_params = pos[1 + ETH_ALEN + 4];
mld_params = pos + mld_params_offset;
link_id = *(mld_params + 1) & EHT_ML_LINK_ID_MSK;
if (!neigh_bss) {
*missing |= BIT(link_id);
} else if ((!ssid ||
- (bss_params & (RNR_BSS_PARAM_SAME_SSID |
- RNR_BSS_PARAM_CO_LOCATED)) ||
wpa_scan_res_match(wpa_s, 0, neigh_bss,
- ssid, 1, 0)) &&
+ ssid, 1, 0, true)) &&
!wpa_bssid_ignore_is_listed(
wpa_s, neigh_bss->bssid)) {
struct mld_link *l;
static bool wpa_scan_res_ok(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
const u8 *match_ssid, size_t match_ssid_len,
struct wpa_bss *bss, int bssid_ignore_count,
- bool debug_print);
+ bool debug_print, bool link);
#ifdef CONFIG_SAE_PK
count = wpa_bssid_ignore_is_listed(wpa_s, bss->bssid);
if (wpa_scan_res_ok(wpa_s, ssid, match_ssid, match_ssid_len,
- bss, count, 0))
+ bss, count, false, false))
return true;
}
static bool wpa_scan_res_ok(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
const u8 *match_ssid, size_t match_ssid_len,
struct wpa_bss *bss, int bssid_ignore_count,
- bool debug_print)
+ bool debug_print, bool link)
{
int res;
bool wpa, check_ssid = false;
return false;
}
- if (ssid->bssid_set &&
+ if (!link && ssid->bssid_set &&
!ether_addr_equal(bss->bssid, ssid->bssid)) {
if (debug_print)
wpa_dbg(wpa_s, MSG_DEBUG, " skip - BSSID mismatch");
return false;
}
- if (!wpas_valid_ml_bss(wpa_s, bss)) {
+ if (!link && !wpas_valid_ml_bss(wpa_s, bss)) {
if (debug_print)
wpa_dbg(wpa_s, MSG_DEBUG,
" skip - ML BSS going to be removed");
struct wpa_ssid * wpa_scan_res_match(struct wpa_supplicant *wpa_s,
int i, struct wpa_bss *bss,
struct wpa_ssid *group,
- int only_first_ssid, int debug_print)
+ int only_first_ssid, int debug_print,
+ bool link)
{
u8 wpa_ie_len, rsn_ie_len;
const u8 *ie;
for (ssid = group; ssid; ssid = only_first_ssid ? NULL : ssid->pnext) {
if (wpa_scan_res_ok(wpa_s, ssid, match_ssid, match_ssid_len,
- bss, bssid_ignore_count, debug_print))
+ bss, bssid_ignore_count, debug_print, link))
return ssid;
}
struct wpa_bss *bss = wpa_s->last_scan_res[i];
ssid = wpa_scan_res_match(wpa_s, i, bss, group,
- only_first_ssid, 0);
+ only_first_ssid, 0, false);
if (ssid != wpa_s->current_ssid)
continue;
wpa_dbg(wpa_s, MSG_DEBUG, "%u: " MACSTR
wpa_s->owe_transition_select = 1;
*selected_ssid = wpa_scan_res_match(wpa_s, i, bss, group,
- only_first_ssid, 1);
+ only_first_ssid, 1, false);
wpa_s->owe_transition_select = 0;
if (!*selected_ssid)
continue;
struct wpa_bss *bss = wpa_s->last_scan_res[i];
int res;
- if (wpa_scan_res_match(wpa_s, i, bss, ssid, 1, 0)) {
+ if (wpa_scan_res_match(wpa_s, i, bss, ssid, 1, 0, false)) {
res = wnm_nei_rep_add_bss(wpa_s, bss, buf, pref--);
if (res == -2)
continue; /* could not build entry for BSS */
/* Apply normal roaming rules if we can stay with the current BSS */
if (current_bss && bss != current_bss &&
wpa_scan_res_match(wpa_s, 0, current_bss, wpa_s->current_ssid,
- 1, 0) &&
+ 1, 0, false) &&
!wpa_supplicant_need_to_roam_within_ess(wpa_s, current_bss, bss,
true))
bss = current_bss;