blob: c4926506a0849b1753d71d324fc9450997c50932 [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"
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -070047#include "iwl-agn-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"
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -070050#include "iwl-agn-debugfs.h"
Jay Sternberge1228372009-01-19 15:30:34 -080051
52/* Highest firmware API version supported */
Wey-Yi Guyfcbaf8b2009-08-21 13:34:18 -070053#define IWL6000_UCODE_API_MAX 4
54#define IWL6050_UCODE_API_MAX 4
Shanyu Zhao4b3e8062010-04-07 18:06:36 -070055#define IWL6000G2_UCODE_API_MAX 4
Jay Sternberge1228372009-01-19 15:30:34 -080056
57/* Lowest firmware API version supported */
Wey-Yi Guy44246422009-10-23 13:42:34 -070058#define IWL6000_UCODE_API_MIN 4
59#define IWL6050_UCODE_API_MIN 4
Shanyu Zhao4b3e8062010-04-07 18:06:36 -070060#define IWL6000G2_UCODE_API_MIN 4
Jay Sternberge1228372009-01-19 15:30:34 -080061
62#define IWL6000_FW_PRE "iwlwifi-6000-"
63#define _IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE #api ".ucode"
64#define IWL6000_MODULE_FIRMWARE(api) _IWL6000_MODULE_FIRMWARE(api)
65
66#define IWL6050_FW_PRE "iwlwifi-6050-"
67#define _IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE #api ".ucode"
68#define IWL6050_MODULE_FIRMWARE(api) _IWL6050_MODULE_FIRMWARE(api)
69
Shanyu Zhao4b3e8062010-04-07 18:06:36 -070070#define IWL6000G2_FW_PRE "iwlwifi-6005-"
71#define _IWL6000G2_MODULE_FIRMWARE(api) IWL6000G2_FW_PRE #api ".ucode"
72#define IWL6000G2_MODULE_FIRMWARE(api) _IWL6000G2_MODULE_FIRMWARE(api)
73
Wey-Yi Guy672639d2009-07-24 11:13:01 -070074static void iwl6000_set_ct_threshold(struct iwl_priv *priv)
75{
76 /* want Celsius */
77 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD;
78 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
79}
80
Abhijeet Kolekard5755932010-02-18 22:03:05 -080081/* Indicate calibration version to uCode. */
82static void iwl6050_set_calib_version(struct iwl_priv *priv)
83{
84 if (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6)
85 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
86 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
87}
88
Wey-Yi Guy65b79982009-07-31 14:28:07 -070089/* NIC configuration for 6000 series */
90static void iwl6000_nic_config(struct iwl_priv *priv)
91{
Wey-Yi Guy9371d4e2009-09-11 10:38:10 -070092 u16 radio_cfg;
93
94 radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG);
95
96 /* write radio config values to register */
97 if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) <= EEPROM_RF_CONFIG_TYPE_MAX)
98 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
99 EEPROM_RF_CFG_TYPE_MSK(radio_cfg) |
100 EEPROM_RF_CFG_STEP_MSK(radio_cfg) |
101 EEPROM_RF_CFG_DASH_MSK(radio_cfg));
102
103 /* set CSR_HW_CONFIG_REG for uCode use */
104 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
105 CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI |
106 CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700107
108 /* no locking required for register write */
Wey-Yi Guy740e7f52009-11-06 14:52:55 -0800109 if (priv->cfg->pa_type == IWL_PA_INTERNAL) {
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700110 /* 2x2 IPA phy type */
111 iwl_write32(priv, CSR_GP_DRIVER_REG,
112 CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
113 }
114 /* else do nothing, uCode configured */
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800115 if (priv->cfg->ops->lib->temp_ops.set_calib_version)
116 priv->cfg->ops->lib->temp_ops.set_calib_version(priv);
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700117}
118
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700119static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
120 .min_nrg_cck = 97,
121 .max_nrg_cck = 0, /* not used, set to 0 */
122 .auto_corr_min_ofdm = 80,
123 .auto_corr_min_ofdm_mrc = 128,
124 .auto_corr_min_ofdm_x1 = 105,
125 .auto_corr_min_ofdm_mrc_x1 = 192,
126
127 .auto_corr_max_ofdm = 145,
128 .auto_corr_max_ofdm_mrc = 232,
Wey-Yi Guy2494f632010-01-20 12:22:52 -0800129 .auto_corr_max_ofdm_x1 = 110,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700130 .auto_corr_max_ofdm_mrc_x1 = 232,
131
132 .auto_corr_min_cck = 125,
133 .auto_corr_max_cck = 175,
134 .auto_corr_min_cck_mrc = 160,
135 .auto_corr_max_cck_mrc = 310,
136 .nrg_th_cck = 97,
137 .nrg_th_ofdm = 100,
Wey-Yi Guy55036d62009-10-09 13:20:24 -0700138
139 .barker_corr_th_min = 190,
140 .barker_corr_th_min_mrc = 390,
141 .nrg_th_cca = 62,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700142};
143
144static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
145{
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700146 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700147 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700148 priv->cfg->num_of_queues =
149 priv->cfg->mod_params->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700150
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700151 priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700152 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
153 priv->hw_params.scd_bc_tbls_size =
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700154 priv->cfg->num_of_queues *
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700155 sizeof(struct iwlagn_scd_bc_tbl);
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700156 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
157 priv->hw_params.max_stations = IWL5000_STATION_COUNT;
158 priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
159
160 priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
161 priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
162
163 priv->hw_params.max_bsm_size = 0;
164 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
165 BIT(IEEE80211_BAND_5GHZ);
166 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
167
168 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
169 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
170 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
171 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
172
173 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
174 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
175
176 /* Set initial sensitivity parameters */
177 /* Set initial calibration set */
178 priv->hw_params.sens = &iwl6000_sensitivity;
Wey-Yi Guye517736a2010-04-19 18:49:40 -0700179 priv->hw_params.calib_init_cfg =
180 BIT(IWL_CALIB_XTAL) |
181 BIT(IWL_CALIB_LO) |
182 BIT(IWL_CALIB_TX_IQ) |
183 BIT(IWL_CALIB_BASE_BAND);
Abhijeet Kolekar07f33f92010-01-22 14:22:47 -0800184
Wey-Yi Guye517736a2010-04-19 18:49:40 -0700185 return 0;
186}
187
188static int iwl6050_hw_set_hw_params(struct iwl_priv *priv)
189{
190 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
191 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
192 priv->cfg->num_of_queues =
193 priv->cfg->mod_params->num_of_queues;
194
195 priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
196 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
197 priv->hw_params.scd_bc_tbls_size =
198 priv->cfg->num_of_queues *
199 sizeof(struct iwlagn_scd_bc_tbl);
200 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
201 priv->hw_params.max_stations = IWL5000_STATION_COUNT;
202 priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
203
204 priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
205 priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
206
207 priv->hw_params.max_bsm_size = 0;
208 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
209 BIT(IEEE80211_BAND_5GHZ);
210 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
211
212 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
213 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
214 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
215 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
216
217 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
218 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
219
220 /* Set initial sensitivity parameters */
221 /* Set initial calibration set */
222 priv->hw_params.sens = &iwl6000_sensitivity;
223 priv->hw_params.calib_init_cfg =
224 BIT(IWL_CALIB_XTAL) |
225 BIT(IWL_CALIB_DC) |
226 BIT(IWL_CALIB_LO) |
227 BIT(IWL_CALIB_TX_IQ) |
228 BIT(IWL_CALIB_BASE_BAND);
Abhijeet Kolekar07f33f92010-01-22 14:22:47 -0800229
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700230 return 0;
231}
232
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700233static int iwl6000_hw_channel_switch(struct iwl_priv *priv, u16 channel)
234{
235 struct iwl6000_channel_switch_cmd cmd;
236 const struct iwl_channel_info *ch_info;
237 struct iwl_host_cmd hcmd = {
238 .id = REPLY_CHANNEL_SWITCH,
239 .len = sizeof(cmd),
240 .flags = CMD_SIZE_HUGE,
241 .data = &cmd,
242 };
243
244 IWL_DEBUG_11H(priv, "channel switch from %d to %d\n",
245 priv->active_rxon.channel, channel);
246
247 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
248 cmd.channel = cpu_to_le16(channel);
Wey-Yi Guy0924e5192009-11-06 14:52:54 -0800249 cmd.rxon_flags = priv->staging_rxon.flags;
250 cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700251 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
252 ch_info = iwl_get_channel_info(priv, priv->band, channel);
253 if (ch_info)
254 cmd.expect_beacon = is_channel_radar(ch_info);
255 else {
256 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
257 priv->active_rxon.channel, channel);
258 return -EFAULT;
259 }
Wey-Yi Guy0924e5192009-11-06 14:52:54 -0800260 priv->switch_rxon.channel = cpu_to_le16(channel);
261 priv->switch_rxon.switch_in_progress = true;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700262
263 return iwl_send_cmd_sync(priv, &hcmd);
264}
265
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700266static struct iwl_lib_ops iwl6000_lib = {
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700267 .set_hw_params = iwl6000_hw_set_hw_params,
Wey-Yi Guyb305a082010-03-16 17:41:22 -0700268 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
269 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
270 .txq_set_sched = iwlagn_txq_set_sched,
271 .txq_agg_enable = iwlagn_txq_agg_enable,
272 .txq_agg_disable = iwlagn_txq_agg_disable,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700273 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
274 .txq_free_tfd = iwl_hw_txq_free_tfd,
275 .txq_init = iwl_hw_tx_queue_init,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700276 .rx_handler_setup = iwlagn_rx_handler_setup,
277 .setup_deferred_work = iwlagn_setup_deferred_work,
278 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
Wey-Yi Guy81b81762010-03-16 10:23:30 -0700279 .load_ucode = iwlagn_load_ucode,
Reinette Chatreb7a79402009-09-25 14:24:23 -0700280 .dump_nic_event_log = iwl_dump_nic_event_log,
281 .dump_nic_error_log = iwl_dump_nic_error_log,
Wey-Yi Guy696bdee2009-12-10 14:37:25 -0800282 .dump_csr = iwl_dump_csr,
Wey-Yi Guy1b3eb822010-01-15 13:43:39 -0800283 .dump_fh = iwl_dump_fh,
Wey-Yi Guy741a6262010-03-16 12:37:24 -0700284 .init_alive_start = iwlagn_init_alive_start,
285 .alive_notify = iwlagn_alive_notify,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700286 .send_tx_power = iwlagn_send_tx_power,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700287 .update_chain_flags = iwl_update_chain_flags,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700288 .set_channel_switch = iwl6000_hw_channel_switch,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700289 .apm_ops = {
Ben Cahillfadb3582009-10-23 13:42:21 -0700290 .init = iwl_apm_init,
Abhijeet Kolekard68b6032009-10-02 13:44:04 -0700291 .stop = iwl_apm_stop,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700292 .config = iwl6000_nic_config,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700293 .set_pwr_src = iwl_set_pwr_src,
294 },
295 .eeprom_ops = {
296 .regulatory_bands = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700297 EEPROM_REG_BAND_1_CHANNELS,
298 EEPROM_REG_BAND_2_CHANNELS,
299 EEPROM_REG_BAND_3_CHANNELS,
300 EEPROM_REG_BAND_4_CHANNELS,
301 EEPROM_REG_BAND_5_CHANNELS,
Shanyu Zhaof2fa1b02010-04-07 18:37:52 -0700302 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700303 EEPROM_REG_BAND_52_HT40_CHANNELS
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700304 },
305 .verify_signature = iwlcore_eeprom_verify_signature,
306 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
307 .release_semaphore = iwlcore_eeprom_release_semaphore,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700308 .calib_version = iwlagn_eeprom_calib_version,
309 .query_addr = iwlagn_eeprom_query_addr,
Wey-Yi Guyab9fd1b2009-08-21 13:34:23 -0700310 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700311 },
312 .post_associate = iwl_post_associate,
313 .isr = iwl_isr_ict,
314 .config_ap = iwl_config_ap,
315 .temp_ops = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700316 .temperature = iwlagn_temperature,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700317 .set_ct_kill = iwl6000_set_ct_threshold,
318 },
Reinette Chatre3459ab52010-01-22 14:22:49 -0800319 .add_bcast_station = iwl_add_bcast_station,
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -0700320 .debugfs_ops = {
321 .rx_stats_read = iwl_ucode_rx_stats_read,
322 .tx_stats_read = iwl_ucode_tx_stats_read,
323 .general_stats_read = iwl_ucode_general_stats_read,
324 },
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800325 .recover_from_tx_stall = iwl_bg_monitor_recover,
Wey-Yi Guyfa8f1302010-03-05 14:22:46 -0800326 .check_plcp_health = iwl_good_plcp_health,
327 .check_ack_health = iwl_good_ack_health,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700328};
329
Emese Revfy45d5d802009-12-14 00:59:53 +0100330static const struct iwl_ops iwl6000_ops = {
Wey-Yi Guy792bc3c2010-03-16 10:23:29 -0700331 .ucode = &iwlagn_ucode,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700332 .lib = &iwl6000_lib,
Wey-Yi Guy7dc77db2010-03-16 10:23:31 -0700333 .hcmd = &iwlagn_hcmd,
334 .utils = &iwlagn_hcmd_utils,
Johannes Berge932a602009-10-02 13:44:03 -0700335 .led = &iwlagn_led_ops,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800336};
337
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800338static struct iwl_lib_ops iwl6050_lib = {
Wey-Yi Guye517736a2010-04-19 18:49:40 -0700339 .set_hw_params = iwl6050_hw_set_hw_params,
Wey-Yi Guyb305a082010-03-16 17:41:22 -0700340 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
341 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
342 .txq_set_sched = iwlagn_txq_set_sched,
343 .txq_agg_enable = iwlagn_txq_agg_enable,
344 .txq_agg_disable = iwlagn_txq_agg_disable,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800345 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
346 .txq_free_tfd = iwl_hw_txq_free_tfd,
347 .txq_init = iwl_hw_tx_queue_init,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700348 .rx_handler_setup = iwlagn_rx_handler_setup,
349 .setup_deferred_work = iwlagn_setup_deferred_work,
350 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
Wey-Yi Guy81b81762010-03-16 10:23:30 -0700351 .load_ucode = iwlagn_load_ucode,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800352 .dump_nic_event_log = iwl_dump_nic_event_log,
353 .dump_nic_error_log = iwl_dump_nic_error_log,
354 .dump_csr = iwl_dump_csr,
355 .dump_fh = iwl_dump_fh,
Wey-Yi Guy741a6262010-03-16 12:37:24 -0700356 .init_alive_start = iwlagn_init_alive_start,
357 .alive_notify = iwlagn_alive_notify,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700358 .send_tx_power = iwlagn_send_tx_power,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800359 .update_chain_flags = iwl_update_chain_flags,
360 .set_channel_switch = iwl6000_hw_channel_switch,
361 .apm_ops = {
362 .init = iwl_apm_init,
363 .stop = iwl_apm_stop,
364 .config = iwl6000_nic_config,
365 .set_pwr_src = iwl_set_pwr_src,
366 },
367 .eeprom_ops = {
368 .regulatory_bands = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700369 EEPROM_REG_BAND_1_CHANNELS,
370 EEPROM_REG_BAND_2_CHANNELS,
371 EEPROM_REG_BAND_3_CHANNELS,
372 EEPROM_REG_BAND_4_CHANNELS,
373 EEPROM_REG_BAND_5_CHANNELS,
Shanyu Zhaof2fa1b02010-04-07 18:37:52 -0700374 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700375 EEPROM_REG_BAND_52_HT40_CHANNELS
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800376 },
377 .verify_signature = iwlcore_eeprom_verify_signature,
378 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
379 .release_semaphore = iwlcore_eeprom_release_semaphore,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700380 .calib_version = iwlagn_eeprom_calib_version,
381 .query_addr = iwlagn_eeprom_query_addr,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800382 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
383 },
384 .post_associate = iwl_post_associate,
385 .isr = iwl_isr_ict,
386 .config_ap = iwl_config_ap,
387 .temp_ops = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700388 .temperature = iwlagn_temperature,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800389 .set_ct_kill = iwl6000_set_ct_threshold,
390 .set_calib_version = iwl6050_set_calib_version,
391 },
392 .add_bcast_station = iwl_add_bcast_station,
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -0700393 .debugfs_ops = {
394 .rx_stats_read = iwl_ucode_rx_stats_read,
395 .tx_stats_read = iwl_ucode_tx_stats_read,
396 .general_stats_read = iwl_ucode_general_stats_read,
397 },
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800398 .recover_from_tx_stall = iwl_bg_monitor_recover,
Wey-Yi Guyfa8f1302010-03-05 14:22:46 -0800399 .check_plcp_health = iwl_good_plcp_health,
400 .check_ack_health = iwl_good_ack_health,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800401};
402
403static const struct iwl_ops iwl6050_ops = {
Wey-Yi Guy792bc3c2010-03-16 10:23:29 -0700404 .ucode = &iwlagn_ucode,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800405 .lib = &iwl6050_lib,
Wey-Yi Guy7dc77db2010-03-16 10:23:31 -0700406 .hcmd = &iwlagn_hcmd,
407 .utils = &iwlagn_hcmd_utils,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800408 .led = &iwlagn_led_ops,
409};
410
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700411/*
412 * "i": Internal configuration, use internal Power Amplifier
413 */
Wey-Yi Guy33e6f812010-04-09 09:36:11 -0700414struct iwl_cfg iwl6000g2_2agn_cfg = {
Jay Sternberg0b5af202010-03-17 16:16:12 -0700415 .name = "6000 Series 2x2 AGN Gen2",
Shanyu Zhao4b3e8062010-04-07 18:06:36 -0700416 .fw_name_pre = IWL6000G2_FW_PRE,
417 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
418 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700419 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
420 .ops = &iwl6000_ops,
421 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Shanyu Zhao4b3e8062010-04-07 18:06:36 -0700422 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
423 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700424 .num_of_queues = IWLAGN_NUM_QUEUES,
425 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
426 .mod_params = &iwlagn_mod_params,
427 .valid_tx_ant = ANT_AB,
428 .valid_rx_ant = ANT_AB,
429 .pll_cfg_val = 0,
430 .set_l0s = true,
431 .use_bsm = false,
Wey-Yi Guy33e6f812010-04-09 09:36:11 -0700432 .pa_type = IWL_PA_SYSTEM,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700433 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
434 .shadow_ram_support = true,
435 .ht_greenfield_support = true,
436 .led_compensation = 51,
437 .use_rts_for_ht = true, /* use rts/cts protection */
438 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
439 .supports_idle = true,
440 .adv_thermal_throttle = true,
441 .support_ct_kill_exit = true,
442 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
443 .chain_noise_scale = 1000,
444 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700445 .max_event_log_size = 1024,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700446};
447
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700448struct iwl_cfg iwl6000i_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800449 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700450 .fw_name_pre = IWL6000_FW_PRE,
451 .ucode_api_max = IWL6000_UCODE_API_MAX,
452 .ucode_api_min = IWL6000_UCODE_API_MIN,
453 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
454 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700455 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700456 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700457 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700458 .num_of_queues = IWLAGN_NUM_QUEUES,
459 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700460 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700461 .valid_tx_ant = ANT_BC,
462 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700463 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700464 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700465 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700466 .pa_type = IWL_PA_INTERNAL,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700467 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
468 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700469 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700470 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700471 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700472 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700473 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700474 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700475 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800476 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800477 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800478 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700479 .max_event_log_size = 1024,
Jay Sternberge1228372009-01-19 15:30:34 -0800480};
481
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700482struct iwl_cfg iwl6000i_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800483 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700484 .fw_name_pre = IWL6000_FW_PRE,
485 .ucode_api_max = IWL6000_UCODE_API_MAX,
486 .ucode_api_min = IWL6000_UCODE_API_MIN,
487 .sku = IWL_SKU_A|IWL_SKU_G,
488 .ops = &iwl6000_ops,
489 .eeprom_size = OTP_LOW_IMAGE_SIZE,
490 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700491 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700492 .num_of_queues = IWLAGN_NUM_QUEUES,
493 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700494 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700495 .valid_tx_ant = ANT_BC,
496 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700497 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700498 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700499 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700500 .pa_type = IWL_PA_INTERNAL,
501 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
502 .shadow_ram_support = true,
503 .ht_greenfield_support = true,
504 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700505 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700506 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700507 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700508 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800509 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800510 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800511 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700512 .max_event_log_size = 1024,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700513};
514
515struct iwl_cfg iwl6000i_2bg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800516 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700517 .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_G,
521 .ops = &iwl6000_ops,
522 .eeprom_size = OTP_LOW_IMAGE_SIZE,
523 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700524 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700525 .num_of_queues = IWLAGN_NUM_QUEUES,
526 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700527 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700528 .valid_tx_ant = ANT_BC,
529 .valid_rx_ant = ANT_BC,
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 Guy5953a622009-09-17 10:43:53 -0700533 .pa_type = IWL_PA_INTERNAL,
534 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
535 .shadow_ram_support = true,
536 .ht_greenfield_support = true,
537 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700538 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700539 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700540 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700541 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800542 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800543 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800544 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700545 .max_event_log_size = 1024,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700546};
547
Jay Sternberge1228372009-01-19 15:30:34 -0800548struct iwl_cfg iwl6050_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800549 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800550 .fw_name_pre = IWL6050_FW_PRE,
551 .ucode_api_max = IWL6050_UCODE_API_MAX,
552 .ucode_api_min = IWL6050_UCODE_API_MIN,
553 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800554 .ops = &iwl6050_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700555 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700556 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700557 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700558 .num_of_queues = IWLAGN_NUM_QUEUES,
559 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700560 .mod_params = &iwlagn_mod_params,
Jay Sternberg542cc792009-05-08 13:44:46 -0700561 .valid_tx_ant = ANT_AB,
562 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700563 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700564 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700565 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700566 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700567 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700568 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700569 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700570 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700571 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700572 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700573 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700574 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700575 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800576 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800577 .chain_noise_scale = 1500,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800578 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700579 .max_event_log_size = 1024,
Jay Sternberge1228372009-01-19 15:30:34 -0800580};
581
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700582struct iwl_cfg iwl6050_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800583 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700584 .fw_name_pre = IWL6050_FW_PRE,
585 .ucode_api_max = IWL6050_UCODE_API_MAX,
586 .ucode_api_min = IWL6050_UCODE_API_MIN,
587 .sku = IWL_SKU_A|IWL_SKU_G,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800588 .ops = &iwl6050_ops,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700589 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700590 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700591 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700592 .num_of_queues = IWLAGN_NUM_QUEUES,
593 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700594 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700595 .valid_tx_ant = ANT_AB,
596 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700597 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700598 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700599 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700600 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700601 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700602 .shadow_ram_support = true,
603 .ht_greenfield_support = true,
604 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700605 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700606 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700607 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700608 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800609 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800610 .chain_noise_scale = 1500,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800611 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700612 .max_event_log_size = 1024,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700613};
614
Jay Sternberge1228372009-01-19 15:30:34 -0800615struct iwl_cfg iwl6000_3agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800616 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800617 .fw_name_pre = IWL6000_FW_PRE,
618 .ucode_api_max = IWL6000_UCODE_API_MAX,
619 .ucode_api_min = IWL6000_UCODE_API_MIN,
620 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800621 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700622 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700623 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700624 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700625 .num_of_queues = IWLAGN_NUM_QUEUES,
626 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700627 .mod_params = &iwlagn_mod_params,
Jay Sternbergc0bac762009-02-02 16:21:14 -0800628 .valid_tx_ant = ANT_ABC,
629 .valid_rx_ant = ANT_ABC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700630 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700631 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700632 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700633 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700634 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
635 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700636 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700637 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700638 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700639 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700640 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700641 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700642 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800643 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800644 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800645 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700646 .max_event_log_size = 1024,
Jay Sternberge1228372009-01-19 15:30:34 -0800647};
648
Jay Sternberge1228372009-01-19 15:30:34 -0800649MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
650MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
Shanyu Zhao4b3e8062010-04-07 18:06:36 -0700651MODULE_FIRMWARE(IWL6000G2_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));