diff options
author | Patrick McHardy <kaber@trash.net> | 2008-07-16 23:16:14 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-16 23:16:14 -0400 |
commit | 78ed11a56bd8679aa6d51eb36b448342c59a7824 (patch) | |
tree | d5feb0f95f0002841d4d099aaac9fecb640bc3b5 /drivers/net/e1000e | |
parent | 746b9f0228a1c607b3db67c80da1c2a963321926 (diff) |
netdrv intel: always enable VLAN filtering except in promiscous mode
Currently VLAN filtering is enabled when the first VLAN is added.
Obviously before that there's no point in receiving any VLAN packets.
Now that we disable VLAN filtering in promiscous mode, we can keep
the VLAN filters enabled the remaining time.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000e')
-rw-r--r-- | drivers/net/e1000e/netdev.c | 8 |
1 files changed, 1 insertions, 7 deletions
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 | ||