blob: aff46b08703add43e15665c06dc34f8426ae5272 [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"
Johannes Berga1175122010-01-21 06:21:10 -080045#include "iwl-agn.h"
Jay Sternberge1228372009-01-19 15:30:34 -080046#include "iwl-helpers.h"
47#include "iwl-5000-hw.h"
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -070048#include "iwl-6000-hw.h"
Johannes Berge932a602009-10-02 13:44:03 -070049#include "iwl-agn-led.h"
Jay Sternberge1228372009-01-19 15:30:34 -080050
51/* Highest firmware API version supported */
Wey-Yi Guyfcbaf8b2009-08-21 13:34:18 -070052#define IWL6000_UCODE_API_MAX 4
53#define IWL6050_UCODE_API_MAX 4
Jay Sternberge1228372009-01-19 15:30:34 -080054
55/* Lowest firmware API version supported */
Wey-Yi Guy44246422009-10-23 13:42:34 -070056#define IWL6000_UCODE_API_MIN 4
57#define IWL6050_UCODE_API_MIN 4
Jay Sternberge1228372009-01-19 15:30:34 -080058
59#define IWL6000_FW_PRE "iwlwifi-6000-"
60#define _IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE #api ".ucode"
61#define IWL6000_MODULE_FIRMWARE(api) _IWL6000_MODULE_FIRMWARE(api)
62
63#define IWL6050_FW_PRE "iwlwifi-6050-"
64#define _IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE #api ".ucode"
65#define IWL6050_MODULE_FIRMWARE(api) _IWL6050_MODULE_FIRMWARE(api)
66
Wey-Yi Guy672639d2009-07-24 11:13:01 -070067static void iwl6000_set_ct_threshold(struct iwl_priv *priv)
68{
69 /* want Celsius */
70 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD;
71 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
72}
73
Abhijeet Kolekard5755932010-02-18 22:03:05 -080074/* Indicate calibration version to uCode. */
75static void iwl6050_set_calib_version(struct iwl_priv *priv)
76{
77 if (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6)
78 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
79 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
80}
81
Wey-Yi Guy65b79982009-07-31 14:28:07 -070082/* NIC configuration for 6000 series */
83static void iwl6000_nic_config(struct iwl_priv *priv)
84{
Wey-Yi Guy9371d4e2009-09-11 10:38:10 -070085 u16 radio_cfg;
86
87 radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG);
88
89 /* write radio config values to register */
90 if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) <= EEPROM_RF_CONFIG_TYPE_MAX)
91 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
92 EEPROM_RF_CFG_TYPE_MSK(radio_cfg) |
93 EEPROM_RF_CFG_STEP_MSK(radio_cfg) |
94 EEPROM_RF_CFG_DASH_MSK(radio_cfg));
95
96 /* set CSR_HW_CONFIG_REG for uCode use */
97 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
98 CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI |
99 CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700100
101 /* no locking required for register write */
Wey-Yi Guy740e7f52009-11-06 14:52:55 -0800102 if (priv->cfg->pa_type == IWL_PA_INTERNAL) {
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700103 /* 2x2 IPA phy type */
104 iwl_write32(priv, CSR_GP_DRIVER_REG,
105 CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
106 }
107 /* else do nothing, uCode configured */
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800108 if (priv->cfg->ops->lib->temp_ops.set_calib_version)
109 priv->cfg->ops->lib->temp_ops.set_calib_version(priv);
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700110}
111
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700112static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
113 .min_nrg_cck = 97,
114 .max_nrg_cck = 0, /* not used, set to 0 */
115 .auto_corr_min_ofdm = 80,
116 .auto_corr_min_ofdm_mrc = 128,
117 .auto_corr_min_ofdm_x1 = 105,
118 .auto_corr_min_ofdm_mrc_x1 = 192,
119
120 .auto_corr_max_ofdm = 145,
121 .auto_corr_max_ofdm_mrc = 232,
Wey-Yi Guy2494f632010-01-20 12:22:52 -0800122 .auto_corr_max_ofdm_x1 = 110,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700123 .auto_corr_max_ofdm_mrc_x1 = 232,
124
125 .auto_corr_min_cck = 125,
126 .auto_corr_max_cck = 175,
127 .auto_corr_min_cck_mrc = 160,
128 .auto_corr_max_cck_mrc = 310,
129 .nrg_th_cck = 97,
130 .nrg_th_ofdm = 100,
Wey-Yi Guy55036d62009-10-09 13:20:24 -0700131
132 .barker_corr_th_min = 190,
133 .barker_corr_th_min_mrc = 390,
134 .nrg_th_cca = 62,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700135};
136
137static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
138{
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700139 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
140 priv->cfg->mod_params->num_of_queues <= IWL50_NUM_QUEUES)
141 priv->cfg->num_of_queues =
142 priv->cfg->mod_params->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700143
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700144 priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700145 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
146 priv->hw_params.scd_bc_tbls_size =
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700147 priv->cfg->num_of_queues *
148 sizeof(struct iwl5000_scd_bc_tbl);
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700149 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
150 priv->hw_params.max_stations = IWL5000_STATION_COUNT;
151 priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
152
153 priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
154 priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
155
156 priv->hw_params.max_bsm_size = 0;
157 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
158 BIT(IEEE80211_BAND_5GHZ);
159 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
160
161 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
162 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
163 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
164 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
165
166 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
167 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
168
169 /* Set initial sensitivity parameters */
170 /* Set initial calibration set */
171 priv->hw_params.sens = &iwl6000_sensitivity;
Abhijeet Kolekar07f33f92010-01-22 14:22:47 -0800172 switch (priv->hw_rev & CSR_HW_REV_TYPE_MSK) {
173 case CSR_HW_REV_TYPE_6x50:
174 priv->hw_params.calib_init_cfg =
175 BIT(IWL_CALIB_XTAL) |
176 BIT(IWL_CALIB_DC) |
177 BIT(IWL_CALIB_LO) |
178 BIT(IWL_CALIB_TX_IQ) |
179 BIT(IWL_CALIB_BASE_BAND);
180
181 break;
182 default:
183 priv->hw_params.calib_init_cfg =
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700184 BIT(IWL_CALIB_XTAL) |
185 BIT(IWL_CALIB_LO) |
186 BIT(IWL_CALIB_TX_IQ) |
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700187 BIT(IWL_CALIB_BASE_BAND);
Abhijeet Kolekar07f33f92010-01-22 14:22:47 -0800188 break;
189 }
190
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700191 return 0;
192}
193
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700194static int iwl6000_hw_channel_switch(struct iwl_priv *priv, u16 channel)
195{
196 struct iwl6000_channel_switch_cmd cmd;
197 const struct iwl_channel_info *ch_info;
198 struct iwl_host_cmd hcmd = {
199 .id = REPLY_CHANNEL_SWITCH,
200 .len = sizeof(cmd),
201 .flags = CMD_SIZE_HUGE,
202 .data = &cmd,
203 };
204
205 IWL_DEBUG_11H(priv, "channel switch from %d to %d\n",
206 priv->active_rxon.channel, channel);
207
208 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
209 cmd.channel = cpu_to_le16(channel);
Wey-Yi Guy0924e512009-11-06 14:52:54 -0800210 cmd.rxon_flags = priv->staging_rxon.flags;
211 cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700212 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
213 ch_info = iwl_get_channel_info(priv, priv->band, channel);
214 if (ch_info)
215 cmd.expect_beacon = is_channel_radar(ch_info);
216 else {
217 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
218 priv->active_rxon.channel, channel);
219 return -EFAULT;
220 }
Wey-Yi Guy0924e512009-11-06 14:52:54 -0800221 priv->switch_rxon.channel = cpu_to_le16(channel);
222 priv->switch_rxon.switch_in_progress = true;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700223
224 return iwl_send_cmd_sync(priv, &hcmd);
225}
226
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700227static struct iwl_lib_ops iwl6000_lib = {
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700228 .set_hw_params = iwl6000_hw_set_hw_params,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700229 .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl,
230 .txq_inval_byte_cnt_tbl = iwl5000_txq_inval_byte_cnt_tbl,
231 .txq_set_sched = iwl5000_txq_set_sched,
232 .txq_agg_enable = iwl5000_txq_agg_enable,
233 .txq_agg_disable = iwl5000_txq_agg_disable,
234 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
235 .txq_free_tfd = iwl_hw_txq_free_tfd,
236 .txq_init = iwl_hw_tx_queue_init,
237 .rx_handler_setup = iwl5000_rx_handler_setup,
238 .setup_deferred_work = iwl5000_setup_deferred_work,
239 .is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr,
Wey-Yi Guy81b81762010-03-16 10:23:30 -0700240 .load_ucode = iwlagn_load_ucode,
Reinette Chatreb7a79402009-09-25 14:24:23 -0700241 .dump_nic_event_log = iwl_dump_nic_event_log,
242 .dump_nic_error_log = iwl_dump_nic_error_log,
Wey-Yi Guy696bdee2009-12-10 14:37:25 -0800243 .dump_csr = iwl_dump_csr,
Wey-Yi Guy1b3eb822010-01-15 13:43:39 -0800244 .dump_fh = iwl_dump_fh,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700245 .init_alive_start = iwl5000_init_alive_start,
246 .alive_notify = iwl5000_alive_notify,
247 .send_tx_power = iwl5000_send_tx_power,
248 .update_chain_flags = iwl_update_chain_flags,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700249 .set_channel_switch = iwl6000_hw_channel_switch,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700250 .apm_ops = {
Ben Cahillfadb3582009-10-23 13:42:21 -0700251 .init = iwl_apm_init,
Abhijeet Kolekard68b6032009-10-02 13:44:04 -0700252 .stop = iwl_apm_stop,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700253 .config = iwl6000_nic_config,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700254 .set_pwr_src = iwl_set_pwr_src,
255 },
256 .eeprom_ops = {
257 .regulatory_bands = {
258 EEPROM_5000_REG_BAND_1_CHANNELS,
259 EEPROM_5000_REG_BAND_2_CHANNELS,
260 EEPROM_5000_REG_BAND_3_CHANNELS,
261 EEPROM_5000_REG_BAND_4_CHANNELS,
262 EEPROM_5000_REG_BAND_5_CHANNELS,
Wey-Yi Guy7aafef12009-08-07 15:41:38 -0700263 EEPROM_5000_REG_BAND_24_HT40_CHANNELS,
264 EEPROM_5000_REG_BAND_52_HT40_CHANNELS
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700265 },
266 .verify_signature = iwlcore_eeprom_verify_signature,
267 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
268 .release_semaphore = iwlcore_eeprom_release_semaphore,
269 .calib_version = iwl5000_eeprom_calib_version,
270 .query_addr = iwl5000_eeprom_query_addr,
Wey-Yi Guyab9fd1b2009-08-21 13:34:23 -0700271 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700272 },
273 .post_associate = iwl_post_associate,
274 .isr = iwl_isr_ict,
275 .config_ap = iwl_config_ap,
276 .temp_ops = {
277 .temperature = iwl5000_temperature,
278 .set_ct_kill = iwl6000_set_ct_threshold,
279 },
Reinette Chatre3459ab52010-01-22 14:22:49 -0800280 .add_bcast_station = iwl_add_bcast_station,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800281 .recover_from_tx_stall = iwl_bg_monitor_recover,
Wey-Yi Guyfa8f1302010-03-05 14:22:46 -0800282 .check_plcp_health = iwl_good_plcp_health,
283 .check_ack_health = iwl_good_ack_health,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700284};
285
Emese Revfy45d5d802009-12-14 00:59:53 +0100286static const struct iwl_ops iwl6000_ops = {
Wey-Yi Guy792bc3c2010-03-16 10:23:29 -0700287 .ucode = &iwlagn_ucode,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700288 .lib = &iwl6000_lib,
Wey-Yi Guy7dc77db2010-03-16 10:23:31 -0700289 .hcmd = &iwlagn_hcmd,
290 .utils = &iwlagn_hcmd_utils,
Johannes Berge932a602009-10-02 13:44:03 -0700291 .led = &iwlagn_led_ops,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800292};
293
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800294static struct iwl_lib_ops iwl6050_lib = {
295 .set_hw_params = iwl6000_hw_set_hw_params,
296 .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl,
297 .txq_inval_byte_cnt_tbl = iwl5000_txq_inval_byte_cnt_tbl,
298 .txq_set_sched = iwl5000_txq_set_sched,
299 .txq_agg_enable = iwl5000_txq_agg_enable,
300 .txq_agg_disable = iwl5000_txq_agg_disable,
301 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
302 .txq_free_tfd = iwl_hw_txq_free_tfd,
303 .txq_init = iwl_hw_tx_queue_init,
304 .rx_handler_setup = iwl5000_rx_handler_setup,
305 .setup_deferred_work = iwl5000_setup_deferred_work,
306 .is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr,
Wey-Yi Guy81b81762010-03-16 10:23:30 -0700307 .load_ucode = iwlagn_load_ucode,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800308 .dump_nic_event_log = iwl_dump_nic_event_log,
309 .dump_nic_error_log = iwl_dump_nic_error_log,
310 .dump_csr = iwl_dump_csr,
311 .dump_fh = iwl_dump_fh,
312 .init_alive_start = iwl5000_init_alive_start,
313 .alive_notify = iwl5000_alive_notify,
314 .send_tx_power = iwl5000_send_tx_power,
315 .update_chain_flags = iwl_update_chain_flags,
316 .set_channel_switch = iwl6000_hw_channel_switch,
317 .apm_ops = {
318 .init = iwl_apm_init,
319 .stop = iwl_apm_stop,
320 .config = iwl6000_nic_config,
321 .set_pwr_src = iwl_set_pwr_src,
322 },
323 .eeprom_ops = {
324 .regulatory_bands = {
325 EEPROM_5000_REG_BAND_1_CHANNELS,
326 EEPROM_5000_REG_BAND_2_CHANNELS,
327 EEPROM_5000_REG_BAND_3_CHANNELS,
328 EEPROM_5000_REG_BAND_4_CHANNELS,
329 EEPROM_5000_REG_BAND_5_CHANNELS,
330 EEPROM_5000_REG_BAND_24_HT40_CHANNELS,
331 EEPROM_5000_REG_BAND_52_HT40_CHANNELS
332 },
333 .verify_signature = iwlcore_eeprom_verify_signature,
334 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
335 .release_semaphore = iwlcore_eeprom_release_semaphore,
336 .calib_version = iwl5000_eeprom_calib_version,
337 .query_addr = iwl5000_eeprom_query_addr,
338 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
339 },
340 .post_associate = iwl_post_associate,
341 .isr = iwl_isr_ict,
342 .config_ap = iwl_config_ap,
343 .temp_ops = {
344 .temperature = iwl5000_temperature,
345 .set_ct_kill = iwl6000_set_ct_threshold,
346 .set_calib_version = iwl6050_set_calib_version,
347 },
348 .add_bcast_station = iwl_add_bcast_station,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800349 .recover_from_tx_stall = iwl_bg_monitor_recover,
Wey-Yi Guyfa8f1302010-03-05 14:22:46 -0800350 .check_plcp_health = iwl_good_plcp_health,
351 .check_ack_health = iwl_good_ack_health,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800352};
353
354static const struct iwl_ops iwl6050_ops = {
Wey-Yi Guy792bc3c2010-03-16 10:23:29 -0700355 .ucode = &iwlagn_ucode,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800356 .lib = &iwl6050_lib,
Wey-Yi Guy7dc77db2010-03-16 10:23:31 -0700357 .hcmd = &iwlagn_hcmd,
358 .utils = &iwlagn_hcmd_utils,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800359 .led = &iwlagn_led_ops,
360};
361
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700362/*
363 * "i": Internal configuration, use internal Power Amplifier
364 */
365struct iwl_cfg iwl6000i_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800366 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700367 .fw_name_pre = IWL6000_FW_PRE,
368 .ucode_api_max = IWL6000_UCODE_API_MAX,
369 .ucode_api_min = IWL6000_UCODE_API_MIN,
370 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
371 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700372 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700373 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700374 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700375 .num_of_queues = IWL50_NUM_QUEUES,
376 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700377 .mod_params = &iwl50_mod_params,
378 .valid_tx_ant = ANT_BC,
379 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700380 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700381 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700382 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700383 .pa_type = IWL_PA_INTERNAL,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700384 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
385 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700386 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700387 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700388 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700389 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700390 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700391 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700392 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800393 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800394 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800395 .monitor_recover_period = IWL_MONITORING_PERIOD,
Jay Sternberge1228372009-01-19 15:30:34 -0800396};
397
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700398struct iwl_cfg iwl6000i_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800399 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700400 .fw_name_pre = IWL6000_FW_PRE,
401 .ucode_api_max = IWL6000_UCODE_API_MAX,
402 .ucode_api_min = IWL6000_UCODE_API_MIN,
403 .sku = IWL_SKU_A|IWL_SKU_G,
404 .ops = &iwl6000_ops,
405 .eeprom_size = OTP_LOW_IMAGE_SIZE,
406 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
407 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700408 .num_of_queues = IWL50_NUM_QUEUES,
409 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700410 .mod_params = &iwl50_mod_params,
411 .valid_tx_ant = ANT_BC,
412 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700413 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700414 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700415 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700416 .pa_type = IWL_PA_INTERNAL,
417 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
418 .shadow_ram_support = true,
419 .ht_greenfield_support = true,
420 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700421 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700422 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700423 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700424 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800425 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800426 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800427 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700428};
429
430struct iwl_cfg iwl6000i_2bg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800431 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700432 .fw_name_pre = IWL6000_FW_PRE,
433 .ucode_api_max = IWL6000_UCODE_API_MAX,
434 .ucode_api_min = IWL6000_UCODE_API_MIN,
435 .sku = IWL_SKU_G,
436 .ops = &iwl6000_ops,
437 .eeprom_size = OTP_LOW_IMAGE_SIZE,
438 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
439 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700440 .num_of_queues = IWL50_NUM_QUEUES,
441 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700442 .mod_params = &iwl50_mod_params,
443 .valid_tx_ant = ANT_BC,
444 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700445 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700446 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700447 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700448 .pa_type = IWL_PA_INTERNAL,
449 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
450 .shadow_ram_support = true,
451 .ht_greenfield_support = true,
452 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700453 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700454 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700455 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700456 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800457 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800458 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800459 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700460};
461
Jay Sternberge1228372009-01-19 15:30:34 -0800462struct iwl_cfg iwl6050_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800463 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800464 .fw_name_pre = IWL6050_FW_PRE,
465 .ucode_api_max = IWL6050_UCODE_API_MAX,
466 .ucode_api_min = IWL6050_UCODE_API_MIN,
467 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800468 .ops = &iwl6050_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700469 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700470 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Jay Sternberge1228372009-01-19 15:30:34 -0800471 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700472 .num_of_queues = IWL50_NUM_QUEUES,
473 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Jay Sternberge1228372009-01-19 15:30:34 -0800474 .mod_params = &iwl50_mod_params,
Jay Sternberg542cc792009-05-08 13:44:46 -0700475 .valid_tx_ant = ANT_AB,
476 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700477 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700478 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700479 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700480 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700481 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700482 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700483 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700484 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700485 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700486 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700487 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700488 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700489 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800490 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800491 .chain_noise_scale = 1500,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800492 .monitor_recover_period = IWL_MONITORING_PERIOD,
Jay Sternberge1228372009-01-19 15:30:34 -0800493};
494
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700495struct iwl_cfg iwl6050_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800496 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700497 .fw_name_pre = IWL6050_FW_PRE,
498 .ucode_api_max = IWL6050_UCODE_API_MAX,
499 .ucode_api_min = IWL6050_UCODE_API_MIN,
500 .sku = IWL_SKU_A|IWL_SKU_G,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800501 .ops = &iwl6050_ops,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700502 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700503 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700504 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700505 .num_of_queues = IWL50_NUM_QUEUES,
506 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700507 .mod_params = &iwl50_mod_params,
508 .valid_tx_ant = ANT_AB,
509 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700510 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700511 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700512 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700513 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700514 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700515 .shadow_ram_support = true,
516 .ht_greenfield_support = true,
517 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700518 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700519 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700520 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700521 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800522 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800523 .chain_noise_scale = 1500,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800524 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700525};
526
Jay Sternberge1228372009-01-19 15:30:34 -0800527struct iwl_cfg iwl6000_3agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800528 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800529 .fw_name_pre = IWL6000_FW_PRE,
530 .ucode_api_max = IWL6000_UCODE_API_MAX,
531 .ucode_api_min = IWL6000_UCODE_API_MIN,
532 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800533 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700534 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700535 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Jay Sternberge1228372009-01-19 15:30:34 -0800536 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700537 .num_of_queues = IWL50_NUM_QUEUES,
538 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Jay Sternberge1228372009-01-19 15:30:34 -0800539 .mod_params = &iwl50_mod_params,
Jay Sternbergc0bac762009-02-02 16:21:14 -0800540 .valid_tx_ant = ANT_ABC,
541 .valid_rx_ant = ANT_ABC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700542 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700543 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700544 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700545 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700546 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
547 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700548 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700549 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700550 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700551 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700552 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700553 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700554 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800555 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800556 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800557 .monitor_recover_period = IWL_MONITORING_PERIOD,
Jay Sternberge1228372009-01-19 15:30:34 -0800558};
559
Jay Sternberge1228372009-01-19 15:30:34 -0800560MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
561MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));