diff options
Diffstat (limited to 'net/8021q/vlan.c')
-rw-r--r-- | net/8021q/vlan.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 3c1c8c14e929..a2ad15250575 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -155,9 +155,10 @@ void unregister_vlan_dev(struct net_device *dev, struct list_head *head) | |||
155 | BUG_ON(!grp); | 155 | BUG_ON(!grp); |
156 | 156 | ||
157 | /* Take it out of our own structures, but be sure to interlock with | 157 | /* Take it out of our own structures, but be sure to interlock with |
158 | * HW accelerating devices or SW vlan input packet processing. | 158 | * HW accelerating devices or SW vlan input packet processing if |
159 | * VLAN is not 0 (leave it there for 802.1p). | ||
159 | */ | 160 | */ |
160 | if (real_dev->features & NETIF_F_HW_VLAN_FILTER) | 161 | if (vlan_id && (real_dev->features & NETIF_F_HW_VLAN_FILTER)) |
161 | ops->ndo_vlan_rx_kill_vid(real_dev, vlan_id); | 162 | ops->ndo_vlan_rx_kill_vid(real_dev, vlan_id); |
162 | 163 | ||
163 | grp->nr_vlans--; | 164 | grp->nr_vlans--; |
@@ -419,6 +420,14 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event, | |||
419 | if (is_vlan_dev(dev)) | 420 | if (is_vlan_dev(dev)) |
420 | __vlan_device_event(dev, event); | 421 | __vlan_device_event(dev, event); |
421 | 422 | ||
423 | if ((event == NETDEV_UP) && | ||
424 | (dev->features & NETIF_F_HW_VLAN_FILTER) && | ||
425 | dev->netdev_ops->ndo_vlan_rx_add_vid) { | ||
426 | pr_info("8021q: adding VLAN 0 to HW filter on device %s\n", | ||
427 | dev->name); | ||
428 | dev->netdev_ops->ndo_vlan_rx_add_vid(dev, 0); | ||
429 | } | ||
430 | |||
422 | grp = __vlan_find_group(dev); | 431 | grp = __vlan_find_group(dev); |
423 | if (!grp) | 432 | if (!grp) |
424 | goto out; | 433 | goto out; |