From 742236f30b4a16f2390bcbd956e99569ff75a45e Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sun, 23 Jan 2022 17:27:09 +0100 Subject: [PATCH] policy: fix incurrect handling of scan-requests with disabled timeout The logic guarding entering of the SCAN state of the roam state-machine was incorrect in case the scan-timeout was not enabled. Signed-off-by: David Bauer --- policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policy.c b/policy.c index 47a720f..67c9c75 100644 --- a/policy.c +++ b/policy.c @@ -276,7 +276,7 @@ static void usteer_roam_sm_start_scan(struct sta_info *si, struct uevent *ev) { /* Start scanning in case we are not timeout-constrained or timeout has expired */ - if (config.roam_scan_timeout && + if (!config.roam_scan_timeout || current_time > si->roam_scan_timeout_start + config.roam_scan_timeout) { usteer_roam_set_state(si, ROAM_TRIGGER_SCAN, ev); return; -- 2.30.2