[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1356868702-8144-4-git-send-email-jiri@resnulli.us>
Date: Sun, 30 Dec 2012 12:58:10 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, edumazet@...gle.com,
bhutchings@...arflare.com, faisal.latif@...el.com,
shemminger@...tta.com, fbl@...hat.com, roland@...nel.org,
sean.hefty@...el.com, hal.rosenstock@...il.com, fubar@...ibm.com,
andy@...yhouse.net, divy@...lsio.com, jitendra.kalsaria@...gic.com,
sony.chacko@...gic.com, linux-driver@...gic.com, kaber@...sh.net,
ursula.braun@...ibm.com, blaschka@...ux.vnet.ibm.com,
schwidefsky@...ibm.com, heiko.carstens@...ibm.com,
ebiederm@...ssion.com, joe@...ches.com, amwang@...hat.com,
nhorman@...driver.com, john.r.fastabend@...el.com,
pablo@...filter.org
Subject: [patch net-next 03/15] vlan: add link to upper device
Signed-off-by: Jiri Pirko <jiri@...nulli.us>
---
net/8021q/vlan.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index a292e80..babfde9 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -105,6 +105,8 @@ void unregister_vlan_dev(struct net_device *dev, struct list_head *head)
*/
unregister_netdevice_queue(dev, head);
+ netdev_upper_dev_unlink(real_dev, dev);
+
if (grp->nr_vlan_devs == 0)
vlan_gvrp_uninit_applicant(real_dev);
@@ -162,9 +164,13 @@ int register_vlan_dev(struct net_device *dev)
if (err < 0)
goto out_uninit_applicant;
+ err = netdev_upper_dev_link(real_dev, dev);
+ if (err)
+ goto out_uninit_applicant;
+
err = register_netdevice(dev);
if (err < 0)
- goto out_uninit_applicant;
+ goto out_upper_dev_unlink;
/* Account for reference in struct vlan_dev_priv */
dev_hold(real_dev);
@@ -180,6 +186,8 @@ int register_vlan_dev(struct net_device *dev)
return 0;
+out_upper_dev_unlink:
+ netdev_upper_dev_unlink(real_dev, dev);
out_uninit_applicant:
if (grp->nr_vlan_devs == 0)
vlan_gvrp_uninit_applicant(real_dev);
--
1.8.0
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists