iwd: Add the wifi.iwd.autoconnect setting
If this setting it true (or missing) we skip most of the D-Bus Disconnect() calls whoe purpose was to keep IWD's internal autoconnect mechanism always disabled. We use the IWD's Station.State property updates, and secrets requets through our IWD agent, to find out when IWD is trying to connect and create "assumed" activations on the NM side to mirror the IWD state. This is quite complicated due to the many possible combinations of NMDevice's state and IWD's state. A lot of them are "impossible" but we try to be careful to consider all the different possibilities. NM has a nice API for "assuming connections" but it's designed for slightly different use cases than what we have here and for now we created normal "managed"-type activations when assuming an IWD automatic connection.
This commit is contained in:

committed by
Thomas Haller

parent
43fd93d8f4
commit
dc0e31fb70
@@ -1090,8 +1090,25 @@ managed=1
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>wifi.iwd.autoconnect</varname></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If <literal>wifi.backend</literal> is <literal>iwd</literal>, setting this to
|
||||
<literal>false</literal> forces IWD's autoconnect mechanism to be disabled for
|
||||
this device and connections will only be initiated by NetworkManager whether
|
||||
commaned by a client or automatically. Leaving it <literal>true</literal> (default)
|
||||
stops NetworkManager from automatically initiating connections and allows
|
||||
IWD to use its network ranking and scanning logic to decide the best networks
|
||||
to autoconnect to next. Connections' <literal>autoconnect-priority</literal>,
|
||||
<literal>autoconnect-retries</literal> settings will be ignored. Other settings
|
||||
like <literal>permissions</literal> or <literal>multi-connect</literal> may interfere
|
||||
with IWD connection attempts.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry id="sriov-num-vfs">
|
||||
, <term><varname>sriov-num-vfs</varname></term>
|
||||
<term><varname>sriov-num-vfs</varname></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the number of virtual functions (VF) to enable
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -884,6 +884,7 @@ static const ConfigGroup config_groups[] = {
|
||||
NM_CONFIG_KEYFILE_KEY_DEVICE_SRIOV_NUM_VFS,
|
||||
NM_CONFIG_KEYFILE_KEY_DEVICE_WIFI_BACKEND,
|
||||
NM_CONFIG_KEYFILE_KEY_DEVICE_WIFI_SCAN_RAND_MAC_ADDRESS,
|
||||
NM_CONFIG_KEYFILE_KEY_DEVICE_WIFI_IWD_AUTOCONNECT,
|
||||
NM_CONFIG_KEYFILE_KEY_MATCH_DEVICE,
|
||||
NM_CONFIG_KEYFILE_KEY_STOP_MATCH, ),
|
||||
},
|
||||
|
@@ -86,6 +86,7 @@
|
||||
#define NM_CONFIG_KEYFILE_KEY_DEVICE_WIFI_BACKEND "wifi.backend"
|
||||
#define NM_CONFIG_KEYFILE_KEY_DEVICE_WIFI_SCAN_RAND_MAC_ADDRESS "wifi.scan-rand-mac-address"
|
||||
#define NM_CONFIG_KEYFILE_KEY_DEVICE_CARRIER_WAIT_TIMEOUT "carrier-wait-timeout"
|
||||
#define NM_CONFIG_KEYFILE_KEY_DEVICE_WIFI_IWD_AUTOCONNECT "wifi.iwd.autoconnect"
|
||||
|
||||
#define NM_CONFIG_KEYFILE_KEY_MATCH_DEVICE "match-device"
|
||||
#define NM_CONFIG_KEYFILE_KEY_STOP_MATCH "stop-match"
|
||||
|
Reference in New Issue
Block a user