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>
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;
}