summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-06-01 09:43:57 -0700
committerJeff Garzik <jeff@garzik.org>2007-06-03 11:44:19 -0400
commitd2d1acdb6a632486be9a731f40c68980c09f0490 (patch)
treef3c4356f6d57985a6b22b074c7d154bdff0809da
parente68a8c10c4c5daf363e946d10c1a5cba77d7f92c (diff)
VLAN: kill_vid is only useful for VLAN filtering devices
The interface for network device VLAN extension was confusing. The kill_vid function is only really useful for devices that do hardware filtering. Devices that only do VLAN receiption without filtering were being forced to provide the hook, and there were bugs in those devices. Many drivers had kill_vid routine that called vlan_group_set_device, with NULL, but that is done already. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--net/8021q/vlan.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index bd93c45778d4..ceef57c9ab32 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -240,10 +240,8 @@ static int unregister_vlan_dev(struct net_device *real_dev,
* interlock with HW accelerating devices or SW vlan
* input packet processing.
*/
- if (real_dev->features &
- (NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER)) {
+ if (real_dev->features & NETIF_F_HW_VLAN_FILTER)
real_dev->vlan_rx_kill_vid(real_dev, vlan_id);
- }
vlan_group_set_device(grp, vlan_id, NULL);
synchronize_net();
@@ -409,16 +407,14 @@ static struct net_device *register_vlan_device(const char *eth_IF_name,
}
if ((real_dev->features & NETIF_F_HW_VLAN_RX) &&
- (real_dev->vlan_rx_register == NULL ||
- real_dev->vlan_rx_kill_vid == NULL)) {
+ !real_dev->vlan_rx_register) {
printk(VLAN_DBG "%s: Device %s has buggy VLAN hw accel.\n",
__FUNCTION__, real_dev->name);
goto out_put_dev;
}
if ((real_dev->features & NETIF_F_HW_VLAN_FILTER) &&
- (real_dev->vlan_rx_add_vid == NULL ||
- real_dev->vlan_rx_kill_vid == NULL)) {
+ (!real_dev->vlan_rx_add_vid || !real_dev->vlan_rx_kill_vid)) {
printk(VLAN_DBG "%s: Device %s has buggy VLAN hw accel.\n",
__FUNCTION__, real_dev->name);
goto out_put_dev;