Skip to content

Commit 064fbc4

Browse files
dangowrtkuba-moo
authored andcommitted
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. Signed-off-by: Daniel Golle <[email protected]> Reviewed-by: Michal Kubiak <[email protected]> Reviewed-by: Russell King (Oracle) <[email protected]> Tested-by: Rui Salvaterra <[email protected]> Link: https://patch.msgid.link/e3ece47323444631d6cb479f32af0dfd6d145be0.1720088047.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski <[email protected]>
1 parent ca18300 commit 064fbc4

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

drivers/net/ethernet/mediatek/mtk_eth_soc.c

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4464,6 +4464,20 @@ static int mtk_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
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 = {
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 = {

0 commit comments

Comments
 (0)