提交 6783f50e 编写于 作者: V Vladimir Zapolskiy 提交者: David S. Miller

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: NVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Reviewed-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 45abbd43
...@@ -2040,15 +2040,6 @@ static int sh_eth_phy_start(struct net_device *ndev) ...@@ -2040,15 +2040,6 @@ static int sh_eth_phy_start(struct net_device *ndev)
return 0; 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 /* 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 * version must be bumped as well. Just adding registers up to that
* limit is fine, as long as the existing register indices don't * 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 = { ...@@ -2388,7 +2379,7 @@ static const struct ethtool_ops sh_eth_ethtool_ops = {
.get_ringparam = sh_eth_get_ringparam, .get_ringparam = sh_eth_get_ringparam,
.set_ringparam = sh_eth_set_ringparam, .set_ringparam = sh_eth_set_ringparam,
.get_link_ksettings = phy_ethtool_get_link_ksettings, .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, .get_wol = sh_eth_get_wol,
.set_wol = sh_eth_set_wol, .set_wol = sh_eth_set_wol,
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册