bnx2: Always set ETH_FLAG_TXVLAN
authorMichael Chan <mchan@broadcom.com>
Mon, 24 Jan 2011 12:59:02 +0000 (12:59 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Jan 2011 07:16:07 +0000 (23:16 -0800)
TSO does not work if the VLAN tag is in the packet (non-accelerated).
We may be able to remove this restriction in future firmware.

Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bnx2.c

index df99edf3464ad59e4872ea82f008c13c9ae3e942..99e7652e2169dd20574ecabbf50332236bb08b1a 100644 (file)
@@ -7553,6 +7553,10 @@ bnx2_set_flags(struct net_device *dev, u32 data)
            !(data & ETH_FLAG_RXVLAN))
                return -EINVAL;
 
+       /* TSO with VLAN tag won't work with current firmware */
+       if (!(data & ETH_FLAG_TXVLAN))
+               return -EINVAL;
+
        rc = ethtool_op_set_flags(dev, data, ETH_FLAG_RXHASH | ETH_FLAG_RXVLAN |
                                  ETH_FLAG_TXVLAN);
        if (rc)