diff --git a/policy.c b/policy.c index f3881cf..329852e 100644 --- a/policy.c +++ b/policy.c @@ -64,8 +64,8 @@ has_better_load(struct usteer_node *node_cur, struct usteer_node *node_new) return !below_load_threshold(node_cur) && below_load_threshold(node_new); } -static bool -below_max_assoc(struct usteer_node *node) +bool +usteer_policy_node_below_max_assoc(struct usteer_node *node) { return !node->max_assoc || node->n_assoc < node->max_assoc; } @@ -91,7 +91,7 @@ is_better_candidate(struct sta_info *si_cur, struct sta_info *si_new) int new_signal = si_new->signal; uint32_t reasons = 0; - if (!below_max_assoc(new_node)) + if (!usteer_policy_node_below_max_assoc(new_node)) return 0; if (!over_min_signal(new_node, new_signal)) diff --git a/usteer.h b/usteer.h index e0c2891..49c3651 100644 --- a/usteer.h +++ b/usteer.h @@ -315,6 +315,8 @@ void usteer_local_node_kick(struct usteer_local_node *ln); int usteer_local_node_get_beacon_interval(struct usteer_local_node *ln); +bool usteer_policy_node_below_max_assoc(struct usteer_node *node); + void usteer_ubus_init(struct ubus_context *ctx); void usteer_ubus_kick_client(struct sta_info *si); int usteer_ubus_trigger_client_scan(struct sta_info *si);