diff options
author | David S. Miller <davem@davemloft.net> | 2008-04-03 01:35:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-03 01:35:23 -0400 |
commit | e1ec1b8ccdf0df6000faa8c2d985ca5f94157e5a (patch) | |
tree | 4e1ca325dde22f1ac21c9da0be509e87e922e604 /net/8021q | |
parent | c0f39322c335412339dec16ebfd2a05ceba5ebcf (diff) | |
parent | 802fb176d8c635ae42da31b80841c26e8c7338a0 (diff) |
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')
-rw-r--r-- | net/8021q/vlan.c | 20 | ||||
-rw-r--r-- | net/8021q/vlan.h | 5 | ||||
-rw-r--r-- | net/8021q/vlanproc.c | 5 |
3 files changed, 24 insertions, 6 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 694be86e4490..5975ec3be7f3 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -384,17 +384,35 @@ static void vlan_sync_address(struct net_device *dev, | |||
384 | memcpy(vlan->real_dev_addr, dev->dev_addr, ETH_ALEN); | 384 | memcpy(vlan->real_dev_addr, dev->dev_addr, ETH_ALEN); |
385 | } | 385 | } |
386 | 386 | ||
387 | static void __vlan_device_event(struct net_device *dev, unsigned long event) | ||
388 | { | ||
389 | switch (event) { | ||
390 | case NETDEV_CHANGENAME: | ||
391 | vlan_proc_rem_dev(dev); | ||
392 | if (vlan_proc_add_dev(dev) < 0) | ||
393 | pr_warning("8021q: failed to change proc name for %s\n", | ||
394 | dev->name); | ||
395 | break; | ||
396 | } | ||
397 | } | ||
398 | |||
387 | static int vlan_device_event(struct notifier_block *unused, unsigned long event, | 399 | static int vlan_device_event(struct notifier_block *unused, unsigned long event, |
388 | void *ptr) | 400 | void *ptr) |
389 | { | 401 | { |
390 | struct net_device *dev = ptr; | 402 | struct net_device *dev = ptr; |
391 | struct vlan_group *grp = __vlan_find_group(dev->ifindex); | 403 | struct vlan_group *grp; |
392 | int i, flgs; | 404 | int i, flgs; |
393 | struct net_device *vlandev; | 405 | struct net_device *vlandev; |
394 | 406 | ||
395 | if (dev_net(dev) != &init_net) | 407 | if (dev_net(dev) != &init_net) |
396 | return NOTIFY_DONE; | 408 | return NOTIFY_DONE; |
397 | 409 | ||
410 | if (is_vlan_dev(dev)) { | ||
411 | __vlan_device_event(dev, event); | ||
412 | goto out; | ||
413 | } | ||
414 | |||
415 | grp = __vlan_find_group(dev->ifindex); | ||
398 | if (!grp) | 416 | if (!grp) |
399 | goto out; | 417 | goto out; |
400 | 418 | ||
diff --git a/net/8021q/vlan.h b/net/8021q/vlan.h index 73efcc715ccb..51271aea402b 100644 --- a/net/8021q/vlan.h +++ b/net/8021q/vlan.h | |||
@@ -45,4 +45,9 @@ void vlan_netlink_fini(void); | |||
45 | 45 | ||
46 | extern struct rtnl_link_ops vlan_link_ops; | 46 | extern struct rtnl_link_ops vlan_link_ops; |
47 | 47 | ||
48 | static inline int is_vlan_dev(struct net_device *dev) | ||
49 | { | ||
50 | return dev->priv_flags & IFF_802_1Q_VLAN; | ||
51 | } | ||
52 | |||
48 | #endif /* !(__BEN_VLAN_802_1Q_INC__) */ | 53 | #endif /* !(__BEN_VLAN_802_1Q_INC__) */ |
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c index 3b8657a0b837..24cd96ee8109 100644 --- a/net/8021q/vlanproc.c +++ b/net/8021q/vlanproc.c | |||
@@ -210,11 +210,6 @@ int vlan_proc_rem_dev(struct net_device *vlandev) | |||
210 | * The following few functions build the content of /proc/net/vlan/config | 210 | * The following few functions build the content of /proc/net/vlan/config |
211 | */ | 211 | */ |
212 | 212 | ||
213 | static inline int is_vlan_dev(struct net_device *dev) | ||
214 | { | ||
215 | return dev->priv_flags & IFF_802_1Q_VLAN; | ||
216 | } | ||
217 | |||
218 | /* start read of /proc/net/vlan/config */ | 213 | /* start read of /proc/net/vlan/config */ |
219 | static void *vlan_seq_start(struct seq_file *seq, loff_t *pos) | 214 | static void *vlan_seq_start(struct seq_file *seq, loff_t *pos) |
220 | __acquires(dev_base_lock) | 215 | __acquires(dev_base_lock) |