Subject: Re: [PATCH net] bna: fix vlan tag stripping and implement its toggling

From: Ivan Vecera <[email-masked]>
Date: Fri, 28 Feb 2014 10:53:14 +0100

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;
>> +}