Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/iwd.network.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------------------------------
Expand Down
5 changes: 5 additions & 0 deletions src/knownnetworks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions src/knownnetworks.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 8 additions & 0 deletions src/station.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading