-static int ag71xx_ethtool_get_settings(struct net_device *dev,
- struct ethtool_cmd *cmd)
-{
- struct ag71xx *ag = netdev_priv(dev);
- struct phy_device *phydev = ag->phy_dev;
-
- if (!phydev)
- return -ENODEV;
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
- return phy_ethtool_gset(phydev, cmd);
-#else
- return phy_ethtool_ioctl(phydev, cmd);
-#endif
-}
-
-static int ag71xx_ethtool_set_settings(struct net_device *dev,
- struct ethtool_cmd *cmd)
-{
- struct ag71xx *ag = netdev_priv(dev);
- struct phy_device *phydev = ag->phy_dev;
-
- if (!phydev)
- return -ENODEV;
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
- return phy_ethtool_sset(phydev, cmd);
-#else
- return phy_ethtool_ioctl(phydev, cmd);
-#endif
-}
-