[RESEND PATCH usteer v3 5/9] 802.11 MBO - added reassoc_delay and reason code

Nils Hendrik Rottgardt n.rottgardt at gmail.com
Tue Dec 3 12:55:28 PST 2024


- ubus: add reason code to bss_transition request (actually static only)
- ubus: add reassociation delay to let the client know how long it should stay at the new AP dereived from station block timeout.
- main: add config option for reassociation delay

Signed-off-by: Nils Hendrik Rottgardt <n.rottgardt at gmail.com>
---
 main.c                                 | 1 +
 openwrt/usteer/files/etc/config/usteer | 3 +++
 ubus.c                                 | 5 +++++
 usteer.h                               | 1 +
 4 files changed, 10 insertions(+)

diff --git a/main.c b/main.c
index c796c3c..69e05ae 100644
--- a/main.c
+++ b/main.c
@@ -96,6 +96,7 @@ void usteer_init_defaults(void)
 	config.remote_update_interval = 1000;
 	config.initial_connect_delay = 0;
 	config.remote_node_timeout = 10;
+	config.reassociation_delay = 30;
 	config.aggressive_all = false;
 
 	config.steer_reject_timeout = 60000;
diff --git a/openwrt/usteer/files/etc/config/usteer b/openwrt/usteer/files/etc/config/usteer
index 7ef365c..9d343e7 100644
--- a/openwrt/usteer/files/etc/config/usteer
+++ b/openwrt/usteer/files/etc/config/usteer
@@ -73,6 +73,9 @@ config usteer
 	# Timeout (ms) for which a client will not be steered after rejecting a BSS-transition-request
 	#option steer_reject_timeout 60000
 
+	# Timeout (s "1024ms") a station is requested to avoid reassociation after bss transition
+	#option reassociation_delay 30
+	
 	# Use aggressive roaming to push clients to another AP for all stations (0/1)
 	#option aggressive_all 0
 
diff --git a/ubus.c b/ubus.c
index 856ea3f..bcd0ef1 100644
--- a/ubus.c
+++ b/ubus.c
@@ -689,6 +689,9 @@ int usteer_ubus_bss_transition_request(struct sta_info *si,
 	}
 	blobmsg_add_u8(&b, "abridged", abridged);
 	blobmsg_add_u32(&b, "validity_period", validity_period);
+	blobmsg_add_u32(&b, "mbo_reason", 5);
+	blobmsg_add_u32(&b, "reassoc_delay", config.reassociation_delay);
+
 	if (!target_node) {
 		// Add all known neighbors if no specific target set
 		MSG(VERBOSE, "ROAMING requested for sta=" MAC_ADDR_FMT " without target\n", MAC_ADDR_DATA(si->sta->addr));
@@ -720,6 +723,8 @@ int usteer_ubus_band_steering_request(struct sta_info *si,
 	}
 	blobmsg_add_u8(&b, "abridged", abridged);
 	blobmsg_add_u32(&b, "validity_period", validity_period);
+	blobmsg_add_u32(&b, "mbo_reason", 5);
+	blobmsg_add_u32(&b, "reassoc_delay", config.reassociation_delay);
 
 	c = blobmsg_open_array(&b, "neighbors");
 	for_each_local_node(node) {
diff --git a/usteer.h b/usteer.h
index 680981f..c9391bb 100644
--- a/usteer.h
+++ b/usteer.h
@@ -173,6 +173,7 @@ struct usteer_config {
 	bool aggressive_all;
 	struct blob_attr *aggressive_mac_list;
 	uint32_t aggressive_disassoc_timer;
+	uint32_t reassociation_delay;
 
 	int32_t min_snr;
 	uint32_t min_snr_kick_delay;
-- 
2.39.5




More information about the openwrt-devel mailing list