aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>2018-07-04 11:14:49 +0300
committerSimon Horman <horms+renesas@verge.net.au>2018-08-09 17:19:43 +0200
commitcc11e0b4f727e1fdc4ff9b8706fca22053d07d23 (patch)
treea17a082cbecfdce3ea95be0f5b6ef7a392823712
parent5504ac5028d40995b5d66866c946d7e6478a8a8c (diff)
downloadrenesas-backport-cc11e0b4f727e1fdc4ff9b8706fca22053d07d23.tar.gz
sh_eth: remove custom .set_link_ksettings from ethtool ops
The generic phy_ethtool_set_link_ksettings() function from phylib can be used instead of in-house sh_eth_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> (cherry picked from commit 6783f50ed144aafe8c3aceb223db2c7956278a1f) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r--drivers/net/ethernet/renesas/sh_eth.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index bd4b64220fff17..87a6bcdda05a85 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -2040,15 +2040,6 @@ static int sh_eth_phy_start(struct net_device *ndev)
return 0;
}
-static int sh_eth_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);
-}
-
/* If it is ever necessary to increase SH_ETH_REG_DUMP_MAX_REGS, the
* version must be bumped as well. Just adding registers up to that
* limit is fine, as long as the existing register indices don't
@@ -2388,7 +2379,7 @@ static const struct ethtool_ops sh_eth_ethtool_ops = {
.get_ringparam = sh_eth_get_ringparam,
.set_ringparam = sh_eth_set_ringparam,
.get_link_ksettings = phy_ethtool_get_link_ksettings,
- .set_link_ksettings = sh_eth_set_link_ksettings,
+ .set_link_ksettings = phy_ethtool_set_link_ksettings,
.get_wol = sh_eth_get_wol,
.set_wol = sh_eth_set_wol,
};