blob: e4873cc2a57a7e856dfab9bf87a20f0546d89027 [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
Wey-Yi Guybee008b2010-08-23 07:57:04 -0700204static const __le32 iwl6000g2b_concurrent_lookup[12] = {
205 cpu_to_le32(0xaaaaaaaa),
206 cpu_to_le32(0xaaaaaaaa),
207 cpu_to_le32(0xaaaaaaaa),
208 cpu_to_le32(0xaaaaaaaa),
209 cpu_to_le32(0xaaaaaaaa),
210 cpu_to_le32(0xaaaaaaaa),
211 cpu_to_le32(0xaaaaaaaa),
212 cpu_to_le32(0xaaaaaaaa),
213 cpu_to_le32(0x00000000),
214 cpu_to_le32(0x00000000),
215 cpu_to_le32(0x00000000),
216 cpu_to_le32(0x00000000),
217};
218
Johannes Berg670245e2010-08-23 07:56:55 -0700219static void iwl6000g2b_send_bt_config(struct iwl_priv *priv)
220{
221 struct iwl6000g2b_bt_cmd bt_cmd = {
Johannes Berg670245e2010-08-23 07:56:55 -0700222 .max_kill = IWL6000G2B_BT_MAX_KILL_DEFAULT,
223 .bt3_timer_t7_value = IWL6000G2B_BT3_T7_DEFAULT,
Johannes Berg670245e2010-08-23 07:56:55 -0700224 .bt3_prio_sample_time = IWL6000G2B_BT3_PRIO_SAMPLE_DEFAULT,
225 .bt3_timer_t2_value = IWL6000G2B_BT3_T2_DEFAULT,
Johannes Berg670245e2010-08-23 07:56:55 -0700226 };
227
228 BUILD_BUG_ON(sizeof(iwl6000g2b_def_3w_lookup) !=
229 sizeof(bt_cmd.bt3_lookup_table));
230
Wey-Yi Guy5d297d52010-08-23 07:57:09 -0700231 bt_cmd.prio_boost = priv->cfg->bt_prio_boost;
Wey-Yi Guyfbba9412010-08-23 07:57:10 -0700232 bt_cmd.kill_ack_mask = priv->kill_ack_mask;
233 bt_cmd.kill_cts_mask = priv->kill_cts_mask;
234 bt_cmd.valid = priv->bt_valid;
Wey-Yi Guy5d297d52010-08-23 07:57:09 -0700235
Johannes Berg590799492010-08-23 07:57:00 -0700236 /*
237 * Configure BT coex mode to "no coexistence" when the
238 * user disabled BT coexistence, we have no interface
Wey-Yi Guyaeb4a2e2010-08-23 07:57:05 -0700239 * user disabled BT coexistence, or the interface is in
Johannes Berg590799492010-08-23 07:57:00 -0700240 * IBSS mode (no proper uCode support for coex then).
241 */
Wey-Yi Guyaeb4a2e2010-08-23 07:57:05 -0700242 if (!bt_coex_active || priv->iw_mode == NL80211_IFTYPE_ADHOC) {
Johannes Berg670245e2010-08-23 07:56:55 -0700243 bt_cmd.flags = 0;
244 } else {
245 bt_cmd.flags = IWL6000G2B_BT_FLAG_CHANNEL_INHIBITION |
246 IWL6000G2B_BT_FLAG_COEX_MODE_3W <<
247 IWL6000G2B_BT_FLAG_COEX_MODE_SHIFT;
Johannes Berg670245e2010-08-23 07:56:55 -0700248 }
249
Wey-Yi Guybee008b2010-08-23 07:57:04 -0700250 if (priv->bt_full_concurrent)
251 memcpy(bt_cmd.bt3_lookup_table, iwl6000g2b_concurrent_lookup,
252 sizeof(iwl6000g2b_concurrent_lookup));
253 else
254 memcpy(bt_cmd.bt3_lookup_table, iwl6000g2b_def_3w_lookup,
255 sizeof(iwl6000g2b_def_3w_lookup));
Johannes Berg670245e2010-08-23 07:56:55 -0700256
Wey-Yi Guybee008b2010-08-23 07:57:04 -0700257 IWL_DEBUG_INFO(priv, "BT coex %s in %s mode\n",
258 bt_cmd.flags ? "active" : "disabled",
259 priv->bt_full_concurrent ?
260 "full concurrency" : "3-wire");
Johannes Berg670245e2010-08-23 07:56:55 -0700261
262 if (iwl_send_cmd_pdu(priv, REPLY_BT_CONFIG, sizeof(bt_cmd), &bt_cmd))
263 IWL_ERR(priv, "failed to send BT Coex Config\n");
Johannes Berg511b0822010-08-23 07:57:01 -0700264
265 /*
266 * When we are doing a restart, need to also reconfigure BT
267 * SCO to the device. If not doing a restart, bt_sco_active
268 * will always be false, so there's no need to have an extra
269 * variable to check for it.
270 */
271 if (priv->bt_sco_active) {
272 struct iwl6000g2b_bt_sco_cmd sco_cmd = { .flags = 0 };
273
274 if (priv->bt_sco_active)
275 sco_cmd.flags |= IWL6000G2B_BT_SCO_ACTIVE;
276 if (iwl_send_cmd_pdu(priv, REPLY_BT_COEX_SCO,
277 sizeof(sco_cmd), &sco_cmd))
278 IWL_ERR(priv, "failed to send BT SCO command\n");
279 }
Johannes Berg670245e2010-08-23 07:56:55 -0700280}
281
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700282static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
283 .min_nrg_cck = 97,
284 .max_nrg_cck = 0, /* not used, set to 0 */
285 .auto_corr_min_ofdm = 80,
286 .auto_corr_min_ofdm_mrc = 128,
287 .auto_corr_min_ofdm_x1 = 105,
288 .auto_corr_min_ofdm_mrc_x1 = 192,
289
290 .auto_corr_max_ofdm = 145,
291 .auto_corr_max_ofdm_mrc = 232,
Wey-Yi Guy2494f632010-01-20 12:22:52 -0800292 .auto_corr_max_ofdm_x1 = 110,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700293 .auto_corr_max_ofdm_mrc_x1 = 232,
294
295 .auto_corr_min_cck = 125,
296 .auto_corr_max_cck = 175,
297 .auto_corr_min_cck_mrc = 160,
298 .auto_corr_max_cck_mrc = 310,
299 .nrg_th_cck = 97,
300 .nrg_th_ofdm = 100,
Wey-Yi Guy55036d62009-10-09 13:20:24 -0700301
302 .barker_corr_th_min = 190,
303 .barker_corr_th_min_mrc = 390,
304 .nrg_th_cca = 62,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700305};
306
307static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
308{
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700309 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700310 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700311 priv->cfg->num_of_queues =
312 priv->cfg->mod_params->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700313
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700314 priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700315 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
316 priv->hw_params.scd_bc_tbls_size =
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700317 priv->cfg->num_of_queues *
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700318 sizeof(struct iwlagn_scd_bc_tbl);
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700319 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
Wey-Yi Guybf3c7fd2010-06-24 14:08:05 -0700320 priv->hw_params.max_stations = IWLAGN_STATION_COUNT;
321 priv->hw_params.bcast_sta_id = IWLAGN_BROADCAST_ID;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700322
323 priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
324 priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
325
326 priv->hw_params.max_bsm_size = 0;
327 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
328 BIT(IEEE80211_BAND_5GHZ);
329 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
330
331 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
332 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
333 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
334 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
335
336 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
337 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
338
339 /* Set initial sensitivity parameters */
340 /* Set initial calibration set */
341 priv->hw_params.sens = &iwl6000_sensitivity;
Wey-Yi Guye5177362010-04-19 18:49:40 -0700342 priv->hw_params.calib_init_cfg =
343 BIT(IWL_CALIB_XTAL) |
344 BIT(IWL_CALIB_LO) |
345 BIT(IWL_CALIB_TX_IQ) |
346 BIT(IWL_CALIB_BASE_BAND);
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700347 if (priv->cfg->need_dc_calib)
348 priv->hw_params.calib_init_cfg |= BIT(IWL_CALIB_DC);
Abhijeet Kolekar07f33f92010-01-22 14:22:47 -0800349
Wey-Yi Guya0ee74c2010-05-06 08:54:10 -0700350 priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
351
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700352 return 0;
353}
354
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700355static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
356 struct ieee80211_channel_switch *ch_switch)
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700357{
358 struct iwl6000_channel_switch_cmd cmd;
359 const struct iwl_channel_info *ch_info;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700360 u32 switch_time_in_usec, ucode_switch_time;
361 u16 ch;
362 u32 tsf_low;
363 u8 switch_count;
364 u16 beacon_interval = le16_to_cpu(priv->rxon_timing.beacon_interval);
365 struct ieee80211_vif *vif = priv->vif;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700366 struct iwl_host_cmd hcmd = {
367 .id = REPLY_CHANNEL_SWITCH,
368 .len = sizeof(cmd),
Wey-Yi Guy3839f7c2010-05-18 09:18:06 -0700369 .flags = CMD_SYNC,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700370 .data = &cmd,
371 };
372
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700373 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
Shanyu Zhao81e95432010-07-28 13:40:27 -0700374 ch = ch_switch->channel->hw_value;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700375 IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
376 priv->active_rxon.channel, ch);
377 cmd.channel = cpu_to_le16(ch);
Wey-Yi Guy0924e512009-11-06 14:52:54 -0800378 cmd.rxon_flags = priv->staging_rxon.flags;
379 cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700380 switch_count = ch_switch->count;
381 tsf_low = ch_switch->timestamp & 0x0ffffffff;
382 /*
383 * calculate the ucode channel switch time
384 * adding TSF as one of the factor for when to switch
385 */
386 if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) {
387 if (switch_count > ((priv->ucode_beacon_time - tsf_low) /
388 beacon_interval)) {
389 switch_count -= (priv->ucode_beacon_time -
390 tsf_low) / beacon_interval;
391 } else
392 switch_count = 0;
393 }
394 if (switch_count <= 1)
395 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
396 else {
397 switch_time_in_usec =
398 vif->bss_conf.beacon_int * switch_count * TIME_UNIT;
399 ucode_switch_time = iwl_usecs_to_beacons(priv,
400 switch_time_in_usec,
401 beacon_interval);
402 cmd.switch_time = iwl_add_beacon_time(priv,
403 priv->ucode_beacon_time,
404 ucode_switch_time,
405 beacon_interval);
406 }
407 IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
408 cmd.switch_time);
409 ch_info = iwl_get_channel_info(priv, priv->band, ch);
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700410 if (ch_info)
411 cmd.expect_beacon = is_channel_radar(ch_info);
412 else {
413 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700414 priv->active_rxon.channel, ch);
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700415 return -EFAULT;
416 }
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700417 priv->switch_rxon.channel = cmd.channel;
Wey-Yi Guy0924e512009-11-06 14:52:54 -0800418 priv->switch_rxon.switch_in_progress = true;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700419
420 return iwl_send_cmd_sync(priv, &hcmd);
421}
422
Johannes Berg9e4afc22010-08-23 07:56:57 -0700423static void iwl6000g2b_bt_traffic_change_work(struct work_struct *work)
424{
425 struct iwl_priv *priv =
426 container_of(work, struct iwl_priv, bt_traffic_change_work);
427 int smps_request = -1;
428
429 switch (priv->bt_traffic_load) {
430 case IWL_BT_COEX_TRAFFIC_LOAD_NONE:
431 smps_request = IEEE80211_SMPS_AUTOMATIC;
432 break;
433 case IWL_BT_COEX_TRAFFIC_LOAD_LOW:
434 smps_request = IEEE80211_SMPS_DYNAMIC;
435 break;
436 case IWL_BT_COEX_TRAFFIC_LOAD_HIGH:
437 case IWL_BT_COEX_TRAFFIC_LOAD_CONTINUOUS:
438 smps_request = IEEE80211_SMPS_STATIC;
439 break;
440 default:
441 IWL_ERR(priv, "Invalid BT traffic load: %d\n",
442 priv->bt_traffic_load);
443 break;
444 }
445
446 mutex_lock(&priv->mutex);
447
448 if (smps_request != -1 &&
449 priv->vif && priv->vif->type == NL80211_IFTYPE_STATION)
450 ieee80211_request_smps(priv->vif, smps_request);
451
452 mutex_unlock(&priv->mutex);
453}
454
Wey-Yi Guyfbba9412010-08-23 07:57:10 -0700455static void iwlagn_print_uartmsg(struct iwl_priv *priv,
456 struct iwl_bt_uart_msg *uart_msg)
457{
458 IWL_DEBUG_NOTIF(priv, "Message Type = 0x%X, SSN = 0x%X, "
459 "Update Req = 0x%X",
460 (BT_UART_MSG_FRAME1MSGTYPE_MSK & uart_msg->frame1) >>
461 BT_UART_MSG_FRAME1MSGTYPE_POS,
462 (BT_UART_MSG_FRAME1SSN_MSK & uart_msg->frame1) >>
463 BT_UART_MSG_FRAME1SSN_POS,
464 (BT_UART_MSG_FRAME1UPDATEREQ_MSK & uart_msg->frame1) >>
465 BT_UART_MSG_FRAME1UPDATEREQ_POS);
466
467 IWL_DEBUG_NOTIF(priv, "Open connections = 0x%X, Traffic load = 0x%X, "
468 "Chl_SeqN = 0x%X, In band = 0x%X",
469 (BT_UART_MSG_FRAME2OPENCONNECTIONS_MSK & uart_msg->frame2) >>
470 BT_UART_MSG_FRAME2OPENCONNECTIONS_POS,
471 (BT_UART_MSG_FRAME2TRAFFICLOAD_MSK & uart_msg->frame2) >>
472 BT_UART_MSG_FRAME2TRAFFICLOAD_POS,
473 (BT_UART_MSG_FRAME2CHLSEQN_MSK & uart_msg->frame2) >>
474 BT_UART_MSG_FRAME2CHLSEQN_POS,
475 (BT_UART_MSG_FRAME2INBAND_MSK & uart_msg->frame2) >>
476 BT_UART_MSG_FRAME2INBAND_POS);
477
478 IWL_DEBUG_NOTIF(priv, "SCO/eSCO = 0x%X, Sniff = 0x%X, A2DP = 0x%X, "
479 "ACL = 0x%X, Master = 0x%X, OBEX = 0x%X",
480 (BT_UART_MSG_FRAME3SCOESCO_MSK & uart_msg->frame3) >>
481 BT_UART_MSG_FRAME3SCOESCO_POS,
482 (BT_UART_MSG_FRAME3SNIFF_MSK & uart_msg->frame3) >>
483 BT_UART_MSG_FRAME3SNIFF_POS,
484 (BT_UART_MSG_FRAME3A2DP_MSK & uart_msg->frame3) >>
485 BT_UART_MSG_FRAME3A2DP_POS,
486 (BT_UART_MSG_FRAME3ACL_MSK & uart_msg->frame3) >>
487 BT_UART_MSG_FRAME3ACL_POS,
488 (BT_UART_MSG_FRAME3MASTER_MSK & uart_msg->frame3) >>
489 BT_UART_MSG_FRAME3MASTER_POS,
490 (BT_UART_MSG_FRAME3OBEX_MSK & uart_msg->frame3) >>
491 BT_UART_MSG_FRAME3OBEX_POS);
492
493 IWL_DEBUG_NOTIF(priv, "Idle duration = 0x%X",
494 (BT_UART_MSG_FRAME4IDLEDURATION_MSK & uart_msg->frame4) >>
495 BT_UART_MSG_FRAME4IDLEDURATION_POS);
496
497 IWL_DEBUG_NOTIF(priv, "Tx Activity = 0x%X, Rx Activity = 0x%X, "
498 "eSCO Retransmissions = 0x%X",
499 (BT_UART_MSG_FRAME5TXACTIVITY_MSK & uart_msg->frame5) >>
500 BT_UART_MSG_FRAME5TXACTIVITY_POS,
501 (BT_UART_MSG_FRAME5RXACTIVITY_MSK & uart_msg->frame5) >>
502 BT_UART_MSG_FRAME5RXACTIVITY_POS,
503 (BT_UART_MSG_FRAME5ESCORETRANSMIT_MSK & uart_msg->frame5) >>
504 BT_UART_MSG_FRAME5ESCORETRANSMIT_POS);
505
506 IWL_DEBUG_NOTIF(priv, "Sniff Interval = 0x%X, Discoverable = 0x%X",
507 (BT_UART_MSG_FRAME6SNIFFINTERVAL_MSK & uart_msg->frame6) >>
508 BT_UART_MSG_FRAME6SNIFFINTERVAL_POS,
509 (BT_UART_MSG_FRAME6DISCOVERABLE_MSK & uart_msg->frame6) >>
510 BT_UART_MSG_FRAME6DISCOVERABLE_POS);
511
512 IWL_DEBUG_NOTIF(priv, "Sniff Activity = 0x%X, Inquiry/Page SR Mode = "
513 "0x%X, Connectable = 0x%X",
514 (BT_UART_MSG_FRAME7SNIFFACTIVITY_MSK & uart_msg->frame7) >>
515 BT_UART_MSG_FRAME7SNIFFACTIVITY_POS,
516 (BT_UART_MSG_FRAME7INQUIRYPAGESRMODE_MSK & uart_msg->frame7) >>
517 BT_UART_MSG_FRAME7INQUIRYPAGESRMODE_POS,
518 (BT_UART_MSG_FRAME7CONNECTABLE_MSK & uart_msg->frame7) >>
519 BT_UART_MSG_FRAME7CONNECTABLE_POS);
520}
521
522static void iwl6000g2b_set_kill_ack_msk(struct iwl_priv *priv,
523 struct iwl_bt_uart_msg *uart_msg)
524{
525 u8 kill_ack_msk;
526 __le32 bt_kill_ack_msg[2] = {
527 cpu_to_le32(0xFFFFFFF), cpu_to_le32(0xFFFFFC00) };
528
529 kill_ack_msk = (((BT_UART_MSG_FRAME3A2DP_MSK |
530 BT_UART_MSG_FRAME3SNIFF_MSK |
531 BT_UART_MSG_FRAME3SCOESCO_MSK) &
532 uart_msg->frame3) == 0) ? 1 : 0;
533 if (priv->kill_ack_mask != bt_kill_ack_msg[kill_ack_msk]) {
534 priv->bt_valid |= IWL6000G2B_BT_VALID_KILL_ACK_MASK;
535 priv->kill_ack_mask = bt_kill_ack_msg[kill_ack_msk];
536 /* schedule to send runtime bt_config */
537 queue_work(priv->workqueue, &priv->bt_runtime_config);
538 }
539
540}
541
Johannes Berg9e4afc22010-08-23 07:56:57 -0700542static void iwl6000g2b_bt_coex_profile_notif(struct iwl_priv *priv,
543 struct iwl_rx_mem_buffer *rxb)
544{
Wey-Yi Guybee008b2010-08-23 07:57:04 -0700545 unsigned long flags;
Johannes Berg9e4afc22010-08-23 07:56:57 -0700546 struct iwl_rx_packet *pkt = rxb_addr(rxb);
547 struct iwl_bt_coex_profile_notif *coex = &pkt->u.bt_coex_profile_notif;
548 struct iwl6000g2b_bt_sco_cmd sco_cmd = { .flags = 0 };
Wey-Yi Guyfbba9412010-08-23 07:57:10 -0700549 struct iwl_bt_uart_msg *uart_msg = &coex->last_bt_uart_msg;
Johannes Berg9e4afc22010-08-23 07:56:57 -0700550
551 IWL_DEBUG_NOTIF(priv, "BT Coex notification:\n");
552 IWL_DEBUG_NOTIF(priv, " status: %d\n", coex->bt_status);
553 IWL_DEBUG_NOTIF(priv, " traffic load: %d\n", coex->bt_traffic_load);
554 IWL_DEBUG_NOTIF(priv, " CI compliance: %d\n", coex->bt_ci_compliance);
Wey-Yi Guyfbba9412010-08-23 07:57:10 -0700555 iwlagn_print_uartmsg(priv, uart_msg);
Johannes Berg9e4afc22010-08-23 07:56:57 -0700556
Johannes Berg590799492010-08-23 07:57:00 -0700557 priv->notif_bt_traffic_load = coex->bt_traffic_load;
Johannes Berg9e4afc22010-08-23 07:56:57 -0700558
Johannes Berg590799492010-08-23 07:57:00 -0700559 if (priv->iw_mode != NL80211_IFTYPE_ADHOC) {
560 if (coex->bt_traffic_load != priv->bt_traffic_load) {
561 priv->bt_traffic_load = coex->bt_traffic_load;
562
563 queue_work(priv->workqueue,
564 &priv->bt_traffic_change_work);
565 }
566
Wey-Yi Guyfbba9412010-08-23 07:57:10 -0700567 if (priv->bt_sco_active !=
568 (uart_msg->frame3 & BT_UART_MSG_FRAME3SCOESCO_MSK)) {
569 priv->bt_sco_active = uart_msg->frame3 &
570 BT_UART_MSG_FRAME3SCOESCO_MSK;
571 if (priv->bt_sco_active)
572 sco_cmd.flags |= IWL6000G2B_BT_SCO_ACTIVE;
573 iwl_send_cmd_pdu_async(priv, REPLY_BT_COEX_SCO,
Johannes Berg590799492010-08-23 07:57:00 -0700574 sizeof(sco_cmd), &sco_cmd, NULL);
Wey-Yi Guyfbba9412010-08-23 07:57:10 -0700575 }
Johannes Berg9e4afc22010-08-23 07:56:57 -0700576 }
Wey-Yi Guybee008b2010-08-23 07:57:04 -0700577
Wey-Yi Guyfbba9412010-08-23 07:57:10 -0700578 iwl6000g2b_set_kill_ack_msk(priv, uart_msg);
579
Wey-Yi Guy5d297d52010-08-23 07:57:09 -0700580 /* FIXME: based on notification, adjust the prio_boost */
581
Wey-Yi Guybee008b2010-08-23 07:57:04 -0700582 spin_lock_irqsave(&priv->lock, flags);
583 priv->bt_ci_compliance = coex->bt_ci_compliance;
584 spin_unlock_irqrestore(&priv->lock, flags);
Johannes Berg9e4afc22010-08-23 07:56:57 -0700585}
586
587void iwl6000g2b_rx_handler_setup(struct iwl_priv *priv)
588{
589 iwlagn_rx_handler_setup(priv);
590 priv->rx_handlers[REPLY_BT_COEX_PROFILE_NOTIF] =
591 iwl6000g2b_bt_coex_profile_notif;
592}
593
594static void iwl6000g2b_bt_setup_deferred_work(struct iwl_priv *priv)
595{
596 iwlagn_setup_deferred_work(priv);
597
598 INIT_WORK(&priv->bt_traffic_change_work,
599 iwl6000g2b_bt_traffic_change_work);
600
601}
602
603static void iwl6000g2b_bt_cancel_deferred_work(struct iwl_priv *priv)
604{
605 cancel_work_sync(&priv->bt_traffic_change_work);
606}
607
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700608static struct iwl_lib_ops iwl6000_lib = {
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700609 .set_hw_params = iwl6000_hw_set_hw_params,
Wey-Yi Guyb305a082010-03-16 17:41:22 -0700610 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
611 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
612 .txq_set_sched = iwlagn_txq_set_sched,
613 .txq_agg_enable = iwlagn_txq_agg_enable,
614 .txq_agg_disable = iwlagn_txq_agg_disable,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700615 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
616 .txq_free_tfd = iwl_hw_txq_free_tfd,
617 .txq_init = iwl_hw_tx_queue_init,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700618 .rx_handler_setup = iwlagn_rx_handler_setup,
619 .setup_deferred_work = iwlagn_setup_deferred_work,
620 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
Wey-Yi Guy81b81762010-03-16 10:23:30 -0700621 .load_ucode = iwlagn_load_ucode,
Reinette Chatreb7a79402009-09-25 14:24:23 -0700622 .dump_nic_event_log = iwl_dump_nic_event_log,
623 .dump_nic_error_log = iwl_dump_nic_error_log,
Wey-Yi Guy696bdee2009-12-10 14:37:25 -0800624 .dump_csr = iwl_dump_csr,
Wey-Yi Guy1b3eb822010-01-15 13:43:39 -0800625 .dump_fh = iwl_dump_fh,
Wey-Yi Guy741a6262010-03-16 12:37:24 -0700626 .init_alive_start = iwlagn_init_alive_start,
627 .alive_notify = iwlagn_alive_notify,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700628 .send_tx_power = iwlagn_send_tx_power,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700629 .update_chain_flags = iwl_update_chain_flags,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700630 .set_channel_switch = iwl6000_hw_channel_switch,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700631 .apm_ops = {
Ben Cahillfadb3582009-10-23 13:42:21 -0700632 .init = iwl_apm_init,
Abhijeet Kolekard68b6032009-10-02 13:44:04 -0700633 .stop = iwl_apm_stop,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700634 .config = iwl6000_nic_config,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700635 .set_pwr_src = iwl_set_pwr_src,
636 },
637 .eeprom_ops = {
638 .regulatory_bands = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700639 EEPROM_REG_BAND_1_CHANNELS,
640 EEPROM_REG_BAND_2_CHANNELS,
641 EEPROM_REG_BAND_3_CHANNELS,
642 EEPROM_REG_BAND_4_CHANNELS,
643 EEPROM_REG_BAND_5_CHANNELS,
Shanyu Zhaof2fa1b02010-04-07 18:37:52 -0700644 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700645 EEPROM_REG_BAND_52_HT40_CHANNELS
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700646 },
647 .verify_signature = iwlcore_eeprom_verify_signature,
648 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
649 .release_semaphore = iwlcore_eeprom_release_semaphore,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700650 .calib_version = iwlagn_eeprom_calib_version,
651 .query_addr = iwlagn_eeprom_query_addr,
Wey-Yi Guyab9fd1b2009-08-21 13:34:23 -0700652 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700653 },
654 .post_associate = iwl_post_associate,
655 .isr = iwl_isr_ict,
656 .config_ap = iwl_config_ap,
657 .temp_ops = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700658 .temperature = iwlagn_temperature,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700659 .set_ct_kill = iwl6000_set_ct_threshold,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700660 .set_calib_version = iwl6000_set_calib_version,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700661 },
Johannes Berg1fa61b22010-04-28 08:44:52 -0700662 .manage_ibss_station = iwlagn_manage_ibss_station,
Daniel Halperin278c2f62010-06-14 13:10:29 -0700663 .update_bcast_station = iwl_update_bcast_station,
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -0700664 .debugfs_ops = {
665 .rx_stats_read = iwl_ucode_rx_stats_read,
666 .tx_stats_read = iwl_ucode_tx_stats_read,
667 .general_stats_read = iwl_ucode_general_stats_read,
Wey-Yi Guyffb7d892010-07-14 08:09:55 -0700668 .bt_stats_read = iwl_ucode_bt_stats_read,
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -0700669 },
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800670 .recover_from_tx_stall = iwl_bg_monitor_recover,
Wey-Yi Guyfa8f1302010-03-05 14:22:46 -0800671 .check_plcp_health = iwl_good_plcp_health,
672 .check_ack_health = iwl_good_ack_health,
Wey-Yi Guy716c74b2010-06-24 13:22:36 -0700673 .txfifo_flush = iwlagn_txfifo_flush,
Wey-Yi Guy65550632010-06-24 13:18:35 -0700674 .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
Wey-Yi Guy0975cc82010-07-31 08:34:07 -0700675 .tt_ops = {
676 .lower_power_detection = iwl_tt_is_low_power_state,
677 .tt_power_mode = iwl_tt_current_power_mode,
678 .ct_kill_check = iwl_check_for_ct_kill,
679 }
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700680};
681
Johannes Berg9e4afc22010-08-23 07:56:57 -0700682static struct iwl_lib_ops iwl6000g2b_lib = {
683 .set_hw_params = iwl6000_hw_set_hw_params,
684 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
685 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
686 .txq_set_sched = iwlagn_txq_set_sched,
687 .txq_agg_enable = iwlagn_txq_agg_enable,
688 .txq_agg_disable = iwlagn_txq_agg_disable,
689 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
690 .txq_free_tfd = iwl_hw_txq_free_tfd,
691 .txq_init = iwl_hw_tx_queue_init,
692 .rx_handler_setup = iwl6000g2b_rx_handler_setup,
693 .setup_deferred_work = iwl6000g2b_bt_setup_deferred_work,
694 .cancel_deferred_work = iwl6000g2b_bt_cancel_deferred_work,
695 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
696 .load_ucode = iwlagn_load_ucode,
697 .dump_nic_event_log = iwl_dump_nic_event_log,
698 .dump_nic_error_log = iwl_dump_nic_error_log,
699 .dump_csr = iwl_dump_csr,
700 .dump_fh = iwl_dump_fh,
701 .init_alive_start = iwlagn_init_alive_start,
702 .alive_notify = iwlagn_alive_notify,
703 .send_tx_power = iwlagn_send_tx_power,
704 .update_chain_flags = iwl_update_chain_flags,
705 .set_channel_switch = iwl6000_hw_channel_switch,
706 .apm_ops = {
707 .init = iwl_apm_init,
708 .stop = iwl_apm_stop,
709 .config = iwl6000_nic_config,
710 .set_pwr_src = iwl_set_pwr_src,
711 },
712 .eeprom_ops = {
713 .regulatory_bands = {
714 EEPROM_REG_BAND_1_CHANNELS,
715 EEPROM_REG_BAND_2_CHANNELS,
716 EEPROM_REG_BAND_3_CHANNELS,
717 EEPROM_REG_BAND_4_CHANNELS,
718 EEPROM_REG_BAND_5_CHANNELS,
719 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
720 EEPROM_REG_BAND_52_HT40_CHANNELS
721 },
722 .verify_signature = iwlcore_eeprom_verify_signature,
723 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
724 .release_semaphore = iwlcore_eeprom_release_semaphore,
725 .calib_version = iwlagn_eeprom_calib_version,
726 .query_addr = iwlagn_eeprom_query_addr,
727 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
728 },
729 .post_associate = iwl_post_associate,
730 .isr = iwl_isr_ict,
731 .config_ap = iwl_config_ap,
732 .temp_ops = {
733 .temperature = iwlagn_temperature,
734 .set_ct_kill = iwl6000_set_ct_threshold,
735 .set_calib_version = iwl6000_set_calib_version,
736 },
737 .manage_ibss_station = iwlagn_manage_ibss_station,
738 .update_bcast_station = iwl_update_bcast_station,
739 .debugfs_ops = {
740 .rx_stats_read = iwl_ucode_rx_stats_read,
741 .tx_stats_read = iwl_ucode_tx_stats_read,
742 .general_stats_read = iwl_ucode_general_stats_read,
743 .bt_stats_read = iwl_ucode_bt_stats_read,
744 },
745 .recover_from_tx_stall = iwl_bg_monitor_recover,
746 .check_plcp_health = iwl_good_plcp_health,
747 .check_ack_health = iwl_good_ack_health,
748 .txfifo_flush = iwlagn_txfifo_flush,
749 .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
750 .tt_ops = {
751 .lower_power_detection = iwl_tt_is_low_power_state,
752 .tt_power_mode = iwl_tt_current_power_mode,
753 .ct_kill_check = iwl_check_for_ct_kill,
754 }
755};
756
Emese Revfy45d5d802009-12-14 00:59:53 +0100757static const struct iwl_ops iwl6000_ops = {
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700758 .lib = &iwl6000_lib,
Wey-Yi Guy7dc77db2010-03-16 10:23:31 -0700759 .hcmd = &iwlagn_hcmd,
760 .utils = &iwlagn_hcmd_utils,
Johannes Berge932a602009-10-02 13:44:03 -0700761 .led = &iwlagn_led_ops,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800762};
763
Shanyu Zhao18089722010-05-06 10:15:21 -0700764static struct iwl_hcmd_ops iwl6000g2b_hcmd = {
765 .rxon_assoc = iwlagn_send_rxon_assoc,
766 .commit_rxon = iwl_commit_rxon,
767 .set_rxon_chain = iwl_set_rxon_chain,
768 .set_tx_ant = iwlagn_send_tx_ant_config,
Johannes Berg670245e2010-08-23 07:56:55 -0700769 .send_bt_config = iwl6000g2b_send_bt_config,
Shanyu Zhao18089722010-05-06 10:15:21 -0700770};
771
772static const struct iwl_ops iwl6000g2b_ops = {
Johannes Berg9e4afc22010-08-23 07:56:57 -0700773 .lib = &iwl6000g2b_lib,
Shanyu Zhao18089722010-05-06 10:15:21 -0700774 .hcmd = &iwl6000g2b_hcmd,
775 .utils = &iwlagn_hcmd_utils,
776 .led = &iwlagn_led_ops,
777};
778
Shanyu Zhao95b13012010-04-21 11:46:33 -0700779struct iwl_cfg iwl6000g2a_2agn_cfg = {
780 .name = "6000 Series 2x2 AGN Gen2a",
781 .fw_name_pre = IWL6000G2A_FW_PRE,
Shanyu Zhao4b3e8062010-04-07 18:06:36 -0700782 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
783 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700784 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
785 .ops = &iwl6000_ops,
786 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Shanyu Zhao4b3e8062010-04-07 18:06:36 -0700787 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
788 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700789 .num_of_queues = IWLAGN_NUM_QUEUES,
790 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
791 .mod_params = &iwlagn_mod_params,
792 .valid_tx_ant = ANT_AB,
793 .valid_rx_ant = ANT_AB,
794 .pll_cfg_val = 0,
795 .set_l0s = true,
796 .use_bsm = false,
Wey-Yi Guy33e6f812010-04-09 09:36:11 -0700797 .pa_type = IWL_PA_SYSTEM,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700798 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
799 .shadow_ram_support = true,
800 .ht_greenfield_support = true,
801 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -0700802 .use_rts_for_aggregation = true, /* use rts/cts protection */
Jay Sternberg0b5af202010-03-17 16:16:12 -0700803 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
804 .supports_idle = true,
805 .adv_thermal_throttle = true,
806 .support_ct_kill_exit = true,
807 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
808 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -0700809 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Shanyu Zhao95b13012010-04-21 11:46:33 -0700810 .max_event_log_size = 512,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700811 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700812 .sensitivity_calib_by_driver = true,
813 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700814 .need_dc_calib = true,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700815};
816
Shanyu Zhao18089722010-05-06 10:15:21 -0700817struct iwl_cfg iwl6000g2a_2abg_cfg = {
818 .name = "6000 Series 2x2 ABG Gen2a",
819 .fw_name_pre = IWL6000G2A_FW_PRE,
820 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
821 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
822 .sku = IWL_SKU_A|IWL_SKU_G,
823 .ops = &iwl6000_ops,
824 .eeprom_size = OTP_LOW_IMAGE_SIZE,
825 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
826 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
827 .num_of_queues = IWLAGN_NUM_QUEUES,
828 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
829 .mod_params = &iwlagn_mod_params,
830 .valid_tx_ant = ANT_AB,
831 .valid_rx_ant = ANT_AB,
832 .pll_cfg_val = 0,
833 .set_l0s = true,
834 .use_bsm = false,
835 .pa_type = IWL_PA_SYSTEM,
836 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
837 .shadow_ram_support = true,
838 .led_compensation = 51,
839 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
840 .supports_idle = true,
841 .adv_thermal_throttle = true,
842 .support_ct_kill_exit = true,
843 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
844 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -0700845 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -0700846 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700847 .sensitivity_calib_by_driver = true,
848 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700849 .need_dc_calib = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700850};
851
852struct iwl_cfg iwl6000g2a_2bg_cfg = {
853 .name = "6000 Series 2x2 BG Gen2a",
854 .fw_name_pre = IWL6000G2A_FW_PRE,
855 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
856 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
857 .sku = IWL_SKU_G,
858 .ops = &iwl6000_ops,
859 .eeprom_size = OTP_LOW_IMAGE_SIZE,
860 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
861 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
862 .num_of_queues = IWLAGN_NUM_QUEUES,
863 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
864 .mod_params = &iwlagn_mod_params,
865 .valid_tx_ant = ANT_AB,
866 .valid_rx_ant = ANT_AB,
867 .pll_cfg_val = 0,
868 .set_l0s = true,
869 .use_bsm = false,
870 .pa_type = IWL_PA_SYSTEM,
871 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
872 .shadow_ram_support = true,
873 .led_compensation = 51,
874 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
875 .supports_idle = true,
876 .adv_thermal_throttle = true,
877 .support_ct_kill_exit = true,
878 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
879 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -0700880 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -0700881 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700882 .sensitivity_calib_by_driver = true,
883 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700884 .need_dc_calib = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700885};
886
887struct iwl_cfg iwl6000g2b_2agn_cfg = {
888 .name = "6000 Series 2x2 AGN Gen2b",
889 .fw_name_pre = IWL6000G2B_FW_PRE,
890 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
891 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
892 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
893 .ops = &iwl6000g2b_ops,
894 .eeprom_size = OTP_LOW_IMAGE_SIZE,
895 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
896 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
897 .num_of_queues = IWLAGN_NUM_QUEUES,
898 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
899 .mod_params = &iwlagn_mod_params,
900 .valid_tx_ant = ANT_AB,
901 .valid_rx_ant = ANT_AB,
902 .pll_cfg_val = 0,
903 .set_l0s = true,
904 .use_bsm = false,
905 .pa_type = IWL_PA_SYSTEM,
906 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
907 .shadow_ram_support = true,
908 .ht_greenfield_support = true,
909 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -0700910 .use_rts_for_aggregation = true, /* use rts/cts protection */
Shanyu Zhao18089722010-05-06 10:15:21 -0700911 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
912 .supports_idle = true,
913 .adv_thermal_throttle = true,
914 .support_ct_kill_exit = true,
Wey-Yi Guy74e5c412010-08-23 07:57:02 -0700915 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
Shanyu Zhao18089722010-05-06 10:15:21 -0700916 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -0700917 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -0700918 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700919 .sensitivity_calib_by_driver = true,
920 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700921 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -0700922 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700923 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
924 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
925 .advanced_bt_coexist = true,
Wey-Yi Guya4b96cc2010-08-23 07:57:08 -0700926 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
Wey-Yi Guy5d297d52010-08-23 07:57:09 -0700927 .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
Shanyu Zhao18089722010-05-06 10:15:21 -0700928};
929
930struct iwl_cfg iwl6000g2b_2abg_cfg = {
931 .name = "6000 Series 2x2 ABG Gen2b",
932 .fw_name_pre = IWL6000G2B_FW_PRE,
933 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
934 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
935 .sku = IWL_SKU_A|IWL_SKU_G,
936 .ops = &iwl6000g2b_ops,
937 .eeprom_size = OTP_LOW_IMAGE_SIZE,
938 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
939 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
940 .num_of_queues = IWLAGN_NUM_QUEUES,
941 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
942 .mod_params = &iwlagn_mod_params,
943 .valid_tx_ant = ANT_AB,
944 .valid_rx_ant = ANT_AB,
945 .pll_cfg_val = 0,
946 .set_l0s = true,
947 .use_bsm = false,
948 .pa_type = IWL_PA_SYSTEM,
949 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
950 .shadow_ram_support = true,
951 .led_compensation = 51,
952 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
953 .supports_idle = true,
954 .adv_thermal_throttle = true,
955 .support_ct_kill_exit = true,
Wey-Yi Guy74e5c412010-08-23 07:57:02 -0700956 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
Shanyu Zhao18089722010-05-06 10:15:21 -0700957 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -0700958 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -0700959 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700960 .sensitivity_calib_by_driver = true,
961 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700962 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -0700963 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700964 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
965 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
966 .advanced_bt_coexist = true,
Wey-Yi Guya4b96cc2010-08-23 07:57:08 -0700967 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
Wey-Yi Guy5d297d52010-08-23 07:57:09 -0700968 .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
Shanyu Zhao18089722010-05-06 10:15:21 -0700969};
970
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700971struct iwl_cfg iwl6000g2b_2bgn_cfg = {
972 .name = "6000 Series 2x2 BGN Gen2b",
973 .fw_name_pre = IWL6000G2B_FW_PRE,
974 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
975 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
976 .sku = IWL_SKU_G|IWL_SKU_N,
977 .ops = &iwl6000g2b_ops,
978 .eeprom_size = OTP_LOW_IMAGE_SIZE,
979 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
980 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
981 .num_of_queues = IWLAGN_NUM_QUEUES,
982 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
983 .mod_params = &iwlagn_mod_params,
984 .valid_tx_ant = ANT_AB,
985 .valid_rx_ant = ANT_AB,
986 .pll_cfg_val = 0,
987 .set_l0s = true,
988 .use_bsm = false,
989 .pa_type = IWL_PA_SYSTEM,
990 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
991 .shadow_ram_support = true,
992 .ht_greenfield_support = true,
993 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -0700994 .use_rts_for_aggregation = true, /* use rts/cts protection */
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700995 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
996 .supports_idle = true,
997 .adv_thermal_throttle = true,
998 .support_ct_kill_exit = true,
Wey-Yi Guy74e5c412010-08-23 07:57:02 -0700999 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -07001000 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -07001001 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -07001002 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -07001003 .sensitivity_calib_by_driver = true,
1004 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001005 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -07001006 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -07001007 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
1008 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
1009 .advanced_bt_coexist = true,
Wey-Yi Guya4b96cc2010-08-23 07:57:08 -07001010 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
Wey-Yi Guy5d297d52010-08-23 07:57:09 -07001011 .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -07001012};
1013
Shanyu Zhao18089722010-05-06 10:15:21 -07001014struct iwl_cfg iwl6000g2b_2bg_cfg = {
1015 .name = "6000 Series 2x2 BG Gen2b",
1016 .fw_name_pre = IWL6000G2B_FW_PRE,
1017 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
1018 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
1019 .sku = IWL_SKU_G,
1020 .ops = &iwl6000g2b_ops,
1021 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1022 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
1023 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
1024 .num_of_queues = IWLAGN_NUM_QUEUES,
1025 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
1026 .mod_params = &iwlagn_mod_params,
1027 .valid_tx_ant = ANT_AB,
1028 .valid_rx_ant = ANT_AB,
1029 .pll_cfg_val = 0,
1030 .set_l0s = true,
1031 .use_bsm = false,
1032 .pa_type = IWL_PA_SYSTEM,
1033 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1034 .shadow_ram_support = true,
1035 .led_compensation = 51,
1036 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
1037 .supports_idle = true,
1038 .adv_thermal_throttle = true,
1039 .support_ct_kill_exit = true,
Wey-Yi Guy74e5c412010-08-23 07:57:02 -07001040 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
Shanyu Zhao18089722010-05-06 10:15:21 -07001041 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -07001042 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -07001043 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -07001044 .sensitivity_calib_by_driver = true,
1045 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001046 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -07001047 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -07001048 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
1049 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
1050 .advanced_bt_coexist = true,
Wey-Yi Guya4b96cc2010-08-23 07:57:08 -07001051 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
Wey-Yi Guy5d297d52010-08-23 07:57:09 -07001052 .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
Shanyu Zhao18089722010-05-06 10:15:21 -07001053};
1054
1055struct iwl_cfg iwl6000g2b_bgn_cfg = {
1056 .name = "6000 Series 1x2 BGN Gen2b",
1057 .fw_name_pre = IWL6000G2B_FW_PRE,
1058 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
1059 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
1060 .sku = IWL_SKU_G|IWL_SKU_N,
1061 .ops = &iwl6000g2b_ops,
1062 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1063 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
1064 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
1065 .num_of_queues = IWLAGN_NUM_QUEUES,
1066 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
1067 .mod_params = &iwlagn_mod_params,
1068 .valid_tx_ant = ANT_A,
1069 .valid_rx_ant = ANT_AB,
1070 .pll_cfg_val = 0,
1071 .set_l0s = true,
1072 .use_bsm = false,
1073 .pa_type = IWL_PA_SYSTEM,
1074 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1075 .shadow_ram_support = true,
1076 .ht_greenfield_support = true,
1077 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -07001078 .use_rts_for_aggregation = true, /* use rts/cts protection */
Shanyu Zhao18089722010-05-06 10:15:21 -07001079 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
1080 .supports_idle = true,
1081 .adv_thermal_throttle = true,
1082 .support_ct_kill_exit = true,
Wey-Yi Guy74e5c412010-08-23 07:57:02 -07001083 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
Shanyu Zhao18089722010-05-06 10:15:21 -07001084 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -07001085 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -07001086 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -07001087 .sensitivity_calib_by_driver = true,
1088 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001089 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -07001090 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -07001091 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
1092 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
1093 .advanced_bt_coexist = true,
Wey-Yi Guya4b96cc2010-08-23 07:57:08 -07001094 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
Wey-Yi Guy5d297d52010-08-23 07:57:09 -07001095 .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
Shanyu Zhao18089722010-05-06 10:15:21 -07001096};
1097
1098struct iwl_cfg iwl6000g2b_bg_cfg = {
1099 .name = "6000 Series 1x2 BG Gen2b",
1100 .fw_name_pre = IWL6000G2B_FW_PRE,
1101 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
1102 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
1103 .sku = IWL_SKU_G,
1104 .ops = &iwl6000g2b_ops,
1105 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1106 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
1107 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
1108 .num_of_queues = IWLAGN_NUM_QUEUES,
1109 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
1110 .mod_params = &iwlagn_mod_params,
1111 .valid_tx_ant = ANT_A,
1112 .valid_rx_ant = ANT_AB,
1113 .pll_cfg_val = 0,
1114 .set_l0s = true,
1115 .use_bsm = false,
1116 .pa_type = IWL_PA_SYSTEM,
1117 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1118 .shadow_ram_support = true,
1119 .led_compensation = 51,
1120 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
1121 .supports_idle = true,
1122 .adv_thermal_throttle = true,
1123 .support_ct_kill_exit = true,
Wey-Yi Guy74e5c412010-08-23 07:57:02 -07001124 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
Shanyu Zhao18089722010-05-06 10:15:21 -07001125 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -07001126 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -07001127 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -07001128 .sensitivity_calib_by_driver = true,
1129 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001130 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -07001131 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -07001132 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
1133 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
1134 .advanced_bt_coexist = true,
Wey-Yi Guya4b96cc2010-08-23 07:57:08 -07001135 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
Wey-Yi Guy5d297d52010-08-23 07:57:09 -07001136 .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
Shanyu Zhao18089722010-05-06 10:15:21 -07001137};
1138
Shanyu Zhao95b13012010-04-21 11:46:33 -07001139/*
1140 * "i": Internal configuration, use internal Power Amplifier
1141 */
Wey-Yi Guy65b79982009-07-31 14:28:07 -07001142struct iwl_cfg iwl6000i_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -08001143 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
Wey-Yi Guy65b79982009-07-31 14:28:07 -07001144 .fw_name_pre = IWL6000_FW_PRE,
1145 .ucode_api_max = IWL6000_UCODE_API_MAX,
1146 .ucode_api_min = IWL6000_UCODE_API_MIN,
1147 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
1148 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -07001149 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -07001150 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -07001151 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -07001152 .num_of_queues = IWLAGN_NUM_QUEUES,
1153 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7c2010-03-16 12:37:27 -07001154 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy65b79982009-07-31 14:28:07 -07001155 .valid_tx_ant = ANT_BC,
1156 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -07001157 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -07001158 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -07001159 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -07001160 .pa_type = IWL_PA_INTERNAL,
Wey-Yi Guy415e4992009-08-13 13:30:54 -07001161 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1162 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -07001163 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -07001164 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -07001165 .use_rts_for_aggregation = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -07001166 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -07001167 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -07001168 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -07001169 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -08001170 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -08001171 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001172 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -07001173 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -07001174 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -07001175 .sensitivity_calib_by_driver = true,
1176 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -08001177};
1178
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001179struct iwl_cfg iwl6000i_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -08001180 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001181 .fw_name_pre = IWL6000_FW_PRE,
1182 .ucode_api_max = IWL6000_UCODE_API_MAX,
1183 .ucode_api_min = IWL6000_UCODE_API_MIN,
1184 .sku = IWL_SKU_A|IWL_SKU_G,
1185 .ops = &iwl6000_ops,
1186 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1187 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -07001188 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -07001189 .num_of_queues = IWLAGN_NUM_QUEUES,
1190 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7c2010-03-16 12:37:27 -07001191 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001192 .valid_tx_ant = ANT_BC,
1193 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -07001194 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -07001195 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -07001196 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001197 .pa_type = IWL_PA_INTERNAL,
1198 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1199 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001200 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -07001201 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -07001202 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -07001203 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -07001204 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -08001205 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -08001206 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001207 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -07001208 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -07001209 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -07001210 .sensitivity_calib_by_driver = true,
1211 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001212};
1213
1214struct iwl_cfg iwl6000i_2bg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -08001215 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001216 .fw_name_pre = IWL6000_FW_PRE,
1217 .ucode_api_max = IWL6000_UCODE_API_MAX,
1218 .ucode_api_min = IWL6000_UCODE_API_MIN,
1219 .sku = IWL_SKU_G,
1220 .ops = &iwl6000_ops,
1221 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1222 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -07001223 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -07001224 .num_of_queues = IWLAGN_NUM_QUEUES,
1225 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7c2010-03-16 12:37:27 -07001226 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001227 .valid_tx_ant = ANT_BC,
1228 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -07001229 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -07001230 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -07001231 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001232 .pa_type = IWL_PA_INTERNAL,
1233 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1234 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001235 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -07001236 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -07001237 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -07001238 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -07001239 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -08001240 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -08001241 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001242 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -07001243 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -07001244 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -07001245 .sensitivity_calib_by_driver = true,
1246 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001247};
1248
Jay Sternberge1228372009-01-19 15:30:34 -08001249struct iwl_cfg iwl6050_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -08001250 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -08001251 .fw_name_pre = IWL6050_FW_PRE,
1252 .ucode_api_max = IWL6050_UCODE_API_MAX,
1253 .ucode_api_min = IWL6050_UCODE_API_MIN,
1254 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001255 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -07001256 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -07001257 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -07001258 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -07001259 .num_of_queues = IWLAGN_NUM_QUEUES,
1260 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7c2010-03-16 12:37:27 -07001261 .mod_params = &iwlagn_mod_params,
Jay Sternberg542cc792009-05-08 13:44:46 -07001262 .valid_tx_ant = ANT_AB,
1263 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -07001264 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -07001265 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -07001266 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -07001267 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -07001268 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy415e4992009-08-13 13:30:54 -07001269 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -07001270 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -07001271 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -07001272 .use_rts_for_aggregation = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -07001273 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -07001274 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -07001275 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -07001276 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -08001277 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -08001278 .chain_noise_scale = 1500,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001279 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -07001280 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -07001281 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -07001282 .sensitivity_calib_by_driver = true,
1283 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001284 .need_dc_calib = true,
Jay Sternberge1228372009-01-19 15:30:34 -08001285};
1286
Shanyu Zhao03264332010-06-29 17:27:27 -07001287struct iwl_cfg iwl6050g2_bgn_cfg = {
1288 .name = "6050 Series 1x2 BGN Gen2",
1289 .fw_name_pre = IWL6050_FW_PRE,
1290 .ucode_api_max = IWL6050_UCODE_API_MAX,
1291 .ucode_api_min = IWL6050_UCODE_API_MIN,
1292 .sku = IWL_SKU_G|IWL_SKU_N,
1293 .ops = &iwl6000_ops,
1294 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1295 .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION,
1296 .eeprom_calib_ver = EEPROM_6050G2_TX_POWER_VERSION,
1297 .num_of_queues = IWLAGN_NUM_QUEUES,
1298 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
1299 .mod_params = &iwlagn_mod_params,
1300 .valid_tx_ant = ANT_A,
1301 .valid_rx_ant = ANT_AB,
1302 .pll_cfg_val = 0,
1303 .set_l0s = true,
1304 .use_bsm = false,
1305 .pa_type = IWL_PA_SYSTEM,
1306 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
1307 .shadow_ram_support = true,
1308 .ht_greenfield_support = true,
1309 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -07001310 .use_rts_for_aggregation = true, /* use rts/cts protection */
Shanyu Zhao03264332010-06-29 17:27:27 -07001311 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
1312 .supports_idle = true,
1313 .adv_thermal_throttle = true,
1314 .support_ct_kill_exit = true,
1315 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
1316 .chain_noise_scale = 1500,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001317 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Shanyu Zhao03264332010-06-29 17:27:27 -07001318 .max_event_log_size = 1024,
1319 .ucode_tracing = true,
1320 .sensitivity_calib_by_driver = true,
1321 .chain_noise_calib_by_driver = true,
1322 .need_dc_calib = true,
1323};
1324
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001325struct iwl_cfg iwl6050_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -08001326 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001327 .fw_name_pre = IWL6050_FW_PRE,
1328 .ucode_api_max = IWL6050_UCODE_API_MAX,
1329 .ucode_api_min = IWL6050_UCODE_API_MIN,
1330 .sku = IWL_SKU_A|IWL_SKU_G,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001331 .ops = &iwl6000_ops,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001332 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -07001333 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -07001334 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -07001335 .num_of_queues = IWLAGN_NUM_QUEUES,
1336 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7c2010-03-16 12:37:27 -07001337 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001338 .valid_tx_ant = ANT_AB,
1339 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -07001340 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -07001341 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -07001342 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001343 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -07001344 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001345 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001346 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -07001347 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -07001348 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -07001349 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -07001350 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -08001351 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -08001352 .chain_noise_scale = 1500,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001353 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -07001354 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -07001355 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -07001356 .sensitivity_calib_by_driver = true,
1357 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001358 .need_dc_calib = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001359};
1360
Jay Sternberge1228372009-01-19 15:30:34 -08001361struct iwl_cfg iwl6000_3agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -08001362 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -08001363 .fw_name_pre = IWL6000_FW_PRE,
1364 .ucode_api_max = IWL6000_UCODE_API_MAX,
1365 .ucode_api_min = IWL6000_UCODE_API_MIN,
1366 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Jay Sternberg29f35c12009-01-29 11:09:16 -08001367 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -07001368 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -07001369 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -07001370 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -07001371 .num_of_queues = IWLAGN_NUM_QUEUES,
1372 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7c2010-03-16 12:37:27 -07001373 .mod_params = &iwlagn_mod_params,
Jay Sternbergc0bac762009-02-02 16:21:14 -08001374 .valid_tx_ant = ANT_ABC,
1375 .valid_rx_ant = ANT_ABC,
Ben Cahillfadb3582009-10-23 13:42:21 -07001376 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -07001377 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -07001378 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -07001379 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy415e4992009-08-13 13:30:54 -07001380 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1381 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -07001382 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -07001383 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -07001384 .use_rts_for_aggregation = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -07001385 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -07001386 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -07001387 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -07001388 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -08001389 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -08001390 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001391 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -07001392 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -07001393 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -07001394 .sensitivity_calib_by_driver = true,
1395 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -08001396};
1397
Jay Sternberge1228372009-01-19 15:30:34 -08001398MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
1399MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
Shanyu Zhao95b13012010-04-21 11:46:33 -07001400MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
Shanyu Zhao18089722010-05-06 10:15:21 -07001401MODULE_FIRMWARE(IWL6000G2B_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));