blob: f5639b47668a9448d02d07362853ced41eb06799 [file] [log] [blame]
Jay Sternberge1228372009-01-19 15:30:34 -08001/******************************************************************************
2 *
3 * Copyright(c) 2008-2009 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/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 */
55#define IWL6000_UCODE_API_MIN 1
56#define IWL6050_UCODE_API_MIN 1
57
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
Wey-Yi Guy65b79982009-07-31 14:28:07 -070073/* NIC configuration for 6000 series */
74static void iwl6000_nic_config(struct iwl_priv *priv)
75{
Wey-Yi Guy9371d4e2009-09-11 10:38:10 -070076 u16 radio_cfg;
77
78 radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG);
79
80 /* write radio config values to register */
81 if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) <= EEPROM_RF_CONFIG_TYPE_MAX)
82 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
83 EEPROM_RF_CFG_TYPE_MSK(radio_cfg) |
84 EEPROM_RF_CFG_STEP_MSK(radio_cfg) |
85 EEPROM_RF_CFG_DASH_MSK(radio_cfg));
86
87 /* set CSR_HW_CONFIG_REG for uCode use */
88 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
89 CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI |
90 CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);
Wey-Yi Guy65b79982009-07-31 14:28:07 -070091
92 /* no locking required for register write */
93 if (priv->cfg->pa_type == IWL_PA_HYBRID) {
94 /* 2x2 hybrid phy type */
95 iwl_write32(priv, CSR_GP_DRIVER_REG,
96 CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_HYB);
97 } else if (priv->cfg->pa_type == IWL_PA_INTERNAL) {
98 /* 2x2 IPA phy type */
99 iwl_write32(priv, CSR_GP_DRIVER_REG,
100 CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
101 }
102 /* else do nothing, uCode configured */
103}
104
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700105static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
106 .min_nrg_cck = 97,
107 .max_nrg_cck = 0, /* not used, set to 0 */
108 .auto_corr_min_ofdm = 80,
109 .auto_corr_min_ofdm_mrc = 128,
110 .auto_corr_min_ofdm_x1 = 105,
111 .auto_corr_min_ofdm_mrc_x1 = 192,
112
113 .auto_corr_max_ofdm = 145,
114 .auto_corr_max_ofdm_mrc = 232,
115 .auto_corr_max_ofdm_x1 = 145,
116 .auto_corr_max_ofdm_mrc_x1 = 232,
117
118 .auto_corr_min_cck = 125,
119 .auto_corr_max_cck = 175,
120 .auto_corr_min_cck_mrc = 160,
121 .auto_corr_max_cck_mrc = 310,
122 .nrg_th_cck = 97,
123 .nrg_th_ofdm = 100,
Wey-Yi Guy55036d62009-10-09 13:20:24 -0700124
125 .barker_corr_th_min = 190,
126 .barker_corr_th_min_mrc = 390,
127 .nrg_th_cca = 62,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700128};
129
130static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
131{
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700132 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
133 priv->cfg->mod_params->num_of_queues <= IWL50_NUM_QUEUES)
134 priv->cfg->num_of_queues =
135 priv->cfg->mod_params->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700136
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700137 priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700138 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
139 priv->hw_params.scd_bc_tbls_size =
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700140 priv->cfg->num_of_queues *
141 sizeof(struct iwl5000_scd_bc_tbl);
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700142 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
143 priv->hw_params.max_stations = IWL5000_STATION_COUNT;
144 priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
145
146 priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
147 priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
148
149 priv->hw_params.max_bsm_size = 0;
150 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
151 BIT(IEEE80211_BAND_5GHZ);
152 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
153
154 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
155 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
156 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
157 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
158
159 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
160 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
161
162 /* Set initial sensitivity parameters */
163 /* Set initial calibration set */
164 priv->hw_params.sens = &iwl6000_sensitivity;
165 priv->hw_params.calib_init_cfg =
166 BIT(IWL_CALIB_XTAL) |
167 BIT(IWL_CALIB_LO) |
168 BIT(IWL_CALIB_TX_IQ) |
169 BIT(IWL_CALIB_TX_IQ_PERD) |
170 BIT(IWL_CALIB_BASE_BAND);
171
172 return 0;
173}
174
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700175static int iwl6000_hw_channel_switch(struct iwl_priv *priv, u16 channel)
176{
177 struct iwl6000_channel_switch_cmd cmd;
178 const struct iwl_channel_info *ch_info;
179 struct iwl_host_cmd hcmd = {
180 .id = REPLY_CHANNEL_SWITCH,
181 .len = sizeof(cmd),
182 .flags = CMD_SIZE_HUGE,
183 .data = &cmd,
184 };
185
186 IWL_DEBUG_11H(priv, "channel switch from %d to %d\n",
187 priv->active_rxon.channel, channel);
188
189 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
190 cmd.channel = cpu_to_le16(channel);
191 cmd.rxon_flags = priv->active_rxon.flags;
192 cmd.rxon_filter_flags = priv->active_rxon.filter_flags;
193 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
194 ch_info = iwl_get_channel_info(priv, priv->band, channel);
195 if (ch_info)
196 cmd.expect_beacon = is_channel_radar(ch_info);
197 else {
198 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
199 priv->active_rxon.channel, channel);
200 return -EFAULT;
201 }
202
203 return iwl_send_cmd_sync(priv, &hcmd);
204}
205
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700206static struct iwl_lib_ops iwl6000_lib = {
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700207 .set_hw_params = iwl6000_hw_set_hw_params,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700208 .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl,
209 .txq_inval_byte_cnt_tbl = iwl5000_txq_inval_byte_cnt_tbl,
210 .txq_set_sched = iwl5000_txq_set_sched,
211 .txq_agg_enable = iwl5000_txq_agg_enable,
212 .txq_agg_disable = iwl5000_txq_agg_disable,
213 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
214 .txq_free_tfd = iwl_hw_txq_free_tfd,
215 .txq_init = iwl_hw_tx_queue_init,
216 .rx_handler_setup = iwl5000_rx_handler_setup,
217 .setup_deferred_work = iwl5000_setup_deferred_work,
218 .is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr,
219 .load_ucode = iwl5000_load_ucode,
Reinette Chatreb7a79402009-09-25 14:24:23 -0700220 .dump_nic_event_log = iwl_dump_nic_event_log,
221 .dump_nic_error_log = iwl_dump_nic_error_log,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700222 .init_alive_start = iwl5000_init_alive_start,
223 .alive_notify = iwl5000_alive_notify,
224 .send_tx_power = iwl5000_send_tx_power,
225 .update_chain_flags = iwl_update_chain_flags,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700226 .set_channel_switch = iwl6000_hw_channel_switch,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700227 .apm_ops = {
Ben Cahillfadb3582009-10-23 13:42:21 -0700228 .init = iwl_apm_init,
Abhijeet Kolekard68b6032009-10-02 13:44:04 -0700229 .stop = iwl_apm_stop,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700230 .config = iwl6000_nic_config,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700231 .set_pwr_src = iwl_set_pwr_src,
232 },
233 .eeprom_ops = {
234 .regulatory_bands = {
235 EEPROM_5000_REG_BAND_1_CHANNELS,
236 EEPROM_5000_REG_BAND_2_CHANNELS,
237 EEPROM_5000_REG_BAND_3_CHANNELS,
238 EEPROM_5000_REG_BAND_4_CHANNELS,
239 EEPROM_5000_REG_BAND_5_CHANNELS,
Wey-Yi Guy7aafef12009-08-07 15:41:38 -0700240 EEPROM_5000_REG_BAND_24_HT40_CHANNELS,
241 EEPROM_5000_REG_BAND_52_HT40_CHANNELS
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700242 },
243 .verify_signature = iwlcore_eeprom_verify_signature,
244 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
245 .release_semaphore = iwlcore_eeprom_release_semaphore,
246 .calib_version = iwl5000_eeprom_calib_version,
247 .query_addr = iwl5000_eeprom_query_addr,
Wey-Yi Guyab9fd1b2009-08-21 13:34:23 -0700248 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700249 },
250 .post_associate = iwl_post_associate,
251 .isr = iwl_isr_ict,
252 .config_ap = iwl_config_ap,
253 .temp_ops = {
254 .temperature = iwl5000_temperature,
255 .set_ct_kill = iwl6000_set_ct_threshold,
256 },
257};
258
Jay Sternberg29f35c12009-01-29 11:09:16 -0800259static struct iwl_ops iwl6000_ops = {
Jay Sternbergcc0f5552009-07-17 09:30:16 -0700260 .ucode = &iwl5000_ucode,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700261 .lib = &iwl6000_lib,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800262 .hcmd = &iwl5000_hcmd,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700263 .utils = &iwl5000_hcmd_utils,
Johannes Berge932a602009-10-02 13:44:03 -0700264 .led = &iwlagn_led_ops,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800265};
266
Wey-Yi Guy9444b182009-10-16 14:25:57 -0700267static struct iwl_hcmd_utils_ops iwl6050_hcmd_utils = {
268 .get_hcmd_size = iwl5000_get_hcmd_size,
269 .build_addsta_hcmd = iwl5000_build_addsta_hcmd,
270 .rts_tx_cmd_flag = iwl5000_rts_tx_cmd_flag,
271 .calc_rssi = iwl5000_calc_rssi,
272};
273
274static struct iwl_ops iwl6050_ops = {
275 .ucode = &iwl5000_ucode,
276 .lib = &iwl6000_lib,
277 .hcmd = &iwl5000_hcmd,
278 .utils = &iwl6050_hcmd_utils,
279 .led = &iwlagn_led_ops,
280};
281
Jay Sternberge1228372009-01-19 15:30:34 -0800282
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700283/*
284 * "h": Hybrid configuration, use both internal and external Power Amplifier
285 */
286struct iwl_cfg iwl6000h_2agn_cfg = {
Jay Sternberge1228372009-01-19 15:30:34 -0800287 .name = "6000 Series 2x2 AGN",
288 .fw_name_pre = IWL6000_FW_PRE,
289 .ucode_api_max = IWL6000_UCODE_API_MAX,
290 .ucode_api_min = IWL6000_UCODE_API_MIN,
291 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800292 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700293 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700294 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Jay Sternberge1228372009-01-19 15:30:34 -0800295 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700296 .num_of_queues = IWL50_NUM_QUEUES,
297 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Jay Sternberge1228372009-01-19 15:30:34 -0800298 .mod_params = &iwl50_mod_params,
Jay Sternberg542cc792009-05-08 13:44:46 -0700299 .valid_tx_ant = ANT_AB,
300 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700301 .pll_cfg_val = 0,
302 .set_l0s = false,
303 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700304 .pa_type = IWL_PA_HYBRID,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700305 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
306 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700307 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700308 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700309 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700310 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700311 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700312 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700313 .support_ct_kill_exit = true,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700314};
315
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700316struct iwl_cfg iwl6000h_2abg_cfg = {
317 .name = "6000 Series 2x2 ABG",
318 .fw_name_pre = IWL6000_FW_PRE,
319 .ucode_api_max = IWL6000_UCODE_API_MAX,
320 .ucode_api_min = IWL6000_UCODE_API_MIN,
321 .sku = IWL_SKU_A|IWL_SKU_G,
322 .ops = &iwl6000_ops,
323 .eeprom_size = OTP_LOW_IMAGE_SIZE,
324 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
325 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700326 .num_of_queues = IWL50_NUM_QUEUES,
327 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700328 .mod_params = &iwl50_mod_params,
329 .valid_tx_ant = ANT_AB,
330 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700331 .pll_cfg_val = 0,
332 .set_l0s = false,
333 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700334 .pa_type = IWL_PA_HYBRID,
335 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
336 .shadow_ram_support = true,
337 .ht_greenfield_support = true,
338 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700339 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700340 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700341 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700342 .support_ct_kill_exit = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700343};
344
345struct iwl_cfg iwl6000h_2bg_cfg = {
346 .name = "6000 Series 2x2 BG",
347 .fw_name_pre = IWL6000_FW_PRE,
348 .ucode_api_max = IWL6000_UCODE_API_MAX,
349 .ucode_api_min = IWL6000_UCODE_API_MIN,
350 .sku = IWL_SKU_G,
351 .ops = &iwl6000_ops,
352 .eeprom_size = OTP_LOW_IMAGE_SIZE,
353 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
354 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700355 .num_of_queues = IWL50_NUM_QUEUES,
356 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700357 .mod_params = &iwl50_mod_params,
358 .valid_tx_ant = ANT_AB,
359 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700360 .pll_cfg_val = 0,
361 .set_l0s = false,
362 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700363 .pa_type = IWL_PA_HYBRID,
364 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
365 .shadow_ram_support = true,
366 .ht_greenfield_support = true,
367 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700368 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700369 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700370 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700371 .support_ct_kill_exit = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700372};
373
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700374/*
375 * "i": Internal configuration, use internal Power Amplifier
376 */
377struct iwl_cfg iwl6000i_2agn_cfg = {
378 .name = "6000 Series 2x2 AGN",
379 .fw_name_pre = IWL6000_FW_PRE,
380 .ucode_api_max = IWL6000_UCODE_API_MAX,
381 .ucode_api_min = IWL6000_UCODE_API_MIN,
382 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
383 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700384 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700385 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700386 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700387 .num_of_queues = IWL50_NUM_QUEUES,
388 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700389 .mod_params = &iwl50_mod_params,
390 .valid_tx_ant = ANT_BC,
391 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700392 .pll_cfg_val = 0,
393 .set_l0s = false,
394 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700395 .pa_type = IWL_PA_INTERNAL,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700396 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
397 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700398 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700399 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700400 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700401 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700402 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700403 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700404 .support_ct_kill_exit = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800405};
406
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700407struct iwl_cfg iwl6000i_2abg_cfg = {
408 .name = "6000 Series 2x2 ABG",
409 .fw_name_pre = IWL6000_FW_PRE,
410 .ucode_api_max = IWL6000_UCODE_API_MAX,
411 .ucode_api_min = IWL6000_UCODE_API_MIN,
412 .sku = IWL_SKU_A|IWL_SKU_G,
413 .ops = &iwl6000_ops,
414 .eeprom_size = OTP_LOW_IMAGE_SIZE,
415 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
416 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700417 .num_of_queues = IWL50_NUM_QUEUES,
418 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700419 .mod_params = &iwl50_mod_params,
420 .valid_tx_ant = ANT_BC,
421 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700422 .pll_cfg_val = 0,
423 .set_l0s = false,
424 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700425 .pa_type = IWL_PA_INTERNAL,
426 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
427 .shadow_ram_support = true,
428 .ht_greenfield_support = true,
429 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700430 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700431 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700432 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700433 .support_ct_kill_exit = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700434};
435
436struct iwl_cfg iwl6000i_2bg_cfg = {
437 .name = "6000 Series 2x2 BG",
438 .fw_name_pre = IWL6000_FW_PRE,
439 .ucode_api_max = IWL6000_UCODE_API_MAX,
440 .ucode_api_min = IWL6000_UCODE_API_MIN,
441 .sku = IWL_SKU_G,
442 .ops = &iwl6000_ops,
443 .eeprom_size = OTP_LOW_IMAGE_SIZE,
444 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
445 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700446 .num_of_queues = IWL50_NUM_QUEUES,
447 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700448 .mod_params = &iwl50_mod_params,
449 .valid_tx_ant = ANT_BC,
450 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700451 .pll_cfg_val = 0,
452 .set_l0s = false,
453 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700454 .pa_type = IWL_PA_INTERNAL,
455 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
456 .shadow_ram_support = true,
457 .ht_greenfield_support = true,
458 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700459 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700460 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700461 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700462 .support_ct_kill_exit = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700463};
464
Jay Sternberge1228372009-01-19 15:30:34 -0800465struct iwl_cfg iwl6050_2agn_cfg = {
466 .name = "6050 Series 2x2 AGN",
467 .fw_name_pre = IWL6050_FW_PRE,
468 .ucode_api_max = IWL6050_UCODE_API_MAX,
469 .ucode_api_min = IWL6050_UCODE_API_MIN,
470 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Wey-Yi Guy9444b182009-10-16 14:25:57 -0700471 .ops = &iwl6050_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700472 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700473 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Jay Sternberge1228372009-01-19 15:30:34 -0800474 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700475 .num_of_queues = IWL50_NUM_QUEUES,
476 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Jay Sternberge1228372009-01-19 15:30:34 -0800477 .mod_params = &iwl50_mod_params,
Jay Sternberg542cc792009-05-08 13:44:46 -0700478 .valid_tx_ant = ANT_AB,
479 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700480 .pll_cfg_val = 0,
481 .set_l0s = false,
482 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700483 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700484 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700485 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700486 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700487 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700488 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700489 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700490 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700491 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700492 .support_ct_kill_exit = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800493};
494
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700495struct iwl_cfg iwl6050_2abg_cfg = {
496 .name = "6050 Series 2x2 ABG",
497 .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,
Wey-Yi Guy9444b182009-10-16 14:25:57 -0700501 .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,
511 .set_l0s = false,
512 .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,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700522};
523
Jay Sternberge1228372009-01-19 15:30:34 -0800524struct iwl_cfg iwl6000_3agn_cfg = {
525 .name = "6000 Series 3x3 AGN",
526 .fw_name_pre = IWL6000_FW_PRE,
527 .ucode_api_max = IWL6000_UCODE_API_MAX,
528 .ucode_api_min = IWL6000_UCODE_API_MIN,
529 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800530 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700531 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700532 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Jay Sternberge1228372009-01-19 15:30:34 -0800533 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700534 .num_of_queues = IWL50_NUM_QUEUES,
535 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Jay Sternberge1228372009-01-19 15:30:34 -0800536 .mod_params = &iwl50_mod_params,
Jay Sternbergc0bac762009-02-02 16:21:14 -0800537 .valid_tx_ant = ANT_ABC,
538 .valid_rx_ant = ANT_ABC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700539 .pll_cfg_val = 0,
540 .set_l0s = false,
541 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700542 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700543 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
544 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700545 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700546 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700547 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700548 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700549 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700550 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700551 .support_ct_kill_exit = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800552};
553
554struct iwl_cfg iwl6050_3agn_cfg = {
555 .name = "6050 Series 3x3 AGN",
556 .fw_name_pre = IWL6050_FW_PRE,
557 .ucode_api_max = IWL6050_UCODE_API_MAX,
558 .ucode_api_min = IWL6050_UCODE_API_MIN,
559 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Wey-Yi Guy9444b182009-10-16 14:25:57 -0700560 .ops = &iwl6050_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700561 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700562 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Jay Sternberge1228372009-01-19 15:30:34 -0800563 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700564 .num_of_queues = IWL50_NUM_QUEUES,
565 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Jay Sternberge1228372009-01-19 15:30:34 -0800566 .mod_params = &iwl50_mod_params,
Jay Sternbergc0bac762009-02-02 16:21:14 -0800567 .valid_tx_ant = ANT_ABC,
568 .valid_rx_ant = ANT_ABC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700569 .pll_cfg_val = 0,
570 .set_l0s = false,
571 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700572 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700573 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700574 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700575 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700576 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700577 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700578 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700579 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700580 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700581 .support_ct_kill_exit = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800582};
583
584MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
585MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));