wpa_supplicant: Do not retry scan if operation is not supported

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>
This commit is contained in:
Georg Müller 2020-06-18 16:39:12 +02:00 committed by Jouni Malinen
parent c0b88d1291
commit 2818e9ca90

View 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)