aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2007-02-09 09:24:25 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-11 02:19:11 -0500
commit122952fc2d6b5ca865e8475ec471d8944fa921c7 (patch)
tree50e2d31d1e53d5291a960cf36d683ea01adae2a4 /net/8021q
parent9afa0949eea959f28248b717757c201765f1c19b (diff)
[NET] 8021Q: Fix whitespace errors.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q')
-rw-r--r--net/8021q/vlan.c52
-rw-r--r--net/8021q/vlan.h12
-rw-r--r--net/8021q/vlan_dev.c42
-rw-r--r--net/8021q/vlanproc.c36
4 files changed, 71 insertions, 71 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 18fcb9fa518d..c1c205fad4fb 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -5,7 +5,7 @@
5 * Authors: Ben Greear <greearb@candelatech.com> 5 * Authors: Ben Greear <greearb@candelatech.com>
6 * Please send support related email to: vlan@scry.wanfear.com 6 * Please send support related email to: vlan@scry.wanfear.com
7 * VLAN Home Page: http://www.candelatech.com/~greear/vlan.html 7 * VLAN Home Page: http://www.candelatech.com/~greear/vlan.html
8 * 8 *
9 * Fixes: 9 * Fixes:
10 * Fix for packet capture - Nick Eggleston <nick@dccinc.com>; 10 * Fix for packet capture - Nick Eggleston <nick@dccinc.com>;
11 * Add HW acceleration hooks - David S. Miller <davem@redhat.com>; 11 * Add HW acceleration hooks - David S. Miller <davem@redhat.com>;
@@ -72,7 +72,7 @@ static struct packet_type vlan_packet_type = {
72/* 72/*
73 * Function vlan_proto_init (pro) 73 * Function vlan_proto_init (pro)
74 * 74 *
75 * Initialize VLAN protocol layer, 75 * Initialize VLAN protocol layer,
76 * 76 *
77 */ 77 */
78static int __init vlan_proto_init(void) 78static int __init vlan_proto_init(void)
@@ -87,7 +87,7 @@ static int __init vlan_proto_init(void)
87 /* proc file system initialization */ 87 /* proc file system initialization */
88 err = vlan_proc_init(); 88 err = vlan_proc_init();
89 if (err < 0) { 89 if (err < 0) {
90 printk(KERN_ERR 90 printk(KERN_ERR
91 "%s %s: can't create entry in proc filesystem!\n", 91 "%s %s: can't create entry in proc filesystem!\n",
92 __FUNCTION__, VLAN_NAME); 92 __FUNCTION__, VLAN_NAME);
93 return err; 93 return err;
@@ -108,7 +108,7 @@ static int __init vlan_proto_init(void)
108 return 0; 108 return 0;
109} 109}
110 110
111/* Cleanup all vlan devices 111/* Cleanup all vlan devices
112 * Note: devices that have been registered that but not 112 * Note: devices that have been registered that but not
113 * brought up will exist but have no module ref count. 113 * brought up will exist but have no module ref count.
114 */ 114 */
@@ -132,7 +132,7 @@ static void __exit vlan_cleanup_devices(void)
132/* 132/*
133 * Module 'remove' entry point. 133 * Module 'remove' entry point.
134 * o delete /proc/net/router directory and static entries. 134 * o delete /proc/net/router directory and static entries.
135 */ 135 */
136static void __exit vlan_cleanup_module(void) 136static void __exit vlan_cleanup_module(void)
137{ 137{
138 int i; 138 int i;
@@ -184,7 +184,7 @@ struct net_device *__find_vlan_dev(struct net_device *real_dev,
184 struct vlan_group *grp = __vlan_find_group(real_dev->ifindex); 184 struct vlan_group *grp = __vlan_find_group(real_dev->ifindex);
185 185
186 if (grp) 186 if (grp)
187 return grp->vlan_devices[VID]; 187 return grp->vlan_devices[VID];
188 188
189 return NULL; 189 return NULL;
190} 190}
@@ -269,7 +269,7 @@ static int unregister_vlan_dev(struct net_device *real_dev,
269 } 269 }
270 } 270 }
271 271
272 return ret; 272 return ret;
273} 273}
274 274
275static int unregister_vlan_device(const char *vlan_IF_name) 275static int unregister_vlan_device(const char *vlan_IF_name)
@@ -295,7 +295,7 @@ static int unregister_vlan_device(const char *vlan_IF_name)
295 if (ret == 1) 295 if (ret == 1)
296 ret = 0; 296 ret = 0;
297 } else { 297 } else {
298 printk(VLAN_ERR 298 printk(VLAN_ERR
299 "%s: ERROR: Tried to remove a non-vlan device " 299 "%s: ERROR: Tried to remove a non-vlan device "
300 "with VLAN code, name: %s priv_flags: %hX\n", 300 "with VLAN code, name: %s priv_flags: %hX\n",
301 __FUNCTION__, dev->name, dev->priv_flags); 301 __FUNCTION__, dev->name, dev->priv_flags);
@@ -315,7 +315,7 @@ static int unregister_vlan_device(const char *vlan_IF_name)
315static void vlan_setup(struct net_device *new_dev) 315static void vlan_setup(struct net_device *new_dev)
316{ 316{
317 SET_MODULE_OWNER(new_dev); 317 SET_MODULE_OWNER(new_dev);
318 318
319 /* new_dev->ifindex = 0; it will be set when added to 319 /* new_dev->ifindex = 0; it will be set when added to
320 * the global list. 320 * the global list.
321 * iflink is set as well. 321 * iflink is set as well.
@@ -324,7 +324,7 @@ static void vlan_setup(struct net_device *new_dev)
324 324
325 /* Make this thing known as a VLAN device */ 325 /* Make this thing known as a VLAN device */
326 new_dev->priv_flags |= IFF_802_1Q_VLAN; 326 new_dev->priv_flags |= IFF_802_1Q_VLAN;
327 327
328 /* Set us up to have no queue, as the underlying Hardware device 328 /* Set us up to have no queue, as the underlying Hardware device
329 * can do all the queueing we could want. 329 * can do all the queueing we could want.
330 */ 330 */
@@ -461,7 +461,7 @@ static struct net_device *register_vlan_device(const char *eth_IF_name,
461 default: 461 default:
462 snprintf(name, IFNAMSIZ, "vlan%.4i", VLAN_ID); 462 snprintf(name, IFNAMSIZ, "vlan%.4i", VLAN_ID);
463 }; 463 };
464 464
465 new_dev = alloc_netdev(sizeof(struct vlan_dev_info), name, 465 new_dev = alloc_netdev(sizeof(struct vlan_dev_info), name,
466 vlan_setup); 466 vlan_setup);
467 467
@@ -477,7 +477,7 @@ static struct net_device *register_vlan_device(const char *eth_IF_name,
477 477
478 new_dev->state = (real_dev->state & ((1<<__LINK_STATE_NOCARRIER) | 478 new_dev->state = (real_dev->state & ((1<<__LINK_STATE_NOCARRIER) |
479 (1<<__LINK_STATE_DORMANT))) | 479 (1<<__LINK_STATE_DORMANT))) |
480 (1<<__LINK_STATE_PRESENT); 480 (1<<__LINK_STATE_PRESENT);
481 481
482 /* need 4 bytes for extra VLAN header info, 482 /* need 4 bytes for extra VLAN header info,
483 * hope the underlying device can handle it. 483 * hope the underlying device can handle it.
@@ -496,7 +496,7 @@ static struct net_device *register_vlan_device(const char *eth_IF_name,
496 VLAN_MEM_DBG("new_dev->priv malloc, addr: %p size: %i\n", 496 VLAN_MEM_DBG("new_dev->priv malloc, addr: %p size: %i\n",
497 new_dev->priv, 497 new_dev->priv,
498 sizeof(struct vlan_dev_info)); 498 sizeof(struct vlan_dev_info));
499 499
500 memcpy(new_dev->broadcast, real_dev->broadcast, real_dev->addr_len); 500 memcpy(new_dev->broadcast, real_dev->broadcast, real_dev->addr_len);
501 memcpy(new_dev->dev_addr, real_dev->dev_addr, real_dev->addr_len); 501 memcpy(new_dev->dev_addr, real_dev->dev_addr, real_dev->addr_len);
502 new_dev->addr_len = real_dev->addr_len; 502 new_dev->addr_len = real_dev->addr_len;
@@ -521,7 +521,7 @@ static struct net_device *register_vlan_device(const char *eth_IF_name,
521 printk(VLAN_DBG "About to go find the group for idx: %i\n", 521 printk(VLAN_DBG "About to go find the group for idx: %i\n",
522 real_dev->ifindex); 522 real_dev->ifindex);
523#endif 523#endif
524 524
525 if (register_netdevice(new_dev)) 525 if (register_netdevice(new_dev))
526 goto out_free_newdev; 526 goto out_free_newdev;
527 527
@@ -543,22 +543,22 @@ static struct net_device *register_vlan_device(const char *eth_IF_name,
543 grp = kzalloc(sizeof(struct vlan_group), GFP_KERNEL); 543 grp = kzalloc(sizeof(struct vlan_group), GFP_KERNEL);
544 if (!grp) 544 if (!grp)
545 goto out_free_unregister; 545 goto out_free_unregister;
546 546
547 /* printk(KERN_ALERT "VLAN REGISTER: Allocated new group.\n"); */ 547 /* printk(KERN_ALERT "VLAN REGISTER: Allocated new group.\n"); */
548 grp->real_dev_ifindex = real_dev->ifindex; 548 grp->real_dev_ifindex = real_dev->ifindex;
549 549
550 hlist_add_head_rcu(&grp->hlist, 550 hlist_add_head_rcu(&grp->hlist,
551 &vlan_group_hash[vlan_grp_hashfn(real_dev->ifindex)]); 551 &vlan_group_hash[vlan_grp_hashfn(real_dev->ifindex)]);
552 552
553 if (real_dev->features & NETIF_F_HW_VLAN_RX) 553 if (real_dev->features & NETIF_F_HW_VLAN_RX)
554 real_dev->vlan_rx_register(real_dev, grp); 554 real_dev->vlan_rx_register(real_dev, grp);
555 } 555 }
556 556
557 grp->vlan_devices[VLAN_ID] = new_dev; 557 grp->vlan_devices[VLAN_ID] = new_dev;
558 558
559 if (vlan_proc_add_dev(new_dev)<0)/* create it's proc entry */ 559 if (vlan_proc_add_dev(new_dev)<0)/* create it's proc entry */
560 printk(KERN_WARNING "VLAN: failed to add proc entry for %s\n", 560 printk(KERN_WARNING "VLAN: failed to add proc entry for %s\n",
561 new_dev->name); 561 new_dev->name);
562 562
563 if (real_dev->features & NETIF_F_HW_VLAN_FILTER) 563 if (real_dev->features & NETIF_F_HW_VLAN_FILTER)
564 real_dev->vlan_rx_add_vid(real_dev, VLAN_ID); 564 real_dev->vlan_rx_add_vid(real_dev, VLAN_ID);
@@ -635,7 +635,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
635 vlandev = grp->vlan_devices[i]; 635 vlandev = grp->vlan_devices[i];
636 if (!vlandev) 636 if (!vlandev)
637 continue; 637 continue;
638 638
639 flgs = vlandev->flags; 639 flgs = vlandev->flags;
640 if (flgs & IFF_UP) 640 if (flgs & IFF_UP)
641 continue; 641 continue;
@@ -643,7 +643,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
643 dev_change_flags(vlandev, flgs | IFF_UP); 643 dev_change_flags(vlandev, flgs | IFF_UP);
644 } 644 }
645 break; 645 break;
646 646
647 case NETDEV_UNREGISTER: 647 case NETDEV_UNREGISTER:
648 /* Delete all VLANs for this dev. */ 648 /* Delete all VLANs for this dev. */
649 for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { 649 for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) {
@@ -755,8 +755,8 @@ static int vlan_ioctl_handler(void __user *arg)
755 /* TODO: Implement 755 /* TODO: Implement
756 err = vlan_dev_get_ingress_priority(args); 756 err = vlan_dev_get_ingress_priority(args);
757 if (copy_to_user((void*)arg, &args, 757 if (copy_to_user((void*)arg, &args,
758 sizeof(struct vlan_ioctl_args))) { 758 sizeof(struct vlan_ioctl_args))) {
759 err = -EFAULT; 759 err = -EFAULT;
760 } 760 }
761 */ 761 */
762 err = -EINVAL; 762 err = -EINVAL;
@@ -765,8 +765,8 @@ static int vlan_ioctl_handler(void __user *arg)
765 /* TODO: Implement 765 /* TODO: Implement
766 err = vlan_dev_get_egress_priority(args.device1, &(args.args); 766 err = vlan_dev_get_egress_priority(args.device1, &(args.args);
767 if (copy_to_user((void*)arg, &args, 767 if (copy_to_user((void*)arg, &args,
768 sizeof(struct vlan_ioctl_args))) { 768 sizeof(struct vlan_ioctl_args))) {
769 err = -EFAULT; 769 err = -EFAULT;
770 } 770 }
771 */ 771 */
772 err = -EINVAL; 772 err = -EINVAL;
@@ -788,7 +788,7 @@ static int vlan_ioctl_handler(void __user *arg)
788 args.u.VID = vid; 788 args.u.VID = vid;
789 if (copy_to_user(arg, &args, 789 if (copy_to_user(arg, &args,
790 sizeof(struct vlan_ioctl_args))) { 790 sizeof(struct vlan_ioctl_args))) {
791 err = -EFAULT; 791 err = -EFAULT;
792 } 792 }
793 break; 793 break;
794 794
diff --git a/net/8021q/vlan.h b/net/8021q/vlan.h
index 9ae3a14dd016..1976cdba8f72 100644
--- a/net/8021q/vlan.h
+++ b/net/8021q/vlan.h
@@ -9,8 +9,8 @@
9#define VLAN_ERR KERN_ERR 9#define VLAN_ERR KERN_ERR
10#define VLAN_INF KERN_INFO 10#define VLAN_INF KERN_INFO
11#define VLAN_DBG KERN_ALERT /* change these... to debug, having a hard time 11#define VLAN_DBG KERN_ALERT /* change these... to debug, having a hard time
12 * changing the log level at run-time..for some reason. 12 * changing the log level at run-time..for some reason.
13 */ 13 */
14 14
15/* 15/*
16 16
@@ -24,7 +24,7 @@ I'll bet they might prove useful again... --Ben
24*/ 24*/
25 25
26/* This way they don't do anything! */ 26/* This way they don't do anything! */
27#define VLAN_MEM_DBG(x, y, z) 27#define VLAN_MEM_DBG(x, y, z)
28#define VLAN_FMEM_DBG(x, y) 28#define VLAN_FMEM_DBG(x, y)
29 29
30 30
@@ -51,10 +51,10 @@ struct net_device *__find_vlan_dev(struct net_device* real_dev,
51/* found in vlan_dev.c */ 51/* found in vlan_dev.c */
52int vlan_dev_rebuild_header(struct sk_buff *skb); 52int vlan_dev_rebuild_header(struct sk_buff *skb);
53int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev, 53int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
54 struct packet_type *ptype, struct net_device *orig_dev); 54 struct packet_type *ptype, struct net_device *orig_dev);
55int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev, 55int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
56 unsigned short type, void *daddr, void *saddr, 56 unsigned short type, void *daddr, void *saddr,
57 unsigned len); 57 unsigned len);
58int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev); 58int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev);
59int vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb, struct net_device *dev); 59int vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb, struct net_device *dev);
60int vlan_dev_change_mtu(struct net_device *dev, int new_mtu); 60int vlan_dev_change_mtu(struct net_device *dev, int new_mtu);
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 60a508eb1945..2fc8fe2cb366 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -5,14 +5,14 @@
5 * Authors: Ben Greear <greearb@candelatech.com> 5 * Authors: Ben Greear <greearb@candelatech.com>
6 * Please send support related email to: vlan@scry.wanfear.com 6 * Please send support related email to: vlan@scry.wanfear.com
7 * VLAN Home Page: http://www.candelatech.com/~greear/vlan.html 7 * VLAN Home Page: http://www.candelatech.com/~greear/vlan.html
8 * 8 *
9 * Fixes: Mar 22 2001: Martin Bokaemper <mbokaemper@unispherenetworks.com> 9 * Fixes: Mar 22 2001: Martin Bokaemper <mbokaemper@unispherenetworks.com>
10 * - reset skb->pkt_type on incoming packets when MAC was changed 10 * - reset skb->pkt_type on incoming packets when MAC was changed
11 * - see that changed MAC is saddr for outgoing packets 11 * - see that changed MAC is saddr for outgoing packets
12 * Oct 20, 2001: Ard van Breeman: 12 * Oct 20, 2001: Ard van Breeman:
13 * - Fix MC-list, finally. 13 * - Fix MC-list, finally.
14 * - Flush MC-list on VLAN destroy. 14 * - Flush MC-list on VLAN destroy.
15 * 15 *
16 * 16 *
17 * This program is free software; you can redistribute it and/or 17 * This program is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU General Public License 18 * modify it under the terms of the GNU General Public License
@@ -58,12 +58,12 @@ int vlan_dev_rebuild_header(struct sk_buff *skb)
58 58
59 /* TODO: Confirm this will work with VLAN headers... */ 59 /* TODO: Confirm this will work with VLAN headers... */
60 return arp_find(veth->h_dest, skb); 60 return arp_find(veth->h_dest, skb);
61#endif 61#endif
62 default: 62 default:
63 printk(VLAN_DBG 63 printk(VLAN_DBG
64 "%s: unable to resolve type %X addresses.\n", 64 "%s: unable to resolve type %X addresses.\n",
65 dev->name, ntohs(veth->h_vlan_encapsulated_proto)); 65 dev->name, ntohs(veth->h_vlan_encapsulated_proto));
66 66
67 memcpy(veth->h_source, dev->dev_addr, ETH_ALEN); 67 memcpy(veth->h_source, dev->dev_addr, ETH_ALEN);
68 break; 68 break;
69 }; 69 };
@@ -91,7 +91,7 @@ static inline struct sk_buff *vlan_check_reorder_header(struct sk_buff *skb)
91} 91}
92 92
93/* 93/*
94 * Determine the packet's protocol ID. The rule here is that we 94 * Determine the packet's protocol ID. The rule here is that we
95 * assume 802.3 if the type field is short enough to be a length. 95 * assume 802.3 if the type field is short enough to be a length.
96 * This is normal practice and works for any 'now in use' protocol. 96 * This is normal practice and works for any 'now in use' protocol.
97 * 97 *
@@ -113,7 +113,7 @@ static inline struct sk_buff *vlan_check_reorder_header(struct sk_buff *skb)
113 * 113 *
114 */ 114 */
115int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev, 115int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
116 struct packet_type* ptype, struct net_device *orig_dev) 116 struct packet_type* ptype, struct net_device *orig_dev)
117{ 117{
118 unsigned char *rawp = NULL; 118 unsigned char *rawp = NULL;
119 struct vlan_hdr *vhdr = (struct vlan_hdr *)(skb->data); 119 struct vlan_hdr *vhdr = (struct vlan_hdr *)(skb->data);
@@ -175,8 +175,8 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
175 175
176#ifdef VLAN_DEBUG 176#ifdef VLAN_DEBUG
177 printk(VLAN_DBG "%s: dropping skb: %p because came in on wrong device, dev: %s real_dev: %s, skb_dev: %s\n", 177 printk(VLAN_DBG "%s: dropping skb: %p because came in on wrong device, dev: %s real_dev: %s, skb_dev: %s\n",
178 __FUNCTION__, skb, dev->name, 178 __FUNCTION__, skb, dev->name,
179 VLAN_DEV_INFO(skb->dev)->real_dev->name, 179 VLAN_DEV_INFO(skb->dev)->real_dev->name,
180 skb->dev->name); 180 skb->dev->name);
181#endif 181#endif
182 kfree_skb(skb); 182 kfree_skb(skb);
@@ -191,7 +191,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
191 191
192#ifdef VLAN_DEBUG 192#ifdef VLAN_DEBUG
193 printk(VLAN_DBG "%s: priority: %lu for TCI: %hu (hbo)\n", 193 printk(VLAN_DBG "%s: priority: %lu for TCI: %hu (hbo)\n",
194 __FUNCTION__, (unsigned long)(skb->priority), 194 __FUNCTION__, (unsigned long)(skb->priority),
195 ntohs(vhdr->h_vlan_TCI)); 195 ntohs(vhdr->h_vlan_TCI));
196#endif 196#endif
197 197
@@ -207,7 +207,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
207 stats->multicast++; 207 stats->multicast++;
208 break; 208 break;
209 209
210 case PACKET_OTHERHOST: 210 case PACKET_OTHERHOST:
211 /* Our lower layer thinks this is not local, let's make sure. 211 /* Our lower layer thinks this is not local, let's make sure.
212 * This allows the VLAN to have a different MAC than the underlying 212 * This allows the VLAN to have a different MAC than the underlying
213 * device, and still route correctly. 213 * device, and still route correctly.
@@ -319,7 +319,7 @@ static inline unsigned short vlan_dev_get_egress_qos_mask(struct net_device* dev
319} 319}
320 320
321/* 321/*
322 * Create the VLAN header for an arbitrary protocol layer 322 * Create the VLAN header for an arbitrary protocol layer
323 * 323 *
324 * saddr=NULL means use device source address 324 * saddr=NULL means use device source address
325 * daddr=NULL means leave destination address (eg unresolved arp) 325 * daddr=NULL means leave destination address (eg unresolved arp)
@@ -328,8 +328,8 @@ static inline unsigned short vlan_dev_get_egress_qos_mask(struct net_device* dev
328 * physical devices. 328 * physical devices.
329 */ 329 */
330int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev, 330int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
331 unsigned short type, void *daddr, void *saddr, 331 unsigned short type, void *daddr, void *saddr,
332 unsigned len) 332 unsigned len)
333{ 333{
334 struct vlan_hdr *vhdr; 334 struct vlan_hdr *vhdr;
335 unsigned short veth_TCI = 0; 335 unsigned short veth_TCI = 0;
@@ -346,7 +346,7 @@ int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
346 * fixes some programs that get confused when they see a VLAN device 346 * fixes some programs that get confused when they see a VLAN device
347 * sending a frame that is VLAN encoded (the consensus is that the VLAN 347 * sending a frame that is VLAN encoded (the consensus is that the VLAN
348 * device should look completely like an Ethernet device when the 348 * device should look completely like an Ethernet device when the
349 * REORDER_HEADER flag is set) The drawback to this is some extra 349 * REORDER_HEADER flag is set) The drawback to this is some extra
350 * header shuffling in the hard_start_xmit. Users can turn off this 350 * header shuffling in the hard_start_xmit. Users can turn off this
351 * REORDER behaviour with the vconfig tool. 351 * REORDER behaviour with the vconfig tool.
352 */ 352 */
@@ -553,7 +553,7 @@ int vlan_dev_set_egress_priority(char *dev_name, __u32 skb_prio, short vlan_prio
553 struct net_device *dev = dev_get_by_name(dev_name); 553 struct net_device *dev = dev_get_by_name(dev_name);
554 struct vlan_priority_tci_mapping *mp = NULL; 554 struct vlan_priority_tci_mapping *mp = NULL;
555 struct vlan_priority_tci_mapping *np; 555 struct vlan_priority_tci_mapping *np;
556 556
557 if (dev) { 557 if (dev) {
558 if (dev->priv_flags & IFF_802_1Q_VLAN) { 558 if (dev->priv_flags & IFF_802_1Q_VLAN) {
559 /* See if a priority mapping exists.. */ 559 /* See if a priority mapping exists.. */
@@ -610,13 +610,13 @@ int vlan_dev_set_vlan_flag(char *dev_name, __u32 flag, short flag_val)
610 return -EINVAL; 610 return -EINVAL;
611 } 611 }
612 } else { 612 } else {
613 printk(KERN_ERR 613 printk(KERN_ERR
614 "%s: %s is not a vlan device, priv_flags: %hX.\n", 614 "%s: %s is not a vlan device, priv_flags: %hX.\n",
615 __FUNCTION__, dev->name, dev->priv_flags); 615 __FUNCTION__, dev->name, dev->priv_flags);
616 dev_put(dev); 616 dev_put(dev);
617 } 617 }
618 } else { 618 } else {
619 printk(KERN_ERR "%s: Could not find device: %s\n", 619 printk(KERN_ERR "%s: Could not find device: %s\n",
620 __FUNCTION__, dev_name); 620 __FUNCTION__, dev_name);
621 } 621 }
622 622
@@ -700,7 +700,7 @@ int vlan_dev_set_mac_address(struct net_device *dev, void *addr_struct_p)
700} 700}
701 701
702static inline int vlan_dmi_equals(struct dev_mc_list *dmi1, 702static inline int vlan_dmi_equals(struct dev_mc_list *dmi1,
703 struct dev_mc_list *dmi2) 703 struct dev_mc_list *dmi2)
704{ 704{
705 return ((dmi1->dmi_addrlen == dmi2->dmi_addrlen) && 705 return ((dmi1->dmi_addrlen == dmi2->dmi_addrlen) &&
706 (memcmp(dmi1->dmi_addr, dmi2->dmi_addr, dmi1->dmi_addrlen) == 0)); 706 (memcmp(dmi1->dmi_addr, dmi2->dmi_addr, dmi1->dmi_addrlen) == 0));
@@ -810,7 +810,7 @@ int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
810 case SIOCGMIIPHY: 810 case SIOCGMIIPHY:
811 case SIOCGMIIREG: 811 case SIOCGMIIREG:
812 case SIOCSMIIREG: 812 case SIOCSMIIREG:
813 if (real_dev->do_ioctl && netif_device_present(real_dev)) 813 if (real_dev->do_ioctl && netif_device_present(real_dev))
814 err = real_dev->do_ioctl(real_dev, &ifrr, cmd); 814 err = real_dev->do_ioctl(real_dev, &ifrr, cmd);
815 break; 815 break;
816 816
@@ -818,7 +818,7 @@ int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
818 err = dev_ethtool(&ifrr); 818 err = dev_ethtool(&ifrr);
819 } 819 }
820 820
821 if (!err) 821 if (!err)
822 ifr->ifr_ifru = ifrr.ifr_ifru; 822 ifr->ifr_ifru = ifrr.ifr_ifru;
823 823
824 return err; 824 return err;
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index a8fc0de1f969..1b72c9854d6f 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -51,7 +51,7 @@ static int vlandev_seq_show(struct seq_file *seq, void *v);
51 51
52 52
53/* 53/*
54 * Names of the proc directory entries 54 * Names of the proc directory entries
55 */ 55 */
56 56
57static const char name_root[] = "vlan"; 57static const char name_root[] = "vlan";
@@ -66,7 +66,7 @@ static const char name_conf[] = "config";
66 */ 66 */
67 67
68/* 68/*
69 * Generic /proc/net/vlan/<file> file and inode operations 69 * Generic /proc/net/vlan/<file> file and inode operations
70 */ 70 */
71 71
72static struct seq_operations vlan_seq_ops = { 72static struct seq_operations vlan_seq_ops = {
@@ -111,13 +111,13 @@ static struct file_operations vlandev_fops = {
111 */ 111 */
112 112
113/* 113/*
114 * /proc/net/vlan 114 * /proc/net/vlan
115 */ 115 */
116 116
117static struct proc_dir_entry *proc_vlan_dir; 117static struct proc_dir_entry *proc_vlan_dir;
118 118
119/* 119/*
120 * /proc/net/vlan/config 120 * /proc/net/vlan/config
121 */ 121 */
122 122
123static struct proc_dir_entry *proc_vlan_conf; 123static struct proc_dir_entry *proc_vlan_conf;
@@ -238,15 +238,15 @@ int vlan_proc_rem_dev(struct net_device *vlandev)
238 */ 238 */
239 239
240/* starting at dev, find a VLAN device */ 240/* starting at dev, find a VLAN device */
241static struct net_device *vlan_skip(struct net_device *dev) 241static struct net_device *vlan_skip(struct net_device *dev)
242{ 242{
243 while (dev && !(dev->priv_flags & IFF_802_1Q_VLAN)) 243 while (dev && !(dev->priv_flags & IFF_802_1Q_VLAN))
244 dev = dev->next; 244 dev = dev->next;
245 245
246 return dev; 246 return dev;
247} 247}
248 248
249/* start read of /proc/net/vlan/config */ 249/* start read of /proc/net/vlan/config */
250static void *vlan_seq_start(struct seq_file *seq, loff_t *pos) 250static void *vlan_seq_start(struct seq_file *seq, loff_t *pos)
251{ 251{
252 struct net_device *dev; 252 struct net_device *dev;
@@ -256,19 +256,19 @@ static void *vlan_seq_start(struct seq_file *seq, loff_t *pos)
256 256
257 if (*pos == 0) 257 if (*pos == 0)
258 return SEQ_START_TOKEN; 258 return SEQ_START_TOKEN;
259 259
260 for (dev = vlan_skip(dev_base); dev && i < *pos; 260 for (dev = vlan_skip(dev_base); dev && i < *pos;
261 dev = vlan_skip(dev->next), ++i); 261 dev = vlan_skip(dev->next), ++i);
262 262
263 return (i == *pos) ? dev : NULL; 263 return (i == *pos) ? dev : NULL;
264} 264}
265 265
266static void *vlan_seq_next(struct seq_file *seq, void *v, loff_t *pos) 266static void *vlan_seq_next(struct seq_file *seq, void *v, loff_t *pos)
267{ 267{
268 ++*pos; 268 ++*pos;
269 269
270 return vlan_skip((v == SEQ_START_TOKEN) 270 return vlan_skip((v == SEQ_START_TOKEN)
271 ? dev_base 271 ? dev_base
272 : ((struct net_device *)v)->next); 272 : ((struct net_device *)v)->next);
273} 273}
274 274
@@ -287,13 +287,13 @@ static int vlan_seq_show(struct seq_file *seq, void *v)
287 if (vlan_name_type < ARRAY_SIZE(vlan_name_type_str)) 287 if (vlan_name_type < ARRAY_SIZE(vlan_name_type_str))
288 nmtype = vlan_name_type_str[vlan_name_type]; 288 nmtype = vlan_name_type_str[vlan_name_type];
289 289
290 seq_printf(seq, "Name-Type: %s\n", 290 seq_printf(seq, "Name-Type: %s\n",
291 nmtype ? nmtype : "UNKNOWN" ); 291 nmtype ? nmtype : "UNKNOWN" );
292 } else { 292 } else {
293 const struct net_device *vlandev = v; 293 const struct net_device *vlandev = v;
294 const struct vlan_dev_info *dev_info = VLAN_DEV_INFO(vlandev); 294 const struct vlan_dev_info *dev_info = VLAN_DEV_INFO(vlandev);
295 295
296 seq_printf(seq, "%-15s| %d | %s\n", vlandev->name, 296 seq_printf(seq, "%-15s| %d | %s\n", vlandev->name,
297 dev_info->vlan_id, dev_info->real_dev->name); 297 dev_info->vlan_id, dev_info->real_dev->name);
298 } 298 }
299 return 0; 299 return 0;
@@ -323,13 +323,13 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset)
323 seq_puts(seq, "\n"); 323 seq_puts(seq, "\n");
324 seq_printf(seq, fmt, "total frames transmitted", stats->tx_packets); 324 seq_printf(seq, fmt, "total frames transmitted", stats->tx_packets);
325 seq_printf(seq, fmt, "total bytes transmitted", stats->tx_bytes); 325 seq_printf(seq, fmt, "total bytes transmitted", stats->tx_bytes);
326 seq_printf(seq, fmt, "total headroom inc", 326 seq_printf(seq, fmt, "total headroom inc",
327 dev_info->cnt_inc_headroom_on_tx); 327 dev_info->cnt_inc_headroom_on_tx);
328 seq_printf(seq, fmt, "total encap on xmit", 328 seq_printf(seq, fmt, "total encap on xmit",
329 dev_info->cnt_encap_on_xmit); 329 dev_info->cnt_encap_on_xmit);
330 seq_printf(seq, "Device: %s", dev_info->real_dev->name); 330 seq_printf(seq, "Device: %s", dev_info->real_dev->name);
331 /* now show all PRIORITY mappings relating to this VLAN */ 331 /* now show all PRIORITY mappings relating to this VLAN */
332 seq_printf(seq, 332 seq_printf(seq,
333 "\nINGRESS priority mappings: 0:%lu 1:%lu 2:%lu 3:%lu 4:%lu 5:%lu 6:%lu 7:%lu\n", 333 "\nINGRESS priority mappings: 0:%lu 1:%lu 2:%lu 3:%lu 4:%lu 5:%lu 6:%lu 7:%lu\n",
334 dev_info->ingress_priority_map[0], 334 dev_info->ingress_priority_map[0],
335 dev_info->ingress_priority_map[1], 335 dev_info->ingress_priority_map[1],