blob: c4844adff92a3a9adc923493975eb8ea50c56f65 [file] [log] [blame]
Jay Sternberge1228372009-01-19 15:30:34 -08001/******************************************************************************
2 *
Reinette Chatre1f447802010-01-15 13:43:41 -08003 * Copyright(c) 2008 - 2010 Intel Corporation. All rights reserved.
Jay Sternberge1228372009-01-19 15:30:34 -08004 *
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/kernel.h>
28#include <linux/module.h>
29#include <linux/init.h>
30#include <linux/pci.h>
31#include <linux/dma-mapping.h>
32#include <linux/delay.h>
33#include <linux/skbuff.h>
34#include <linux/netdevice.h>
35#include <linux/wireless.h>
36#include <net/mac80211.h>
37#include <linux/etherdevice.h>
38#include <asm/unaligned.h>
39
40#include "iwl-eeprom.h"
41#include "iwl-dev.h"
42#include "iwl-core.h"
43#include "iwl-io.h"
44#include "iwl-sta.h"
45#include "iwl-helpers.h"
46#include "iwl-5000-hw.h"
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -070047#include "iwl-6000-hw.h"
Johannes Berge932a602009-10-02 13:44:03 -070048#include "iwl-agn-led.h"
Jay Sternberge1228372009-01-19 15:30:34 -080049
50/* Highest firmware API version supported */
Wey-Yi Guyfcbaf8b2009-08-21 13:34:18 -070051#define IWL6000_UCODE_API_MAX 4
52#define IWL6050_UCODE_API_MAX 4
Jay Sternberge1228372009-01-19 15:30:34 -080053
54/* Lowest firmware API version supported */
Wey-Yi Guy44246422009-10-23 13:42:34 -070055#define IWL6000_UCODE_API_MIN 4
56#define IWL6050_UCODE_API_MIN 4
Jay Sternberge1228372009-01-19 15:30:34 -080057
58#define IWL6000_FW_PRE "iwlwifi-6000-"
59#define _IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE #api ".ucode"
60#define IWL6000_MODULE_FIRMWARE(api) _IWL6000_MODULE_FIRMWARE(api)
61
62#define IWL6050_FW_PRE "iwlwifi-6050-"
63#define _IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE #api ".ucode"
64#define IWL6050_MODULE_FIRMWARE(api) _IWL6050_MODULE_FIRMWARE(api)
65
Wey-Yi Guy672639d2009-07-24 11:13:01 -070066static void iwl6000_set_ct_threshold(struct iwl_priv *priv)
67{
68 /* want Celsius */
69 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD;
70 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
71}
72
Abhijeet Kolekard5755932010-02-18 22:03:05 -080073/* Indicate calibration version to uCode. */
74static void iwl6050_set_calib_version(struct iwl_priv *priv)
75{
76 if (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6)
77 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
78 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
79}
80
Wey-Yi Guy65b79982009-07-31 14:28:07 -070081/* NIC configuration for 6000 series */
82static void iwl6000_nic_config(struct iwl_priv *priv)
83{
Wey-Yi Guy9371d4e2009-09-11 10:38:10 -070084 u16 radio_cfg;
85
86 radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG);
87
88 /* write radio config values to register */
89 if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) <= EEPROM_RF_CONFIG_TYPE_MAX)
90 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
91 EEPROM_RF_CFG_TYPE_MSK(radio_cfg) |
92 EEPROM_RF_CFG_STEP_MSK(radio_cfg) |
93 EEPROM_RF_CFG_DASH_MSK(radio_cfg));
94
95 /* set CSR_HW_CONFIG_REG for uCode use */
96 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
97 CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI |
98 CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);
Wey-Yi Guy65b79982009-07-31 14:28:07 -070099
100 /* no locking required for register write */
Wey-Yi Guy740e7f52009-11-06 14:52:55 -0800101 if (priv->cfg->pa_type == IWL_PA_INTERNAL) {
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700102 /* 2x2 IPA phy type */
103 iwl_write32(priv, CSR_GP_DRIVER_REG,
104 CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
105 }
106 /* else do nothing, uCode configured */
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800107 if (priv->cfg->ops->lib->temp_ops.set_calib_version)
108 priv->cfg->ops->lib->temp_ops.set_calib_version(priv);
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700109}
110
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700111static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
112 .min_nrg_cck = 97,
113 .max_nrg_cck = 0, /* not used, set to 0 */
114 .auto_corr_min_ofdm = 80,
115 .auto_corr_min_ofdm_mrc = 128,
116 .auto_corr_min_ofdm_x1 = 105,
117 .auto_corr_min_ofdm_mrc_x1 = 192,
118
119 .auto_corr_max_ofdm = 145,
120 .auto_corr_max_ofdm_mrc = 232,
Wey-Yi Guy2494f632010-01-20 12:22:52 -0800121 .auto_corr_max_ofdm_x1 = 110,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700122 .auto_corr_max_ofdm_mrc_x1 = 232,
123
124 .auto_corr_min_cck = 125,
125 .auto_corr_max_cck = 175,
126 .auto_corr_min_cck_mrc = 160,
127 .auto_corr_max_cck_mrc = 310,
128 .nrg_th_cck = 97,
129 .nrg_th_ofdm = 100,
Wey-Yi Guy55036d62009-10-09 13:20:24 -0700130
131 .barker_corr_th_min = 190,
132 .barker_corr_th_min_mrc = 390,
133 .nrg_th_cca = 62,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700134};
135
136static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
137{
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700138 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
139 priv->cfg->mod_params->num_of_queues <= IWL50_NUM_QUEUES)
140 priv->cfg->num_of_queues =
141 priv->cfg->mod_params->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700142
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700143 priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700144 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
145 priv->hw_params.scd_bc_tbls_size =
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700146 priv->cfg->num_of_queues *
147 sizeof(struct iwl5000_scd_bc_tbl);
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700148 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
149 priv->hw_params.max_stations = IWL5000_STATION_COUNT;
150 priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
151
152 priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
153 priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
154
155 priv->hw_params.max_bsm_size = 0;
156 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
157 BIT(IEEE80211_BAND_5GHZ);
158 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
159
160 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
161 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
162 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
163 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
164
165 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
166 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
167
168 /* Set initial sensitivity parameters */
169 /* Set initial calibration set */
170 priv->hw_params.sens = &iwl6000_sensitivity;
Abhijeet Kolekar07f33f92010-01-22 14:22:47 -0800171 switch (priv->hw_rev & CSR_HW_REV_TYPE_MSK) {
172 case CSR_HW_REV_TYPE_6x50:
173 priv->hw_params.calib_init_cfg =
174 BIT(IWL_CALIB_XTAL) |
175 BIT(IWL_CALIB_DC) |
176 BIT(IWL_CALIB_LO) |
177 BIT(IWL_CALIB_TX_IQ) |
178 BIT(IWL_CALIB_BASE_BAND);
179
180 break;
181 default:
182 priv->hw_params.calib_init_cfg =
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700183 BIT(IWL_CALIB_XTAL) |
184 BIT(IWL_CALIB_LO) |
185 BIT(IWL_CALIB_TX_IQ) |
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700186 BIT(IWL_CALIB_BASE_BAND);
Abhijeet Kolekar07f33f92010-01-22 14:22:47 -0800187 break;
188 }
189
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700190 return 0;
191}
192
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700193static int iwl6000_hw_channel_switch(struct iwl_priv *priv, u16 channel)
194{
195 struct iwl6000_channel_switch_cmd cmd;
196 const struct iwl_channel_info *ch_info;
197 struct iwl_host_cmd hcmd = {
198 .id = REPLY_CHANNEL_SWITCH,
199 .len = sizeof(cmd),
200 .flags = CMD_SIZE_HUGE,
201 .data = &cmd,
202 };
203
204 IWL_DEBUG_11H(priv, "channel switch from %d to %d\n",
205 priv->active_rxon.channel, channel);
206
207 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
208 cmd.channel = cpu_to_le16(channel);
Wey-Yi Guy0924e5192009-11-06 14:52:54 -0800209 cmd.rxon_flags = priv->staging_rxon.flags;
210 cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700211 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
212 ch_info = iwl_get_channel_info(priv, priv->band, channel);
213 if (ch_info)
214 cmd.expect_beacon = is_channel_radar(ch_info);
215 else {
216 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
217 priv->active_rxon.channel, channel);
218 return -EFAULT;
219 }
Wey-Yi Guy0924e5192009-11-06 14:52:54 -0800220 priv->switch_rxon.channel = cpu_to_le16(channel);
221 priv->switch_rxon.switch_in_progress = true;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700222
223 return iwl_send_cmd_sync(priv, &hcmd);
224}
225
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700226static struct iwl_lib_ops iwl6000_lib = {
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700227 .set_hw_params = iwl6000_hw_set_hw_params,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700228 .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl,
229 .txq_inval_byte_cnt_tbl = iwl5000_txq_inval_byte_cnt_tbl,
230 .txq_set_sched = iwl5000_txq_set_sched,
231 .txq_agg_enable = iwl5000_txq_agg_enable,
232 .txq_agg_disable = iwl5000_txq_agg_disable,
233 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
234 .txq_free_tfd = iwl_hw_txq_free_tfd,
235 .txq_init = iwl_hw_tx_queue_init,
236 .rx_handler_setup = iwl5000_rx_handler_setup,
237 .setup_deferred_work = iwl5000_setup_deferred_work,
238 .is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr,
239 .load_ucode = iwl5000_load_ucode,
Reinette Chatreb7a79402009-09-25 14:24:23 -0700240 .dump_nic_event_log = iwl_dump_nic_event_log,
241 .dump_nic_error_log = iwl_dump_nic_error_log,
Wey-Yi Guy696bdee2009-12-10 14:37:25 -0800242 .dump_csr = iwl_dump_csr,
Wey-Yi Guy1b3eb822010-01-15 13:43:39 -0800243 .dump_fh = iwl_dump_fh,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700244 .init_alive_start = iwl5000_init_alive_start,
245 .alive_notify = iwl5000_alive_notify,
246 .send_tx_power = iwl5000_send_tx_power,
247 .update_chain_flags = iwl_update_chain_flags,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700248 .set_channel_switch = iwl6000_hw_channel_switch,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700249 .apm_ops = {
Ben Cahillfadb3582009-10-23 13:42:21 -0700250 .init = iwl_apm_init,
Abhijeet Kolekard68b6032009-10-02 13:44:04 -0700251 .stop = iwl_apm_stop,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700252 .config = iwl6000_nic_config,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700253 .set_pwr_src = iwl_set_pwr_src,
254 },
255 .eeprom_ops = {
256 .regulatory_bands = {
257 EEPROM_5000_REG_BAND_1_CHANNELS,
258 EEPROM_5000_REG_BAND_2_CHANNELS,
259 EEPROM_5000_REG_BAND_3_CHANNELS,
260 EEPROM_5000_REG_BAND_4_CHANNELS,
261 EEPROM_5000_REG_BAND_5_CHANNELS,
Wey-Yi Guy7aafef12009-08-07 15:41:38 -0700262 EEPROM_5000_REG_BAND_24_HT40_CHANNELS,
263 EEPROM_5000_REG_BAND_52_HT40_CHANNELS
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700264 },
265 .verify_signature = iwlcore_eeprom_verify_signature,
266 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
267 .release_semaphore = iwlcore_eeprom_release_semaphore,
268 .calib_version = iwl5000_eeprom_calib_version,
269 .query_addr = iwl5000_eeprom_query_addr,
Wey-Yi Guyab9fd1b2009-08-21 13:34:23 -0700270 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700271 },
272 .post_associate = iwl_post_associate,
273 .isr = iwl_isr_ict,
274 .config_ap = iwl_config_ap,
275 .temp_ops = {
276 .temperature = iwl5000_temperature,
277 .set_ct_kill = iwl6000_set_ct_threshold,
278 },
Reinette Chatre3459ab52010-01-22 14:22:49 -0800279 .add_bcast_station = iwl_add_bcast_station,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700280};
281
Emese Revfy45d5d802009-12-14 00:59:53 +0100282static const struct iwl_ops iwl6000_ops = {
Jay Sternbergcc0f5552009-07-17 09:30:16 -0700283 .ucode = &iwl5000_ucode,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700284 .lib = &iwl6000_lib,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800285 .hcmd = &iwl5000_hcmd,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700286 .utils = &iwl5000_hcmd_utils,
Johannes Berge932a602009-10-02 13:44:03 -0700287 .led = &iwlagn_led_ops,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800288};
289
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800290static struct iwl_lib_ops iwl6050_lib = {
291 .set_hw_params = iwl6000_hw_set_hw_params,
292 .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl,
293 .txq_inval_byte_cnt_tbl = iwl5000_txq_inval_byte_cnt_tbl,
294 .txq_set_sched = iwl5000_txq_set_sched,
295 .txq_agg_enable = iwl5000_txq_agg_enable,
296 .txq_agg_disable = iwl5000_txq_agg_disable,
297 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
298 .txq_free_tfd = iwl_hw_txq_free_tfd,
299 .txq_init = iwl_hw_tx_queue_init,
300 .rx_handler_setup = iwl5000_rx_handler_setup,
301 .setup_deferred_work = iwl5000_setup_deferred_work,
302 .is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr,
303 .load_ucode = iwl5000_load_ucode,
304 .dump_nic_event_log = iwl_dump_nic_event_log,
305 .dump_nic_error_log = iwl_dump_nic_error_log,
306 .dump_csr = iwl_dump_csr,
307 .dump_fh = iwl_dump_fh,
308 .init_alive_start = iwl5000_init_alive_start,
309 .alive_notify = iwl5000_alive_notify,
310 .send_tx_power = iwl5000_send_tx_power,
311 .update_chain_flags = iwl_update_chain_flags,
312 .set_channel_switch = iwl6000_hw_channel_switch,
313 .apm_ops = {
314 .init = iwl_apm_init,
315 .stop = iwl_apm_stop,
316 .config = iwl6000_nic_config,
317 .set_pwr_src = iwl_set_pwr_src,
318 },
319 .eeprom_ops = {
320 .regulatory_bands = {
321 EEPROM_5000_REG_BAND_1_CHANNELS,
322 EEPROM_5000_REG_BAND_2_CHANNELS,
323 EEPROM_5000_REG_BAND_3_CHANNELS,
324 EEPROM_5000_REG_BAND_4_CHANNELS,
325 EEPROM_5000_REG_BAND_5_CHANNELS,
326 EEPROM_5000_REG_BAND_24_HT40_CHANNELS,
327 EEPROM_5000_REG_BAND_52_HT40_CHANNELS
328 },
329 .verify_signature = iwlcore_eeprom_verify_signature,
330 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
331 .release_semaphore = iwlcore_eeprom_release_semaphore,
332 .calib_version = iwl5000_eeprom_calib_version,
333 .query_addr = iwl5000_eeprom_query_addr,
334 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
335 },
336 .post_associate = iwl_post_associate,
337 .isr = iwl_isr_ict,
338 .config_ap = iwl_config_ap,
339 .temp_ops = {
340 .temperature = iwl5000_temperature,
341 .set_ct_kill = iwl6000_set_ct_threshold,
342 .set_calib_version = iwl6050_set_calib_version,
343 },
344 .add_bcast_station = iwl_add_bcast_station,
345};
346
347static const struct iwl_ops iwl6050_ops = {
348 .ucode = &iwl5000_ucode,
349 .lib = &iwl6050_lib,
350 .hcmd = &iwl5000_hcmd,
351 .utils = &iwl5000_hcmd_utils,
352 .led = &iwlagn_led_ops,
353};
354
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700355/*
356 * "i": Internal configuration, use internal Power Amplifier
357 */
358struct iwl_cfg iwl6000i_2agn_cfg = {
359 .name = "6000 Series 2x2 AGN",
360 .fw_name_pre = IWL6000_FW_PRE,
361 .ucode_api_max = IWL6000_UCODE_API_MAX,
362 .ucode_api_min = IWL6000_UCODE_API_MIN,
363 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
364 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700365 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700366 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700367 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700368 .num_of_queues = IWL50_NUM_QUEUES,
369 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700370 .mod_params = &iwl50_mod_params,
371 .valid_tx_ant = ANT_BC,
372 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700373 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700374 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700375 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700376 .pa_type = IWL_PA_INTERNAL,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700377 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
378 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700379 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700380 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700381 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700382 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700383 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700384 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700385 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800386 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800387 .chain_noise_scale = 1000,
Jay Sternberge1228372009-01-19 15:30:34 -0800388};
389
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700390struct iwl_cfg iwl6000i_2abg_cfg = {
391 .name = "6000 Series 2x2 ABG",
392 .fw_name_pre = IWL6000_FW_PRE,
393 .ucode_api_max = IWL6000_UCODE_API_MAX,
394 .ucode_api_min = IWL6000_UCODE_API_MIN,
395 .sku = IWL_SKU_A|IWL_SKU_G,
396 .ops = &iwl6000_ops,
397 .eeprom_size = OTP_LOW_IMAGE_SIZE,
398 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
399 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700400 .num_of_queues = IWL50_NUM_QUEUES,
401 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700402 .mod_params = &iwl50_mod_params,
403 .valid_tx_ant = ANT_BC,
404 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700405 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700406 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700407 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700408 .pa_type = IWL_PA_INTERNAL,
409 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
410 .shadow_ram_support = true,
411 .ht_greenfield_support = true,
412 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700413 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700414 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700415 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700416 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800417 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800418 .chain_noise_scale = 1000,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700419};
420
421struct iwl_cfg iwl6000i_2bg_cfg = {
422 .name = "6000 Series 2x2 BG",
423 .fw_name_pre = IWL6000_FW_PRE,
424 .ucode_api_max = IWL6000_UCODE_API_MAX,
425 .ucode_api_min = IWL6000_UCODE_API_MIN,
426 .sku = IWL_SKU_G,
427 .ops = &iwl6000_ops,
428 .eeprom_size = OTP_LOW_IMAGE_SIZE,
429 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
430 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700431 .num_of_queues = IWL50_NUM_QUEUES,
432 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700433 .mod_params = &iwl50_mod_params,
434 .valid_tx_ant = ANT_BC,
435 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700436 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700437 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700438 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700439 .pa_type = IWL_PA_INTERNAL,
440 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
441 .shadow_ram_support = true,
442 .ht_greenfield_support = true,
443 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700444 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700445 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700446 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700447 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800448 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800449 .chain_noise_scale = 1000,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700450};
451
Jay Sternberge1228372009-01-19 15:30:34 -0800452struct iwl_cfg iwl6050_2agn_cfg = {
453 .name = "6050 Series 2x2 AGN",
454 .fw_name_pre = IWL6050_FW_PRE,
455 .ucode_api_max = IWL6050_UCODE_API_MAX,
456 .ucode_api_min = IWL6050_UCODE_API_MIN,
457 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800458 .ops = &iwl6050_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700459 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700460 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Jay Sternberge1228372009-01-19 15:30:34 -0800461 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700462 .num_of_queues = IWL50_NUM_QUEUES,
463 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Jay Sternberge1228372009-01-19 15:30:34 -0800464 .mod_params = &iwl50_mod_params,
Jay Sternberg542cc792009-05-08 13:44:46 -0700465 .valid_tx_ant = ANT_AB,
466 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700467 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700468 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700469 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700470 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700471 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700472 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700473 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700474 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700475 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700476 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700477 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700478 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700479 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800480 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800481 .chain_noise_scale = 1500,
Jay Sternberge1228372009-01-19 15:30:34 -0800482};
483
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700484struct iwl_cfg iwl6050_2abg_cfg = {
485 .name = "6050 Series 2x2 ABG",
486 .fw_name_pre = IWL6050_FW_PRE,
487 .ucode_api_max = IWL6050_UCODE_API_MAX,
488 .ucode_api_min = IWL6050_UCODE_API_MIN,
489 .sku = IWL_SKU_A|IWL_SKU_G,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800490 .ops = &iwl6050_ops,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700491 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700492 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700493 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700494 .num_of_queues = IWL50_NUM_QUEUES,
495 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700496 .mod_params = &iwl50_mod_params,
497 .valid_tx_ant = ANT_AB,
498 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700499 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700500 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700501 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700502 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700503 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700504 .shadow_ram_support = true,
505 .ht_greenfield_support = true,
506 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700507 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700508 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700509 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700510 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800511 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800512 .chain_noise_scale = 1500,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700513};
514
Jay Sternberge1228372009-01-19 15:30:34 -0800515struct iwl_cfg iwl6000_3agn_cfg = {
516 .name = "6000 Series 3x3 AGN",
517 .fw_name_pre = IWL6000_FW_PRE,
518 .ucode_api_max = IWL6000_UCODE_API_MAX,
519 .ucode_api_min = IWL6000_UCODE_API_MIN,
520 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800521 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700522 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700523 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Jay Sternberge1228372009-01-19 15:30:34 -0800524 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700525 .num_of_queues = IWL50_NUM_QUEUES,
526 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Jay Sternberge1228372009-01-19 15:30:34 -0800527 .mod_params = &iwl50_mod_params,
Jay Sternbergc0bac762009-02-02 16:21:14 -0800528 .valid_tx_ant = ANT_ABC,
529 .valid_rx_ant = ANT_ABC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700530 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700531 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700532 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700533 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700534 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
535 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700536 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700537 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700538 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700539 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700540 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700541 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700542 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800543 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800544 .chain_noise_scale = 1000,
Jay Sternberge1228372009-01-19 15:30:34 -0800545};
546
Jay Sternberge1228372009-01-19 15:30:34 -0800547MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
548MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));