blob: 5f6dbd9561d7d738270bdc5caa49eec29e5518b4 [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 Guya0ee74c2010-05-06 08:54:10 -0700190 priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
191
Wey-Yi Guye517736a2010-04-19 18:49:40 -0700192 return 0;
193}
194
195static int iwl6050_hw_set_hw_params(struct iwl_priv *priv)
196{
197 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
198 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
199 priv->cfg->num_of_queues =
200 priv->cfg->mod_params->num_of_queues;
201
202 priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
203 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
204 priv->hw_params.scd_bc_tbls_size =
205 priv->cfg->num_of_queues *
206 sizeof(struct iwlagn_scd_bc_tbl);
207 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
208 priv->hw_params.max_stations = IWL5000_STATION_COUNT;
209 priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
210
211 priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
212 priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
213
214 priv->hw_params.max_bsm_size = 0;
215 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
216 BIT(IEEE80211_BAND_5GHZ);
217 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
218
219 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
220 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
221 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
222 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
223
224 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
225 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
226
227 /* Set initial sensitivity parameters */
228 /* Set initial calibration set */
229 priv->hw_params.sens = &iwl6000_sensitivity;
230 priv->hw_params.calib_init_cfg =
231 BIT(IWL_CALIB_XTAL) |
232 BIT(IWL_CALIB_DC) |
233 BIT(IWL_CALIB_LO) |
234 BIT(IWL_CALIB_TX_IQ) |
235 BIT(IWL_CALIB_BASE_BAND);
Abhijeet Kolekar07f33f92010-01-22 14:22:47 -0800236
Wey-Yi Guya0ee74c2010-05-06 08:54:10 -0700237 priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
238
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700239 return 0;
240}
241
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700242static int iwl6000_hw_channel_switch(struct iwl_priv *priv, u16 channel)
243{
244 struct iwl6000_channel_switch_cmd cmd;
245 const struct iwl_channel_info *ch_info;
246 struct iwl_host_cmd hcmd = {
247 .id = REPLY_CHANNEL_SWITCH,
248 .len = sizeof(cmd),
249 .flags = CMD_SIZE_HUGE,
250 .data = &cmd,
251 };
252
253 IWL_DEBUG_11H(priv, "channel switch from %d to %d\n",
254 priv->active_rxon.channel, channel);
255
256 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
257 cmd.channel = cpu_to_le16(channel);
Wey-Yi Guy0924e5192009-11-06 14:52:54 -0800258 cmd.rxon_flags = priv->staging_rxon.flags;
259 cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700260 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
261 ch_info = iwl_get_channel_info(priv, priv->band, channel);
262 if (ch_info)
263 cmd.expect_beacon = is_channel_radar(ch_info);
264 else {
265 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
266 priv->active_rxon.channel, channel);
267 return -EFAULT;
268 }
Wey-Yi Guy0924e5192009-11-06 14:52:54 -0800269 priv->switch_rxon.channel = cpu_to_le16(channel);
270 priv->switch_rxon.switch_in_progress = true;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700271
272 return iwl_send_cmd_sync(priv, &hcmd);
273}
274
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700275static struct iwl_lib_ops iwl6000_lib = {
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700276 .set_hw_params = iwl6000_hw_set_hw_params,
Wey-Yi Guyb305a082010-03-16 17:41:22 -0700277 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
278 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
279 .txq_set_sched = iwlagn_txq_set_sched,
280 .txq_agg_enable = iwlagn_txq_agg_enable,
281 .txq_agg_disable = iwlagn_txq_agg_disable,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700282 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
283 .txq_free_tfd = iwl_hw_txq_free_tfd,
284 .txq_init = iwl_hw_tx_queue_init,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700285 .rx_handler_setup = iwlagn_rx_handler_setup,
286 .setup_deferred_work = iwlagn_setup_deferred_work,
287 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
Wey-Yi Guy81b81762010-03-16 10:23:30 -0700288 .load_ucode = iwlagn_load_ucode,
Reinette Chatreb7a79402009-09-25 14:24:23 -0700289 .dump_nic_event_log = iwl_dump_nic_event_log,
290 .dump_nic_error_log = iwl_dump_nic_error_log,
Wey-Yi Guy696bdee2009-12-10 14:37:25 -0800291 .dump_csr = iwl_dump_csr,
Wey-Yi Guy1b3eb822010-01-15 13:43:39 -0800292 .dump_fh = iwl_dump_fh,
Wey-Yi Guy741a6262010-03-16 12:37:24 -0700293 .init_alive_start = iwlagn_init_alive_start,
294 .alive_notify = iwlagn_alive_notify,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700295 .send_tx_power = iwlagn_send_tx_power,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700296 .update_chain_flags = iwl_update_chain_flags,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700297 .set_channel_switch = iwl6000_hw_channel_switch,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700298 .apm_ops = {
Ben Cahillfadb3582009-10-23 13:42:21 -0700299 .init = iwl_apm_init,
Abhijeet Kolekard68b6032009-10-02 13:44:04 -0700300 .stop = iwl_apm_stop,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700301 .config = iwl6000_nic_config,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700302 .set_pwr_src = iwl_set_pwr_src,
303 },
304 .eeprom_ops = {
305 .regulatory_bands = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700306 EEPROM_REG_BAND_1_CHANNELS,
307 EEPROM_REG_BAND_2_CHANNELS,
308 EEPROM_REG_BAND_3_CHANNELS,
309 EEPROM_REG_BAND_4_CHANNELS,
310 EEPROM_REG_BAND_5_CHANNELS,
Shanyu Zhaof2fa1b02010-04-07 18:37:52 -0700311 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700312 EEPROM_REG_BAND_52_HT40_CHANNELS
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700313 },
314 .verify_signature = iwlcore_eeprom_verify_signature,
315 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
316 .release_semaphore = iwlcore_eeprom_release_semaphore,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700317 .calib_version = iwlagn_eeprom_calib_version,
318 .query_addr = iwlagn_eeprom_query_addr,
Wey-Yi Guyab9fd1b2009-08-21 13:34:23 -0700319 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700320 },
321 .post_associate = iwl_post_associate,
322 .isr = iwl_isr_ict,
323 .config_ap = iwl_config_ap,
324 .temp_ops = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700325 .temperature = iwlagn_temperature,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700326 .set_ct_kill = iwl6000_set_ct_threshold,
327 },
Johannes Berg1fa61b22010-04-28 08:44:52 -0700328 .manage_ibss_station = iwlagn_manage_ibss_station,
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -0700329 .debugfs_ops = {
330 .rx_stats_read = iwl_ucode_rx_stats_read,
331 .tx_stats_read = iwl_ucode_tx_stats_read,
332 .general_stats_read = iwl_ucode_general_stats_read,
333 },
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800334 .recover_from_tx_stall = iwl_bg_monitor_recover,
Wey-Yi Guyfa8f130c2010-03-05 14:22:46 -0800335 .check_plcp_health = iwl_good_plcp_health,
336 .check_ack_health = iwl_good_ack_health,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700337};
338
Emese Revfy45d5d802009-12-14 00:59:53 +0100339static const struct iwl_ops iwl6000_ops = {
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700340 .lib = &iwl6000_lib,
Wey-Yi Guy7dc77db2010-03-16 10:23:31 -0700341 .hcmd = &iwlagn_hcmd,
342 .utils = &iwlagn_hcmd_utils,
Johannes Berge932a602009-10-02 13:44:03 -0700343 .led = &iwlagn_led_ops,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800344};
345
Shanyu Zhao18089722010-05-06 10:15:21 -0700346static void do_not_send_bt_config(struct iwl_priv *priv)
347{
348}
349
350static struct iwl_hcmd_ops iwl6000g2b_hcmd = {
351 .rxon_assoc = iwlagn_send_rxon_assoc,
352 .commit_rxon = iwl_commit_rxon,
353 .set_rxon_chain = iwl_set_rxon_chain,
354 .set_tx_ant = iwlagn_send_tx_ant_config,
355 .send_bt_config = do_not_send_bt_config,
356};
357
358static const struct iwl_ops iwl6000g2b_ops = {
359 .lib = &iwl6000_lib,
360 .hcmd = &iwl6000g2b_hcmd,
361 .utils = &iwlagn_hcmd_utils,
362 .led = &iwlagn_led_ops,
363};
364
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800365static struct iwl_lib_ops iwl6050_lib = {
Wey-Yi Guye517736a2010-04-19 18:49:40 -0700366 .set_hw_params = iwl6050_hw_set_hw_params,
Wey-Yi Guyb305a082010-03-16 17:41:22 -0700367 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
368 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
369 .txq_set_sched = iwlagn_txq_set_sched,
370 .txq_agg_enable = iwlagn_txq_agg_enable,
371 .txq_agg_disable = iwlagn_txq_agg_disable,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800372 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
373 .txq_free_tfd = iwl_hw_txq_free_tfd,
374 .txq_init = iwl_hw_tx_queue_init,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700375 .rx_handler_setup = iwlagn_rx_handler_setup,
376 .setup_deferred_work = iwlagn_setup_deferred_work,
377 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
Wey-Yi Guy81b81762010-03-16 10:23:30 -0700378 .load_ucode = iwlagn_load_ucode,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800379 .dump_nic_event_log = iwl_dump_nic_event_log,
380 .dump_nic_error_log = iwl_dump_nic_error_log,
381 .dump_csr = iwl_dump_csr,
382 .dump_fh = iwl_dump_fh,
Wey-Yi Guy741a6262010-03-16 12:37:24 -0700383 .init_alive_start = iwlagn_init_alive_start,
384 .alive_notify = iwlagn_alive_notify,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700385 .send_tx_power = iwlagn_send_tx_power,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800386 .update_chain_flags = iwl_update_chain_flags,
387 .set_channel_switch = iwl6000_hw_channel_switch,
388 .apm_ops = {
389 .init = iwl_apm_init,
390 .stop = iwl_apm_stop,
391 .config = iwl6000_nic_config,
392 .set_pwr_src = iwl_set_pwr_src,
393 },
394 .eeprom_ops = {
395 .regulatory_bands = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700396 EEPROM_REG_BAND_1_CHANNELS,
397 EEPROM_REG_BAND_2_CHANNELS,
398 EEPROM_REG_BAND_3_CHANNELS,
399 EEPROM_REG_BAND_4_CHANNELS,
400 EEPROM_REG_BAND_5_CHANNELS,
Shanyu Zhaof2fa1b02010-04-07 18:37:52 -0700401 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700402 EEPROM_REG_BAND_52_HT40_CHANNELS
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800403 },
404 .verify_signature = iwlcore_eeprom_verify_signature,
405 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
406 .release_semaphore = iwlcore_eeprom_release_semaphore,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700407 .calib_version = iwlagn_eeprom_calib_version,
408 .query_addr = iwlagn_eeprom_query_addr,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800409 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
410 },
411 .post_associate = iwl_post_associate,
412 .isr = iwl_isr_ict,
413 .config_ap = iwl_config_ap,
414 .temp_ops = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700415 .temperature = iwlagn_temperature,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800416 .set_ct_kill = iwl6000_set_ct_threshold,
417 .set_calib_version = iwl6050_set_calib_version,
418 },
Johannes Berg1fa61b22010-04-28 08:44:52 -0700419 .manage_ibss_station = iwlagn_manage_ibss_station,
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -0700420 .debugfs_ops = {
421 .rx_stats_read = iwl_ucode_rx_stats_read,
422 .tx_stats_read = iwl_ucode_tx_stats_read,
423 .general_stats_read = iwl_ucode_general_stats_read,
424 },
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800425 .recover_from_tx_stall = iwl_bg_monitor_recover,
Wey-Yi Guyfa8f130c2010-03-05 14:22:46 -0800426 .check_plcp_health = iwl_good_plcp_health,
427 .check_ack_health = iwl_good_ack_health,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800428};
429
430static const struct iwl_ops iwl6050_ops = {
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800431 .lib = &iwl6050_lib,
Wey-Yi Guy7dc77db2010-03-16 10:23:31 -0700432 .hcmd = &iwlagn_hcmd,
433 .utils = &iwlagn_hcmd_utils,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800434 .led = &iwlagn_led_ops,
435};
436
Shanyu Zhao95b13012010-04-21 11:46:33 -0700437
438struct iwl_cfg iwl6000g2a_2agn_cfg = {
439 .name = "6000 Series 2x2 AGN Gen2a",
440 .fw_name_pre = IWL6000G2A_FW_PRE,
Shanyu Zhao4b3e8062010-04-07 18:06:36 -0700441 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
442 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700443 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
444 .ops = &iwl6000_ops,
445 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Shanyu Zhao4b3e8062010-04-07 18:06:36 -0700446 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
447 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700448 .num_of_queues = IWLAGN_NUM_QUEUES,
449 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
450 .mod_params = &iwlagn_mod_params,
451 .valid_tx_ant = ANT_AB,
452 .valid_rx_ant = ANT_AB,
453 .pll_cfg_val = 0,
454 .set_l0s = true,
455 .use_bsm = false,
Wey-Yi Guy33e6f812010-04-09 09:36:11 -0700456 .pa_type = IWL_PA_SYSTEM,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700457 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
458 .shadow_ram_support = true,
459 .ht_greenfield_support = true,
460 .led_compensation = 51,
461 .use_rts_for_ht = true, /* use rts/cts protection */
462 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
463 .supports_idle = true,
464 .adv_thermal_throttle = true,
465 .support_ct_kill_exit = true,
466 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
467 .chain_noise_scale = 1000,
468 .monitor_recover_period = IWL_MONITORING_PERIOD,
Shanyu Zhao95b13012010-04-21 11:46:33 -0700469 .max_event_log_size = 512,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700470 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700471 .sensitivity_calib_by_driver = true,
472 .chain_noise_calib_by_driver = true,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700473};
474
Shanyu Zhao18089722010-05-06 10:15:21 -0700475struct iwl_cfg iwl6000g2a_2abg_cfg = {
476 .name = "6000 Series 2x2 ABG Gen2a",
477 .fw_name_pre = IWL6000G2A_FW_PRE,
478 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
479 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
480 .sku = IWL_SKU_A|IWL_SKU_G,
481 .ops = &iwl6000_ops,
482 .eeprom_size = OTP_LOW_IMAGE_SIZE,
483 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
484 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
485 .num_of_queues = IWLAGN_NUM_QUEUES,
486 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
487 .mod_params = &iwlagn_mod_params,
488 .valid_tx_ant = ANT_AB,
489 .valid_rx_ant = ANT_AB,
490 .pll_cfg_val = 0,
491 .set_l0s = true,
492 .use_bsm = false,
493 .pa_type = IWL_PA_SYSTEM,
494 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
495 .shadow_ram_support = true,
496 .led_compensation = 51,
497 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
498 .supports_idle = true,
499 .adv_thermal_throttle = true,
500 .support_ct_kill_exit = true,
501 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
502 .chain_noise_scale = 1000,
503 .monitor_recover_period = IWL_MONITORING_PERIOD,
504 .max_event_log_size = 512,
505};
506
507struct iwl_cfg iwl6000g2a_2bg_cfg = {
508 .name = "6000 Series 2x2 BG Gen2a",
509 .fw_name_pre = IWL6000G2A_FW_PRE,
510 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
511 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
512 .sku = IWL_SKU_G,
513 .ops = &iwl6000_ops,
514 .eeprom_size = OTP_LOW_IMAGE_SIZE,
515 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
516 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
517 .num_of_queues = IWLAGN_NUM_QUEUES,
518 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
519 .mod_params = &iwlagn_mod_params,
520 .valid_tx_ant = ANT_AB,
521 .valid_rx_ant = ANT_AB,
522 .pll_cfg_val = 0,
523 .set_l0s = true,
524 .use_bsm = false,
525 .pa_type = IWL_PA_SYSTEM,
526 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
527 .shadow_ram_support = true,
528 .led_compensation = 51,
529 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
530 .supports_idle = true,
531 .adv_thermal_throttle = true,
532 .support_ct_kill_exit = true,
533 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
534 .chain_noise_scale = 1000,
535 .monitor_recover_period = IWL_MONITORING_PERIOD,
536 .max_event_log_size = 512,
537};
538
539struct iwl_cfg iwl6000g2b_2agn_cfg = {
540 .name = "6000 Series 2x2 AGN Gen2b",
541 .fw_name_pre = IWL6000G2B_FW_PRE,
542 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
543 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
544 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
545 .ops = &iwl6000g2b_ops,
546 .eeprom_size = OTP_LOW_IMAGE_SIZE,
547 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
548 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
549 .num_of_queues = IWLAGN_NUM_QUEUES,
550 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
551 .mod_params = &iwlagn_mod_params,
552 .valid_tx_ant = ANT_AB,
553 .valid_rx_ant = ANT_AB,
554 .pll_cfg_val = 0,
555 .set_l0s = true,
556 .use_bsm = false,
557 .pa_type = IWL_PA_SYSTEM,
558 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
559 .shadow_ram_support = true,
560 .ht_greenfield_support = true,
561 .led_compensation = 51,
562 .use_rts_for_ht = true, /* use rts/cts protection */
563 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
564 .supports_idle = true,
565 .adv_thermal_throttle = true,
566 .support_ct_kill_exit = true,
567 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
568 .chain_noise_scale = 1000,
569 .monitor_recover_period = IWL_MONITORING_PERIOD,
570 .max_event_log_size = 512,
571};
572
573struct iwl_cfg iwl6000g2b_2abg_cfg = {
574 .name = "6000 Series 2x2 ABG Gen2b",
575 .fw_name_pre = IWL6000G2B_FW_PRE,
576 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
577 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
578 .sku = IWL_SKU_A|IWL_SKU_G,
579 .ops = &iwl6000g2b_ops,
580 .eeprom_size = OTP_LOW_IMAGE_SIZE,
581 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
582 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
583 .num_of_queues = IWLAGN_NUM_QUEUES,
584 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
585 .mod_params = &iwlagn_mod_params,
586 .valid_tx_ant = ANT_AB,
587 .valid_rx_ant = ANT_AB,
588 .pll_cfg_val = 0,
589 .set_l0s = true,
590 .use_bsm = false,
591 .pa_type = IWL_PA_SYSTEM,
592 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
593 .shadow_ram_support = true,
594 .led_compensation = 51,
595 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
596 .supports_idle = true,
597 .adv_thermal_throttle = true,
598 .support_ct_kill_exit = true,
599 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
600 .chain_noise_scale = 1000,
601 .monitor_recover_period = IWL_MONITORING_PERIOD,
602 .max_event_log_size = 512,
603};
604
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700605struct iwl_cfg iwl6000g2b_2bgn_cfg = {
606 .name = "6000 Series 2x2 BGN Gen2b",
607 .fw_name_pre = IWL6000G2B_FW_PRE,
608 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
609 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
610 .sku = IWL_SKU_G|IWL_SKU_N,
611 .ops = &iwl6000g2b_ops,
612 .eeprom_size = OTP_LOW_IMAGE_SIZE,
613 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
614 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
615 .num_of_queues = IWLAGN_NUM_QUEUES,
616 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
617 .mod_params = &iwlagn_mod_params,
618 .valid_tx_ant = ANT_AB,
619 .valid_rx_ant = ANT_AB,
620 .pll_cfg_val = 0,
621 .set_l0s = true,
622 .use_bsm = false,
623 .pa_type = IWL_PA_SYSTEM,
624 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
625 .shadow_ram_support = true,
626 .ht_greenfield_support = true,
627 .led_compensation = 51,
628 .use_rts_for_ht = true, /* use rts/cts protection */
629 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
630 .supports_idle = true,
631 .adv_thermal_throttle = true,
632 .support_ct_kill_exit = true,
633 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
634 .chain_noise_scale = 1000,
635 .monitor_recover_period = IWL_MONITORING_PERIOD,
636 .max_event_log_size = 512,
637};
638
Shanyu Zhao18089722010-05-06 10:15:21 -0700639struct iwl_cfg iwl6000g2b_2bg_cfg = {
640 .name = "6000 Series 2x2 BG Gen2b",
641 .fw_name_pre = IWL6000G2B_FW_PRE,
642 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
643 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
644 .sku = IWL_SKU_G,
645 .ops = &iwl6000g2b_ops,
646 .eeprom_size = OTP_LOW_IMAGE_SIZE,
647 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
648 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
649 .num_of_queues = IWLAGN_NUM_QUEUES,
650 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
651 .mod_params = &iwlagn_mod_params,
652 .valid_tx_ant = ANT_AB,
653 .valid_rx_ant = ANT_AB,
654 .pll_cfg_val = 0,
655 .set_l0s = true,
656 .use_bsm = false,
657 .pa_type = IWL_PA_SYSTEM,
658 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
659 .shadow_ram_support = true,
660 .led_compensation = 51,
661 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
662 .supports_idle = true,
663 .adv_thermal_throttle = true,
664 .support_ct_kill_exit = true,
665 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
666 .chain_noise_scale = 1000,
667 .monitor_recover_period = IWL_MONITORING_PERIOD,
668 .max_event_log_size = 512,
669};
670
671struct iwl_cfg iwl6000g2b_bgn_cfg = {
672 .name = "6000 Series 1x2 BGN Gen2b",
673 .fw_name_pre = IWL6000G2B_FW_PRE,
674 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
675 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
676 .sku = IWL_SKU_G|IWL_SKU_N,
677 .ops = &iwl6000g2b_ops,
678 .eeprom_size = OTP_LOW_IMAGE_SIZE,
679 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
680 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
681 .num_of_queues = IWLAGN_NUM_QUEUES,
682 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
683 .mod_params = &iwlagn_mod_params,
684 .valid_tx_ant = ANT_A,
685 .valid_rx_ant = ANT_AB,
686 .pll_cfg_val = 0,
687 .set_l0s = true,
688 .use_bsm = false,
689 .pa_type = IWL_PA_SYSTEM,
690 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
691 .shadow_ram_support = true,
692 .ht_greenfield_support = true,
693 .led_compensation = 51,
694 .use_rts_for_ht = true, /* use rts/cts protection */
695 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
696 .supports_idle = true,
697 .adv_thermal_throttle = true,
698 .support_ct_kill_exit = true,
699 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
700 .chain_noise_scale = 1000,
701 .monitor_recover_period = IWL_MONITORING_PERIOD,
702 .max_event_log_size = 512,
703};
704
705struct iwl_cfg iwl6000g2b_bg_cfg = {
706 .name = "6000 Series 1x2 BG Gen2b",
707 .fw_name_pre = IWL6000G2B_FW_PRE,
708 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
709 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
710 .sku = IWL_SKU_G,
711 .ops = &iwl6000g2b_ops,
712 .eeprom_size = OTP_LOW_IMAGE_SIZE,
713 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
714 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
715 .num_of_queues = IWLAGN_NUM_QUEUES,
716 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
717 .mod_params = &iwlagn_mod_params,
718 .valid_tx_ant = ANT_A,
719 .valid_rx_ant = ANT_AB,
720 .pll_cfg_val = 0,
721 .set_l0s = true,
722 .use_bsm = false,
723 .pa_type = IWL_PA_SYSTEM,
724 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
725 .shadow_ram_support = true,
726 .led_compensation = 51,
727 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
728 .supports_idle = true,
729 .adv_thermal_throttle = true,
730 .support_ct_kill_exit = true,
731 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
732 .chain_noise_scale = 1000,
733 .monitor_recover_period = IWL_MONITORING_PERIOD,
734 .max_event_log_size = 512,
735};
736
Shanyu Zhao95b13012010-04-21 11:46:33 -0700737/*
738 * "i": Internal configuration, use internal Power Amplifier
739 */
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700740struct iwl_cfg iwl6000i_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800741 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700742 .fw_name_pre = IWL6000_FW_PRE,
743 .ucode_api_max = IWL6000_UCODE_API_MAX,
744 .ucode_api_min = IWL6000_UCODE_API_MIN,
745 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
746 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700747 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700748 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700749 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700750 .num_of_queues = IWLAGN_NUM_QUEUES,
751 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700752 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700753 .valid_tx_ant = ANT_BC,
754 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700755 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700756 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700757 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700758 .pa_type = IWL_PA_INTERNAL,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700759 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
760 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700761 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700762 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700763 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700764 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700765 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700766 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700767 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800768 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800769 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800770 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700771 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700772 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700773 .sensitivity_calib_by_driver = true,
774 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800775};
776
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700777struct iwl_cfg iwl6000i_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800778 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700779 .fw_name_pre = IWL6000_FW_PRE,
780 .ucode_api_max = IWL6000_UCODE_API_MAX,
781 .ucode_api_min = IWL6000_UCODE_API_MIN,
782 .sku = IWL_SKU_A|IWL_SKU_G,
783 .ops = &iwl6000_ops,
784 .eeprom_size = OTP_LOW_IMAGE_SIZE,
785 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700786 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700787 .num_of_queues = IWLAGN_NUM_QUEUES,
788 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700789 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700790 .valid_tx_ant = ANT_BC,
791 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700792 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700793 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700794 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700795 .pa_type = IWL_PA_INTERNAL,
796 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
797 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700798 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700799 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700800 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700801 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700802 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800803 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800804 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800805 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700806 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700807 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700808 .sensitivity_calib_by_driver = true,
809 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700810};
811
812struct iwl_cfg iwl6000i_2bg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800813 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700814 .fw_name_pre = IWL6000_FW_PRE,
815 .ucode_api_max = IWL6000_UCODE_API_MAX,
816 .ucode_api_min = IWL6000_UCODE_API_MIN,
817 .sku = IWL_SKU_G,
818 .ops = &iwl6000_ops,
819 .eeprom_size = OTP_LOW_IMAGE_SIZE,
820 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700821 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700822 .num_of_queues = IWLAGN_NUM_QUEUES,
823 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700824 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700825 .valid_tx_ant = ANT_BC,
826 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700827 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700828 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700829 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700830 .pa_type = IWL_PA_INTERNAL,
831 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
832 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700833 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700834 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700835 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700836 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700837 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800838 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800839 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800840 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700841 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700842 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700843 .sensitivity_calib_by_driver = true,
844 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700845};
846
Jay Sternberge1228372009-01-19 15:30:34 -0800847struct iwl_cfg iwl6050_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800848 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800849 .fw_name_pre = IWL6050_FW_PRE,
850 .ucode_api_max = IWL6050_UCODE_API_MAX,
851 .ucode_api_min = IWL6050_UCODE_API_MIN,
852 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800853 .ops = &iwl6050_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700854 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700855 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700856 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700857 .num_of_queues = IWLAGN_NUM_QUEUES,
858 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700859 .mod_params = &iwlagn_mod_params,
Jay Sternberg542cc792009-05-08 13:44:46 -0700860 .valid_tx_ant = ANT_AB,
861 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700862 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700863 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700864 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700865 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700866 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700867 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700868 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700869 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700870 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700871 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700872 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700873 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700874 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800875 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800876 .chain_noise_scale = 1500,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800877 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700878 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700879 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700880 .sensitivity_calib_by_driver = true,
881 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800882};
883
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700884struct iwl_cfg iwl6050_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800885 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700886 .fw_name_pre = IWL6050_FW_PRE,
887 .ucode_api_max = IWL6050_UCODE_API_MAX,
888 .ucode_api_min = IWL6050_UCODE_API_MIN,
889 .sku = IWL_SKU_A|IWL_SKU_G,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800890 .ops = &iwl6050_ops,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700891 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700892 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700893 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700894 .num_of_queues = IWLAGN_NUM_QUEUES,
895 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700896 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700897 .valid_tx_ant = ANT_AB,
898 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700899 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700900 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700901 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700902 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700903 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700904 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700905 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700906 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700907 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700908 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700909 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800910 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800911 .chain_noise_scale = 1500,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800912 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700913 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700914 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700915 .sensitivity_calib_by_driver = true,
916 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700917};
918
Jay Sternberge1228372009-01-19 15:30:34 -0800919struct iwl_cfg iwl6000_3agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800920 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800921 .fw_name_pre = IWL6000_FW_PRE,
922 .ucode_api_max = IWL6000_UCODE_API_MAX,
923 .ucode_api_min = IWL6000_UCODE_API_MIN,
924 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800925 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700926 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700927 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700928 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700929 .num_of_queues = IWLAGN_NUM_QUEUES,
930 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700931 .mod_params = &iwlagn_mod_params,
Jay Sternbergc0bac762009-02-02 16:21:14 -0800932 .valid_tx_ant = ANT_ABC,
933 .valid_rx_ant = ANT_ABC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700934 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700935 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700936 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700937 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700938 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
939 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700940 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700941 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700942 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700943 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700944 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700945 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700946 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800947 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800948 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800949 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700950 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700951 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700952 .sensitivity_calib_by_driver = true,
953 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800954};
955
Jay Sternberge1228372009-01-19 15:30:34 -0800956MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
957MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
Shanyu Zhao95b13012010-04-21 11:46:33 -0700958MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
Shanyu Zhao18089722010-05-06 10:15:21 -0700959MODULE_FIRMWARE(IWL6000G2B_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));