]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
ravb: remove custom .set_link_ksettings from ethtool ops
authorVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Wed, 4 Jul 2018 08:16:12 +0000 (11:16 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Jul 2018 01:44:09 +0000 (10:44 +0900)
The generic phy_ethtool_set_link_ksettings() function from phylib can
be used instead of in-house ravb_set_link_ksettings().

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Reviewed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/ravb_main.c

index 9fe01259be6f07de2be6e89f0e1f7e57cf979c7f..0d811c02ff340f09a385ec0677f0388034615eef 100644 (file)
@@ -1106,15 +1106,6 @@ static int ravb_phy_start(struct net_device *ndev)
        return 0;
 }
 
-static int ravb_set_link_ksettings(struct net_device *ndev,
-                                  const struct ethtool_link_ksettings *cmd)
-{
-       if (!ndev->phydev)
-               return -ENODEV;
-
-       return phy_ethtool_ksettings_set(ndev->phydev, cmd);
-}
-
 static u32 ravb_get_msglevel(struct net_device *ndev)
 {
        struct ravb_private *priv = netdev_priv(ndev);
@@ -1338,7 +1329,7 @@ static const struct ethtool_ops ravb_ethtool_ops = {
        .set_ringparam          = ravb_set_ringparam,
        .get_ts_info            = ravb_get_ts_info,
        .get_link_ksettings     = phy_ethtool_get_link_ksettings,
-       .set_link_ksettings     = ravb_set_link_ksettings,
+       .set_link_ksettings     = phy_ethtool_set_link_ksettings,
        .get_wol                = ravb_get_wol,
        .set_wol                = ravb_set_wol,
 };