net: bcm63xx_enet: Utilize phy_ethtool_nway_reset
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 15 Nov 2016 18:06:32 +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/broadcom/bcm63xx_enet.c

index 5c7acef1de2e380beb31c8cc503e35d59db46b63..a43ab90c051ea05e6671c9cfc7619f9c30d87ec1 100644 (file)
@@ -1434,11 +1434,8 @@ static int bcm_enet_nway_reset(struct net_device *dev)
        struct bcm_enet_priv *priv;
 
        priv = netdev_priv(dev);
-       if (priv->has_phy) {
-               if (!dev->phydev)
-                       return -ENODEV;
-               return genphy_restart_aneg(dev->phydev);
-       }
+       if (priv->has_phy)
+               return phy_ethtool_nway_reset(dev),
 
        return -EOPNOTSUPP;
 }