Skip to content

Commit

Permalink
net: nb8800: Utilize phy_ethtool_nway_reset
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Nov 15, 2016
1 parent e86a898 commit b3de7f3
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/net/ethernet/aurora/nb8800.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,16 +1037,6 @@ static const struct net_device_ops nb8800_netdev_ops = {
.ndo_validate_addr = eth_validate_addr,
};

static int nb8800_nway_reset(struct net_device *dev)
{
struct phy_device *phydev = dev->phydev;

if (!phydev)
return -ENODEV;

return genphy_restart_aneg(phydev);
}

static void nb8800_get_pauseparam(struct net_device *dev,
struct ethtool_pauseparam *pp)
{
Expand Down Expand Up @@ -1165,7 +1155,7 @@ static void nb8800_get_ethtool_stats(struct net_device *dev,
}

static const struct ethtool_ops nb8800_ethtool_ops = {
.nway_reset = nb8800_nway_reset,
.nway_reset = phy_ethtool_nway_reset,
.get_link = ethtool_op_get_link,
.get_pauseparam = nb8800_get_pauseparam,
.set_pauseparam = nb8800_set_pauseparam,
Expand Down

0 comments on commit b3de7f3

Please sign in to comment.