summaryrefslogtreecommitdiff
path: root/src/devices/wifi
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2014-09-24 16:58:07 -0500
committerThomas Haller <thaller@redhat.com>2015-12-04 12:16:40 +0100
commit4dbaac4ba24ebc8b257fffe5197cc8e362804a58 (patch)
treeda91c97f54716e167e7a094f7fa872cb12b0f4e4 /src/devices/wifi
parentb7eb622c247656595a04aa6a32ef17ba4cf15a2a (diff)
downloadNetworkManager-4dbaac4ba24ebc8b257fffe5197cc8e362804a58.tar.gz
core: create devices first and realize them later
Unrealized devices aren't backed by kernel resources and so won't know all of their attributes. That means three things: 1) they must update their attributes when they become realized 2) they must clear those attributes when unrealized 3) they must be looser in checking compatible connections until they are realized This requires that the setup() function be split into two parts, start & finish, because finish must be run after add_device() Also, we can simplify whether to pay attention to 'recheck-assume', which is now dependent on priv->is_nm_owned, because the only case where NM should *not* listen for the 'recheck-assume' signal is when the device is a software device created by NM itself. That logic was previously spread across the callers of add_device() but is now consolidated into nm-manager.c::device_realized() and nm-device.c::nm_device_create_and_realize().
Diffstat (limited to 'src/devices/wifi')
-rw-r--r--src/devices/wifi/nm-device-wifi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c
index 70bb6d628a..bb73e8c456 100644
--- a/src/devices/wifi/nm-device-wifi.c
+++ b/src/devices/wifi/nm-device-wifi.c
@@ -424,9 +424,9 @@ periodic_update_cb (gpointer user_data)
}
static void
-setup (NMDevice *device, NMPlatformLink *plink)
+setup_start (NMDevice *device, NMPlatformLink *plink)
{
- NM_DEVICE_CLASS (nm_device_wifi_parent_class)->setup (device, plink);
+ NM_DEVICE_CLASS (nm_device_wifi_parent_class)->setup_start (device, plink);
g_object_notify (G_OBJECT (device), NM_DEVICE_WIFI_PERMANENT_HW_ADDRESS);
}
@@ -3040,7 +3040,7 @@ nm_device_wifi_class_init (NMDeviceWifiClass *klass)
object_class->dispose = dispose;
object_class->finalize = finalize;
- parent_class->setup = setup;
+ parent_class->setup_start = setup_start;
parent_class->bring_up = bring_up;
parent_class->can_auto_connect = can_auto_connect;
parent_class->is_available = is_available;