blob: fc2eeb00c78c0e6cfbca24cd9ffa8aee696c77df [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
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
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
Johannes Berg670245e2010-08-23 07:56:55 -0700125/*
126 * Macros to access the lookup table.
127 *
128 * The lookup table has 7 inputs: bt3_prio, bt3_txrx, bt_rf_act, wifi_req,
129 * wifi_prio, wifi_txrx and wifi_sh_ant_req.
130 *
131 * It has three outputs: WLAN_ACTIVE, WLAN_KILL and ANT_SWITCH
132 *
133 * The format is that "registers" 8 through 11 contain the WLAN_ACTIVE bits
134 * one after another in 32-bit registers, and "registers" 0 through 7 contain
135 * the WLAN_KILL and ANT_SWITCH bits interleaved (in that order).
136 *
137 * These macros encode that format.
138 */
139#define LUT_VALUE(bt3_prio, bt3_txrx, bt_rf_act, wifi_req, wifi_prio, \
140 wifi_txrx, wifi_sh_ant_req) \
141 (bt3_prio | (bt3_txrx << 1) | (bt_rf_act << 2) | (wifi_req << 3) | \
142 (wifi_prio << 4) | (wifi_txrx << 5) | (wifi_sh_ant_req << 6))
143
144#define LUT_PTA_WLAN_ACTIVE_OP(lut, op, val) \
145 lut[8 + ((val) >> 5)] op (cpu_to_le32(BIT((val) & 0x1f)))
146#define LUT_TEST_PTA_WLAN_ACTIVE(lut, bt3_prio, bt3_txrx, bt_rf_act, \
147 wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req) \
148 (!!(LUT_PTA_WLAN_ACTIVE_OP(lut, &, LUT_VALUE(bt3_prio, bt3_txrx,\
149 bt_rf_act, wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req))))
150#define LUT_SET_PTA_WLAN_ACTIVE(lut, bt3_prio, bt3_txrx, bt_rf_act, \
151 wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req) \
152 LUT_PTA_WLAN_ACTIVE_OP(lut, |=, LUT_VALUE(bt3_prio, bt3_txrx, \
153 bt_rf_act, wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req))
154#define LUT_CLEAR_PTA_WLAN_ACTIVE(lut, bt3_prio, bt3_txrx, bt_rf_act, \
155 wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req) \
156 LUT_PTA_WLAN_ACTIVE_OP(lut, &= ~, LUT_VALUE(bt3_prio, bt3_txrx, \
157 bt_rf_act, wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req))
158
159#define LUT_WLAN_KILL_OP(lut, op, val) \
160 lut[(val) >> 4] op (cpu_to_le32(BIT(((val) << 1) & 0x1e)))
161#define LUT_TEST_WLAN_KILL(lut, bt3_prio, bt3_txrx, bt_rf_act, wifi_req, \
162 wifi_prio, wifi_txrx, wifi_sh_ant_req) \
163 (!!(LUT_WLAN_KILL_OP(lut, &, LUT_VALUE(bt3_prio, bt3_txrx, bt_rf_act, \
164 wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req))))
165#define LUT_SET_WLAN_KILL(lut, bt3_prio, bt3_txrx, bt_rf_act, wifi_req, \
166 wifi_prio, wifi_txrx, wifi_sh_ant_req) \
167 LUT_WLAN_KILL_OP(lut, |=, LUT_VALUE(bt3_prio, bt3_txrx, bt_rf_act, \
168 wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req))
169#define LUT_CLEAR_WLAN_KILL(lut, bt3_prio, bt3_txrx, bt_rf_act, wifi_req, \
170 wifi_prio, wifi_txrx, wifi_sh_ant_req) \
171 LUT_WLAN_KILL_OP(lut, &= ~, LUT_VALUE(bt3_prio, bt3_txrx, bt_rf_act, \
172 wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req))
173
174#define LUT_ANT_SWITCH_OP(lut, op, val) \
175 lut[(val) >> 4] op (cpu_to_le32(BIT((((val) << 1) & 0x1e) + 1)))
176#define LUT_TEST_ANT_SWITCH(lut, bt3_prio, bt3_txrx, bt_rf_act, wifi_req, \
177 wifi_prio, wifi_txrx, wifi_sh_ant_req) \
178 (!!(LUT_ANT_SWITCH_OP(lut, &, LUT_VALUE(bt3_prio, bt3_txrx, bt_rf_act, \
179 wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req))))
180#define LUT_SET_ANT_SWITCH(lut, bt3_prio, bt3_txrx, bt_rf_act, wifi_req, \
181 wifi_prio, wifi_txrx, wifi_sh_ant_req) \
182 LUT_ANT_SWITCH_OP(lut, |=, LUT_VALUE(bt3_prio, bt3_txrx, bt_rf_act, \
183 wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req))
184#define LUT_CLEAR_ANT_SWITCH(lut, bt3_prio, bt3_txrx, bt_rf_act, wifi_req, \
185 wifi_prio, wifi_txrx, wifi_sh_ant_req) \
186 LUT_ANT_SWITCH_OP(lut, &= ~, LUT_VALUE(bt3_prio, bt3_txrx, bt_rf_act, \
187 wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req))
188
189static const __le32 iwl6000g2b_def_3w_lookup[12] = {
190 cpu_to_le32(0xaaaaaaaa),
191 cpu_to_le32(0xaaaaaaaa),
192 cpu_to_le32(0xaeaaaaaa),
193 cpu_to_le32(0xaaaaaaaa),
194 cpu_to_le32(0xcc00ff28),
195 cpu_to_le32(0x0000aaaa),
196 cpu_to_le32(0xcc00aaaa),
197 cpu_to_le32(0x0000aaaa),
198 cpu_to_le32(0xc0004000),
199 cpu_to_le32(0x00004000),
200 cpu_to_le32(0xf0005000),
201 cpu_to_le32(0xf0004000),
202};
203
204static void iwl6000g2b_send_bt_config(struct iwl_priv *priv)
205{
206 struct iwl6000g2b_bt_cmd bt_cmd = {
207 .prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
208 .max_kill = IWL6000G2B_BT_MAX_KILL_DEFAULT,
209 .bt3_timer_t7_value = IWL6000G2B_BT3_T7_DEFAULT,
210 .kill_ack_mask = IWL6000G2B_BT_KILL_ACK_MASK_DEFAULT,
211 .kill_cts_mask = IWL6000G2B_BT_KILL_CTS_MASK_DEFAULT,
212 .bt3_prio_sample_time = IWL6000G2B_BT3_PRIO_SAMPLE_DEFAULT,
213 .bt3_timer_t2_value = IWL6000G2B_BT3_T2_DEFAULT,
214 .valid = IWL6000G2B_BT_VALID_ENABLE_FLAGS,
215 };
216
217 BUILD_BUG_ON(sizeof(iwl6000g2b_def_3w_lookup) !=
218 sizeof(bt_cmd.bt3_lookup_table));
219
220 if (!bt_coex_active) {
221 bt_cmd.flags = 0;
222 } else {
223 bt_cmd.flags = IWL6000G2B_BT_FLAG_CHANNEL_INHIBITION |
224 IWL6000G2B_BT_FLAG_COEX_MODE_3W <<
225 IWL6000G2B_BT_FLAG_COEX_MODE_SHIFT;
226 bt_cmd.valid |= IWL6000G2B_BT_ALL_VALID_MSK;
227 }
228
229 memcpy(bt_cmd.bt3_lookup_table, iwl6000g2b_def_3w_lookup,
230 sizeof(iwl6000g2b_def_3w_lookup));
231
232 IWL_DEBUG_INFO(priv, "BT coex %s\n",
233 bt_cmd.flags ? "active" : "disabled");
234
235 if (iwl_send_cmd_pdu(priv, REPLY_BT_CONFIG, sizeof(bt_cmd), &bt_cmd))
236 IWL_ERR(priv, "failed to send BT Coex Config\n");
237}
238
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700239static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
240 .min_nrg_cck = 97,
241 .max_nrg_cck = 0, /* not used, set to 0 */
242 .auto_corr_min_ofdm = 80,
243 .auto_corr_min_ofdm_mrc = 128,
244 .auto_corr_min_ofdm_x1 = 105,
245 .auto_corr_min_ofdm_mrc_x1 = 192,
246
247 .auto_corr_max_ofdm = 145,
248 .auto_corr_max_ofdm_mrc = 232,
Wey-Yi Guy2494f632010-01-20 12:22:52 -0800249 .auto_corr_max_ofdm_x1 = 110,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700250 .auto_corr_max_ofdm_mrc_x1 = 232,
251
252 .auto_corr_min_cck = 125,
253 .auto_corr_max_cck = 175,
254 .auto_corr_min_cck_mrc = 160,
255 .auto_corr_max_cck_mrc = 310,
256 .nrg_th_cck = 97,
257 .nrg_th_ofdm = 100,
Wey-Yi Guy55036d62009-10-09 13:20:24 -0700258
259 .barker_corr_th_min = 190,
260 .barker_corr_th_min_mrc = 390,
261 .nrg_th_cca = 62,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700262};
263
264static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
265{
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700266 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700267 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700268 priv->cfg->num_of_queues =
269 priv->cfg->mod_params->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700270
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700271 priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700272 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
273 priv->hw_params.scd_bc_tbls_size =
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700274 priv->cfg->num_of_queues *
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700275 sizeof(struct iwlagn_scd_bc_tbl);
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700276 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
Wey-Yi Guybf3c7fd2010-06-24 14:08:05 -0700277 priv->hw_params.max_stations = IWLAGN_STATION_COUNT;
278 priv->hw_params.bcast_sta_id = IWLAGN_BROADCAST_ID;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700279
280 priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
281 priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
282
283 priv->hw_params.max_bsm_size = 0;
284 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
285 BIT(IEEE80211_BAND_5GHZ);
286 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
287
288 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
289 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
290 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
291 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
292
293 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
294 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
295
296 /* Set initial sensitivity parameters */
297 /* Set initial calibration set */
298 priv->hw_params.sens = &iwl6000_sensitivity;
Wey-Yi Guye517736a2010-04-19 18:49:40 -0700299 priv->hw_params.calib_init_cfg =
300 BIT(IWL_CALIB_XTAL) |
301 BIT(IWL_CALIB_LO) |
302 BIT(IWL_CALIB_TX_IQ) |
303 BIT(IWL_CALIB_BASE_BAND);
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700304 if (priv->cfg->need_dc_calib)
305 priv->hw_params.calib_init_cfg |= BIT(IWL_CALIB_DC);
Abhijeet Kolekar07f33f92010-01-22 14:22:47 -0800306
Wey-Yi Guya0ee74c2010-05-06 08:54:10 -0700307 priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
308
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700309 return 0;
310}
311
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700312static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
313 struct ieee80211_channel_switch *ch_switch)
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700314{
315 struct iwl6000_channel_switch_cmd cmd;
316 const struct iwl_channel_info *ch_info;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700317 u32 switch_time_in_usec, ucode_switch_time;
318 u16 ch;
319 u32 tsf_low;
320 u8 switch_count;
321 u16 beacon_interval = le16_to_cpu(priv->rxon_timing.beacon_interval);
322 struct ieee80211_vif *vif = priv->vif;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700323 struct iwl_host_cmd hcmd = {
324 .id = REPLY_CHANNEL_SWITCH,
325 .len = sizeof(cmd),
Wey-Yi Guy3839f7c2010-05-18 09:18:06 -0700326 .flags = CMD_SYNC,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700327 .data = &cmd,
328 };
329
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700330 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
Shanyu Zhao81e95432010-07-28 13:40:27 -0700331 ch = ch_switch->channel->hw_value;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700332 IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
333 priv->active_rxon.channel, ch);
334 cmd.channel = cpu_to_le16(ch);
Wey-Yi Guy0924e5192009-11-06 14:52:54 -0800335 cmd.rxon_flags = priv->staging_rxon.flags;
336 cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700337 switch_count = ch_switch->count;
338 tsf_low = ch_switch->timestamp & 0x0ffffffff;
339 /*
340 * calculate the ucode channel switch time
341 * adding TSF as one of the factor for when to switch
342 */
343 if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) {
344 if (switch_count > ((priv->ucode_beacon_time - tsf_low) /
345 beacon_interval)) {
346 switch_count -= (priv->ucode_beacon_time -
347 tsf_low) / beacon_interval;
348 } else
349 switch_count = 0;
350 }
351 if (switch_count <= 1)
352 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
353 else {
354 switch_time_in_usec =
355 vif->bss_conf.beacon_int * switch_count * TIME_UNIT;
356 ucode_switch_time = iwl_usecs_to_beacons(priv,
357 switch_time_in_usec,
358 beacon_interval);
359 cmd.switch_time = iwl_add_beacon_time(priv,
360 priv->ucode_beacon_time,
361 ucode_switch_time,
362 beacon_interval);
363 }
364 IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
365 cmd.switch_time);
366 ch_info = iwl_get_channel_info(priv, priv->band, ch);
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700367 if (ch_info)
368 cmd.expect_beacon = is_channel_radar(ch_info);
369 else {
370 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700371 priv->active_rxon.channel, ch);
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700372 return -EFAULT;
373 }
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700374 priv->switch_rxon.channel = cmd.channel;
Wey-Yi Guy0924e5192009-11-06 14:52:54 -0800375 priv->switch_rxon.switch_in_progress = true;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700376
377 return iwl_send_cmd_sync(priv, &hcmd);
378}
379
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700380static struct iwl_lib_ops iwl6000_lib = {
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700381 .set_hw_params = iwl6000_hw_set_hw_params,
Wey-Yi Guyb305a082010-03-16 17:41:22 -0700382 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
383 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
384 .txq_set_sched = iwlagn_txq_set_sched,
385 .txq_agg_enable = iwlagn_txq_agg_enable,
386 .txq_agg_disable = iwlagn_txq_agg_disable,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700387 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
388 .txq_free_tfd = iwl_hw_txq_free_tfd,
389 .txq_init = iwl_hw_tx_queue_init,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700390 .rx_handler_setup = iwlagn_rx_handler_setup,
391 .setup_deferred_work = iwlagn_setup_deferred_work,
392 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
Wey-Yi Guy81b81762010-03-16 10:23:30 -0700393 .load_ucode = iwlagn_load_ucode,
Reinette Chatreb7a79402009-09-25 14:24:23 -0700394 .dump_nic_event_log = iwl_dump_nic_event_log,
395 .dump_nic_error_log = iwl_dump_nic_error_log,
Wey-Yi Guy696bdee2009-12-10 14:37:25 -0800396 .dump_csr = iwl_dump_csr,
Wey-Yi Guy1b3eb822010-01-15 13:43:39 -0800397 .dump_fh = iwl_dump_fh,
Wey-Yi Guy741a6262010-03-16 12:37:24 -0700398 .init_alive_start = iwlagn_init_alive_start,
399 .alive_notify = iwlagn_alive_notify,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700400 .send_tx_power = iwlagn_send_tx_power,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700401 .update_chain_flags = iwl_update_chain_flags,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700402 .set_channel_switch = iwl6000_hw_channel_switch,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700403 .apm_ops = {
Ben Cahillfadb3582009-10-23 13:42:21 -0700404 .init = iwl_apm_init,
Abhijeet Kolekard68b6032009-10-02 13:44:04 -0700405 .stop = iwl_apm_stop,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700406 .config = iwl6000_nic_config,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700407 .set_pwr_src = iwl_set_pwr_src,
408 },
409 .eeprom_ops = {
410 .regulatory_bands = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700411 EEPROM_REG_BAND_1_CHANNELS,
412 EEPROM_REG_BAND_2_CHANNELS,
413 EEPROM_REG_BAND_3_CHANNELS,
414 EEPROM_REG_BAND_4_CHANNELS,
415 EEPROM_REG_BAND_5_CHANNELS,
Shanyu Zhaof2fa1b02010-04-07 18:37:52 -0700416 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700417 EEPROM_REG_BAND_52_HT40_CHANNELS
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700418 },
419 .verify_signature = iwlcore_eeprom_verify_signature,
420 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
421 .release_semaphore = iwlcore_eeprom_release_semaphore,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700422 .calib_version = iwlagn_eeprom_calib_version,
423 .query_addr = iwlagn_eeprom_query_addr,
Wey-Yi Guyab9fd1b2009-08-21 13:34:23 -0700424 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700425 },
426 .post_associate = iwl_post_associate,
427 .isr = iwl_isr_ict,
428 .config_ap = iwl_config_ap,
429 .temp_ops = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700430 .temperature = iwlagn_temperature,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700431 .set_ct_kill = iwl6000_set_ct_threshold,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700432 .set_calib_version = iwl6000_set_calib_version,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700433 },
Johannes Berg1fa61b22010-04-28 08:44:52 -0700434 .manage_ibss_station = iwlagn_manage_ibss_station,
Daniel Halperin278c2f62010-06-14 13:10:29 -0700435 .update_bcast_station = iwl_update_bcast_station,
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -0700436 .debugfs_ops = {
437 .rx_stats_read = iwl_ucode_rx_stats_read,
438 .tx_stats_read = iwl_ucode_tx_stats_read,
439 .general_stats_read = iwl_ucode_general_stats_read,
Wey-Yi Guyffb7d892010-07-14 08:09:55 -0700440 .bt_stats_read = iwl_ucode_bt_stats_read,
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -0700441 },
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800442 .recover_from_tx_stall = iwl_bg_monitor_recover,
Wey-Yi Guyfa8f1302010-03-05 14:22:46 -0800443 .check_plcp_health = iwl_good_plcp_health,
444 .check_ack_health = iwl_good_ack_health,
Wey-Yi Guy716c74b2010-06-24 13:22:36 -0700445 .txfifo_flush = iwlagn_txfifo_flush,
Wey-Yi Guy65550632010-06-24 13:18:35 -0700446 .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
Wey-Yi Guy0975cc82010-07-31 08:34:07 -0700447 .tt_ops = {
448 .lower_power_detection = iwl_tt_is_low_power_state,
449 .tt_power_mode = iwl_tt_current_power_mode,
450 .ct_kill_check = iwl_check_for_ct_kill,
451 }
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700452};
453
Emese Revfy45d5d802009-12-14 00:59:53 +0100454static const struct iwl_ops iwl6000_ops = {
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700455 .lib = &iwl6000_lib,
Wey-Yi Guy7dc77db2010-03-16 10:23:31 -0700456 .hcmd = &iwlagn_hcmd,
457 .utils = &iwlagn_hcmd_utils,
Johannes Berge932a602009-10-02 13:44:03 -0700458 .led = &iwlagn_led_ops,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800459};
460
Shanyu Zhao18089722010-05-06 10:15:21 -0700461static struct iwl_hcmd_ops iwl6000g2b_hcmd = {
462 .rxon_assoc = iwlagn_send_rxon_assoc,
463 .commit_rxon = iwl_commit_rxon,
464 .set_rxon_chain = iwl_set_rxon_chain,
465 .set_tx_ant = iwlagn_send_tx_ant_config,
Johannes Berg670245e2010-08-23 07:56:55 -0700466 .send_bt_config = iwl6000g2b_send_bt_config,
Shanyu Zhao18089722010-05-06 10:15:21 -0700467};
468
469static const struct iwl_ops iwl6000g2b_ops = {
470 .lib = &iwl6000_lib,
471 .hcmd = &iwl6000g2b_hcmd,
472 .utils = &iwlagn_hcmd_utils,
473 .led = &iwlagn_led_ops,
474};
475
Shanyu Zhao95b13012010-04-21 11:46:33 -0700476struct iwl_cfg iwl6000g2a_2agn_cfg = {
477 .name = "6000 Series 2x2 AGN Gen2a",
478 .fw_name_pre = IWL6000G2A_FW_PRE,
Shanyu Zhao4b3e8062010-04-07 18:06:36 -0700479 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
480 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700481 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
482 .ops = &iwl6000_ops,
483 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Shanyu Zhao4b3e8062010-04-07 18:06:36 -0700484 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
485 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700486 .num_of_queues = IWLAGN_NUM_QUEUES,
487 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
488 .mod_params = &iwlagn_mod_params,
489 .valid_tx_ant = ANT_AB,
490 .valid_rx_ant = ANT_AB,
491 .pll_cfg_val = 0,
492 .set_l0s = true,
493 .use_bsm = false,
Wey-Yi Guy33e6f812010-04-09 09:36:11 -0700494 .pa_type = IWL_PA_SYSTEM,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700495 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
496 .shadow_ram_support = true,
497 .ht_greenfield_support = true,
498 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -0700499 .use_rts_for_aggregation = true, /* use rts/cts protection */
Jay Sternberg0b5af202010-03-17 16:16:12 -0700500 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
501 .supports_idle = true,
502 .adv_thermal_throttle = true,
503 .support_ct_kill_exit = true,
504 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
505 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -0700506 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Shanyu Zhao95b13012010-04-21 11:46:33 -0700507 .max_event_log_size = 512,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700508 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700509 .sensitivity_calib_by_driver = true,
510 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700511 .need_dc_calib = true,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700512};
513
Shanyu Zhao18089722010-05-06 10:15:21 -0700514struct iwl_cfg iwl6000g2a_2abg_cfg = {
515 .name = "6000 Series 2x2 ABG Gen2a",
516 .fw_name_pre = IWL6000G2A_FW_PRE,
517 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
518 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
519 .sku = IWL_SKU_A|IWL_SKU_G,
520 .ops = &iwl6000_ops,
521 .eeprom_size = OTP_LOW_IMAGE_SIZE,
522 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
523 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
524 .num_of_queues = IWLAGN_NUM_QUEUES,
525 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
526 .mod_params = &iwlagn_mod_params,
527 .valid_tx_ant = ANT_AB,
528 .valid_rx_ant = ANT_AB,
529 .pll_cfg_val = 0,
530 .set_l0s = true,
531 .use_bsm = false,
532 .pa_type = IWL_PA_SYSTEM,
533 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
534 .shadow_ram_support = true,
535 .led_compensation = 51,
536 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
537 .supports_idle = true,
538 .adv_thermal_throttle = true,
539 .support_ct_kill_exit = true,
540 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
541 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -0700542 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -0700543 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700544 .sensitivity_calib_by_driver = true,
545 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700546 .need_dc_calib = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700547};
548
549struct iwl_cfg iwl6000g2a_2bg_cfg = {
550 .name = "6000 Series 2x2 BG Gen2a",
551 .fw_name_pre = IWL6000G2A_FW_PRE,
552 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
553 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
554 .sku = IWL_SKU_G,
555 .ops = &iwl6000_ops,
556 .eeprom_size = OTP_LOW_IMAGE_SIZE,
557 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
558 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
559 .num_of_queues = IWLAGN_NUM_QUEUES,
560 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
561 .mod_params = &iwlagn_mod_params,
562 .valid_tx_ant = ANT_AB,
563 .valid_rx_ant = ANT_AB,
564 .pll_cfg_val = 0,
565 .set_l0s = true,
566 .use_bsm = false,
567 .pa_type = IWL_PA_SYSTEM,
568 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
569 .shadow_ram_support = true,
570 .led_compensation = 51,
571 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
572 .supports_idle = true,
573 .adv_thermal_throttle = true,
574 .support_ct_kill_exit = true,
575 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
576 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -0700577 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -0700578 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700579 .sensitivity_calib_by_driver = true,
580 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700581 .need_dc_calib = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700582};
583
584struct iwl_cfg iwl6000g2b_2agn_cfg = {
585 .name = "6000 Series 2x2 AGN Gen2b",
586 .fw_name_pre = IWL6000G2B_FW_PRE,
587 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
588 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
589 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
590 .ops = &iwl6000g2b_ops,
591 .eeprom_size = OTP_LOW_IMAGE_SIZE,
592 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
593 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
594 .num_of_queues = IWLAGN_NUM_QUEUES,
595 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
596 .mod_params = &iwlagn_mod_params,
597 .valid_tx_ant = ANT_AB,
598 .valid_rx_ant = ANT_AB,
599 .pll_cfg_val = 0,
600 .set_l0s = true,
601 .use_bsm = false,
602 .pa_type = IWL_PA_SYSTEM,
603 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
604 .shadow_ram_support = true,
605 .ht_greenfield_support = true,
606 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -0700607 .use_rts_for_aggregation = true, /* use rts/cts protection */
Shanyu Zhao18089722010-05-06 10:15:21 -0700608 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
609 .supports_idle = true,
610 .adv_thermal_throttle = true,
611 .support_ct_kill_exit = true,
612 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
613 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -0700614 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -0700615 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700616 .sensitivity_calib_by_driver = true,
617 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700618 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -0700619 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700620 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
621 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
622 .advanced_bt_coexist = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700623};
624
625struct iwl_cfg iwl6000g2b_2abg_cfg = {
626 .name = "6000 Series 2x2 ABG Gen2b",
627 .fw_name_pre = IWL6000G2B_FW_PRE,
628 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
629 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
630 .sku = IWL_SKU_A|IWL_SKU_G,
631 .ops = &iwl6000g2b_ops,
632 .eeprom_size = OTP_LOW_IMAGE_SIZE,
633 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
634 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
635 .num_of_queues = IWLAGN_NUM_QUEUES,
636 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
637 .mod_params = &iwlagn_mod_params,
638 .valid_tx_ant = ANT_AB,
639 .valid_rx_ant = ANT_AB,
640 .pll_cfg_val = 0,
641 .set_l0s = true,
642 .use_bsm = false,
643 .pa_type = IWL_PA_SYSTEM,
644 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
645 .shadow_ram_support = true,
646 .led_compensation = 51,
647 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
648 .supports_idle = true,
649 .adv_thermal_throttle = true,
650 .support_ct_kill_exit = true,
651 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
652 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -0700653 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -0700654 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700655 .sensitivity_calib_by_driver = true,
656 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700657 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -0700658 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700659 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
660 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
661 .advanced_bt_coexist = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700662};
663
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700664struct iwl_cfg iwl6000g2b_2bgn_cfg = {
665 .name = "6000 Series 2x2 BGN Gen2b",
666 .fw_name_pre = IWL6000G2B_FW_PRE,
667 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
668 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
669 .sku = IWL_SKU_G|IWL_SKU_N,
670 .ops = &iwl6000g2b_ops,
671 .eeprom_size = OTP_LOW_IMAGE_SIZE,
672 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
673 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
674 .num_of_queues = IWLAGN_NUM_QUEUES,
675 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
676 .mod_params = &iwlagn_mod_params,
677 .valid_tx_ant = ANT_AB,
678 .valid_rx_ant = ANT_AB,
679 .pll_cfg_val = 0,
680 .set_l0s = true,
681 .use_bsm = false,
682 .pa_type = IWL_PA_SYSTEM,
683 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
684 .shadow_ram_support = true,
685 .ht_greenfield_support = true,
686 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -0700687 .use_rts_for_aggregation = true, /* use rts/cts protection */
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700688 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
689 .supports_idle = true,
690 .adv_thermal_throttle = true,
691 .support_ct_kill_exit = true,
692 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
693 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -0700694 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700695 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700696 .sensitivity_calib_by_driver = true,
697 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700698 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -0700699 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700700 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
701 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
702 .advanced_bt_coexist = true,
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700703};
704
Shanyu Zhao18089722010-05-06 10:15:21 -0700705struct iwl_cfg iwl6000g2b_2bg_cfg = {
706 .name = "6000 Series 2x2 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_AB,
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,
Wey-Yi Guy3198c682010-07-23 13:19:40 -0700733 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -0700734 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700735 .sensitivity_calib_by_driver = true,
736 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700737 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -0700738 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700739 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
740 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
741 .advanced_bt_coexist = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700742};
743
744struct iwl_cfg iwl6000g2b_bgn_cfg = {
745 .name = "6000 Series 1x2 BGN Gen2b",
746 .fw_name_pre = IWL6000G2B_FW_PRE,
747 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
748 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
749 .sku = IWL_SKU_G|IWL_SKU_N,
750 .ops = &iwl6000g2b_ops,
751 .eeprom_size = OTP_LOW_IMAGE_SIZE,
752 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
753 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
754 .num_of_queues = IWLAGN_NUM_QUEUES,
755 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
756 .mod_params = &iwlagn_mod_params,
757 .valid_tx_ant = ANT_A,
758 .valid_rx_ant = ANT_AB,
759 .pll_cfg_val = 0,
760 .set_l0s = true,
761 .use_bsm = false,
762 .pa_type = IWL_PA_SYSTEM,
763 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
764 .shadow_ram_support = true,
765 .ht_greenfield_support = true,
766 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -0700767 .use_rts_for_aggregation = true, /* use rts/cts protection */
Shanyu Zhao18089722010-05-06 10:15:21 -0700768 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
769 .supports_idle = true,
770 .adv_thermal_throttle = true,
771 .support_ct_kill_exit = true,
772 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
773 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -0700774 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -0700775 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700776 .sensitivity_calib_by_driver = true,
777 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700778 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -0700779 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700780 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
781 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
782 .advanced_bt_coexist = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700783};
784
785struct iwl_cfg iwl6000g2b_bg_cfg = {
786 .name = "6000 Series 1x2 BG Gen2b",
787 .fw_name_pre = IWL6000G2B_FW_PRE,
788 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
789 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
790 .sku = IWL_SKU_G,
791 .ops = &iwl6000g2b_ops,
792 .eeprom_size = OTP_LOW_IMAGE_SIZE,
793 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
794 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
795 .num_of_queues = IWLAGN_NUM_QUEUES,
796 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
797 .mod_params = &iwlagn_mod_params,
798 .valid_tx_ant = ANT_A,
799 .valid_rx_ant = ANT_AB,
800 .pll_cfg_val = 0,
801 .set_l0s = true,
802 .use_bsm = false,
803 .pa_type = IWL_PA_SYSTEM,
804 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
805 .shadow_ram_support = true,
806 .led_compensation = 51,
807 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
808 .supports_idle = true,
809 .adv_thermal_throttle = true,
810 .support_ct_kill_exit = true,
811 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
812 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -0700813 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -0700814 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700815 .sensitivity_calib_by_driver = true,
816 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700817 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -0700818 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700819 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
820 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
821 .advanced_bt_coexist = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700822};
823
Shanyu Zhao95b13012010-04-21 11:46:33 -0700824/*
825 * "i": Internal configuration, use internal Power Amplifier
826 */
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700827struct iwl_cfg iwl6000i_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800828 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700829 .fw_name_pre = IWL6000_FW_PRE,
830 .ucode_api_max = IWL6000_UCODE_API_MAX,
831 .ucode_api_min = IWL6000_UCODE_API_MIN,
832 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
833 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700834 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700835 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700836 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700837 .num_of_queues = IWLAGN_NUM_QUEUES,
838 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700839 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700840 .valid_tx_ant = ANT_BC,
841 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700842 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700843 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700844 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700845 .pa_type = IWL_PA_INTERNAL,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700846 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
847 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700848 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700849 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -0700850 .use_rts_for_aggregation = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700851 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700852 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700853 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700854 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800855 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800856 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -0700857 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700858 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700859 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700860 .sensitivity_calib_by_driver = true,
861 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800862};
863
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700864struct iwl_cfg iwl6000i_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800865 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700866 .fw_name_pre = IWL6000_FW_PRE,
867 .ucode_api_max = IWL6000_UCODE_API_MAX,
868 .ucode_api_min = IWL6000_UCODE_API_MIN,
869 .sku = IWL_SKU_A|IWL_SKU_G,
870 .ops = &iwl6000_ops,
871 .eeprom_size = OTP_LOW_IMAGE_SIZE,
872 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700873 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700874 .num_of_queues = IWLAGN_NUM_QUEUES,
875 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700876 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700877 .valid_tx_ant = ANT_BC,
878 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700879 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700880 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700881 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700882 .pa_type = IWL_PA_INTERNAL,
883 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
884 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700885 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700886 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700887 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700888 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700889 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800890 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800891 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -0700892 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700893 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700894 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700895 .sensitivity_calib_by_driver = true,
896 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700897};
898
899struct iwl_cfg iwl6000i_2bg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800900 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700901 .fw_name_pre = IWL6000_FW_PRE,
902 .ucode_api_max = IWL6000_UCODE_API_MAX,
903 .ucode_api_min = IWL6000_UCODE_API_MIN,
904 .sku = IWL_SKU_G,
905 .ops = &iwl6000_ops,
906 .eeprom_size = OTP_LOW_IMAGE_SIZE,
907 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700908 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700909 .num_of_queues = IWLAGN_NUM_QUEUES,
910 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700911 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700912 .valid_tx_ant = ANT_BC,
913 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700914 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700915 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700916 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700917 .pa_type = IWL_PA_INTERNAL,
918 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
919 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700920 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700921 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700922 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700923 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700924 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800925 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800926 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -0700927 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700928 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700929 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700930 .sensitivity_calib_by_driver = true,
931 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700932};
933
Jay Sternberge1228372009-01-19 15:30:34 -0800934struct iwl_cfg iwl6050_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800935 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800936 .fw_name_pre = IWL6050_FW_PRE,
937 .ucode_api_max = IWL6050_UCODE_API_MAX,
938 .ucode_api_min = IWL6050_UCODE_API_MIN,
939 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700940 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700941 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700942 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700943 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700944 .num_of_queues = IWLAGN_NUM_QUEUES,
945 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700946 .mod_params = &iwlagn_mod_params,
Jay Sternberg542cc792009-05-08 13:44:46 -0700947 .valid_tx_ant = ANT_AB,
948 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700949 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700950 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700951 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700952 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700953 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700954 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700955 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700956 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -0700957 .use_rts_for_aggregation = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700958 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700959 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700960 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700961 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800962 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800963 .chain_noise_scale = 1500,
Wey-Yi Guyce606592010-07-23 13:19:39 -0700964 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700965 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700966 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700967 .sensitivity_calib_by_driver = true,
968 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700969 .need_dc_calib = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800970};
971
Shanyu Zhao03264332010-06-29 17:27:27 -0700972struct iwl_cfg iwl6050g2_bgn_cfg = {
973 .name = "6050 Series 1x2 BGN Gen2",
974 .fw_name_pre = IWL6050_FW_PRE,
975 .ucode_api_max = IWL6050_UCODE_API_MAX,
976 .ucode_api_min = IWL6050_UCODE_API_MIN,
977 .sku = IWL_SKU_G|IWL_SKU_N,
978 .ops = &iwl6000_ops,
979 .eeprom_size = OTP_LOW_IMAGE_SIZE,
980 .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION,
981 .eeprom_calib_ver = EEPROM_6050G2_TX_POWER_VERSION,
982 .num_of_queues = IWLAGN_NUM_QUEUES,
983 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
984 .mod_params = &iwlagn_mod_params,
985 .valid_tx_ant = ANT_A,
986 .valid_rx_ant = ANT_AB,
987 .pll_cfg_val = 0,
988 .set_l0s = true,
989 .use_bsm = false,
990 .pa_type = IWL_PA_SYSTEM,
991 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
992 .shadow_ram_support = true,
993 .ht_greenfield_support = true,
994 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -0700995 .use_rts_for_aggregation = true, /* use rts/cts protection */
Shanyu Zhao03264332010-06-29 17:27:27 -0700996 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
997 .supports_idle = true,
998 .adv_thermal_throttle = true,
999 .support_ct_kill_exit = true,
1000 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
1001 .chain_noise_scale = 1500,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001002 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Shanyu Zhao03264332010-06-29 17:27:27 -07001003 .max_event_log_size = 1024,
1004 .ucode_tracing = true,
1005 .sensitivity_calib_by_driver = true,
1006 .chain_noise_calib_by_driver = true,
1007 .need_dc_calib = true,
1008};
1009
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001010struct iwl_cfg iwl6050_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -08001011 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001012 .fw_name_pre = IWL6050_FW_PRE,
1013 .ucode_api_max = IWL6050_UCODE_API_MAX,
1014 .ucode_api_min = IWL6050_UCODE_API_MIN,
1015 .sku = IWL_SKU_A|IWL_SKU_G,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001016 .ops = &iwl6000_ops,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001017 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -07001018 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -07001019 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -07001020 .num_of_queues = IWLAGN_NUM_QUEUES,
1021 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -07001022 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001023 .valid_tx_ant = ANT_AB,
1024 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -07001025 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -07001026 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -07001027 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001028 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -07001029 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001030 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001031 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -07001032 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -07001033 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -07001034 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -07001035 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -08001036 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -08001037 .chain_noise_scale = 1500,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001038 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -07001039 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -07001040 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -07001041 .sensitivity_calib_by_driver = true,
1042 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001043 .need_dc_calib = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001044};
1045
Jay Sternberge1228372009-01-19 15:30:34 -08001046struct iwl_cfg iwl6000_3agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -08001047 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -08001048 .fw_name_pre = IWL6000_FW_PRE,
1049 .ucode_api_max = IWL6000_UCODE_API_MAX,
1050 .ucode_api_min = IWL6000_UCODE_API_MIN,
1051 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Jay Sternberg29f35c12009-01-29 11:09:16 -08001052 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -07001053 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -07001054 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -07001055 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -07001056 .num_of_queues = IWLAGN_NUM_QUEUES,
1057 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -07001058 .mod_params = &iwlagn_mod_params,
Jay Sternbergc0bac762009-02-02 16:21:14 -08001059 .valid_tx_ant = ANT_ABC,
1060 .valid_rx_ant = ANT_ABC,
Ben Cahillfadb3582009-10-23 13:42:21 -07001061 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -07001062 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -07001063 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -07001064 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy415e4992009-08-13 13:30:54 -07001065 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1066 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -07001067 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -07001068 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -07001069 .use_rts_for_aggregation = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -07001070 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -07001071 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -07001072 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -07001073 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -08001074 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -08001075 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001076 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -07001077 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -07001078 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -07001079 .sensitivity_calib_by_driver = true,
1080 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -08001081};
1082
Jay Sternberge1228372009-01-19 15:30:34 -08001083MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
1084MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
Shanyu Zhao95b13012010-04-21 11:46:33 -07001085MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
Shanyu Zhao18089722010-05-06 10:15:21 -07001086MODULE_FIRMWARE(IWL6000G2B_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));