3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-21 20:12:37 +01:00

scan: Fix triggered flag setting

triggered flag was being reset to false in all cases.  However, due to
how scan_finished logic works, it should have remained true if no more
commands were left to be sent (e.g. the scan was finished).
This commit is contained in:
Denis Kenzior 2018-07-13 12:30:25 -05:00
parent ec46f8da02
commit 57c3aa2589

View File

@ -413,8 +413,10 @@ static int scan_request_send_next(struct scan_context *sc,
return -ENOMSG;
sc->start_cmd_id = scan_send_start(&cmd, scan_triggered, sc);
if (sc->start_cmd_id)
if (sc->start_cmd_id) {
sr->triggered = false;
return 0;
}
l_genl_msg_unref(cmd);
return -EIO;
@ -1207,8 +1209,6 @@ static bool scan_send_next_cmd(struct scan_context *sc)
int err;
if (sr && sr->triggered) {
sr->triggered = false;
err = scan_request_send_next(sc, sr);
if (!err)
return true;