diff options
author | Patrick McHardy <kaber@trash.net> | 2008-07-16 23:16:14 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-16 23:16:14 -0400 |
commit | 78ed11a56bd8679aa6d51eb36b448342c59a7824 (patch) | |
tree | d5feb0f95f0002841d4d099aaac9fecb640bc3b5 /drivers/net/ixgb/ixgb_main.c | |
parent | 746b9f0228a1c607b3db67c80da1c2a963321926 (diff) |
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 <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/ixgb/ixgb_main.c')
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index ec95cd4ea58..aa75385cd6c 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) | |||
1061 | } else { | 1061 | } else { |
1062 | rctl &= ~(IXGB_RCTL_UPE | IXGB_RCTL_MPE); | 1062 | rctl &= ~(IXGB_RCTL_UPE | IXGB_RCTL_MPE); |
1063 | } | 1063 | } |
1064 | if (adapter->vlgrp) | 1064 | rctl |= IXGB_RCTL_VFE; |
1065 | rctl |= IXGB_RCTL_VFE; | ||
1066 | } | 1065 | } |
1067 | 1066 | ||
1068 | if (netdev->mc_count > IXGB_MAX_NUM_MULTICAST_ADDRESSES) { | 1067 | 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) | |||
2109 | /* enable VLAN receive filtering */ | 2108 | /* enable VLAN receive filtering */ |
2110 | 2109 | ||
2111 | rctl = IXGB_READ_REG(&adapter->hw, RCTL); | 2110 | rctl = IXGB_READ_REG(&adapter->hw, RCTL); |
2112 | if (!(netdev->flags & IFF_PROMISC)) | ||
2113 | rctl |= IXGB_RCTL_VFE; | ||
2114 | rctl &= ~IXGB_RCTL_CFIEN; | 2111 | rctl &= ~IXGB_RCTL_CFIEN; |
2115 | IXGB_WRITE_REG(&adapter->hw, RCTL, rctl); | 2112 | IXGB_WRITE_REG(&adapter->hw, RCTL, rctl); |
2116 | } else { | 2113 | } else { |
@@ -2119,12 +2116,6 @@ ixgb_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) | |||
2119 | ctrl = IXGB_READ_REG(&adapter->hw, CTRL0); | 2116 | ctrl = IXGB_READ_REG(&adapter->hw, CTRL0); |
2120 | ctrl &= ~IXGB_CTRL0_VME; | 2117 | ctrl &= ~IXGB_CTRL0_VME; |
2121 | IXGB_WRITE_REG(&adapter->hw, CTRL0, ctrl); | 2118 | IXGB_WRITE_REG(&adapter->hw, CTRL0, ctrl); |
2122 | |||
2123 | /* disable VLAN filtering */ | ||
2124 | |||
2125 | rctl = IXGB_READ_REG(&adapter->hw, RCTL); | ||
2126 | rctl &= ~IXGB_RCTL_VFE; | ||
2127 | IXGB_WRITE_REG(&adapter->hw, RCTL, rctl); | ||
2128 | } | 2119 | } |
2129 | 2120 | ||
2130 | /* don't enable interrupts unless we are UP */ | 2121 | /* don't enable interrupts unless we are UP */ |