policy: only trigger roam-sm after client becomes roamable
authorDavid Bauer <mail@david-bauer.net>
Wed, 17 Aug 2022 00:22:48 +0000 (02:22 +0200)
committerDavid Bauer <mail@david-bauer.net>
Wed, 17 Aug 2022 20:08:05 +0000 (22:08 +0200)
Onky trigger the roaming-sm after a client becomes roamable. This is the
case when a STA is connected for longer than roam_trigger_interval.

Signed-off-by: David Bauer <mail@david-bauer.net>
policy.c

index 1a96cfa09e01a2bf99a366104438d3c479273848..90a12a0ac539e00cada8c864e0d9f929c6989b49 100644 (file)
--- a/policy.c
+++ b/policy.c
@@ -400,6 +400,10 @@ usteer_local_node_roam_sm_active(struct sta_info *si, int min_signal)
        /* Skip on previous kick attempt */
        if (current_time - si->roam_kick < config.roam_trigger_interval)
                return false;
+
+       /* Skip if connection is established shorter than the trigger-interval */
+       if (current_time - si->connected_since < config.roam_trigger_interval)
+               return false;
        
        return true;
 }