aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2011-08-26 02:11:16 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-29 15:30:30 -0400
commit332a4bad975616f33c2d1bf94c4ace2ea4113835 (patch)
tree86e5625342ae6c30690710b8620b946a5fbc672d
parentf090fba305658fe6e464e2fbd25fad81957ece26 (diff)
iwlagn: iwl-pci doesn't include iwl-dev any more
Move all the iwlXXX_abgn_cfg forward declaration to a separate file so that iwl-pci.c doesn't need to include iwl-agn.h that includes all iwl-dev.h This allows to provide real encapsulation. Dereferencing iwl_priv in the bus layer will now lead to a compilation error. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-1000.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-2000.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.h44
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-pci.c9
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-pci.h115
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-shared.h5
10 files changed, 128 insertions, 56 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index 3368b8dea199..4766c3a1a2f6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -44,6 +44,7 @@
44#include "iwl-helpers.h" 44#include "iwl-helpers.h"
45#include "iwl-agn-hw.h" 45#include "iwl-agn-hw.h"
46#include "iwl-shared.h" 46#include "iwl-shared.h"
47#include "iwl-pci.h"
47 48
48/* Highest firmware API version supported */ 49/* Highest firmware API version supported */
49#define IWL1000_UCODE_API_MAX 6 50#define IWL1000_UCODE_API_MAX 6
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c
index 047c22b64285..75ded3402e26 100644
--- a/drivers/net/wireless/iwlwifi/iwl-2000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-2000.c
@@ -45,6 +45,7 @@
45#include "iwl-agn-hw.h" 45#include "iwl-agn-hw.h"
46#include "iwl-6000-hw.h" 46#include "iwl-6000-hw.h"
47#include "iwl-shared.h" 47#include "iwl-shared.h"
48#include "iwl-pci.h"
48 49
49/* Highest firmware API version supported */ 50/* Highest firmware API version supported */
50#define IWL2030_UCODE_API_MAX 6 51#define IWL2030_UCODE_API_MAX 6
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index d2ef4be44c61..7cb4d69e0c37 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -47,6 +47,7 @@
47#include "iwl-5000-hw.h" 47#include "iwl-5000-hw.h"
48#include "iwl-trans.h" 48#include "iwl-trans.h"
49#include "iwl-shared.h" 49#include "iwl-shared.h"
50#include "iwl-pci.h"
50 51
51/* Highest firmware API version supported */ 52/* Highest firmware API version supported */
52#define IWL5000_UCODE_API_MAX 5 53#define IWL5000_UCODE_API_MAX 5
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index 955a99cef949..2a98e65ca84c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -46,6 +46,7 @@
46#include "iwl-6000-hw.h" 46#include "iwl-6000-hw.h"
47#include "iwl-trans.h" 47#include "iwl-trans.h"
48#include "iwl-shared.h" 48#include "iwl-shared.h"
49#include "iwl-pci.h"
49 50
50/* Highest firmware API version supported */ 51/* Highest firmware API version supported */
51#define IWL6000_UCODE_API_MAX 4 52#define IWL6000_UCODE_API_MAX 4
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h
index 3508c12de25f..2b94a10561d1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.h
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.h
@@ -65,50 +65,6 @@
65 65
66#include "iwl-dev.h" 66#include "iwl-dev.h"
67 67
68/* configuration for the _agn devices */
69extern struct iwl_cfg iwl5300_agn_cfg;
70extern struct iwl_cfg iwl5100_agn_cfg;
71extern struct iwl_cfg iwl5350_agn_cfg;
72extern struct iwl_cfg iwl5100_bgn_cfg;
73extern struct iwl_cfg iwl5100_abg_cfg;
74extern struct iwl_cfg iwl5150_agn_cfg;
75extern struct iwl_cfg iwl5150_abg_cfg;
76extern struct iwl_cfg iwl6005_2agn_cfg;
77extern struct iwl_cfg iwl6005_2abg_cfg;
78extern struct iwl_cfg iwl6005_2bg_cfg;
79extern struct iwl_cfg iwl6005_2agn_sff_cfg;
80extern struct iwl_cfg iwl1030_bgn_cfg;
81extern struct iwl_cfg iwl1030_bg_cfg;
82extern struct iwl_cfg iwl6030_2agn_cfg;
83extern struct iwl_cfg iwl6030_2abg_cfg;
84extern struct iwl_cfg iwl6030_2bgn_cfg;
85extern struct iwl_cfg iwl6030_2bg_cfg;
86extern struct iwl_cfg iwl6000i_2agn_cfg;
87extern struct iwl_cfg iwl6000i_2abg_cfg;
88extern struct iwl_cfg iwl6000i_2bg_cfg;
89extern struct iwl_cfg iwl6000_3agn_cfg;
90extern struct iwl_cfg iwl6050_2agn_cfg;
91extern struct iwl_cfg iwl6050_2abg_cfg;
92extern struct iwl_cfg iwl6150_bgn_cfg;
93extern struct iwl_cfg iwl6150_bg_cfg;
94extern struct iwl_cfg iwl1000_bgn_cfg;
95extern struct iwl_cfg iwl1000_bg_cfg;
96extern struct iwl_cfg iwl100_bgn_cfg;
97extern struct iwl_cfg iwl100_bg_cfg;
98extern struct iwl_cfg iwl130_bgn_cfg;
99extern struct iwl_cfg iwl130_bg_cfg;
100extern struct iwl_cfg iwl2000_2bgn_cfg;
101extern struct iwl_cfg iwl2000_2bg_cfg;
102extern struct iwl_cfg iwl2030_2bgn_cfg;
103extern struct iwl_cfg iwl2030_2bg_cfg;
104extern struct iwl_cfg iwl6035_2agn_cfg;
105extern struct iwl_cfg iwl6035_2abg_cfg;
106extern struct iwl_cfg iwl6035_2bg_cfg;
107extern struct iwl_cfg iwl105_bg_cfg;
108extern struct iwl_cfg iwl105_bgn_cfg;
109extern struct iwl_cfg iwl135_bg_cfg;
110extern struct iwl_cfg iwl135_bgn_cfg;
111
112extern struct ieee80211_ops iwlagn_hw_ops; 68extern struct ieee80211_ops iwlagn_hw_ops;
113 69
114int iwl_reset_ict(struct iwl_trans *trans); 70int iwl_reset_ict(struct iwl_trans *trans);
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index c3bdba5a48f2..2ea8a2e0dfbc 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -71,11 +71,6 @@
71struct iwl_host_cmd; 71struct iwl_host_cmd;
72struct iwl_cmd; 72struct iwl_cmd;
73 73
74
75#define IWLWIFI_VERSION "in-tree:"
76#define DRV_COPYRIGHT "Copyright(c) 2003-2011 Intel Corporation"
77#define DRV_AUTHOR "<ilw@linux.intel.com>"
78
79#define TIME_UNIT 1024 74#define TIME_UNIT 1024
80 75
81#define IWL_CMD(x) case x: return #x 76#define IWL_CMD(x) case x: return #x
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 711f2afceedd..eb98df6e883b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -51,8 +51,6 @@
51#include "iwl-trans.h" 51#include "iwl-trans.h"
52#include "iwl-shared.h" 52#include "iwl-shared.h"
53 53
54#define DRV_NAME "iwlagn"
55
56struct iwl_tx_queue; 54struct iwl_tx_queue;
57 55
58/* CT-KILL constants */ 56/* CT-KILL constants */
diff --git a/drivers/net/wireless/iwlwifi/iwl-pci.c b/drivers/net/wireless/iwlwifi/iwl-pci.c
index 62c35a5fea80..7210ff68ffbc 100644
--- a/drivers/net/wireless/iwlwifi/iwl-pci.c
+++ b/drivers/net/wireless/iwlwifi/iwl-pci.c
@@ -64,13 +64,11 @@
64#include <linux/pci-aspm.h> 64#include <linux/pci-aspm.h>
65 65
66#include "iwl-bus.h" 66#include "iwl-bus.h"
67#include "iwl-io.h"
67#include "iwl-shared.h" 68#include "iwl-shared.h"
68#include "iwl-agn.h"
69#include "iwl-trans.h" 69#include "iwl-trans.h"
70 70#include "iwl-csr.h"
71/* TODO: iwl_set_bit and friends should be implemented in bus layer 71#include "iwl-pci.h"
72 * this would allow us not to include iwl-io.h here */
73#include "iwl-io.h"
74 72
75/* PCI registers */ 73/* PCI registers */
76#define PCI_CFG_RETRY_TIMEOUT 0x041 74#define PCI_CFG_RETRY_TIMEOUT 0x041
@@ -95,6 +93,7 @@ static u16 iwl_pciexp_link_ctrl(struct iwl_bus *bus)
95{ 93{
96 int pos; 94 int pos;
97 u16 pci_lnk_ctl; 95 u16 pci_lnk_ctl;
96
98 struct pci_dev *pci_dev = IWL_BUS_GET_PCI_DEV(bus); 97 struct pci_dev *pci_dev = IWL_BUS_GET_PCI_DEV(bus);
99 98
100 pos = pci_pcie_cap(pci_dev); 99 pos = pci_pcie_cap(pci_dev);
diff --git a/drivers/net/wireless/iwlwifi/iwl-pci.h b/drivers/net/wireless/iwlwifi/iwl-pci.h
new file mode 100644
index 000000000000..be692763e913
--- /dev/null
+++ b/drivers/net/wireless/iwlwifi/iwl-pci.h
@@ -0,0 +1,115 @@
1/******************************************************************************
2 *
3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license.
5 *
6 * GPL LICENSE SUMMARY
7 *
8 * Copyright(c) 2007 - 2011 Intel Corporation. All rights reserved.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of version 2 of the GNU General Public License as
12 * published by the Free Software Foundation.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
22 * USA
23 *
24 * The full GNU General Public License is included in this distribution
25 * in the file called LICENSE.GPL.
26 *
27 * Contact Information:
28 * Intel Linux Wireless <ilw@linux.intel.com>
29 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
30 *
31 * BSD LICENSE
32 *
33 * Copyright(c) 2005 - 2011 Intel Corporation. All rights reserved.
34 * All rights reserved.
35 *
36 * Redistribution and use in source and binary forms, with or without
37 * modification, are permitted provided that the following conditions
38 * are met:
39 *
40 * * Redistributions of source code must retain the above copyright
41 * notice, this list of conditions and the following disclaimer.
42 * * Redistributions in binary form must reproduce the above copyright
43 * notice, this list of conditions and the following disclaimer in
44 * the documentation and/or other materials provided with the
45 * distribution.
46 * * Neither the name Intel Corporation nor the names of its
47 * contributors may be used to endorse or promote products derived
48 * from this software without specific prior written permission.
49 *
50 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
51 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
52 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
53 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
54 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
55 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
56 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
57 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
58 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
59 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
60 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
61 *
62 *****************************************************************************/
63#ifndef __iwl_pci_h__
64#define __iwl_pci_h__
65
66
67/* This file includes the declaration that are internal to the PCI
68 * implementation of the bus layer
69 */
70
71/* configuration for the _agn devices */
72extern struct iwl_cfg iwl5300_agn_cfg;
73extern struct iwl_cfg iwl5100_agn_cfg;
74extern struct iwl_cfg iwl5350_agn_cfg;
75extern struct iwl_cfg iwl5100_bgn_cfg;
76extern struct iwl_cfg iwl5100_abg_cfg;
77extern struct iwl_cfg iwl5150_agn_cfg;
78extern struct iwl_cfg iwl5150_abg_cfg;
79extern struct iwl_cfg iwl6005_2agn_cfg;
80extern struct iwl_cfg iwl6005_2abg_cfg;
81extern struct iwl_cfg iwl6005_2bg_cfg;
82extern struct iwl_cfg iwl6005_2agn_sff_cfg;
83extern struct iwl_cfg iwl1030_bgn_cfg;
84extern struct iwl_cfg iwl1030_bg_cfg;
85extern struct iwl_cfg iwl6030_2agn_cfg;
86extern struct iwl_cfg iwl6030_2abg_cfg;
87extern struct iwl_cfg iwl6030_2bgn_cfg;
88extern struct iwl_cfg iwl6030_2bg_cfg;
89extern struct iwl_cfg iwl6000i_2agn_cfg;
90extern struct iwl_cfg iwl6000i_2abg_cfg;
91extern struct iwl_cfg iwl6000i_2bg_cfg;
92extern struct iwl_cfg iwl6000_3agn_cfg;
93extern struct iwl_cfg iwl6050_2agn_cfg;
94extern struct iwl_cfg iwl6050_2abg_cfg;
95extern struct iwl_cfg iwl6150_bgn_cfg;
96extern struct iwl_cfg iwl6150_bg_cfg;
97extern struct iwl_cfg iwl1000_bgn_cfg;
98extern struct iwl_cfg iwl1000_bg_cfg;
99extern struct iwl_cfg iwl100_bgn_cfg;
100extern struct iwl_cfg iwl100_bg_cfg;
101extern struct iwl_cfg iwl130_bgn_cfg;
102extern struct iwl_cfg iwl130_bg_cfg;
103extern struct iwl_cfg iwl2000_2bgn_cfg;
104extern struct iwl_cfg iwl2000_2bg_cfg;
105extern struct iwl_cfg iwl2030_2bgn_cfg;
106extern struct iwl_cfg iwl2030_2bg_cfg;
107extern struct iwl_cfg iwl6035_2agn_cfg;
108extern struct iwl_cfg iwl6035_2abg_cfg;
109extern struct iwl_cfg iwl6035_2bg_cfg;
110extern struct iwl_cfg iwl105_bg_cfg;
111extern struct iwl_cfg iwl105_bgn_cfg;
112extern struct iwl_cfg iwl135_bg_cfg;
113extern struct iwl_cfg iwl135_bgn_cfg;
114
115#endif /* __iwl_pci_h__ */
diff --git a/drivers/net/wireless/iwlwifi/iwl-shared.h b/drivers/net/wireless/iwlwifi/iwl-shared.h
index 45f8a33df6e4..27aee528ce3a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-shared.h
+++ b/drivers/net/wireless/iwlwifi/iwl-shared.h
@@ -77,6 +77,11 @@ struct iwl_priv;
77struct iwl_sensitivity_ranges; 77struct iwl_sensitivity_ranges;
78struct iwl_trans_ops; 78struct iwl_trans_ops;
79 79
80#define DRV_NAME "iwlagn"
81#define IWLWIFI_VERSION "in-tree:"
82#define DRV_COPYRIGHT "Copyright(c) 2003-2011 Intel Corporation"
83#define DRV_AUTHOR "<ilw@linux.intel.com>"
84
80extern struct iwl_mod_params iwlagn_mod_params; 85extern struct iwl_mod_params iwlagn_mod_params;
81 86
82/** 87/**