From: David Bauer Date: Wed, 23 Feb 2022 22:44:57 +0000 (+0100) Subject: policy: add steer-reject-timeout X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=439acc5d2bdd26dbfb63435269a2daeb26a21133;p=project%2Fusteer.git policy: add steer-reject-timeout Add a timeout in case a STA rejected a transition request. For this configurable timeframe, usteer will refrain from steering the client another time. Signed-off-by: David Bauer --- diff --git a/main.c b/main.c index f46ec78..6371c75 100644 --- a/main.c +++ b/main.c @@ -97,6 +97,8 @@ void usteer_init_defaults(void) config.initial_connect_delay = 0; config.remote_node_timeout = 10; + config.steer_reject_timeout = 60000; + config.roam_kick_delay = 10000; config.roam_process_timeout = 5 * 1000; config.roam_scan_tries = 3; diff --git a/openwrt/usteer/files/etc/config/usteer b/openwrt/usteer/files/etc/config/usteer index 38c0e77..8243f30 100644 --- a/openwrt/usteer/files/etc/config/usteer +++ b/openwrt/usteer/files/etc/config/usteer @@ -65,6 +65,9 @@ config usteer # Timeout after which a station with snr < min_snr will be kicked #option min_snr_kick_delay 5000 + # Timeout (ms) for which a client will not be steered after rejecting a BSS-transition-request + #option steer_reject_timeout 60000 + # Timeout (in ms) after which a association following a disassociation is not seen # as a roam #option roam_process_timeout 5000 diff --git a/openwrt/usteer/files/etc/init.d/usteer b/openwrt/usteer/files/etc/init.d/usteer index 22273ef..30c558e 100755 --- a/openwrt/usteer/files/etc/init.d/usteer +++ b/openwrt/usteer/files/etc/init.d/usteer @@ -81,7 +81,7 @@ uci_usteer() { load_balancing_threshold band_steering_threshold \ remote_update_interval remote_node_timeout\ min_connect_snr min_snr min_snr_kick_delay signal_diff_threshold \ - initial_connect_delay roam_process_timeout\ + initial_connect_delay steer_reject_timeout roam_process_timeout\ roam_kick_delay roam_scan_tries roam_scan_timeout \ roam_scan_snr roam_scan_interval \ roam_trigger_snr roam_trigger_interval \ diff --git a/policy.c b/policy.c index b99a361..6399a78 100644 --- a/policy.c +++ b/policy.c @@ -385,6 +385,7 @@ usteer_local_node_roam_check(struct usteer_local_node *ln, struct uevent *ev) list_for_each_entry(si, &ln->node.sta_info, node_list) { if (si->connected != STA_CONNECTED || si->signal >= min_signal || si->kick_time || + (si->bss_transition_response.status_code && current_time - si->bss_transition_response.timestamp < config.steer_reject_timeout) || current_time - si->roam_kick < config.roam_trigger_interval) { usteer_roam_set_state(si, ROAM_TRIGGER_IDLE, ev); continue; diff --git a/ubus.c b/ubus.c index 79401e0..a90e5ea 100644 --- a/ubus.c +++ b/ubus.c @@ -165,6 +165,7 @@ struct cfg_item { _cfg(I32, min_connect_snr), \ _cfg(I32, min_snr), \ _cfg(U32, min_snr_kick_delay), \ + _cfg(U32, steer_reject_timeout), \ _cfg(U32, roam_process_timeout), \ _cfg(I32, roam_scan_snr), \ _cfg(U32, roam_scan_tries), \ diff --git a/usteer.h b/usteer.h index 6a58659..dfc9544 100644 --- a/usteer.h +++ b/usteer.h @@ -174,6 +174,8 @@ struct usteer_config { int32_t min_connect_snr; uint32_t signal_diff_threshold; + uint32_t steer_reject_timeout; + int32_t roam_scan_snr; uint32_t roam_process_timeout;