diff options
author | Thomas Haller <thaller@redhat.com> | 2021-08-30 14:48:53 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2021-09-06 10:07:16 +0200 |
commit | 78b3711522317a4b56def1d0b50b7c98ef1d2e91 (patch) | |
tree | ea2db417928edaf30661c919940a0a1253f22196 | |
parent | bd92df3e563277bb04cee663420c739c3f0d999d (diff) | |
download | NetworkManager-th/ethtool-autoneg-fixes.tar.gz |
core: always reset ethtool autoneg/speed to fix reactivationth/ethtool-autoneg-fixes
The check whether the current setting are already as expected are wrong.
The reason is that nm_platform_ethtool_set_link_settings() also sets
the announced ethernet modes, but nm_platform_ethtool_get_link_settings()
does not give them.
That means, we cannot check whether the current link configuration is
the same, because the getter doesn't give that information.
Consequently, we must not skip the setting on the assumption that
there is nothing to change.
This bug has bad effects. If the device is currently activated with ethtool
option set, then re-activating the profile will result in wrongly
skipping the update.
-rw-r--r-- | src/core/devices/nm-device-ethernet.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/core/devices/nm-device-ethernet.c b/src/core/devices/nm-device-ethernet.c index 20f298f960..667ea9b927 100644 --- a/src/core/devices/nm-device-ethernet.c +++ b/src/core/devices/nm-device-ethernet.c @@ -924,12 +924,6 @@ link_negotiation_set(NMDevice *device) return; } - /* If link negotiation setting are already in place do nothing and return with success */ - if (!!autoneg == !!link_autoneg && speed == link_speed && duplex == link_duplex) { - _LOGD(LOGD_DEVICE, "set-link: link negotiation is already configured"); - return; - } - if (autoneg && !speed && !duplex) _LOGD(LOGD_DEVICE, "set-link: configure auto-negotiation"); else { |