diff options
author | David S. Miller <davem@davemloft.net> | 2008-04-02 22:35:23 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-02 22:35:23 -0700 |
commit | e1ec1b8ccdf0df6000faa8c2d985ca5f94157e5a (patch) | |
tree | 4e1ca325dde22f1ac21c9da0be509e87e922e604 /net/8021q/vlan.c | |
parent | c0f39322c335412339dec16ebfd2a05ceba5ebcf (diff) | |
parent | 802fb176d8c635ae42da31b80841c26e8c7338a0 (diff) | |
download | linux-3.10-e1ec1b8ccdf0df6000faa8c2d985ca5f94157e5a.tar.gz linux-3.10-e1ec1b8ccdf0df6000faa8c2d985ca5f94157e5a.tar.bz2 linux-3.10-e1ec1b8ccdf0df6000faa8c2d985ca5f94157e5a.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/s2io.c
Diffstat (limited to 'net/8021q/vlan.c')
-rw-r--r-- | net/8021q/vlan.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 694be86e449..5975ec3be7f 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -384,17 +384,35 @@ static void vlan_sync_address(struct net_device *dev, memcpy(vlan->real_dev_addr, dev->dev_addr, ETH_ALEN); } +static void __vlan_device_event(struct net_device *dev, unsigned long event) +{ + switch (event) { + case NETDEV_CHANGENAME: + vlan_proc_rem_dev(dev); + if (vlan_proc_add_dev(dev) < 0) + pr_warning("8021q: failed to change proc name for %s\n", + dev->name); + break; + } +} + static int vlan_device_event(struct notifier_block *unused, unsigned long event, void *ptr) { struct net_device *dev = ptr; - struct vlan_group *grp = __vlan_find_group(dev->ifindex); + struct vlan_group *grp; int i, flgs; struct net_device *vlandev; if (dev_net(dev) != &init_net) return NOTIFY_DONE; + if (is_vlan_dev(dev)) { + __vlan_device_event(dev, event); + goto out; + } + + grp = __vlan_find_group(dev->ifindex); if (!grp) goto out; |