summaryrefslogtreecommitdiff
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2020-07-21 12:04:26 +0100
committerDavid S. Miller <davem@davemloft.net>2020-07-21 15:46:50 -0700
commita83c8829d18d47939980db16a0ec79fa365ce6b0 (patch)
treede5682d6d8db79e44eb2499f4e4967a695baa4a9 /drivers/net/phy
parentcbc1bb1e4689ce1e6654485b6865f10b98f6ddb4 (diff)
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 <ioana.ciornei@nxp.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/phylink.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 967c068d16c8..6cb9ca74341b 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)) {