diff options
| author | Michael Biebl <biebl@debian.org> | 2023-08-09 21:55:35 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2023-08-09 21:55:35 +0200 |
| commit | 05e4a733f2141995181a551854d5df929f084adf (patch) | |
| tree | 83bb937740a6667525ba0df046748ecaa829c269 /src/core/devices/wifi | |
| parent | 14b0f3a9dc9ea90d60a3b057350fd4d637dc021a (diff) | |
New upstream version 1.44.0 upstream/1.44.0
Diffstat (limited to 'src/core/devices/wifi')
| -rw-r--r-- | src/core/devices/wifi/nm-device-iwd-p2p.c | 7 | ||||
| -rw-r--r-- | src/core/devices/wifi/nm-device-iwd.c | 36 | ||||
| -rw-r--r-- | src/core/devices/wifi/nm-device-olpc-mesh.c | 2 | ||||
| -rw-r--r-- | src/core/devices/wifi/nm-device-wifi-p2p.c | 7 | ||||
| -rw-r--r-- | src/core/devices/wifi/nm-device-wifi.c | 15 |
5 files changed, 40 insertions, 27 deletions
diff --git a/src/core/devices/wifi/nm-device-iwd-p2p.c b/src/core/devices/wifi/nm-device-iwd-p2p.c index 40e38321..73fd4716 100644 --- a/src/core/devices/wifi/nm-device-iwd-p2p.c +++ b/src/core/devices/wifi/nm-device-iwd-p2p.c @@ -126,14 +126,17 @@ is_available(NMDevice *device, NMDeviceCheckDevAvailableFlags flags) } static gboolean -check_connection_compatible(NMDevice *device, NMConnection *connection, GError **error) +check_connection_compatible(NMDevice *device, + NMConnection *connection, + gboolean check_properties, + GError **error) { NMSettingWifiP2P *s_wifi_p2p; GBytes *wfd_ies; NMSettingIPConfig *s_ip; if (!NM_DEVICE_CLASS(nm_device_iwd_p2p_parent_class) - ->check_connection_compatible(device, connection, error)) + ->check_connection_compatible(device, connection, check_properties, error)) return FALSE; s_wifi_p2p = diff --git a/src/core/devices/wifi/nm-device-iwd.c b/src/core/devices/wifi/nm-device-iwd.c index e03227cd..47407a1e 100644 --- a/src/core/devices/wifi/nm-device-iwd.c +++ b/src/core/devices/wifi/nm-device-iwd.c @@ -159,7 +159,7 @@ ap_add_remove(NMDeviceIwd *self, } if (priv->enabled && !priv->iwd_autoconnect) - nm_device_emit_recheck_auto_activate(NM_DEVICE(self)); + nm_device_recheck_auto_activate_schedule(NM_DEVICE(self)); if (recheck_available_connections) nm_device_recheck_available_connections(NM_DEVICE(self)); @@ -208,7 +208,7 @@ remove_all_aps(NMDeviceIwd *self) ap_add_remove(self, FALSE, ap, FALSE); if (!priv->iwd_autoconnect) - nm_device_emit_recheck_auto_activate(NM_DEVICE(self)); + nm_device_recheck_auto_activate_schedule(NM_DEVICE(self)); nm_device_recheck_available_connections(NM_DEVICE(self)); } @@ -401,7 +401,7 @@ get_ordered_networks_cb(GObject *source, GAsyncResult *res, gpointer user_data) if (changed) { if (!priv->iwd_autoconnect) - nm_device_emit_recheck_auto_activate(NM_DEVICE(self)); + nm_device_recheck_auto_activate_schedule(NM_DEVICE(self)); nm_device_recheck_available_connections(NM_DEVICE(self)); } @@ -723,7 +723,10 @@ is_ap_known_network(NMIwdManager *manager, NMWifiAP *ap) } static gboolean -check_connection_compatible(NMDevice *device, NMConnection *connection, GError **error) +check_connection_compatible(NMDevice *device, + NMConnection *connection, + gboolean check_properties, + GError **error) { NMDeviceIwd *self = NM_DEVICE_IWD(device); NMDeviceIwdPrivate *priv = NM_DEVICE_IWD_GET_PRIVATE(self); @@ -739,7 +742,7 @@ check_connection_compatible(NMDevice *device, NMConnection *connection, GError * gsize ssid_len; if (!NM_DEVICE_CLASS(nm_device_iwd_parent_class) - ->check_connection_compatible(device, connection, error)) + ->check_connection_compatible(device, connection, check_properties, error)) return FALSE; s_wireless = nm_connection_get_setting_wireless(connection); @@ -1682,7 +1685,7 @@ failed: if (!priv->nm_autoconnect) { priv->nm_autoconnect = true; - nm_device_emit_recheck_auto_activate(device); + nm_device_recheck_auto_activate_schedule(device); } } g_variant_unref(value); @@ -2302,9 +2305,10 @@ act_stage2_config(NMDevice *device, NMDeviceStateReason *out_failure_reason) * to reset the retry count so we set no timeout. */ if (priv->iwd_autoconnect) { - NMSettingsConnection *sett_conn = nm_act_request_get_settings_connection(req); - - nm_settings_connection_autoconnect_retries_set(sett_conn, 0); + nm_manager_devcon_autoconnect_retries_set(nm_device_get_manager(device), + device, + nm_act_request_get_settings_connection(req), + 0); } /* With priv->iwd_autoconnect, if we're assuming a connection because @@ -2908,7 +2912,7 @@ state_changed(NMDeviceIwd *self, const char *new_state) if (!priv->iwd_autoconnect && NM_IN_STRSET(new_state, "disconnected")) { priv->nm_autoconnect = TRUE; if (!can_connect) - nm_device_emit_recheck_auto_activate(device); + nm_device_recheck_auto_activate_schedule(device); } } @@ -3104,12 +3108,12 @@ config_changed(NMConfig *config, NMDeviceIwdPrivate *priv = NM_DEVICE_IWD_GET_PRIVATE(self); gboolean old_iwd_ac = priv->iwd_autoconnect; - priv->iwd_autoconnect = - nm_config_data_get_device_config_boolean(config_data, - NM_CONFIG_KEYFILE_KEY_DEVICE_WIFI_IWD_AUTOCONNECT, - NM_DEVICE(self), - TRUE, - TRUE); + priv->iwd_autoconnect = nm_config_data_get_device_config_boolean_by_device( + config_data, + NM_CONFIG_KEYFILE_KEY_DEVICE_WIFI_IWD_AUTOCONNECT, + NM_DEVICE(self), + TRUE, + TRUE); if (old_iwd_ac != priv->iwd_autoconnect && priv->dbus_station_proxy && !priv->current_ap) { gs_unref_variant GVariant *value = NULL; diff --git a/src/core/devices/wifi/nm-device-olpc-mesh.c b/src/core/devices/wifi/nm-device-olpc-mesh.c index 4705f75c..436c7847 100644 --- a/src/core/devices/wifi/nm-device-olpc-mesh.c +++ b/src/core/devices/wifi/nm-device-olpc-mesh.c @@ -270,7 +270,7 @@ companion_state_changed_cb(NMDeviceWifi *companion, NMDeviceState self_state = nm_device_get_state(NM_DEVICE(self)); if (old_state > NM_DEVICE_STATE_DISCONNECTED && state <= NM_DEVICE_STATE_DISCONNECTED) { - nm_device_emit_recheck_auto_activate(NM_DEVICE(self)); + nm_device_recheck_auto_activate_schedule(NM_DEVICE(self)); } if (self_state < NM_DEVICE_STATE_PREPARE || self_state > NM_DEVICE_STATE_ACTIVATED diff --git a/src/core/devices/wifi/nm-device-wifi-p2p.c b/src/core/devices/wifi/nm-device-wifi-p2p.c index 424464c1..fa8cb8fa 100644 --- a/src/core/devices/wifi/nm-device-wifi-p2p.c +++ b/src/core/devices/wifi/nm-device-wifi-p2p.c @@ -233,10 +233,13 @@ is_available(NMDevice *device, NMDeviceCheckDevAvailableFlags flags) } static gboolean -check_connection_compatible(NMDevice *device, NMConnection *connection, GError **error) +check_connection_compatible(NMDevice *device, + NMConnection *connection, + gboolean check_properties, + GError **error) { if (!NM_DEVICE_CLASS(nm_device_wifi_p2p_parent_class) - ->check_connection_compatible(device, connection, error)) + ->check_connection_compatible(device, connection, check_properties, error)) return FALSE; /* TODO: Allow limitting the interface using the HW-address? */ diff --git a/src/core/devices/wifi/nm-device-wifi.c b/src/core/devices/wifi/nm-device-wifi.c index 03625f8d..43772834 100644 --- a/src/core/devices/wifi/nm-device-wifi.c +++ b/src/core/devices/wifi/nm-device-wifi.c @@ -483,7 +483,7 @@ _scan_notify_is_scanning(NMDeviceWifi *self) if (!_scan_is_scanning_eval(priv)) { if (state <= NM_DEVICE_STATE_DISCONNECTED || state > NM_DEVICE_STATE_ACTIVATED) - nm_device_emit_recheck_auto_activate(NM_DEVICE(self)); + nm_device_recheck_auto_activate_schedule(NM_DEVICE(self)); nm_device_remove_pending_action(NM_DEVICE(self), NM_PENDING_ACTION_WIFI_SCAN, FALSE); } @@ -843,7 +843,7 @@ ap_add_remove(NMDeviceWifi *self, nm_dbus_object_clear_and_unexport(&ap); } - nm_device_emit_recheck_auto_activate(NM_DEVICE(self)); + nm_device_recheck_auto_activate_schedule(NM_DEVICE(self)); if (recheck_available_connections) nm_device_recheck_available_connections(NM_DEVICE(self)); } @@ -981,7 +981,10 @@ deactivate_reset_hw_addr(NMDevice *device) } static gboolean -check_connection_compatible(NMDevice *device, NMConnection *connection, GError **error) +check_connection_compatible(NMDevice *device, + NMConnection *connection, + gboolean check_properties, + GError **error) { NMDeviceWifi *self = NM_DEVICE_WIFI(device); NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE(self); @@ -995,7 +998,7 @@ check_connection_compatible(NMDevice *device, NMConnection *connection, GError * const char *key_mgmt; if (!NM_DEVICE_CLASS(nm_device_wifi_parent_class) - ->check_connection_compatible(device, connection, error)) + ->check_connection_compatible(device, connection, check_properties, error)) return FALSE; s_wireless = nm_connection_get_setting_wireless(connection); @@ -1395,7 +1398,7 @@ _hw_addr_set_scanning(NMDeviceWifi *self, gboolean do_reset) priv = NM_DEVICE_WIFI_GET_PRIVATE(self); - randomize = nm_config_data_get_device_config_boolean( + randomize = nm_config_data_get_device_config_boolean_by_device( NM_CONFIG_GET_DATA, NM_CONFIG_KEYFILE_KEY_DEVICE_WIFI_SCAN_RAND_MAC_ADDRESS, device, @@ -1428,7 +1431,7 @@ _hw_addr_set_scanning(NMDeviceWifi *self, gboolean do_reset) * a new one.*/ priv->hw_addr_scan_expire = now + SCAN_RAND_MAC_ADDRESS_EXPIRE_SEC; - generate_mac_address_mask = nm_config_data_get_device_config( + generate_mac_address_mask = nm_config_data_get_device_config_by_device( NM_CONFIG_GET_DATA, NM_CONFIG_KEYFILE_KEY_DEVICE_WIFI_SCAN_GENERATE_MAC_ADDRESS_MASK, device, |