net: smsc911x: Utilize phy_ethtool_nway_reset
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 15 Nov 2016 18:06:34 +0000 (10:06 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Nov 2016 21:33:35 +0000 (16:33 -0500)
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/smsc/smsc911x.c

index cdb343f0c6e0a92178d94f8078f1398a659c5218..be09573c6cedb9c31c66600db1ea5b54a0eadd48 100644 (file)
@@ -1956,11 +1956,6 @@ static void smsc911x_ethtool_getdrvinfo(struct net_device *dev,
                sizeof(info->bus_info));
 }
 
-static int smsc911x_ethtool_nwayreset(struct net_device *dev)
-{
-       return phy_start_aneg(dev->phydev);
-}
-
 static u32 smsc911x_ethtool_getmsglevel(struct net_device *dev)
 {
        struct smsc911x_data *pdata = netdev_priv(dev);
@@ -2132,7 +2127,7 @@ static int smsc911x_ethtool_set_eeprom(struct net_device *dev,
 static const struct ethtool_ops smsc911x_ethtool_ops = {
        .get_link = ethtool_op_get_link,
        .get_drvinfo = smsc911x_ethtool_getdrvinfo,
-       .nway_reset = smsc911x_ethtool_nwayreset,
+       .nway_reset = phy_ethtool_nway_reset,
        .get_msglevel = smsc911x_ethtool_getmsglevel,
        .set_msglevel = smsc911x_ethtool_setmsglevel,
        .get_regs_len = smsc911x_ethtool_getregslen,