blob: 924759487ad2d32e5228a32f86837672068f96c1 [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
601struct iwl_cfg iwl6000g2b_2bg_cfg = {
602 .name = "6000 Series 2x2 BG 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,
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 .led_compensation = 51,
623 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
624 .supports_idle = true,
625 .adv_thermal_throttle = true,
626 .support_ct_kill_exit = true,
627 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
628 .chain_noise_scale = 1000,
629 .monitor_recover_period = IWL_MONITORING_PERIOD,
630 .max_event_log_size = 512,
631};
632
633struct iwl_cfg iwl6000g2b_bgn_cfg = {
634 .name = "6000 Series 1x2 BGN Gen2b",
635 .fw_name_pre = IWL6000G2B_FW_PRE,
636 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
637 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
638 .sku = IWL_SKU_G|IWL_SKU_N,
639 .ops = &iwl6000g2b_ops,
640 .eeprom_size = OTP_LOW_IMAGE_SIZE,
641 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
642 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
643 .num_of_queues = IWLAGN_NUM_QUEUES,
644 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
645 .mod_params = &iwlagn_mod_params,
646 .valid_tx_ant = ANT_A,
647 .valid_rx_ant = ANT_AB,
648 .pll_cfg_val = 0,
649 .set_l0s = true,
650 .use_bsm = false,
651 .pa_type = IWL_PA_SYSTEM,
652 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
653 .shadow_ram_support = true,
654 .ht_greenfield_support = true,
655 .led_compensation = 51,
656 .use_rts_for_ht = true, /* use rts/cts protection */
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_bg_cfg = {
668 .name = "6000 Series 1x2 BG 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,
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 .led_compensation = 51,
689 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
690 .supports_idle = true,
691 .adv_thermal_throttle = true,
692 .support_ct_kill_exit = true,
693 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
694 .chain_noise_scale = 1000,
695 .monitor_recover_period = IWL_MONITORING_PERIOD,
696 .max_event_log_size = 512,
697};
698
Shanyu Zhao95b13012010-04-21 11:46:33 -0700699/*
700 * "i": Internal configuration, use internal Power Amplifier
701 */
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700702struct iwl_cfg iwl6000i_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800703 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700704 .fw_name_pre = IWL6000_FW_PRE,
705 .ucode_api_max = IWL6000_UCODE_API_MAX,
706 .ucode_api_min = IWL6000_UCODE_API_MIN,
707 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
708 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700709 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700710 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700711 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700712 .num_of_queues = IWLAGN_NUM_QUEUES,
713 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700714 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700715 .valid_tx_ant = ANT_BC,
716 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700717 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700718 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700719 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700720 .pa_type = IWL_PA_INTERNAL,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700721 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
722 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700723 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700724 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700725 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700726 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700727 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700728 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700729 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800730 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800731 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800732 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700733 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700734 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700735 .sensitivity_calib_by_driver = true,
736 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800737};
738
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700739struct iwl_cfg iwl6000i_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800740 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700741 .fw_name_pre = IWL6000_FW_PRE,
742 .ucode_api_max = IWL6000_UCODE_API_MAX,
743 .ucode_api_min = IWL6000_UCODE_API_MIN,
744 .sku = IWL_SKU_A|IWL_SKU_G,
745 .ops = &iwl6000_ops,
746 .eeprom_size = OTP_LOW_IMAGE_SIZE,
747 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700748 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700749 .num_of_queues = IWLAGN_NUM_QUEUES,
750 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700751 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700752 .valid_tx_ant = ANT_BC,
753 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700754 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700755 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700756 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700757 .pa_type = IWL_PA_INTERNAL,
758 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
759 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700760 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700761 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700762 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700763 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700764 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800765 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800766 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800767 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700768 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700769 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700770 .sensitivity_calib_by_driver = true,
771 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700772};
773
774struct iwl_cfg iwl6000i_2bg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800775 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700776 .fw_name_pre = IWL6000_FW_PRE,
777 .ucode_api_max = IWL6000_UCODE_API_MAX,
778 .ucode_api_min = IWL6000_UCODE_API_MIN,
779 .sku = IWL_SKU_G,
780 .ops = &iwl6000_ops,
781 .eeprom_size = OTP_LOW_IMAGE_SIZE,
782 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700783 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700784 .num_of_queues = IWLAGN_NUM_QUEUES,
785 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700786 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700787 .valid_tx_ant = ANT_BC,
788 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700789 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700790 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700791 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700792 .pa_type = IWL_PA_INTERNAL,
793 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
794 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700795 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700796 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700797 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700798 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700799 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800800 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800801 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800802 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700803 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700804 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700805 .sensitivity_calib_by_driver = true,
806 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700807};
808
Jay Sternberge1228372009-01-19 15:30:34 -0800809struct iwl_cfg iwl6050_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800810 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800811 .fw_name_pre = IWL6050_FW_PRE,
812 .ucode_api_max = IWL6050_UCODE_API_MAX,
813 .ucode_api_min = IWL6050_UCODE_API_MIN,
814 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800815 .ops = &iwl6050_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700816 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700817 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700818 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700819 .num_of_queues = IWLAGN_NUM_QUEUES,
820 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700821 .mod_params = &iwlagn_mod_params,
Jay Sternberg542cc792009-05-08 13:44:46 -0700822 .valid_tx_ant = ANT_AB,
823 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700824 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700825 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700826 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700827 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700828 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700829 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700830 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700831 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700832 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700833 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700834 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700835 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700836 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800837 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800838 .chain_noise_scale = 1500,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800839 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700840 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700841 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700842 .sensitivity_calib_by_driver = true,
843 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800844};
845
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700846struct iwl_cfg iwl6050_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800847 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700848 .fw_name_pre = IWL6050_FW_PRE,
849 .ucode_api_max = IWL6050_UCODE_API_MAX,
850 .ucode_api_min = IWL6050_UCODE_API_MIN,
851 .sku = IWL_SKU_A|IWL_SKU_G,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800852 .ops = &iwl6050_ops,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700853 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700854 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700855 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700856 .num_of_queues = IWLAGN_NUM_QUEUES,
857 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700858 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700859 .valid_tx_ant = ANT_AB,
860 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700861 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700862 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700863 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700864 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700865 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700866 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700867 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700868 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700869 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700870 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700871 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800872 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800873 .chain_noise_scale = 1500,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800874 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700875 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700876 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700877 .sensitivity_calib_by_driver = true,
878 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700879};
880
Jay Sternberge1228372009-01-19 15:30:34 -0800881struct iwl_cfg iwl6000_3agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800882 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800883 .fw_name_pre = IWL6000_FW_PRE,
884 .ucode_api_max = IWL6000_UCODE_API_MAX,
885 .ucode_api_min = IWL6000_UCODE_API_MIN,
886 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800887 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700888 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700889 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700890 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700891 .num_of_queues = IWLAGN_NUM_QUEUES,
892 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700893 .mod_params = &iwlagn_mod_params,
Jay Sternbergc0bac762009-02-02 16:21:14 -0800894 .valid_tx_ant = ANT_ABC,
895 .valid_rx_ant = ANT_ABC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700896 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700897 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700898 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700899 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700900 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
901 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700902 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700903 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700904 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700905 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700906 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700907 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700908 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800909 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800910 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800911 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700912 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700913 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700914 .sensitivity_calib_by_driver = true,
915 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800916};
917
Jay Sternberge1228372009-01-19 15:30:34 -0800918MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
919MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
Shanyu Zhao95b13012010-04-21 11:46:33 -0700920MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
Shanyu Zhao18089722010-05-06 10:15:21 -0700921MODULE_FIRMWARE(IWL6000G2B_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));