Skip to content

Commit fa01848

Browse files
Philippe Reynesdavem330
authored andcommitted
net: ethernet: ixp4xx_eth: 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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2a62416 commit fa01848

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

drivers/net/ethernet/xscale/ixp4xx_eth.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,16 +1002,6 @@ static void ixp4xx_get_drvinfo(struct net_device *dev,
10021002
strlcpy(info->bus_info, "internal", sizeof(info->bus_info));
10031003
}
10041004

1005-
static int ixp4xx_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
1006-
{
1007-
return phy_ethtool_gset(dev->phydev, cmd);
1008-
}
1009-
1010-
static int ixp4xx_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
1011-
{
1012-
return phy_ethtool_sset(dev->phydev, cmd);
1013-
}
1014-
10151005
static int ixp4xx_nway_reset(struct net_device *dev)
10161006
{
10171007
return phy_start_aneg(dev->phydev);
@@ -1048,11 +1038,11 @@ static int ixp4xx_get_ts_info(struct net_device *dev,
10481038

10491039
static const struct ethtool_ops ixp4xx_ethtool_ops = {
10501040
.get_drvinfo = ixp4xx_get_drvinfo,
1051-
.get_settings = ixp4xx_get_settings,
1052-
.set_settings = ixp4xx_set_settings,
10531041
.nway_reset = ixp4xx_nway_reset,
10541042
.get_link = ethtool_op_get_link,
10551043
.get_ts_info = ixp4xx_get_ts_info,
1044+
.get_link_ksettings = phy_ethtool_get_link_ksettings,
1045+
.set_link_ksettings = phy_ethtool_set_link_ksettings,
10561046
};
10571047

10581048

0 commit comments

Comments
 (0)