Subject: Re: [net-next 6/10] bnx2x: Update vlan_features

From: Patrick McHardy <[email-masked]>
Date: Thu, 23 Jul 2009 12:46:27 +0200

Eilon Greenstein wrote:
> As noted by Or Gerlitz <[email-masked]>, the vlan_features was not
> updated
> 
> Signed-off-by: Eilon Greenstein <[email-masked]>
> ---
>  drivers/net/bnx2x_main.c |   19 +++++++++++++++++--
>  1 files changed, 17 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
> index 18c3803..b404a9b 100644
> --- a/drivers/net/bnx2x_main.c
> +++ b/drivers/net/bnx2x_main.c
> @@ -9310,9 +9310,17 @@ static int bnx2x_set_tso(struct net_device *dev, u32 data)
>  	if (data) {
>  		dev->features |= (NETIF_F_TSO | NETIF_F_TSO_ECN);
>  		dev->features |= NETIF_F_TSO6;
> +#ifdef BCM_VLAN
> +		dev->vlan_features |= (NETIF_F_TSO | NETIF_F_TSO_ECN);
> +		dev->vlan_features |= NETIF_F_TSO6;
> +#endif
>  	} else {
>  		dev->features &= ~(NETIF_F_TSO | NETIF_F_TSO_ECN);
>  		dev->features &= ~NETIF_F_TSO6;
> +#ifdef BCM_VLAN
> +		dev->vlan_features &= ~(NETIF_F_TSO | NETIF_F_TSO_ECN);
> +		dev->vlan_features &= ~NETIF_F_TSO6;
> +#endif

vlan_features doesn't need to be updated, the resulting dev->features
of the VLAN device is computed as the intersection of dev->features
and dev->vlan_features.