aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJesse Gross <jesse@nicira.com>2010-10-20 09:56:02 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-21 04:26:50 -0400
commitb738127dfb469bb9f595cdace30e7f881e8146b2 (patch)
treea2d79958aa2da098dc38c72973205d516896c54b /drivers
parent13937911f93ef52ae652f4652761aea6a58d3193 (diff)
vlan: Rename VLAN_GROUP_ARRAY_LEN to VLAN_N_VID.
VLAN_GROUP_ARRAY_LEN is simply the number of possible vlan VIDs. Since vlan groups will soon be more of an implementation detail for vlan devices, rename the constant to be descriptive of its actual purpose. Signed-off-by: Jesse Gross <jesse@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/benet/be.h2
-rw-r--r--drivers/net/benet/be_main.c2
-rw-r--r--drivers/net/e1000/e1000_main.c2
-rw-r--r--drivers/net/e1000e/netdev.c2
-rw-r--r--drivers/net/igb/igb_main.c2
-rw-r--r--drivers/net/igbvf/netdev.c2
-rw-r--r--drivers/net/ixgb/ixgb_main.c2
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c2
-rw-r--r--drivers/net/ixgbevf/ixgbevf_main.c2
-rw-r--r--drivers/net/qlcnic/qlcnic_main.c2
-rw-r--r--drivers/net/vmxnet3/vmxnet3_drv.c2
-rw-r--r--drivers/net/vxge/vxge-main.c2
-rw-r--r--drivers/s390/net/qeth_l3_main.c6
13 files changed, 15 insertions, 15 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;