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/igb/igb_main.c | |
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/igb/igb_main.c')
-rw-r--r-- | drivers/net/igb/igb_main.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index aaed129f4ca0..1ab8e3ec9e56 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -2268,14 +2268,18 @@ static void igb_set_multi(struct net_device *netdev) | |||
2268 | 2268 | ||
2269 | rctl = rd32(E1000_RCTL); | 2269 | rctl = rd32(E1000_RCTL); |
2270 | 2270 | ||
2271 | if (netdev->flags & IFF_PROMISC) | 2271 | if (netdev->flags & IFF_PROMISC) { |
2272 | rctl |= (E1000_RCTL_UPE | E1000_RCTL_MPE); | 2272 | rctl |= (E1000_RCTL_UPE | E1000_RCTL_MPE); |
2273 | else if (netdev->flags & IFF_ALLMULTI) { | 2273 | rctl &= ~E1000_RCTL_VFE; |
2274 | rctl |= E1000_RCTL_MPE; | 2274 | } else { |
2275 | rctl &= ~E1000_RCTL_UPE; | 2275 | if (netdev->flags & IFF_ALLMULTI) { |
2276 | } else | 2276 | rctl |= E1000_RCTL_MPE; |
2277 | rctl &= ~(E1000_RCTL_UPE | E1000_RCTL_MPE); | 2277 | rctl &= ~E1000_RCTL_UPE; |
2278 | 2278 | } else | |
2279 | rctl &= ~(E1000_RCTL_UPE | E1000_RCTL_MPE); | ||
2280 | if (adapter->vlgrp) | ||
2281 | rctl |= E1000_RCTL_VFE; | ||
2282 | } | ||
2279 | wr32(E1000_RCTL, rctl); | 2283 | wr32(E1000_RCTL, rctl); |
2280 | 2284 | ||
2281 | if (!netdev->mc_count) { | 2285 | if (!netdev->mc_count) { |
@@ -4220,7 +4224,8 @@ static void igb_vlan_rx_register(struct net_device *netdev, | |||
4220 | 4224 | ||
4221 | /* enable VLAN receive filtering */ | 4225 | /* enable VLAN receive filtering */ |
4222 | rctl = rd32(E1000_RCTL); | 4226 | rctl = rd32(E1000_RCTL); |
4223 | rctl |= E1000_RCTL_VFE; | 4227 | if (!(netdev->flags & IFF_PROMISC)) |
4228 | rctl |= E1000_RCTL_VFE; | ||
4224 | rctl &= ~E1000_RCTL_CFIEN; | 4229 | rctl &= ~E1000_RCTL_CFIEN; |
4225 | wr32(E1000_RCTL, rctl); | 4230 | wr32(E1000_RCTL, rctl); |
4226 | igb_update_mng_vlan(adapter); | 4231 | igb_update_mng_vlan(adapter); |