blob: 5866ad868c321db69c6d9230335619eedfc6d868 [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
Wey-Yi Guy62cb3c62010-09-28 17:43:10 -070054#define IWL6050_UCODE_API_MAX 5
Johannes Berg670245e2010-08-23 07:56:55 -070055#define IWL6000G2_UCODE_API_MAX 5
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
Shanyu Zhao6b5ce502010-09-14 16:23:32 -070086static void iwl6050_additional_nic_config(struct iwl_priv *priv)
Abhijeet Kolekard5755932010-02-18 22:03:05 -080087{
Shanyu Zhao6b5ce502010-09-14 16:23:32 -070088 /* Indicate calibration version to uCode. */
89 if (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6)
Abhijeet Kolekard5755932010-02-18 22:03:05 -080090 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
91 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
92}
93
Shanyu Zhao02796d72010-09-14 16:23:42 -070094static void iwl6050g2_additional_nic_config(struct iwl_priv *priv)
95{
96 /* Indicate calibration version to uCode. */
97 if (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6)
98 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
99 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
100 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
101 CSR_GP_DRIVER_REG_BIT_6050_1x2);
102}
103
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700104/* NIC configuration for 6000 series */
105static void iwl6000_nic_config(struct iwl_priv *priv)
106{
Wey-Yi Guy9371d4e2009-09-11 10:38:10 -0700107 u16 radio_cfg;
108
109 radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG);
110
111 /* write radio config values to register */
112 if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) <= EEPROM_RF_CONFIG_TYPE_MAX)
113 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
114 EEPROM_RF_CFG_TYPE_MSK(radio_cfg) |
115 EEPROM_RF_CFG_STEP_MSK(radio_cfg) |
116 EEPROM_RF_CFG_DASH_MSK(radio_cfg));
117
118 /* set CSR_HW_CONFIG_REG for uCode use */
119 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
120 CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI |
121 CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700122
123 /* no locking required for register write */
Wey-Yi Guy740e7f52009-11-06 14:52:55 -0800124 if (priv->cfg->pa_type == IWL_PA_INTERNAL) {
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700125 /* 2x2 IPA phy type */
126 iwl_write32(priv, CSR_GP_DRIVER_REG,
127 CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
128 }
Shanyu Zhao6b5ce502010-09-14 16:23:32 -0700129 /* do additional nic configuration if needed */
130 if (priv->cfg->ops->nic &&
131 priv->cfg->ops->nic->additional_nic_config) {
132 priv->cfg->ops->nic->additional_nic_config(priv);
133 }
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700134}
135
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700136static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
137 .min_nrg_cck = 97,
138 .max_nrg_cck = 0, /* not used, set to 0 */
139 .auto_corr_min_ofdm = 80,
140 .auto_corr_min_ofdm_mrc = 128,
141 .auto_corr_min_ofdm_x1 = 105,
142 .auto_corr_min_ofdm_mrc_x1 = 192,
143
144 .auto_corr_max_ofdm = 145,
145 .auto_corr_max_ofdm_mrc = 232,
Wey-Yi Guy2494f632010-01-20 12:22:52 -0800146 .auto_corr_max_ofdm_x1 = 110,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700147 .auto_corr_max_ofdm_mrc_x1 = 232,
148
149 .auto_corr_min_cck = 125,
150 .auto_corr_max_cck = 175,
151 .auto_corr_min_cck_mrc = 160,
152 .auto_corr_max_cck_mrc = 310,
153 .nrg_th_cck = 97,
154 .nrg_th_ofdm = 100,
Wey-Yi Guy55036d62009-10-09 13:20:24 -0700155
156 .barker_corr_th_min = 190,
157 .barker_corr_th_min_mrc = 390,
158 .nrg_th_cca = 62,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700159};
160
161static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
162{
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700163 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700164 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700165 priv->cfg->base_params->num_of_queues =
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700166 priv->cfg->mod_params->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700167
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700168 priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700169 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
170 priv->hw_params.scd_bc_tbls_size =
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700171 priv->cfg->base_params->num_of_queues *
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700172 sizeof(struct iwlagn_scd_bc_tbl);
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700173 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
Wey-Yi Guybf3c7fd2010-06-24 14:08:05 -0700174 priv->hw_params.max_stations = IWLAGN_STATION_COUNT;
Johannes Berga194e322010-08-27 08:53:46 -0700175 priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700176
177 priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
178 priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
179
180 priv->hw_params.max_bsm_size = 0;
181 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
182 BIT(IEEE80211_BAND_5GHZ);
183 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
184
185 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
186 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
187 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
188 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
189
190 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
191 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
192
193 /* Set initial sensitivity parameters */
194 /* Set initial calibration set */
195 priv->hw_params.sens = &iwl6000_sensitivity;
Wey-Yi Guye517736a2010-04-19 18:49:40 -0700196 priv->hw_params.calib_init_cfg =
197 BIT(IWL_CALIB_XTAL) |
198 BIT(IWL_CALIB_LO) |
199 BIT(IWL_CALIB_TX_IQ) |
200 BIT(IWL_CALIB_BASE_BAND);
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700201 if (priv->cfg->need_dc_calib)
Shanyu Zhao6d6a1af2010-09-14 18:13:31 -0700202 priv->hw_params.calib_rt_cfg |= BIT(IWL_CALIB_CFG_DC_IDX);
Abhijeet Kolekar07f33f92010-01-22 14:22:47 -0800203
Wey-Yi Guya0ee74c2010-05-06 08:54:10 -0700204 priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
205
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700206 return 0;
207}
208
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700209static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
210 struct ieee80211_channel_switch *ch_switch)
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700211{
Johannes Berg246ed352010-08-23 10:46:32 +0200212 /*
213 * MULTI-FIXME
214 * See iwl_mac_channel_switch.
215 */
216 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700217 struct iwl6000_channel_switch_cmd cmd;
218 const struct iwl_channel_info *ch_info;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700219 u32 switch_time_in_usec, ucode_switch_time;
220 u16 ch;
221 u32 tsf_low;
222 u8 switch_count;
Johannes Berg246ed352010-08-23 10:46:32 +0200223 u16 beacon_interval = le16_to_cpu(ctx->timing.beacon_interval);
Johannes Berg8bd413e2010-08-23 10:46:40 +0200224 struct ieee80211_vif *vif = ctx->vif;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700225 struct iwl_host_cmd hcmd = {
226 .id = REPLY_CHANNEL_SWITCH,
227 .len = sizeof(cmd),
Wey-Yi Guy3839f7c2010-05-18 09:18:06 -0700228 .flags = CMD_SYNC,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700229 .data = &cmd,
230 };
231
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700232 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
Shanyu Zhao81e95432010-07-28 13:40:27 -0700233 ch = ch_switch->channel->hw_value;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700234 IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
Johannes Berg246ed352010-08-23 10:46:32 +0200235 ctx->active.channel, ch);
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700236 cmd.channel = cpu_to_le16(ch);
Johannes Berg246ed352010-08-23 10:46:32 +0200237 cmd.rxon_flags = ctx->staging.flags;
238 cmd.rxon_filter_flags = ctx->staging.filter_flags;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700239 switch_count = ch_switch->count;
240 tsf_low = ch_switch->timestamp & 0x0ffffffff;
241 /*
242 * calculate the ucode channel switch time
243 * adding TSF as one of the factor for when to switch
244 */
245 if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) {
246 if (switch_count > ((priv->ucode_beacon_time - tsf_low) /
247 beacon_interval)) {
248 switch_count -= (priv->ucode_beacon_time -
249 tsf_low) / beacon_interval;
250 } else
251 switch_count = 0;
252 }
253 if (switch_count <= 1)
254 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
255 else {
256 switch_time_in_usec =
257 vif->bss_conf.beacon_int * switch_count * TIME_UNIT;
258 ucode_switch_time = iwl_usecs_to_beacons(priv,
259 switch_time_in_usec,
260 beacon_interval);
261 cmd.switch_time = iwl_add_beacon_time(priv,
262 priv->ucode_beacon_time,
263 ucode_switch_time,
264 beacon_interval);
265 }
266 IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
267 cmd.switch_time);
268 ch_info = iwl_get_channel_info(priv, priv->band, ch);
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700269 if (ch_info)
270 cmd.expect_beacon = is_channel_radar(ch_info);
271 else {
272 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
Johannes Berg246ed352010-08-23 10:46:32 +0200273 ctx->active.channel, ch);
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700274 return -EFAULT;
275 }
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700276 priv->switch_rxon.channel = cmd.channel;
Wey-Yi Guy0924e5192009-11-06 14:52:54 -0800277 priv->switch_rxon.switch_in_progress = true;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700278
279 return iwl_send_cmd_sync(priv, &hcmd);
280}
281
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700282static struct iwl_lib_ops iwl6000_lib = {
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700283 .set_hw_params = iwl6000_hw_set_hw_params,
Wey-Yi Guyb305a082010-03-16 17:41:22 -0700284 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
285 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
286 .txq_set_sched = iwlagn_txq_set_sched,
287 .txq_agg_enable = iwlagn_txq_agg_enable,
288 .txq_agg_disable = iwlagn_txq_agg_disable,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700289 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
290 .txq_free_tfd = iwl_hw_txq_free_tfd,
291 .txq_init = iwl_hw_tx_queue_init,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700292 .rx_handler_setup = iwlagn_rx_handler_setup,
293 .setup_deferred_work = iwlagn_setup_deferred_work,
294 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
Wey-Yi Guy81b81762010-03-16 10:23:30 -0700295 .load_ucode = iwlagn_load_ucode,
Reinette Chatreb7a79402009-09-25 14:24:23 -0700296 .dump_nic_event_log = iwl_dump_nic_event_log,
297 .dump_nic_error_log = iwl_dump_nic_error_log,
Wey-Yi Guy696bdee2009-12-10 14:37:25 -0800298 .dump_csr = iwl_dump_csr,
Wey-Yi Guy1b3eb822010-01-15 13:43:39 -0800299 .dump_fh = iwl_dump_fh,
Wey-Yi Guy741a6262010-03-16 12:37:24 -0700300 .init_alive_start = iwlagn_init_alive_start,
301 .alive_notify = iwlagn_alive_notify,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700302 .send_tx_power = iwlagn_send_tx_power,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700303 .update_chain_flags = iwl_update_chain_flags,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700304 .set_channel_switch = iwl6000_hw_channel_switch,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700305 .apm_ops = {
Ben Cahillfadb3582009-10-23 13:42:21 -0700306 .init = iwl_apm_init,
Abhijeet Kolekard68b6032009-10-02 13:44:04 -0700307 .stop = iwl_apm_stop,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700308 .config = iwl6000_nic_config,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700309 .set_pwr_src = iwl_set_pwr_src,
310 },
311 .eeprom_ops = {
312 .regulatory_bands = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700313 EEPROM_REG_BAND_1_CHANNELS,
314 EEPROM_REG_BAND_2_CHANNELS,
315 EEPROM_REG_BAND_3_CHANNELS,
316 EEPROM_REG_BAND_4_CHANNELS,
317 EEPROM_REG_BAND_5_CHANNELS,
Shanyu Zhaof2fa1b02010-04-07 18:37:52 -0700318 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700319 EEPROM_REG_BAND_52_HT40_CHANNELS
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700320 },
321 .verify_signature = iwlcore_eeprom_verify_signature,
322 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
323 .release_semaphore = iwlcore_eeprom_release_semaphore,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700324 .calib_version = iwlagn_eeprom_calib_version,
325 .query_addr = iwlagn_eeprom_query_addr,
Wey-Yi Guyab9fd1b2009-08-21 13:34:23 -0700326 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700327 },
328 .post_associate = iwl_post_associate,
329 .isr = iwl_isr_ict,
330 .config_ap = iwl_config_ap,
331 .temp_ops = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700332 .temperature = iwlagn_temperature,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700333 .set_ct_kill = iwl6000_set_ct_threshold,
334 },
Johannes Berg1fa61b22010-04-28 08:44:52 -0700335 .manage_ibss_station = iwlagn_manage_ibss_station,
Johannes Berga194e322010-08-27 08:53:46 -0700336 .update_bcast_stations = iwl_update_bcast_stations,
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -0700337 .debugfs_ops = {
338 .rx_stats_read = iwl_ucode_rx_stats_read,
339 .tx_stats_read = iwl_ucode_tx_stats_read,
340 .general_stats_read = iwl_ucode_general_stats_read,
Wey-Yi Guyffb7d892010-07-14 08:09:55 -0700341 .bt_stats_read = iwl_ucode_bt_stats_read,
Wey-Yi Guy54a9aa62010-09-05 10:49:42 -0700342 .reply_tx_error = iwl_reply_tx_error_read,
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -0700343 },
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800344 .recover_from_tx_stall = iwl_bg_monitor_recover,
Wey-Yi Guyfa8f130c2010-03-05 14:22:46 -0800345 .check_plcp_health = iwl_good_plcp_health,
346 .check_ack_health = iwl_good_ack_health,
Wey-Yi Guy716c74b2010-06-24 13:22:36 -0700347 .txfifo_flush = iwlagn_txfifo_flush,
Wey-Yi Guy65550632010-06-24 13:18:35 -0700348 .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
Wey-Yi Guy0975cc82010-07-31 08:34:07 -0700349 .tt_ops = {
350 .lower_power_detection = iwl_tt_is_low_power_state,
351 .tt_power_mode = iwl_tt_current_power_mode,
352 .ct_kill_check = iwl_check_for_ct_kill,
353 }
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700354};
355
Johannes Berg9e4afc22010-08-23 07:56:57 -0700356static struct iwl_lib_ops iwl6000g2b_lib = {
357 .set_hw_params = iwl6000_hw_set_hw_params,
358 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
359 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
360 .txq_set_sched = iwlagn_txq_set_sched,
361 .txq_agg_enable = iwlagn_txq_agg_enable,
362 .txq_agg_disable = iwlagn_txq_agg_disable,
363 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
364 .txq_free_tfd = iwl_hw_txq_free_tfd,
365 .txq_init = iwl_hw_tx_queue_init,
Wey-Yi Guyb6e116e2010-08-23 07:57:14 -0700366 .rx_handler_setup = iwlagn_bt_rx_handler_setup,
367 .setup_deferred_work = iwlagn_bt_setup_deferred_work,
368 .cancel_deferred_work = iwlagn_bt_cancel_deferred_work,
Johannes Berg9e4afc22010-08-23 07:56:57 -0700369 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
370 .load_ucode = iwlagn_load_ucode,
371 .dump_nic_event_log = iwl_dump_nic_event_log,
372 .dump_nic_error_log = iwl_dump_nic_error_log,
373 .dump_csr = iwl_dump_csr,
374 .dump_fh = iwl_dump_fh,
375 .init_alive_start = iwlagn_init_alive_start,
376 .alive_notify = iwlagn_alive_notify,
377 .send_tx_power = iwlagn_send_tx_power,
378 .update_chain_flags = iwl_update_chain_flags,
379 .set_channel_switch = iwl6000_hw_channel_switch,
380 .apm_ops = {
381 .init = iwl_apm_init,
382 .stop = iwl_apm_stop,
383 .config = iwl6000_nic_config,
384 .set_pwr_src = iwl_set_pwr_src,
385 },
386 .eeprom_ops = {
387 .regulatory_bands = {
388 EEPROM_REG_BAND_1_CHANNELS,
389 EEPROM_REG_BAND_2_CHANNELS,
390 EEPROM_REG_BAND_3_CHANNELS,
391 EEPROM_REG_BAND_4_CHANNELS,
392 EEPROM_REG_BAND_5_CHANNELS,
393 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
394 EEPROM_REG_BAND_52_HT40_CHANNELS
395 },
396 .verify_signature = iwlcore_eeprom_verify_signature,
397 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
398 .release_semaphore = iwlcore_eeprom_release_semaphore,
399 .calib_version = iwlagn_eeprom_calib_version,
400 .query_addr = iwlagn_eeprom_query_addr,
401 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
402 },
403 .post_associate = iwl_post_associate,
404 .isr = iwl_isr_ict,
405 .config_ap = iwl_config_ap,
406 .temp_ops = {
407 .temperature = iwlagn_temperature,
408 .set_ct_kill = iwl6000_set_ct_threshold,
Johannes Berg9e4afc22010-08-23 07:56:57 -0700409 },
410 .manage_ibss_station = iwlagn_manage_ibss_station,
Johannes Berga194e322010-08-27 08:53:46 -0700411 .update_bcast_stations = iwl_update_bcast_stations,
Johannes Berg9e4afc22010-08-23 07:56:57 -0700412 .debugfs_ops = {
413 .rx_stats_read = iwl_ucode_rx_stats_read,
414 .tx_stats_read = iwl_ucode_tx_stats_read,
415 .general_stats_read = iwl_ucode_general_stats_read,
416 .bt_stats_read = iwl_ucode_bt_stats_read,
Wey-Yi Guy54a9aa62010-09-05 10:49:42 -0700417 .reply_tx_error = iwl_reply_tx_error_read,
Johannes Berg9e4afc22010-08-23 07:56:57 -0700418 },
419 .recover_from_tx_stall = iwl_bg_monitor_recover,
420 .check_plcp_health = iwl_good_plcp_health,
421 .check_ack_health = iwl_good_ack_health,
422 .txfifo_flush = iwlagn_txfifo_flush,
423 .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
424 .tt_ops = {
425 .lower_power_detection = iwl_tt_is_low_power_state,
426 .tt_power_mode = iwl_tt_current_power_mode,
427 .ct_kill_check = iwl_check_for_ct_kill,
428 }
429};
430
Shanyu Zhao6b5ce502010-09-14 16:23:32 -0700431static struct iwl_nic_ops iwl6050_nic_ops = {
432 .additional_nic_config = &iwl6050_additional_nic_config,
433};
434
Shanyu Zhao02796d72010-09-14 16:23:42 -0700435static struct iwl_nic_ops iwl6050g2_nic_ops = {
436 .additional_nic_config = &iwl6050g2_additional_nic_config,
437};
438
Emese Revfy45d5d802009-12-14 00:59:53 +0100439static const struct iwl_ops iwl6000_ops = {
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700440 .lib = &iwl6000_lib,
Wey-Yi Guy7dc77db2010-03-16 10:23:31 -0700441 .hcmd = &iwlagn_hcmd,
442 .utils = &iwlagn_hcmd_utils,
Johannes Berge932a602009-10-02 13:44:03 -0700443 .led = &iwlagn_led_ops,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800444};
445
Shanyu Zhao6b5ce502010-09-14 16:23:32 -0700446static const struct iwl_ops iwl6050_ops = {
447 .lib = &iwl6000_lib,
448 .hcmd = &iwlagn_hcmd,
449 .utils = &iwlagn_hcmd_utils,
450 .led = &iwlagn_led_ops,
451 .nic = &iwl6050_nic_ops,
452};
453
Shanyu Zhao02796d72010-09-14 16:23:42 -0700454static const struct iwl_ops iwl6050g2_ops = {
455 .lib = &iwl6000_lib,
456 .hcmd = &iwlagn_hcmd,
457 .utils = &iwlagn_hcmd_utils,
458 .led = &iwlagn_led_ops,
459 .nic = &iwl6050g2_nic_ops,
460};
461
Shanyu Zhao18089722010-05-06 10:15:21 -0700462static const struct iwl_ops iwl6000g2b_ops = {
Johannes Berg9e4afc22010-08-23 07:56:57 -0700463 .lib = &iwl6000g2b_lib,
Wey-Yi Guyb6e116e2010-08-23 07:57:14 -0700464 .hcmd = &iwlagn_bt_hcmd,
Shanyu Zhao18089722010-05-06 10:15:21 -0700465 .utils = &iwlagn_hcmd_utils,
466 .led = &iwlagn_led_ops,
467};
468
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700469static struct iwl_base_params iwl6000_base_params = {
Jay Sternberg0b5af202010-03-17 16:16:12 -0700470 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700471 .num_of_queues = IWLAGN_NUM_QUEUES,
472 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700473 .pll_cfg_val = 0,
474 .set_l0s = true,
475 .use_bsm = false,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700476 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
477 .shadow_ram_support = true,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700478 .led_compensation = 51,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700479 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
480 .supports_idle = true,
481 .adv_thermal_throttle = true,
482 .support_ct_kill_exit = true,
483 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
484 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -0700485 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Shanyu Zhao95b13012010-04-21 11:46:33 -0700486 .max_event_log_size = 512,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700487 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700488 .sensitivity_calib_by_driver = true,
489 .chain_noise_calib_by_driver = true,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700490};
491
492static struct iwl_base_params iwl6050_base_params = {
493 .eeprom_size = OTP_LOW_IMAGE_SIZE,
494 .num_of_queues = IWLAGN_NUM_QUEUES,
495 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
496 .pll_cfg_val = 0,
497 .set_l0s = true,
498 .use_bsm = false,
499 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
500 .shadow_ram_support = true,
501 .led_compensation = 51,
502 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
503 .supports_idle = true,
504 .adv_thermal_throttle = true,
505 .support_ct_kill_exit = true,
506 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
507 .chain_noise_scale = 1500,
508 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
509 .max_event_log_size = 1024,
510 .ucode_tracing = true,
511 .sensitivity_calib_by_driver = true,
512 .chain_noise_calib_by_driver = true,
513};
514
515static struct iwl_ht_params iwl6000_ht_params = {
516 .ht_greenfield_support = true,
517 .use_rts_for_aggregation = true, /* use rts/cts protection */
518};
519
520static struct iwl_bt_params iwl6000_bt_params = {
521 .bt_statistics = true,
522 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
523 .advanced_bt_coexist = true,
524 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
525 .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT,
526};
527
528struct iwl_cfg iwl6000g2a_2agn_cfg = {
529 .name = "6000 Series 2x2 AGN Gen2a",
530 .fw_name_pre = IWL6000G2A_FW_PRE,
531 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
532 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
533 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
534 .valid_tx_ant = ANT_AB,
535 .valid_rx_ant = ANT_AB,
536 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
537 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
538 .ops = &iwl6000_ops,
539 .mod_params = &iwlagn_mod_params,
540 .base_params = &iwl6000_base_params,
541 .ht_params = &iwl6000_ht_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700542 .need_dc_calib = true,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700543};
544
Shanyu Zhao18089722010-05-06 10:15:21 -0700545struct iwl_cfg iwl6000g2a_2abg_cfg = {
546 .name = "6000 Series 2x2 ABG Gen2a",
547 .fw_name_pre = IWL6000G2A_FW_PRE,
548 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
549 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
550 .sku = IWL_SKU_A|IWL_SKU_G,
Shanyu Zhao18089722010-05-06 10:15:21 -0700551 .valid_tx_ant = ANT_AB,
552 .valid_rx_ant = ANT_AB,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700553 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
554 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
555 .ops = &iwl6000_ops,
556 .mod_params = &iwlagn_mod_params,
557 .base_params = &iwl6000_base_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700558 .need_dc_calib = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700559};
560
561struct iwl_cfg iwl6000g2a_2bg_cfg = {
562 .name = "6000 Series 2x2 BG Gen2a",
563 .fw_name_pre = IWL6000G2A_FW_PRE,
564 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
565 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
566 .sku = IWL_SKU_G,
Shanyu Zhao18089722010-05-06 10:15:21 -0700567 .valid_tx_ant = ANT_AB,
568 .valid_rx_ant = ANT_AB,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700569 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
570 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
571 .ops = &iwl6000_ops,
572 .mod_params = &iwlagn_mod_params,
573 .base_params = &iwl6000_base_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700574 .need_dc_calib = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700575};
576
577struct iwl_cfg iwl6000g2b_2agn_cfg = {
578 .name = "6000 Series 2x2 AGN Gen2b",
579 .fw_name_pre = IWL6000G2B_FW_PRE,
580 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
581 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
582 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Shanyu Zhao18089722010-05-06 10:15:21 -0700583 .valid_tx_ant = ANT_AB,
584 .valid_rx_ant = ANT_AB,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700585 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
586 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
587 .ops = &iwl6000g2b_ops,
588 .mod_params = &iwlagn_mod_params,
589 .base_params = &iwl6000_base_params,
590 .bt_params = &iwl6000_bt_params,
591 .ht_params = &iwl6000_ht_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700592 .need_dc_calib = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700593 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
594 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
Shanyu Zhao18089722010-05-06 10:15:21 -0700595};
596
597struct iwl_cfg iwl6000g2b_2abg_cfg = {
598 .name = "6000 Series 2x2 ABG Gen2b",
599 .fw_name_pre = IWL6000G2B_FW_PRE,
600 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
601 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
602 .sku = IWL_SKU_A|IWL_SKU_G,
Shanyu Zhao18089722010-05-06 10:15:21 -0700603 .valid_tx_ant = ANT_AB,
604 .valid_rx_ant = ANT_AB,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700605 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
606 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
607 .ops = &iwl6000g2b_ops,
608 .mod_params = &iwlagn_mod_params,
609 .base_params = &iwl6000_base_params,
610 .bt_params = &iwl6000_bt_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700611 .need_dc_calib = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700612 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
613 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
Shanyu Zhao18089722010-05-06 10:15:21 -0700614};
615
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700616struct iwl_cfg iwl6000g2b_2bgn_cfg = {
617 .name = "6000 Series 2x2 BGN Gen2b",
618 .fw_name_pre = IWL6000G2B_FW_PRE,
619 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
620 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
621 .sku = IWL_SKU_G|IWL_SKU_N,
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700622 .valid_tx_ant = ANT_AB,
623 .valid_rx_ant = ANT_AB,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700624 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
625 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
626 .ops = &iwl6000g2b_ops,
627 .mod_params = &iwlagn_mod_params,
628 .base_params = &iwl6000_base_params,
629 .bt_params = &iwl6000_bt_params,
630 .ht_params = &iwl6000_ht_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700631 .need_dc_calib = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700632 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
633 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700634};
635
Shanyu Zhao18089722010-05-06 10:15:21 -0700636struct iwl_cfg iwl6000g2b_2bg_cfg = {
637 .name = "6000 Series 2x2 BG Gen2b",
638 .fw_name_pre = IWL6000G2B_FW_PRE,
639 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
640 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
641 .sku = IWL_SKU_G,
Shanyu Zhao18089722010-05-06 10:15:21 -0700642 .valid_tx_ant = ANT_AB,
643 .valid_rx_ant = ANT_AB,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700644 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
645 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
646 .ops = &iwl6000g2b_ops,
647 .mod_params = &iwlagn_mod_params,
648 .base_params = &iwl6000_base_params,
649 .bt_params = &iwl6000_bt_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700650 .need_dc_calib = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700651 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
652 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
Shanyu Zhao18089722010-05-06 10:15:21 -0700653};
654
655struct iwl_cfg iwl6000g2b_bgn_cfg = {
656 .name = "6000 Series 1x2 BGN Gen2b",
657 .fw_name_pre = IWL6000G2B_FW_PRE,
658 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
659 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
660 .sku = IWL_SKU_G|IWL_SKU_N,
Shanyu Zhao18089722010-05-06 10:15:21 -0700661 .valid_tx_ant = ANT_A,
662 .valid_rx_ant = ANT_AB,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700663 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
664 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
665 .ops = &iwl6000g2b_ops,
666 .mod_params = &iwlagn_mod_params,
667 .base_params = &iwl6000_base_params,
668 .bt_params = &iwl6000_bt_params,
669 .ht_params = &iwl6000_ht_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700670 .need_dc_calib = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700671 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
672 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
Shanyu Zhao18089722010-05-06 10:15:21 -0700673};
674
675struct iwl_cfg iwl6000g2b_bg_cfg = {
676 .name = "6000 Series 1x2 BG Gen2b",
677 .fw_name_pre = IWL6000G2B_FW_PRE,
678 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
679 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
680 .sku = IWL_SKU_G,
Shanyu Zhao18089722010-05-06 10:15:21 -0700681 .valid_tx_ant = ANT_A,
682 .valid_rx_ant = ANT_AB,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700683 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
684 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
685 .ops = &iwl6000g2b_ops,
686 .mod_params = &iwlagn_mod_params,
687 .base_params = &iwl6000_base_params,
688 .bt_params = &iwl6000_bt_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700689 .need_dc_calib = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700690 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
691 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
Shanyu Zhao18089722010-05-06 10:15:21 -0700692};
693
Shanyu Zhao95b13012010-04-21 11:46:33 -0700694/*
695 * "i": Internal configuration, use internal Power Amplifier
696 */
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700697struct iwl_cfg iwl6000i_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800698 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700699 .fw_name_pre = IWL6000_FW_PRE,
700 .ucode_api_max = IWL6000_UCODE_API_MAX,
701 .ucode_api_min = IWL6000_UCODE_API_MIN,
702 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700703 .valid_tx_ant = ANT_BC,
704 .valid_rx_ant = ANT_BC,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700705 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
706 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
707 .ops = &iwl6000_ops,
708 .mod_params = &iwlagn_mod_params,
709 .base_params = &iwl6000_base_params,
710 .ht_params = &iwl6000_ht_params,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700711 .pa_type = IWL_PA_INTERNAL,
Jay Sternberge1228372009-01-19 15:30:34 -0800712};
713
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700714struct iwl_cfg iwl6000i_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800715 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700716 .fw_name_pre = IWL6000_FW_PRE,
717 .ucode_api_max = IWL6000_UCODE_API_MAX,
718 .ucode_api_min = IWL6000_UCODE_API_MIN,
719 .sku = IWL_SKU_A|IWL_SKU_G,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700720 .valid_tx_ant = ANT_BC,
721 .valid_rx_ant = ANT_BC,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700722 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
723 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
724 .ops = &iwl6000_ops,
725 .mod_params = &iwlagn_mod_params,
726 .base_params = &iwl6000_base_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700727 .pa_type = IWL_PA_INTERNAL,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700728};
729
730struct iwl_cfg iwl6000i_2bg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800731 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700732 .fw_name_pre = IWL6000_FW_PRE,
733 .ucode_api_max = IWL6000_UCODE_API_MAX,
734 .ucode_api_min = IWL6000_UCODE_API_MIN,
735 .sku = IWL_SKU_G,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700736 .valid_tx_ant = ANT_BC,
737 .valid_rx_ant = ANT_BC,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700738 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
739 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
740 .ops = &iwl6000_ops,
741 .mod_params = &iwlagn_mod_params,
742 .base_params = &iwl6000_base_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700743 .pa_type = IWL_PA_INTERNAL,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700744};
745
Jay Sternberge1228372009-01-19 15:30:34 -0800746struct iwl_cfg iwl6050_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800747 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800748 .fw_name_pre = IWL6050_FW_PRE,
749 .ucode_api_max = IWL6050_UCODE_API_MAX,
750 .ucode_api_min = IWL6050_UCODE_API_MIN,
751 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Jay Sternberg542cc792009-05-08 13:44:46 -0700752 .valid_tx_ant = ANT_AB,
753 .valid_rx_ant = ANT_AB,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700754 .ops = &iwl6000_ops,
755 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
756 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
757 .mod_params = &iwlagn_mod_params,
758 .base_params = &iwl6050_base_params,
759 .ht_params = &iwl6000_ht_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700760 .need_dc_calib = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800761};
762
Shanyu Zhao03264332010-06-29 17:27:27 -0700763struct iwl_cfg iwl6050g2_bgn_cfg = {
764 .name = "6050 Series 1x2 BGN Gen2",
765 .fw_name_pre = IWL6050_FW_PRE,
766 .ucode_api_max = IWL6050_UCODE_API_MAX,
767 .ucode_api_min = IWL6050_UCODE_API_MIN,
768 .sku = IWL_SKU_G|IWL_SKU_N,
Shanyu Zhao03264332010-06-29 17:27:27 -0700769 .valid_tx_ant = ANT_A,
770 .valid_rx_ant = ANT_AB,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700771 .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION,
772 .eeprom_calib_ver = EEPROM_6050G2_TX_POWER_VERSION,
773 .ops = &iwl6050g2_ops,
774 .mod_params = &iwlagn_mod_params,
775 .base_params = &iwl6050_base_params,
776 .ht_params = &iwl6000_ht_params,
Shanyu Zhao03264332010-06-29 17:27:27 -0700777 .need_dc_calib = true,
778};
779
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700780struct iwl_cfg iwl6050_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800781 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700782 .fw_name_pre = IWL6050_FW_PRE,
783 .ucode_api_max = IWL6050_UCODE_API_MAX,
784 .ucode_api_min = IWL6050_UCODE_API_MIN,
785 .sku = IWL_SKU_A|IWL_SKU_G,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700786 .valid_tx_ant = ANT_AB,
787 .valid_rx_ant = ANT_AB,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700788 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
789 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
790 .ops = &iwl6050_ops,
791 .mod_params = &iwlagn_mod_params,
792 .base_params = &iwl6050_base_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700793 .need_dc_calib = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700794};
795
Jay Sternberge1228372009-01-19 15:30:34 -0800796struct iwl_cfg iwl6000_3agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800797 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800798 .fw_name_pre = IWL6000_FW_PRE,
799 .ucode_api_max = IWL6000_UCODE_API_MAX,
800 .ucode_api_min = IWL6000_UCODE_API_MIN,
801 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Jay Sternbergc0bac762009-02-02 16:21:14 -0800802 .valid_tx_ant = ANT_ABC,
803 .valid_rx_ant = ANT_ABC,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700804 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
805 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
806 .ops = &iwl6000_ops,
807 .mod_params = &iwlagn_mod_params,
808 .base_params = &iwl6000_base_params,
809 .ht_params = &iwl6000_ht_params,
810 .need_dc_calib = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800811};
812
Jay Sternberge1228372009-01-19 15:30:34 -0800813MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
814MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
Shanyu Zhao95b13012010-04-21 11:46:33 -0700815MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
Shanyu Zhao18089722010-05-06 10:15:21 -0700816MODULE_FIRMWARE(IWL6000G2B_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));