diff mbox series

[1/6] doc: Document new BSS affinity method calls

Message ID 20240729124410.1763549-1-prestwoj@gmail.com (mailing list archive)
State New
Headers show
Series [1/6] doc: Document new BSS affinity method calls | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-alpine-ci-fetch success Fetch PR
prestwoj/iwd-alpine-ci-setupell fail Setup ELL - make FAIL: writing RSA key writing RSA key writing RSA key writing RSA key writing RSA key unit/test-rtnl.c: In function 'test_address': unit/test-rtnl.c:282:13: error: offset '2305843009213693948' outside bounds of constant string [-Werror=array-bounds] 282 | static void test_address(const void *data) | ^~~~~~~~~~~~ unit/test-rtnl.c:213:36: note: 'address' declared here 213 | static const struct l_rtnl_address address = { | ^~~~~~~ cc1: all warnings being treated as errors make[1]: *** [Makefile:2030: unit/test-rtnl.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1307: all] Error 2
prestwoj/iwd-alpine-ci-makedistcheck pending makedistcheck SKIP
prestwoj/iwd-alpine-ci-build pending build SKIP
prestwoj/iwd-alpine-ci-incremental_build pending incremental_build SKIP
prestwoj/iwd-alpine-ci-makecheckvalgrind pending makecheckvalgrind SKIP
prestwoj/iwd-alpine-ci-makecheck pending makecheck SKIP
prestwoj/iwd-ci-fetch success Fetch PR
prestwoj/iwd-ci-gitlint success GitLint
prestwoj/iwd-ci-setupell success Prep - Setup ELL
prestwoj/iwd-ci-makedistcheck fail Make Distcheck Make FAIL: ../../src/netdev.c: In function ‘netdev_get_link’: ../../src/netdev.c:6154:56: warning: passing argument 2 of ‘l_netlink_send’ makes pointer from integer without a cast [-Wint-conversion] 6154 | netdev->get_link_cmd_id = l_netlink_send(rtnl, RTM_GETLINK, 0, rtmmsg, | ^~~~~~~~~~~ | | | int In file included from ./ell/ell.h:17, from ../../src/netdev.c:40: ../../ell/netlink.h:34:59: note: expected ‘struct l_netlink_message *’ but argument is of type ‘int’ 34 | struct l_netlink_message *message, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ ../../src/netdev.c:6155:49: warning: passing argument 5 of ‘l_netlink_send’ makes pointer from integer without a cast [-Wint-conversion] 6155 | bufsize, netdev_getlink_cb, | ^~~~~~~ | | | size_t {aka long unsigned int} In file included from ./ell/ell.h:17, from ../../src/netdev.c:40: ../../ell/netlink.h:37:58: note: expected ‘l_netlink_destroy_func_t’ {aka ‘void (*)(void *)’} but argument is of type ‘size_t’ {aka ‘long unsigned int’} 37 | l_netlink_destroy_func_t destroy); | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ ../../src/netdev.c:6154:35: error: too many arguments to function ‘l_netlink_send’ 6154 | netdev->get_link_cmd_id = l_netlink_send(rtnl, RTM_GETLINK, 0, rtmmsg, | ^~~~~~~~~~~~~~ In file included from ./ell/ell.h:17, from ../../src/netdev.c:40: ../../ell/netlink.h:33:14: note: declared here 33 | unsigned int l_netlink_send(struct l_netlink *netlink, | ^~~~~~~~~~~~~~ make[2]: *** [Makefile:2578: src/netdev.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [Makefile:1741: all] Error 2 make: *** [Makefile:3362: distcheck] Error 1
prestwoj/iwd-ci-build success Build - Configure
prestwoj/iwd-ci-makecheckvalgrind fail Make FAIL: src/netdev.c: In function ‘netdev_get_link’: src/netdev.c:6154:56: error: passing argument 2 of ‘l_netlink_send’ makes pointer from integer without a cast [-Werror=int-conversion] 6154 | netdev->get_link_cmd_id = l_netlink_send(rtnl, RTM_GETLINK, 0, rtmmsg, | ^~~~~~~~~~~ | | | int In file included from ./ell/ell.h:17, from src/netdev.c:40: ./ell/netlink.h:34:59: note: expected ‘struct l_netlink_message *’ but argument is of type ‘int’ 34 | struct l_netlink_message *message, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ src/netdev.c:6155:49: error: passing argument 5 of ‘l_netlink_send’ makes pointer from integer without a cast [-Werror=int-conversion] 6155 | bufsize, netdev_getlink_cb, | ^~~~~~~ | | | size_t {aka long unsigned int} In file included from ./ell/ell.h:17, from src/netdev.c:40: ./ell/netlink.h:37:58: note: expected ‘l_netlink_destroy_func_t’ {aka ‘void (*)(void *)’} but argument is of type ‘size_t’ {aka ‘long unsigned int’} 37 | l_netlink_destroy_func_t destroy); | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ src/netdev.c:6154:35: error: too many arguments to function ‘l_netlink_send’ 6154 | netdev->get_link_cmd_id = l_netlink_send(rtnl, RTM_GETLINK, 0, rtmmsg, | ^~~~~~~~~~~~~~ In file included from ./ell/ell.h:17, from src/netdev.c:40: ./ell/netlink.h:33:14: note: declared here 33 | unsigned int l_netlink_send(struct l_netlink *netlink, | ^~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[1]: *** [Makefile:2578: src/netdev.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1741: all] Error 2
prestwoj/iwd-ci-testrunner pending testrunner SKIP
prestwoj/iwd-ci-makecheck pending makecheck SKIP
prestwoj/iwd-ci-clang fail Clang IWD - make FAIL: src/netdev.c:6155:16: error: too many arguments to function call, expected 5, have 8 bufsize, netdev_getlink_cb, ^~~~~~~~~~~~~~~~~~ ./ell/netlink.h:33:14: note: 'l_netlink_send' declared here unsigned int l_netlink_send(struct l_netlink *netlink, ^ 1 error generated. make[1]: *** [Makefile:2578: src/netdev.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1741: all] Error 2
prestwoj/iwd-ci-incremental_build fail Make FAIL (patch 0): src/netdev.c: In function ‘netdev_get_link’: src/netdev.c:6107:56: error: passing argument 2 of ‘l_netlink_send’ makes pointer from integer without a cast [-Werror=int-conversion] 6107 | netdev->get_link_cmd_id = l_netlink_send(rtnl, RTM_GETLINK, 0, rtmmsg, | ^~~~~~~~~~~ | | | int In file included from ./ell/ell.h:17, from src/netdev.c:40: ./ell/netlink.h:34:59: note: expected ‘struct l_netlink_message *’ but argument is of type ‘int’ 34 | struct l_netlink_message *message, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ src/netdev.c:6108:49: error: passing argument 5 of ‘l_netlink_send’ makes pointer from integer without a cast [-Werror=int-conversion] 6108 | bufsize, netdev_getlink_cb, | ^~~~~~~ | | | size_t {aka long unsigned int} In file included from ./ell/ell.h:17, from src/netdev.c:40: ./ell/netlink.h:37:58: note: expected ‘l_netlink_destroy_func_t’ {aka ‘void (*)(void *)’} but argument is of type ‘size_t’ {aka ‘long unsigned int’} 37 | l_netlink_destroy_func_t destroy); | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ src/netdev.c:6107:35: error: too many arguments to function ‘l_netlink_send’ 6107 | netdev->get_link_cmd_id = l_netlink_send(rtnl, RTM_GETLINK, 0, rtmmsg, | ^~~~~~~~~~~~~~ In file included from ./ell/ell.h:17, from src/netdev.c:40: ./ell/netlink.h:33:14: note: declared here 33 | unsigned int l_netlink_send(struct l_netlink *netlink, | ^~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[1]: *** [Makefile:2578: src/netdev.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1741: all] Error 2

Commit Message

James Prestwood July 29, 2024, 12:44 p.m. UTC
This documents new DBus methods that expose a bit more control to how
IWD roams. The new methods are:

SetConnectedBssAffinity()
UnsetConnectedBssAffinity()

Setting the affinity on the connected BSS effectively "locks" IWD to
that BSS (except at critical RSSI levels, explained below). This can
be useful for clients that have access to more information about the
environment than IWD. For example, if a client is stationary there
is likely no point in trying to roam until it has moved elsewhere.

A new main.conf option would also be added:

[General].CriticalRoamThreshold

This would be the new roam threshold set after
SetConnectedBssAffinity() is called. If the RSSI continues to drop
below this level IWD would (attempt to) roam.
---
 doc/station-api.txt | 22 ++++++++++++++++++++++
 src/iwd.config.rst  |  8 ++++++++
 2 files changed, 30 insertions(+)
diff mbox series

Patch

diff --git a/doc/station-api.txt b/doc/station-api.txt
index 05dd137e..3dc2376b 100644
--- a/doc/station-api.txt
+++ b/doc/station-api.txt
@@ -135,6 +135,28 @@  Methods		void Scan()
 			Possible Errors: [service].Error.InvalidArguments
 					 [service].Error.NotFound
 
+		void SetConnectedBssAffinity()
+
+			Sets a high affinity/preference to the currently
+			connected BSS. Specifically, calling this will reduce
+			the roam threshold down to a critical level set by
+			[General].CriticalRoamThreshold. This effectively locks
+			the client onto the current BSS unless the signal
+			quality becomes extremely poor.
+
+			If IWD roams or disconnects the affinity will be reset.
+
+			Possible Errors: net.connman.iwd.NotConnected
+
+		void UnsetConnectedBssAffinity()
+
+			Unset a prior call to SetConnectedBssAffinity(). This
+			moves the roaming threshold back up to the default level
+			(RoamThreshold/RoamThreshold5GHz).
+
+			Possible Errors: net.connman.iwd.NotConnected
+					 net.connman.iwd.NotConfigured
+
 Properties	string State [readonly]
 
 			Reflects the general network connection state.  One of:
diff --git a/src/iwd.config.rst b/src/iwd.config.rst
index d9c94e01..31f43bc6 100644
--- a/src/iwd.config.rst
+++ b/src/iwd.config.rst
@@ -130,6 +130,14 @@  The group ``[General]`` contains general settings.
        This value can be used to control how aggressively **iwd** roams when
        connected to a 5GHz access point.
 
+   * - CriticalRoamThreshold
+     - Value: rssi dBm value, from -100 to 1, default: **-82**
+
+       The threshold at which IWD will roam regardless of the affinity set to
+       the current BSS. This is only used if the SetConnectedBssAffinity() DBus
+       method is called, at which point this value becomes the new roam
+       threshold.
+
    * - RoamRetryInterval
      - Value: unsigned int value in seconds (default: **60**)