diff options
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 8 | ||||
-rw-r--r-- | drivers/net/e1000e/netdev.c | 8 | ||||
-rw-r--r-- | drivers/net/igb/igb_main.c | 9 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 11 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 5 |
5 files changed, 5 insertions, 36 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 80e3a65b4422..f8df8bd7fcbe 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -2484,7 +2484,7 @@ e1000_set_rx_mode(struct net_device *netdev) | |||
2484 | } else { | 2484 | } else { |
2485 | rctl &= ~E1000_RCTL_MPE; | 2485 | rctl &= ~E1000_RCTL_MPE; |
2486 | } | 2486 | } |
2487 | if (adapter->vlgrp && adapter->hw.mac_type != e1000_ich8lan) | 2487 | if (adapter->hw.mac_type != e1000_ich8lan) |
2488 | rctl |= E1000_RCTL_VFE; | 2488 | rctl |= E1000_RCTL_VFE; |
2489 | } | 2489 | } |
2490 | 2490 | ||
@@ -4967,8 +4967,6 @@ e1000_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) | |||
4967 | if (adapter->hw.mac_type != e1000_ich8lan) { | 4967 | if (adapter->hw.mac_type != e1000_ich8lan) { |
4968 | /* enable VLAN receive filtering */ | 4968 | /* enable VLAN receive filtering */ |
4969 | rctl = E1000_READ_REG(&adapter->hw, RCTL); | 4969 | rctl = E1000_READ_REG(&adapter->hw, RCTL); |
4970 | if (!(netdev->flags & IFF_PROMISC)) | ||
4971 | rctl |= E1000_RCTL_VFE; | ||
4972 | rctl &= ~E1000_RCTL_CFIEN; | 4970 | rctl &= ~E1000_RCTL_CFIEN; |
4973 | E1000_WRITE_REG(&adapter->hw, RCTL, rctl); | 4971 | E1000_WRITE_REG(&adapter->hw, RCTL, rctl); |
4974 | e1000_update_mng_vlan(adapter); | 4972 | e1000_update_mng_vlan(adapter); |
@@ -4980,10 +4978,6 @@ e1000_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) | |||
4980 | E1000_WRITE_REG(&adapter->hw, CTRL, ctrl); | 4978 | E1000_WRITE_REG(&adapter->hw, CTRL, ctrl); |
4981 | 4979 | ||
4982 | if (adapter->hw.mac_type != e1000_ich8lan) { | 4980 | if (adapter->hw.mac_type != e1000_ich8lan) { |
4983 | /* disable VLAN filtering */ | ||
4984 | rctl = E1000_READ_REG(&adapter->hw, RCTL); | ||
4985 | rctl &= ~E1000_RCTL_VFE; | ||
4986 | E1000_WRITE_REG(&adapter->hw, RCTL, rctl); | ||
4987 | if (adapter->mng_vlan_id != | 4981 | if (adapter->mng_vlan_id != |
4988 | (u16)E1000_MNG_VLAN_NONE) { | 4982 | (u16)E1000_MNG_VLAN_NONE) { |
4989 | e1000_vlan_rx_kill_vid(netdev, | 4983 | e1000_vlan_rx_kill_vid(netdev, |
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 3fe60268737a..be5953385bf6 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -1792,8 +1792,6 @@ static void e1000_vlan_rx_register(struct net_device *netdev, | |||
1792 | if (adapter->flags & FLAG_HAS_HW_VLAN_FILTER) { | 1792 | if (adapter->flags & FLAG_HAS_HW_VLAN_FILTER) { |
1793 | /* enable VLAN receive filtering */ | 1793 | /* enable VLAN receive filtering */ |
1794 | rctl = er32(RCTL); | 1794 | rctl = er32(RCTL); |
1795 | if (!(netdev->flags & IFF_PROMISC)) | ||
1796 | rctl |= E1000_RCTL_VFE; | ||
1797 | rctl &= ~E1000_RCTL_CFIEN; | 1795 | rctl &= ~E1000_RCTL_CFIEN; |
1798 | ew32(RCTL, rctl); | 1796 | ew32(RCTL, rctl); |
1799 | e1000_update_mng_vlan(adapter); | 1797 | e1000_update_mng_vlan(adapter); |
@@ -1805,10 +1803,6 @@ static void e1000_vlan_rx_register(struct net_device *netdev, | |||
1805 | ew32(CTRL, ctrl); | 1803 | ew32(CTRL, ctrl); |
1806 | 1804 | ||
1807 | if (adapter->flags & FLAG_HAS_HW_VLAN_FILTER) { | 1805 | if (adapter->flags & FLAG_HAS_HW_VLAN_FILTER) { |
1808 | /* disable VLAN filtering */ | ||
1809 | rctl = er32(RCTL); | ||
1810 | rctl &= ~E1000_RCTL_VFE; | ||
1811 | ew32(RCTL, rctl); | ||
1812 | if (adapter->mng_vlan_id != | 1806 | if (adapter->mng_vlan_id != |
1813 | (u16)E1000_MNG_VLAN_NONE) { | 1807 | (u16)E1000_MNG_VLAN_NONE) { |
1814 | e1000_vlan_rx_kill_vid(netdev, | 1808 | e1000_vlan_rx_kill_vid(netdev, |
@@ -2239,7 +2233,7 @@ static void e1000_set_multi(struct net_device *netdev) | |||
2239 | } else { | 2233 | } else { |
2240 | rctl &= ~(E1000_RCTL_UPE | E1000_RCTL_MPE); | 2234 | rctl &= ~(E1000_RCTL_UPE | E1000_RCTL_MPE); |
2241 | } | 2235 | } |
2242 | if (adapter->vlgrp && adapter->flags & FLAG_HAS_HW_VLAN_FILTER) | 2236 | if (adapter->flags & FLAG_HAS_HW_VLAN_FILTER) |
2243 | rctl |= E1000_RCTL_VFE; | 2237 | rctl |= E1000_RCTL_VFE; |
2244 | } | 2238 | } |
2245 | 2239 | ||
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 1ab8e3ec9e56..74dc43e29261 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -2277,8 +2277,7 @@ static void igb_set_multi(struct net_device *netdev) | |||
2277 | rctl &= ~E1000_RCTL_UPE; | 2277 | rctl &= ~E1000_RCTL_UPE; |
2278 | } else | 2278 | } else |
2279 | rctl &= ~(E1000_RCTL_UPE | E1000_RCTL_MPE); | 2279 | rctl &= ~(E1000_RCTL_UPE | E1000_RCTL_MPE); |
2280 | if (adapter->vlgrp) | 2280 | rctl |= E1000_RCTL_VFE; |
2281 | rctl |= E1000_RCTL_VFE; | ||
2282 | } | 2281 | } |
2283 | wr32(E1000_RCTL, rctl); | 2282 | wr32(E1000_RCTL, rctl); |
2284 | 2283 | ||
@@ -4224,8 +4223,6 @@ static void igb_vlan_rx_register(struct net_device *netdev, | |||
4224 | 4223 | ||
4225 | /* enable VLAN receive filtering */ | 4224 | /* enable VLAN receive filtering */ |
4226 | rctl = rd32(E1000_RCTL); | 4225 | rctl = rd32(E1000_RCTL); |
4227 | if (!(netdev->flags & IFF_PROMISC)) | ||
4228 | rctl |= E1000_RCTL_VFE; | ||
4229 | rctl &= ~E1000_RCTL_CFIEN; | 4226 | rctl &= ~E1000_RCTL_CFIEN; |
4230 | wr32(E1000_RCTL, rctl); | 4227 | wr32(E1000_RCTL, rctl); |
4231 | igb_update_mng_vlan(adapter); | 4228 | igb_update_mng_vlan(adapter); |
@@ -4237,10 +4234,6 @@ static void igb_vlan_rx_register(struct net_device *netdev, | |||
4237 | ctrl &= ~E1000_CTRL_VME; | 4234 | ctrl &= ~E1000_CTRL_VME; |
4238 | wr32(E1000_CTRL, ctrl); | 4235 | wr32(E1000_CTRL, ctrl); |
4239 | 4236 | ||
4240 | /* disable VLAN filtering */ | ||
4241 | rctl = rd32(E1000_RCTL); | ||
4242 | rctl &= ~E1000_RCTL_VFE; | ||
4243 | wr32(E1000_RCTL, rctl); | ||
4244 | if (adapter->mng_vlan_id != (u16)IGB_MNG_VLAN_NONE) { | 4237 | if (adapter->mng_vlan_id != (u16)IGB_MNG_VLAN_NONE) { |
4245 | igb_vlan_rx_kill_vid(netdev, adapter->mng_vlan_id); | 4238 | igb_vlan_rx_kill_vid(netdev, adapter->mng_vlan_id); |
4246 | adapter->mng_vlan_id = IGB_MNG_VLAN_NONE; | 4239 | adapter->mng_vlan_id = IGB_MNG_VLAN_NONE; |
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index ec95cd4ea588..aa75385cd6c7 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
@@ -1061,8 +1061,7 @@ ixgb_set_multi(struct net_device *netdev) | |||
1061 | } else { | 1061 | } else { |
1062 | rctl &= ~(IXGB_RCTL_UPE | IXGB_RCTL_MPE); | 1062 | rctl &= ~(IXGB_RCTL_UPE | IXGB_RCTL_MPE); |
1063 | } | 1063 | } |
1064 | if (adapter->vlgrp) | 1064 | rctl |= IXGB_RCTL_VFE; |
1065 | rctl |= IXGB_RCTL_VFE; | ||
1066 | } | 1065 | } |
1067 | 1066 | ||
1068 | if (netdev->mc_count > IXGB_MAX_NUM_MULTICAST_ADDRESSES) { | 1067 | if (netdev->mc_count > IXGB_MAX_NUM_MULTICAST_ADDRESSES) { |
@@ -2109,8 +2108,6 @@ ixgb_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) | |||
2109 | /* enable VLAN receive filtering */ | 2108 | /* enable VLAN receive filtering */ |
2110 | 2109 | ||
2111 | rctl = IXGB_READ_REG(&adapter->hw, RCTL); | 2110 | rctl = IXGB_READ_REG(&adapter->hw, RCTL); |
2112 | if (!(netdev->flags & IFF_PROMISC)) | ||
2113 | rctl |= IXGB_RCTL_VFE; | ||
2114 | rctl &= ~IXGB_RCTL_CFIEN; | 2111 | rctl &= ~IXGB_RCTL_CFIEN; |
2115 | IXGB_WRITE_REG(&adapter->hw, RCTL, rctl); | 2112 | IXGB_WRITE_REG(&adapter->hw, RCTL, rctl); |
2116 | } else { | 2113 | } else { |
@@ -2119,12 +2116,6 @@ ixgb_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) | |||
2119 | ctrl = IXGB_READ_REG(&adapter->hw, CTRL0); | 2116 | ctrl = IXGB_READ_REG(&adapter->hw, CTRL0); |
2120 | ctrl &= ~IXGB_CTRL0_VME; | 2117 | ctrl &= ~IXGB_CTRL0_VME; |
2121 | IXGB_WRITE_REG(&adapter->hw, CTRL0, ctrl); | 2118 | IXGB_WRITE_REG(&adapter->hw, CTRL0, ctrl); |
2122 | |||
2123 | /* disable VLAN filtering */ | ||
2124 | |||
2125 | rctl = IXGB_READ_REG(&adapter->hw, RCTL); | ||
2126 | rctl &= ~IXGB_RCTL_VFE; | ||
2127 | IXGB_WRITE_REG(&adapter->hw, RCTL, rctl); | ||
2128 | } | 2119 | } |
2129 | 2120 | ||
2130 | /* don't enable interrupts unless we are UP */ | 2121 | /* don't enable interrupts unless we are UP */ |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index afe3a1cdfdbd..7d8bf94d3783 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -1575,8 +1575,6 @@ static void ixgbe_vlan_rx_register(struct net_device *netdev, | |||
1575 | /* enable VLAN tag insert/strip */ | 1575 | /* enable VLAN tag insert/strip */ |
1576 | ctrl = IXGBE_READ_REG(&adapter->hw, IXGBE_VLNCTRL); | 1576 | ctrl = IXGBE_READ_REG(&adapter->hw, IXGBE_VLNCTRL); |
1577 | ctrl |= IXGBE_VLNCTRL_VME; | 1577 | ctrl |= IXGBE_VLNCTRL_VME; |
1578 | if (!(netdev->flags & IFF_PROMISC)) | ||
1579 | ctrl |= IXGBE_VLNCTRL_VFE; | ||
1580 | ctrl &= ~IXGBE_VLNCTRL_CFIEN; | 1578 | ctrl &= ~IXGBE_VLNCTRL_CFIEN; |
1581 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_VLNCTRL, ctrl); | 1579 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_VLNCTRL, ctrl); |
1582 | } | 1580 | } |
@@ -1655,8 +1653,7 @@ static void ixgbe_set_multi(struct net_device *netdev) | |||
1655 | } else { | 1653 | } else { |
1656 | fctrl &= ~(IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE); | 1654 | fctrl &= ~(IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE); |
1657 | } | 1655 | } |
1658 | if (adapter->vlgrp) | 1656 | fctrl |= IXGBE_VLNCTRL_VFE; |
1659 | fctrl |= IXGBE_VLNCTRL_VFE; | ||
1660 | } | 1657 | } |
1661 | 1658 | ||
1662 | IXGBE_WRITE_REG(hw, IXGBE_FCTRL, fctrl); | 1659 | IXGBE_WRITE_REG(hw, IXGBE_FCTRL, fctrl); |