net: ethernet: ftgmac100: use phy_ethtool_{get|set}_link_ksettings
authorPhilippe Reynes <tremyfr@gmail.com>
Sun, 15 May 2016 23:35:14 +0000 (01:35 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 May 2016 01:51:41 +0000 (21:51 -0400)
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>
drivers/net/ethernet/faraday/ftgmac100.c

index 9cc23c3fcbf11e4fed9937f7ce85423009f4a7a5..e7cf313e359ba0f825a81d3b9dcb9bed462d17c0 100644 (file)
@@ -937,23 +937,11 @@ static void ftgmac100_get_drvinfo(struct net_device *netdev,
        strlcpy(info->bus_info, dev_name(&netdev->dev), sizeof(info->bus_info));
 }
 
-static int ftgmac100_get_settings(struct net_device *netdev,
-                                 struct ethtool_cmd *cmd)
-{
-       return phy_ethtool_gset(netdev->phydev, cmd);
-}
-
-static int ftgmac100_set_settings(struct net_device *netdev,
-                                 struct ethtool_cmd *cmd)
-{
-       return phy_ethtool_sset(netdev->phydev, cmd);
-}
-
 static const struct ethtool_ops ftgmac100_ethtool_ops = {
-       .set_settings           = ftgmac100_set_settings,
-       .get_settings           = ftgmac100_get_settings,
        .get_drvinfo            = ftgmac100_get_drvinfo,
        .get_link               = ethtool_op_get_link,
+       .get_link_ksettings     = phy_ethtool_get_link_ksettings,
+       .set_link_ksettings     = phy_ethtool_set_link_ksettings,
 };
 
 /******************************************************************************
This page took 0.03962 seconds and 5 git commands to generate.