aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q/vlan.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/8021q/vlan.c')
-rw-r--r--net/8021q/vlan.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 25c21332e9c3..54f22d820ef5 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -439,7 +439,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
439 switch (event) { 439 switch (event) {
440 case NETDEV_CHANGE: 440 case NETDEV_CHANGE:
441 /* Propagate real device state to vlan devices */ 441 /* Propagate real device state to vlan devices */
442 for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { 442 for (i = 0; i < VLAN_N_VID; i++) {
443 vlandev = vlan_group_get_device(grp, i); 443 vlandev = vlan_group_get_device(grp, i);
444 if (!vlandev) 444 if (!vlandev)
445 continue; 445 continue;
@@ -450,7 +450,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
450 450
451 case NETDEV_CHANGEADDR: 451 case NETDEV_CHANGEADDR:
452 /* Adjust unicast filters on underlying device */ 452 /* Adjust unicast filters on underlying device */
453 for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { 453 for (i = 0; i < VLAN_N_VID; i++) {
454 vlandev = vlan_group_get_device(grp, i); 454 vlandev = vlan_group_get_device(grp, i);
455 if (!vlandev) 455 if (!vlandev)
456 continue; 456 continue;
@@ -464,7 +464,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
464 break; 464 break;
465 465
466 case NETDEV_CHANGEMTU: 466 case NETDEV_CHANGEMTU:
467 for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { 467 for (i = 0; i < VLAN_N_VID; i++) {
468 vlandev = vlan_group_get_device(grp, i); 468 vlandev = vlan_group_get_device(grp, i);
469 if (!vlandev) 469 if (!vlandev)
470 continue; 470 continue;
@@ -478,7 +478,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
478 478
479 case NETDEV_FEAT_CHANGE: 479 case NETDEV_FEAT_CHANGE:
480 /* Propagate device features to underlying device */ 480 /* Propagate device features to underlying device */
481 for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { 481 for (i = 0; i < VLAN_N_VID; i++) {
482 vlandev = vlan_group_get_device(grp, i); 482 vlandev = vlan_group_get_device(grp, i);
483 if (!vlandev) 483 if (!vlandev)
484 continue; 484 continue;
@@ -490,7 +490,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
490 490
491 case NETDEV_DOWN: 491 case NETDEV_DOWN:
492 /* Put all VLANs for this dev in the down state too. */ 492 /* Put all VLANs for this dev in the down state too. */
493 for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { 493 for (i = 0; i < VLAN_N_VID; i++) {
494 vlandev = vlan_group_get_device(grp, i); 494 vlandev = vlan_group_get_device(grp, i);
495 if (!vlandev) 495 if (!vlandev)
496 continue; 496 continue;
@@ -508,7 +508,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
508 508
509 case NETDEV_UP: 509 case NETDEV_UP:
510 /* Put all VLANs for this dev in the up state too. */ 510 /* Put all VLANs for this dev in the up state too. */
511 for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { 511 for (i = 0; i < VLAN_N_VID; i++) {
512 vlandev = vlan_group_get_device(grp, i); 512 vlandev = vlan_group_get_device(grp, i);
513 if (!vlandev) 513 if (!vlandev)
514 continue; 514 continue;
@@ -532,7 +532,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
532 /* Delete all VLANs for this dev. */ 532 /* Delete all VLANs for this dev. */
533 grp->killall = 1; 533 grp->killall = 1;
534 534
535 for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { 535 for (i = 0; i < VLAN_N_VID; i++) {
536 vlandev = vlan_group_get_device(grp, i); 536 vlandev = vlan_group_get_device(grp, i);
537 if (!vlandev) 537 if (!vlandev)
538 continue; 538 continue;
@@ -540,7 +540,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
540 /* unregistration of last vlan destroys group, abort 540 /* unregistration of last vlan destroys group, abort
541 * afterwards */ 541 * afterwards */
542 if (grp->nr_vlans == 1) 542 if (grp->nr_vlans == 1)
543 i = VLAN_GROUP_ARRAY_LEN; 543 i = VLAN_N_VID;
544 544
545 unregister_vlan_dev(vlandev, &list); 545 unregister_vlan_dev(vlandev, &list);
546 } 546 }