diff --git a/src/NetworkManagerPolicy.c b/src/NetworkManagerPolicy.c index 6a2409ae8..cd10b493f 100644 --- a/src/NetworkManagerPolicy.c +++ b/src/NetworkManagerPolicy.c @@ -725,7 +725,7 @@ schedule_activate_check (NMPolicy *policy, NMDevice *device, guint delay_seconds if (state < NM_DEVICE_STATE_DISCONNECTED) return; - if (!nm_device_can_activate (device) || !nm_device_autoconnect_allowed (device)) + if (!nm_device_autoconnect_allowed (device)) return; for (iter = policy->pending_activation_checks; iter; iter = g_slist_next (iter)) { diff --git a/src/nm-device-ethernet.c b/src/nm-device-ethernet.c index 2d2e8fbbc..1282ff4c7 100644 --- a/src/nm-device-ethernet.c +++ b/src/nm-device-ethernet.c @@ -491,7 +491,7 @@ real_can_interrupt_activation (NMDevice *dev) } static gboolean -real_can_activate (NMDevice *dev) +real_is_available (NMDevice *dev) { NMDeviceEthernet *self = NM_DEVICE_ETHERNET (dev); @@ -1734,7 +1734,7 @@ nm_device_ethernet_class_init (NMDeviceEthernetClass *klass) parent_class->can_interrupt_activation = real_can_interrupt_activation; parent_class->update_hw_address = real_update_hw_address; parent_class->get_best_auto_connection = real_get_best_auto_connection; - parent_class->can_activate = real_can_activate; + parent_class->is_available = real_is_available; parent_class->connection_secrets_updated = real_connection_secrets_updated; parent_class->check_connection_compatible = real_check_connection_compatible; diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c index b4cdc4448..f2c9350fd 100644 --- a/src/nm-device-wifi.c +++ b/src/nm-device-wifi.c @@ -1130,7 +1130,7 @@ real_check_connection_compatible (NMDevice *device, } static gboolean -real_can_activate (NMDevice *dev) +real_is_available (NMDevice *dev) { NMDeviceWifi *self = NM_DEVICE_WIFI (dev); NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self); @@ -2253,7 +2253,7 @@ supplicant_iface_state_cb_handler (gpointer user_data) * available, transition to DISCONNECTED. */ if ( (nm_device_get_state (NM_DEVICE (self)) == NM_DEVICE_STATE_UNAVAILABLE) - && nm_device_can_activate (NM_DEVICE (self))) { + && nm_device_is_available (NM_DEVICE (self))) { nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE); } @@ -3533,7 +3533,7 @@ nm_device_wifi_class_init (NMDeviceWifiClass *klass) parent_class->take_down = real_take_down; parent_class->update_hw_address = real_update_hw_address; parent_class->get_best_auto_connection = real_get_best_auto_connection; - parent_class->can_activate = real_can_activate; + parent_class->is_available = real_is_available; parent_class->connection_secrets_updated = real_connection_secrets_updated; parent_class->check_connection_compatible = real_check_connection_compatible; diff --git a/src/nm-device.c b/src/nm-device.c index d5a1b55c1..ec08f5810 100644 --- a/src/nm-device.c +++ b/src/nm-device.c @@ -390,10 +390,10 @@ nm_device_get_act_request (NMDevice *self) gboolean -nm_device_can_activate (NMDevice *self) +nm_device_is_available (NMDevice *self) { - if (NM_DEVICE_GET_CLASS (self)->can_activate) - return NM_DEVICE_GET_CLASS (self)->can_activate (self); + if (NM_DEVICE_GET_CLASS (self)->is_available) + return NM_DEVICE_GET_CLASS (self)->is_available (self); return TRUE; } @@ -3077,7 +3077,7 @@ nm_device_state_changed (NMDevice *device, * we can't change states again from the state handler for a variety of * reasons. */ - if (nm_device_can_activate (device)) + if (nm_device_is_available (device)) priv->unavailable_to_disconnected_id = g_idle_add (unavailable_to_disconnected, device); break; case NM_DEVICE_STATE_ACTIVATED: diff --git a/src/nm-device.h b/src/nm-device.h index d06375cc6..c8f67dcc7 100644 --- a/src/nm-device.h +++ b/src/nm-device.h @@ -74,7 +74,7 @@ typedef struct { guint32 (* get_type_capabilities) (NMDevice *self); guint32 (* get_generic_capabilities) (NMDevice *self); - gboolean (* can_activate) (NMDevice *self); + gboolean (* is_available) (NMDevice *self); NMConnection * (* get_best_auto_connection) (NMDevice *self, GSList *connections, @@ -152,7 +152,7 @@ void * nm_device_get_system_config_data (NMDevice *dev); NMActRequest * nm_device_get_act_request (NMDevice *dev); -gboolean nm_device_can_activate (NMDevice *dev); +gboolean nm_device_is_available (NMDevice *dev); NMConnection * nm_device_get_best_auto_connection (NMDevice *dev, GSList *connections,