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/handshake.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ struct handshake_state {
bool supplicant_ocvc : 1;
bool ext_key_id_capable : 1;
bool force_default_ecc_group : 1;
bool disable_ht : 1;
bool disable_vht : 1;
bool disable_he : 1;
bool disable_eht : 1;
bool have_pmksa : 1;
union {
struct pmksa *pmksa;
Expand Down
16 changes: 16 additions & 0 deletions src/iwd.network.rst
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,22 @@ 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.
* - DisableHT
- Values: true, **false**

If enabled, forces HT (802.11n) off when associating with this network.
* - DisableVHT
- Values: true, **false**

If enabled, forces VHT (802.11ac) off when associating with this network.
* - DisableHE
- Values: true, **false**

If enabled, forces HE (802.11ax) off when associating with this network.
* - DisableEHT
- Values: true, **false**

If enabled, forces EHT (802.11be) off when associating with this network.

Network Authentication Settings
-------------------------------
Expand Down
20 changes: 20 additions & 0 deletions src/knownnetworks.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,26 @@ 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_HT, &b))
b = false;

config->disable_ht = b;

if (!l_settings_get_bool(settings, NET_DISABLE_VHT, &b))
b = false;

config->disable_vht = b;

if (!l_settings_get_bool(settings, NET_DISABLE_HE, &b))
b = false;

config->disable_he = b;

if (!l_settings_get_bool(settings, NET_DISABLE_EHT, &b))
b = false;

config->disable_eht = b;
}

void __network_info_init(struct network_info *info,
Expand Down
8 changes: 8 additions & 0 deletions src/knownnetworks.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
#define NET_TRANSITION_DISABLE SETTINGS, "TransitionDisable"
#define NET_TRANSITION_DISABLE_MODES SETTINGS, "DisabledTransitionModes"
#define NET_USE_DEFAULT_ECC_GROUP SETTINGS, "UseDefaultEccGroup"
#define NET_DISABLE_HT SETTINGS, "DisableHT"
#define NET_DISABLE_VHT SETTINGS, "DisableVHT"
#define NET_DISABLE_HE SETTINGS, "DisableHE"
#define NET_DISABLE_EHT SETTINGS, "DisableEHT"

enum security;
struct scan_freq_set;
Expand Down Expand Up @@ -82,6 +86,10 @@ struct network_config {
bool have_transition_disable : 1;
uint8_t transition_disable;
enum known_network_ecc_group ecc_group;
bool disable_ht:1;
bool disable_vht:1;
bool disable_he:1;
bool disable_eht:1;
};

struct network_info {
Expand Down
24 changes: 24 additions & 0 deletions src/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2647,6 +2647,18 @@ static struct l_genl_msg *netdev_build_cmd_connect(struct netdev *netdev,

l_genl_msg_append_attr(msg, NL80211_ATTR_SOCKET_OWNER, 0, NULL);

if (hs->disable_ht)
l_genl_msg_append_attr(msg, NL80211_ATTR_DISABLE_HT, 0, NULL);

if (hs->disable_vht)
l_genl_msg_append_attr(msg, NL80211_ATTR_DISABLE_VHT, 0, NULL);

if (hs->disable_he)
l_genl_msg_append_attr(msg, NL80211_ATTR_DISABLE_HE, 0, NULL);

if (hs->disable_eht)
l_genl_msg_append_attr(msg, NL80211_ATTR_DISABLE_EHT, 0, NULL);

if (is_rsn) {
nl80211_append_rsn_attributes(msg, hs);
c_iov = iov_ie_append(iov, n_iov, c_iov, hs->supplicant_ie,
Expand Down Expand Up @@ -2989,6 +3001,18 @@ static struct l_genl_msg *netdev_build_cmd_associate_common(
l_genl_msg_append_attr(msg, NL80211_ATTR_SSID, hs->ssid_len, hs->ssid);
l_genl_msg_append_attr(msg, NL80211_ATTR_SOCKET_OWNER, 0, NULL);

if (hs->disable_ht)
l_genl_msg_append_attr(msg, NL80211_ATTR_DISABLE_HT, 0, NULL);

if (hs->disable_vht)
l_genl_msg_append_attr(msg, NL80211_ATTR_DISABLE_VHT, 0, NULL);

if (hs->disable_he)
l_genl_msg_append_attr(msg, NL80211_ATTR_DISABLE_HE, 0, NULL);

if (hs->disable_eht)
l_genl_msg_append_attr(msg, NL80211_ATTR_DISABLE_EHT, 0, NULL);

if (is_rsn)
nl80211_append_rsn_attributes(msg, hs);

Expand Down
4 changes: 4 additions & 0 deletions src/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,10 @@ int network_handshake_setup(struct network *network, struct scan_bss *bss,
}

hs->force_default_ecc_group = network->force_default_ecc_group;
hs->disable_ht = info && info->config.disable_ht;
hs->disable_vht = info && info->config.disable_vht;
hs->disable_he = info && info->config.disable_he;
hs->disable_eht = info && info->config.disable_eht;

/*
* The randomization options in the provisioning file are dependent on
Expand Down
Loading