summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>2017-09-26 17:15:35 -0400
committerDavid S. Miller <davem@davemloft.net>2017-09-26 20:06:34 -0700
commit69b2c1629649b1e765516c7b452797b9697de9ac (patch)
tree4b87f0600ada12c8aa05a49b13184c920d6fd4e2 /net
parentaa62a8ca85cd05b4af4d7be70ecb735f65b0449a (diff)
downloadlinux-stable-69b2c1629649b1e765516c7b452797b9697de9ac.tar.gz
linux-stable-69b2c1629649b1e765516c7b452797b9697de9ac.tar.bz2
linux-stable-69b2c1629649b1e765516c7b452797b9697de9ac.zip
net: dsa: use phy_ethtool_nway_reset
Use phy_ethtool_nway_reset now that dsa_slave_nway_reset does exactly the same. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/dsa/slave.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index d2b632cae468..bf8800de13c1 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -450,14 +450,6 @@ dsa_slave_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *_p)
ds->ops->get_regs(ds, p->dp->index, regs, _p);
}
-static int dsa_slave_nway_reset(struct net_device *dev)
-{
- if (!dev->phydev)
- return -ENODEV;
-
- return genphy_restart_aneg(dev->phydev);
-}
-
static u32 dsa_slave_get_link(struct net_device *dev)
{
if (!dev->phydev)
@@ -888,7 +880,7 @@ static const struct ethtool_ops dsa_slave_ethtool_ops = {
.get_drvinfo = dsa_slave_get_drvinfo,
.get_regs_len = dsa_slave_get_regs_len,
.get_regs = dsa_slave_get_regs,
- .nway_reset = dsa_slave_nway_reset,
+ .nway_reset = phy_ethtool_nway_reset,
.get_link = dsa_slave_get_link,
.get_eeprom_len = dsa_slave_get_eeprom_len,
.get_eeprom = dsa_slave_get_eeprom,