[PATCH 24/42] scan: MLD: Include SSID in ML probe request

Andrei Otcheretianski andrei.otcheretianski at intel.com
Mon Nov 20 15:51:38 PST 2023


From: Ilan Peer <ilan.peer at intel.com>

To improve chances with APs that do not reply to probe request
with short SSID or with direct BSSID.

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 wpa_supplicant/events.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index e47445e3f7..b77cc83c94 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1907,6 +1907,24 @@ static int wpa_supplicant_connect_ml_missing(struct wpa_supplicant *wpa_s,
 	else
 		wpa_s->ml_probe_mld_id = 0;
 
+	if (ssid && ssid->ssid_len) {
+		os_free(wpa_s->ssids_from_scan_req);
+		wpa_s->num_ssids_from_scan_req = 0;
+
+		wpa_s->ssids_from_scan_req =
+			os_zalloc(sizeof(struct wpa_ssid_value));
+
+		if (wpa_s->ssids_from_scan_req) {
+			wpa_printf(MSG_DEBUG,
+				   "MLD: ML probe: with direct SSID");
+
+			wpa_s->num_ssids_from_scan_req = 1;
+			wpa_s->ssids_from_scan_req[0].ssid_len = ssid->ssid_len;
+			os_memcpy(wpa_s->ssids_from_scan_req[0].ssid,
+				  ssid->ssid, ssid->ssid_len);
+		}
+	}
+
 	wpa_s->ml_probe_links = missing_links;
 
 	wpa_s->normal_scans = 0;
-- 
2.38.1




More information about the Hostap mailing list