diff options
author | Patrick McHardy <kaber@trash.net> | 2008-07-17 05:15:45 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-17 05:15:45 +0200 |
commit | 746b9f0228a1c607b3db67c80da1c2a963321926 (patch) | |
tree | ea5e89d69279918691885c7c2abbc8a0894f4c9c /drivers/net/e1000/e1000_main.c | |
parent | net/ipv4/tcp.c: Fix use of PULLHUP instead of POLLHUP in comments. (diff) | |
download | linux-746b9f0228a1c607b3db67c80da1c2a963321926.tar.xz linux-746b9f0228a1c607b3db67c80da1c2a963321926.zip |
netdrv intel: disable VLAN filtering in promiscous mode
As discussed in this thread:
http://www.mail-archive.com/netdev@vger.kernel.org/msg53976.html
promiscous mode means to disable *all* filters. Currently only unicast
and multicast filtering is disabled. This patch changes all Intel
drivers to also disable VLAN filtering.
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/e1000_main.c')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 7aa458f7d8b8..80e3a65b4422 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -2477,10 +2477,15 @@ e1000_set_rx_mode(struct net_device *netdev) if (netdev->flags & IFF_PROMISC) { rctl |= (E1000_RCTL_UPE | E1000_RCTL_MPE); - } else if (netdev->flags & IFF_ALLMULTI) { - rctl |= E1000_RCTL_MPE; + rctl &= ~E1000_RCTL_VFE; } else { - rctl &= ~E1000_RCTL_MPE; + if (netdev->flags & IFF_ALLMULTI) { + rctl |= E1000_RCTL_MPE; + } else { + rctl &= ~E1000_RCTL_MPE; + } + if (adapter->vlgrp && adapter->hw.mac_type != e1000_ich8lan) + rctl |= E1000_RCTL_VFE; } uc_ptr = NULL; @@ -4962,7 +4967,8 @@ e1000_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) if (adapter->hw.mac_type != e1000_ich8lan) { /* enable VLAN receive filtering */ rctl = E1000_READ_REG(&adapter->hw, RCTL); - rctl |= E1000_RCTL_VFE; + if (!(netdev->flags & IFF_PROMISC)) + rctl |= E1000_RCTL_VFE; rctl &= ~E1000_RCTL_CFIEN; E1000_WRITE_REG(&adapter->hw, RCTL, rctl); e1000_update_mng_vlan(adapter); |