net: bcm63xx_enet: Utilize phy_ethtool_nway_reset

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Florian Fainelli 2016-11-15 10:06:32 -08:00 committed by David S. Miller
parent b3de7f36de
commit 42469bf5d9

View 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;
}