|
@@ -439,7 +439,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
|
|
switch (event) {
|
|
switch (event) {
|
|
case NETDEV_CHANGE:
|
|
case NETDEV_CHANGE:
|
|
/* Propagate real device state to vlan devices */
|
|
/* Propagate real device state to vlan devices */
|
|
- for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) {
|
|
|
|
|
|
+ for (i = 0; i < VLAN_N_VID; i++) {
|
|
vlandev = vlan_group_get_device(grp, i);
|
|
vlandev = vlan_group_get_device(grp, i);
|
|
if (!vlandev)
|
|
if (!vlandev)
|
|
continue;
|
|
continue;
|
|
@@ -450,7 +450,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
|
|
|
|
|
|
case NETDEV_CHANGEADDR:
|
|
case NETDEV_CHANGEADDR:
|
|
/* Adjust unicast filters on underlying device */
|
|
/* Adjust unicast filters on underlying device */
|
|
- for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) {
|
|
|
|
|
|
+ for (i = 0; i < VLAN_N_VID; i++) {
|
|
vlandev = vlan_group_get_device(grp, i);
|
|
vlandev = vlan_group_get_device(grp, i);
|
|
if (!vlandev)
|
|
if (!vlandev)
|
|
continue;
|
|
continue;
|
|
@@ -464,7 +464,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
|
|
break;
|
|
break;
|
|
|
|
|
|
case NETDEV_CHANGEMTU:
|
|
case NETDEV_CHANGEMTU:
|
|
- for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) {
|
|
|
|
|
|
+ for (i = 0; i < VLAN_N_VID; i++) {
|
|
vlandev = vlan_group_get_device(grp, i);
|
|
vlandev = vlan_group_get_device(grp, i);
|
|
if (!vlandev)
|
|
if (!vlandev)
|
|
continue;
|
|
continue;
|
|
@@ -478,7 +478,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
|
|
|
|
|
|
case NETDEV_FEAT_CHANGE:
|
|
case NETDEV_FEAT_CHANGE:
|
|
/* Propagate device features to underlying device */
|
|
/* Propagate device features to underlying device */
|
|
- for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) {
|
|
|
|
|
|
+ for (i = 0; i < VLAN_N_VID; i++) {
|
|
vlandev = vlan_group_get_device(grp, i);
|
|
vlandev = vlan_group_get_device(grp, i);
|
|
if (!vlandev)
|
|
if (!vlandev)
|
|
continue;
|
|
continue;
|
|
@@ -490,7 +490,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
|
|
|
|
|
|
case NETDEV_DOWN:
|
|
case NETDEV_DOWN:
|
|
/* Put all VLANs for this dev in the down state too. */
|
|
/* Put all VLANs for this dev in the down state too. */
|
|
- for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) {
|
|
|
|
|
|
+ for (i = 0; i < VLAN_N_VID; i++) {
|
|
vlandev = vlan_group_get_device(grp, i);
|
|
vlandev = vlan_group_get_device(grp, i);
|
|
if (!vlandev)
|
|
if (!vlandev)
|
|
continue;
|
|
continue;
|
|
@@ -508,7 +508,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
|
|
|
|
|
|
case NETDEV_UP:
|
|
case NETDEV_UP:
|
|
/* Put all VLANs for this dev in the up state too. */
|
|
/* Put all VLANs for this dev in the up state too. */
|
|
- for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) {
|
|
|
|
|
|
+ for (i = 0; i < VLAN_N_VID; i++) {
|
|
vlandev = vlan_group_get_device(grp, i);
|
|
vlandev = vlan_group_get_device(grp, i);
|
|
if (!vlandev)
|
|
if (!vlandev)
|
|
continue;
|
|
continue;
|
|
@@ -532,7 +532,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
|
|
/* Delete all VLANs for this dev. */
|
|
/* Delete all VLANs for this dev. */
|
|
grp->killall = 1;
|
|
grp->killall = 1;
|
|
|
|
|
|
- for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) {
|
|
|
|
|
|
+ for (i = 0; i < VLAN_N_VID; i++) {
|
|
vlandev = vlan_group_get_device(grp, i);
|
|
vlandev = vlan_group_get_device(grp, i);
|
|
if (!vlandev)
|
|
if (!vlandev)
|
|
continue;
|
|
continue;
|
|
@@ -540,7 +540,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
|
|
/* unregistration of last vlan destroys group, abort
|
|
/* unregistration of last vlan destroys group, abort
|
|
* afterwards */
|
|
* afterwards */
|
|
if (grp->nr_vlans == 1)
|
|
if (grp->nr_vlans == 1)
|
|
- i = VLAN_GROUP_ARRAY_LEN;
|
|
|
|
|
|
+ i = VLAN_N_VID;
|
|
|
|
|
|
unregister_vlan_dev(vlandev, &list);
|
|
unregister_vlan_dev(vlandev, &list);
|
|
}
|
|
}
|