summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/aeroflex
diff options
context:
space:
mode:
authorPhilippe Reynes <tremyfr@gmail.com>2016-07-30 16:22:06 +0200
committerDavid S. Miller <davem@davemloft.net>2016-08-08 15:42:21 -0700
commit72582fdb92457a1550dac0e271bde9dd906fda05 (patch)
tree4b520ecf9216eeb4fa5d1e1692495b6ab59470b0 /drivers/net/ethernet/aeroflex
parent65752dda4b525730746085a351e6e936d29bc586 (diff)
downloadlinux-72582fdb92457a1550dac0e271bde9dd906fda05.tar.bz2
net: ethernet: greth: use phy_ethtool_{get|set}_link_ksettings
There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/aeroflex')
-rw-r--r--drivers/net/ethernet/aeroflex/greth.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/drivers/net/ethernet/aeroflex/greth.c b/drivers/net/ethernet/aeroflex/greth.c
index 010978bb295f..f8df8248035e 100644
--- a/drivers/net/ethernet/aeroflex/greth.c
+++ b/drivers/net/ethernet/aeroflex/greth.c
@@ -1105,25 +1105,6 @@ static void greth_set_msglevel(struct net_device *dev, u32 value)
struct greth_private *greth = netdev_priv(dev);
greth->msg_enable = value;
}
-static int greth_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
-{
- struct phy_device *phy = dev->phydev;
-
- if (!phy)
- return -ENODEV;
-
- return phy_ethtool_gset(phy, cmd);
-}
-
-static int greth_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
-{
- struct phy_device *phy = dev->phydev;
-
- if (!phy)
- return -ENODEV;
-
- return phy_ethtool_sset(phy, cmd);
-}
static int greth_get_regs_len(struct net_device *dev)
{
@@ -1155,12 +1136,12 @@ static void greth_get_regs(struct net_device *dev, struct ethtool_regs *regs, vo
static const struct ethtool_ops greth_ethtool_ops = {
.get_msglevel = greth_get_msglevel,
.set_msglevel = greth_set_msglevel,
- .get_settings = greth_get_settings,
- .set_settings = greth_set_settings,
.get_drvinfo = greth_get_drvinfo,
.get_regs_len = greth_get_regs_len,
.get_regs = greth_get_regs,
.get_link = ethtool_op_get_link,
+ .get_link_ksettings = phy_ethtool_get_link_ksettings,
+ .set_link_ksettings = phy_ethtool_set_link_ksettings,
};
static struct net_device_ops greth_netdev_ops = {