wpas_rrm_reset(wpa_s);
#endif /* CONFIG_NO_RRM */
wpa_s->wnmsleep_used = 0;
+#ifdef CONFIG_WNM
+ wpa_s->wnm_mode = 0;
+#endif /* CONFIG_WNM */
wnm_clear_coloc_intf_reporting(wpa_s);
wpa_s->disable_mbo_oce = 0;
return NULL;
}
+#ifdef CONFIG_WNM
+ if (wnm_is_bss_excluded(wpa_s, bss)) {
+ if (debug_print)
+ wpa_dbg(wpa_s, MSG_DEBUG, " skip - BSSID excluded");
+ return NULL;
+ }
+#endif /* CONFIG_WNM */
+
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))
wpa_s->coloc_intf_dialog_token = 0;
wpa_s->coloc_intf_auto_report = 0;
}
+
+
+bool wnm_is_bss_excluded(struct wpa_supplicant *wpa_s, struct wpa_bss *bss)
+{
+ unsigned int i;
+
+ if (!(wpa_s->wnm_mode & WNM_BSS_TM_REQ_DISASSOC_IMMINENT))
+ return false;
+
+ /*
+ * In case disassociation imminent is set, do no try to use a BSS to
+ * which we are connected.
+ */
+
+ if (wpa_s->current_bss &&
+ os_memcmp(wpa_s->current_bss->bssid, bss->bssid, ETH_ALEN) == 0) {
+ wpa_dbg(wpa_s, MSG_DEBUG,
+ "WNM: Disassociation imminent: current BSS");
+ return true;
+ }
+
+ if (!wpa_s->valid_links)
+ return false;
+
+ for (i = 0; i < MAX_NUM_MLD_LINKS; i++) {
+ if (!(wpa_s->valid_links & BIT(i)))
+ continue;
+
+ if (os_memcmp(wpa_s->links[i].bssid, bss->bssid,
+ ETH_ALEN) == 0) {
+ wpa_dbg(wpa_s, MSG_DEBUG,
+ "WNM: MLD: Disassociation imminent: current link");
+ return true;
+ }
+ }
+
+ return false;
+}
const struct wpabuf *elems);
void wnm_set_coloc_intf_elems(struct wpa_supplicant *wpa_s,
struct wpabuf *elems);
+bool wnm_is_bss_excluded(struct wpa_supplicant *wpa_s, struct wpa_bss *bss);
#ifdef CONFIG_WNM
#ifndef CONFIG_NO_WMM_AC
wmm_ac_clear_saved_tspecs(wpa_s);
#endif /* CONFIG_NO_WMM_AC */
+#ifdef CONFIG_WNM
+ wpa_s->wnm_mode = 0;
+#endif /* CONFIG_WNM */
wpa_s->reassoc_same_bss = 0;
wpa_s->reassoc_same_ess = 0;
#ifdef CONFIG_TESTING_OPTIONS