From 4d11b27cecc84f7812e5d858c7945234013eec1f Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Thu, 12 Jun 2025 10:10:20 +0200 Subject: [PATCH] RRM: Send a refuse reply if the measurement scan failed If the scan is aborted or missing the expected TSF BSSID, then still send a REFUSED reply to the AP to let it know. It can request another measurement if it wants to. Signed-off-by: Benjamin Berg Reviewed-by: Ilan Peer --- wpa_supplicant/rrm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wpa_supplicant/rrm.c b/wpa_supplicant/rrm.c index 88241e736..d467ce6bf 100644 --- a/wpa_supplicant/rrm.c +++ b/wpa_supplicant/rrm.c @@ -1555,7 +1555,7 @@ int wpas_beacon_rep_scan_process(struct wpa_supplicant *wpa_s, /* If the measurement was aborted, don't report partial results */ if (info->aborted) - goto out; + goto out_refuse; wpa_printf(MSG_DEBUG, "RRM: TSF BSSID: " MACSTR " current BSS: " MACSTR, MAC2STR(info->scan_start_tsf_bssid), @@ -1564,7 +1564,7 @@ int wpas_beacon_rep_scan_process(struct wpa_supplicant *wpa_s, !wpas_beacon_rep_scan_match(wpa_s, info->scan_start_tsf_bssid)) { wpa_printf(MSG_DEBUG, "RRM: Ignore scan results due to mismatching TSF BSSID"); - goto out; + goto out_refuse; } for (i = 0; i < scan_res->num; i++) { @@ -1634,6 +1634,10 @@ int wpas_beacon_rep_scan_process(struct wpa_supplicant *wpa_s, wpas_rrm_send_msr_report(wpa_s, buf); wpabuf_free(buf); + goto out; + +out_refuse: + wpas_rrm_refuse_request(wpa_s); out: wpas_clear_beacon_rep_data(wpa_s); return 1; -- 2.47.2