blob: e1959fbafd0012efd0425b2e130a94385bb498a5 [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. */
Wey-Yi Guy178d1592010-06-15 16:14:53 -070087static void iwl6000_set_calib_version(struct iwl_priv *priv)
Abhijeet Kolekard5755932010-02-18 22:03:05 -080088{
Wey-Yi Guy178d1592010-06-15 16:14:53 -070089 if (priv->cfg->need_dc_calib &&
90 (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6))
Abhijeet Kolekard5755932010-02-18 22:03:05 -080091 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
92 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
93}
94
Wey-Yi Guy65b79982009-07-31 14:28:07 -070095/* NIC configuration for 6000 series */
96static void iwl6000_nic_config(struct iwl_priv *priv)
97{
Wey-Yi Guy9371d4e2009-09-11 10:38:10 -070098 u16 radio_cfg;
99
100 radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG);
101
102 /* write radio config values to register */
103 if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) <= EEPROM_RF_CONFIG_TYPE_MAX)
104 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
105 EEPROM_RF_CFG_TYPE_MSK(radio_cfg) |
106 EEPROM_RF_CFG_STEP_MSK(radio_cfg) |
107 EEPROM_RF_CFG_DASH_MSK(radio_cfg));
108
109 /* set CSR_HW_CONFIG_REG for uCode use */
110 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
111 CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI |
112 CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700113
114 /* no locking required for register write */
Wey-Yi Guy740e7f52009-11-06 14:52:55 -0800115 if (priv->cfg->pa_type == IWL_PA_INTERNAL) {
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700116 /* 2x2 IPA phy type */
117 iwl_write32(priv, CSR_GP_DRIVER_REG,
118 CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
119 }
120 /* else do nothing, uCode configured */
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800121 if (priv->cfg->ops->lib->temp_ops.set_calib_version)
122 priv->cfg->ops->lib->temp_ops.set_calib_version(priv);
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700123}
124
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700125static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
126 .min_nrg_cck = 97,
127 .max_nrg_cck = 0, /* not used, set to 0 */
128 .auto_corr_min_ofdm = 80,
129 .auto_corr_min_ofdm_mrc = 128,
130 .auto_corr_min_ofdm_x1 = 105,
131 .auto_corr_min_ofdm_mrc_x1 = 192,
132
133 .auto_corr_max_ofdm = 145,
134 .auto_corr_max_ofdm_mrc = 232,
Wey-Yi Guy2494f632010-01-20 12:22:52 -0800135 .auto_corr_max_ofdm_x1 = 110,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700136 .auto_corr_max_ofdm_mrc_x1 = 232,
137
138 .auto_corr_min_cck = 125,
139 .auto_corr_max_cck = 175,
140 .auto_corr_min_cck_mrc = 160,
141 .auto_corr_max_cck_mrc = 310,
142 .nrg_th_cck = 97,
143 .nrg_th_ofdm = 100,
Wey-Yi Guy55036d62009-10-09 13:20:24 -0700144
145 .barker_corr_th_min = 190,
146 .barker_corr_th_min_mrc = 390,
147 .nrg_th_cca = 62,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700148};
149
150static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
151{
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700152 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700153 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700154 priv->cfg->num_of_queues =
155 priv->cfg->mod_params->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700156
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700157 priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700158 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
159 priv->hw_params.scd_bc_tbls_size =
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700160 priv->cfg->num_of_queues *
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700161 sizeof(struct iwlagn_scd_bc_tbl);
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700162 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
163 priv->hw_params.max_stations = IWL5000_STATION_COUNT;
164 priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
165
166 priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
167 priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
168
169 priv->hw_params.max_bsm_size = 0;
170 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
171 BIT(IEEE80211_BAND_5GHZ);
172 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
173
174 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
175 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
176 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
177 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
178
179 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
180 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
181
182 /* Set initial sensitivity parameters */
183 /* Set initial calibration set */
184 priv->hw_params.sens = &iwl6000_sensitivity;
Wey-Yi Guye5177362010-04-19 18:49:40 -0700185 priv->hw_params.calib_init_cfg =
186 BIT(IWL_CALIB_XTAL) |
187 BIT(IWL_CALIB_LO) |
188 BIT(IWL_CALIB_TX_IQ) |
189 BIT(IWL_CALIB_BASE_BAND);
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700190 if (priv->cfg->need_dc_calib)
191 priv->hw_params.calib_init_cfg |= BIT(IWL_CALIB_DC);
Abhijeet Kolekar07f33f92010-01-22 14:22:47 -0800192
Wey-Yi Guya0ee74c2010-05-06 08:54:10 -0700193 priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
194
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700195 return 0;
196}
197
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700198static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
199 struct ieee80211_channel_switch *ch_switch)
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700200{
201 struct iwl6000_channel_switch_cmd cmd;
202 const struct iwl_channel_info *ch_info;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700203 u32 switch_time_in_usec, ucode_switch_time;
204 u16 ch;
205 u32 tsf_low;
206 u8 switch_count;
207 u16 beacon_interval = le16_to_cpu(priv->rxon_timing.beacon_interval);
208 struct ieee80211_vif *vif = priv->vif;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700209 struct iwl_host_cmd hcmd = {
210 .id = REPLY_CHANNEL_SWITCH,
211 .len = sizeof(cmd),
Wey-Yi Guy3839f7c2010-05-18 09:18:06 -0700212 .flags = CMD_SYNC,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700213 .data = &cmd,
214 };
215
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700216 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700217 ch = ieee80211_frequency_to_channel(ch_switch->channel->center_freq);
218 IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
219 priv->active_rxon.channel, ch);
220 cmd.channel = cpu_to_le16(ch);
Wey-Yi Guy0924e5192009-11-06 14:52:54 -0800221 cmd.rxon_flags = priv->staging_rxon.flags;
222 cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700223 switch_count = ch_switch->count;
224 tsf_low = ch_switch->timestamp & 0x0ffffffff;
225 /*
226 * calculate the ucode channel switch time
227 * adding TSF as one of the factor for when to switch
228 */
229 if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) {
230 if (switch_count > ((priv->ucode_beacon_time - tsf_low) /
231 beacon_interval)) {
232 switch_count -= (priv->ucode_beacon_time -
233 tsf_low) / beacon_interval;
234 } else
235 switch_count = 0;
236 }
237 if (switch_count <= 1)
238 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
239 else {
240 switch_time_in_usec =
241 vif->bss_conf.beacon_int * switch_count * TIME_UNIT;
242 ucode_switch_time = iwl_usecs_to_beacons(priv,
243 switch_time_in_usec,
244 beacon_interval);
245 cmd.switch_time = iwl_add_beacon_time(priv,
246 priv->ucode_beacon_time,
247 ucode_switch_time,
248 beacon_interval);
249 }
250 IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
251 cmd.switch_time);
252 ch_info = iwl_get_channel_info(priv, priv->band, ch);
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700253 if (ch_info)
254 cmd.expect_beacon = is_channel_radar(ch_info);
255 else {
256 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700257 priv->active_rxon.channel, ch);
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700258 return -EFAULT;
259 }
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700260 priv->switch_rxon.channel = cmd.channel;
Wey-Yi Guy0924e5192009-11-06 14:52:54 -0800261 priv->switch_rxon.switch_in_progress = true;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700262
263 return iwl_send_cmd_sync(priv, &hcmd);
264}
265
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700266static struct iwl_lib_ops iwl6000_lib = {
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700267 .set_hw_params = iwl6000_hw_set_hw_params,
Wey-Yi Guyb305a082010-03-16 17:41:22 -0700268 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
269 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
270 .txq_set_sched = iwlagn_txq_set_sched,
271 .txq_agg_enable = iwlagn_txq_agg_enable,
272 .txq_agg_disable = iwlagn_txq_agg_disable,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700273 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
274 .txq_free_tfd = iwl_hw_txq_free_tfd,
275 .txq_init = iwl_hw_tx_queue_init,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700276 .rx_handler_setup = iwlagn_rx_handler_setup,
277 .setup_deferred_work = iwlagn_setup_deferred_work,
278 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
Wey-Yi Guy81b81762010-03-16 10:23:30 -0700279 .load_ucode = iwlagn_load_ucode,
Reinette Chatreb7a79402009-09-25 14:24:23 -0700280 .dump_nic_event_log = iwl_dump_nic_event_log,
281 .dump_nic_error_log = iwl_dump_nic_error_log,
Wey-Yi Guy696bdee2009-12-10 14:37:25 -0800282 .dump_csr = iwl_dump_csr,
Wey-Yi Guy1b3eb822010-01-15 13:43:39 -0800283 .dump_fh = iwl_dump_fh,
Wey-Yi Guy741a6262010-03-16 12:37:24 -0700284 .init_alive_start = iwlagn_init_alive_start,
285 .alive_notify = iwlagn_alive_notify,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700286 .send_tx_power = iwlagn_send_tx_power,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700287 .update_chain_flags = iwl_update_chain_flags,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700288 .set_channel_switch = iwl6000_hw_channel_switch,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700289 .apm_ops = {
Ben Cahillfadb3582009-10-23 13:42:21 -0700290 .init = iwl_apm_init,
Abhijeet Kolekard68b6032009-10-02 13:44:04 -0700291 .stop = iwl_apm_stop,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700292 .config = iwl6000_nic_config,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700293 .set_pwr_src = iwl_set_pwr_src,
294 },
295 .eeprom_ops = {
296 .regulatory_bands = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700297 EEPROM_REG_BAND_1_CHANNELS,
298 EEPROM_REG_BAND_2_CHANNELS,
299 EEPROM_REG_BAND_3_CHANNELS,
300 EEPROM_REG_BAND_4_CHANNELS,
301 EEPROM_REG_BAND_5_CHANNELS,
Shanyu Zhaof2fa1b02010-04-07 18:37:52 -0700302 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700303 EEPROM_REG_BAND_52_HT40_CHANNELS
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700304 },
305 .verify_signature = iwlcore_eeprom_verify_signature,
306 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
307 .release_semaphore = iwlcore_eeprom_release_semaphore,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700308 .calib_version = iwlagn_eeprom_calib_version,
309 .query_addr = iwlagn_eeprom_query_addr,
Wey-Yi Guyab9fd1b2009-08-21 13:34:23 -0700310 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700311 },
312 .post_associate = iwl_post_associate,
313 .isr = iwl_isr_ict,
314 .config_ap = iwl_config_ap,
315 .temp_ops = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700316 .temperature = iwlagn_temperature,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700317 .set_ct_kill = iwl6000_set_ct_threshold,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700318 .set_calib_version = iwl6000_set_calib_version,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700319 },
Johannes Berg1fa61b22010-04-28 08:44:52 -0700320 .manage_ibss_station = iwlagn_manage_ibss_station,
Daniel Halperin278c2f62010-06-14 13:10:29 -0700321 .update_bcast_station = iwl_update_bcast_station,
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -0700322 .debugfs_ops = {
323 .rx_stats_read = iwl_ucode_rx_stats_read,
324 .tx_stats_read = iwl_ucode_tx_stats_read,
325 .general_stats_read = iwl_ucode_general_stats_read,
326 },
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800327 .recover_from_tx_stall = iwl_bg_monitor_recover,
Wey-Yi Guyfa8f1302010-03-05 14:22:46 -0800328 .check_plcp_health = iwl_good_plcp_health,
329 .check_ack_health = iwl_good_ack_health,
Wey-Yi Guy716c74b2010-06-24 13:22:36 -0700330 .txfifo_flush = iwlagn_txfifo_flush,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700331};
332
Emese Revfy45d5d802009-12-14 00:59:53 +0100333static const struct iwl_ops iwl6000_ops = {
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700334 .lib = &iwl6000_lib,
Wey-Yi Guy7dc77db2010-03-16 10:23:31 -0700335 .hcmd = &iwlagn_hcmd,
336 .utils = &iwlagn_hcmd_utils,
Johannes Berge932a602009-10-02 13:44:03 -0700337 .led = &iwlagn_led_ops,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800338};
339
Shanyu Zhao18089722010-05-06 10:15:21 -0700340static void do_not_send_bt_config(struct iwl_priv *priv)
341{
342}
343
344static struct iwl_hcmd_ops iwl6000g2b_hcmd = {
345 .rxon_assoc = iwlagn_send_rxon_assoc,
346 .commit_rxon = iwl_commit_rxon,
347 .set_rxon_chain = iwl_set_rxon_chain,
348 .set_tx_ant = iwlagn_send_tx_ant_config,
349 .send_bt_config = do_not_send_bt_config,
350};
351
352static const struct iwl_ops iwl6000g2b_ops = {
353 .lib = &iwl6000_lib,
354 .hcmd = &iwl6000g2b_hcmd,
355 .utils = &iwlagn_hcmd_utils,
356 .led = &iwlagn_led_ops,
357};
358
Shanyu Zhao95b13012010-04-21 11:46:33 -0700359struct iwl_cfg iwl6000g2a_2agn_cfg = {
360 .name = "6000 Series 2x2 AGN Gen2a",
361 .fw_name_pre = IWL6000G2A_FW_PRE,
Shanyu Zhao4b3e8062010-04-07 18:06:36 -0700362 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
363 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700364 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
365 .ops = &iwl6000_ops,
366 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Shanyu Zhao4b3e8062010-04-07 18:06:36 -0700367 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
368 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700369 .num_of_queues = IWLAGN_NUM_QUEUES,
370 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
371 .mod_params = &iwlagn_mod_params,
372 .valid_tx_ant = ANT_AB,
373 .valid_rx_ant = ANT_AB,
374 .pll_cfg_val = 0,
375 .set_l0s = true,
376 .use_bsm = false,
Wey-Yi Guy33e6f812010-04-09 09:36:11 -0700377 .pa_type = IWL_PA_SYSTEM,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700378 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
379 .shadow_ram_support = true,
380 .ht_greenfield_support = true,
381 .led_compensation = 51,
382 .use_rts_for_ht = true, /* use rts/cts protection */
383 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
384 .supports_idle = true,
385 .adv_thermal_throttle = true,
386 .support_ct_kill_exit = true,
387 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
388 .chain_noise_scale = 1000,
389 .monitor_recover_period = IWL_MONITORING_PERIOD,
Shanyu Zhao95b13012010-04-21 11:46:33 -0700390 .max_event_log_size = 512,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700391 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700392 .sensitivity_calib_by_driver = true,
393 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700394 .need_dc_calib = true,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700395};
396
Shanyu Zhao18089722010-05-06 10:15:21 -0700397struct iwl_cfg iwl6000g2a_2abg_cfg = {
398 .name = "6000 Series 2x2 ABG Gen2a",
399 .fw_name_pre = IWL6000G2A_FW_PRE,
400 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
401 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
402 .sku = IWL_SKU_A|IWL_SKU_G,
403 .ops = &iwl6000_ops,
404 .eeprom_size = OTP_LOW_IMAGE_SIZE,
405 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
406 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
407 .num_of_queues = IWLAGN_NUM_QUEUES,
408 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
409 .mod_params = &iwlagn_mod_params,
410 .valid_tx_ant = ANT_AB,
411 .valid_rx_ant = ANT_AB,
412 .pll_cfg_val = 0,
413 .set_l0s = true,
414 .use_bsm = false,
415 .pa_type = IWL_PA_SYSTEM,
416 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
417 .shadow_ram_support = true,
418 .led_compensation = 51,
419 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
420 .supports_idle = true,
421 .adv_thermal_throttle = true,
422 .support_ct_kill_exit = true,
423 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
424 .chain_noise_scale = 1000,
425 .monitor_recover_period = IWL_MONITORING_PERIOD,
426 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700427 .sensitivity_calib_by_driver = true,
428 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700429 .need_dc_calib = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700430};
431
432struct iwl_cfg iwl6000g2a_2bg_cfg = {
433 .name = "6000 Series 2x2 BG Gen2a",
434 .fw_name_pre = IWL6000G2A_FW_PRE,
435 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
436 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
437 .sku = IWL_SKU_G,
438 .ops = &iwl6000_ops,
439 .eeprom_size = OTP_LOW_IMAGE_SIZE,
440 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
441 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
442 .num_of_queues = IWLAGN_NUM_QUEUES,
443 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
444 .mod_params = &iwlagn_mod_params,
445 .valid_tx_ant = ANT_AB,
446 .valid_rx_ant = ANT_AB,
447 .pll_cfg_val = 0,
448 .set_l0s = true,
449 .use_bsm = false,
450 .pa_type = IWL_PA_SYSTEM,
451 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
452 .shadow_ram_support = true,
453 .led_compensation = 51,
454 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
455 .supports_idle = true,
456 .adv_thermal_throttle = true,
457 .support_ct_kill_exit = true,
458 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
459 .chain_noise_scale = 1000,
460 .monitor_recover_period = IWL_MONITORING_PERIOD,
461 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700462 .sensitivity_calib_by_driver = true,
463 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700464 .need_dc_calib = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700465};
466
467struct iwl_cfg iwl6000g2b_2agn_cfg = {
468 .name = "6000 Series 2x2 AGN Gen2b",
469 .fw_name_pre = IWL6000G2B_FW_PRE,
470 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
471 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
472 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
473 .ops = &iwl6000g2b_ops,
474 .eeprom_size = OTP_LOW_IMAGE_SIZE,
475 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
476 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
477 .num_of_queues = IWLAGN_NUM_QUEUES,
478 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
479 .mod_params = &iwlagn_mod_params,
480 .valid_tx_ant = ANT_AB,
481 .valid_rx_ant = ANT_AB,
482 .pll_cfg_val = 0,
483 .set_l0s = true,
484 .use_bsm = false,
485 .pa_type = IWL_PA_SYSTEM,
486 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
487 .shadow_ram_support = true,
488 .ht_greenfield_support = true,
489 .led_compensation = 51,
490 .use_rts_for_ht = true, /* use rts/cts protection */
491 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
492 .supports_idle = true,
493 .adv_thermal_throttle = true,
494 .support_ct_kill_exit = true,
495 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
496 .chain_noise_scale = 1000,
497 .monitor_recover_period = IWL_MONITORING_PERIOD,
498 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700499 .sensitivity_calib_by_driver = true,
500 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700501 .need_dc_calib = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700502};
503
504struct iwl_cfg iwl6000g2b_2abg_cfg = {
505 .name = "6000 Series 2x2 ABG Gen2b",
506 .fw_name_pre = IWL6000G2B_FW_PRE,
507 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
508 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
509 .sku = IWL_SKU_A|IWL_SKU_G,
510 .ops = &iwl6000g2b_ops,
511 .eeprom_size = OTP_LOW_IMAGE_SIZE,
512 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
513 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
514 .num_of_queues = IWLAGN_NUM_QUEUES,
515 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
516 .mod_params = &iwlagn_mod_params,
517 .valid_tx_ant = ANT_AB,
518 .valid_rx_ant = ANT_AB,
519 .pll_cfg_val = 0,
520 .set_l0s = true,
521 .use_bsm = false,
522 .pa_type = IWL_PA_SYSTEM,
523 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
524 .shadow_ram_support = true,
525 .led_compensation = 51,
526 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
527 .supports_idle = true,
528 .adv_thermal_throttle = true,
529 .support_ct_kill_exit = true,
530 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
531 .chain_noise_scale = 1000,
532 .monitor_recover_period = IWL_MONITORING_PERIOD,
533 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700534 .sensitivity_calib_by_driver = true,
535 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700536 .need_dc_calib = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700537};
538
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700539struct iwl_cfg iwl6000g2b_2bgn_cfg = {
540 .name = "6000 Series 2x2 BGN 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_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,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700571 .sensitivity_calib_by_driver = true,
572 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700573 .need_dc_calib = true,
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700574};
575
Shanyu Zhao18089722010-05-06 10:15:21 -0700576struct iwl_cfg iwl6000g2b_2bg_cfg = {
577 .name = "6000 Series 2x2 BG Gen2b",
578 .fw_name_pre = IWL6000G2B_FW_PRE,
579 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
580 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
581 .sku = IWL_SKU_G,
582 .ops = &iwl6000g2b_ops,
583 .eeprom_size = OTP_LOW_IMAGE_SIZE,
584 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
585 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
586 .num_of_queues = IWLAGN_NUM_QUEUES,
587 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
588 .mod_params = &iwlagn_mod_params,
589 .valid_tx_ant = ANT_AB,
590 .valid_rx_ant = ANT_AB,
591 .pll_cfg_val = 0,
592 .set_l0s = true,
593 .use_bsm = false,
594 .pa_type = IWL_PA_SYSTEM,
595 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
596 .shadow_ram_support = true,
597 .led_compensation = 51,
598 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
599 .supports_idle = true,
600 .adv_thermal_throttle = true,
601 .support_ct_kill_exit = true,
602 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
603 .chain_noise_scale = 1000,
604 .monitor_recover_period = IWL_MONITORING_PERIOD,
605 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700606 .sensitivity_calib_by_driver = true,
607 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700608 .need_dc_calib = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700609};
610
611struct iwl_cfg iwl6000g2b_bgn_cfg = {
612 .name = "6000 Series 1x2 BGN Gen2b",
613 .fw_name_pre = IWL6000G2B_FW_PRE,
614 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
615 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
616 .sku = IWL_SKU_G|IWL_SKU_N,
617 .ops = &iwl6000g2b_ops,
618 .eeprom_size = OTP_LOW_IMAGE_SIZE,
619 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
620 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
621 .num_of_queues = IWLAGN_NUM_QUEUES,
622 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
623 .mod_params = &iwlagn_mod_params,
624 .valid_tx_ant = ANT_A,
625 .valid_rx_ant = ANT_AB,
626 .pll_cfg_val = 0,
627 .set_l0s = true,
628 .use_bsm = false,
629 .pa_type = IWL_PA_SYSTEM,
630 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
631 .shadow_ram_support = true,
632 .ht_greenfield_support = true,
633 .led_compensation = 51,
634 .use_rts_for_ht = true, /* use rts/cts protection */
635 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
636 .supports_idle = true,
637 .adv_thermal_throttle = true,
638 .support_ct_kill_exit = true,
639 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
640 .chain_noise_scale = 1000,
641 .monitor_recover_period = IWL_MONITORING_PERIOD,
642 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700643 .sensitivity_calib_by_driver = true,
644 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700645 .need_dc_calib = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700646};
647
648struct iwl_cfg iwl6000g2b_bg_cfg = {
649 .name = "6000 Series 1x2 BG Gen2b",
650 .fw_name_pre = IWL6000G2B_FW_PRE,
651 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
652 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
653 .sku = IWL_SKU_G,
654 .ops = &iwl6000g2b_ops,
655 .eeprom_size = OTP_LOW_IMAGE_SIZE,
656 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
657 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
658 .num_of_queues = IWLAGN_NUM_QUEUES,
659 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
660 .mod_params = &iwlagn_mod_params,
661 .valid_tx_ant = ANT_A,
662 .valid_rx_ant = ANT_AB,
663 .pll_cfg_val = 0,
664 .set_l0s = true,
665 .use_bsm = false,
666 .pa_type = IWL_PA_SYSTEM,
667 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
668 .shadow_ram_support = true,
669 .led_compensation = 51,
670 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
671 .supports_idle = true,
672 .adv_thermal_throttle = true,
673 .support_ct_kill_exit = true,
674 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
675 .chain_noise_scale = 1000,
676 .monitor_recover_period = IWL_MONITORING_PERIOD,
677 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700678 .sensitivity_calib_by_driver = true,
679 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700680 .need_dc_calib = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700681};
682
Shanyu Zhao95b13012010-04-21 11:46:33 -0700683/*
684 * "i": Internal configuration, use internal Power Amplifier
685 */
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700686struct iwl_cfg iwl6000i_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800687 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700688 .fw_name_pre = IWL6000_FW_PRE,
689 .ucode_api_max = IWL6000_UCODE_API_MAX,
690 .ucode_api_min = IWL6000_UCODE_API_MIN,
691 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
692 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700693 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700694 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700695 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700696 .num_of_queues = IWLAGN_NUM_QUEUES,
697 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7c2010-03-16 12:37:27 -0700698 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700699 .valid_tx_ant = ANT_BC,
700 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700701 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700702 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700703 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700704 .pa_type = IWL_PA_INTERNAL,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700705 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
706 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700707 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700708 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700709 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700710 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700711 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700712 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700713 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800714 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800715 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800716 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700717 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700718 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700719 .sensitivity_calib_by_driver = true,
720 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800721};
722
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700723struct iwl_cfg iwl6000i_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800724 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700725 .fw_name_pre = IWL6000_FW_PRE,
726 .ucode_api_max = IWL6000_UCODE_API_MAX,
727 .ucode_api_min = IWL6000_UCODE_API_MIN,
728 .sku = IWL_SKU_A|IWL_SKU_G,
729 .ops = &iwl6000_ops,
730 .eeprom_size = OTP_LOW_IMAGE_SIZE,
731 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700732 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700733 .num_of_queues = IWLAGN_NUM_QUEUES,
734 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7c2010-03-16 12:37:27 -0700735 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700736 .valid_tx_ant = ANT_BC,
737 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700738 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700739 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700740 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700741 .pa_type = IWL_PA_INTERNAL,
742 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
743 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700744 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700745 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700746 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700747 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700748 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800749 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800750 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800751 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700752 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700753 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700754 .sensitivity_calib_by_driver = true,
755 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700756};
757
758struct iwl_cfg iwl6000i_2bg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800759 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700760 .fw_name_pre = IWL6000_FW_PRE,
761 .ucode_api_max = IWL6000_UCODE_API_MAX,
762 .ucode_api_min = IWL6000_UCODE_API_MIN,
763 .sku = IWL_SKU_G,
764 .ops = &iwl6000_ops,
765 .eeprom_size = OTP_LOW_IMAGE_SIZE,
766 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700767 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700768 .num_of_queues = IWLAGN_NUM_QUEUES,
769 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7c2010-03-16 12:37:27 -0700770 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700771 .valid_tx_ant = ANT_BC,
772 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700773 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700774 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700775 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700776 .pa_type = IWL_PA_INTERNAL,
777 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
778 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700779 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700780 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700781 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700782 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700783 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800784 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800785 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800786 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700787 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700788 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700789 .sensitivity_calib_by_driver = true,
790 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700791};
792
Jay Sternberge1228372009-01-19 15:30:34 -0800793struct iwl_cfg iwl6050_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800794 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800795 .fw_name_pre = IWL6050_FW_PRE,
796 .ucode_api_max = IWL6050_UCODE_API_MAX,
797 .ucode_api_min = IWL6050_UCODE_API_MIN,
798 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700799 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700800 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700801 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700802 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700803 .num_of_queues = IWLAGN_NUM_QUEUES,
804 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7c2010-03-16 12:37:27 -0700805 .mod_params = &iwlagn_mod_params,
Jay Sternberg542cc792009-05-08 13:44:46 -0700806 .valid_tx_ant = ANT_AB,
807 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700808 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700809 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700810 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700811 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700812 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700813 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700814 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700815 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700816 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700817 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700818 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700819 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700820 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800821 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800822 .chain_noise_scale = 1500,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800823 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700824 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700825 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700826 .sensitivity_calib_by_driver = true,
827 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700828 .need_dc_calib = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800829};
830
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700831struct iwl_cfg iwl6050_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800832 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700833 .fw_name_pre = IWL6050_FW_PRE,
834 .ucode_api_max = IWL6050_UCODE_API_MAX,
835 .ucode_api_min = IWL6050_UCODE_API_MIN,
836 .sku = IWL_SKU_A|IWL_SKU_G,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700837 .ops = &iwl6000_ops,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700838 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700839 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700840 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700841 .num_of_queues = IWLAGN_NUM_QUEUES,
842 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7c2010-03-16 12:37:27 -0700843 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700844 .valid_tx_ant = ANT_AB,
845 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700846 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700847 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700848 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700849 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700850 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700851 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700852 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700853 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700854 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700855 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700856 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800857 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800858 .chain_noise_scale = 1500,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800859 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700860 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700861 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700862 .sensitivity_calib_by_driver = true,
863 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700864 .need_dc_calib = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700865};
866
Jay Sternberge1228372009-01-19 15:30:34 -0800867struct iwl_cfg iwl6000_3agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800868 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800869 .fw_name_pre = IWL6000_FW_PRE,
870 .ucode_api_max = IWL6000_UCODE_API_MAX,
871 .ucode_api_min = IWL6000_UCODE_API_MIN,
872 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800873 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700874 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700875 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700876 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700877 .num_of_queues = IWLAGN_NUM_QUEUES,
878 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7c2010-03-16 12:37:27 -0700879 .mod_params = &iwlagn_mod_params,
Jay Sternbergc0bac762009-02-02 16:21:14 -0800880 .valid_tx_ant = ANT_ABC,
881 .valid_rx_ant = ANT_ABC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700882 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700883 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700884 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700885 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700886 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
887 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700888 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700889 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700890 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700891 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700892 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700893 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700894 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800895 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800896 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800897 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700898 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700899 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700900 .sensitivity_calib_by_driver = true,
901 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800902};
903
Jay Sternberge1228372009-01-19 15:30:34 -0800904MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
905MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
Shanyu Zhao95b13012010-04-21 11:46:33 -0700906MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
Shanyu Zhao18089722010-05-06 10:15:21 -0700907MODULE_FIRMWARE(IWL6000G2B_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));