3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-28 21:19:24 +01:00

scan: Do not start new requests while suspended

If scanning is suspended, have scan_common() queue its scan request
rather than issuing it immediately. This respects the assumption that
scans are not requested while sc->suspended is true.
This commit is contained in:
Alvin Šipraga 2020-06-01 19:11:17 +02:00 committed by Denis Kenzior
parent 8b1161ec8e
commit cae6949ce1

View File

@ -546,6 +546,9 @@ static uint32_t scan_common(uint64_t wdev_id, bool passive,
if (!l_queue_isempty(sc->requests)) if (!l_queue_isempty(sc->requests))
goto done; goto done;
if (sc->suspended)
goto done;
if (sc->state != SCAN_STATE_NOT_RUNNING) if (sc->state != SCAN_STATE_NOT_RUNNING)
goto done; goto done;