Skip to content

Commit 5376d95

Browse files
Philippe Reynesdavem330
authored andcommitted
net: ethernet: lantiq_etop: 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 d1e3a35 commit 5376d95

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

drivers/net/ethernet/lantiq_etop.c

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -303,18 +303,6 @@ ltq_etop_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
303303
strlcpy(info->version, DRV_VERSION, sizeof(info->version));
304304
}
305305

306-
static int
307-
ltq_etop_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
308-
{
309-
return phy_ethtool_gset(dev->phydev, cmd);
310-
}
311-
312-
static int
313-
ltq_etop_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
314-
{
315-
return phy_ethtool_sset(dev->phydev, cmd);
316-
}
317-
318306
static int
319307
ltq_etop_nway_reset(struct net_device *dev)
320308
{
@@ -323,9 +311,9 @@ ltq_etop_nway_reset(struct net_device *dev)
323311

324312
static const struct ethtool_ops ltq_etop_ethtool_ops = {
325313
.get_drvinfo = ltq_etop_get_drvinfo,
326-
.get_settings = ltq_etop_get_settings,
327-
.set_settings = ltq_etop_set_settings,
328314
.nway_reset = ltq_etop_nway_reset,
315+
.get_link_ksettings = phy_ethtool_get_link_ksettings,
316+
.set_link_ksettings = phy_ethtool_set_link_ksettings,
329317
};
330318

331319
static int

0 commit comments

Comments
 (0)