From: Ivan Vecera <ivecera@redhat.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, davem@davemloft.net, rmody@brocade.com
Subject: Re: [PATCH net] bna: fix vlan tag stripping and implement its toggling
Date: Fri, 28 Feb 2014 10:53:14 +0100 [thread overview]
Message-ID: <53105C8A.1020908@redhat.com> (raw)
In-Reply-To: <20140228092447.GC2823@minipsycho.orion>
On 02/28/2014 10:24 AM, Jiri Pirko wrote:
>> +int bnad_set_features(struct net_device *dev, netdev_features_t features)
>> +{
>> + struct bnad *bnad = netdev_priv(dev);
>> + netdev_features_t changed = features ^ dev->features;
>> +
>> + if ((changed & NETIF_F_HW_VLAN_CTAG_RX) && netif_running(dev)) {
> ^^^^^^^^^^^^^^^^^^
> why?
>
Because 'bnad->rx_info[0].rx' is assigned during open. But I remembered
that VLAN stripping is enabled unconditionally during open... need fix
this yet. Will post v2.
>> + unsigned long flags;
>> +
>> + spin_lock_irqsave(&bnad->bna_lock, flags);
>> +
>> + if (features & NETIF_F_HW_VLAN_CTAG_RX)
>> + bna_rx_vlan_strip_enable(bnad->rx_info[0].rx);
>> + else
>> + bna_rx_vlan_strip_disable(bnad->rx_info[0].rx);
>> +
>> + spin_unlock_irqrestore(&bnad->bna_lock, flags);
>> + }
>> +
>> + return 0;
>> +}
next prev parent reply other threads:[~2014-02-28 9:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-28 9:11 [PATCH net] bna: fix vlan tag stripping and implement its toggling Ivan Vecera
2014-02-28 9:24 ` Jiri Pirko
2014-02-28 9:53 ` Ivan Vecera [this message]
2014-02-28 9:42 ` Florian Westphal
2014-02-28 9:48 ` Ivan Vecera
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=53105C8A.1020908@redhat.com \
--to=ivecera@redhat.com \
--cc=davem@davemloft.net \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=rmody@brocade.com \
/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;
as well as URLs for NNTP newsgroup(s).