diff options
-rw-r--r-- | drivers/net/benet/be.h | 2 | ||||
-rw-r--r-- | drivers/net/benet/be_main.c | 2 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 2 | ||||
-rw-r--r-- | drivers/net/e1000e/netdev.c | 2 | ||||
-rw-r--r-- | drivers/net/igb/igb_main.c | 2 | ||||
-rw-r--r-- | drivers/net/igbvf/netdev.c | 2 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 2 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 2 | ||||
-rw-r--r-- | drivers/net/ixgbevf/ixgbevf_main.c | 2 | ||||
-rw-r--r-- | drivers/net/qlcnic/qlcnic_main.c | 2 | ||||
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_drv.c | 2 | ||||
-rw-r--r-- | drivers/net/vxge/vxge-main.c | 2 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 6 | ||||
-rw-r--r-- | include/linux/if_vlan.h | 4 | ||||
-rw-r--r-- | net/8021q/vlan.c | 16 | ||||
-rw-r--r-- | net/bridge/netfilter/ebt_vlan.c | 4 |
16 files changed, 27 insertions, 27 deletions
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h index 1afabb1e6620..59a17b569b7f 100644 --- a/drivers/net/benet/be.h +++ b/drivers/net/benet/be.h | |||
@@ -263,7 +263,7 @@ struct be_adapter { | |||
263 | struct vlan_group *vlan_grp; | 263 | struct vlan_group *vlan_grp; |
264 | u16 vlans_added; | 264 | u16 vlans_added; |
265 | u16 max_vlans; /* Number of vlans supported */ | 265 | u16 max_vlans; /* Number of vlans supported */ |
266 | u8 vlan_tag[VLAN_GROUP_ARRAY_LEN]; | 266 | u8 vlan_tag[VLAN_N_VID]; |
267 | struct be_dma_mem mc_cmd_mem; | 267 | struct be_dma_mem mc_cmd_mem; |
268 | 268 | ||
269 | struct be_dma_mem stats_cmd; | 269 | struct be_dma_mem stats_cmd; |
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 9a1cd28b426d..4b59e53890b2 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
@@ -626,7 +626,7 @@ static int be_vid_config(struct be_adapter *adapter, bool vf, u32 vf_num) | |||
626 | 626 | ||
627 | if (adapter->vlans_added <= adapter->max_vlans) { | 627 | if (adapter->vlans_added <= adapter->max_vlans) { |
628 | /* Construct VLAN Table to give to HW */ | 628 | /* Construct VLAN Table to give to HW */ |
629 | for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { | 629 | for (i = 0; i < VLAN_N_VID; i++) { |
630 | if (adapter->vlan_tag[i]) { | 630 | if (adapter->vlan_tag[i]) { |
631 | vtag[ntags] = cpu_to_le16(i); | 631 | vtag[ntags] = cpu_to_le16(i); |
632 | ntags++; | 632 | ntags++; |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index cb3f84b81793..232ac2dcb497 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -4541,7 +4541,7 @@ static void e1000_restore_vlan(struct e1000_adapter *adapter) | |||
4541 | 4541 | ||
4542 | if (adapter->vlgrp) { | 4542 | if (adapter->vlgrp) { |
4543 | u16 vid; | 4543 | u16 vid; |
4544 | for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) { | 4544 | for (vid = 0; vid < VLAN_N_VID; vid++) { |
4545 | if (!vlan_group_get_device(adapter->vlgrp, vid)) | 4545 | if (!vlan_group_get_device(adapter->vlgrp, vid)) |
4546 | continue; | 4546 | continue; |
4547 | e1000_vlan_rx_add_vid(adapter->netdev, vid); | 4547 | e1000_vlan_rx_add_vid(adapter->netdev, vid); |
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 992b622fe205..5d6cdea0eb14 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -2545,7 +2545,7 @@ static void e1000_restore_vlan(struct e1000_adapter *adapter) | |||
2545 | if (!adapter->vlgrp) | 2545 | if (!adapter->vlgrp) |
2546 | return; | 2546 | return; |
2547 | 2547 | ||
2548 | for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) { | 2548 | for (vid = 0; vid < VLAN_N_VID; vid++) { |
2549 | if (!vlan_group_get_device(adapter->vlgrp, vid)) | 2549 | if (!vlan_group_get_device(adapter->vlgrp, vid)) |
2550 | continue; | 2550 | continue; |
2551 | e1000_vlan_rx_add_vid(adapter->netdev, vid); | 2551 | e1000_vlan_rx_add_vid(adapter->netdev, vid); |
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index b8dccc0ac089..0f0939caf091 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -6153,7 +6153,7 @@ static void igb_restore_vlan(struct igb_adapter *adapter) | |||
6153 | 6153 | ||
6154 | if (adapter->vlgrp) { | 6154 | if (adapter->vlgrp) { |
6155 | u16 vid; | 6155 | u16 vid; |
6156 | for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) { | 6156 | for (vid = 0; vid < VLAN_N_VID; vid++) { |
6157 | if (!vlan_group_get_device(adapter->vlgrp, vid)) | 6157 | if (!vlan_group_get_device(adapter->vlgrp, vid)) |
6158 | continue; | 6158 | continue; |
6159 | igb_vlan_rx_add_vid(adapter->netdev, vid); | 6159 | igb_vlan_rx_add_vid(adapter->netdev, vid); |
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c index 6693323a6cf5..ebfaa68ee630 100644 --- a/drivers/net/igbvf/netdev.c +++ b/drivers/net/igbvf/netdev.c | |||
@@ -1254,7 +1254,7 @@ static void igbvf_restore_vlan(struct igbvf_adapter *adapter) | |||
1254 | if (!adapter->vlgrp) | 1254 | if (!adapter->vlgrp) |
1255 | return; | 1255 | return; |
1256 | 1256 | ||
1257 | for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) { | 1257 | for (vid = 0; vid < VLAN_N_VID; vid++) { |
1258 | if (!vlan_group_get_device(adapter->vlgrp, vid)) | 1258 | if (!vlan_group_get_device(adapter->vlgrp, vid)) |
1259 | continue; | 1259 | continue; |
1260 | igbvf_vlan_rx_add_vid(adapter->netdev, vid); | 1260 | igbvf_vlan_rx_add_vid(adapter->netdev, vid); |
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index 80e62578ffa0..666207a9c039 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
@@ -2223,7 +2223,7 @@ ixgb_restore_vlan(struct ixgb_adapter *adapter) | |||
2223 | 2223 | ||
2224 | if (adapter->vlgrp) { | 2224 | if (adapter->vlgrp) { |
2225 | u16 vid; | 2225 | u16 vid; |
2226 | for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) { | 2226 | for (vid = 0; vid < VLAN_N_VID; vid++) { |
2227 | if (!vlan_group_get_device(adapter->vlgrp, vid)) | 2227 | if (!vlan_group_get_device(adapter->vlgrp, vid)) |
2228 | continue; | 2228 | continue; |
2229 | ixgb_vlan_rx_add_vid(adapter->netdev, vid); | 2229 | ixgb_vlan_rx_add_vid(adapter->netdev, vid); |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 790a0dae1247..1d424428079f 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -3185,7 +3185,7 @@ static void ixgbe_restore_vlan(struct ixgbe_adapter *adapter) | |||
3185 | 3185 | ||
3186 | if (adapter->vlgrp) { | 3186 | if (adapter->vlgrp) { |
3187 | u16 vid; | 3187 | u16 vid; |
3188 | for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) { | 3188 | for (vid = 0; vid < VLAN_N_VID; vid++) { |
3189 | if (!vlan_group_get_device(adapter->vlgrp, vid)) | 3189 | if (!vlan_group_get_device(adapter->vlgrp, vid)) |
3190 | continue; | 3190 | continue; |
3191 | ixgbe_vlan_rx_add_vid(adapter->netdev, vid); | 3191 | ixgbe_vlan_rx_add_vid(adapter->netdev, vid); |
diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c index 0866a1cf4d7b..78bfbe42ca9b 100644 --- a/drivers/net/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ixgbevf/ixgbevf_main.c | |||
@@ -1495,7 +1495,7 @@ static void ixgbevf_restore_vlan(struct ixgbevf_adapter *adapter) | |||
1495 | 1495 | ||
1496 | if (adapter->vlgrp) { | 1496 | if (adapter->vlgrp) { |
1497 | u16 vid; | 1497 | u16 vid; |
1498 | for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) { | 1498 | for (vid = 0; vid < VLAN_N_VID; vid++) { |
1499 | if (!vlan_group_get_device(adapter->vlgrp, vid)) | 1499 | if (!vlan_group_get_device(adapter->vlgrp, vid)) |
1500 | continue; | 1500 | continue; |
1501 | ixgbevf_vlan_rx_add_vid(adapter->netdev, vid); | 1501 | ixgbevf_vlan_rx_add_vid(adapter->netdev, vid); |
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index 4aada0b8ceb1..f047c7c48314 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c | |||
@@ -4093,7 +4093,7 @@ qlcnic_restore_indev_addr(struct net_device *netdev, unsigned long event) | |||
4093 | if (!adapter->vlgrp) | 4093 | if (!adapter->vlgrp) |
4094 | return; | 4094 | return; |
4095 | 4095 | ||
4096 | for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) { | 4096 | for (vid = 0; vid < VLAN_N_VID; vid++) { |
4097 | dev = vlan_group_get_device(adapter->vlgrp, vid); | 4097 | dev = vlan_group_get_device(adapter->vlgrp, vid); |
4098 | if (!dev) | 4098 | if (!dev) |
4099 | continue; | 4099 | continue; |
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 198ce92af0c3..b1de73b1bf1a 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
@@ -1634,7 +1634,7 @@ vmxnet3_restore_vlan(struct vmxnet3_adapter *adapter) | |||
1634 | u32 *vfTable = adapter->shared->devRead.rxFilterConf.vfTable; | 1634 | u32 *vfTable = adapter->shared->devRead.rxFilterConf.vfTable; |
1635 | bool activeVlan = false; | 1635 | bool activeVlan = false; |
1636 | 1636 | ||
1637 | for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) { | 1637 | for (vid = 0; vid < VLAN_N_VID; vid++) { |
1638 | if (vlan_group_get_device(adapter->vlan_grp, vid)) { | 1638 | if (vlan_group_get_device(adapter->vlan_grp, vid)) { |
1639 | VMXNET3_SET_VFTABLE_ENTRY(vfTable, vid); | 1639 | VMXNET3_SET_VFTABLE_ENTRY(vfTable, vid); |
1640 | activeVlan = true; | 1640 | activeVlan = true; |
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c index 5378b849f54f..0bda7fe05d4b 100644 --- a/drivers/net/vxge/vxge-main.c +++ b/drivers/net/vxge/vxge-main.c | |||
@@ -1862,7 +1862,7 @@ enum vxge_hw_status vxge_restore_vpath_vid_table(struct vxge_vpath *vpath) | |||
1862 | 1862 | ||
1863 | if (vdev->vlgrp && vpath->is_open) { | 1863 | if (vdev->vlgrp && vpath->is_open) { |
1864 | 1864 | ||
1865 | for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) { | 1865 | for (vid = 0; vid < VLAN_N_VID; vid++) { |
1866 | if (!vlan_group_get_device(vdev->vlgrp, vid)) | 1866 | if (!vlan_group_get_device(vdev->vlgrp, vid)) |
1867 | continue; | 1867 | continue; |
1868 | /* Add these vlan to the vid table */ | 1868 | /* Add these vlan to the vid table */ |
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index c094707fcbff..74d1401a5d5e 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -1820,7 +1820,7 @@ static void qeth_l3_add_vlan_mc(struct qeth_card *card) | |||
1820 | return; | 1820 | return; |
1821 | 1821 | ||
1822 | vg = card->vlangrp; | 1822 | vg = card->vlangrp; |
1823 | for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { | 1823 | for (i = 0; i < VLAN_N_VID; i++) { |
1824 | struct net_device *netdev = vlan_group_get_device(vg, i); | 1824 | struct net_device *netdev = vlan_group_get_device(vg, i); |
1825 | if (netdev == NULL || | 1825 | if (netdev == NULL || |
1826 | !(netdev->flags & IFF_UP)) | 1826 | !(netdev->flags & IFF_UP)) |
@@ -1883,7 +1883,7 @@ static void qeth_l3_add_vlan_mc6(struct qeth_card *card) | |||
1883 | return; | 1883 | return; |
1884 | 1884 | ||
1885 | vg = card->vlangrp; | 1885 | vg = card->vlangrp; |
1886 | for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { | 1886 | for (i = 0; i < VLAN_N_VID; i++) { |
1887 | struct net_device *netdev = vlan_group_get_device(vg, i); | 1887 | struct net_device *netdev = vlan_group_get_device(vg, i); |
1888 | if (netdev == NULL || | 1888 | if (netdev == NULL || |
1889 | !(netdev->flags & IFF_UP)) | 1889 | !(netdev->flags & IFF_UP)) |
@@ -2247,7 +2247,7 @@ static int qeth_l3_verify_vlan_dev(struct net_device *dev, | |||
2247 | if (!vg) | 2247 | if (!vg) |
2248 | return rc; | 2248 | return rc; |
2249 | 2249 | ||
2250 | for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { | 2250 | for (i = 0; i < VLAN_N_VID; i++) { |
2251 | if (vlan_group_get_device(vg, i) == dev) { | 2251 | if (vlan_group_get_device(vg, i) == dev) { |
2252 | rc = QETH_VLAN_CARD; | 2252 | rc = QETH_VLAN_CARD; |
2253 | break; | 2253 | break; |
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index a52320751bfc..494cce866564 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -68,6 +68,7 @@ static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb) | |||
68 | #define VLAN_CFI_MASK 0x1000 /* Canonical Format Indicator */ | 68 | #define VLAN_CFI_MASK 0x1000 /* Canonical Format Indicator */ |
69 | #define VLAN_TAG_PRESENT VLAN_CFI_MASK | 69 | #define VLAN_TAG_PRESENT VLAN_CFI_MASK |
70 | #define VLAN_VID_MASK 0x0fff /* VLAN Identifier */ | 70 | #define VLAN_VID_MASK 0x0fff /* VLAN Identifier */ |
71 | #define VLAN_N_VID 4096 | ||
71 | 72 | ||
72 | /* found in socket.c */ | 73 | /* found in socket.c */ |
73 | extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *)); | 74 | extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *)); |
@@ -76,9 +77,8 @@ extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *)); | |||
76 | * depends on completely exhausting the VLAN identifier space. Thus | 77 | * depends on completely exhausting the VLAN identifier space. Thus |
77 | * it gives constant time look-up, but in many cases it wastes memory. | 78 | * it gives constant time look-up, but in many cases it wastes memory. |
78 | */ | 79 | */ |
79 | #define VLAN_GROUP_ARRAY_LEN 4096 | ||
80 | #define VLAN_GROUP_ARRAY_SPLIT_PARTS 8 | 80 | #define VLAN_GROUP_ARRAY_SPLIT_PARTS 8 |
81 | #define VLAN_GROUP_ARRAY_PART_LEN (VLAN_GROUP_ARRAY_LEN/VLAN_GROUP_ARRAY_SPLIT_PARTS) | 81 | #define VLAN_GROUP_ARRAY_PART_LEN (VLAN_N_VID/VLAN_GROUP_ARRAY_SPLIT_PARTS) |
82 | 82 | ||
83 | struct vlan_group { | 83 | struct vlan_group { |
84 | struct net_device *real_dev; /* The ethernet(like) device | 84 | struct net_device *real_dev; /* The ethernet(like) device |
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 | } |
diff --git a/net/bridge/netfilter/ebt_vlan.c b/net/bridge/netfilter/ebt_vlan.c index cc11d6b8e507..eae67bf0446c 100644 --- a/net/bridge/netfilter/ebt_vlan.c +++ b/net/bridge/netfilter/ebt_vlan.c | |||
@@ -118,10 +118,10 @@ static int ebt_vlan_mt_check(const struct xt_mtchk_param *par) | |||
118 | * 0 - The null VLAN ID. | 118 | * 0 - The null VLAN ID. |
119 | * 1 - The default Port VID (PVID) | 119 | * 1 - The default Port VID (PVID) |
120 | * 0x0FFF - Reserved for implementation use. | 120 | * 0x0FFF - Reserved for implementation use. |
121 | * if_vlan.h: VLAN_GROUP_ARRAY_LEN 4096. */ | 121 | * if_vlan.h: VLAN_N_VID 4096. */ |
122 | if (GET_BITMASK(EBT_VLAN_ID)) { | 122 | if (GET_BITMASK(EBT_VLAN_ID)) { |
123 | if (!!info->id) { /* if id!=0 => check vid range */ | 123 | if (!!info->id) { /* if id!=0 => check vid range */ |
124 | if (info->id > VLAN_GROUP_ARRAY_LEN) { | 124 | if (info->id > VLAN_N_VID) { |
125 | pr_debug("id %d is out of range (1-4096)\n", | 125 | pr_debug("id %d is out of range (1-4096)\n", |
126 | info->id); | 126 | info->id); |
127 | return -EINVAL; | 127 | return -EINVAL; |