Netdev List
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: Claudiu Manoil <claudiu.manoil@freescale.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net-next 2/5] gianfar: Fix on-the-fly vlan and mtu updates
Date: Sat, 22 Feb 2014 00:32:28 +0000	[thread overview]
Message-ID: <1393029148.15717.66.camel@deadeye.wl.decadent.org.uk> (raw)
In-Reply-To: <1392816138-31645-3-git-send-email-claudiu.manoil@freescale.com>

[-- Attachment #1: Type: text/plain, Size: 884 bytes --]

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.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

  reply	other threads:[~2014-02-22  0:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-19 13:22 [PATCH net-next 0/5] Device reset and reconfig fixes Claudiu Manoil
2014-02-19 13:22 ` [PATCH net-next 1/5] gianfar: Implement MAC reset and reconfig procedure Claudiu Manoil
2014-02-19 13:22 ` [PATCH net-next 2/5] gianfar: Fix on-the-fly vlan and mtu updates Claudiu Manoil
2014-02-22  0:32   ` Ben Hutchings [this message]
2014-02-19 13:22 ` [PATCH net-next 3/5] gianfar: Don't free/request irqs on device reset Claudiu Manoil
2014-02-19 13:22 ` [PATCH net-next 4/5] gianfar: Fix device reset races (oops) for Tx Claudiu Manoil
2014-02-19 13:22 ` [PATCH net-next 5/5] gianfar: Fix Tx int miss, dont write IC on-the-fly Claudiu Manoil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1393029148.15717.66.camel@deadeye.wl.decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=claudiu.manoil@freescale.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox