blob: f732f6d194a044ee97ab6223ec08de03c2a7b66e [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 */
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
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 */
Wey-Yi Guy740e7f52009-11-06 14:52:55 -080093 if (priv->cfg->pa_type == IWL_PA_INTERNAL) {
Wey-Yi Guy65b79982009-07-31 14:28:07 -070094 /* 2x2 IPA phy type */
95 iwl_write32(priv, CSR_GP_DRIVER_REG,
96 CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
97 }
98 /* else do nothing, uCode configured */
99}
100
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700101static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
102 .min_nrg_cck = 97,
103 .max_nrg_cck = 0, /* not used, set to 0 */
104 .auto_corr_min_ofdm = 80,
105 .auto_corr_min_ofdm_mrc = 128,
106 .auto_corr_min_ofdm_x1 = 105,
107 .auto_corr_min_ofdm_mrc_x1 = 192,
108
109 .auto_corr_max_ofdm = 145,
110 .auto_corr_max_ofdm_mrc = 232,
111 .auto_corr_max_ofdm_x1 = 145,
112 .auto_corr_max_ofdm_mrc_x1 = 232,
113
114 .auto_corr_min_cck = 125,
115 .auto_corr_max_cck = 175,
116 .auto_corr_min_cck_mrc = 160,
117 .auto_corr_max_cck_mrc = 310,
118 .nrg_th_cck = 97,
119 .nrg_th_ofdm = 100,
Wey-Yi Guy55036d62009-10-09 13:20:24 -0700120
121 .barker_corr_th_min = 190,
122 .barker_corr_th_min_mrc = 390,
123 .nrg_th_cca = 62,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700124};
125
126static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
127{
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700128 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
129 priv->cfg->mod_params->num_of_queues <= IWL50_NUM_QUEUES)
130 priv->cfg->num_of_queues =
131 priv->cfg->mod_params->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700132
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700133 priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700134 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
135 priv->hw_params.scd_bc_tbls_size =
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700136 priv->cfg->num_of_queues *
137 sizeof(struct iwl5000_scd_bc_tbl);
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700138 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
139 priv->hw_params.max_stations = IWL5000_STATION_COUNT;
140 priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
141
142 priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
143 priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
144
145 priv->hw_params.max_bsm_size = 0;
146 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
147 BIT(IEEE80211_BAND_5GHZ);
148 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
149
150 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
151 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
152 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
153 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
154
155 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
156 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
157
158 /* Set initial sensitivity parameters */
159 /* Set initial calibration set */
160 priv->hw_params.sens = &iwl6000_sensitivity;
161 priv->hw_params.calib_init_cfg =
162 BIT(IWL_CALIB_XTAL) |
163 BIT(IWL_CALIB_LO) |
164 BIT(IWL_CALIB_TX_IQ) |
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700165 BIT(IWL_CALIB_BASE_BAND);
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700166 return 0;
167}
168
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700169static int iwl6000_hw_channel_switch(struct iwl_priv *priv, u16 channel)
170{
171 struct iwl6000_channel_switch_cmd cmd;
172 const struct iwl_channel_info *ch_info;
173 struct iwl_host_cmd hcmd = {
174 .id = REPLY_CHANNEL_SWITCH,
175 .len = sizeof(cmd),
176 .flags = CMD_SIZE_HUGE,
177 .data = &cmd,
178 };
179
180 IWL_DEBUG_11H(priv, "channel switch from %d to %d\n",
181 priv->active_rxon.channel, channel);
182
183 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
184 cmd.channel = cpu_to_le16(channel);
Wey-Yi Guy0924e5192009-11-06 14:52:54 -0800185 cmd.rxon_flags = priv->staging_rxon.flags;
186 cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700187 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
188 ch_info = iwl_get_channel_info(priv, priv->band, channel);
189 if (ch_info)
190 cmd.expect_beacon = is_channel_radar(ch_info);
191 else {
192 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
193 priv->active_rxon.channel, channel);
194 return -EFAULT;
195 }
Wey-Yi Guy0924e5192009-11-06 14:52:54 -0800196 priv->switch_rxon.channel = cpu_to_le16(channel);
197 priv->switch_rxon.switch_in_progress = true;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700198
199 return iwl_send_cmd_sync(priv, &hcmd);
200}
201
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700202static struct iwl_lib_ops iwl6000_lib = {
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700203 .set_hw_params = iwl6000_hw_set_hw_params,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700204 .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl,
205 .txq_inval_byte_cnt_tbl = iwl5000_txq_inval_byte_cnt_tbl,
206 .txq_set_sched = iwl5000_txq_set_sched,
207 .txq_agg_enable = iwl5000_txq_agg_enable,
208 .txq_agg_disable = iwl5000_txq_agg_disable,
209 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
210 .txq_free_tfd = iwl_hw_txq_free_tfd,
211 .txq_init = iwl_hw_tx_queue_init,
212 .rx_handler_setup = iwl5000_rx_handler_setup,
213 .setup_deferred_work = iwl5000_setup_deferred_work,
214 .is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr,
215 .load_ucode = iwl5000_load_ucode,
Reinette Chatreb7a79402009-09-25 14:24:23 -0700216 .dump_nic_event_log = iwl_dump_nic_event_log,
217 .dump_nic_error_log = iwl_dump_nic_error_log,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700218 .init_alive_start = iwl5000_init_alive_start,
219 .alive_notify = iwl5000_alive_notify,
220 .send_tx_power = iwl5000_send_tx_power,
221 .update_chain_flags = iwl_update_chain_flags,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700222 .set_channel_switch = iwl6000_hw_channel_switch,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700223 .apm_ops = {
Ben Cahillfadb3582009-10-23 13:42:21 -0700224 .init = iwl_apm_init,
Abhijeet Kolekard68b6032009-10-02 13:44:04 -0700225 .stop = iwl_apm_stop,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700226 .config = iwl6000_nic_config,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700227 .set_pwr_src = iwl_set_pwr_src,
228 },
229 .eeprom_ops = {
230 .regulatory_bands = {
231 EEPROM_5000_REG_BAND_1_CHANNELS,
232 EEPROM_5000_REG_BAND_2_CHANNELS,
233 EEPROM_5000_REG_BAND_3_CHANNELS,
234 EEPROM_5000_REG_BAND_4_CHANNELS,
235 EEPROM_5000_REG_BAND_5_CHANNELS,
Wey-Yi Guy7aafef12009-08-07 15:41:38 -0700236 EEPROM_5000_REG_BAND_24_HT40_CHANNELS,
237 EEPROM_5000_REG_BAND_52_HT40_CHANNELS
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700238 },
239 .verify_signature = iwlcore_eeprom_verify_signature,
240 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
241 .release_semaphore = iwlcore_eeprom_release_semaphore,
242 .calib_version = iwl5000_eeprom_calib_version,
243 .query_addr = iwl5000_eeprom_query_addr,
Wey-Yi Guyab9fd1b2009-08-21 13:34:23 -0700244 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700245 },
246 .post_associate = iwl_post_associate,
247 .isr = iwl_isr_ict,
248 .config_ap = iwl_config_ap,
249 .temp_ops = {
250 .temperature = iwl5000_temperature,
251 .set_ct_kill = iwl6000_set_ct_threshold,
252 },
253};
254
Jay Sternberg29f35c12009-01-29 11:09:16 -0800255static struct iwl_ops iwl6000_ops = {
Jay Sternbergcc0f5552009-07-17 09:30:16 -0700256 .ucode = &iwl5000_ucode,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700257 .lib = &iwl6000_lib,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800258 .hcmd = &iwl5000_hcmd,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700259 .utils = &iwl5000_hcmd_utils,
Johannes Berge932a602009-10-02 13:44:03 -0700260 .led = &iwlagn_led_ops,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800261};
262
Wey-Yi Guy9444b182009-10-16 14:25:57 -0700263static struct iwl_hcmd_utils_ops iwl6050_hcmd_utils = {
264 .get_hcmd_size = iwl5000_get_hcmd_size,
265 .build_addsta_hcmd = iwl5000_build_addsta_hcmd,
266 .rts_tx_cmd_flag = iwl5000_rts_tx_cmd_flag,
267 .calc_rssi = iwl5000_calc_rssi,
268};
269
270static struct iwl_ops iwl6050_ops = {
271 .ucode = &iwl5000_ucode,
272 .lib = &iwl6000_lib,
273 .hcmd = &iwl5000_hcmd,
274 .utils = &iwl6050_hcmd_utils,
275 .led = &iwlagn_led_ops,
276};
277
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700278/*
279 * "i": Internal configuration, use internal Power Amplifier
280 */
281struct iwl_cfg iwl6000i_2agn_cfg = {
282 .name = "6000 Series 2x2 AGN",
283 .fw_name_pre = IWL6000_FW_PRE,
284 .ucode_api_max = IWL6000_UCODE_API_MAX,
285 .ucode_api_min = IWL6000_UCODE_API_MIN,
286 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
287 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700288 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700289 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700290 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700291 .num_of_queues = IWL50_NUM_QUEUES,
292 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700293 .mod_params = &iwl50_mod_params,
294 .valid_tx_ant = ANT_BC,
295 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700296 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700297 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700298 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700299 .pa_type = IWL_PA_INTERNAL,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700300 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
301 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700302 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700303 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700304 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700305 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700306 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700307 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700308 .support_ct_kill_exit = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800309};
310
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700311struct iwl_cfg iwl6000i_2abg_cfg = {
312 .name = "6000 Series 2x2 ABG",
313 .fw_name_pre = IWL6000_FW_PRE,
314 .ucode_api_max = IWL6000_UCODE_API_MAX,
315 .ucode_api_min = IWL6000_UCODE_API_MIN,
316 .sku = IWL_SKU_A|IWL_SKU_G,
317 .ops = &iwl6000_ops,
318 .eeprom_size = OTP_LOW_IMAGE_SIZE,
319 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
320 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700321 .num_of_queues = IWL50_NUM_QUEUES,
322 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700323 .mod_params = &iwl50_mod_params,
324 .valid_tx_ant = ANT_BC,
325 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700326 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700327 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700328 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700329 .pa_type = IWL_PA_INTERNAL,
330 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
331 .shadow_ram_support = true,
332 .ht_greenfield_support = true,
333 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700334 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700335 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700336 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700337 .support_ct_kill_exit = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700338};
339
340struct iwl_cfg iwl6000i_2bg_cfg = {
341 .name = "6000 Series 2x2 BG",
342 .fw_name_pre = IWL6000_FW_PRE,
343 .ucode_api_max = IWL6000_UCODE_API_MAX,
344 .ucode_api_min = IWL6000_UCODE_API_MIN,
345 .sku = IWL_SKU_G,
346 .ops = &iwl6000_ops,
347 .eeprom_size = OTP_LOW_IMAGE_SIZE,
348 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
349 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700350 .num_of_queues = IWL50_NUM_QUEUES,
351 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700352 .mod_params = &iwl50_mod_params,
353 .valid_tx_ant = ANT_BC,
354 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700355 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700356 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700357 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700358 .pa_type = IWL_PA_INTERNAL,
359 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
360 .shadow_ram_support = true,
361 .ht_greenfield_support = true,
362 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700363 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700364 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700365 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700366 .support_ct_kill_exit = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700367};
368
Jay Sternberge1228372009-01-19 15:30:34 -0800369struct iwl_cfg iwl6050_2agn_cfg = {
370 .name = "6050 Series 2x2 AGN",
371 .fw_name_pre = IWL6050_FW_PRE,
372 .ucode_api_max = IWL6050_UCODE_API_MAX,
373 .ucode_api_min = IWL6050_UCODE_API_MIN,
374 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Wey-Yi Guy9444b182009-10-16 14:25:57 -0700375 .ops = &iwl6050_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700376 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700377 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Jay Sternberge1228372009-01-19 15:30:34 -0800378 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700379 .num_of_queues = IWL50_NUM_QUEUES,
380 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Jay Sternberge1228372009-01-19 15:30:34 -0800381 .mod_params = &iwl50_mod_params,
Jay Sternberg542cc792009-05-08 13:44:46 -0700382 .valid_tx_ant = ANT_AB,
383 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700384 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700385 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700386 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700387 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700388 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700389 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700390 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700391 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700392 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700393 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700394 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700395 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700396 .support_ct_kill_exit = true,
Wey-Yi Guy3f3e0372009-10-30 14:36:17 -0700397 .support_sm_ps = true,
Wey-Yi Guy1933ac42009-10-30 14:36:18 -0700398 .support_wimax_coexist = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800399};
400
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700401struct iwl_cfg iwl6050_2abg_cfg = {
402 .name = "6050 Series 2x2 ABG",
403 .fw_name_pre = IWL6050_FW_PRE,
404 .ucode_api_max = IWL6050_UCODE_API_MAX,
405 .ucode_api_min = IWL6050_UCODE_API_MIN,
406 .sku = IWL_SKU_A|IWL_SKU_G,
Wey-Yi Guy9444b182009-10-16 14:25:57 -0700407 .ops = &iwl6050_ops,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700408 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700409 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700410 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700411 .num_of_queues = IWL50_NUM_QUEUES,
412 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700413 .mod_params = &iwl50_mod_params,
414 .valid_tx_ant = ANT_AB,
415 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700416 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700417 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700418 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700419 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700420 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700421 .shadow_ram_support = true,
422 .ht_greenfield_support = true,
423 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700424 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700425 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700426 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700427 .support_ct_kill_exit = true,
Wey-Yi Guy1933ac42009-10-30 14:36:18 -0700428 .support_wimax_coexist = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700429};
430
Jay Sternberge1228372009-01-19 15:30:34 -0800431struct iwl_cfg iwl6000_3agn_cfg = {
432 .name = "6000 Series 3x3 AGN",
433 .fw_name_pre = IWL6000_FW_PRE,
434 .ucode_api_max = IWL6000_UCODE_API_MAX,
435 .ucode_api_min = IWL6000_UCODE_API_MIN,
436 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800437 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700438 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700439 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Jay Sternberge1228372009-01-19 15:30:34 -0800440 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700441 .num_of_queues = IWL50_NUM_QUEUES,
442 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Jay Sternberge1228372009-01-19 15:30:34 -0800443 .mod_params = &iwl50_mod_params,
Jay Sternbergc0bac762009-02-02 16:21:14 -0800444 .valid_tx_ant = ANT_ABC,
445 .valid_rx_ant = ANT_ABC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700446 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700447 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700448 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700449 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700450 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
451 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700452 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700453 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700454 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700455 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700456 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700457 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700458 .support_ct_kill_exit = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800459};
460
461struct iwl_cfg iwl6050_3agn_cfg = {
462 .name = "6050 Series 3x3 AGN",
463 .fw_name_pre = IWL6050_FW_PRE,
464 .ucode_api_max = IWL6050_UCODE_API_MAX,
465 .ucode_api_min = IWL6050_UCODE_API_MIN,
466 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Wey-Yi Guy9444b182009-10-16 14:25:57 -0700467 .ops = &iwl6050_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700468 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700469 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Jay Sternberge1228372009-01-19 15:30:34 -0800470 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700471 .num_of_queues = IWL50_NUM_QUEUES,
472 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
Jay Sternberge1228372009-01-19 15:30:34 -0800473 .mod_params = &iwl50_mod_params,
Jay Sternbergc0bac762009-02-02 16:21:14 -0800474 .valid_tx_ant = ANT_ABC,
475 .valid_rx_ant = ANT_ABC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700476 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700477 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700478 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700479 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700480 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700481 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700482 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700483 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700484 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700485 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700486 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700487 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700488 .support_ct_kill_exit = true,
Wey-Yi Guy3f3e0372009-10-30 14:36:17 -0700489 .support_sm_ps = true,
Wey-Yi Guy1933ac42009-10-30 14:36:18 -0700490 .support_wimax_coexist = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800491};
492
493MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
494MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));