From 5be681931f2de1a7c8865a2c291fff064ab0d7ce Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Mon, 27 Jun 2022 16:16:21 +0300 Subject: [PATCH] policy: allow disabling load balancing Load-balancing only makes sense where multiple APs are deployed in the same area. Enabling load-balancing between APs in different rooms might steer clients to APs with a much lower signal strength, resulting in lower data rates and inefficient use of airtime. Allow disabling load balancing by setting the threshold to 0. Signed-off-by: Stijn Tintel Acked-by: David Bauer --- policy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/policy.c b/policy.c index 8155e24..6738c99 100644 --- a/policy.c +++ b/policy.c @@ -29,6 +29,9 @@ below_assoc_threshold(struct usteer_node *node_cur, struct usteer_node *node_new bool ref_5g = node_cur->freq > 4000; bool node_5g = node_new->freq > 4000; + if (!config.load_balancing_threshold) + return false; + if (ref_5g && !node_5g) n_assoc_new += config.band_steering_threshold; else if (!ref_5g && node_5g) -- 2.30.2