Subject: [PATCH net-next-2.6] bnx2x: Dont update vlan_features in bnx2x_set_tso()

From: Eric Dumazet <[email-masked]>
Date: Fri, 24 Jul 2009 09:21:19 +0200

Michael Chan a écrit :
> On Thu, 2009-07-23 at 10:59 -0700, David Miller wrote:
>> From: Eric Dumazet <[email-masked]>
>> Date: Thu, 23 Jul 2009 14:01:38 +0200
>>
>>> [PATCH net-next-2.6] bnx2: Update vlan_features
>>>
>>> In order to get full use of some advanced features of BNX2, we now need to
>>> fill dev->vlan_features.
>>>
>>> Patch successfully tested with vlan devices built on top of bonding.
>>> (bond0 : one bnx2 slave, one tg3 slave (not yet vlan_features enabled)
>>>
>>> Signed-off-by: Eric Dumazet <[email-masked]>
>> Can I get some Broadcom ACKs for this?
>>
> I've reviewed and tested Eric's 2nd patch.  Thanks.
> 
> Acked-by: Michael Chan <[email-masked]>

Thanks

Based on Patrick feedback, I believe we can add this followup too

[PATCH net-next-2.6] bnx2x: Dont update vlan_features in bnx2x_set_tso()

Patrick said : "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."

Signed-off-by: Eric Dumazet <[email-masked]>
---

diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index c4c42b3..a2de0cd 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -9349,17 +9349,9 @@ 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
 	}
 
 	return 0;