aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-01-21 03:26:41 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:08:33 -0500
commit2029cc2c84fb1169c80c6cf6fc375f11194ed8b5 (patch)
tree62bc0f946b844be0e932c332020f6d9d1bb1c2ef
parent57d3ae847d4403c5e4a35ae5f38665fff1a94c02 (diff)
[VLAN]: checkpatch cleanups
Checkpatch cleanups, consisting mainly of overly long lines and missing spaces. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/8021q/vlan.c20
-rw-r--r--net/8021q/vlan.h2
-rw-r--r--net/8021q/vlan_dev.c98
-rw-r--r--net/8021q/vlanproc.c42
-rw-r--r--net/8021q/vlanproc.h11
5 files changed, 89 insertions, 84 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index d058c0ef3b6e..8b93799c6a0d 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -43,7 +43,6 @@
43 43
44/* Our listing of VLAN group(s) */ 44/* Our listing of VLAN group(s) */
45static struct hlist_head vlan_group_hash[VLAN_GRP_HASH_SIZE]; 45static struct hlist_head vlan_group_hash[VLAN_GRP_HASH_SIZE];
46#define vlan_grp_hashfn(IDX) ((((IDX) >> VLAN_GRP_HASH_SHIFT) ^ (IDX)) & VLAN_GRP_HASH_MASK)
47 46
48static char vlan_fullname[] = "802.1Q VLAN Support"; 47static char vlan_fullname[] = "802.1Q VLAN Support";
49static char vlan_version[] = DRV_VERSION; 48static char vlan_version[] = DRV_VERSION;
@@ -60,6 +59,11 @@ static struct packet_type vlan_packet_type = {
60 59
61/* End of global variables definitions. */ 60/* End of global variables definitions. */
62 61
62static inline unsigned int vlan_grp_hashfn(unsigned int idx)
63{
64 return ((idx >> VLAN_GRP_HASH_SHIFT) ^ idx) & VLAN_GRP_HASH_MASK;
65}
66
63/* Must be invoked with RCU read lock (no preempt) */ 67/* Must be invoked with RCU read lock (no preempt) */
64static struct vlan_group *__vlan_find_group(int real_dev_ifindex) 68static struct vlan_group *__vlan_find_group(int real_dev_ifindex)
65{ 69{
@@ -94,7 +98,7 @@ static void vlan_group_free(struct vlan_group *grp)
94{ 98{
95 int i; 99 int i;
96 100
97 for (i=0; i < VLAN_GROUP_ARRAY_SPLIT_PARTS; i++) 101 for (i = 0; i < VLAN_GROUP_ARRAY_SPLIT_PARTS; i++)
98 kfree(grp->vlan_devices_arrays[i]); 102 kfree(grp->vlan_devices_arrays[i]);
99 kfree(grp); 103 kfree(grp);
100} 104}
@@ -174,7 +178,8 @@ void unregister_vlan_dev(struct net_device *dev)
174 unregister_netdevice(dev); 178 unregister_netdevice(dev);
175} 179}
176 180
177static void vlan_transfer_operstate(const struct net_device *dev, struct net_device *vlandev) 181static void vlan_transfer_operstate(const struct net_device *dev,
182 struct net_device *vlandev)
178{ 183{
179 /* Have to respect userspace enforced dormant state 184 /* Have to respect userspace enforced dormant state
180 * of real device, also must allow supplicant running 185 * of real device, also must allow supplicant running
@@ -369,7 +374,8 @@ static void vlan_sync_address(struct net_device *dev,
369 memcpy(vlan->real_dev_addr, dev->dev_addr, ETH_ALEN); 374 memcpy(vlan->real_dev_addr, dev->dev_addr, ETH_ALEN);
370} 375}
371 376
372static int vlan_device_event(struct notifier_block *unused, unsigned long event, void *ptr) 377static int vlan_device_event(struct notifier_block *unused, unsigned long event,
378 void *ptr)
373{ 379{
374 struct net_device *dev = ptr; 380 struct net_device *dev = ptr;
375 struct vlan_group *grp = __vlan_find_group(dev->ifindex); 381 struct vlan_group *grp = __vlan_find_group(dev->ifindex);
@@ -569,9 +575,8 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg)
569 err = 0; 575 err = 0;
570 vlan_dev_get_realdev_name(dev, args.u.device2); 576 vlan_dev_get_realdev_name(dev, args.u.device2);
571 if (copy_to_user(arg, &args, 577 if (copy_to_user(arg, &args,
572 sizeof(struct vlan_ioctl_args))) { 578 sizeof(struct vlan_ioctl_args)))
573 err = -EFAULT; 579 err = -EFAULT;
574 }
575 break; 580 break;
576 581
577 case GET_VLAN_VID_CMD: 582 case GET_VLAN_VID_CMD:
@@ -579,9 +584,8 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg)
579 vlan_dev_get_vid(dev, &vid); 584 vlan_dev_get_vid(dev, &vid);
580 args.u.VID = vid; 585 args.u.VID = vid;
581 if (copy_to_user(arg, &args, 586 if (copy_to_user(arg, &args,
582 sizeof(struct vlan_ioctl_args))) { 587 sizeof(struct vlan_ioctl_args)))
583 err = -EFAULT; 588 err = -EFAULT;
584 }
585 break; 589 break;
586 590
587 default: 591 default:
diff --git a/net/8021q/vlan.h b/net/8021q/vlan.h
index 0cfdf77b497c..73efcc715ccb 100644
--- a/net/8021q/vlan.h
+++ b/net/8021q/vlan.h
@@ -20,7 +20,7 @@ extern unsigned short vlan_name_type;
20 * Must be invoked with rcu_read_lock (ie preempt disabled) 20 * Must be invoked with rcu_read_lock (ie preempt disabled)
21 * or with RTNL. 21 * or with RTNL.
22 */ 22 */
23struct net_device *__find_vlan_dev(struct net_device* real_dev, 23struct net_device *__find_vlan_dev(struct net_device *real_dev,
24 unsigned short VID); /* vlan.c */ 24 unsigned short VID); /* vlan.c */
25 25
26/* found in vlan_dev.c */ 26/* found in vlan_dev.c */
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index a846559da85e..2ff7659b5e5f 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -106,13 +106,13 @@ static inline struct sk_buff *vlan_check_reorder_header(struct sk_buff *skb)
106 * SANITY NOTE 2: We are referencing to the VLAN_HDR frields, which MAY be 106 * SANITY NOTE 2: We are referencing to the VLAN_HDR frields, which MAY be
107 * stored UNALIGNED in the memory. RISC systems don't like 107 * stored UNALIGNED in the memory. RISC systems don't like
108 * such cases very much... 108 * such cases very much...
109 * SANITY NOTE 2a: According to Dave Miller & Alexey, it will always be aligned, 109 * SANITY NOTE 2a: According to Dave Miller & Alexey, it will always be
110 * so there doesn't need to be any of the unaligned stuff. It has 110 * aligned, so there doesn't need to be any of the unaligned
111 * been commented out now... --Ben 111 * stuff. It has been commented out now... --Ben
112 * 112 *
113 */ 113 */
114int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev, 114int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
115 struct packet_type* ptype, struct net_device *orig_dev) 115 struct packet_type *ptype, struct net_device *orig_dev)
116{ 116{
117 unsigned char *rawp = NULL; 117 unsigned char *rawp = NULL;
118 struct vlan_hdr *vhdr; 118 struct vlan_hdr *vhdr;
@@ -126,7 +126,8 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
126 return -1; 126 return -1;
127 } 127 }
128 128
129 if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) 129 skb = skb_share_check(skb, GFP_ATOMIC);
130 if (skb == NULL)
130 return -1; 131 return -1;
131 132
132 if (unlikely(!pskb_may_pull(skb, VLAN_HLEN))) { 133 if (unlikely(!pskb_may_pull(skb, VLAN_HLEN))) {
@@ -156,8 +157,8 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
156 skb->dev = __find_vlan_dev(dev, vid); 157 skb->dev = __find_vlan_dev(dev, vid);
157 if (!skb->dev) { 158 if (!skb->dev) {
158 rcu_read_unlock(); 159 rcu_read_unlock();
159 pr_debug("%s: ERROR: No net_device for VID: %u on dev: %s [%i]\n", 160 pr_debug("%s: ERROR: No net_device for VID: %u on dev: %s\n",
160 __FUNCTION__, (unsigned int)vid, dev->name, dev->ifindex); 161 __FUNCTION__, (unsigned int)vid, dev->name);
161 kfree_skb(skb); 162 kfree_skb(skb);
162 return -1; 163 return -1;
163 } 164 }
@@ -175,7 +176,8 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
175 /* 176 /*
176 * Deal with ingress priority mapping. 177 * Deal with ingress priority mapping.
177 */ 178 */
178 skb->priority = vlan_get_ingress_priority(skb->dev, ntohs(vhdr->h_vlan_TCI)); 179 skb->priority = vlan_get_ingress_priority(skb->dev,
180 ntohs(vhdr->h_vlan_TCI));
179 181
180 pr_debug("%s: priority: %u for TCI: %hu\n", 182 pr_debug("%s: priority: %u for TCI: %hu\n",
181 __FUNCTION__, skb->priority, ntohs(vhdr->h_vlan_TCI)); 183 __FUNCTION__, skb->priority, ntohs(vhdr->h_vlan_TCI));
@@ -185,7 +187,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
185 */ 187 */
186 switch (skb->pkt_type) { 188 switch (skb->pkt_type) {
187 case PACKET_BROADCAST: /* Yeah, stats collect these together.. */ 189 case PACKET_BROADCAST: /* Yeah, stats collect these together.. */
188 // stats->broadcast ++; // no such counter :-( 190 /* stats->broadcast ++; // no such counter :-( */
189 break; 191 break;
190 192
191 case PACKET_MULTICAST: 193 case PACKET_MULTICAST:
@@ -194,13 +196,13 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
194 196
195 case PACKET_OTHERHOST: 197 case PACKET_OTHERHOST:
196 /* Our lower layer thinks this is not local, let's make sure. 198 /* Our lower layer thinks this is not local, let's make sure.
197 * This allows the VLAN to have a different MAC than the underlying 199 * This allows the VLAN to have a different MAC than the
198 * device, and still route correctly. 200 * underlying device, and still route correctly.
199 */ 201 */
200 if (!compare_ether_addr(eth_hdr(skb)->h_dest, skb->dev->dev_addr)) { 202 if (!compare_ether_addr(eth_hdr(skb)->h_dest,
203 skb->dev->dev_addr))
201 /* It is for our (changed) MAC-address! */ 204 /* It is for our (changed) MAC-address! */
202 skb->pkt_type = PACKET_HOST; 205 skb->pkt_type = PACKET_HOST;
203 }
204 break; 206 break;
205 default: 207 default:
206 break; 208 break;
@@ -244,8 +246,8 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
244 */ 246 */
245 if (*(unsigned short *)rawp == 0xFFFF) { 247 if (*(unsigned short *)rawp == 0xFFFF) {
246 skb->protocol = htons(ETH_P_802_3); 248 skb->protocol = htons(ETH_P_802_3);
247 /* place it back on the queue to be handled by true layer 3 protocols. 249 /* place it back on the queue to be handled by true layer 3
248 */ 250 * protocols. */
249 251
250 /* See if we are configured to re-write the VLAN header 252 /* See if we are configured to re-write the VLAN header
251 * to make it look like ethernet... 253 * to make it look like ethernet...
@@ -286,17 +288,17 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
286 return 0; 288 return 0;
287} 289}
288 290
289static inline unsigned short vlan_dev_get_egress_qos_mask(struct net_device* dev, 291static inline unsigned short
290 struct sk_buff* skb) 292vlan_dev_get_egress_qos_mask(struct net_device *dev, struct sk_buff *skb)
291{ 293{
292 struct vlan_priority_tci_mapping *mp = 294 struct vlan_priority_tci_mapping *mp;
293 vlan_dev_info(dev)->egress_priority_map[(skb->priority & 0xF)];
294 295
296 mp = vlan_dev_info(dev)->egress_priority_map[(skb->priority & 0xF)];
295 while (mp) { 297 while (mp) {
296 if (mp->priority == skb->priority) { 298 if (mp->priority == skb->priority) {
297 return mp->vlan_qos; /* This should already be shifted to mask 299 return mp->vlan_qos; /* This should already be shifted
298 * correctly with the VLAN's TCI 300 * to mask correctly with the
299 */ 301 * VLAN's TCI */
300 } 302 }
301 mp = mp->next; 303 mp = mp->next;
302 } 304 }
@@ -321,10 +323,11 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
321 unsigned short veth_TCI = 0; 323 unsigned short veth_TCI = 0;
322 int rc = 0; 324 int rc = 0;
323 int build_vlan_header = 0; 325 int build_vlan_header = 0;
324 struct net_device *vdev = dev; /* save this for the bottom of the method */ 326 struct net_device *vdev = dev;
325 327
326 pr_debug("%s: skb: %p type: %hx len: %u vlan_id: %hx, daddr: %p\n", 328 pr_debug("%s: skb: %p type: %hx len: %u vlan_id: %hx, daddr: %p\n",
327 __FUNCTION__, skb, type, len, vlan_dev_info(dev)->vlan_id, daddr); 329 __FUNCTION__, skb, type, len, vlan_dev_info(dev)->vlan_id,
330 daddr);
328 331
329 /* build vlan header only if re_order_header flag is NOT set. This 332 /* build vlan header only if re_order_header flag is NOT set. This
330 * fixes some programs that get confused when they see a VLAN device 333 * fixes some programs that get confused when they see a VLAN device
@@ -342,8 +345,8 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
342 345
343 /* build the four bytes that make this a VLAN header. */ 346 /* build the four bytes that make this a VLAN header. */
344 347
345 /* Now, construct the second two bytes. This field looks something 348 /* Now, construct the second two bytes. This field looks
346 * like: 349 * something like:
347 * usr_priority: 3 bits (high bits) 350 * usr_priority: 3 bits (high bits)
348 * CFI 1 bit 351 * CFI 1 bit
349 * VLAN ID 12 bits (low bits) 352 * VLAN ID 12 bits (low bits)
@@ -355,16 +358,15 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
355 vhdr->h_vlan_TCI = htons(veth_TCI); 358 vhdr->h_vlan_TCI = htons(veth_TCI);
356 359
357 /* 360 /*
358 * Set the protocol type. 361 * Set the protocol type. For a packet of type ETH_P_802_3 we
359 * For a packet of type ETH_P_802_3 we put the length in here instead. 362 * put the length in here instead. It is up to the 802.2
360 * It is up to the 802.2 layer to carry protocol information. 363 * layer to carry protocol information.
361 */ 364 */
362 365
363 if (type != ETH_P_802_3) { 366 if (type != ETH_P_802_3)
364 vhdr->h_vlan_encapsulated_proto = htons(type); 367 vhdr->h_vlan_encapsulated_proto = htons(type);
365 } else { 368 else
366 vhdr->h_vlan_encapsulated_proto = htons(len); 369 vhdr->h_vlan_encapsulated_proto = htons(len);
367 }
368 370
369 skb->protocol = htons(ETH_P_8021Q); 371 skb->protocol = htons(ETH_P_8021Q);
370 skb_reset_network_header(skb); 372 skb_reset_network_header(skb);
@@ -376,14 +378,14 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
376 378
377 dev = vlan_dev_info(dev)->real_dev; 379 dev = vlan_dev_info(dev)->real_dev;
378 380
379 /* MPLS can send us skbuffs w/out enough space. This check will grow the 381 /* MPLS can send us skbuffs w/out enough space. This check will grow
380 * skb if it doesn't have enough headroom. Not a beautiful solution, so 382 * the skb if it doesn't have enough headroom. Not a beautiful solution,
381 * I'll tick a counter so that users can know it's happening... If they 383 * so I'll tick a counter so that users can know it's happening...
382 * care... 384 * If they care...
383 */ 385 */
384 386
385 /* NOTE: This may still break if the underlying device is not the final 387 /* NOTE: This may still break if the underlying device is not the final
386 * device (and thus there are more headers to add...) It should work for 388 * device (and thus there are more headers to add...) It should work for
387 * good-ole-ethernet though. 389 * good-ole-ethernet though.
388 */ 390 */
389 if (skb_headroom(skb) < dev->hard_header_len) { 391 if (skb_headroom(skb) < dev->hard_header_len) {
@@ -396,7 +398,7 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
396 return -ENOMEM; 398 return -ENOMEM;
397 } 399 }
398 vlan_dev_info(vdev)->cnt_inc_headroom_on_tx++; 400 vlan_dev_info(vdev)->cnt_inc_headroom_on_tx++;
399 pr_debug("%s: %s: had to grow skb.\n", __FUNCTION__, vdev->name); 401 pr_debug("%s: %s: had to grow skb\n", __FUNCTION__, vdev->name);
400 } 402 }
401 403
402 if (build_vlan_header) { 404 if (build_vlan_header) {
@@ -408,10 +410,10 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
408 else if (rc < 0) 410 else if (rc < 0)
409 rc -= VLAN_HLEN; 411 rc -= VLAN_HLEN;
410 } else 412 } else
411 /* If here, then we'll just make a normal looking ethernet frame, 413 /* If here, then we'll just make a normal looking ethernet
412 * but, the hard_start_xmit method will insert the tag (it has to 414 * frame, but, the hard_start_xmit method will insert the tag
413 * be able to do this for bridged and other skbs that don't come 415 * (it has to be able to do this for bridged and other skbs
414 * down the protocol stack in an orderly manner. 416 * that don't come down the protocol stack in an orderly manner.
415 */ 417 */
416 rc = dev_hard_header(skb, dev, type, daddr, saddr, len); 418 rc = dev_hard_header(skb, dev, type, daddr, saddr, len);
417 419
@@ -454,9 +456,8 @@ static int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
454 return 0; 456 return 0;
455 } 457 }
456 458
457 if (orig_headroom < VLAN_HLEN) { 459 if (orig_headroom < VLAN_HLEN)
458 vlan_dev_info(dev)->cnt_inc_headroom_on_tx++; 460 vlan_dev_info(dev)->cnt_inc_headroom_on_tx++;
459 }
460 } 461 }
461 462
462 pr_debug("%s: about to send skb: %p to dev: %s\n", 463 pr_debug("%s: about to send skb: %p to dev: %s\n",
@@ -572,11 +573,10 @@ int vlan_dev_set_vlan_flag(const struct net_device *dev,
572{ 573{
573 /* verify flag is supported */ 574 /* verify flag is supported */
574 if (flag == VLAN_FLAG_REORDER_HDR) { 575 if (flag == VLAN_FLAG_REORDER_HDR) {
575 if (flag_val) { 576 if (flag_val)
576 vlan_dev_info(dev)->flags |= VLAN_FLAG_REORDER_HDR; 577 vlan_dev_info(dev)->flags |= VLAN_FLAG_REORDER_HDR;
577 } else { 578 else
578 vlan_dev_info(dev)->flags &= ~VLAN_FLAG_REORDER_HDR; 579 vlan_dev_info(dev)->flags &= ~VLAN_FLAG_REORDER_HDR;
579 }
580 return 0; 580 return 0;
581 } 581 }
582 return -EINVAL; 582 return -EINVAL;
@@ -667,7 +667,7 @@ static int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
667 strncpy(ifrr.ifr_name, real_dev->name, IFNAMSIZ); 667 strncpy(ifrr.ifr_name, real_dev->name, IFNAMSIZ);
668 ifrr.ifr_ifru = ifr->ifr_ifru; 668 ifrr.ifr_ifru = ifr->ifr_ifru;
669 669
670 switch(cmd) { 670 switch (cmd) {
671 case SIOCGMIIPHY: 671 case SIOCGMIIPHY:
672 case SIOCGMIIREG: 672 case SIOCGMIIREG:
673 case SIOCSMIIREG: 673 case SIOCSMIIREG:
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index b5202443b1a1..2a4e1aabb23b 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -125,10 +125,10 @@ static struct proc_dir_entry *proc_vlan_conf;
125 125
126/* Strings */ 126/* Strings */
127static const char *vlan_name_type_str[VLAN_NAME_TYPE_HIGHEST] = { 127static const char *vlan_name_type_str[VLAN_NAME_TYPE_HIGHEST] = {
128 [VLAN_NAME_TYPE_RAW_PLUS_VID] = "VLAN_NAME_TYPE_RAW_PLUS_VID", 128 [VLAN_NAME_TYPE_RAW_PLUS_VID] = "VLAN_NAME_TYPE_RAW_PLUS_VID",
129 [VLAN_NAME_TYPE_PLUS_VID_NO_PAD] = "VLAN_NAME_TYPE_PLUS_VID_NO_PAD", 129 [VLAN_NAME_TYPE_PLUS_VID_NO_PAD] = "VLAN_NAME_TYPE_PLUS_VID_NO_PAD",
130 [VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD]= "VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD", 130 [VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD] = "VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD",
131 [VLAN_NAME_TYPE_PLUS_VID] = "VLAN_NAME_TYPE_PLUS_VID", 131 [VLAN_NAME_TYPE_PLUS_VID] = "VLAN_NAME_TYPE_PLUS_VID",
132}; 132};
133/* 133/*
134 * Interface functions 134 * Interface functions
@@ -178,7 +178,7 @@ err:
178 * Add directory entry for VLAN device. 178 * Add directory entry for VLAN device.
179 */ 179 */
180 180
181int vlan_proc_add_dev (struct net_device *vlandev) 181int vlan_proc_add_dev(struct net_device *vlandev)
182{ 182{
183 struct vlan_dev_info *dev_info = vlan_dev_info(vlandev); 183 struct vlan_dev_info *dev_info = vlan_dev_info(vlandev);
184 184
@@ -200,7 +200,8 @@ int vlan_proc_rem_dev(struct net_device *vlandev)
200{ 200{
201 /** NOTE: This will consume the memory pointed to by dent, it seems. */ 201 /** NOTE: This will consume the memory pointed to by dent, it seems. */
202 if (vlan_dev_info(vlandev)->dent) { 202 if (vlan_dev_info(vlandev)->dent) {
203 remove_proc_entry(vlan_dev_info(vlandev)->dent->name, proc_vlan_dir); 203 remove_proc_entry(vlan_dev_info(vlandev)->dent->name,
204 proc_vlan_dir);
204 vlan_dev_info(vlandev)->dent = NULL; 205 vlan_dev_info(vlandev)->dent = NULL;
205 } 206 }
206 return 0; 207 return 0;
@@ -275,7 +276,7 @@ static int vlan_seq_show(struct seq_file *seq, void *v)
275 nmtype = vlan_name_type_str[vlan_name_type]; 276 nmtype = vlan_name_type_str[vlan_name_type];
276 277
277 seq_printf(seq, "Name-Type: %s\n", 278 seq_printf(seq, "Name-Type: %s\n",
278 nmtype ? nmtype : "UNKNOWN" ); 279 nmtype ? nmtype : "UNKNOWN");
279 } else { 280 } else {
280 const struct net_device *vlandev = v; 281 const struct net_device *vlandev = v;
281 const struct vlan_dev_info *dev_info = vlan_dev_info(vlandev); 282 const struct vlan_dev_info *dev_info = vlan_dev_info(vlandev);
@@ -297,9 +298,10 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset)
297 if (!(vlandev->priv_flags & IFF_802_1Q_VLAN)) 298 if (!(vlandev->priv_flags & IFF_802_1Q_VLAN))
298 return 0; 299 return 0;
299 300
300 seq_printf(seq, "%s VID: %d REORDER_HDR: %i dev->priv_flags: %hx\n", 301 seq_printf(seq,
301 vlandev->name, dev_info->vlan_id, 302 "%s VID: %d REORDER_HDR: %i dev->priv_flags: %hx\n",
302 (int)(dev_info->flags & 1), vlandev->priv_flags); 303 vlandev->name, dev_info->vlan_id,
304 (int)(dev_info->flags & 1), vlandev->priv_flags);
303 305
304 seq_printf(seq, fmt, "total frames received", stats->rx_packets); 306 seq_printf(seq, fmt, "total frames received", stats->rx_packets);
305 seq_printf(seq, fmt, "total bytes received", stats->rx_bytes); 307 seq_printf(seq, fmt, "total bytes received", stats->rx_bytes);
@@ -313,16 +315,16 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset)
313 dev_info->cnt_encap_on_xmit); 315 dev_info->cnt_encap_on_xmit);
314 seq_printf(seq, "Device: %s", dev_info->real_dev->name); 316 seq_printf(seq, "Device: %s", dev_info->real_dev->name);
315 /* now show all PRIORITY mappings relating to this VLAN */ 317 /* now show all PRIORITY mappings relating to this VLAN */
316 seq_printf(seq, 318 seq_printf(seq, "\nINGRESS priority mappings: "
317 "\nINGRESS priority mappings: 0:%u 1:%u 2:%u 3:%u 4:%u 5:%u 6:%u 7:%u\n", 319 "0:%u 1:%u 2:%u 3:%u 4:%u 5:%u 6:%u 7:%u\n",
318 dev_info->ingress_priority_map[0], 320 dev_info->ingress_priority_map[0],
319 dev_info->ingress_priority_map[1], 321 dev_info->ingress_priority_map[1],
320 dev_info->ingress_priority_map[2], 322 dev_info->ingress_priority_map[2],
321 dev_info->ingress_priority_map[3], 323 dev_info->ingress_priority_map[3],
322 dev_info->ingress_priority_map[4], 324 dev_info->ingress_priority_map[4],
323 dev_info->ingress_priority_map[5], 325 dev_info->ingress_priority_map[5],
324 dev_info->ingress_priority_map[6], 326 dev_info->ingress_priority_map[6],
325 dev_info->ingress_priority_map[7]); 327 dev_info->ingress_priority_map[7]);
326 328
327 seq_printf(seq, "EGRESSS priority Mappings: "); 329 seq_printf(seq, "EGRESSS priority Mappings: ");
328 for (i = 0; i < 16; i++) { 330 for (i = 0; i < 16; i++) {
diff --git a/net/8021q/vlanproc.h b/net/8021q/vlanproc.h
index f908ee332fd8..da542cacc5a5 100644
--- a/net/8021q/vlanproc.h
+++ b/net/8021q/vlanproc.h
@@ -4,16 +4,15 @@
4#ifdef CONFIG_PROC_FS 4#ifdef CONFIG_PROC_FS
5int vlan_proc_init(void); 5int vlan_proc_init(void);
6int vlan_proc_rem_dev(struct net_device *vlandev); 6int vlan_proc_rem_dev(struct net_device *vlandev);
7int vlan_proc_add_dev (struct net_device *vlandev); 7int vlan_proc_add_dev(struct net_device *vlandev);
8void vlan_proc_cleanup (void); 8void vlan_proc_cleanup(void);
9 9
10#else /* No CONFIG_PROC_FS */ 10#else /* No CONFIG_PROC_FS */
11 11
12#define vlan_proc_init() (0) 12#define vlan_proc_init() (0)
13#define vlan_proc_cleanup() do {} while(0) 13#define vlan_proc_cleanup() do {} while (0)
14#define vlan_proc_add_dev(dev) ({(void)(dev), 0;}) 14#define vlan_proc_add_dev(dev) ({(void)(dev), 0; })
15#define vlan_proc_rem_dev(dev) ({(void)(dev), 0;}) 15#define vlan_proc_rem_dev(dev) ({(void)(dev), 0; })
16
17#endif 16#endif
18 17
19#endif /* !(__BEN_VLAN_PROC_INC__) */ 18#endif /* !(__BEN_VLAN_PROC_INC__) */