net: ethernet: ucc: Utilize phy_ethtool_nway_reset
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 15 Nov 2016 18:06:41 +0000 (10:06 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Nov 2016 21:33:35 +0000 (16:33 -0500)
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/ucc_geth_ethtool.c

index 812a968a78e9808c37fa9bef1d308b42fead4d95..8ba636f61b5063a5978e647145cc0963de74389f 100644 (file)
@@ -332,13 +332,6 @@ static void uec_get_ethtool_stats(struct net_device *netdev,
        }
 }
 
-static int uec_nway_reset(struct net_device *netdev)
-{
-       struct ucc_geth_private *ugeth = netdev_priv(netdev);
-
-       return phy_start_aneg(ugeth->phydev);
-}
-
 /* Report driver information */
 static void
 uec_get_drvinfo(struct net_device *netdev,
@@ -394,7 +387,7 @@ static const struct ethtool_ops uec_ethtool_ops = {
        .get_regs               = uec_get_regs,
        .get_msglevel           = uec_get_msglevel,
        .set_msglevel           = uec_set_msglevel,
-       .nway_reset             = uec_nway_reset,
+       .nway_reset             = phy_ethtool_nway_reset,
        .get_link               = ethtool_op_get_link,
        .get_ringparam          = uec_get_ringparam,
        .set_ringparam          = uec_set_ringparam,