blob: 73713f6a8df439b610b5c1d8913c21276147db67 [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 Zhao95b13012010-04-21 11:46:33 -070070#define IWL6000G2A_FW_PRE "iwlwifi-6000g2a-"
71#define _IWL6000G2A_MODULE_FIRMWARE(api) IWL6000G2A_FW_PRE #api ".ucode"
72#define IWL6000G2A_MODULE_FIRMWARE(api) _IWL6000G2A_MODULE_FIRMWARE(api)
73
Shanyu Zhao18089722010-05-06 10:15:21 -070074#define IWL6000G2B_FW_PRE "iwlwifi-6000g2b-"
75#define _IWL6000G2B_MODULE_FIRMWARE(api) IWL6000G2B_FW_PRE #api ".ucode"
76#define IWL6000G2B_MODULE_FIRMWARE(api) _IWL6000G2B_MODULE_FIRMWARE(api)
77
Shanyu Zhao4b3e8062010-04-07 18:06:36 -070078
Wey-Yi Guy672639d2009-07-24 11:13:01 -070079static void iwl6000_set_ct_threshold(struct iwl_priv *priv)
80{
81 /* want Celsius */
82 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD;
83 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
84}
85
Abhijeet Kolekard5755932010-02-18 22:03:05 -080086/* Indicate calibration version to uCode. */
87static void iwl6050_set_calib_version(struct iwl_priv *priv)
88{
89 if (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6)
90 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
91 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
92}
93
Wey-Yi Guy65b79982009-07-31 14:28:07 -070094/* NIC configuration for 6000 series */
95static void iwl6000_nic_config(struct iwl_priv *priv)
96{
Wey-Yi Guy9371d4e2009-09-11 10:38:10 -070097 u16 radio_cfg;
98
99 radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG);
100
101 /* write radio config values to register */
102 if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) <= EEPROM_RF_CONFIG_TYPE_MAX)
103 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
104 EEPROM_RF_CFG_TYPE_MSK(radio_cfg) |
105 EEPROM_RF_CFG_STEP_MSK(radio_cfg) |
106 EEPROM_RF_CFG_DASH_MSK(radio_cfg));
107
108 /* set CSR_HW_CONFIG_REG for uCode use */
109 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
110 CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI |
111 CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700112
113 /* no locking required for register write */
Wey-Yi Guy740e7f52009-11-06 14:52:55 -0800114 if (priv->cfg->pa_type == IWL_PA_INTERNAL) {
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700115 /* 2x2 IPA phy type */
116 iwl_write32(priv, CSR_GP_DRIVER_REG,
117 CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
118 }
119 /* else do nothing, uCode configured */
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800120 if (priv->cfg->ops->lib->temp_ops.set_calib_version)
121 priv->cfg->ops->lib->temp_ops.set_calib_version(priv);
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700122}
123
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700124static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
125 .min_nrg_cck = 97,
126 .max_nrg_cck = 0, /* not used, set to 0 */
127 .auto_corr_min_ofdm = 80,
128 .auto_corr_min_ofdm_mrc = 128,
129 .auto_corr_min_ofdm_x1 = 105,
130 .auto_corr_min_ofdm_mrc_x1 = 192,
131
132 .auto_corr_max_ofdm = 145,
133 .auto_corr_max_ofdm_mrc = 232,
Wey-Yi Guy2494f632010-01-20 12:22:52 -0800134 .auto_corr_max_ofdm_x1 = 110,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700135 .auto_corr_max_ofdm_mrc_x1 = 232,
136
137 .auto_corr_min_cck = 125,
138 .auto_corr_max_cck = 175,
139 .auto_corr_min_cck_mrc = 160,
140 .auto_corr_max_cck_mrc = 310,
141 .nrg_th_cck = 97,
142 .nrg_th_ofdm = 100,
Wey-Yi Guy55036d62009-10-09 13:20:24 -0700143
144 .barker_corr_th_min = 190,
145 .barker_corr_th_min_mrc = 390,
146 .nrg_th_cca = 62,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700147};
148
149static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
150{
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700151 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700152 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700153 priv->cfg->num_of_queues =
154 priv->cfg->mod_params->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700155
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700156 priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700157 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
158 priv->hw_params.scd_bc_tbls_size =
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700159 priv->cfg->num_of_queues *
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700160 sizeof(struct iwlagn_scd_bc_tbl);
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700161 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
162 priv->hw_params.max_stations = IWL5000_STATION_COUNT;
163 priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
164
165 priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
166 priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
167
168 priv->hw_params.max_bsm_size = 0;
169 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
170 BIT(IEEE80211_BAND_5GHZ);
171 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
172
173 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
174 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
175 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
176 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
177
178 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
179 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
180
181 /* Set initial sensitivity parameters */
182 /* Set initial calibration set */
183 priv->hw_params.sens = &iwl6000_sensitivity;
Wey-Yi Guye517736a2010-04-19 18:49:40 -0700184 priv->hw_params.calib_init_cfg =
185 BIT(IWL_CALIB_XTAL) |
186 BIT(IWL_CALIB_LO) |
187 BIT(IWL_CALIB_TX_IQ) |
188 BIT(IWL_CALIB_BASE_BAND);
Abhijeet Kolekar07f33f92010-01-22 14:22:47 -0800189
Wey-Yi Guye517736a2010-04-19 18:49:40 -0700190 return 0;
191}
192
193static int iwl6050_hw_set_hw_params(struct iwl_priv *priv)
194{
195 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
196 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
197 priv->cfg->num_of_queues =
198 priv->cfg->mod_params->num_of_queues;
199
200 priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
201 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
202 priv->hw_params.scd_bc_tbls_size =
203 priv->cfg->num_of_queues *
204 sizeof(struct iwlagn_scd_bc_tbl);
205 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
206 priv->hw_params.max_stations = IWL5000_STATION_COUNT;
207 priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
208
209 priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
210 priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
211
212 priv->hw_params.max_bsm_size = 0;
213 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
214 BIT(IEEE80211_BAND_5GHZ);
215 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
216
217 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
218 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
219 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
220 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
221
222 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
223 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
224
225 /* Set initial sensitivity parameters */
226 /* Set initial calibration set */
227 priv->hw_params.sens = &iwl6000_sensitivity;
228 priv->hw_params.calib_init_cfg =
229 BIT(IWL_CALIB_XTAL) |
230 BIT(IWL_CALIB_DC) |
231 BIT(IWL_CALIB_LO) |
232 BIT(IWL_CALIB_TX_IQ) |
233 BIT(IWL_CALIB_BASE_BAND);
Abhijeet Kolekar07f33f92010-01-22 14:22:47 -0800234
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700235 return 0;
236}
237
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700238static int iwl6000_hw_channel_switch(struct iwl_priv *priv, u16 channel)
239{
240 struct iwl6000_channel_switch_cmd cmd;
241 const struct iwl_channel_info *ch_info;
242 struct iwl_host_cmd hcmd = {
243 .id = REPLY_CHANNEL_SWITCH,
244 .len = sizeof(cmd),
245 .flags = CMD_SIZE_HUGE,
246 .data = &cmd,
247 };
248
249 IWL_DEBUG_11H(priv, "channel switch from %d to %d\n",
250 priv->active_rxon.channel, channel);
251
252 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
253 cmd.channel = cpu_to_le16(channel);
Wey-Yi Guy0924e5192009-11-06 14:52:54 -0800254 cmd.rxon_flags = priv->staging_rxon.flags;
255 cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700256 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
257 ch_info = iwl_get_channel_info(priv, priv->band, channel);
258 if (ch_info)
259 cmd.expect_beacon = is_channel_radar(ch_info);
260 else {
261 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
262 priv->active_rxon.channel, channel);
263 return -EFAULT;
264 }
Wey-Yi Guy0924e5192009-11-06 14:52:54 -0800265 priv->switch_rxon.channel = cpu_to_le16(channel);
266 priv->switch_rxon.switch_in_progress = true;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700267
268 return iwl_send_cmd_sync(priv, &hcmd);
269}
270
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700271static struct iwl_lib_ops iwl6000_lib = {
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700272 .set_hw_params = iwl6000_hw_set_hw_params,
Wey-Yi Guyb305a082010-03-16 17:41:22 -0700273 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
274 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
275 .txq_set_sched = iwlagn_txq_set_sched,
276 .txq_agg_enable = iwlagn_txq_agg_enable,
277 .txq_agg_disable = iwlagn_txq_agg_disable,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700278 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
279 .txq_free_tfd = iwl_hw_txq_free_tfd,
280 .txq_init = iwl_hw_tx_queue_init,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700281 .rx_handler_setup = iwlagn_rx_handler_setup,
282 .setup_deferred_work = iwlagn_setup_deferred_work,
283 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
Wey-Yi Guy81b81762010-03-16 10:23:30 -0700284 .load_ucode = iwlagn_load_ucode,
Reinette Chatreb7a79402009-09-25 14:24:23 -0700285 .dump_nic_event_log = iwl_dump_nic_event_log,
286 .dump_nic_error_log = iwl_dump_nic_error_log,
Wey-Yi Guy696bdee2009-12-10 14:37:25 -0800287 .dump_csr = iwl_dump_csr,
Wey-Yi Guy1b3eb822010-01-15 13:43:39 -0800288 .dump_fh = iwl_dump_fh,
Wey-Yi Guy741a6262010-03-16 12:37:24 -0700289 .init_alive_start = iwlagn_init_alive_start,
290 .alive_notify = iwlagn_alive_notify,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700291 .send_tx_power = iwlagn_send_tx_power,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700292 .update_chain_flags = iwl_update_chain_flags,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700293 .set_channel_switch = iwl6000_hw_channel_switch,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700294 .apm_ops = {
Ben Cahillfadb3582009-10-23 13:42:21 -0700295 .init = iwl_apm_init,
Abhijeet Kolekard68b6032009-10-02 13:44:04 -0700296 .stop = iwl_apm_stop,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700297 .config = iwl6000_nic_config,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700298 .set_pwr_src = iwl_set_pwr_src,
299 },
300 .eeprom_ops = {
301 .regulatory_bands = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700302 EEPROM_REG_BAND_1_CHANNELS,
303 EEPROM_REG_BAND_2_CHANNELS,
304 EEPROM_REG_BAND_3_CHANNELS,
305 EEPROM_REG_BAND_4_CHANNELS,
306 EEPROM_REG_BAND_5_CHANNELS,
Shanyu Zhaof2fa1b02010-04-07 18:37:52 -0700307 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700308 EEPROM_REG_BAND_52_HT40_CHANNELS
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700309 },
310 .verify_signature = iwlcore_eeprom_verify_signature,
311 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
312 .release_semaphore = iwlcore_eeprom_release_semaphore,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700313 .calib_version = iwlagn_eeprom_calib_version,
314 .query_addr = iwlagn_eeprom_query_addr,
Wey-Yi Guyab9fd1b2009-08-21 13:34:23 -0700315 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700316 },
317 .post_associate = iwl_post_associate,
318 .isr = iwl_isr_ict,
319 .config_ap = iwl_config_ap,
320 .temp_ops = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700321 .temperature = iwlagn_temperature,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700322 .set_ct_kill = iwl6000_set_ct_threshold,
323 },
Johannes Berg1fa61b22010-04-28 08:44:52 -0700324 .manage_ibss_station = iwlagn_manage_ibss_station,
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -0700325 .debugfs_ops = {
326 .rx_stats_read = iwl_ucode_rx_stats_read,
327 .tx_stats_read = iwl_ucode_tx_stats_read,
328 .general_stats_read = iwl_ucode_general_stats_read,
329 },
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800330 .recover_from_tx_stall = iwl_bg_monitor_recover,
Wey-Yi Guyfa8f130c2010-03-05 14:22:46 -0800331 .check_plcp_health = iwl_good_plcp_health,
332 .check_ack_health = iwl_good_ack_health,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700333};
334
Emese Revfy45d5d802009-12-14 00:59:53 +0100335static const struct iwl_ops iwl6000_ops = {
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700336 .lib = &iwl6000_lib,
Wey-Yi Guy7dc77db2010-03-16 10:23:31 -0700337 .hcmd = &iwlagn_hcmd,
338 .utils = &iwlagn_hcmd_utils,
Johannes Berge932a602009-10-02 13:44:03 -0700339 .led = &iwlagn_led_ops,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800340};
341
Shanyu Zhao18089722010-05-06 10:15:21 -0700342static void do_not_send_bt_config(struct iwl_priv *priv)
343{
344}
345
346static struct iwl_hcmd_ops iwl6000g2b_hcmd = {
347 .rxon_assoc = iwlagn_send_rxon_assoc,
348 .commit_rxon = iwl_commit_rxon,
349 .set_rxon_chain = iwl_set_rxon_chain,
350 .set_tx_ant = iwlagn_send_tx_ant_config,
351 .send_bt_config = do_not_send_bt_config,
352};
353
354static const struct iwl_ops iwl6000g2b_ops = {
355 .lib = &iwl6000_lib,
356 .hcmd = &iwl6000g2b_hcmd,
357 .utils = &iwlagn_hcmd_utils,
358 .led = &iwlagn_led_ops,
359};
360
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800361static struct iwl_lib_ops iwl6050_lib = {
Wey-Yi Guye517736a2010-04-19 18:49:40 -0700362 .set_hw_params = iwl6050_hw_set_hw_params,
Wey-Yi Guyb305a082010-03-16 17:41:22 -0700363 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
364 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
365 .txq_set_sched = iwlagn_txq_set_sched,
366 .txq_agg_enable = iwlagn_txq_agg_enable,
367 .txq_agg_disable = iwlagn_txq_agg_disable,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800368 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
369 .txq_free_tfd = iwl_hw_txq_free_tfd,
370 .txq_init = iwl_hw_tx_queue_init,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700371 .rx_handler_setup = iwlagn_rx_handler_setup,
372 .setup_deferred_work = iwlagn_setup_deferred_work,
373 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
Wey-Yi Guy81b81762010-03-16 10:23:30 -0700374 .load_ucode = iwlagn_load_ucode,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800375 .dump_nic_event_log = iwl_dump_nic_event_log,
376 .dump_nic_error_log = iwl_dump_nic_error_log,
377 .dump_csr = iwl_dump_csr,
378 .dump_fh = iwl_dump_fh,
Wey-Yi Guy741a6262010-03-16 12:37:24 -0700379 .init_alive_start = iwlagn_init_alive_start,
380 .alive_notify = iwlagn_alive_notify,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700381 .send_tx_power = iwlagn_send_tx_power,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800382 .update_chain_flags = iwl_update_chain_flags,
383 .set_channel_switch = iwl6000_hw_channel_switch,
384 .apm_ops = {
385 .init = iwl_apm_init,
386 .stop = iwl_apm_stop,
387 .config = iwl6000_nic_config,
388 .set_pwr_src = iwl_set_pwr_src,
389 },
390 .eeprom_ops = {
391 .regulatory_bands = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700392 EEPROM_REG_BAND_1_CHANNELS,
393 EEPROM_REG_BAND_2_CHANNELS,
394 EEPROM_REG_BAND_3_CHANNELS,
395 EEPROM_REG_BAND_4_CHANNELS,
396 EEPROM_REG_BAND_5_CHANNELS,
Shanyu Zhaof2fa1b02010-04-07 18:37:52 -0700397 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700398 EEPROM_REG_BAND_52_HT40_CHANNELS
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800399 },
400 .verify_signature = iwlcore_eeprom_verify_signature,
401 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
402 .release_semaphore = iwlcore_eeprom_release_semaphore,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700403 .calib_version = iwlagn_eeprom_calib_version,
404 .query_addr = iwlagn_eeprom_query_addr,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800405 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
406 },
407 .post_associate = iwl_post_associate,
408 .isr = iwl_isr_ict,
409 .config_ap = iwl_config_ap,
410 .temp_ops = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700411 .temperature = iwlagn_temperature,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800412 .set_ct_kill = iwl6000_set_ct_threshold,
413 .set_calib_version = iwl6050_set_calib_version,
414 },
Johannes Berg1fa61b22010-04-28 08:44:52 -0700415 .manage_ibss_station = iwlagn_manage_ibss_station,
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -0700416 .debugfs_ops = {
417 .rx_stats_read = iwl_ucode_rx_stats_read,
418 .tx_stats_read = iwl_ucode_tx_stats_read,
419 .general_stats_read = iwl_ucode_general_stats_read,
420 },
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800421 .recover_from_tx_stall = iwl_bg_monitor_recover,
Wey-Yi Guyfa8f130c2010-03-05 14:22:46 -0800422 .check_plcp_health = iwl_good_plcp_health,
423 .check_ack_health = iwl_good_ack_health,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800424};
425
426static const struct iwl_ops iwl6050_ops = {
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800427 .lib = &iwl6050_lib,
Wey-Yi Guy7dc77db2010-03-16 10:23:31 -0700428 .hcmd = &iwlagn_hcmd,
429 .utils = &iwlagn_hcmd_utils,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800430 .led = &iwlagn_led_ops,
431};
432
Shanyu Zhao95b13012010-04-21 11:46:33 -0700433
434struct iwl_cfg iwl6000g2a_2agn_cfg = {
435 .name = "6000 Series 2x2 AGN Gen2a",
436 .fw_name_pre = IWL6000G2A_FW_PRE,
Shanyu Zhao4b3e8062010-04-07 18:06:36 -0700437 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
438 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700439 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
440 .ops = &iwl6000_ops,
441 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Shanyu Zhao4b3e8062010-04-07 18:06:36 -0700442 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
443 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700444 .num_of_queues = IWLAGN_NUM_QUEUES,
445 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
446 .mod_params = &iwlagn_mod_params,
447 .valid_tx_ant = ANT_AB,
448 .valid_rx_ant = ANT_AB,
449 .pll_cfg_val = 0,
450 .set_l0s = true,
451 .use_bsm = false,
Wey-Yi Guy33e6f812010-04-09 09:36:11 -0700452 .pa_type = IWL_PA_SYSTEM,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700453 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
454 .shadow_ram_support = true,
455 .ht_greenfield_support = true,
456 .led_compensation = 51,
457 .use_rts_for_ht = true, /* use rts/cts protection */
458 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
459 .supports_idle = true,
460 .adv_thermal_throttle = true,
461 .support_ct_kill_exit = true,
462 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
463 .chain_noise_scale = 1000,
464 .monitor_recover_period = IWL_MONITORING_PERIOD,
Shanyu Zhao95b13012010-04-21 11:46:33 -0700465 .max_event_log_size = 512,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700466 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700467 .sensitivity_calib_by_driver = true,
468 .chain_noise_calib_by_driver = true,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700469};
470
Shanyu Zhao18089722010-05-06 10:15:21 -0700471struct iwl_cfg iwl6000g2a_2abg_cfg = {
472 .name = "6000 Series 2x2 ABG Gen2a",
473 .fw_name_pre = IWL6000G2A_FW_PRE,
474 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
475 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
476 .sku = IWL_SKU_A|IWL_SKU_G,
477 .ops = &iwl6000_ops,
478 .eeprom_size = OTP_LOW_IMAGE_SIZE,
479 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
480 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
481 .num_of_queues = IWLAGN_NUM_QUEUES,
482 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
483 .mod_params = &iwlagn_mod_params,
484 .valid_tx_ant = ANT_AB,
485 .valid_rx_ant = ANT_AB,
486 .pll_cfg_val = 0,
487 .set_l0s = true,
488 .use_bsm = false,
489 .pa_type = IWL_PA_SYSTEM,
490 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
491 .shadow_ram_support = true,
492 .led_compensation = 51,
493 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
494 .supports_idle = true,
495 .adv_thermal_throttle = true,
496 .support_ct_kill_exit = true,
497 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
498 .chain_noise_scale = 1000,
499 .monitor_recover_period = IWL_MONITORING_PERIOD,
500 .max_event_log_size = 512,
501};
502
503struct iwl_cfg iwl6000g2a_2bg_cfg = {
504 .name = "6000 Series 2x2 BG Gen2a",
505 .fw_name_pre = IWL6000G2A_FW_PRE,
506 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
507 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
508 .sku = IWL_SKU_G,
509 .ops = &iwl6000_ops,
510 .eeprom_size = OTP_LOW_IMAGE_SIZE,
511 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
512 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
513 .num_of_queues = IWLAGN_NUM_QUEUES,
514 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
515 .mod_params = &iwlagn_mod_params,
516 .valid_tx_ant = ANT_AB,
517 .valid_rx_ant = ANT_AB,
518 .pll_cfg_val = 0,
519 .set_l0s = true,
520 .use_bsm = false,
521 .pa_type = IWL_PA_SYSTEM,
522 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
523 .shadow_ram_support = true,
524 .led_compensation = 51,
525 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
526 .supports_idle = true,
527 .adv_thermal_throttle = true,
528 .support_ct_kill_exit = true,
529 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
530 .chain_noise_scale = 1000,
531 .monitor_recover_period = IWL_MONITORING_PERIOD,
532 .max_event_log_size = 512,
533};
534
535struct iwl_cfg iwl6000g2b_2agn_cfg = {
536 .name = "6000 Series 2x2 AGN Gen2b",
537 .fw_name_pre = IWL6000G2B_FW_PRE,
538 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
539 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
540 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
541 .ops = &iwl6000g2b_ops,
542 .eeprom_size = OTP_LOW_IMAGE_SIZE,
543 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
544 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
545 .num_of_queues = IWLAGN_NUM_QUEUES,
546 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
547 .mod_params = &iwlagn_mod_params,
548 .valid_tx_ant = ANT_AB,
549 .valid_rx_ant = ANT_AB,
550 .pll_cfg_val = 0,
551 .set_l0s = true,
552 .use_bsm = false,
553 .pa_type = IWL_PA_SYSTEM,
554 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
555 .shadow_ram_support = true,
556 .ht_greenfield_support = true,
557 .led_compensation = 51,
558 .use_rts_for_ht = true, /* use rts/cts protection */
559 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
560 .supports_idle = true,
561 .adv_thermal_throttle = true,
562 .support_ct_kill_exit = true,
563 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
564 .chain_noise_scale = 1000,
565 .monitor_recover_period = IWL_MONITORING_PERIOD,
566 .max_event_log_size = 512,
567};
568
569struct iwl_cfg iwl6000g2b_2abg_cfg = {
570 .name = "6000 Series 2x2 ABG Gen2b",
571 .fw_name_pre = IWL6000G2B_FW_PRE,
572 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
573 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
574 .sku = IWL_SKU_A|IWL_SKU_G,
575 .ops = &iwl6000g2b_ops,
576 .eeprom_size = OTP_LOW_IMAGE_SIZE,
577 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
578 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
579 .num_of_queues = IWLAGN_NUM_QUEUES,
580 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
581 .mod_params = &iwlagn_mod_params,
582 .valid_tx_ant = ANT_AB,
583 .valid_rx_ant = ANT_AB,
584 .pll_cfg_val = 0,
585 .set_l0s = true,
586 .use_bsm = false,
587 .pa_type = IWL_PA_SYSTEM,
588 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
589 .shadow_ram_support = true,
590 .led_compensation = 51,
591 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
592 .supports_idle = true,
593 .adv_thermal_throttle = true,
594 .support_ct_kill_exit = true,
595 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
596 .chain_noise_scale = 1000,
597 .monitor_recover_period = IWL_MONITORING_PERIOD,
598 .max_event_log_size = 512,
599};
600
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700601struct iwl_cfg iwl6000g2b_2bgn_cfg = {
602 .name = "6000 Series 2x2 BGN Gen2b",
603 .fw_name_pre = IWL6000G2B_FW_PRE,
604 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
605 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
606 .sku = IWL_SKU_G|IWL_SKU_N,
607 .ops = &iwl6000g2b_ops,
608 .eeprom_size = OTP_LOW_IMAGE_SIZE,
609 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
610 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
611 .num_of_queues = IWLAGN_NUM_QUEUES,
612 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
613 .mod_params = &iwlagn_mod_params,
614 .valid_tx_ant = ANT_AB,
615 .valid_rx_ant = ANT_AB,
616 .pll_cfg_val = 0,
617 .set_l0s = true,
618 .use_bsm = false,
619 .pa_type = IWL_PA_SYSTEM,
620 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
621 .shadow_ram_support = true,
622 .ht_greenfield_support = true,
623 .led_compensation = 51,
624 .use_rts_for_ht = true, /* use rts/cts protection */
625 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
626 .supports_idle = true,
627 .adv_thermal_throttle = true,
628 .support_ct_kill_exit = true,
629 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
630 .chain_noise_scale = 1000,
631 .monitor_recover_period = IWL_MONITORING_PERIOD,
632 .max_event_log_size = 512,
633};
634
Shanyu Zhao18089722010-05-06 10:15:21 -0700635struct iwl_cfg iwl6000g2b_2bg_cfg = {
636 .name = "6000 Series 2x2 BG Gen2b",
637 .fw_name_pre = IWL6000G2B_FW_PRE,
638 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
639 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
640 .sku = IWL_SKU_G,
641 .ops = &iwl6000g2b_ops,
642 .eeprom_size = OTP_LOW_IMAGE_SIZE,
643 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
644 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
645 .num_of_queues = IWLAGN_NUM_QUEUES,
646 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
647 .mod_params = &iwlagn_mod_params,
648 .valid_tx_ant = ANT_AB,
649 .valid_rx_ant = ANT_AB,
650 .pll_cfg_val = 0,
651 .set_l0s = true,
652 .use_bsm = false,
653 .pa_type = IWL_PA_SYSTEM,
654 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
655 .shadow_ram_support = true,
656 .led_compensation = 51,
657 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
658 .supports_idle = true,
659 .adv_thermal_throttle = true,
660 .support_ct_kill_exit = true,
661 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
662 .chain_noise_scale = 1000,
663 .monitor_recover_period = IWL_MONITORING_PERIOD,
664 .max_event_log_size = 512,
665};
666
667struct iwl_cfg iwl6000g2b_bgn_cfg = {
668 .name = "6000 Series 1x2 BGN Gen2b",
669 .fw_name_pre = IWL6000G2B_FW_PRE,
670 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
671 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
672 .sku = IWL_SKU_G|IWL_SKU_N,
673 .ops = &iwl6000g2b_ops,
674 .eeprom_size = OTP_LOW_IMAGE_SIZE,
675 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
676 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
677 .num_of_queues = IWLAGN_NUM_QUEUES,
678 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
679 .mod_params = &iwlagn_mod_params,
680 .valid_tx_ant = ANT_A,
681 .valid_rx_ant = ANT_AB,
682 .pll_cfg_val = 0,
683 .set_l0s = true,
684 .use_bsm = false,
685 .pa_type = IWL_PA_SYSTEM,
686 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
687 .shadow_ram_support = true,
688 .ht_greenfield_support = true,
689 .led_compensation = 51,
690 .use_rts_for_ht = true, /* use rts/cts protection */
691 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
692 .supports_idle = true,
693 .adv_thermal_throttle = true,
694 .support_ct_kill_exit = true,
695 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
696 .chain_noise_scale = 1000,
697 .monitor_recover_period = IWL_MONITORING_PERIOD,
698 .max_event_log_size = 512,
699};
700
701struct iwl_cfg iwl6000g2b_bg_cfg = {
702 .name = "6000 Series 1x2 BG Gen2b",
703 .fw_name_pre = IWL6000G2B_FW_PRE,
704 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
705 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
706 .sku = IWL_SKU_G,
707 .ops = &iwl6000g2b_ops,
708 .eeprom_size = OTP_LOW_IMAGE_SIZE,
709 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
710 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
711 .num_of_queues = IWLAGN_NUM_QUEUES,
712 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
713 .mod_params = &iwlagn_mod_params,
714 .valid_tx_ant = ANT_A,
715 .valid_rx_ant = ANT_AB,
716 .pll_cfg_val = 0,
717 .set_l0s = true,
718 .use_bsm = false,
719 .pa_type = IWL_PA_SYSTEM,
720 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
721 .shadow_ram_support = true,
722 .led_compensation = 51,
723 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
724 .supports_idle = true,
725 .adv_thermal_throttle = true,
726 .support_ct_kill_exit = true,
727 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
728 .chain_noise_scale = 1000,
729 .monitor_recover_period = IWL_MONITORING_PERIOD,
730 .max_event_log_size = 512,
731};
732
Shanyu Zhao95b13012010-04-21 11:46:33 -0700733/*
734 * "i": Internal configuration, use internal Power Amplifier
735 */
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700736struct iwl_cfg iwl6000i_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800737 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700738 .fw_name_pre = IWL6000_FW_PRE,
739 .ucode_api_max = IWL6000_UCODE_API_MAX,
740 .ucode_api_min = IWL6000_UCODE_API_MIN,
741 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
742 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700743 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700744 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700745 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700746 .num_of_queues = IWLAGN_NUM_QUEUES,
747 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700748 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700749 .valid_tx_ant = ANT_BC,
750 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700751 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700752 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700753 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700754 .pa_type = IWL_PA_INTERNAL,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700755 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
756 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700757 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700758 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700759 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700760 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700761 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700762 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700763 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800764 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800765 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800766 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700767 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700768 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700769 .sensitivity_calib_by_driver = true,
770 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800771};
772
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700773struct iwl_cfg iwl6000i_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800774 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700775 .fw_name_pre = IWL6000_FW_PRE,
776 .ucode_api_max = IWL6000_UCODE_API_MAX,
777 .ucode_api_min = IWL6000_UCODE_API_MIN,
778 .sku = IWL_SKU_A|IWL_SKU_G,
779 .ops = &iwl6000_ops,
780 .eeprom_size = OTP_LOW_IMAGE_SIZE,
781 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700782 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700783 .num_of_queues = IWLAGN_NUM_QUEUES,
784 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700785 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700786 .valid_tx_ant = ANT_BC,
787 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700788 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700789 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700790 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700791 .pa_type = IWL_PA_INTERNAL,
792 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
793 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700794 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700795 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700796 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700797 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700798 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800799 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800800 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800801 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700802 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700803 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700804 .sensitivity_calib_by_driver = true,
805 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700806};
807
808struct iwl_cfg iwl6000i_2bg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800809 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700810 .fw_name_pre = IWL6000_FW_PRE,
811 .ucode_api_max = IWL6000_UCODE_API_MAX,
812 .ucode_api_min = IWL6000_UCODE_API_MIN,
813 .sku = IWL_SKU_G,
814 .ops = &iwl6000_ops,
815 .eeprom_size = OTP_LOW_IMAGE_SIZE,
816 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700817 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700818 .num_of_queues = IWLAGN_NUM_QUEUES,
819 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700820 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700821 .valid_tx_ant = ANT_BC,
822 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700823 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700824 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700825 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700826 .pa_type = IWL_PA_INTERNAL,
827 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
828 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700829 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700830 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700831 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700832 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700833 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800834 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800835 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800836 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700837 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700838 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700839 .sensitivity_calib_by_driver = true,
840 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700841};
842
Jay Sternberge1228372009-01-19 15:30:34 -0800843struct iwl_cfg iwl6050_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800844 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800845 .fw_name_pre = IWL6050_FW_PRE,
846 .ucode_api_max = IWL6050_UCODE_API_MAX,
847 .ucode_api_min = IWL6050_UCODE_API_MIN,
848 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800849 .ops = &iwl6050_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700850 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700851 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700852 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700853 .num_of_queues = IWLAGN_NUM_QUEUES,
854 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700855 .mod_params = &iwlagn_mod_params,
Jay Sternberg542cc792009-05-08 13:44:46 -0700856 .valid_tx_ant = ANT_AB,
857 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700858 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700859 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700860 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700861 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700862 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700863 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700864 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700865 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700866 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700867 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700868 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700869 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700870 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800871 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800872 .chain_noise_scale = 1500,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800873 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700874 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700875 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700876 .sensitivity_calib_by_driver = true,
877 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800878};
879
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700880struct iwl_cfg iwl6050_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800881 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700882 .fw_name_pre = IWL6050_FW_PRE,
883 .ucode_api_max = IWL6050_UCODE_API_MAX,
884 .ucode_api_min = IWL6050_UCODE_API_MIN,
885 .sku = IWL_SKU_A|IWL_SKU_G,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800886 .ops = &iwl6050_ops,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700887 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700888 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700889 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700890 .num_of_queues = IWLAGN_NUM_QUEUES,
891 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700892 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700893 .valid_tx_ant = ANT_AB,
894 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700895 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700896 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700897 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700898 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700899 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700900 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700901 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700902 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700903 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700904 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700905 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800906 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800907 .chain_noise_scale = 1500,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800908 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700909 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700910 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700911 .sensitivity_calib_by_driver = true,
912 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700913};
914
Jay Sternberge1228372009-01-19 15:30:34 -0800915struct iwl_cfg iwl6000_3agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800916 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800917 .fw_name_pre = IWL6000_FW_PRE,
918 .ucode_api_max = IWL6000_UCODE_API_MAX,
919 .ucode_api_min = IWL6000_UCODE_API_MIN,
920 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800921 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700922 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700923 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700924 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700925 .num_of_queues = IWLAGN_NUM_QUEUES,
926 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700927 .mod_params = &iwlagn_mod_params,
Jay Sternbergc0bac762009-02-02 16:21:14 -0800928 .valid_tx_ant = ANT_ABC,
929 .valid_rx_ant = ANT_ABC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700930 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700931 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700932 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700933 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700934 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
935 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700936 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700937 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700938 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700939 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700940 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700941 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700942 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800943 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800944 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800945 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700946 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700947 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700948 .sensitivity_calib_by_driver = true,
949 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800950};
951
Jay Sternberge1228372009-01-19 15:30:34 -0800952MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
953MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
Shanyu Zhao95b13012010-04-21 11:46:33 -0700954MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
Shanyu Zhao18089722010-05-06 10:15:21 -0700955MODULE_FIRMWARE(IWL6000G2B_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));