policy: move load-kick out of kick meta-function
authorDavid Bauer <mail@david-bauer.net>
Tue, 22 Feb 2022 22:08:10 +0000 (23:08 +0100)
committerDavid Bauer <mail@david-bauer.net>
Fri, 18 Mar 2022 20:35:44 +0000 (21:35 +0100)
Signed-off-by: David Bauer <mail@david-bauer.net>
policy.c

index 329852ece6fd2c7050e16d7ecc513dc2031886b2..3d07cedc587dee22f53a33a6ab57b46323b16995 100644 (file)
--- a/policy.c
+++ b/policy.c
@@ -463,8 +463,8 @@ usteer_local_node_snr_kick(struct usteer_local_node *ln)
        }
 }
 
-void
-usteer_local_node_kick(struct usteer_local_node *ln)
+static void
+usteer_local_node_load_kick(struct usteer_local_node *ln)
 {
        struct usteer_node *node = &ln->node;
        struct sta_info *kick1 = NULL, *kick2 = NULL;
@@ -475,9 +475,6 @@ usteer_local_node_kick(struct usteer_local_node *ln)
        };
        unsigned int min_count = DIV_ROUND_UP(config.load_kick_delay, config.local_sta_update);
 
-       usteer_local_node_roam_check(ln, &ev);
-       usteer_local_node_snr_kick(ln);
-
        if (!config.load_kick_enabled || !config.load_kick_threshold ||
            !config.load_kick_delay)
                return;
@@ -550,3 +547,16 @@ usteer_local_node_kick(struct usteer_local_node *ln)
 out:
        usteer_event(&ev);
 }
+
+
+void
+usteer_local_node_kick(struct usteer_local_node *ln)
+{
+       struct uevent ev = {
+               .node_local = &ln->node,
+       };
+
+       usteer_local_node_roam_check(ln, &ev);
+       usteer_local_node_snr_kick(ln);
+       usteer_local_node_load_kick(ln);
+}