[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1393029148.15717.66.camel@deadeye.wl.decadent.org.uk>
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