aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-07-16 23:16:14 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-16 23:16:14 -0400
commit78ed11a56bd8679aa6d51eb36b448342c59a7824 (patch)
treed5feb0f95f0002841d4d099aaac9fecb640bc3b5 /drivers/net/e1000
parent746b9f0228a1c607b3db67c80da1c2a963321926 (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/e1000')
-rw-r--r--drivers/net/e1000/e1000_main.c8
1 files changed, 1 insertions, 7 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,