Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <daniel@makrotopia.org>
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tested-by: Rui Salvaterra <rsalvaterra@gmail.com>
Link: https://patch.msgid.link/e3ece47323444631d6cb479f32af0dfd6d145be0.1720088047.git.daniel@makrotopia.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Daniel Golle and committed by
Jakub Kicinski
064fbc4e ca18300e

+17 -1
+17 -1
drivers/net/ethernet/mediatek/mtk_eth_soc.c
··· 4464 4464 return ret; 4465 4465 } 4466 4466 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 + 4467 4481 static u16 mtk_select_queue(struct net_device *dev, struct sk_buff *skb, 4468 4482 struct net_device *sb_dev) 4469 4483 { ··· 4506 4492 .get_strings = mtk_get_strings, 4507 4493 .get_sset_count = mtk_get_sset_count, 4508 4494 .get_ethtool_stats = mtk_get_ethtool_stats, 4495 + .get_pauseparam = mtk_get_pauseparam, 4496 + .set_pauseparam = mtk_set_pauseparam, 4509 4497 .get_rxnfc = mtk_get_rxnfc, 4510 - .set_rxnfc = mtk_set_rxnfc, 4498 + .set_rxnfc = mtk_set_rxnfc, 4511 4499 }; 4512 4500 4513 4501 static const struct net_device_ops mtk_netdev_ops = {