lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZoaC0C/pek+6/mRc@localhost.localdomain>
Date: Thu, 4 Jul 2024 13:09:04 +0200
From: Michal Kubiak <michal.kubiak@...el.com>
To: Daniel Golle <daniel@...rotopia.org>
CC: John Crispin <john@...ozen.org>, Felix Fietkau <nbd@....name>, Sean Wang
	<sean.wang@...iatek.com>, Mark Lee <Mark-MC.Lee@...iatek.com>, "Lorenzo
 Bianconi" <lorenzo@...nel.org>, "David S. Miller" <davem@...emloft.net>, Eric
 Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, "Paolo
 Abeni" <pabeni@...hat.com>, Matthias Brugger <matthias.bgg@...il.com>,
	AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>, Russell
 King <linux@...linux.org.uk>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
	<linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH net-next] net: ethernet: mtk_eth_soc: implement
 .{get,set}_pauseparam ethtool ops

On Thu, Jul 04, 2024 at 11:14:55AM +0100, Daniel Golle wrote:
> 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@...rotopia.org>
> ---
>  drivers/net/ethernet/mediatek/mtk_eth_soc.c | 18 +++++++++++++++++-
>  1 file changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> index 13d78d9b3197..fbf5f566fdc5 100644
> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> @@ -4464,6 +4464,20 @@ static int mtk_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
>  	return ret;
>  }
>  
> +static void mtk_get_pauseparam(struct net_device *dev, struct ethtool_pauseparam *pause)
> +{
> +	struct mtk_mac *mac = netdev_priv(dev);
> +
> +	phylink_ethtool_get_pauseparam(mac->phylink, pause);
> +}
> +
> +static int mtk_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam *pause)
> +{
> +	struct mtk_mac *mac = netdev_priv(dev);
> +
> +	return phylink_ethtool_set_pauseparam(mac->phylink, pause);
> +}
> +
>  static u16 mtk_select_queue(struct net_device *dev, struct sk_buff *skb,
>  			    struct net_device *sb_dev)
>  {
> @@ -4492,8 +4506,10 @@ static const struct ethtool_ops mtk_ethtool_ops = {
>  	.get_strings		= mtk_get_strings,
>  	.get_sset_count		= mtk_get_sset_count,
>  	.get_ethtool_stats	= mtk_get_ethtool_stats,
> +	.get_pauseparam		= mtk_get_pauseparam,
> +	.set_pauseparam		= mtk_set_pauseparam,
>  	.get_rxnfc		= mtk_get_rxnfc,
> -	.set_rxnfc              = mtk_set_rxnfc,
> +	.set_rxnfc		= mtk_set_rxnfc,
>  };
>  
>  static const struct net_device_ops mtk_netdev_ops = {
> -- 
> 2.45.2
> 

The patch looks correct.

Thanks,
Reviewed-by: Michal Kubiak <michal.kubiak@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ