mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 15:20:08 +01:00
core: during reset of ethtool autoneg enable all modes
This commit is contained in:
parent
ea2b965ac2
commit
d5f062cecd
1 changed files with 14 additions and 3 deletions
|
|
@ -943,9 +943,20 @@ link_negotiation_set(NMDevice *device)
|
|||
if (!priv->ethtool_prev_set) {
|
||||
/* remember the values we had before setting it. */
|
||||
priv->ethtool_prev_autoneg = link_autoneg;
|
||||
priv->ethtool_prev_speed = link_speed;
|
||||
priv->ethtool_prev_duplex = link_duplex;
|
||||
priv->ethtool_prev_set = TRUE;
|
||||
if (link_autoneg) {
|
||||
/* with autoneg, we only support advertising one speed/duplex. Likewise
|
||||
* our nm_platform_ethtool_get_link_settings() can only return the current
|
||||
* speed/duplex, but not all the modes that we were advertising.
|
||||
*
|
||||
* Do the best we can do: remember to re-enable autoneg, but don't restrict
|
||||
* the mode. */
|
||||
priv->ethtool_prev_speed = 0;
|
||||
priv->ethtool_prev_duplex = NM_PLATFORM_LINK_DUPLEX_UNKNOWN;
|
||||
} else {
|
||||
priv->ethtool_prev_speed = link_speed;
|
||||
priv->ethtool_prev_duplex = link_duplex;
|
||||
}
|
||||
priv->ethtool_prev_set = TRUE;
|
||||
}
|
||||
|
||||
if (!nm_platform_ethtool_set_link_settings(nm_device_get_platform(device),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue