Fix success check for triggering 6 GHz scan

wpas_trigger_6ghz_scan() returns 1 on success and 0 on failure to
trigger the scan. Checking the return value to be less than zero is not
correct. This was supposed to check for success, i.e., greater than
zero.

Fixes: 42add3c27b ("Scan 6 GHz channels after change to 6 GHz-allowed regdom")
Signed-off-by: Matthew Wang <matthewmwang@chromium.org>
This commit is contained in:
Matthew Wang 2024-06-04 21:02:16 +00:00 committed by Jouni Malinen
parent d40788a5cb
commit acd9332c3b

View file

@ -2721,7 +2721,7 @@ static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s,
wpa_supplicant_rsn_preauth_scan_results(wpa_s); wpa_supplicant_rsn_preauth_scan_results(wpa_s);
} else if (own_request) { } else if (own_request) {
if (wpa_s->support_6ghz && trigger_6ghz_scan && data && if (wpa_s->support_6ghz && trigger_6ghz_scan && data &&
wpas_trigger_6ghz_scan(wpa_s, data) < 0) wpas_trigger_6ghz_scan(wpa_s, data) > 0)
return 1; return 1;
/* /*