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] [day] [month] [year] [list]
Date:	Sat, 22 Feb 2014 00:32:28 +0000
From:	Ben Hutchings <ben@...adent.org.uk>
To:	Claudiu Manoil <claudiu.manoil@...escale.com>
Cc:	netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH net-next 2/5] gianfar: Fix on-the-fly vlan and mtu
 updates

On Wed, 2014-02-19 at 15:22 +0200, Claudiu Manoil wrote:
[...]
> --- a/drivers/net/ethernet/freescale/gianfar_ethtool.c
> +++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
> @@ -582,18 +582,18 @@ int gfar_set_features(struct net_device *dev, netdev_features_t features)
>  	netdev_features_t changed = dev->features ^ features;
>  	int err = 0;
>  
> -	if (changed & (NETIF_F_HW_VLAN_CTAG_TX|NETIF_F_HW_VLAN_CTAG_RX))
> -		gfar_vlan_mode(dev, features);
> +	if (changed & (NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX))
> +		goto reset;
>  
>  	if (!(changed & NETIF_F_RXCSUM))
>  		return 0;
>  
> +reset:
[...]

This is a really weird way of saying:

	if (!(changed & 
	      (NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_RXCSUM)))
		return 0;

Ben.

-- 
Ben Hutchings
I haven't lost my mind; it's backed up on tape somewhere.

Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ