3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-26 18:59:22 +01:00

scan: fix scan state check

The state of scan is split between the two variables sc->state
and sc->start_cmd_id. Not checking start_cmd_id used to cause
sending a scan request while periodic scan was just triggered
resulting in EBUSY.
This commit is contained in:
Tim Kourt 2018-06-27 16:33:10 -07:00 committed by Denis Kenzior
parent 93a113f551
commit bece39619b

View File

@ -343,7 +343,7 @@ static uint32_t scan_common(uint32_t ifindex, bool passive,
if (l_queue_length(sc->requests) > 0) if (l_queue_length(sc->requests) > 0)
goto done; goto done;
if (sc->state != SCAN_STATE_NOT_RUNNING) if (sc->state != SCAN_STATE_NOT_RUNNING || sc->start_cmd_id)
goto done; goto done;
sc->start_cmd_id = scan_send_start(&sr->start_cmd, scan_triggered, sc); sc->start_cmd_id = scan_send_start(&sr->start_cmd, scan_triggered, sc);