Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <tremyfr@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Philippe Reynes and committed by
David S. Miller
fa018484 2a62416d

+2 -12
+2 -12
drivers/net/ethernet/xscale/ixp4xx_eth.c
··· 1002 1002 strlcpy(info->bus_info, "internal", sizeof(info->bus_info)); 1003 1003 } 1004 1004 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 - 1015 1005 static int ixp4xx_nway_reset(struct net_device *dev) 1016 1006 { 1017 1007 return phy_start_aneg(dev->phydev); ··· 1038 1048 1039 1049 static const struct ethtool_ops ixp4xx_ethtool_ops = { 1040 1050 .get_drvinfo = ixp4xx_get_drvinfo, 1041 - .get_settings = ixp4xx_get_settings, 1042 - .set_settings = ixp4xx_set_settings, 1043 1051 .nway_reset = ixp4xx_nway_reset, 1044 1052 .get_link = ethtool_op_get_link, 1045 1053 .get_ts_info = ixp4xx_get_ts_info, 1054 + .get_link_ksettings = phy_ethtool_get_link_ksettings, 1055 + .set_link_ksettings = phy_ethtool_set_link_ksettings, 1046 1056 }; 1047 1057 1048 1058