From: Russell King Date: Tue, 21 Jul 2020 11:04:26 +0000 (+0100) Subject: net: phylink: use config.an_enabled in ksettings_set method X-Git-Tag: v5.15~3197^2~173^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a83c8829d18d47939980db16a0ec79fa365ce6b0;p=platform%2Fkernel%2Flinux-starfive.git net: phylink: use config.an_enabled in ksettings_set method Rather than recomputing whether AN is enabled, use config.an_enabled. Suggested-by: Ioana Ciornei Signed-off-by: Russell King Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index 967c068..6cb9ca743 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -1400,8 +1400,7 @@ int phylink_ethtool_ksettings_set(struct phylink *pl, pl->link_config.interface = config.interface; pl->link_config.speed = config.speed; pl->link_config.duplex = config.duplex; - pl->link_config.an_enabled = kset->base.autoneg != - AUTONEG_DISABLE; + pl->link_config.an_enabled = config.an_enabled; if (pl->cur_link_an_mode == MLO_AN_INBAND && !test_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state)) {