Commit 69b2c162 authored by Vivien Didelot's avatar Vivien Didelot Committed by David S. Miller

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: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aa62a8ca
...@@ -450,14 +450,6 @@ dsa_slave_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *_p) ...@@ -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); 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) static u32 dsa_slave_get_link(struct net_device *dev)
{ {
if (!dev->phydev) if (!dev->phydev)
...@@ -888,7 +880,7 @@ static const struct ethtool_ops dsa_slave_ethtool_ops = { ...@@ -888,7 +880,7 @@ static const struct ethtool_ops dsa_slave_ethtool_ops = {
.get_drvinfo = dsa_slave_get_drvinfo, .get_drvinfo = dsa_slave_get_drvinfo,
.get_regs_len = dsa_slave_get_regs_len, .get_regs_len = dsa_slave_get_regs_len,
.get_regs = dsa_slave_get_regs, .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_link = dsa_slave_get_link,
.get_eeprom_len = dsa_slave_get_eeprom_len, .get_eeprom_len = dsa_slave_get_eeprom_len,
.get_eeprom = dsa_slave_get_eeprom, .get_eeprom = dsa_slave_get_eeprom,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment