]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_supplicant: Do not retry scan if operation is not supported
authorGeorg Müller <georgmueller@gmx.net>
Thu, 18 Jun 2020 14:39:12 +0000 (16:39 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 10 Oct 2020 17:26:18 +0000 (20:26 +0300)
When using NetworkManager to set up an access point, there seems to be a
race condition which can lead to a new log message every second.

The following message appears in AP mode:

    CTRL-EVENT-SCAN-FAILED ret=-95 retry=1

Normally, this log message only appears once. But then (and only then)
the race is triggered and they appear every second, the following log
messages are also present:

    Reject scan trigger since one is already pending
    Failed to initiate AP scan

This patch just disables the retry for requests where the operation is
not supported anyway.

Signed-off-by: Georg Müller <georgmueller@gmx.net>
wpa_supplicant/scan.c

index 7415eae9fe48fdcc5da44c0b9b5c60e1412bcd8e..b9e4162c8259925c25b1eb996e68e6372528bef0 100644 (file)
@@ -237,6 +237,10 @@ static void wpas_trigger_scan_cb(struct wpa_radio_work *work, int deinit)
                if (wpa_s->disconnected)
                        retry = 0;
 
+               /* do not retry if operation is not supported */
+               if (ret == -EOPNOTSUPP)
+                       retry = 0;
+
                wpa_supplicant_notify_scanning(wpa_s, 0);
                wpas_notify_scan_done(wpa_s, 0);
                if (wpa_s->wpa_state == WPA_SCANNING)