aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vmxnet3/vmxnet3_drv.c
diff options
context:
space:
mode:
authorShreyas Bhatewara <sbhatewara@vmware.com>2011-01-14 09:59:36 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-16 00:21:12 -0500
commit54da3d00f6e781f69cb8726757d190704b702a8e (patch)
tree76722a7677b19420d432de4e3bfe58c4f9d4d9b4 /drivers/net/vmxnet3/vmxnet3_drv.c
parentf9f2502626133e33599578a16ed54435733f062c (diff)
vmxnet3: Enable HW Rx VLAN stripping by default
Make hw vlan tag stripping as enabled by default. Thereby remove the code to conditionally enable it later. Signed-off-by: Guolin Yang <gyang@vmware.com> Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vmxnet3/vmxnet3_drv.c')
-rw-r--r--drivers/net/vmxnet3/vmxnet3_drv.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 89bcee8ee3d9..f47db1cc766f 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -1867,13 +1867,8 @@ vmxnet3_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp)
1867 /* add vlan rx stripping. */ 1867 /* add vlan rx stripping. */
1868 if (adapter->netdev->features & NETIF_F_HW_VLAN_RX) { 1868 if (adapter->netdev->features & NETIF_F_HW_VLAN_RX) {
1869 int i; 1869 int i;
1870 struct Vmxnet3_DSDevRead *devRead = &shared->devRead;
1871 adapter->vlan_grp = grp; 1870 adapter->vlan_grp = grp;
1872 1871
1873 /* update FEATURES to device */
1874 devRead->misc.uptFeatures |= UPT1_F_RXVLAN;
1875 VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
1876 VMXNET3_CMD_UPDATE_FEATURE);
1877 /* 1872 /*
1878 * Clear entire vfTable; then enable untagged pkts. 1873 * Clear entire vfTable; then enable untagged pkts.
1879 * Note: setting one entry in vfTable to non-zero turns 1874 * Note: setting one entry in vfTable to non-zero turns
@@ -1905,11 +1900,6 @@ vmxnet3_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp)
1905 } 1900 }
1906 VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, 1901 VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
1907 VMXNET3_CMD_UPDATE_VLAN_FILTERS); 1902 VMXNET3_CMD_UPDATE_VLAN_FILTERS);
1908
1909 /* update FEATURES to device */
1910 devRead->misc.uptFeatures &= ~UPT1_F_RXVLAN;
1911 VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
1912 VMXNET3_CMD_UPDATE_FEATURE);
1913 } 1903 }
1914 } 1904 }
1915} 1905}
@@ -2083,10 +2073,8 @@ vmxnet3_setup_driver_shared(struct vmxnet3_adapter *adapter)
2083 devRead->misc.uptFeatures |= UPT1_F_LRO; 2073 devRead->misc.uptFeatures |= UPT1_F_LRO;
2084 devRead->misc.maxNumRxSG = cpu_to_le16(1 + MAX_SKB_FRAGS); 2074 devRead->misc.maxNumRxSG = cpu_to_le16(1 + MAX_SKB_FRAGS);
2085 } 2075 }
2086 if ((adapter->netdev->features & NETIF_F_HW_VLAN_RX) && 2076 if (adapter->netdev->features & NETIF_F_HW_VLAN_RX)
2087 adapter->vlan_grp) {
2088 devRead->misc.uptFeatures |= UPT1_F_RXVLAN; 2077 devRead->misc.uptFeatures |= UPT1_F_RXVLAN;
2089 }
2090 2078
2091 devRead->misc.mtu = cpu_to_le32(adapter->netdev->mtu); 2079 devRead->misc.mtu = cpu_to_le32(adapter->netdev->mtu);
2092 devRead->misc.queueDescPA = cpu_to_le64(adapter->queue_desc_pa); 2080 devRead->misc.queueDescPA = cpu_to_le64(adapter->queue_desc_pa);