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

net: ethernet: smsc: smsc911x: 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
2c087409 f788e322

+2 -16
+2 -16
drivers/net/ethernet/smsc/smsc911x.c
··· 1915 1915 return phy_mii_ioctl(dev->phydev, ifr, cmd); 1916 1916 } 1917 1917 1918 - static int 1919 - smsc911x_ethtool_getsettings(struct net_device *dev, struct ethtool_cmd *cmd) 1920 - { 1921 - cmd->maxtxpkt = 1; 1922 - cmd->maxrxpkt = 1; 1923 - return phy_ethtool_gset(dev->phydev, cmd); 1924 - } 1925 - 1926 - static int 1927 - smsc911x_ethtool_setsettings(struct net_device *dev, struct ethtool_cmd *cmd) 1928 - { 1929 - return phy_ethtool_sset(dev->phydev, cmd); 1930 - } 1931 - 1932 1918 static void smsc911x_ethtool_getdrvinfo(struct net_device *dev, 1933 1919 struct ethtool_drvinfo *info) 1934 1920 { ··· 2098 2112 } 2099 2113 2100 2114 static const struct ethtool_ops smsc911x_ethtool_ops = { 2101 - .get_settings = smsc911x_ethtool_getsettings, 2102 - .set_settings = smsc911x_ethtool_setsettings, 2103 2115 .get_link = ethtool_op_get_link, 2104 2116 .get_drvinfo = smsc911x_ethtool_getdrvinfo, 2105 2117 .nway_reset = smsc911x_ethtool_nwayreset, ··· 2109 2125 .get_eeprom = smsc911x_ethtool_get_eeprom, 2110 2126 .set_eeprom = smsc911x_ethtool_set_eeprom, 2111 2127 .get_ts_info = ethtool_op_get_ts_info, 2128 + .get_link_ksettings = phy_ethtool_get_link_ksettings, 2129 + .set_link_ksettings = phy_ethtool_set_link_ksettings, 2112 2130 }; 2113 2131 2114 2132 static const struct net_device_ops smsc911x_netdev_ops = {