mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-23 14:22:36 +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:
parent
93a113f551
commit
bece39619b
@ -343,7 +343,7 @@ static uint32_t scan_common(uint32_t ifindex, bool passive,
|
||||
if (l_queue_length(sc->requests) > 0)
|
||||
goto done;
|
||||
|
||||
if (sc->state != SCAN_STATE_NOT_RUNNING)
|
||||
if (sc->state != SCAN_STATE_NOT_RUNNING || sc->start_cmd_id)
|
||||
goto done;
|
||||
|
||||
sc->start_cmd_id = scan_send_start(&sr->start_cmd, scan_triggered, sc);
|
||||
|
Loading…
Reference in New Issue
Block a user