History

net: ethernet: mtk_eth_soc: implement .{get,set}_pauseparam ethtool ops

Implement operations to get and set flow-control link parameters. Both is done by simply calling phylink_ethtool_{get,set}_pauseparam(). Fix whitespace in mtk_ethtool_ops while at it.

Daniel Golle committed 2 years ago

Commit 064fbc41 parent ca183001 file · +17 −1Browse files

Unified · Split

drivers/net/ethernet/mediatek/mtk_eth_soc.c+17−1
@@ -4464,6 +4464,20 @@ static int mtk_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd) · 4463 unmodified lines
4464 return ret;4464 return ret;
4465}4465}
4466 4466
4467static void mtk_get_pauseparam(struct net_device *dev, struct ethtool_pauseparam *pause)
4468{
4469 struct mtk_mac *mac = netdev_priv(dev);
4470
4471 phylink_ethtool_get_pauseparam(mac->phylink, pause);
4472}
4473
4474static int mtk_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam *pause)
4475{
4476 struct mtk_mac *mac = netdev_priv(dev);
4477
4478 return phylink_ethtool_set_pauseparam(mac->phylink, pause);
4479}
4480
4467static u16 mtk_select_queue(struct net_device *dev, struct sk_buff *skb,4481static u16 mtk_select_queue(struct net_device *dev, struct sk_buff *skb,
4468 struct net_device *sb_dev)4482 struct net_device *sb_dev)
4469{4483{
@@ -4492,8 +4506,10 @@ static const struct ethtool_ops mtk_ethtool_ops = { · 22 unmodified lines
4492 .get_strings = mtk_get_strings,4506 .get_strings = mtk_get_strings,
4493 .get_sset_count = mtk_get_sset_count,4507 .get_sset_count = mtk_get_sset_count,
4494 .get_ethtool_stats = mtk_get_ethtool_stats,4508 .get_ethtool_stats = mtk_get_ethtool_stats,
4509 .get_pauseparam = mtk_get_pauseparam,
4510 .set_pauseparam = mtk_set_pauseparam,
4495 .get_rxnfc = mtk_get_rxnfc,4511 .get_rxnfc = mtk_get_rxnfc,
4496 .set_rxnfc = mtk_set_rxnfc,4512 .set_rxnfc = mtk_set_rxnfc,
4497};4513};
4498 4514
4499static const struct net_device_ops mtk_netdev_ops = {4515static const struct net_device_ops mtk_netdev_ops = {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t