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

scan: Drop check that always true

This commit is contained in:
Andrew Zaborowski 2019-05-01 17:32:31 +02:00 committed by Denis Kenzior
parent 32dc69ffab
commit 09e31282b3

View File

@ -472,11 +472,11 @@ static uint32_t scan_common(uint32_t ifindex, bool passive,
scan_cmds_add(sr->cmds, sc, passive, params); scan_cmds_add(sr->cmds, sc, passive, params);
if (l_queue_length(sc->requests) > 0) /* Queue empty implies !sc->triggered && !sc->start_cmd_id */
if (!l_queue_isempty(sc->requests))
goto done; goto done;
if (sc->state != SCAN_STATE_NOT_RUNNING || if (sc->state != SCAN_STATE_NOT_RUNNING)
sc->start_cmd_id || sc->triggered)
goto done; goto done;
if (!scan_request_send_trigger(sc, sr)) if (!scan_request_send_trigger(sc, sr))
@ -736,8 +736,7 @@ static bool start_next_scan_request(struct scan_context *sc)
{ {
struct scan_request *sr; struct scan_request *sr;
if (sc->state != SCAN_STATE_NOT_RUNNING || if (sc->state != SCAN_STATE_NOT_RUNNING)
sc->start_cmd_id || sc->triggered)
return true; return true;
while (!l_queue_isempty(sc->requests)) { while (!l_queue_isempty(sc->requests)) {