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

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

authored by

Philippe Reynes and committed by
David S. Miller
5376d95f d1e3a356

+2 -14
+2 -14
drivers/net/ethernet/lantiq_etop.c
··· 304 304 } 305 305 306 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 - 318 - static int 319 307 ltq_etop_nway_reset(struct net_device *dev) 320 308 { 321 309 return phy_start_aneg(dev->phydev); ··· 311 323 312 324 static const struct ethtool_ops ltq_etop_ethtool_ops = { 313 325 .get_drvinfo = ltq_etop_get_drvinfo, 314 - .get_settings = ltq_etop_get_settings, 315 - .set_settings = ltq_etop_set_settings, 316 326 .nway_reset = ltq_etop_nway_reset, 327 + .get_link_ksettings = phy_ethtool_get_link_ksettings, 328 + .set_link_ksettings = phy_ethtool_set_link_ksettings, 317 329 }; 318 330 319 331 static int