aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-07-16 23:15:45 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-16 23:15:45 -0400
commit746b9f0228a1c607b3db67c80da1c2a963321926 (patch)
treeea5e89d69279918691885c7c2abbc8a0894f4c9c /drivers/net/e1000e
parent70efce27fc3d54271519244dc5e47da4ed711dd4 (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/e1000e')
-rw-r--r--drivers/net/e1000e/netdev.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 80592bdbe31e..3fe60268737a 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -1792,7 +1792,8 @@ 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 rctl |= E1000_RCTL_VFE; 1795 if (!(netdev->flags & IFF_PROMISC))
1796 rctl |= E1000_RCTL_VFE;
1796 rctl &= ~E1000_RCTL_CFIEN; 1797 rctl &= ~E1000_RCTL_CFIEN;
1797 ew32(RCTL, rctl); 1798 ew32(RCTL, rctl);
1798 e1000_update_mng_vlan(adapter); 1799 e1000_update_mng_vlan(adapter);
@@ -2230,11 +2231,16 @@ static void e1000_set_multi(struct net_device *netdev)
2230 2231
2231 if (netdev->flags & IFF_PROMISC) { 2232 if (netdev->flags & IFF_PROMISC) {
2232 rctl |= (E1000_RCTL_UPE | E1000_RCTL_MPE); 2233 rctl |= (E1000_RCTL_UPE | E1000_RCTL_MPE);
2233 } else if (netdev->flags & IFF_ALLMULTI) { 2234 rctl &= ~E1000_RCTL_VFE;
2234 rctl |= E1000_RCTL_MPE;
2235 rctl &= ~E1000_RCTL_UPE;
2236 } else { 2235 } else {
2237 rctl &= ~(E1000_RCTL_UPE | E1000_RCTL_MPE); 2236 if (netdev->flags & IFF_ALLMULTI) {
2237 rctl |= E1000_RCTL_MPE;
2238 rctl &= ~E1000_RCTL_UPE;
2239 } else {
2240 rctl &= ~(E1000_RCTL_UPE | E1000_RCTL_MPE);
2241 }
2242 if (adapter->vlgrp && adapter->flags & FLAG_HAS_HW_VLAN_FILTER)
2243 rctl |= E1000_RCTL_VFE;
2238 } 2244 }
2239 2245
2240 ew32(RCTL, rctl); 2246 ew32(RCTL, rctl);