aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q
diff options
context:
space:
mode:
Diffstat (limited to 'net/8021q')
-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,
240 * interlock with HW accelerating devices or SW vlan 240 * interlock with HW accelerating devices or SW vlan
241 * input packet processing. 241 * input packet processing.
242 */ 242 */
243 if (real_dev->features & 243 if (real_dev->features & NETIF_F_HW_VLAN_FILTER)
244 (NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER)) {
245 real_dev->vlan_rx_kill_vid(real_dev, vlan_id); 244 real_dev->vlan_rx_kill_vid(real_dev, vlan_id);
246 }
247 245
248 vlan_group_set_device(grp, vlan_id, NULL); 246 vlan_group_set_device(grp, vlan_id, NULL);
249 synchronize_net(); 247 synchronize_net();
@@ -409,16 +407,14 @@ static struct net_device *register_vlan_device(const char *eth_IF_name,
409 } 407 }
410 408
411 if ((real_dev->features & NETIF_F_HW_VLAN_RX) && 409 if ((real_dev->features & NETIF_F_HW_VLAN_RX) &&
412 (real_dev->vlan_rx_register == NULL || 410 !real_dev->vlan_rx_register) {
413 real_dev->vlan_rx_kill_vid == NULL)) {
414 printk(VLAN_DBG "%s: Device %s has buggy VLAN hw accel.\n", 411 printk(VLAN_DBG "%s: Device %s has buggy VLAN hw accel.\n",
415 __FUNCTION__, real_dev->name); 412 __FUNCTION__, real_dev->name);
416 goto out_put_dev; 413 goto out_put_dev;
417 } 414 }
418 415
419 if ((real_dev->features & NETIF_F_HW_VLAN_FILTER) && 416 if ((real_dev->features & NETIF_F_HW_VLAN_FILTER) &&
420 (real_dev->vlan_rx_add_vid == NULL || 417 (!real_dev->vlan_rx_add_vid || !real_dev->vlan_rx_kill_vid)) {
421 real_dev->vlan_rx_kill_vid == NULL)) {
422 printk(VLAN_DBG "%s: Device %s has buggy VLAN hw accel.\n", 418 printk(VLAN_DBG "%s: Device %s has buggy VLAN hw accel.\n",
423 __FUNCTION__, real_dev->name); 419 __FUNCTION__, real_dev->name);
424 goto out_put_dev; 420 goto out_put_dev;