aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q
diff options
context:
space:
mode:
Diffstat (limited to 'net/8021q')
-rw-r--r--net/8021q/vlan.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 7e9d22ec7d45..2a739adaa92b 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -154,8 +154,6 @@ void unregister_vlan_dev(struct net_device *dev)
154 grp = __vlan_find_group(real_dev); 154 grp = __vlan_find_group(real_dev);
155 BUG_ON(!grp); 155 BUG_ON(!grp);
156 156
157 vlan_proc_rem_dev(dev);
158
159 /* 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
160 * HW accelerating devices or SW vlan input packet processing. 158 * HW accelerating devices or SW vlan input packet processing.
161 */ 159 */
@@ -278,9 +276,6 @@ int register_vlan_dev(struct net_device *dev)
278 if (real_dev->features & NETIF_F_HW_VLAN_FILTER) 276 if (real_dev->features & NETIF_F_HW_VLAN_FILTER)
279 real_dev->vlan_rx_add_vid(real_dev, vlan_id); 277 real_dev->vlan_rx_add_vid(real_dev, vlan_id);
280 278
281 if (vlan_proc_add_dev(dev) < 0)
282 pr_warning("8021q: failed to add proc entry for %s\n",
283 dev->name);
284 return 0; 279 return 0;
285 280
286out_free_group: 281out_free_group:
@@ -396,6 +391,14 @@ static void __vlan_device_event(struct net_device *dev, unsigned long event)
396 pr_warning("8021q: failed to change proc name for %s\n", 391 pr_warning("8021q: failed to change proc name for %s\n",
397 dev->name); 392 dev->name);
398 break; 393 break;
394 case NETDEV_REGISTER:
395 if (vlan_proc_add_dev(dev) < 0)
396 pr_warning("8021q: failed to add proc entry for %s\n",
397 dev->name);
398 break;
399 case NETDEV_UNREGISTER:
400 vlan_proc_rem_dev(dev);
401 break;
399 } 402 }
400} 403}
401 404