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

net: usb: ax88172x: 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
b3f2cf8f 009722a2

+2 -20
+2 -20
drivers/net/usb/ax88172a.c
··· 149 149 .ndo_set_rx_mode = asix_set_multicast, 150 150 }; 151 151 152 - static int ax88172a_get_settings(struct net_device *net, 153 - struct ethtool_cmd *cmd) 154 - { 155 - if (!net->phydev) 156 - return -ENODEV; 157 - 158 - return phy_ethtool_gset(net->phydev, cmd); 159 - } 160 - 161 - static int ax88172a_set_settings(struct net_device *net, 162 - struct ethtool_cmd *cmd) 163 - { 164 - if (!net->phydev) 165 - return -ENODEV; 166 - 167 - return phy_ethtool_sset(net->phydev, cmd); 168 - } 169 - 170 152 static int ax88172a_nway_reset(struct net_device *net) 171 153 { 172 154 if (!net->phydev) ··· 167 185 .get_eeprom_len = asix_get_eeprom_len, 168 186 .get_eeprom = asix_get_eeprom, 169 187 .set_eeprom = asix_set_eeprom, 170 - .get_settings = ax88172a_get_settings, 171 - .set_settings = ax88172a_set_settings, 172 188 .nway_reset = ax88172a_nway_reset, 189 + .get_link_ksettings = phy_ethtool_get_link_ksettings, 190 + .set_link_ksettings = phy_ethtool_set_link_ksettings, 173 191 }; 174 192 175 193 static int ax88172a_reset_phy(struct usbnet *dev, int embd_phy)