diff options
author | Patrick McHardy <kaber@trash.net> | 2008-07-16 23:15:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-16 23:15:45 -0400 |
commit | 746b9f0228a1c607b3db67c80da1c2a963321926 (patch) | |
tree | ea5e89d69279918691885c7c2abbc8a0894f4c9c /drivers/net/e1000 | |
parent | 70efce27fc3d54271519244dc5e47da4ed711dd4 (diff) |
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')
-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) | |||
2477 | 2477 | ||
2478 | if (netdev->flags & IFF_PROMISC) { | 2478 | if (netdev->flags & IFF_PROMISC) { |
2479 | rctl |= (E1000_RCTL_UPE | E1000_RCTL_MPE); | 2479 | rctl |= (E1000_RCTL_UPE | E1000_RCTL_MPE); |
2480 | } else if (netdev->flags & IFF_ALLMULTI) { | 2480 | rctl &= ~E1000_RCTL_VFE; |
2481 | rctl |= E1000_RCTL_MPE; | ||
2482 | } else { | 2481 | } else { |
2483 | rctl &= ~E1000_RCTL_MPE; | 2482 | if (netdev->flags & IFF_ALLMULTI) { |
2483 | rctl |= E1000_RCTL_MPE; | ||
2484 | } else { | ||
2485 | rctl &= ~E1000_RCTL_MPE; | ||
2486 | } | ||
2487 | if (adapter->vlgrp && adapter->hw.mac_type != e1000_ich8lan) | ||
2488 | rctl |= E1000_RCTL_VFE; | ||
2484 | } | 2489 | } |
2485 | 2490 | ||
2486 | uc_ptr = NULL; | 2491 | uc_ptr = NULL; |
@@ -4962,7 +4967,8 @@ e1000_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) | |||
4962 | if (adapter->hw.mac_type != e1000_ich8lan) { | 4967 | if (adapter->hw.mac_type != e1000_ich8lan) { |
4963 | /* enable VLAN receive filtering */ | 4968 | /* enable VLAN receive filtering */ |
4964 | rctl = E1000_READ_REG(&adapter->hw, RCTL); | 4969 | rctl = E1000_READ_REG(&adapter->hw, RCTL); |
4965 | rctl |= E1000_RCTL_VFE; | 4970 | if (!(netdev->flags & IFF_PROMISC)) |
4971 | rctl |= E1000_RCTL_VFE; | ||
4966 | rctl &= ~E1000_RCTL_CFIEN; | 4972 | rctl &= ~E1000_RCTL_CFIEN; |
4967 | E1000_WRITE_REG(&adapter->hw, RCTL, rctl); | 4973 | E1000_WRITE_REG(&adapter->hw, RCTL, rctl); |
4968 | e1000_update_mng_vlan(adapter); | 4974 | e1000_update_mng_vlan(adapter); |