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:14:13 +0200
commit9e135a611002b2bee89de18272ae8ca2ecc36513 (patch)
tree0ea97609fffc5019f38f8b810bc04e02964251e4
parent061215dbe9a6c9791c17b7600166b05e08c8e083 (diff)
downloadNetworkManager-9e135a611002b2bee89de18272ae8ca2ecc36513.tar.gz
device: re-read carrier-detect capability after bringing device upth/device-carrier-cap-bgo766179
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