From 78ed11a56bd8679aa6d51eb36b448342c59a7824 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Wed, 16 Jul 2008 20:16:14 -0700 Subject: 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 Acked-by: Jeff Kirsher Acked-by: Peter P Waskiewicz Jr Signed-off-by: David S. Miller --- drivers/net/ixgb/ixgb_main.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'drivers/net/ixgb') diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index ec95cd4ea588..aa75385cd6c7 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c @@ -1061,8 +1061,7 @@ ixgb_set_multi(struct net_device *netdev) } else { rctl &= ~(IXGB_RCTL_UPE | IXGB_RCTL_MPE); } - if (adapter->vlgrp) - rctl |= IXGB_RCTL_VFE; + rctl |= IXGB_RCTL_VFE; } if (netdev->mc_count > IXGB_MAX_NUM_MULTICAST_ADDRESSES) { @@ -2109,8 +2108,6 @@ ixgb_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) /* enable VLAN receive filtering */ rctl = IXGB_READ_REG(&adapter->hw, RCTL); - if (!(netdev->flags & IFF_PROMISC)) - rctl |= IXGB_RCTL_VFE; rctl &= ~IXGB_RCTL_CFIEN; IXGB_WRITE_REG(&adapter->hw, RCTL, rctl); } else { @@ -2119,12 +2116,6 @@ ixgb_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) ctrl = IXGB_READ_REG(&adapter->hw, CTRL0); ctrl &= ~IXGB_CTRL0_VME; IXGB_WRITE_REG(&adapter->hw, CTRL0, ctrl); - - /* disable VLAN filtering */ - - rctl = IXGB_READ_REG(&adapter->hw, RCTL); - rctl &= ~IXGB_RCTL_VFE; - IXGB_WRITE_REG(&adapter->hw, RCTL, rctl); } /* don't enable interrupts unless we are UP */ -- cgit v1.2.1