diff options
Diffstat (limited to 'drivers/net/e1000e/netdev.c')
-rw-r--r-- | drivers/net/e1000e/netdev.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index e546b4ebf155..2381cb76f17c 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -2031,11 +2031,14 @@ static void e1000_vlan_rx_add_vid(struct net_device *netdev, u16 vid) | |||
2031 | E1000_MNG_DHCP_COOKIE_STATUS_VLAN) && | 2031 | E1000_MNG_DHCP_COOKIE_STATUS_VLAN) && |
2032 | (vid == adapter->mng_vlan_id)) | 2032 | (vid == adapter->mng_vlan_id)) |
2033 | return; | 2033 | return; |
2034 | |||
2034 | /* add VID to filter table */ | 2035 | /* add VID to filter table */ |
2035 | index = (vid >> 5) & 0x7F; | 2036 | if (adapter->flags & FLAG_HAS_HW_VLAN_FILTER) { |
2036 | vfta = E1000_READ_REG_ARRAY(hw, E1000_VFTA, index); | 2037 | index = (vid >> 5) & 0x7F; |
2037 | vfta |= (1 << (vid & 0x1F)); | 2038 | vfta = E1000_READ_REG_ARRAY(hw, E1000_VFTA, index); |
2038 | e1000e_write_vfta(hw, index, vfta); | 2039 | vfta |= (1 << (vid & 0x1F)); |
2040 | hw->mac.ops.write_vfta(hw, index, vfta); | ||
2041 | } | ||
2039 | } | 2042 | } |
2040 | 2043 | ||
2041 | static void e1000_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) | 2044 | static void e1000_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) |
@@ -2060,10 +2063,12 @@ static void e1000_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) | |||
2060 | } | 2063 | } |
2061 | 2064 | ||
2062 | /* remove VID from filter table */ | 2065 | /* remove VID from filter table */ |
2063 | index = (vid >> 5) & 0x7F; | 2066 | if (adapter->flags & FLAG_HAS_HW_VLAN_FILTER) { |
2064 | vfta = E1000_READ_REG_ARRAY(hw, E1000_VFTA, index); | 2067 | index = (vid >> 5) & 0x7F; |
2065 | vfta &= ~(1 << (vid & 0x1F)); | 2068 | vfta = E1000_READ_REG_ARRAY(hw, E1000_VFTA, index); |
2066 | e1000e_write_vfta(hw, index, vfta); | 2069 | vfta &= ~(1 << (vid & 0x1F)); |
2070 | hw->mac.ops.write_vfta(hw, index, vfta); | ||
2071 | } | ||
2067 | } | 2072 | } |
2068 | 2073 | ||
2069 | static void e1000_update_mng_vlan(struct e1000_adapter *adapter) | 2074 | static void e1000_update_mng_vlan(struct e1000_adapter *adapter) |