Skip to content

Commit

Permalink
net: dsa: use phy_ethtool_get_link_ksettings
Browse files Browse the repository at this point in the history
Use phy_ethtool_get_link_ksettings now that dsa_slave_get_link_ksettings
does exactly the same.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vivien Didelot authored and David S. Miller committed Sep 27, 2017
1 parent 0115dcd commit 771df31
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions net/dsa/slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,17 +420,6 @@ static netdev_tx_t dsa_slave_xmit(struct sk_buff *skb, struct net_device *dev)
}

/* ethtool operations *******************************************************/
static int
dsa_slave_get_link_ksettings(struct net_device *dev,
struct ethtool_link_ksettings *cmd)
{
if (!dev->phydev)
return -ENODEV;

phy_ethtool_ksettings_get(dev->phydev, cmd);

return 0;
}

static int
dsa_slave_set_link_ksettings(struct net_device *dev,
Expand Down Expand Up @@ -921,8 +910,8 @@ static const struct ethtool_ops dsa_slave_ethtool_ops = {
.get_wol = dsa_slave_get_wol,
.set_eee = dsa_slave_set_eee,
.get_eee = dsa_slave_get_eee,
.get_link_ksettings = dsa_slave_get_link_ksettings,
.set_link_ksettings = dsa_slave_set_link_ksettings,
.get_link_ksettings = phy_ethtool_get_link_ksettings,
.get_rxnfc = dsa_slave_get_rxnfc,
.set_rxnfc = dsa_slave_set_rxnfc,
};
Expand Down

0 comments on commit 771df31

Please sign in to comment.