Commit 9365fbf5 authored by Philippe Reynes's avatar Philippe Reynes Committed by David S. Miller

net: ethernet: fec: 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: default avatarPhilippe Reynes <tremyfr@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 45f5c327
...@@ -2061,28 +2061,6 @@ static void fec_enet_mii_remove(struct fec_enet_private *fep) ...@@ -2061,28 +2061,6 @@ static void fec_enet_mii_remove(struct fec_enet_private *fep)
} }
} }
static int fec_enet_get_link_ksettings(struct net_device *ndev,
struct ethtool_link_ksettings *cmd)
{
struct phy_device *phydev = ndev->phydev;
if (!phydev)
return -ENODEV;
return phy_ethtool_ksettings_get(phydev, cmd);
}
static int fec_enet_set_link_ksettings(struct net_device *ndev,
const struct ethtool_link_ksettings *cmd)
{
struct phy_device *phydev = ndev->phydev;
if (!phydev)
return -ENODEV;
return phy_ethtool_ksettings_set(phydev, cmd);
}
static void fec_enet_get_drvinfo(struct net_device *ndev, static void fec_enet_get_drvinfo(struct net_device *ndev,
struct ethtool_drvinfo *info) struct ethtool_drvinfo *info)
{ {
...@@ -2581,8 +2559,8 @@ static const struct ethtool_ops fec_enet_ethtool_ops = { ...@@ -2581,8 +2559,8 @@ static const struct ethtool_ops fec_enet_ethtool_ops = {
.set_tunable = fec_enet_set_tunable, .set_tunable = fec_enet_set_tunable,
.get_wol = fec_enet_get_wol, .get_wol = fec_enet_get_wol,
.set_wol = fec_enet_set_wol, .set_wol = fec_enet_set_wol,
.get_link_ksettings = fec_enet_get_link_ksettings, .get_link_ksettings = phy_ethtool_get_link_ksettings,
.set_link_ksettings = fec_enet_set_link_ksettings, .set_link_ksettings = phy_ethtool_set_link_ksettings,
}; };
static int fec_enet_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd) static int fec_enet_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment