iwlwifi: move eeprom versions to HW files
[deliverable/linux.git] / drivers / net / wireless / iwlwifi / iwl-6000.c
CommitLineData
e1228374
JS
1/******************************************************************************
2 *
4e318262 3 * Copyright(c) 2008 - 2012 Intel Corporation. All rights reserved.
e1228374
JS
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
e1228374 27#include <linux/module.h>
8fcbd4dc 28#include <linux/stringify.h>
e9676695 29#include "iwl-config.h"
cebcbd75 30#include "iwl-cfg.h"
e9676695 31#include "iwl-dev.h" /* still needed */
e1228374
JS
32
33/* Highest firmware API version supported */
b9148115 34#define IWL6000_UCODE_API_MAX 6
62cb3c6a 35#define IWL6050_UCODE_API_MAX 5
ca9a4605
JB
36#define IWL6000G2_UCODE_API_MAX 6
37
38/* Oldest version we won't warn about */
b9148115 39#define IWL6000_UCODE_API_OK 4
ca9a4605 40#define IWL6000G2_UCODE_API_OK 5
e1228374
JS
41
42/* Lowest firmware API version supported */
44246421
WYG
43#define IWL6000_UCODE_API_MIN 4
44#define IWL6050_UCODE_API_MIN 4
4b3e8062 45#define IWL6000G2_UCODE_API_MIN 4
e1228374 46
586aed96
JB
47/* EEPROM versions */
48#define EEPROM_6000_TX_POWER_VERSION (4)
49#define EEPROM_6000_EEPROM_VERSION (0x423)
50#define EEPROM_6050_TX_POWER_VERSION (4)
51#define EEPROM_6050_EEPROM_VERSION (0x532)
52#define EEPROM_6150_TX_POWER_VERSION (6)
53#define EEPROM_6150_EEPROM_VERSION (0x553)
54#define EEPROM_6005_TX_POWER_VERSION (6)
55#define EEPROM_6005_EEPROM_VERSION (0x709)
56#define EEPROM_6030_TX_POWER_VERSION (6)
57#define EEPROM_6030_EEPROM_VERSION (0x709)
58#define EEPROM_6035_TX_POWER_VERSION (6)
59#define EEPROM_6035_EEPROM_VERSION (0x753)
60
e1228374 61#define IWL6000_FW_PRE "iwlwifi-6000-"
8fcbd4dc 62#define IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE __stringify(api) ".ucode"
e1228374
JS
63
64#define IWL6050_FW_PRE "iwlwifi-6050-"
8fcbd4dc 65#define IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE __stringify(api) ".ucode"
e1228374 66
1956e1ad 67#define IWL6005_FW_PRE "iwlwifi-6000g2a-"
8fcbd4dc 68#define IWL6005_MODULE_FIRMWARE(api) IWL6005_FW_PRE __stringify(api) ".ucode"
95b13014 69
1956e1ad 70#define IWL6030_FW_PRE "iwlwifi-6000g2b-"
8fcbd4dc 71#define IWL6030_MODULE_FIRMWARE(api) IWL6030_FW_PRE __stringify(api) ".ucode"
1808972f 72
6794f3ee 73static const struct iwl_base_params iwl6000_base_params = {
0b5af201 74 .eeprom_size = OTP_LOW_IMAGE_SIZE,
0b5af201 75 .num_of_queues = IWLAGN_NUM_QUEUES,
0b5af201 76 .pll_cfg_val = 0,
0b5af201
JS
77 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
78 .shadow_ram_support = true,
0b5af201 79 .led_compensation = 51,
0b5af201
JS
80 .adv_thermal_throttle = true,
81 .support_ct_kill_exit = true,
82 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
83 .chain_noise_scale = 1000,
22de94de 84 .wd_timeout = IWL_DEF_WD_TIMEOUT,
95b13014 85 .max_event_log_size = 512,
f81c1f48 86 .shadow_reg_enable = true,
0b5af201
JS
87};
88
6794f3ee 89static const struct iwl_base_params iwl6050_base_params = {
1808972f 90 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1808972f 91 .num_of_queues = IWLAGN_NUM_QUEUES,
1808972f 92 .pll_cfg_val = 0,
7cb1b088 93 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
1808972f
SZ
94 .shadow_ram_support = true,
95 .led_compensation = 51,
1808972f
SZ
96 .adv_thermal_throttle = true,
97 .support_ct_kill_exit = true,
98 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
7cb1b088 99 .chain_noise_scale = 1500,
22de94de 100 .wd_timeout = IWL_DEF_WD_TIMEOUT,
7cb1b088 101 .max_event_log_size = 1024,
f81c1f48 102 .shadow_reg_enable = true,
7cb1b088 103};
6794f3ee
JB
104
105static const struct iwl_base_params iwl6000_g2_base_params = {
de05ead8
WYG
106 .eeprom_size = OTP_LOW_IMAGE_SIZE,
107 .num_of_queues = IWLAGN_NUM_QUEUES,
de05ead8 108 .pll_cfg_val = 0,
de05ead8
WYG
109 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
110 .shadow_ram_support = true,
4fb33244 111 .led_compensation = 57,
de05ead8
WYG
112 .adv_thermal_throttle = true,
113 .support_ct_kill_exit = true,
114 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
115 .chain_noise_scale = 1000,
22de94de 116 .wd_timeout = IWL_LONG_WD_TIMEOUT,
de05ead8 117 .max_event_log_size = 512,
f81c1f48 118 .shadow_reg_enable = true,
de05ead8 119};
7cb1b088 120
6794f3ee 121static const struct iwl_ht_params iwl6000_ht_params = {
7cb1b088
WYG
122 .ht_greenfield_support = true,
123 .use_rts_for_aggregation = true, /* use rts/cts protection */
124};
125
6794f3ee 126static const struct iwl_bt_params iwl6000_bt_params = {
7cb1b088
WYG
127 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
128 .advanced_bt_coexist = true,
66e863a5 129 .agg_time_limit = BT_AGG_THRESHOLD_DEF,
7cb1b088
WYG
130 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
131 .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT,
e366176e 132 .bt_sco_disable = true,
7cb1b088
WYG
133};
134
65af8dea 135#define IWL_DEVICE_6005 \
ca9a4605 136 .fw_name_pre = IWL6005_FW_PRE, \
65af8dea 137 .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
ca9a4605 138 .ucode_api_ok = IWL6000G2_UCODE_API_OK, \
65af8dea 139 .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
2d771cb6 140 .device_family = IWL_DEVICE_FAMILY_6005, \
dae66d0d
EG
141 .max_inst_size = IWL60_RTC_INST_SIZE, \
142 .max_data_size = IWL60_RTC_DATA_SIZE, \
1956e1ad
WYG
143 .eeprom_ver = EEPROM_6005_EEPROM_VERSION, \
144 .eeprom_calib_ver = EEPROM_6005_TX_POWER_VERSION, \
65af8dea 145 .base_params = &iwl6000_g2_base_params, \
65af8dea
WYG
146 .need_temp_offset_calib = true, \
147 .led_mode = IWL_LED_RF_STATE
148
706c4ff6 149const struct iwl_cfg iwl6005_2agn_cfg = {
55017ab8 150 .name = "Intel(R) Centrino(R) Advanced-N 6205 AGN",
65af8dea 151 IWL_DEVICE_6005,
7cb1b088 152 .ht_params = &iwl6000_ht_params,
7cb1b088
WYG
153};
154
706c4ff6 155const struct iwl_cfg iwl6005_2abg_cfg = {
55017ab8 156 .name = "Intel(R) Centrino(R) Advanced-N 6205 ABG",
65af8dea 157 IWL_DEVICE_6005,
1808972f
SZ
158};
159
706c4ff6 160const struct iwl_cfg iwl6005_2bg_cfg = {
55017ab8 161 .name = "Intel(R) Centrino(R) Advanced-N 6205 BG",
65af8dea
WYG
162 IWL_DEVICE_6005,
163};
164
706c4ff6 165const struct iwl_cfg iwl6005_2agn_sff_cfg = {
6a9ae0dc
WYG
166 .name = "Intel(R) Centrino(R) Advanced-N 6205S AGN",
167 IWL_DEVICE_6005,
168 .ht_params = &iwl6000_ht_params,
169};
170
706c4ff6 171const struct iwl_cfg iwl6005_2agn_d_cfg = {
5131a600
WYG
172 .name = "Intel(R) Centrino(R) Advanced-N 6205D AGN",
173 IWL_DEVICE_6005,
174 .ht_params = &iwl6000_ht_params,
175};
176
706c4ff6 177const struct iwl_cfg iwl6005_2agn_mow1_cfg = {
37891123
WYG
178 .name = "Intel(R) Centrino(R) Advanced-N 6206 AGN",
179 IWL_DEVICE_6005,
180 .ht_params = &iwl6000_ht_params,
181};
706c4ff6
JB
182
183const struct iwl_cfg iwl6005_2agn_mow2_cfg = {
37891123
WYG
184 .name = "Intel(R) Centrino(R) Advanced-N 6207 AGN",
185 IWL_DEVICE_6005,
186 .ht_params = &iwl6000_ht_params,
187};
188
65af8dea 189#define IWL_DEVICE_6030 \
ca9a4605 190 .fw_name_pre = IWL6030_FW_PRE, \
65af8dea 191 .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
ca9a4605 192 .ucode_api_ok = IWL6000G2_UCODE_API_OK, \
65af8dea 193 .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
2d771cb6 194 .device_family = IWL_DEVICE_FAMILY_6030, \
dae66d0d
EG
195 .max_inst_size = IWL60_RTC_INST_SIZE, \
196 .max_data_size = IWL60_RTC_DATA_SIZE, \
1956e1ad
WYG
197 .eeprom_ver = EEPROM_6030_EEPROM_VERSION, \
198 .eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
65af8dea
WYG
199 .base_params = &iwl6000_g2_base_params, \
200 .bt_params = &iwl6000_bt_params, \
65af8dea
WYG
201 .need_temp_offset_calib = true, \
202 .led_mode = IWL_LED_RF_STATE, \
cd017f25 203 .adv_pm = true \
1808972f 204
706c4ff6 205const struct iwl_cfg iwl6030_2agn_cfg = {
d2eceef0 206 .name = "Intel(R) Centrino(R) Advanced-N 6230 AGN",
65af8dea 207 IWL_DEVICE_6030,
7cb1b088 208 .ht_params = &iwl6000_ht_params,
1808972f
SZ
209};
210
706c4ff6 211const struct iwl_cfg iwl6030_2abg_cfg = {
d2eceef0 212 .name = "Intel(R) Centrino(R) Advanced-N 6230 ABG",
65af8dea 213 IWL_DEVICE_6030,
1808972f
SZ
214};
215
706c4ff6 216const struct iwl_cfg iwl6030_2bgn_cfg = {
d2eceef0 217 .name = "Intel(R) Centrino(R) Advanced-N 6230 BGN",
65af8dea 218 IWL_DEVICE_6030,
7cb1b088 219 .ht_params = &iwl6000_ht_params,
9f6e1baf
SZ
220};
221
706c4ff6 222const struct iwl_cfg iwl6030_2bg_cfg = {
d2eceef0 223 .name = "Intel(R) Centrino(R) Advanced-N 6230 BG",
65af8dea 224 IWL_DEVICE_6030,
1808972f
SZ
225};
226
706c4ff6 227const struct iwl_cfg iwl6035_2agn_cfg = {
6195d135 228 .name = "Intel(R) Centrino(R) Advanced-N 6235 AGN",
d103e344
WYG
229 IWL_DEVICE_6030,
230 .ht_params = &iwl6000_ht_params,
231};
232
706c4ff6 233const struct iwl_cfg iwl1030_bgn_cfg = {
d2eceef0 234 .name = "Intel(R) Centrino(R) Wireless-N 1030 BGN",
65af8dea 235 IWL_DEVICE_6030,
7cb1b088 236 .ht_params = &iwl6000_ht_params,
1808972f
SZ
237};
238
706c4ff6 239const struct iwl_cfg iwl1030_bg_cfg = {
d2eceef0 240 .name = "Intel(R) Centrino(R) Wireless-N 1030 BG",
65af8dea
WYG
241 IWL_DEVICE_6030,
242};
243
706c4ff6 244const struct iwl_cfg iwl130_bgn_cfg = {
65af8dea
WYG
245 .name = "Intel(R) Centrino(R) Wireless-N 130 BGN",
246 IWL_DEVICE_6030,
247 .ht_params = &iwl6000_ht_params,
248 .rx_with_siso_diversity = true,
249};
250
706c4ff6 251const struct iwl_cfg iwl130_bg_cfg = {
65af8dea
WYG
252 .name = "Intel(R) Centrino(R) Wireless-N 130 BG",
253 IWL_DEVICE_6030,
254 .rx_with_siso_diversity = true,
1808972f
SZ
255};
256
95b13014
SZ
257/*
258 * "i": Internal configuration, use internal Power Amplifier
259 */
65af8dea
WYG
260#define IWL_DEVICE_6000i \
261 .fw_name_pre = IWL6000_FW_PRE, \
262 .ucode_api_max = IWL6000_UCODE_API_MAX, \
b9148115 263 .ucode_api_ok = IWL6000_UCODE_API_OK, \
65af8dea 264 .ucode_api_min = IWL6000_UCODE_API_MIN, \
2d771cb6 265 .device_family = IWL_DEVICE_FAMILY_6000i, \
dae66d0d
EG
266 .max_inst_size = IWL60_RTC_INST_SIZE, \
267 .max_data_size = IWL60_RTC_DATA_SIZE, \
65af8dea
WYG
268 .valid_tx_ant = ANT_BC, /* .cfg overwrite */ \
269 .valid_rx_ant = ANT_BC, /* .cfg overwrite */ \
270 .eeprom_ver = EEPROM_6000_EEPROM_VERSION, \
271 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, \
65af8dea 272 .base_params = &iwl6000_base_params, \
65af8dea
WYG
273 .led_mode = IWL_LED_BLINK
274
706c4ff6 275const struct iwl_cfg iwl6000i_2agn_cfg = {
c11362c0 276 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
65af8dea 277 IWL_DEVICE_6000i,
7cb1b088 278 .ht_params = &iwl6000_ht_params,
e1228374
JS
279};
280
706c4ff6 281const struct iwl_cfg iwl6000i_2abg_cfg = {
c11362c0 282 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
65af8dea 283 IWL_DEVICE_6000i,
5953a62e
WYG
284};
285
706c4ff6 286const struct iwl_cfg iwl6000i_2bg_cfg = {
c11362c0 287 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
65af8dea
WYG
288 IWL_DEVICE_6000i,
289};
290
291#define IWL_DEVICE_6050 \
292 .fw_name_pre = IWL6050_FW_PRE, \
293 .ucode_api_max = IWL6050_UCODE_API_MAX, \
294 .ucode_api_min = IWL6050_UCODE_API_MIN, \
2d771cb6 295 .device_family = IWL_DEVICE_FAMILY_6050, \
dae66d0d
EG
296 .max_inst_size = IWL60_RTC_INST_SIZE, \
297 .max_data_size = IWL60_RTC_DATA_SIZE, \
ff458edc
WYG
298 .valid_tx_ant = ANT_AB, /* .cfg overwrite */ \
299 .valid_rx_ant = ANT_AB, /* .cfg overwrite */ \
65af8dea
WYG
300 .eeprom_ver = EEPROM_6050_EEPROM_VERSION, \
301 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, \
65af8dea 302 .base_params = &iwl6050_base_params, \
65af8dea
WYG
303 .led_mode = IWL_LED_BLINK, \
304 .internal_wimax_coex = true
5953a62e 305
706c4ff6 306const struct iwl_cfg iwl6050_2agn_cfg = {
c11362c0 307 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
65af8dea 308 IWL_DEVICE_6050,
7cb1b088 309 .ht_params = &iwl6000_ht_params,
65af8dea
WYG
310};
311
706c4ff6 312const struct iwl_cfg iwl6050_2abg_cfg = {
65af8dea
WYG
313 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
314 IWL_DEVICE_6050,
03264339
SZ
315};
316
1144181c
WYG
317#define IWL_DEVICE_6150 \
318 .fw_name_pre = IWL6050_FW_PRE, \
319 .ucode_api_max = IWL6050_UCODE_API_MAX, \
320 .ucode_api_min = IWL6050_UCODE_API_MIN, \
2d771cb6 321 .device_family = IWL_DEVICE_FAMILY_6150, \
dae66d0d
EG
322 .max_inst_size = IWL60_RTC_INST_SIZE, \
323 .max_data_size = IWL60_RTC_DATA_SIZE, \
1144181c
WYG
324 .eeprom_ver = EEPROM_6150_EEPROM_VERSION, \
325 .eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION, \
326 .base_params = &iwl6050_base_params, \
1144181c
WYG
327 .led_mode = IWL_LED_BLINK, \
328 .internal_wimax_coex = true
329
706c4ff6 330const struct iwl_cfg iwl6150_bgn_cfg = {
f9dc6467 331 .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN",
1144181c 332 IWL_DEVICE_6150,
7cb1b088 333 .ht_params = &iwl6000_ht_params,
1144181c
WYG
334};
335
706c4ff6 336const struct iwl_cfg iwl6150_bg_cfg = {
1144181c
WYG
337 .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BG",
338 IWL_DEVICE_6150,
e1228374
JS
339};
340
706c4ff6 341const struct iwl_cfg iwl6000_3agn_cfg = {
c11362c0 342 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
e1228374
JS
343 .fw_name_pre = IWL6000_FW_PRE,
344 .ucode_api_max = IWL6000_UCODE_API_MAX,
b9148115 345 .ucode_api_ok = IWL6000_UCODE_API_OK,
e1228374 346 .ucode_api_min = IWL6000_UCODE_API_MIN,
2d771cb6 347 .device_family = IWL_DEVICE_FAMILY_6000,
dae66d0d
EG
348 .max_inst_size = IWL60_RTC_INST_SIZE,
349 .max_data_size = IWL60_RTC_DATA_SIZE,
1f4b9665 350 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
00e70590 351 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
7cb1b088
WYG
352 .base_params = &iwl6000_base_params,
353 .ht_params = &iwl6000_ht_params,
564b344c 354 .led_mode = IWL_LED_BLINK,
e1228374
JS
355};
356
b9148115 357MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_OK));
e1228374 358MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
1956e1ad
WYG
359MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
360MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
This page took 0.470329 seconds and 5 git commands to generate.