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:
@@ -81,7 +81,8 @@ void usteer_band_steering_perform_steer(struct usteer_local_node *ln)
|
|||||||
ln->band_steering_interval = 0;
|
ln->band_steering_interval = 0;
|
||||||
|
|
||||||
list_for_each_entry(si, &ln->node.sta_info, node_list) {
|
list_for_each_entry(si, &ln->node.sta_info, node_list) {
|
||||||
if (si->connected != STA_CONNECTED)
|
/* Check if client is eligable to be steerd */
|
||||||
|
if (!usteer_policy_can_perform_roam(si))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Skip clients with insufficient SNR-state */
|
/* Skip clients with insufficient SNR-state */
|
||||||
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
bool usteer_policy_can_perform_roam(struct sta_info *si)
|
||||||
usteer_local_node_roam_sm_active(struct sta_info *si, int min_signal)
|
|
||||||
{
|
{
|
||||||
/* Only trigger for connected STAs */
|
/* Only trigger for connected STAs */
|
||||||
if (si->connected != STA_CONNECTED)
|
if (si->connected != STA_CONNECTED)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Signal has to be below scan / roam threshold */
|
|
||||||
if (si->signal >= min_signal)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
/* Skip on pending kick */
|
/* Skip on pending kick */
|
||||||
if (si->kick_time)
|
if (si->kick_time)
|
||||||
return false;
|
return false;
|
||||||
@@ -408,6 +403,19 @@ usteer_local_node_roam_sm_active(struct sta_info *si, int min_signal)
|
|||||||
return true;
|
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
|
static void
|
||||||
usteer_local_node_roam_check(struct usteer_local_node *ln, struct uevent *ev)
|
usteer_local_node_roam_check(struct usteer_local_node *ln, struct uevent *ev)
|
||||||
{
|
{
|
||||||
|
1
usteer.h
1
usteer.h
@@ -327,6 +327,7 @@ void usteer_local_node_kick(struct usteer_local_node *ln);
|
|||||||
int usteer_local_node_get_beacon_interval(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);
|
bool usteer_policy_node_below_max_assoc(struct usteer_node *node);
|
||||||
|
bool usteer_policy_can_perform_roam(struct sta_info *si);
|
||||||
|
|
||||||
void usteer_band_steering_perform_steer(struct usteer_local_node *ln);
|
void usteer_band_steering_perform_steer(struct usteer_local_node *ln);
|
||||||
void usteer_band_steering_sta_update(struct sta_info *si);
|
void usteer_band_steering_sta_update(struct sta_info *si);
|
||||||
|
Reference in New Issue
Block a user