aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q
diff options
context:
space:
mode:
Diffstat (limited to 'net/8021q')
-rw-r--r--net/8021q/vlan.c14
-rw-r--r--net/8021q/vlan_dev.c56
-rw-r--r--net/8021q/vlan_netlink.c10
-rw-r--r--net/8021q/vlanproc.c12
4 files changed, 46 insertions, 46 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index ac7963854103..d058c0ef3b6e 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -134,7 +134,7 @@ static void vlan_rcu_free(struct rcu_head *rcu)
134 134
135void unregister_vlan_dev(struct net_device *dev) 135void unregister_vlan_dev(struct net_device *dev)
136{ 136{
137 struct vlan_dev_info *vlan = VLAN_DEV_INFO(dev); 137 struct vlan_dev_info *vlan = vlan_dev_info(dev);
138 struct net_device *real_dev = vlan->real_dev; 138 struct net_device *real_dev = vlan->real_dev;
139 struct vlan_group *grp; 139 struct vlan_group *grp;
140 unsigned short vlan_id = vlan->vlan_id; 140 unsigned short vlan_id = vlan->vlan_id;
@@ -229,7 +229,7 @@ int vlan_check_real_dev(struct net_device *real_dev, unsigned short vlan_id)
229 229
230int register_vlan_dev(struct net_device *dev) 230int register_vlan_dev(struct net_device *dev)
231{ 231{
232 struct vlan_dev_info *vlan = VLAN_DEV_INFO(dev); 232 struct vlan_dev_info *vlan = vlan_dev_info(dev);
233 struct net_device *real_dev = vlan->real_dev; 233 struct net_device *real_dev = vlan->real_dev;
234 unsigned short vlan_id = vlan->vlan_id; 234 unsigned short vlan_id = vlan->vlan_id;
235 struct vlan_group *grp, *ngrp = NULL; 235 struct vlan_group *grp, *ngrp = NULL;
@@ -328,10 +328,10 @@ static int register_vlan_device(struct net_device *real_dev,
328 */ 328 */
329 new_dev->mtu = real_dev->mtu; 329 new_dev->mtu = real_dev->mtu;
330 330
331 VLAN_DEV_INFO(new_dev)->vlan_id = VLAN_ID; /* 1 through VLAN_VID_MASK */ 331 vlan_dev_info(new_dev)->vlan_id = VLAN_ID; /* 1 through VLAN_VID_MASK */
332 VLAN_DEV_INFO(new_dev)->real_dev = real_dev; 332 vlan_dev_info(new_dev)->real_dev = real_dev;
333 VLAN_DEV_INFO(new_dev)->dent = NULL; 333 vlan_dev_info(new_dev)->dent = NULL;
334 VLAN_DEV_INFO(new_dev)->flags = VLAN_FLAG_REORDER_HDR; 334 vlan_dev_info(new_dev)->flags = VLAN_FLAG_REORDER_HDR;
335 335
336 new_dev->rtnl_link_ops = &vlan_link_ops; 336 new_dev->rtnl_link_ops = &vlan_link_ops;
337 err = register_vlan_dev(new_dev); 337 err = register_vlan_dev(new_dev);
@@ -348,7 +348,7 @@ out_free_newdev:
348static void vlan_sync_address(struct net_device *dev, 348static void vlan_sync_address(struct net_device *dev,
349 struct net_device *vlandev) 349 struct net_device *vlandev)
350{ 350{
351 struct vlan_dev_info *vlan = VLAN_DEV_INFO(vlandev); 351 struct vlan_dev_info *vlan = vlan_dev_info(vlandev);
352 352
353 /* May be called without an actual change */ 353 /* May be called without an actual change */
354 if (!compare_ether_addr(vlan->real_dev_addr, dev->dev_addr)) 354 if (!compare_ether_addr(vlan->real_dev_addr, dev->dev_addr))
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 756a71c1f4a5..a846559da85e 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -72,7 +72,7 @@ static int vlan_dev_rebuild_header(struct sk_buff *skb)
72 72
73static inline struct sk_buff *vlan_check_reorder_header(struct sk_buff *skb) 73static inline struct sk_buff *vlan_check_reorder_header(struct sk_buff *skb)
74{ 74{
75 if (VLAN_DEV_INFO(skb->dev)->flags & VLAN_FLAG_REORDER_HDR) { 75 if (vlan_dev_info(skb->dev)->flags & VLAN_FLAG_REORDER_HDR) {
76 if (skb_shared(skb) || skb_cloned(skb)) { 76 if (skb_shared(skb) || skb_cloned(skb)) {
77 struct sk_buff *nskb = skb_copy(skb, GFP_ATOMIC); 77 struct sk_buff *nskb = skb_copy(skb, GFP_ATOMIC);
78 kfree_skb(skb); 78 kfree_skb(skb);
@@ -290,7 +290,7 @@ static inline unsigned short vlan_dev_get_egress_qos_mask(struct net_device* dev
290 struct sk_buff* skb) 290 struct sk_buff* skb)
291{ 291{
292 struct vlan_priority_tci_mapping *mp = 292 struct vlan_priority_tci_mapping *mp =
293 VLAN_DEV_INFO(dev)->egress_priority_map[(skb->priority & 0xF)]; 293 vlan_dev_info(dev)->egress_priority_map[(skb->priority & 0xF)];
294 294
295 while (mp) { 295 while (mp) {
296 if (mp->priority == skb->priority) { 296 if (mp->priority == skb->priority) {
@@ -324,7 +324,7 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
324 struct net_device *vdev = dev; /* save this for the bottom of the method */ 324 struct net_device *vdev = dev; /* save this for the bottom of the method */
325 325
326 pr_debug("%s: skb: %p type: %hx len: %u vlan_id: %hx, daddr: %p\n", 326 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); 327 __FUNCTION__, skb, type, len, vlan_dev_info(dev)->vlan_id, daddr);
328 328
329 /* build vlan header only if re_order_header flag is NOT set. This 329 /* 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 330 * fixes some programs that get confused when they see a VLAN device
@@ -334,7 +334,7 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
334 * header shuffling in the hard_start_xmit. Users can turn off this 334 * header shuffling in the hard_start_xmit. Users can turn off this
335 * REORDER behaviour with the vconfig tool. 335 * REORDER behaviour with the vconfig tool.
336 */ 336 */
337 if (!(VLAN_DEV_INFO(dev)->flags & VLAN_FLAG_REORDER_HDR)) 337 if (!(vlan_dev_info(dev)->flags & VLAN_FLAG_REORDER_HDR))
338 build_vlan_header = 1; 338 build_vlan_header = 1;
339 339
340 if (build_vlan_header) { 340 if (build_vlan_header) {
@@ -349,7 +349,7 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
349 * VLAN ID 12 bits (low bits) 349 * VLAN ID 12 bits (low bits)
350 * 350 *
351 */ 351 */
352 veth_TCI = VLAN_DEV_INFO(dev)->vlan_id; 352 veth_TCI = vlan_dev_info(dev)->vlan_id;
353 veth_TCI |= vlan_dev_get_egress_qos_mask(dev, skb); 353 veth_TCI |= vlan_dev_get_egress_qos_mask(dev, skb);
354 354
355 vhdr->h_vlan_TCI = htons(veth_TCI); 355 vhdr->h_vlan_TCI = htons(veth_TCI);
@@ -374,7 +374,7 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
374 if (saddr == NULL) 374 if (saddr == NULL)
375 saddr = dev->dev_addr; 375 saddr = dev->dev_addr;
376 376
377 dev = VLAN_DEV_INFO(dev)->real_dev; 377 dev = vlan_dev_info(dev)->real_dev;
378 378
379 /* MPLS can send us skbuffs w/out enough space. This check will grow the 379 /* MPLS can send us skbuffs w/out enough space. This check will grow the
380 * skb if it doesn't have enough headroom. Not a beautiful solution, so 380 * skb if it doesn't have enough headroom. Not a beautiful solution, so
@@ -395,7 +395,7 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
395 stats->tx_dropped++; 395 stats->tx_dropped++;
396 return -ENOMEM; 396 return -ENOMEM;
397 } 397 }
398 VLAN_DEV_INFO(vdev)->cnt_inc_headroom_on_tx++; 398 vlan_dev_info(vdev)->cnt_inc_headroom_on_tx++;
399 pr_debug("%s: %s: had to grow skb.\n", __FUNCTION__, vdev->name); 399 pr_debug("%s: %s: had to grow skb.\n", __FUNCTION__, vdev->name);
400 } 400 }
401 401
@@ -430,12 +430,12 @@ static int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
430 */ 430 */
431 431
432 if (veth->h_vlan_proto != htons(ETH_P_8021Q) || 432 if (veth->h_vlan_proto != htons(ETH_P_8021Q) ||
433 VLAN_DEV_INFO(dev)->flags & VLAN_FLAG_REORDER_HDR) { 433 vlan_dev_info(dev)->flags & VLAN_FLAG_REORDER_HDR) {
434 int orig_headroom = skb_headroom(skb); 434 int orig_headroom = skb_headroom(skb);
435 unsigned short veth_TCI; 435 unsigned short veth_TCI;
436 436
437 /* This is not a VLAN frame...but we can fix that! */ 437 /* This is not a VLAN frame...but we can fix that! */
438 VLAN_DEV_INFO(dev)->cnt_encap_on_xmit++; 438 vlan_dev_info(dev)->cnt_encap_on_xmit++;
439 439
440 pr_debug("%s: proto to encap: 0x%hx\n", 440 pr_debug("%s: proto to encap: 0x%hx\n",
441 __FUNCTION__, htons(veth->h_vlan_proto)); 441 __FUNCTION__, htons(veth->h_vlan_proto));
@@ -445,7 +445,7 @@ static int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
445 * CFI 1 bit 445 * CFI 1 bit
446 * VLAN ID 12 bits (low bits) 446 * VLAN ID 12 bits (low bits)
447 */ 447 */
448 veth_TCI = VLAN_DEV_INFO(dev)->vlan_id; 448 veth_TCI = vlan_dev_info(dev)->vlan_id;
449 veth_TCI |= vlan_dev_get_egress_qos_mask(dev, skb); 449 veth_TCI |= vlan_dev_get_egress_qos_mask(dev, skb);
450 450
451 skb = __vlan_put_tag(skb, veth_TCI); 451 skb = __vlan_put_tag(skb, veth_TCI);
@@ -455,7 +455,7 @@ static int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
455 } 455 }
456 456
457 if (orig_headroom < VLAN_HLEN) { 457 if (orig_headroom < VLAN_HLEN) {
458 VLAN_DEV_INFO(dev)->cnt_inc_headroom_on_tx++; 458 vlan_dev_info(dev)->cnt_inc_headroom_on_tx++;
459 } 459 }
460 } 460 }
461 461
@@ -472,7 +472,7 @@ static int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
472 stats->tx_packets++; /* for statics only */ 472 stats->tx_packets++; /* for statics only */
473 stats->tx_bytes += skb->len; 473 stats->tx_bytes += skb->len;
474 474
475 skb->dev = VLAN_DEV_INFO(dev)->real_dev; 475 skb->dev = vlan_dev_info(dev)->real_dev;
476 dev_queue_xmit(skb); 476 dev_queue_xmit(skb);
477 477
478 return 0; 478 return 0;
@@ -490,14 +490,14 @@ static int vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb,
490 * CFI 1 bit 490 * CFI 1 bit
491 * VLAN ID 12 bits (low bits) 491 * VLAN ID 12 bits (low bits)
492 */ 492 */
493 veth_TCI = VLAN_DEV_INFO(dev)->vlan_id; 493 veth_TCI = vlan_dev_info(dev)->vlan_id;
494 veth_TCI |= vlan_dev_get_egress_qos_mask(dev, skb); 494 veth_TCI |= vlan_dev_get_egress_qos_mask(dev, skb);
495 skb = __vlan_hwaccel_put_tag(skb, veth_TCI); 495 skb = __vlan_hwaccel_put_tag(skb, veth_TCI);
496 496
497 stats->tx_packets++; 497 stats->tx_packets++;
498 stats->tx_bytes += skb->len; 498 stats->tx_bytes += skb->len;
499 499
500 skb->dev = VLAN_DEV_INFO(dev)->real_dev; 500 skb->dev = vlan_dev_info(dev)->real_dev;
501 dev_queue_xmit(skb); 501 dev_queue_xmit(skb);
502 502
503 return 0; 503 return 0;
@@ -508,7 +508,7 @@ static int vlan_dev_change_mtu(struct net_device *dev, int new_mtu)
508 /* TODO: gotta make sure the underlying layer can handle it, 508 /* TODO: gotta make sure the underlying layer can handle it,
509 * maybe an IFF_VLAN_CAPABLE flag for devices? 509 * maybe an IFF_VLAN_CAPABLE flag for devices?
510 */ 510 */
511 if (VLAN_DEV_INFO(dev)->real_dev->mtu < new_mtu) 511 if (vlan_dev_info(dev)->real_dev->mtu < new_mtu)
512 return -ERANGE; 512 return -ERANGE;
513 513
514 dev->mtu = new_mtu; 514 dev->mtu = new_mtu;
@@ -519,7 +519,7 @@ static int vlan_dev_change_mtu(struct net_device *dev, int new_mtu)
519void vlan_dev_set_ingress_priority(const struct net_device *dev, 519void vlan_dev_set_ingress_priority(const struct net_device *dev,
520 u32 skb_prio, short vlan_prio) 520 u32 skb_prio, short vlan_prio)
521{ 521{
522 struct vlan_dev_info *vlan = VLAN_DEV_INFO(dev); 522 struct vlan_dev_info *vlan = vlan_dev_info(dev);
523 523
524 if (vlan->ingress_priority_map[vlan_prio & 0x7] && !skb_prio) 524 if (vlan->ingress_priority_map[vlan_prio & 0x7] && !skb_prio)
525 vlan->nr_ingress_mappings--; 525 vlan->nr_ingress_mappings--;
@@ -532,7 +532,7 @@ void vlan_dev_set_ingress_priority(const struct net_device *dev,
532int vlan_dev_set_egress_priority(const struct net_device *dev, 532int vlan_dev_set_egress_priority(const struct net_device *dev,
533 u32 skb_prio, short vlan_prio) 533 u32 skb_prio, short vlan_prio)
534{ 534{
535 struct vlan_dev_info *vlan = VLAN_DEV_INFO(dev); 535 struct vlan_dev_info *vlan = vlan_dev_info(dev);
536 struct vlan_priority_tci_mapping *mp = NULL; 536 struct vlan_priority_tci_mapping *mp = NULL;
537 struct vlan_priority_tci_mapping *np; 537 struct vlan_priority_tci_mapping *np;
538 u32 vlan_qos = (vlan_prio << 13) & 0xE000; 538 u32 vlan_qos = (vlan_prio << 13) & 0xE000;
@@ -573,9 +573,9 @@ int vlan_dev_set_vlan_flag(const struct net_device *dev,
573 /* verify flag is supported */ 573 /* verify flag is supported */
574 if (flag == VLAN_FLAG_REORDER_HDR) { 574 if (flag == VLAN_FLAG_REORDER_HDR) {
575 if (flag_val) { 575 if (flag_val) {
576 VLAN_DEV_INFO(dev)->flags |= VLAN_FLAG_REORDER_HDR; 576 vlan_dev_info(dev)->flags |= VLAN_FLAG_REORDER_HDR;
577 } else { 577 } else {
578 VLAN_DEV_INFO(dev)->flags &= ~VLAN_FLAG_REORDER_HDR; 578 vlan_dev_info(dev)->flags &= ~VLAN_FLAG_REORDER_HDR;
579 } 579 }
580 return 0; 580 return 0;
581 } 581 }
@@ -584,17 +584,17 @@ int vlan_dev_set_vlan_flag(const struct net_device *dev,
584 584
585void vlan_dev_get_realdev_name(const struct net_device *dev, char *result) 585void vlan_dev_get_realdev_name(const struct net_device *dev, char *result)
586{ 586{
587 strncpy(result, VLAN_DEV_INFO(dev)->real_dev->name, 23); 587 strncpy(result, vlan_dev_info(dev)->real_dev->name, 23);
588} 588}
589 589
590void vlan_dev_get_vid(const struct net_device *dev, unsigned short *result) 590void vlan_dev_get_vid(const struct net_device *dev, unsigned short *result)
591{ 591{
592 *result = VLAN_DEV_INFO(dev)->vlan_id; 592 *result = vlan_dev_info(dev)->vlan_id;
593} 593}
594 594
595static int vlan_dev_open(struct net_device *dev) 595static int vlan_dev_open(struct net_device *dev)
596{ 596{
597 struct vlan_dev_info *vlan = VLAN_DEV_INFO(dev); 597 struct vlan_dev_info *vlan = vlan_dev_info(dev);
598 struct net_device *real_dev = vlan->real_dev; 598 struct net_device *real_dev = vlan->real_dev;
599 int err; 599 int err;
600 600
@@ -618,7 +618,7 @@ static int vlan_dev_open(struct net_device *dev)
618 618
619static int vlan_dev_stop(struct net_device *dev) 619static int vlan_dev_stop(struct net_device *dev)
620{ 620{
621 struct net_device *real_dev = VLAN_DEV_INFO(dev)->real_dev; 621 struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
622 622
623 dev_mc_unsync(real_dev, dev); 623 dev_mc_unsync(real_dev, dev);
624 if (dev->flags & IFF_ALLMULTI) 624 if (dev->flags & IFF_ALLMULTI)
@@ -634,7 +634,7 @@ static int vlan_dev_stop(struct net_device *dev)
634 634
635static int vlan_dev_set_mac_address(struct net_device *dev, void *p) 635static int vlan_dev_set_mac_address(struct net_device *dev, void *p)
636{ 636{
637 struct net_device *real_dev = VLAN_DEV_INFO(dev)->real_dev; 637 struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
638 struct sockaddr *addr = p; 638 struct sockaddr *addr = p;
639 int err; 639 int err;
640 640
@@ -660,7 +660,7 @@ out:
660 660
661static int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) 661static int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
662{ 662{
663 struct net_device *real_dev = VLAN_DEV_INFO(dev)->real_dev; 663 struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
664 struct ifreq ifrr; 664 struct ifreq ifrr;
665 int err = -EOPNOTSUPP; 665 int err = -EOPNOTSUPP;
666 666
@@ -684,7 +684,7 @@ static int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
684 684
685static void vlan_dev_change_rx_flags(struct net_device *dev, int change) 685static void vlan_dev_change_rx_flags(struct net_device *dev, int change)
686{ 686{
687 struct net_device *real_dev = VLAN_DEV_INFO(dev)->real_dev; 687 struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
688 688
689 if (change & IFF_ALLMULTI) 689 if (change & IFF_ALLMULTI)
690 dev_set_allmulti(real_dev, dev->flags & IFF_ALLMULTI ? 1 : -1); 690 dev_set_allmulti(real_dev, dev->flags & IFF_ALLMULTI ? 1 : -1);
@@ -694,7 +694,7 @@ static void vlan_dev_change_rx_flags(struct net_device *dev, int change)
694 694
695static void vlan_dev_set_multicast_list(struct net_device *vlan_dev) 695static void vlan_dev_set_multicast_list(struct net_device *vlan_dev)
696{ 696{
697 dev_mc_sync(VLAN_DEV_INFO(vlan_dev)->real_dev, vlan_dev); 697 dev_mc_sync(vlan_dev_info(vlan_dev)->real_dev, vlan_dev);
698} 698}
699 699
700/* 700/*
@@ -712,7 +712,7 @@ static const struct header_ops vlan_header_ops = {
712 712
713static int vlan_dev_init(struct net_device *dev) 713static int vlan_dev_init(struct net_device *dev)
714{ 714{
715 struct net_device *real_dev = VLAN_DEV_INFO(dev)->real_dev; 715 struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
716 int subclass = 0; 716 int subclass = 0;
717 717
718 /* IFF_BROADCAST|IFF_MULTICAST; ??? */ 718 /* IFF_BROADCAST|IFF_MULTICAST; ??? */
diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c
index 9ee63583ed27..e32eeb37987e 100644
--- a/net/8021q/vlan_netlink.c
+++ b/net/8021q/vlan_netlink.c
@@ -75,7 +75,7 @@ static int vlan_validate(struct nlattr *tb[], struct nlattr *data[])
75static int vlan_changelink(struct net_device *dev, 75static int vlan_changelink(struct net_device *dev,
76 struct nlattr *tb[], struct nlattr *data[]) 76 struct nlattr *tb[], struct nlattr *data[])
77{ 77{
78 struct vlan_dev_info *vlan = VLAN_DEV_INFO(dev); 78 struct vlan_dev_info *vlan = vlan_dev_info(dev);
79 struct ifla_vlan_flags *flags; 79 struct ifla_vlan_flags *flags;
80 struct ifla_vlan_qos_mapping *m; 80 struct ifla_vlan_qos_mapping *m;
81 struct nlattr *attr; 81 struct nlattr *attr;
@@ -104,7 +104,7 @@ static int vlan_changelink(struct net_device *dev,
104static int vlan_newlink(struct net_device *dev, 104static int vlan_newlink(struct net_device *dev,
105 struct nlattr *tb[], struct nlattr *data[]) 105 struct nlattr *tb[], struct nlattr *data[])
106{ 106{
107 struct vlan_dev_info *vlan = VLAN_DEV_INFO(dev); 107 struct vlan_dev_info *vlan = vlan_dev_info(dev);
108 struct net_device *real_dev; 108 struct net_device *real_dev;
109 int err; 109 int err;
110 110
@@ -148,7 +148,7 @@ static inline size_t vlan_qos_map_size(unsigned int n)
148 148
149static size_t vlan_get_size(const struct net_device *dev) 149static size_t vlan_get_size(const struct net_device *dev)
150{ 150{
151 struct vlan_dev_info *vlan = VLAN_DEV_INFO(dev); 151 struct vlan_dev_info *vlan = vlan_dev_info(dev);
152 152
153 return nla_total_size(2) + /* IFLA_VLAN_ID */ 153 return nla_total_size(2) + /* IFLA_VLAN_ID */
154 vlan_qos_map_size(vlan->nr_ingress_mappings) + 154 vlan_qos_map_size(vlan->nr_ingress_mappings) +
@@ -157,14 +157,14 @@ static size_t vlan_get_size(const struct net_device *dev)
157 157
158static int vlan_fill_info(struct sk_buff *skb, const struct net_device *dev) 158static int vlan_fill_info(struct sk_buff *skb, const struct net_device *dev)
159{ 159{
160 struct vlan_dev_info *vlan = VLAN_DEV_INFO(dev); 160 struct vlan_dev_info *vlan = vlan_dev_info(dev);
161 struct vlan_priority_tci_mapping *pm; 161 struct vlan_priority_tci_mapping *pm;
162 struct ifla_vlan_flags f; 162 struct ifla_vlan_flags f;
163 struct ifla_vlan_qos_mapping m; 163 struct ifla_vlan_qos_mapping m;
164 struct nlattr *nest; 164 struct nlattr *nest;
165 unsigned int i; 165 unsigned int i;
166 166
167 NLA_PUT_U16(skb, IFLA_VLAN_ID, VLAN_DEV_INFO(dev)->vlan_id); 167 NLA_PUT_U16(skb, IFLA_VLAN_ID, vlan_dev_info(dev)->vlan_id);
168 if (vlan->flags) { 168 if (vlan->flags) {
169 f.flags = vlan->flags; 169 f.flags = vlan->flags;
170 f.mask = ~0; 170 f.mask = ~0;
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index 971e6233801e..b5202443b1a1 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -180,7 +180,7 @@ err:
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
185 dev_info->dent = create_proc_entry(vlandev->name, 185 dev_info->dent = create_proc_entry(vlandev->name,
186 S_IFREG|S_IRUSR|S_IWUSR, 186 S_IFREG|S_IRUSR|S_IWUSR,
@@ -199,9 +199,9 @@ int vlan_proc_add_dev (struct net_device *vlandev)
199int vlan_proc_rem_dev(struct net_device *vlandev) 199int 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, proc_vlan_dir);
204 VLAN_DEV_INFO(vlandev)->dent = NULL; 204 vlan_dev_info(vlandev)->dent = NULL;
205 } 205 }
206 return 0; 206 return 0;
207} 207}
@@ -278,7 +278,7 @@ static int vlan_seq_show(struct seq_file *seq, void *v)
278 nmtype ? nmtype : "UNKNOWN" ); 278 nmtype ? nmtype : "UNKNOWN" );
279 } else { 279 } else {
280 const struct net_device *vlandev = v; 280 const struct net_device *vlandev = v;
281 const struct vlan_dev_info *dev_info = VLAN_DEV_INFO(vlandev); 281 const struct vlan_dev_info *dev_info = vlan_dev_info(vlandev);
282 282
283 seq_printf(seq, "%-15s| %d | %s\n", vlandev->name, 283 seq_printf(seq, "%-15s| %d | %s\n", vlandev->name,
284 dev_info->vlan_id, dev_info->real_dev->name); 284 dev_info->vlan_id, dev_info->real_dev->name);
@@ -289,7 +289,7 @@ static int vlan_seq_show(struct seq_file *seq, void *v)
289static int vlandev_seq_show(struct seq_file *seq, void *offset) 289static int vlandev_seq_show(struct seq_file *seq, void *offset)
290{ 290{
291 struct net_device *vlandev = (struct net_device *) seq->private; 291 struct net_device *vlandev = (struct net_device *) seq->private;
292 const struct vlan_dev_info *dev_info = VLAN_DEV_INFO(vlandev); 292 const struct vlan_dev_info *dev_info = vlan_dev_info(vlandev);
293 struct net_device_stats *stats = &vlandev->stats; 293 struct net_device_stats *stats = &vlandev->stats;
294 static const char fmt[] = "%30s %12lu\n"; 294 static const char fmt[] = "%30s %12lu\n";
295 int i; 295 int i;