summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-05-09 18:32:29 +0200
committerThomas Haller <thaller@redhat.com>2016-05-12 11:22:06 +0200
commit476d4f606a8ab16588573b15e43e98627e894ea7 (patch)
treed81a90afb48877e5c19331f6efd6a5a42b9afa2e
parent5693ba984354f604294c742a363a357656ffea82 (diff)
downloadNetworkManager-476d4f606a8ab16588573b15e43e98627e894ea7.tar.gz
device: re-read carrier-detect capability after bringing device up
https://bugzilla.gnome.org/show_bug.cgi?id=766179
-rw-r--r--src/devices/nm-device.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 8f3ecc12c7..178e02b73e 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -8653,6 +8653,7 @@ nm_device_bring_up (NMDevice *self, gboolean block, gboolean *no_firmware)
{
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
gboolean device_is_up = FALSE;
+ NMDeviceCapabilities capabilities;
g_return_val_if_fail (NM_IS_DEVICE (self), FALSE);
@@ -8688,6 +8689,13 @@ nm_device_bring_up (NMDevice *self, gboolean block, gboolean *no_firmware)
return FALSE;
}
+ /* some ethernet devices fail to report capabilities unless the device
+ * is up. Re-read the capabilities. */
+ capabilities = 0;
+ if (NM_DEVICE_GET_CLASS (self)->get_generic_capabilities)
+ capabilities |= NM_DEVICE_GET_CLASS (self)->get_generic_capabilities (self);
+ _add_capabilities (self, capabilities);
+
/* Devices that support carrier detect must be IFF_UP to report carrier
* changes; so after setting the device IFF_UP we must suppress startup
* complete (via a pending action) until either the carrier turns on, or