diff options
author | Jesse Gross | 2011-06-23 13:04:39 +0000 |
---|---|---|
committer | David S. Miller | 2011-06-27 20:56:51 -0700 |
commit | 72e85c45b9541e1f3d233e775da1dc6f68b85867 (patch) | |
tree | f5cb5ae4166282031c77fc8dc3a324a43304679e /drivers/net/vmxnet3/vmxnet3_ethtool.c | |
parent | cfbf7586bc07cd6d14cd93ca56d8a3f90e248625 (diff) |
vmxnet3: Convert to new vlan model.
This converts the vmxnet3 driver to use the new vlan model. In doing so
it fixes missing tags in tcpdump and failure to do checksum offload when
tx vlan offload is disabled.
CC: Shreyas Bhatewara <sbhatewara@vmware.com>
CC: VMware PV-Drivers <pv-drivers@vmware.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Scott J. Goldman <scottjg@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vmxnet3/vmxnet3_ethtool.c')
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_ethtool.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c index bba7c15de5b6..27400edeef55 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethtool.c +++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c @@ -268,7 +268,7 @@ int vmxnet3_set_features(struct net_device *netdev, u32 features) unsigned long flags; u32 changed = features ^ netdev->features; - if (changed & (NETIF_F_RXCSUM|NETIF_F_LRO)) { + if (changed & (NETIF_F_RXCSUM | NETIF_F_LRO | NETIF_F_HW_VLAN_RX)) { if (features & NETIF_F_RXCSUM) adapter->shared->devRead.misc.uptFeatures |= UPT1_F_RXCSUM; @@ -284,6 +284,13 @@ int vmxnet3_set_features(struct net_device *netdev, u32 features) adapter->shared->devRead.misc.uptFeatures &= ~UPT1_F_LRO; + if (features & NETIF_F_HW_VLAN_RX) + adapter->shared->devRead.misc.uptFeatures |= + UPT1_F_RXVLAN; + else + adapter->shared->devRead.misc.uptFeatures &= + ~UPT1_F_RXVLAN; + spin_lock_irqsave(&adapter->cmd_lock, flags); VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, VMXNET3_CMD_UPDATE_FEATURE); |