[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1jxq4Q-0004SY-9J@rmk-PC.armlinux.org.uk>
Date: Tue, 21 Jul 2020 12:04:26 +0100
From: Russell King <rmk+kernel@...linux.org.uk>
To: Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Ioana Ciornei <ioana.ciornei@....com>
Cc: "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
Alexandru Marginean <alexandru.marginean@....com>,
Claudiu Manoil <claudiu.manoil@....com>,
"michael@...le.cc" <michael@...le.cc>,
"olteanv@...il.com" <olteanv@...il.com>,
Vladimir Oltean <vladimir.oltean@....com>,
Jakub Kicinski <kuba@...nel.org>
Subject: [PATCH net-next 09/14] 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@....com>
Signed-off-by: Russell King <rmk+kernel@...linux.org.uk>
---
drivers/net/phy/phylink.c | 3 +--
1 file changed, 1 insertion(+), 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)) {
--
2.20.1
Powered by blists - more mailing lists