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.
Unified · Split
| @@ -4464,6 +4464,20 @@ static int mtk_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd) · 4463 unmodified lines | ||
| 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 | { |
| @@ -4492,8 +4506,10 @@ static const struct ethtool_ops mtk_ethtool_ops = { · 22 unmodified lines | ||
| 4492 | 4506 | .get_strings = mtk_get_strings, |
| 4493 | 4507 | .get_sset_count = mtk_get_sset_count, |
| 4494 | 4508 | .get_ethtool_stats = mtk_get_ethtool_stats, |
| 4509 | + .get_pauseparam = mtk_get_pauseparam, | |
| 4510 | + .set_pauseparam = mtk_set_pauseparam, | |
| 4495 | 4511 | .get_rxnfc = mtk_get_rxnfc, |
| 4496 | − .set_rxnfc = mtk_set_rxnfc, | |
| 4512 | + .set_rxnfc = mtk_set_rxnfc, | |
| 4497 | 4513 | }; |
| 4498 | 4514 | |
| 4499 | 4515 | static const struct net_device_ops mtk_netdev_ops = { |