Re: [PATCH] knownnetwroks: add DisableRoamingScan option
James Prestwood <[email protected]> Thu, 2 Jul 2026 12:58:31 -0700
| Newsgroups | dev.linux.lists.iwd |
|---|---|
| Message-ID | <[email protected]> |
Hi Matthew,
On 7/2/26 12:42 PM, Matthew Leach wrote:
typo in the title: knownnetwroks -> knownnetworks
> Add a new knownnetworks option: DisableRoamingScan. When set, and the
> STA is connected to that network, roaming scans are disabled.
>
> ---
> src/iwd.network.rst | 4 ++++
> src/knownnetworks.c | 5 +++++
> src/knownnetworks.h | 2 ++
> src/station.c | 8 ++++++++
> 4 files changed, 19 insertions(+)
>
> diff --git a/src/iwd.network.rst b/src/iwd.network.rst
> index 892c6eb8..7c50e76f 100644
> --- a/src/iwd.network.rst
> +++ b/src/iwd.network.rst
> @@ -181,6 +181,10 @@ The group ``[Settings]`` contains general settings.
> (WPA3 and OWE) if set true. If unset IWD will learn the capabilities of
> the network based on its initial association and retain that setting for
> the duration of its process lifetime.
> + * - DisableRoamingScan
> + - Values: true, **false**
> +
> + Whether roaming scans are inhibited while connected to this network.
>
> Network Authentication Settings
> -------------------------------
Denis might want the above split into a second patch, but you can wait
for his feedback on that.
Other than that LGTM.
> diff --git a/src/knownnetworks.c b/src/knownnetworks.c
> index 886f8145..c6d141a0 100644
> --- a/src/knownnetworks.c
> +++ b/src/knownnetworks.c
> @@ -135,6 +135,11 @@ void __network_config_parse(const struct l_settings *settings,
> NET_USE_DEFAULT_ECC_GROUP);
> } else
> config->ecc_group = KNOWN_NETWORK_ECC_GROUP_AUTO;
> +
> + if (!l_settings_get_bool(settings, NET_DISABLE_ROAMING_SCAN, &b))
> + b = false;
> +
> + config->disable_roaming_scan = b;
> }
>
> void __network_info_init(struct network_info *info,
> diff --git a/src/knownnetworks.h b/src/knownnetworks.h
> index a117ded5..c2fce4c2 100644
> --- a/src/knownnetworks.h
> +++ b/src/knownnetworks.h
> @@ -30,6 +30,7 @@
> #define NET_TRANSITION_DISABLE SETTINGS, "TransitionDisable"
> #define NET_TRANSITION_DISABLE_MODES SETTINGS, "DisabledTransitionModes"
> #define NET_USE_DEFAULT_ECC_GROUP SETTINGS, "UseDefaultEccGroup"
> +#define NET_DISABLE_ROAMING_SCAN SETTINGS, "DisableRoamingScan"
>
> enum security;
> struct scan_freq_set;
> @@ -78,6 +79,7 @@ struct network_config {
> bool is_autoconnectable:1;
> bool override_addr:1;
> bool always_random_addr:1;
> + bool disable_roaming_scan:1;
> uint8_t sta_addr[6];
> bool have_transition_disable : 1;
> uint8_t transition_disable;
> diff --git a/src/station.c b/src/station.c
> index 8fcf8c70..b94236fe 100644
> --- a/src/station.c
> +++ b/src/station.c
> @@ -3198,6 +3198,14 @@ static bool station_cannot_roam(struct station *station)
> if (wiphy_supports_firmware_roam(station->wiphy))
> return true;
>
> + if (station->connected_network) {
> + const struct network_info *info =
> + network_get_info(station->connected_network);
> +
> + if (info && info->config.disable_roaming_scan)
> + return true;
> + }
> +
> if (!l_settings_get_bool(config, "Scan", "DisableRoamingScan",
> &disabled))
> disabled = false;
>
> ---
> base-commit: d003d0e593323b3de427f01284ede81ba61e9dcc
> change-id: 20260702-knownnetworks-disable-roaming-option-6c83c27adb56
>
> Best regards,
> --
> Matt
>
>