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
44644464 return ret;
44654465 }
44664466
4467+static 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+
4474+static 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+
44674481 static u16 mtk_select_queue(struct net_device *dev, struct sk_buff *skb,
44684482 struct net_device *sb_dev)
44694483 {
@@ -4492,8 +4506,10 @@ static const struct ethtool_ops mtk_ethtool_ops = { · 22 unmodified lines
44924506 .get_strings = mtk_get_strings,
44934507 .get_sset_count = mtk_get_sset_count,
44944508 .get_ethtool_stats = mtk_get_ethtool_stats,
4509+ .get_pauseparam = mtk_get_pauseparam,
4510+ .set_pauseparam = mtk_set_pauseparam,
44954511 .get_rxnfc = mtk_get_rxnfc,
4496− .set_rxnfc = mtk_set_rxnfc,
4512+ .set_rxnfc = mtk_set_rxnfc,
44974513 };
44984514
44994515 static 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