aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/pcie
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2013-02-20 05:41:58 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-03-06 10:47:54 -0500
commitb1f553c7484b983aac20c107b9766804b69cf73f (patch)
treecf70717bcaa63514e9684de2f7d5a0a4b27e2d41 /drivers/net/wireless/iwlwifi/pcie
parent5e4fbe4cc05767fe7e1bbc269376e0e48f365327 (diff)
iwlwifi: make device configuration bus agnostic
Newer devices can work on different buses. This means that their configuration can be shared between different buses. Hence the configuration structures should exported to all the buses and not only to PCIE. Change this. Note that this requires all the fields to be the same amongst the buses. If differences will appear, we can always define a part that is bus dependent. Today, this is not needed. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/pcie')
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/1000.c141
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/2000.c243
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/5000.c180
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/6000.c403
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/7000.c147
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/cfg.h115
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/drv.c2
7 files changed, 0 insertions, 1231 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/1000.c b/drivers/net/wireless/iwlwifi/pcie/1000.c
deleted file mode 100644
index ff3389757281..000000000000
--- a/drivers/net/wireless/iwlwifi/pcie/1000.c
+++ /dev/null
@@ -1,141 +0,0 @@
1/******************************************************************************
2 *
3 * Copyright(c) 2008 - 2013 Intel Corporation. All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
17 *
18 * The full GNU General Public License is included in this distribution in the
19 * file called LICENSE.
20 *
21 * Contact Information:
22 * Intel Linux Wireless <ilw@linux.intel.com>
23 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
24 *
25 *****************************************************************************/
26
27#include <linux/module.h>
28#include <linux/stringify.h>
29#include "iwl-config.h"
30#include "iwl-csr.h"
31#include "iwl-agn-hw.h"
32#include "cfg.h"
33
34/* Highest firmware API version supported */
35#define IWL1000_UCODE_API_MAX 5
36#define IWL100_UCODE_API_MAX 5
37
38/* Oldest version we won't warn about */
39#define IWL1000_UCODE_API_OK 5
40#define IWL100_UCODE_API_OK 5
41
42/* Lowest firmware API version supported */
43#define IWL1000_UCODE_API_MIN 1
44#define IWL100_UCODE_API_MIN 5
45
46/* EEPROM version */
47#define EEPROM_1000_TX_POWER_VERSION (4)
48#define EEPROM_1000_EEPROM_VERSION (0x15C)
49
50#define IWL1000_FW_PRE "iwlwifi-1000-"
51#define IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE __stringify(api) ".ucode"
52
53#define IWL100_FW_PRE "iwlwifi-100-"
54#define IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE __stringify(api) ".ucode"
55
56
57static const struct iwl_base_params iwl1000_base_params = {
58 .num_of_queues = IWLAGN_NUM_QUEUES,
59 .eeprom_size = OTP_LOW_IMAGE_SIZE,
60 .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
61 .max_ll_items = OTP_MAX_LL_ITEMS_1000,
62 .shadow_ram_support = false,
63 .led_compensation = 51,
64 .support_ct_kill_exit = true,
65 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
66 .chain_noise_scale = 1000,
67 .wd_timeout = IWL_WATCHDOG_DISABLED,
68 .max_event_log_size = 128,
69};
70
71static const struct iwl_ht_params iwl1000_ht_params = {
72 .ht_greenfield_support = true,
73 .use_rts_for_aggregation = true, /* use rts/cts protection */
74 .ht40_bands = BIT(IEEE80211_BAND_2GHZ),
75};
76
77static const struct iwl_eeprom_params iwl1000_eeprom_params = {
78 .regulatory_bands = {
79 EEPROM_REG_BAND_1_CHANNELS,
80 EEPROM_REG_BAND_2_CHANNELS,
81 EEPROM_REG_BAND_3_CHANNELS,
82 EEPROM_REG_BAND_4_CHANNELS,
83 EEPROM_REG_BAND_5_CHANNELS,
84 EEPROM_REG_BAND_24_HT40_CHANNELS,
85 EEPROM_REGULATORY_BAND_NO_HT40,
86 }
87};
88
89#define IWL_DEVICE_1000 \
90 .fw_name_pre = IWL1000_FW_PRE, \
91 .ucode_api_max = IWL1000_UCODE_API_MAX, \
92 .ucode_api_ok = IWL1000_UCODE_API_OK, \
93 .ucode_api_min = IWL1000_UCODE_API_MIN, \
94 .device_family = IWL_DEVICE_FAMILY_1000, \
95 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
96 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
97 .nvm_ver = EEPROM_1000_EEPROM_VERSION, \
98 .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \
99 .base_params = &iwl1000_base_params, \
100 .eeprom_params = &iwl1000_eeprom_params, \
101 .led_mode = IWL_LED_BLINK
102
103const struct iwl_cfg iwl1000_bgn_cfg = {
104 .name = "Intel(R) Centrino(R) Wireless-N 1000 BGN",
105 IWL_DEVICE_1000,
106 .ht_params = &iwl1000_ht_params,
107};
108
109const struct iwl_cfg iwl1000_bg_cfg = {
110 .name = "Intel(R) Centrino(R) Wireless-N 1000 BG",
111 IWL_DEVICE_1000,
112};
113
114#define IWL_DEVICE_100 \
115 .fw_name_pre = IWL100_FW_PRE, \
116 .ucode_api_max = IWL100_UCODE_API_MAX, \
117 .ucode_api_ok = IWL100_UCODE_API_OK, \
118 .ucode_api_min = IWL100_UCODE_API_MIN, \
119 .device_family = IWL_DEVICE_FAMILY_100, \
120 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
121 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
122 .nvm_ver = EEPROM_1000_EEPROM_VERSION, \
123 .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \
124 .base_params = &iwl1000_base_params, \
125 .eeprom_params = &iwl1000_eeprom_params, \
126 .led_mode = IWL_LED_RF_STATE, \
127 .rx_with_siso_diversity = true
128
129const struct iwl_cfg iwl100_bgn_cfg = {
130 .name = "Intel(R) Centrino(R) Wireless-N 100 BGN",
131 IWL_DEVICE_100,
132 .ht_params = &iwl1000_ht_params,
133};
134
135const struct iwl_cfg iwl100_bg_cfg = {
136 .name = "Intel(R) Centrino(R) Wireless-N 100 BG",
137 IWL_DEVICE_100,
138};
139
140MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_OK));
141MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_OK));
diff --git a/drivers/net/wireless/iwlwifi/pcie/2000.c b/drivers/net/wireless/iwlwifi/pcie/2000.c
deleted file mode 100644
index e7de33128b16..000000000000
--- a/drivers/net/wireless/iwlwifi/pcie/2000.c
+++ /dev/null
@@ -1,243 +0,0 @@
1/******************************************************************************
2 *
3 * Copyright(c) 2008 - 2013 Intel Corporation. All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
17 *
18 * The full GNU General Public License is included in this distribution in the
19 * file called LICENSE.
20 *
21 * Contact Information:
22 * Intel Linux Wireless <ilw@linux.intel.com>
23 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
24 *
25 *****************************************************************************/
26
27#include <linux/module.h>
28#include <linux/stringify.h>
29#include "iwl-config.h"
30#include "iwl-agn-hw.h"
31#include "cfg.h"
32#include "dvm/commands.h" /* needed for BT for now */
33
34/* Highest firmware API version supported */
35#define IWL2030_UCODE_API_MAX 6
36#define IWL2000_UCODE_API_MAX 6
37#define IWL105_UCODE_API_MAX 6
38#define IWL135_UCODE_API_MAX 6
39
40/* Oldest version we won't warn about */
41#define IWL2030_UCODE_API_OK 6
42#define IWL2000_UCODE_API_OK 6
43#define IWL105_UCODE_API_OK 6
44#define IWL135_UCODE_API_OK 6
45
46/* Lowest firmware API version supported */
47#define IWL2030_UCODE_API_MIN 5
48#define IWL2000_UCODE_API_MIN 5
49#define IWL105_UCODE_API_MIN 5
50#define IWL135_UCODE_API_MIN 5
51
52/* EEPROM version */
53#define EEPROM_2000_TX_POWER_VERSION (6)
54#define EEPROM_2000_EEPROM_VERSION (0x805)
55
56
57#define IWL2030_FW_PRE "iwlwifi-2030-"
58#define IWL2030_MODULE_FIRMWARE(api) IWL2030_FW_PRE __stringify(api) ".ucode"
59
60#define IWL2000_FW_PRE "iwlwifi-2000-"
61#define IWL2000_MODULE_FIRMWARE(api) IWL2000_FW_PRE __stringify(api) ".ucode"
62
63#define IWL105_FW_PRE "iwlwifi-105-"
64#define IWL105_MODULE_FIRMWARE(api) IWL105_FW_PRE __stringify(api) ".ucode"
65
66#define IWL135_FW_PRE "iwlwifi-135-"
67#define IWL135_MODULE_FIRMWARE(api) IWL135_FW_PRE __stringify(api) ".ucode"
68
69static const struct iwl_base_params iwl2000_base_params = {
70 .eeprom_size = OTP_LOW_IMAGE_SIZE,
71 .num_of_queues = IWLAGN_NUM_QUEUES,
72 .pll_cfg_val = 0,
73 .max_ll_items = OTP_MAX_LL_ITEMS_2x00,
74 .shadow_ram_support = true,
75 .led_compensation = 51,
76 .adv_thermal_throttle = true,
77 .support_ct_kill_exit = true,
78 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
79 .chain_noise_scale = 1000,
80 .wd_timeout = IWL_DEF_WD_TIMEOUT,
81 .max_event_log_size = 512,
82 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
83 .hd_v2 = true,
84};
85
86
87static const struct iwl_base_params iwl2030_base_params = {
88 .eeprom_size = OTP_LOW_IMAGE_SIZE,
89 .num_of_queues = IWLAGN_NUM_QUEUES,
90 .pll_cfg_val = 0,
91 .max_ll_items = OTP_MAX_LL_ITEMS_2x00,
92 .shadow_ram_support = true,
93 .led_compensation = 57,
94 .adv_thermal_throttle = true,
95 .support_ct_kill_exit = true,
96 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
97 .chain_noise_scale = 1000,
98 .wd_timeout = IWL_LONG_WD_TIMEOUT,
99 .max_event_log_size = 512,
100 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
101 .hd_v2 = true,
102};
103
104static const struct iwl_ht_params iwl2000_ht_params = {
105 .ht_greenfield_support = true,
106 .use_rts_for_aggregation = true, /* use rts/cts protection */
107 .ht40_bands = BIT(IEEE80211_BAND_2GHZ),
108};
109
110static const struct iwl_bt_params iwl2030_bt_params = {
111 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
112 .advanced_bt_coexist = true,
113 .agg_time_limit = BT_AGG_THRESHOLD_DEF,
114 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
115 .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT32,
116 .bt_sco_disable = true,
117 .bt_session_2 = true,
118};
119
120static const struct iwl_eeprom_params iwl20x0_eeprom_params = {
121 .regulatory_bands = {
122 EEPROM_REG_BAND_1_CHANNELS,
123 EEPROM_REG_BAND_2_CHANNELS,
124 EEPROM_REG_BAND_3_CHANNELS,
125 EEPROM_REG_BAND_4_CHANNELS,
126 EEPROM_REG_BAND_5_CHANNELS,
127 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
128 EEPROM_REGULATORY_BAND_NO_HT40,
129 },
130 .enhanced_txpower = true,
131};
132
133#define IWL_DEVICE_2000 \
134 .fw_name_pre = IWL2000_FW_PRE, \
135 .ucode_api_max = IWL2000_UCODE_API_MAX, \
136 .ucode_api_ok = IWL2000_UCODE_API_OK, \
137 .ucode_api_min = IWL2000_UCODE_API_MIN, \
138 .device_family = IWL_DEVICE_FAMILY_2000, \
139 .max_inst_size = IWL60_RTC_INST_SIZE, \
140 .max_data_size = IWL60_RTC_DATA_SIZE, \
141 .nvm_ver = EEPROM_2000_EEPROM_VERSION, \
142 .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
143 .base_params = &iwl2000_base_params, \
144 .eeprom_params = &iwl20x0_eeprom_params, \
145 .need_temp_offset_calib = true, \
146 .temp_offset_v2 = true, \
147 .led_mode = IWL_LED_RF_STATE
148
149const struct iwl_cfg iwl2000_2bgn_cfg = {
150 .name = "Intel(R) Centrino(R) Wireless-N 2200 BGN",
151 IWL_DEVICE_2000,
152 .ht_params = &iwl2000_ht_params,
153};
154
155const struct iwl_cfg iwl2000_2bgn_d_cfg = {
156 .name = "Intel(R) Centrino(R) Wireless-N 2200D BGN",
157 IWL_DEVICE_2000,
158 .ht_params = &iwl2000_ht_params,
159};
160
161#define IWL_DEVICE_2030 \
162 .fw_name_pre = IWL2030_FW_PRE, \
163 .ucode_api_max = IWL2030_UCODE_API_MAX, \
164 .ucode_api_ok = IWL2030_UCODE_API_OK, \
165 .ucode_api_min = IWL2030_UCODE_API_MIN, \
166 .device_family = IWL_DEVICE_FAMILY_2030, \
167 .max_inst_size = IWL60_RTC_INST_SIZE, \
168 .max_data_size = IWL60_RTC_DATA_SIZE, \
169 .nvm_ver = EEPROM_2000_EEPROM_VERSION, \
170 .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
171 .base_params = &iwl2030_base_params, \
172 .bt_params = &iwl2030_bt_params, \
173 .eeprom_params = &iwl20x0_eeprom_params, \
174 .need_temp_offset_calib = true, \
175 .temp_offset_v2 = true, \
176 .led_mode = IWL_LED_RF_STATE, \
177 .adv_pm = true
178
179const struct iwl_cfg iwl2030_2bgn_cfg = {
180 .name = "Intel(R) Centrino(R) Wireless-N 2230 BGN",
181 IWL_DEVICE_2030,
182 .ht_params = &iwl2000_ht_params,
183};
184
185#define IWL_DEVICE_105 \
186 .fw_name_pre = IWL105_FW_PRE, \
187 .ucode_api_max = IWL105_UCODE_API_MAX, \
188 .ucode_api_ok = IWL105_UCODE_API_OK, \
189 .ucode_api_min = IWL105_UCODE_API_MIN, \
190 .device_family = IWL_DEVICE_FAMILY_105, \
191 .max_inst_size = IWL60_RTC_INST_SIZE, \
192 .max_data_size = IWL60_RTC_DATA_SIZE, \
193 .nvm_ver = EEPROM_2000_EEPROM_VERSION, \
194 .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
195 .base_params = &iwl2000_base_params, \
196 .eeprom_params = &iwl20x0_eeprom_params, \
197 .need_temp_offset_calib = true, \
198 .temp_offset_v2 = true, \
199 .led_mode = IWL_LED_RF_STATE, \
200 .adv_pm = true, \
201 .rx_with_siso_diversity = true
202
203const struct iwl_cfg iwl105_bgn_cfg = {
204 .name = "Intel(R) Centrino(R) Wireless-N 105 BGN",
205 IWL_DEVICE_105,
206 .ht_params = &iwl2000_ht_params,
207};
208
209const struct iwl_cfg iwl105_bgn_d_cfg = {
210 .name = "Intel(R) Centrino(R) Wireless-N 105D BGN",
211 IWL_DEVICE_105,
212 .ht_params = &iwl2000_ht_params,
213};
214
215#define IWL_DEVICE_135 \
216 .fw_name_pre = IWL135_FW_PRE, \
217 .ucode_api_max = IWL135_UCODE_API_MAX, \
218 .ucode_api_ok = IWL135_UCODE_API_OK, \
219 .ucode_api_min = IWL135_UCODE_API_MIN, \
220 .device_family = IWL_DEVICE_FAMILY_135, \
221 .max_inst_size = IWL60_RTC_INST_SIZE, \
222 .max_data_size = IWL60_RTC_DATA_SIZE, \
223 .nvm_ver = EEPROM_2000_EEPROM_VERSION, \
224 .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
225 .base_params = &iwl2030_base_params, \
226 .bt_params = &iwl2030_bt_params, \
227 .eeprom_params = &iwl20x0_eeprom_params, \
228 .need_temp_offset_calib = true, \
229 .temp_offset_v2 = true, \
230 .led_mode = IWL_LED_RF_STATE, \
231 .adv_pm = true, \
232 .rx_with_siso_diversity = true
233
234const struct iwl_cfg iwl135_bgn_cfg = {
235 .name = "Intel(R) Centrino(R) Wireless-N 135 BGN",
236 IWL_DEVICE_135,
237 .ht_params = &iwl2000_ht_params,
238};
239
240MODULE_FIRMWARE(IWL2000_MODULE_FIRMWARE(IWL2000_UCODE_API_OK));
241MODULE_FIRMWARE(IWL2030_MODULE_FIRMWARE(IWL2030_UCODE_API_OK));
242MODULE_FIRMWARE(IWL105_MODULE_FIRMWARE(IWL105_UCODE_API_OK));
243MODULE_FIRMWARE(IWL135_MODULE_FIRMWARE(IWL135_UCODE_API_OK));
diff --git a/drivers/net/wireless/iwlwifi/pcie/5000.c b/drivers/net/wireless/iwlwifi/pcie/5000.c
deleted file mode 100644
index 5096f7c96ab6..000000000000
--- a/drivers/net/wireless/iwlwifi/pcie/5000.c
+++ /dev/null
@@ -1,180 +0,0 @@
1/******************************************************************************
2 *
3 * Copyright(c) 2007 - 2013 Intel Corporation. All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
17 *
18 * The full GNU General Public License is included in this distribution in the
19 * file called LICENSE.
20 *
21 * Contact Information:
22 * Intel Linux Wireless <ilw@linux.intel.com>
23 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
24 *
25 *****************************************************************************/
26
27#include <linux/module.h>
28#include <linux/stringify.h>
29#include "iwl-config.h"
30#include "iwl-agn-hw.h"
31#include "iwl-csr.h"
32#include "cfg.h"
33
34/* Highest firmware API version supported */
35#define IWL5000_UCODE_API_MAX 5
36#define IWL5150_UCODE_API_MAX 2
37
38/* Oldest version we won't warn about */
39#define IWL5000_UCODE_API_OK 5
40#define IWL5150_UCODE_API_OK 2
41
42/* Lowest firmware API version supported */
43#define IWL5000_UCODE_API_MIN 1
44#define IWL5150_UCODE_API_MIN 1
45
46/* EEPROM versions */
47#define EEPROM_5000_TX_POWER_VERSION (4)
48#define EEPROM_5000_EEPROM_VERSION (0x11A)
49#define EEPROM_5050_TX_POWER_VERSION (4)
50#define EEPROM_5050_EEPROM_VERSION (0x21E)
51
52#define IWL5000_FW_PRE "iwlwifi-5000-"
53#define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE __stringify(api) ".ucode"
54
55#define IWL5150_FW_PRE "iwlwifi-5150-"
56#define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE __stringify(api) ".ucode"
57
58static const struct iwl_base_params iwl5000_base_params = {
59 .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
60 .num_of_queues = IWLAGN_NUM_QUEUES,
61 .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
62 .led_compensation = 51,
63 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
64 .chain_noise_scale = 1000,
65 .wd_timeout = IWL_WATCHDOG_DISABLED,
66 .max_event_log_size = 512,
67 .no_idle_support = true,
68};
69
70static const struct iwl_ht_params iwl5000_ht_params = {
71 .ht_greenfield_support = true,
72 .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ),
73};
74
75static const struct iwl_eeprom_params iwl5000_eeprom_params = {
76 .regulatory_bands = {
77 EEPROM_REG_BAND_1_CHANNELS,
78 EEPROM_REG_BAND_2_CHANNELS,
79 EEPROM_REG_BAND_3_CHANNELS,
80 EEPROM_REG_BAND_4_CHANNELS,
81 EEPROM_REG_BAND_5_CHANNELS,
82 EEPROM_REG_BAND_24_HT40_CHANNELS,
83 EEPROM_REG_BAND_52_HT40_CHANNELS
84 },
85};
86
87#define IWL_DEVICE_5000 \
88 .fw_name_pre = IWL5000_FW_PRE, \
89 .ucode_api_max = IWL5000_UCODE_API_MAX, \
90 .ucode_api_ok = IWL5000_UCODE_API_OK, \
91 .ucode_api_min = IWL5000_UCODE_API_MIN, \
92 .device_family = IWL_DEVICE_FAMILY_5000, \
93 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
94 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
95 .nvm_ver = EEPROM_5000_EEPROM_VERSION, \
96 .nvm_calib_ver = EEPROM_5000_TX_POWER_VERSION, \
97 .base_params = &iwl5000_base_params, \
98 .eeprom_params = &iwl5000_eeprom_params, \
99 .led_mode = IWL_LED_BLINK
100
101const struct iwl_cfg iwl5300_agn_cfg = {
102 .name = "Intel(R) Ultimate N WiFi Link 5300 AGN",
103 IWL_DEVICE_5000,
104 /* at least EEPROM 0x11A has wrong info */
105 .valid_tx_ant = ANT_ABC, /* .cfg overwrite */
106 .valid_rx_ant = ANT_ABC, /* .cfg overwrite */
107 .ht_params = &iwl5000_ht_params,
108};
109
110const struct iwl_cfg iwl5100_bgn_cfg = {
111 .name = "Intel(R) WiFi Link 5100 BGN",
112 IWL_DEVICE_5000,
113 .valid_tx_ant = ANT_B, /* .cfg overwrite */
114 .valid_rx_ant = ANT_AB, /* .cfg overwrite */
115 .ht_params = &iwl5000_ht_params,
116};
117
118const struct iwl_cfg iwl5100_abg_cfg = {
119 .name = "Intel(R) WiFi Link 5100 ABG",
120 IWL_DEVICE_5000,
121 .valid_tx_ant = ANT_B, /* .cfg overwrite */
122 .valid_rx_ant = ANT_AB, /* .cfg overwrite */
123};
124
125const struct iwl_cfg iwl5100_agn_cfg = {
126 .name = "Intel(R) WiFi Link 5100 AGN",
127 IWL_DEVICE_5000,
128 .valid_tx_ant = ANT_B, /* .cfg overwrite */
129 .valid_rx_ant = ANT_AB, /* .cfg overwrite */
130 .ht_params = &iwl5000_ht_params,
131};
132
133const struct iwl_cfg iwl5350_agn_cfg = {
134 .name = "Intel(R) WiMAX/WiFi Link 5350 AGN",
135 .fw_name_pre = IWL5000_FW_PRE,
136 .ucode_api_max = IWL5000_UCODE_API_MAX,
137 .ucode_api_ok = IWL5000_UCODE_API_OK,
138 .ucode_api_min = IWL5000_UCODE_API_MIN,
139 .device_family = IWL_DEVICE_FAMILY_5000,
140 .max_inst_size = IWLAGN_RTC_INST_SIZE,
141 .max_data_size = IWLAGN_RTC_DATA_SIZE,
142 .nvm_ver = EEPROM_5050_EEPROM_VERSION,
143 .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION,
144 .base_params = &iwl5000_base_params,
145 .eeprom_params = &iwl5000_eeprom_params,
146 .ht_params = &iwl5000_ht_params,
147 .led_mode = IWL_LED_BLINK,
148 .internal_wimax_coex = true,
149};
150
151#define IWL_DEVICE_5150 \
152 .fw_name_pre = IWL5150_FW_PRE, \
153 .ucode_api_max = IWL5150_UCODE_API_MAX, \
154 .ucode_api_ok = IWL5150_UCODE_API_OK, \
155 .ucode_api_min = IWL5150_UCODE_API_MIN, \
156 .device_family = IWL_DEVICE_FAMILY_5150, \
157 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
158 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
159 .nvm_ver = EEPROM_5050_EEPROM_VERSION, \
160 .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION, \
161 .base_params = &iwl5000_base_params, \
162 .eeprom_params = &iwl5000_eeprom_params, \
163 .no_xtal_calib = true, \
164 .led_mode = IWL_LED_BLINK, \
165 .internal_wimax_coex = true
166
167const struct iwl_cfg iwl5150_agn_cfg = {
168 .name = "Intel(R) WiMAX/WiFi Link 5150 AGN",
169 IWL_DEVICE_5150,
170 .ht_params = &iwl5000_ht_params,
171
172};
173
174const struct iwl_cfg iwl5150_abg_cfg = {
175 .name = "Intel(R) WiMAX/WiFi Link 5150 ABG",
176 IWL_DEVICE_5150,
177};
178
179MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_OK));
180MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_OK));
diff --git a/drivers/net/wireless/iwlwifi/pcie/6000.c b/drivers/net/wireless/iwlwifi/pcie/6000.c
deleted file mode 100644
index 801ff49796dd..000000000000
--- a/drivers/net/wireless/iwlwifi/pcie/6000.c
+++ /dev/null
@@ -1,403 +0,0 @@
1/******************************************************************************
2 *
3 * Copyright(c) 2008 - 2013 Intel Corporation. All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
17 *
18 * The full GNU General Public License is included in this distribution in the
19 * file called LICENSE.
20 *
21 * Contact Information:
22 * Intel Linux Wireless <ilw@linux.intel.com>
23 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
24 *
25 *****************************************************************************/
26
27#include <linux/module.h>
28#include <linux/stringify.h>
29#include "iwl-config.h"
30#include "iwl-agn-hw.h"
31#include "cfg.h"
32#include "dvm/commands.h" /* needed for BT for now */
33
34/* Highest firmware API version supported */
35#define IWL6000_UCODE_API_MAX 6
36#define IWL6050_UCODE_API_MAX 5
37#define IWL6000G2_UCODE_API_MAX 6
38#define IWL6035_UCODE_API_MAX 6
39
40/* Oldest version we won't warn about */
41#define IWL6000_UCODE_API_OK 4
42#define IWL6000G2_UCODE_API_OK 5
43#define IWL6050_UCODE_API_OK 5
44#define IWL6000G2B_UCODE_API_OK 6
45#define IWL6035_UCODE_API_OK 6
46
47/* Lowest firmware API version supported */
48#define IWL6000_UCODE_API_MIN 4
49#define IWL6050_UCODE_API_MIN 4
50#define IWL6000G2_UCODE_API_MIN 5
51#define IWL6035_UCODE_API_MIN 6
52
53/* EEPROM versions */
54#define EEPROM_6000_TX_POWER_VERSION (4)
55#define EEPROM_6000_EEPROM_VERSION (0x423)
56#define EEPROM_6050_TX_POWER_VERSION (4)
57#define EEPROM_6050_EEPROM_VERSION (0x532)
58#define EEPROM_6150_TX_POWER_VERSION (6)
59#define EEPROM_6150_EEPROM_VERSION (0x553)
60#define EEPROM_6005_TX_POWER_VERSION (6)
61#define EEPROM_6005_EEPROM_VERSION (0x709)
62#define EEPROM_6030_TX_POWER_VERSION (6)
63#define EEPROM_6030_EEPROM_VERSION (0x709)
64#define EEPROM_6035_TX_POWER_VERSION (6)
65#define EEPROM_6035_EEPROM_VERSION (0x753)
66
67#define IWL6000_FW_PRE "iwlwifi-6000-"
68#define IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE __stringify(api) ".ucode"
69
70#define IWL6050_FW_PRE "iwlwifi-6050-"
71#define IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE __stringify(api) ".ucode"
72
73#define IWL6005_FW_PRE "iwlwifi-6000g2a-"
74#define IWL6005_MODULE_FIRMWARE(api) IWL6005_FW_PRE __stringify(api) ".ucode"
75
76#define IWL6030_FW_PRE "iwlwifi-6000g2b-"
77#define IWL6030_MODULE_FIRMWARE(api) IWL6030_FW_PRE __stringify(api) ".ucode"
78
79static const struct iwl_base_params iwl6000_base_params = {
80 .eeprom_size = OTP_LOW_IMAGE_SIZE,
81 .num_of_queues = IWLAGN_NUM_QUEUES,
82 .pll_cfg_val = 0,
83 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
84 .shadow_ram_support = true,
85 .led_compensation = 51,
86 .adv_thermal_throttle = true,
87 .support_ct_kill_exit = true,
88 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
89 .chain_noise_scale = 1000,
90 .wd_timeout = IWL_DEF_WD_TIMEOUT,
91 .max_event_log_size = 512,
92 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
93};
94
95static const struct iwl_base_params iwl6050_base_params = {
96 .eeprom_size = OTP_LOW_IMAGE_SIZE,
97 .num_of_queues = IWLAGN_NUM_QUEUES,
98 .pll_cfg_val = 0,
99 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
100 .shadow_ram_support = true,
101 .led_compensation = 51,
102 .adv_thermal_throttle = true,
103 .support_ct_kill_exit = true,
104 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
105 .chain_noise_scale = 1500,
106 .wd_timeout = IWL_DEF_WD_TIMEOUT,
107 .max_event_log_size = 1024,
108 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
109};
110
111static const struct iwl_base_params iwl6000_g2_base_params = {
112 .eeprom_size = OTP_LOW_IMAGE_SIZE,
113 .num_of_queues = IWLAGN_NUM_QUEUES,
114 .pll_cfg_val = 0,
115 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
116 .shadow_ram_support = true,
117 .led_compensation = 57,
118 .adv_thermal_throttle = true,
119 .support_ct_kill_exit = true,
120 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
121 .chain_noise_scale = 1000,
122 .wd_timeout = IWL_LONG_WD_TIMEOUT,
123 .max_event_log_size = 512,
124 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
125};
126
127static const struct iwl_ht_params iwl6000_ht_params = {
128 .ht_greenfield_support = true,
129 .use_rts_for_aggregation = true, /* use rts/cts protection */
130 .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ),
131};
132
133static const struct iwl_bt_params iwl6000_bt_params = {
134 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
135 .advanced_bt_coexist = true,
136 .agg_time_limit = BT_AGG_THRESHOLD_DEF,
137 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
138 .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT,
139 .bt_sco_disable = true,
140};
141
142static const struct iwl_eeprom_params iwl6000_eeprom_params = {
143 .regulatory_bands = {
144 EEPROM_REG_BAND_1_CHANNELS,
145 EEPROM_REG_BAND_2_CHANNELS,
146 EEPROM_REG_BAND_3_CHANNELS,
147 EEPROM_REG_BAND_4_CHANNELS,
148 EEPROM_REG_BAND_5_CHANNELS,
149 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
150 EEPROM_REG_BAND_52_HT40_CHANNELS
151 },
152 .enhanced_txpower = true,
153};
154
155#define IWL_DEVICE_6005 \
156 .fw_name_pre = IWL6005_FW_PRE, \
157 .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
158 .ucode_api_ok = IWL6000G2_UCODE_API_OK, \
159 .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
160 .device_family = IWL_DEVICE_FAMILY_6005, \
161 .max_inst_size = IWL60_RTC_INST_SIZE, \
162 .max_data_size = IWL60_RTC_DATA_SIZE, \
163 .nvm_ver = EEPROM_6005_EEPROM_VERSION, \
164 .nvm_calib_ver = EEPROM_6005_TX_POWER_VERSION, \
165 .base_params = &iwl6000_g2_base_params, \
166 .eeprom_params = &iwl6000_eeprom_params, \
167 .need_temp_offset_calib = true, \
168 .led_mode = IWL_LED_RF_STATE
169
170const struct iwl_cfg iwl6005_2agn_cfg = {
171 .name = "Intel(R) Centrino(R) Advanced-N 6205 AGN",
172 IWL_DEVICE_6005,
173 .ht_params = &iwl6000_ht_params,
174};
175
176const struct iwl_cfg iwl6005_2abg_cfg = {
177 .name = "Intel(R) Centrino(R) Advanced-N 6205 ABG",
178 IWL_DEVICE_6005,
179};
180
181const struct iwl_cfg iwl6005_2bg_cfg = {
182 .name = "Intel(R) Centrino(R) Advanced-N 6205 BG",
183 IWL_DEVICE_6005,
184};
185
186const struct iwl_cfg iwl6005_2agn_sff_cfg = {
187 .name = "Intel(R) Centrino(R) Advanced-N 6205S AGN",
188 IWL_DEVICE_6005,
189 .ht_params = &iwl6000_ht_params,
190};
191
192const struct iwl_cfg iwl6005_2agn_d_cfg = {
193 .name = "Intel(R) Centrino(R) Advanced-N 6205D AGN",
194 IWL_DEVICE_6005,
195 .ht_params = &iwl6000_ht_params,
196};
197
198const struct iwl_cfg iwl6005_2agn_mow1_cfg = {
199 .name = "Intel(R) Centrino(R) Advanced-N 6206 AGN",
200 IWL_DEVICE_6005,
201 .ht_params = &iwl6000_ht_params,
202};
203
204const struct iwl_cfg iwl6005_2agn_mow2_cfg = {
205 .name = "Intel(R) Centrino(R) Advanced-N 6207 AGN",
206 IWL_DEVICE_6005,
207 .ht_params = &iwl6000_ht_params,
208};
209
210#define IWL_DEVICE_6030 \
211 .fw_name_pre = IWL6030_FW_PRE, \
212 .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
213 .ucode_api_ok = IWL6000G2B_UCODE_API_OK, \
214 .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
215 .device_family = IWL_DEVICE_FAMILY_6030, \
216 .max_inst_size = IWL60_RTC_INST_SIZE, \
217 .max_data_size = IWL60_RTC_DATA_SIZE, \
218 .nvm_ver = EEPROM_6030_EEPROM_VERSION, \
219 .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
220 .base_params = &iwl6000_g2_base_params, \
221 .bt_params = &iwl6000_bt_params, \
222 .eeprom_params = &iwl6000_eeprom_params, \
223 .need_temp_offset_calib = true, \
224 .led_mode = IWL_LED_RF_STATE, \
225 .adv_pm = true \
226
227const struct iwl_cfg iwl6030_2agn_cfg = {
228 .name = "Intel(R) Centrino(R) Advanced-N 6230 AGN",
229 IWL_DEVICE_6030,
230 .ht_params = &iwl6000_ht_params,
231};
232
233const struct iwl_cfg iwl6030_2abg_cfg = {
234 .name = "Intel(R) Centrino(R) Advanced-N 6230 ABG",
235 IWL_DEVICE_6030,
236};
237
238const struct iwl_cfg iwl6030_2bgn_cfg = {
239 .name = "Intel(R) Centrino(R) Advanced-N 6230 BGN",
240 IWL_DEVICE_6030,
241 .ht_params = &iwl6000_ht_params,
242};
243
244const struct iwl_cfg iwl6030_2bg_cfg = {
245 .name = "Intel(R) Centrino(R) Advanced-N 6230 BG",
246 IWL_DEVICE_6030,
247};
248
249#define IWL_DEVICE_6035 \
250 .fw_name_pre = IWL6030_FW_PRE, \
251 .ucode_api_max = IWL6035_UCODE_API_MAX, \
252 .ucode_api_ok = IWL6035_UCODE_API_OK, \
253 .ucode_api_min = IWL6035_UCODE_API_MIN, \
254 .device_family = IWL_DEVICE_FAMILY_6030, \
255 .max_inst_size = IWL60_RTC_INST_SIZE, \
256 .max_data_size = IWL60_RTC_DATA_SIZE, \
257 .nvm_ver = EEPROM_6030_EEPROM_VERSION, \
258 .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
259 .base_params = &iwl6000_g2_base_params, \
260 .bt_params = &iwl6000_bt_params, \
261 .eeprom_params = &iwl6000_eeprom_params, \
262 .need_temp_offset_calib = true, \
263 .led_mode = IWL_LED_RF_STATE, \
264 .adv_pm = true
265
266const struct iwl_cfg iwl6035_2agn_cfg = {
267 .name = "Intel(R) Centrino(R) Advanced-N 6235 AGN",
268 IWL_DEVICE_6035,
269 .ht_params = &iwl6000_ht_params,
270};
271
272const struct iwl_cfg iwl1030_bgn_cfg = {
273 .name = "Intel(R) Centrino(R) Wireless-N 1030 BGN",
274 IWL_DEVICE_6030,
275 .ht_params = &iwl6000_ht_params,
276};
277
278const struct iwl_cfg iwl1030_bg_cfg = {
279 .name = "Intel(R) Centrino(R) Wireless-N 1030 BG",
280 IWL_DEVICE_6030,
281};
282
283const struct iwl_cfg iwl130_bgn_cfg = {
284 .name = "Intel(R) Centrino(R) Wireless-N 130 BGN",
285 IWL_DEVICE_6030,
286 .ht_params = &iwl6000_ht_params,
287 .rx_with_siso_diversity = true,
288};
289
290const struct iwl_cfg iwl130_bg_cfg = {
291 .name = "Intel(R) Centrino(R) Wireless-N 130 BG",
292 IWL_DEVICE_6030,
293 .rx_with_siso_diversity = true,
294};
295
296/*
297 * "i": Internal configuration, use internal Power Amplifier
298 */
299#define IWL_DEVICE_6000i \
300 .fw_name_pre = IWL6000_FW_PRE, \
301 .ucode_api_max = IWL6000_UCODE_API_MAX, \
302 .ucode_api_ok = IWL6000_UCODE_API_OK, \
303 .ucode_api_min = IWL6000_UCODE_API_MIN, \
304 .device_family = IWL_DEVICE_FAMILY_6000i, \
305 .max_inst_size = IWL60_RTC_INST_SIZE, \
306 .max_data_size = IWL60_RTC_DATA_SIZE, \
307 .valid_tx_ant = ANT_BC, /* .cfg overwrite */ \
308 .valid_rx_ant = ANT_BC, /* .cfg overwrite */ \
309 .nvm_ver = EEPROM_6000_EEPROM_VERSION, \
310 .nvm_calib_ver = EEPROM_6000_TX_POWER_VERSION, \
311 .base_params = &iwl6000_base_params, \
312 .eeprom_params = &iwl6000_eeprom_params, \
313 .led_mode = IWL_LED_BLINK
314
315const struct iwl_cfg iwl6000i_2agn_cfg = {
316 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
317 IWL_DEVICE_6000i,
318 .ht_params = &iwl6000_ht_params,
319};
320
321const struct iwl_cfg iwl6000i_2abg_cfg = {
322 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
323 IWL_DEVICE_6000i,
324};
325
326const struct iwl_cfg iwl6000i_2bg_cfg = {
327 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
328 IWL_DEVICE_6000i,
329};
330
331#define IWL_DEVICE_6050 \
332 .fw_name_pre = IWL6050_FW_PRE, \
333 .ucode_api_max = IWL6050_UCODE_API_MAX, \
334 .ucode_api_min = IWL6050_UCODE_API_MIN, \
335 .device_family = IWL_DEVICE_FAMILY_6050, \
336 .max_inst_size = IWL60_RTC_INST_SIZE, \
337 .max_data_size = IWL60_RTC_DATA_SIZE, \
338 .valid_tx_ant = ANT_AB, /* .cfg overwrite */ \
339 .valid_rx_ant = ANT_AB, /* .cfg overwrite */ \
340 .nvm_ver = EEPROM_6050_EEPROM_VERSION, \
341 .nvm_calib_ver = EEPROM_6050_TX_POWER_VERSION, \
342 .base_params = &iwl6050_base_params, \
343 .eeprom_params = &iwl6000_eeprom_params, \
344 .led_mode = IWL_LED_BLINK, \
345 .internal_wimax_coex = true
346
347const struct iwl_cfg iwl6050_2agn_cfg = {
348 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
349 IWL_DEVICE_6050,
350 .ht_params = &iwl6000_ht_params,
351};
352
353const struct iwl_cfg iwl6050_2abg_cfg = {
354 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
355 IWL_DEVICE_6050,
356};
357
358#define IWL_DEVICE_6150 \
359 .fw_name_pre = IWL6050_FW_PRE, \
360 .ucode_api_max = IWL6050_UCODE_API_MAX, \
361 .ucode_api_min = IWL6050_UCODE_API_MIN, \
362 .device_family = IWL_DEVICE_FAMILY_6150, \
363 .max_inst_size = IWL60_RTC_INST_SIZE, \
364 .max_data_size = IWL60_RTC_DATA_SIZE, \
365 .nvm_ver = EEPROM_6150_EEPROM_VERSION, \
366 .nvm_calib_ver = EEPROM_6150_TX_POWER_VERSION, \
367 .base_params = &iwl6050_base_params, \
368 .eeprom_params = &iwl6000_eeprom_params, \
369 .led_mode = IWL_LED_BLINK, \
370 .internal_wimax_coex = true
371
372const struct iwl_cfg iwl6150_bgn_cfg = {
373 .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN",
374 IWL_DEVICE_6150,
375 .ht_params = &iwl6000_ht_params,
376};
377
378const struct iwl_cfg iwl6150_bg_cfg = {
379 .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BG",
380 IWL_DEVICE_6150,
381};
382
383const struct iwl_cfg iwl6000_3agn_cfg = {
384 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
385 .fw_name_pre = IWL6000_FW_PRE,
386 .ucode_api_max = IWL6000_UCODE_API_MAX,
387 .ucode_api_ok = IWL6000_UCODE_API_OK,
388 .ucode_api_min = IWL6000_UCODE_API_MIN,
389 .device_family = IWL_DEVICE_FAMILY_6000,
390 .max_inst_size = IWL60_RTC_INST_SIZE,
391 .max_data_size = IWL60_RTC_DATA_SIZE,
392 .nvm_ver = EEPROM_6000_EEPROM_VERSION,
393 .nvm_calib_ver = EEPROM_6000_TX_POWER_VERSION,
394 .base_params = &iwl6000_base_params,
395 .eeprom_params = &iwl6000_eeprom_params,
396 .ht_params = &iwl6000_ht_params,
397 .led_mode = IWL_LED_BLINK,
398};
399
400MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_OK));
401MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_OK));
402MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_OK));
403MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2B_UCODE_API_OK));
diff --git a/drivers/net/wireless/iwlwifi/pcie/7000.c b/drivers/net/wireless/iwlwifi/pcie/7000.c
deleted file mode 100644
index a5e9cfe3e746..000000000000
--- a/drivers/net/wireless/iwlwifi/pcie/7000.c
+++ /dev/null
@@ -1,147 +0,0 @@
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) 2012 - 2013 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 COPYING.
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) 2012 - 2013 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
64#include <linux/module.h>
65#include <linux/stringify.h>
66#include "iwl-config.h"
67#include "iwl-agn-hw.h"
68#include "cfg.h"
69
70/* Highest firmware API version supported */
71#define IWL7260_UCODE_API_MAX 6
72#define IWL3160_UCODE_API_MAX 6
73
74/* Oldest version we won't warn about */
75#define IWL7260_UCODE_API_OK 6
76#define IWL3160_UCODE_API_OK 6
77
78/* Lowest firmware API version supported */
79#define IWL7260_UCODE_API_MIN 6
80#define IWL3160_UCODE_API_MIN 6
81
82/* NVM versions */
83#define IWL7260_NVM_VERSION 0x0a1d
84#define IWL7260_TX_POWER_VERSION 0xffff /* meaningless */
85#define IWL3160_NVM_VERSION 0x709
86#define IWL3160_TX_POWER_VERSION 0xffff /* meaningless */
87
88#define IWL7260_FW_PRE "iwlwifi-7260-"
89#define IWL7260_MODULE_FIRMWARE(api) IWL7260_FW_PRE __stringify(api) ".ucode"
90
91#define IWL3160_FW_PRE "iwlwifi-3160-"
92#define IWL3160_MODULE_FIRMWARE(api) IWL3160_FW_PRE __stringify(api) ".ucode"
93
94static const struct iwl_base_params iwl7000_base_params = {
95 .eeprom_size = OTP_LOW_IMAGE_SIZE,
96 .num_of_queues = IWLAGN_NUM_QUEUES,
97 .pll_cfg_val = 0,
98 .shadow_ram_support = true,
99 .led_compensation = 57,
100 .adv_thermal_throttle = true,
101 .support_ct_kill_exit = true,
102 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
103 .chain_noise_scale = 1000,
104 .wd_timeout = IWL_LONG_WD_TIMEOUT,
105 .max_event_log_size = 512,
106 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
107};
108
109static const struct iwl_ht_params iwl7000_ht_params = {
110 .use_rts_for_aggregation = true, /* use rts/cts protection */
111 .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ),
112};
113
114#define IWL_DEVICE_7000 \
115 .ucode_api_max = IWL7260_UCODE_API_MAX, \
116 .ucode_api_ok = IWL7260_UCODE_API_OK, \
117 .ucode_api_min = IWL7260_UCODE_API_MIN, \
118 .device_family = IWL_DEVICE_FAMILY_7000, \
119 .max_inst_size = IWL60_RTC_INST_SIZE, \
120 .max_data_size = IWL60_RTC_DATA_SIZE, \
121 .base_params = &iwl7000_base_params, \
122 /* TODO: .bt_params? */ \
123 .need_temp_offset_calib = true, \
124 .led_mode = IWL_LED_RF_STATE, \
125 .adv_pm = true \
126
127
128const struct iwl_cfg iwl7260_2ac_cfg = {
129 .name = "Intel(R) Dual Band Wireless AC7260",
130 .fw_name_pre = IWL7260_FW_PRE,
131 IWL_DEVICE_7000,
132 .ht_params = &iwl7000_ht_params,
133 .nvm_ver = IWL7260_NVM_VERSION,
134 .nvm_calib_ver = IWL7260_TX_POWER_VERSION,
135};
136
137const struct iwl_cfg iwl3160_ac_cfg = {
138 .name = "Intel(R) Dual Band Wireless AC3160",
139 .fw_name_pre = IWL3160_FW_PRE,
140 IWL_DEVICE_7000,
141 .ht_params = &iwl7000_ht_params,
142 .nvm_ver = IWL3160_NVM_VERSION,
143 .nvm_calib_ver = IWL3160_TX_POWER_VERSION,
144};
145
146MODULE_FIRMWARE(IWL7260_MODULE_FIRMWARE(IWL7260_UCODE_API_OK));
147MODULE_FIRMWARE(IWL3160_MODULE_FIRMWARE(IWL3160_UCODE_API_OK));
diff --git a/drivers/net/wireless/iwlwifi/pcie/cfg.h b/drivers/net/wireless/iwlwifi/pcie/cfg.h
deleted file mode 100644
index f4318fb192df..000000000000
--- a/drivers/net/wireless/iwlwifi/pcie/cfg.h
+++ /dev/null
@@ -1,115 +0,0 @@
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 - 2013 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 COPYING.
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 - 2013 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/*
68 * This file declares the config structures for all devices.
69 */
70
71extern const struct iwl_cfg iwl5300_agn_cfg;
72extern const struct iwl_cfg iwl5100_agn_cfg;
73extern const struct iwl_cfg iwl5350_agn_cfg;
74extern const struct iwl_cfg iwl5100_bgn_cfg;
75extern const struct iwl_cfg iwl5100_abg_cfg;
76extern const struct iwl_cfg iwl5150_agn_cfg;
77extern const struct iwl_cfg iwl5150_abg_cfg;
78extern const struct iwl_cfg iwl6005_2agn_cfg;
79extern const struct iwl_cfg iwl6005_2abg_cfg;
80extern const struct iwl_cfg iwl6005_2bg_cfg;
81extern const struct iwl_cfg iwl6005_2agn_sff_cfg;
82extern const struct iwl_cfg iwl6005_2agn_d_cfg;
83extern const struct iwl_cfg iwl6005_2agn_mow1_cfg;
84extern const struct iwl_cfg iwl6005_2agn_mow2_cfg;
85extern const struct iwl_cfg iwl1030_bgn_cfg;
86extern const struct iwl_cfg iwl1030_bg_cfg;
87extern const struct iwl_cfg iwl6030_2agn_cfg;
88extern const struct iwl_cfg iwl6030_2abg_cfg;
89extern const struct iwl_cfg iwl6030_2bgn_cfg;
90extern const struct iwl_cfg iwl6030_2bg_cfg;
91extern const struct iwl_cfg iwl6000i_2agn_cfg;
92extern const struct iwl_cfg iwl6000i_2abg_cfg;
93extern const struct iwl_cfg iwl6000i_2bg_cfg;
94extern const struct iwl_cfg iwl6000_3agn_cfg;
95extern const struct iwl_cfg iwl6050_2agn_cfg;
96extern const struct iwl_cfg iwl6050_2abg_cfg;
97extern const struct iwl_cfg iwl6150_bgn_cfg;
98extern const struct iwl_cfg iwl6150_bg_cfg;
99extern const struct iwl_cfg iwl1000_bgn_cfg;
100extern const struct iwl_cfg iwl1000_bg_cfg;
101extern const struct iwl_cfg iwl100_bgn_cfg;
102extern const struct iwl_cfg iwl100_bg_cfg;
103extern const struct iwl_cfg iwl130_bgn_cfg;
104extern const struct iwl_cfg iwl130_bg_cfg;
105extern const struct iwl_cfg iwl2000_2bgn_cfg;
106extern const struct iwl_cfg iwl2000_2bgn_d_cfg;
107extern const struct iwl_cfg iwl2030_2bgn_cfg;
108extern const struct iwl_cfg iwl6035_2agn_cfg;
109extern const struct iwl_cfg iwl105_bgn_cfg;
110extern const struct iwl_cfg iwl105_bgn_d_cfg;
111extern const struct iwl_cfg iwl135_bgn_cfg;
112extern const struct iwl_cfg iwl7260_2ac_cfg;
113extern const struct iwl_cfg iwl3160_ac_cfg;
114
115#endif /* __iwl_pci_h__ */
diff --git a/drivers/net/wireless/iwlwifi/pcie/drv.c b/drivers/net/wireless/iwlwifi/pcie/drv.c
index 49b254326d9c..46ca91f77c9c 100644
--- a/drivers/net/wireless/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/iwlwifi/pcie/drv.c
@@ -69,8 +69,6 @@
69 69
70#include "iwl-trans.h" 70#include "iwl-trans.h"
71#include "iwl-drv.h" 71#include "iwl-drv.h"
72
73#include "cfg.h"
74#include "internal.h" 72#include "internal.h"
75 73
76#define IWL_PCI_DEVICE(dev, subdev, cfg) \ 74#define IWL_PCI_DEVICE(dev, subdev, cfg) \