policy: make steering ability evaluation uniform
Usteer imposes minimum intervals for steering actions in order to avoid creating endless roam-kick loops due to the decentral aspect of usteer. Make these basic limits to roamsteering usable across band-steering and signal-based roam-steering. Signed-off-by: David Bauer <mail@david-bauer.net>
This commit is contained in:
20
policy.c
20
policy.c
@@ -378,17 +378,12 @@ usteer_roam_trigger_sm(struct usteer_local_node *ln, struct sta_info *si)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool
|
||||
usteer_local_node_roam_sm_active(struct sta_info *si, int min_signal)
|
||||
bool usteer_policy_can_perform_roam(struct sta_info *si)
|
||||
{
|
||||
/* Only trigger for connected STAs */
|
||||
if (si->connected != STA_CONNECTED)
|
||||
return false;
|
||||
|
||||
/* Signal has to be below scan / roam threshold */
|
||||
if (si->signal >= min_signal)
|
||||
return false;
|
||||
|
||||
/* Skip on pending kick */
|
||||
if (si->kick_time)
|
||||
return false;
|
||||
@@ -408,6 +403,19 @@ usteer_local_node_roam_sm_active(struct sta_info *si, int min_signal)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
usteer_local_node_roam_sm_active(struct sta_info *si, int min_signal)
|
||||
{
|
||||
if (!usteer_policy_can_perform_roam(si))
|
||||
return false;
|
||||
|
||||
/* Signal has to be below scan / roam threshold */
|
||||
if (si->signal >= min_signal)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
usteer_local_node_roam_check(struct usteer_local_node *ln, struct uevent *ev)
|
||||
{
|
||||
|
Reference in New Issue
Block a user