nl80211: keep awaiting wpa_supplicant scan results on busy response

When wpa_supplicant responds with FAIL-BUSY in response to the SCAN
command, a scan process is already in process. Instead of failing in
this case, simply keep awaiting the result list.

This also significantly speeds up the scan operation in many cases.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-09-22 18:28:40 +02:00
parent a766751369
commit 313e82709b

View file

@ -2471,8 +2471,14 @@ static int nl80211_get_scanlist_wpactl(const char *ifname, char *buf, int *len)
tries--;
}
/* got a failure reply */
/* scanning already in progress, keep awaiting results */
else if (!strcmp(reply, "FAIL-BUSY\n"))
{
tries--;
}
/* another failure, abort */
else if (!strncmp(reply, "FAIL-", 5))
{
break;
}