mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 01:10:08 +01:00
device: re-read carrier-detect capability after bringing device up
https://bugzilla.gnome.org/show_bug.cgi?id=766179
This commit is contained in:
parent
5693ba9843
commit
476d4f606a
1 changed files with 8 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue