diff options
Diffstat (limited to 'drivers/net/vmxnet3/vmxnet3_drv.c')
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_drv.c | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 1cbacb38965..0959583feb2 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
@@ -1929,14 +1929,17 @@ static void | |||
1929 | vmxnet3_vlan_rx_add_vid(struct net_device *netdev, u16 vid) | 1929 | vmxnet3_vlan_rx_add_vid(struct net_device *netdev, u16 vid) |
1930 | { | 1930 | { |
1931 | struct vmxnet3_adapter *adapter = netdev_priv(netdev); | 1931 | struct vmxnet3_adapter *adapter = netdev_priv(netdev); |
1932 | u32 *vfTable = adapter->shared->devRead.rxFilterConf.vfTable; | ||
1933 | unsigned long flags; | ||
1934 | 1932 | ||
1935 | VMXNET3_SET_VFTABLE_ENTRY(vfTable, vid); | 1933 | if (!(netdev->flags & IFF_PROMISC)) { |
1936 | spin_lock_irqsave(&adapter->cmd_lock, flags); | 1934 | u32 *vfTable = adapter->shared->devRead.rxFilterConf.vfTable; |
1937 | VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, | 1935 | unsigned long flags; |
1938 | VMXNET3_CMD_UPDATE_VLAN_FILTERS); | 1936 | |
1939 | spin_unlock_irqrestore(&adapter->cmd_lock, flags); | 1937 | VMXNET3_SET_VFTABLE_ENTRY(vfTable, vid); |
1938 | spin_lock_irqsave(&adapter->cmd_lock, flags); | ||
1939 | VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, | ||
1940 | VMXNET3_CMD_UPDATE_VLAN_FILTERS); | ||
1941 | spin_unlock_irqrestore(&adapter->cmd_lock, flags); | ||
1942 | } | ||
1940 | 1943 | ||
1941 | set_bit(vid, adapter->active_vlans); | 1944 | set_bit(vid, adapter->active_vlans); |
1942 | } | 1945 | } |
@@ -1946,14 +1949,17 @@ static void | |||
1946 | vmxnet3_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) | 1949 | vmxnet3_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) |
1947 | { | 1950 | { |
1948 | struct vmxnet3_adapter *adapter = netdev_priv(netdev); | 1951 | struct vmxnet3_adapter *adapter = netdev_priv(netdev); |
1949 | u32 *vfTable = adapter->shared->devRead.rxFilterConf.vfTable; | ||
1950 | unsigned long flags; | ||
1951 | 1952 | ||
1952 | VMXNET3_CLEAR_VFTABLE_ENTRY(vfTable, vid); | 1953 | if (!(netdev->flags & IFF_PROMISC)) { |
1953 | spin_lock_irqsave(&adapter->cmd_lock, flags); | 1954 | u32 *vfTable = adapter->shared->devRead.rxFilterConf.vfTable; |
1954 | VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, | 1955 | unsigned long flags; |
1955 | VMXNET3_CMD_UPDATE_VLAN_FILTERS); | 1956 | |
1956 | spin_unlock_irqrestore(&adapter->cmd_lock, flags); | 1957 | VMXNET3_CLEAR_VFTABLE_ENTRY(vfTable, vid); |
1958 | spin_lock_irqsave(&adapter->cmd_lock, flags); | ||
1959 | VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, | ||
1960 | VMXNET3_CMD_UPDATE_VLAN_FILTERS); | ||
1961 | spin_unlock_irqrestore(&adapter->cmd_lock, flags); | ||
1962 | } | ||
1957 | 1963 | ||
1958 | clear_bit(vid, adapter->active_vlans); | 1964 | clear_bit(vid, adapter->active_vlans); |
1959 | } | 1965 | } |