blob: ebf0c7ecef4e471fbb1c834475198015ce8de813 [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 {
Wey-Yi Guyf37837c2010-08-23 07:57:12 -0700245 bt_cmd.flags = IWL6000G2B_BT_FLAG_COEX_MODE_3W <<
Johannes Berg670245e2010-08-23 07:56:55 -0700246 IWL6000G2B_BT_FLAG_COEX_MODE_SHIFT;
Wey-Yi Guyf37837c2010-08-23 07:57:12 -0700247 if (priv->bt_ch_announce)
248 bt_cmd.flags |= IWL6000G2B_BT_FLAG_CHANNEL_INHIBITION;
249 IWL_DEBUG_INFO(priv, "BT coex flag: 0X%x\n", bt_cmd.flags);
Johannes Berg670245e2010-08-23 07:56:55 -0700250 }
251
Wey-Yi Guybee008b2010-08-23 07:57:04 -0700252 if (priv->bt_full_concurrent)
253 memcpy(bt_cmd.bt3_lookup_table, iwl6000g2b_concurrent_lookup,
254 sizeof(iwl6000g2b_concurrent_lookup));
255 else
256 memcpy(bt_cmd.bt3_lookup_table, iwl6000g2b_def_3w_lookup,
257 sizeof(iwl6000g2b_def_3w_lookup));
Johannes Berg670245e2010-08-23 07:56:55 -0700258
Wey-Yi Guybee008b2010-08-23 07:57:04 -0700259 IWL_DEBUG_INFO(priv, "BT coex %s in %s mode\n",
260 bt_cmd.flags ? "active" : "disabled",
261 priv->bt_full_concurrent ?
262 "full concurrency" : "3-wire");
Johannes Berg670245e2010-08-23 07:56:55 -0700263
264 if (iwl_send_cmd_pdu(priv, REPLY_BT_CONFIG, sizeof(bt_cmd), &bt_cmd))
265 IWL_ERR(priv, "failed to send BT Coex Config\n");
Johannes Berg511b0822010-08-23 07:57:01 -0700266
267 /*
268 * When we are doing a restart, need to also reconfigure BT
269 * SCO to the device. If not doing a restart, bt_sco_active
270 * will always be false, so there's no need to have an extra
271 * variable to check for it.
272 */
273 if (priv->bt_sco_active) {
274 struct iwl6000g2b_bt_sco_cmd sco_cmd = { .flags = 0 };
275
276 if (priv->bt_sco_active)
277 sco_cmd.flags |= IWL6000G2B_BT_SCO_ACTIVE;
278 if (iwl_send_cmd_pdu(priv, REPLY_BT_COEX_SCO,
279 sizeof(sco_cmd), &sco_cmd))
280 IWL_ERR(priv, "failed to send BT SCO command\n");
281 }
Johannes Berg670245e2010-08-23 07:56:55 -0700282}
283
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700284static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
285 .min_nrg_cck = 97,
286 .max_nrg_cck = 0, /* not used, set to 0 */
287 .auto_corr_min_ofdm = 80,
288 .auto_corr_min_ofdm_mrc = 128,
289 .auto_corr_min_ofdm_x1 = 105,
290 .auto_corr_min_ofdm_mrc_x1 = 192,
291
292 .auto_corr_max_ofdm = 145,
293 .auto_corr_max_ofdm_mrc = 232,
Wey-Yi Guy2494f632010-01-20 12:22:52 -0800294 .auto_corr_max_ofdm_x1 = 110,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700295 .auto_corr_max_ofdm_mrc_x1 = 232,
296
297 .auto_corr_min_cck = 125,
298 .auto_corr_max_cck = 175,
299 .auto_corr_min_cck_mrc = 160,
300 .auto_corr_max_cck_mrc = 310,
301 .nrg_th_cck = 97,
302 .nrg_th_ofdm = 100,
Wey-Yi Guy55036d62009-10-09 13:20:24 -0700303
304 .barker_corr_th_min = 190,
305 .barker_corr_th_min_mrc = 390,
306 .nrg_th_cca = 62,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700307};
308
309static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
310{
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700311 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700312 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700313 priv->cfg->num_of_queues =
314 priv->cfg->mod_params->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700315
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700316 priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700317 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
318 priv->hw_params.scd_bc_tbls_size =
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700319 priv->cfg->num_of_queues *
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700320 sizeof(struct iwlagn_scd_bc_tbl);
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700321 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
Wey-Yi Guybf3c7fd2010-06-24 14:08:05 -0700322 priv->hw_params.max_stations = IWLAGN_STATION_COUNT;
323 priv->hw_params.bcast_sta_id = IWLAGN_BROADCAST_ID;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700324
325 priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
326 priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
327
328 priv->hw_params.max_bsm_size = 0;
329 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
330 BIT(IEEE80211_BAND_5GHZ);
331 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
332
333 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
334 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
335 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
336 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
337
338 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
339 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
340
341 /* Set initial sensitivity parameters */
342 /* Set initial calibration set */
343 priv->hw_params.sens = &iwl6000_sensitivity;
Wey-Yi Guye5177362010-04-19 18:49:40 -0700344 priv->hw_params.calib_init_cfg =
345 BIT(IWL_CALIB_XTAL) |
346 BIT(IWL_CALIB_LO) |
347 BIT(IWL_CALIB_TX_IQ) |
348 BIT(IWL_CALIB_BASE_BAND);
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700349 if (priv->cfg->need_dc_calib)
350 priv->hw_params.calib_init_cfg |= BIT(IWL_CALIB_DC);
Abhijeet Kolekar07f33f92010-01-22 14:22:47 -0800351
Wey-Yi Guya0ee74c2010-05-06 08:54:10 -0700352 priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
353
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700354 return 0;
355}
356
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700357static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
358 struct ieee80211_channel_switch *ch_switch)
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700359{
360 struct iwl6000_channel_switch_cmd cmd;
361 const struct iwl_channel_info *ch_info;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700362 u32 switch_time_in_usec, ucode_switch_time;
363 u16 ch;
364 u32 tsf_low;
365 u8 switch_count;
366 u16 beacon_interval = le16_to_cpu(priv->rxon_timing.beacon_interval);
367 struct ieee80211_vif *vif = priv->vif;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700368 struct iwl_host_cmd hcmd = {
369 .id = REPLY_CHANNEL_SWITCH,
370 .len = sizeof(cmd),
Wey-Yi Guy3839f7c2010-05-18 09:18:06 -0700371 .flags = CMD_SYNC,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700372 .data = &cmd,
373 };
374
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700375 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
Shanyu Zhao81e95432010-07-28 13:40:27 -0700376 ch = ch_switch->channel->hw_value;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700377 IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
378 priv->active_rxon.channel, ch);
379 cmd.channel = cpu_to_le16(ch);
Wey-Yi Guy0924e512009-11-06 14:52:54 -0800380 cmd.rxon_flags = priv->staging_rxon.flags;
381 cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700382 switch_count = ch_switch->count;
383 tsf_low = ch_switch->timestamp & 0x0ffffffff;
384 /*
385 * calculate the ucode channel switch time
386 * adding TSF as one of the factor for when to switch
387 */
388 if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) {
389 if (switch_count > ((priv->ucode_beacon_time - tsf_low) /
390 beacon_interval)) {
391 switch_count -= (priv->ucode_beacon_time -
392 tsf_low) / beacon_interval;
393 } else
394 switch_count = 0;
395 }
396 if (switch_count <= 1)
397 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
398 else {
399 switch_time_in_usec =
400 vif->bss_conf.beacon_int * switch_count * TIME_UNIT;
401 ucode_switch_time = iwl_usecs_to_beacons(priv,
402 switch_time_in_usec,
403 beacon_interval);
404 cmd.switch_time = iwl_add_beacon_time(priv,
405 priv->ucode_beacon_time,
406 ucode_switch_time,
407 beacon_interval);
408 }
409 IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
410 cmd.switch_time);
411 ch_info = iwl_get_channel_info(priv, priv->band, ch);
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700412 if (ch_info)
413 cmd.expect_beacon = is_channel_radar(ch_info);
414 else {
415 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700416 priv->active_rxon.channel, ch);
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700417 return -EFAULT;
418 }
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700419 priv->switch_rxon.channel = cmd.channel;
Wey-Yi Guy0924e512009-11-06 14:52:54 -0800420 priv->switch_rxon.switch_in_progress = true;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700421
422 return iwl_send_cmd_sync(priv, &hcmd);
423}
424
Johannes Berg9e4afc22010-08-23 07:56:57 -0700425static void iwl6000g2b_bt_traffic_change_work(struct work_struct *work)
426{
427 struct iwl_priv *priv =
428 container_of(work, struct iwl_priv, bt_traffic_change_work);
429 int smps_request = -1;
430
431 switch (priv->bt_traffic_load) {
432 case IWL_BT_COEX_TRAFFIC_LOAD_NONE:
433 smps_request = IEEE80211_SMPS_AUTOMATIC;
434 break;
435 case IWL_BT_COEX_TRAFFIC_LOAD_LOW:
436 smps_request = IEEE80211_SMPS_DYNAMIC;
437 break;
438 case IWL_BT_COEX_TRAFFIC_LOAD_HIGH:
439 case IWL_BT_COEX_TRAFFIC_LOAD_CONTINUOUS:
440 smps_request = IEEE80211_SMPS_STATIC;
441 break;
442 default:
443 IWL_ERR(priv, "Invalid BT traffic load: %d\n",
444 priv->bt_traffic_load);
445 break;
446 }
447
448 mutex_lock(&priv->mutex);
449
450 if (smps_request != -1 &&
451 priv->vif && priv->vif->type == NL80211_IFTYPE_STATION)
452 ieee80211_request_smps(priv->vif, smps_request);
453
454 mutex_unlock(&priv->mutex);
455}
456
Wey-Yi Guyfbba9412010-08-23 07:57:10 -0700457static void iwlagn_print_uartmsg(struct iwl_priv *priv,
458 struct iwl_bt_uart_msg *uart_msg)
459{
460 IWL_DEBUG_NOTIF(priv, "Message Type = 0x%X, SSN = 0x%X, "
461 "Update Req = 0x%X",
462 (BT_UART_MSG_FRAME1MSGTYPE_MSK & uart_msg->frame1) >>
463 BT_UART_MSG_FRAME1MSGTYPE_POS,
464 (BT_UART_MSG_FRAME1SSN_MSK & uart_msg->frame1) >>
465 BT_UART_MSG_FRAME1SSN_POS,
466 (BT_UART_MSG_FRAME1UPDATEREQ_MSK & uart_msg->frame1) >>
467 BT_UART_MSG_FRAME1UPDATEREQ_POS);
468
469 IWL_DEBUG_NOTIF(priv, "Open connections = 0x%X, Traffic load = 0x%X, "
470 "Chl_SeqN = 0x%X, In band = 0x%X",
471 (BT_UART_MSG_FRAME2OPENCONNECTIONS_MSK & uart_msg->frame2) >>
472 BT_UART_MSG_FRAME2OPENCONNECTIONS_POS,
473 (BT_UART_MSG_FRAME2TRAFFICLOAD_MSK & uart_msg->frame2) >>
474 BT_UART_MSG_FRAME2TRAFFICLOAD_POS,
475 (BT_UART_MSG_FRAME2CHLSEQN_MSK & uart_msg->frame2) >>
476 BT_UART_MSG_FRAME2CHLSEQN_POS,
477 (BT_UART_MSG_FRAME2INBAND_MSK & uart_msg->frame2) >>
478 BT_UART_MSG_FRAME2INBAND_POS);
479
480 IWL_DEBUG_NOTIF(priv, "SCO/eSCO = 0x%X, Sniff = 0x%X, A2DP = 0x%X, "
481 "ACL = 0x%X, Master = 0x%X, OBEX = 0x%X",
482 (BT_UART_MSG_FRAME3SCOESCO_MSK & uart_msg->frame3) >>
483 BT_UART_MSG_FRAME3SCOESCO_POS,
484 (BT_UART_MSG_FRAME3SNIFF_MSK & uart_msg->frame3) >>
485 BT_UART_MSG_FRAME3SNIFF_POS,
486 (BT_UART_MSG_FRAME3A2DP_MSK & uart_msg->frame3) >>
487 BT_UART_MSG_FRAME3A2DP_POS,
488 (BT_UART_MSG_FRAME3ACL_MSK & uart_msg->frame3) >>
489 BT_UART_MSG_FRAME3ACL_POS,
490 (BT_UART_MSG_FRAME3MASTER_MSK & uart_msg->frame3) >>
491 BT_UART_MSG_FRAME3MASTER_POS,
492 (BT_UART_MSG_FRAME3OBEX_MSK & uart_msg->frame3) >>
493 BT_UART_MSG_FRAME3OBEX_POS);
494
495 IWL_DEBUG_NOTIF(priv, "Idle duration = 0x%X",
496 (BT_UART_MSG_FRAME4IDLEDURATION_MSK & uart_msg->frame4) >>
497 BT_UART_MSG_FRAME4IDLEDURATION_POS);
498
499 IWL_DEBUG_NOTIF(priv, "Tx Activity = 0x%X, Rx Activity = 0x%X, "
500 "eSCO Retransmissions = 0x%X",
501 (BT_UART_MSG_FRAME5TXACTIVITY_MSK & uart_msg->frame5) >>
502 BT_UART_MSG_FRAME5TXACTIVITY_POS,
503 (BT_UART_MSG_FRAME5RXACTIVITY_MSK & uart_msg->frame5) >>
504 BT_UART_MSG_FRAME5RXACTIVITY_POS,
505 (BT_UART_MSG_FRAME5ESCORETRANSMIT_MSK & uart_msg->frame5) >>
506 BT_UART_MSG_FRAME5ESCORETRANSMIT_POS);
507
508 IWL_DEBUG_NOTIF(priv, "Sniff Interval = 0x%X, Discoverable = 0x%X",
509 (BT_UART_MSG_FRAME6SNIFFINTERVAL_MSK & uart_msg->frame6) >>
510 BT_UART_MSG_FRAME6SNIFFINTERVAL_POS,
511 (BT_UART_MSG_FRAME6DISCOVERABLE_MSK & uart_msg->frame6) >>
512 BT_UART_MSG_FRAME6DISCOVERABLE_POS);
513
514 IWL_DEBUG_NOTIF(priv, "Sniff Activity = 0x%X, Inquiry/Page SR Mode = "
515 "0x%X, Connectable = 0x%X",
516 (BT_UART_MSG_FRAME7SNIFFACTIVITY_MSK & uart_msg->frame7) >>
517 BT_UART_MSG_FRAME7SNIFFACTIVITY_POS,
518 (BT_UART_MSG_FRAME7INQUIRYPAGESRMODE_MSK & uart_msg->frame7) >>
519 BT_UART_MSG_FRAME7INQUIRYPAGESRMODE_POS,
520 (BT_UART_MSG_FRAME7CONNECTABLE_MSK & uart_msg->frame7) >>
521 BT_UART_MSG_FRAME7CONNECTABLE_POS);
522}
523
524static void iwl6000g2b_set_kill_ack_msk(struct iwl_priv *priv,
525 struct iwl_bt_uart_msg *uart_msg)
526{
527 u8 kill_ack_msk;
528 __le32 bt_kill_ack_msg[2] = {
529 cpu_to_le32(0xFFFFFFF), cpu_to_le32(0xFFFFFC00) };
530
531 kill_ack_msk = (((BT_UART_MSG_FRAME3A2DP_MSK |
532 BT_UART_MSG_FRAME3SNIFF_MSK |
533 BT_UART_MSG_FRAME3SCOESCO_MSK) &
534 uart_msg->frame3) == 0) ? 1 : 0;
535 if (priv->kill_ack_mask != bt_kill_ack_msg[kill_ack_msk]) {
536 priv->bt_valid |= IWL6000G2B_BT_VALID_KILL_ACK_MASK;
537 priv->kill_ack_mask = bt_kill_ack_msg[kill_ack_msk];
538 /* schedule to send runtime bt_config */
539 queue_work(priv->workqueue, &priv->bt_runtime_config);
540 }
541
542}
543
Johannes Berg9e4afc22010-08-23 07:56:57 -0700544static void iwl6000g2b_bt_coex_profile_notif(struct iwl_priv *priv,
545 struct iwl_rx_mem_buffer *rxb)
546{
Wey-Yi Guybee008b2010-08-23 07:57:04 -0700547 unsigned long flags;
Johannes Berg9e4afc22010-08-23 07:56:57 -0700548 struct iwl_rx_packet *pkt = rxb_addr(rxb);
549 struct iwl_bt_coex_profile_notif *coex = &pkt->u.bt_coex_profile_notif;
550 struct iwl6000g2b_bt_sco_cmd sco_cmd = { .flags = 0 };
Wey-Yi Guyfbba9412010-08-23 07:57:10 -0700551 struct iwl_bt_uart_msg *uart_msg = &coex->last_bt_uart_msg;
Johannes Berg9e4afc22010-08-23 07:56:57 -0700552
553 IWL_DEBUG_NOTIF(priv, "BT Coex notification:\n");
554 IWL_DEBUG_NOTIF(priv, " status: %d\n", coex->bt_status);
555 IWL_DEBUG_NOTIF(priv, " traffic load: %d\n", coex->bt_traffic_load);
556 IWL_DEBUG_NOTIF(priv, " CI compliance: %d\n", coex->bt_ci_compliance);
Wey-Yi Guyfbba9412010-08-23 07:57:10 -0700557 iwlagn_print_uartmsg(priv, uart_msg);
Johannes Berg9e4afc22010-08-23 07:56:57 -0700558
Johannes Berg590799492010-08-23 07:57:00 -0700559 priv->notif_bt_traffic_load = coex->bt_traffic_load;
Johannes Berg9e4afc22010-08-23 07:56:57 -0700560
Johannes Berg590799492010-08-23 07:57:00 -0700561 if (priv->iw_mode != NL80211_IFTYPE_ADHOC) {
562 if (coex->bt_traffic_load != priv->bt_traffic_load) {
563 priv->bt_traffic_load = coex->bt_traffic_load;
564
565 queue_work(priv->workqueue,
566 &priv->bt_traffic_change_work);
567 }
568
Wey-Yi Guyfbba9412010-08-23 07:57:10 -0700569 if (priv->bt_sco_active !=
570 (uart_msg->frame3 & BT_UART_MSG_FRAME3SCOESCO_MSK)) {
571 priv->bt_sco_active = uart_msg->frame3 &
572 BT_UART_MSG_FRAME3SCOESCO_MSK;
573 if (priv->bt_sco_active)
574 sco_cmd.flags |= IWL6000G2B_BT_SCO_ACTIVE;
575 iwl_send_cmd_pdu_async(priv, REPLY_BT_COEX_SCO,
Johannes Berg590799492010-08-23 07:57:00 -0700576 sizeof(sco_cmd), &sco_cmd, NULL);
Wey-Yi Guyfbba9412010-08-23 07:57:10 -0700577 }
Johannes Berg9e4afc22010-08-23 07:56:57 -0700578 }
Wey-Yi Guybee008b2010-08-23 07:57:04 -0700579
Wey-Yi Guyfbba9412010-08-23 07:57:10 -0700580 iwl6000g2b_set_kill_ack_msk(priv, uart_msg);
581
Wey-Yi Guy5d297d52010-08-23 07:57:09 -0700582 /* FIXME: based on notification, adjust the prio_boost */
583
Wey-Yi Guybee008b2010-08-23 07:57:04 -0700584 spin_lock_irqsave(&priv->lock, flags);
585 priv->bt_ci_compliance = coex->bt_ci_compliance;
586 spin_unlock_irqrestore(&priv->lock, flags);
Johannes Berg9e4afc22010-08-23 07:56:57 -0700587}
588
589void iwl6000g2b_rx_handler_setup(struct iwl_priv *priv)
590{
591 iwlagn_rx_handler_setup(priv);
592 priv->rx_handlers[REPLY_BT_COEX_PROFILE_NOTIF] =
593 iwl6000g2b_bt_coex_profile_notif;
594}
595
596static void iwl6000g2b_bt_setup_deferred_work(struct iwl_priv *priv)
597{
598 iwlagn_setup_deferred_work(priv);
599
600 INIT_WORK(&priv->bt_traffic_change_work,
601 iwl6000g2b_bt_traffic_change_work);
602
603}
604
605static void iwl6000g2b_bt_cancel_deferred_work(struct iwl_priv *priv)
606{
607 cancel_work_sync(&priv->bt_traffic_change_work);
608}
609
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700610static struct iwl_lib_ops iwl6000_lib = {
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700611 .set_hw_params = iwl6000_hw_set_hw_params,
Wey-Yi Guyb305a082010-03-16 17:41:22 -0700612 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
613 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
614 .txq_set_sched = iwlagn_txq_set_sched,
615 .txq_agg_enable = iwlagn_txq_agg_enable,
616 .txq_agg_disable = iwlagn_txq_agg_disable,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700617 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
618 .txq_free_tfd = iwl_hw_txq_free_tfd,
619 .txq_init = iwl_hw_tx_queue_init,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700620 .rx_handler_setup = iwlagn_rx_handler_setup,
621 .setup_deferred_work = iwlagn_setup_deferred_work,
622 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
Wey-Yi Guy81b81762010-03-16 10:23:30 -0700623 .load_ucode = iwlagn_load_ucode,
Reinette Chatreb7a79402009-09-25 14:24:23 -0700624 .dump_nic_event_log = iwl_dump_nic_event_log,
625 .dump_nic_error_log = iwl_dump_nic_error_log,
Wey-Yi Guy696bdee2009-12-10 14:37:25 -0800626 .dump_csr = iwl_dump_csr,
Wey-Yi Guy1b3eb822010-01-15 13:43:39 -0800627 .dump_fh = iwl_dump_fh,
Wey-Yi Guy741a6262010-03-16 12:37:24 -0700628 .init_alive_start = iwlagn_init_alive_start,
629 .alive_notify = iwlagn_alive_notify,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700630 .send_tx_power = iwlagn_send_tx_power,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700631 .update_chain_flags = iwl_update_chain_flags,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700632 .set_channel_switch = iwl6000_hw_channel_switch,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700633 .apm_ops = {
Ben Cahillfadb3582009-10-23 13:42:21 -0700634 .init = iwl_apm_init,
Abhijeet Kolekard68b6032009-10-02 13:44:04 -0700635 .stop = iwl_apm_stop,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700636 .config = iwl6000_nic_config,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700637 .set_pwr_src = iwl_set_pwr_src,
638 },
639 .eeprom_ops = {
640 .regulatory_bands = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700641 EEPROM_REG_BAND_1_CHANNELS,
642 EEPROM_REG_BAND_2_CHANNELS,
643 EEPROM_REG_BAND_3_CHANNELS,
644 EEPROM_REG_BAND_4_CHANNELS,
645 EEPROM_REG_BAND_5_CHANNELS,
Shanyu Zhaof2fa1b02010-04-07 18:37:52 -0700646 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700647 EEPROM_REG_BAND_52_HT40_CHANNELS
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700648 },
649 .verify_signature = iwlcore_eeprom_verify_signature,
650 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
651 .release_semaphore = iwlcore_eeprom_release_semaphore,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700652 .calib_version = iwlagn_eeprom_calib_version,
653 .query_addr = iwlagn_eeprom_query_addr,
Wey-Yi Guyab9fd1b2009-08-21 13:34:23 -0700654 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700655 },
656 .post_associate = iwl_post_associate,
657 .isr = iwl_isr_ict,
658 .config_ap = iwl_config_ap,
659 .temp_ops = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700660 .temperature = iwlagn_temperature,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700661 .set_ct_kill = iwl6000_set_ct_threshold,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700662 .set_calib_version = iwl6000_set_calib_version,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700663 },
Johannes Berg1fa61b22010-04-28 08:44:52 -0700664 .manage_ibss_station = iwlagn_manage_ibss_station,
Daniel Halperin278c2f62010-06-14 13:10:29 -0700665 .update_bcast_station = iwl_update_bcast_station,
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -0700666 .debugfs_ops = {
667 .rx_stats_read = iwl_ucode_rx_stats_read,
668 .tx_stats_read = iwl_ucode_tx_stats_read,
669 .general_stats_read = iwl_ucode_general_stats_read,
Wey-Yi Guyffb7d892010-07-14 08:09:55 -0700670 .bt_stats_read = iwl_ucode_bt_stats_read,
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -0700671 },
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800672 .recover_from_tx_stall = iwl_bg_monitor_recover,
Wey-Yi Guyfa8f1302010-03-05 14:22:46 -0800673 .check_plcp_health = iwl_good_plcp_health,
674 .check_ack_health = iwl_good_ack_health,
Wey-Yi Guy716c74b2010-06-24 13:22:36 -0700675 .txfifo_flush = iwlagn_txfifo_flush,
Wey-Yi Guy65550632010-06-24 13:18:35 -0700676 .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
Wey-Yi Guy0975cc82010-07-31 08:34:07 -0700677 .tt_ops = {
678 .lower_power_detection = iwl_tt_is_low_power_state,
679 .tt_power_mode = iwl_tt_current_power_mode,
680 .ct_kill_check = iwl_check_for_ct_kill,
681 }
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700682};
683
Johannes Berg9e4afc22010-08-23 07:56:57 -0700684static struct iwl_lib_ops iwl6000g2b_lib = {
685 .set_hw_params = iwl6000_hw_set_hw_params,
686 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
687 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
688 .txq_set_sched = iwlagn_txq_set_sched,
689 .txq_agg_enable = iwlagn_txq_agg_enable,
690 .txq_agg_disable = iwlagn_txq_agg_disable,
691 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
692 .txq_free_tfd = iwl_hw_txq_free_tfd,
693 .txq_init = iwl_hw_tx_queue_init,
694 .rx_handler_setup = iwl6000g2b_rx_handler_setup,
695 .setup_deferred_work = iwl6000g2b_bt_setup_deferred_work,
696 .cancel_deferred_work = iwl6000g2b_bt_cancel_deferred_work,
697 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
698 .load_ucode = iwlagn_load_ucode,
699 .dump_nic_event_log = iwl_dump_nic_event_log,
700 .dump_nic_error_log = iwl_dump_nic_error_log,
701 .dump_csr = iwl_dump_csr,
702 .dump_fh = iwl_dump_fh,
703 .init_alive_start = iwlagn_init_alive_start,
704 .alive_notify = iwlagn_alive_notify,
705 .send_tx_power = iwlagn_send_tx_power,
706 .update_chain_flags = iwl_update_chain_flags,
707 .set_channel_switch = iwl6000_hw_channel_switch,
708 .apm_ops = {
709 .init = iwl_apm_init,
710 .stop = iwl_apm_stop,
711 .config = iwl6000_nic_config,
712 .set_pwr_src = iwl_set_pwr_src,
713 },
714 .eeprom_ops = {
715 .regulatory_bands = {
716 EEPROM_REG_BAND_1_CHANNELS,
717 EEPROM_REG_BAND_2_CHANNELS,
718 EEPROM_REG_BAND_3_CHANNELS,
719 EEPROM_REG_BAND_4_CHANNELS,
720 EEPROM_REG_BAND_5_CHANNELS,
721 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
722 EEPROM_REG_BAND_52_HT40_CHANNELS
723 },
724 .verify_signature = iwlcore_eeprom_verify_signature,
725 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
726 .release_semaphore = iwlcore_eeprom_release_semaphore,
727 .calib_version = iwlagn_eeprom_calib_version,
728 .query_addr = iwlagn_eeprom_query_addr,
729 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
730 },
731 .post_associate = iwl_post_associate,
732 .isr = iwl_isr_ict,
733 .config_ap = iwl_config_ap,
734 .temp_ops = {
735 .temperature = iwlagn_temperature,
736 .set_ct_kill = iwl6000_set_ct_threshold,
737 .set_calib_version = iwl6000_set_calib_version,
738 },
739 .manage_ibss_station = iwlagn_manage_ibss_station,
740 .update_bcast_station = iwl_update_bcast_station,
741 .debugfs_ops = {
742 .rx_stats_read = iwl_ucode_rx_stats_read,
743 .tx_stats_read = iwl_ucode_tx_stats_read,
744 .general_stats_read = iwl_ucode_general_stats_read,
745 .bt_stats_read = iwl_ucode_bt_stats_read,
746 },
747 .recover_from_tx_stall = iwl_bg_monitor_recover,
748 .check_plcp_health = iwl_good_plcp_health,
749 .check_ack_health = iwl_good_ack_health,
750 .txfifo_flush = iwlagn_txfifo_flush,
751 .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
752 .tt_ops = {
753 .lower_power_detection = iwl_tt_is_low_power_state,
754 .tt_power_mode = iwl_tt_current_power_mode,
755 .ct_kill_check = iwl_check_for_ct_kill,
756 }
757};
758
Emese Revfy45d5d802009-12-14 00:59:53 +0100759static const struct iwl_ops iwl6000_ops = {
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700760 .lib = &iwl6000_lib,
Wey-Yi Guy7dc77db2010-03-16 10:23:31 -0700761 .hcmd = &iwlagn_hcmd,
762 .utils = &iwlagn_hcmd_utils,
Johannes Berge932a602009-10-02 13:44:03 -0700763 .led = &iwlagn_led_ops,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800764};
765
Shanyu Zhao18089722010-05-06 10:15:21 -0700766static struct iwl_hcmd_ops iwl6000g2b_hcmd = {
767 .rxon_assoc = iwlagn_send_rxon_assoc,
768 .commit_rxon = iwl_commit_rxon,
769 .set_rxon_chain = iwl_set_rxon_chain,
770 .set_tx_ant = iwlagn_send_tx_ant_config,
Johannes Berg670245e2010-08-23 07:56:55 -0700771 .send_bt_config = iwl6000g2b_send_bt_config,
Shanyu Zhao18089722010-05-06 10:15:21 -0700772};
773
774static const struct iwl_ops iwl6000g2b_ops = {
Johannes Berg9e4afc22010-08-23 07:56:57 -0700775 .lib = &iwl6000g2b_lib,
Shanyu Zhao18089722010-05-06 10:15:21 -0700776 .hcmd = &iwl6000g2b_hcmd,
777 .utils = &iwlagn_hcmd_utils,
778 .led = &iwlagn_led_ops,
779};
780
Shanyu Zhao95b13012010-04-21 11:46:33 -0700781struct iwl_cfg iwl6000g2a_2agn_cfg = {
782 .name = "6000 Series 2x2 AGN Gen2a",
783 .fw_name_pre = IWL6000G2A_FW_PRE,
Shanyu Zhao4b3e8062010-04-07 18:06:36 -0700784 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
785 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700786 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
787 .ops = &iwl6000_ops,
788 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Shanyu Zhao4b3e8062010-04-07 18:06:36 -0700789 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
790 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700791 .num_of_queues = IWLAGN_NUM_QUEUES,
792 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
793 .mod_params = &iwlagn_mod_params,
794 .valid_tx_ant = ANT_AB,
795 .valid_rx_ant = ANT_AB,
796 .pll_cfg_val = 0,
797 .set_l0s = true,
798 .use_bsm = false,
Wey-Yi Guy33e6f812010-04-09 09:36:11 -0700799 .pa_type = IWL_PA_SYSTEM,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700800 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
801 .shadow_ram_support = true,
802 .ht_greenfield_support = true,
803 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -0700804 .use_rts_for_aggregation = true, /* use rts/cts protection */
Jay Sternberg0b5af202010-03-17 16:16:12 -0700805 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
806 .supports_idle = true,
807 .adv_thermal_throttle = true,
808 .support_ct_kill_exit = true,
809 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
810 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -0700811 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Shanyu Zhao95b13012010-04-21 11:46:33 -0700812 .max_event_log_size = 512,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700813 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700814 .sensitivity_calib_by_driver = true,
815 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700816 .need_dc_calib = true,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700817};
818
Shanyu Zhao18089722010-05-06 10:15:21 -0700819struct iwl_cfg iwl6000g2a_2abg_cfg = {
820 .name = "6000 Series 2x2 ABG Gen2a",
821 .fw_name_pre = IWL6000G2A_FW_PRE,
822 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
823 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
824 .sku = IWL_SKU_A|IWL_SKU_G,
825 .ops = &iwl6000_ops,
826 .eeprom_size = OTP_LOW_IMAGE_SIZE,
827 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
828 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
829 .num_of_queues = IWLAGN_NUM_QUEUES,
830 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
831 .mod_params = &iwlagn_mod_params,
832 .valid_tx_ant = ANT_AB,
833 .valid_rx_ant = ANT_AB,
834 .pll_cfg_val = 0,
835 .set_l0s = true,
836 .use_bsm = false,
837 .pa_type = IWL_PA_SYSTEM,
838 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
839 .shadow_ram_support = true,
840 .led_compensation = 51,
841 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
842 .supports_idle = true,
843 .adv_thermal_throttle = true,
844 .support_ct_kill_exit = true,
845 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
846 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -0700847 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -0700848 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700849 .sensitivity_calib_by_driver = true,
850 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700851 .need_dc_calib = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700852};
853
854struct iwl_cfg iwl6000g2a_2bg_cfg = {
855 .name = "6000 Series 2x2 BG Gen2a",
856 .fw_name_pre = IWL6000G2A_FW_PRE,
857 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
858 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
859 .sku = IWL_SKU_G,
860 .ops = &iwl6000_ops,
861 .eeprom_size = OTP_LOW_IMAGE_SIZE,
862 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
863 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
864 .num_of_queues = IWLAGN_NUM_QUEUES,
865 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
866 .mod_params = &iwlagn_mod_params,
867 .valid_tx_ant = ANT_AB,
868 .valid_rx_ant = ANT_AB,
869 .pll_cfg_val = 0,
870 .set_l0s = true,
871 .use_bsm = false,
872 .pa_type = IWL_PA_SYSTEM,
873 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
874 .shadow_ram_support = true,
875 .led_compensation = 51,
876 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
877 .supports_idle = true,
878 .adv_thermal_throttle = true,
879 .support_ct_kill_exit = true,
880 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
881 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -0700882 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -0700883 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700884 .sensitivity_calib_by_driver = true,
885 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700886 .need_dc_calib = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700887};
888
889struct iwl_cfg iwl6000g2b_2agn_cfg = {
890 .name = "6000 Series 2x2 AGN Gen2b",
891 .fw_name_pre = IWL6000G2B_FW_PRE,
892 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
893 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
894 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
895 .ops = &iwl6000g2b_ops,
896 .eeprom_size = OTP_LOW_IMAGE_SIZE,
897 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
898 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
899 .num_of_queues = IWLAGN_NUM_QUEUES,
900 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
901 .mod_params = &iwlagn_mod_params,
902 .valid_tx_ant = ANT_AB,
903 .valid_rx_ant = ANT_AB,
904 .pll_cfg_val = 0,
905 .set_l0s = true,
906 .use_bsm = false,
907 .pa_type = IWL_PA_SYSTEM,
908 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
909 .shadow_ram_support = true,
910 .ht_greenfield_support = true,
911 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -0700912 .use_rts_for_aggregation = true, /* use rts/cts protection */
Shanyu Zhao18089722010-05-06 10:15:21 -0700913 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
914 .supports_idle = true,
915 .adv_thermal_throttle = true,
916 .support_ct_kill_exit = true,
Wey-Yi Guy74e5c412010-08-23 07:57:02 -0700917 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
Shanyu Zhao18089722010-05-06 10:15:21 -0700918 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -0700919 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -0700920 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700921 .sensitivity_calib_by_driver = true,
922 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700923 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -0700924 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700925 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
926 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
927 .advanced_bt_coexist = true,
Wey-Yi Guya4b96cc2010-08-23 07:57:08 -0700928 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
Wey-Yi Guy5d297d52010-08-23 07:57:09 -0700929 .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
Shanyu Zhao18089722010-05-06 10:15:21 -0700930};
931
932struct iwl_cfg iwl6000g2b_2abg_cfg = {
933 .name = "6000 Series 2x2 ABG Gen2b",
934 .fw_name_pre = IWL6000G2B_FW_PRE,
935 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
936 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
937 .sku = IWL_SKU_A|IWL_SKU_G,
938 .ops = &iwl6000g2b_ops,
939 .eeprom_size = OTP_LOW_IMAGE_SIZE,
940 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
941 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
942 .num_of_queues = IWLAGN_NUM_QUEUES,
943 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
944 .mod_params = &iwlagn_mod_params,
945 .valid_tx_ant = ANT_AB,
946 .valid_rx_ant = ANT_AB,
947 .pll_cfg_val = 0,
948 .set_l0s = true,
949 .use_bsm = false,
950 .pa_type = IWL_PA_SYSTEM,
951 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
952 .shadow_ram_support = true,
953 .led_compensation = 51,
954 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
955 .supports_idle = true,
956 .adv_thermal_throttle = true,
957 .support_ct_kill_exit = true,
Wey-Yi Guy74e5c412010-08-23 07:57:02 -0700958 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
Shanyu Zhao18089722010-05-06 10:15:21 -0700959 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -0700960 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -0700961 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700962 .sensitivity_calib_by_driver = true,
963 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700964 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -0700965 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700966 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
967 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
968 .advanced_bt_coexist = true,
Wey-Yi Guya4b96cc2010-08-23 07:57:08 -0700969 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
Wey-Yi Guy5d297d52010-08-23 07:57:09 -0700970 .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
Shanyu Zhao18089722010-05-06 10:15:21 -0700971};
972
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700973struct iwl_cfg iwl6000g2b_2bgn_cfg = {
974 .name = "6000 Series 2x2 BGN Gen2b",
975 .fw_name_pre = IWL6000G2B_FW_PRE,
976 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
977 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
978 .sku = IWL_SKU_G|IWL_SKU_N,
979 .ops = &iwl6000g2b_ops,
980 .eeprom_size = OTP_LOW_IMAGE_SIZE,
981 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
982 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
983 .num_of_queues = IWLAGN_NUM_QUEUES,
984 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
985 .mod_params = &iwlagn_mod_params,
986 .valid_tx_ant = ANT_AB,
987 .valid_rx_ant = ANT_AB,
988 .pll_cfg_val = 0,
989 .set_l0s = true,
990 .use_bsm = false,
991 .pa_type = IWL_PA_SYSTEM,
992 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
993 .shadow_ram_support = true,
994 .ht_greenfield_support = true,
995 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -0700996 .use_rts_for_aggregation = true, /* use rts/cts protection */
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700997 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
998 .supports_idle = true,
999 .adv_thermal_throttle = true,
1000 .support_ct_kill_exit = true,
Wey-Yi Guy74e5c412010-08-23 07:57:02 -07001001 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -07001002 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -07001003 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -07001004 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -07001005 .sensitivity_calib_by_driver = true,
1006 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001007 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -07001008 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -07001009 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
1010 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
1011 .advanced_bt_coexist = true,
Wey-Yi Guya4b96cc2010-08-23 07:57:08 -07001012 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
Wey-Yi Guy5d297d52010-08-23 07:57:09 -07001013 .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -07001014};
1015
Shanyu Zhao18089722010-05-06 10:15:21 -07001016struct iwl_cfg iwl6000g2b_2bg_cfg = {
1017 .name = "6000 Series 2x2 BG Gen2b",
1018 .fw_name_pre = IWL6000G2B_FW_PRE,
1019 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
1020 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
1021 .sku = IWL_SKU_G,
1022 .ops = &iwl6000g2b_ops,
1023 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1024 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
1025 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
1026 .num_of_queues = IWLAGN_NUM_QUEUES,
1027 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
1028 .mod_params = &iwlagn_mod_params,
1029 .valid_tx_ant = ANT_AB,
1030 .valid_rx_ant = ANT_AB,
1031 .pll_cfg_val = 0,
1032 .set_l0s = true,
1033 .use_bsm = false,
1034 .pa_type = IWL_PA_SYSTEM,
1035 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1036 .shadow_ram_support = true,
1037 .led_compensation = 51,
1038 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
1039 .supports_idle = true,
1040 .adv_thermal_throttle = true,
1041 .support_ct_kill_exit = true,
Wey-Yi Guy74e5c412010-08-23 07:57:02 -07001042 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
Shanyu Zhao18089722010-05-06 10:15:21 -07001043 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -07001044 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -07001045 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -07001046 .sensitivity_calib_by_driver = true,
1047 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001048 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -07001049 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -07001050 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
1051 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
1052 .advanced_bt_coexist = true,
Wey-Yi Guya4b96cc2010-08-23 07:57:08 -07001053 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
Wey-Yi Guy5d297d52010-08-23 07:57:09 -07001054 .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
Shanyu Zhao18089722010-05-06 10:15:21 -07001055};
1056
1057struct iwl_cfg iwl6000g2b_bgn_cfg = {
1058 .name = "6000 Series 1x2 BGN Gen2b",
1059 .fw_name_pre = IWL6000G2B_FW_PRE,
1060 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
1061 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
1062 .sku = IWL_SKU_G|IWL_SKU_N,
1063 .ops = &iwl6000g2b_ops,
1064 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1065 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
1066 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
1067 .num_of_queues = IWLAGN_NUM_QUEUES,
1068 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
1069 .mod_params = &iwlagn_mod_params,
1070 .valid_tx_ant = ANT_A,
1071 .valid_rx_ant = ANT_AB,
1072 .pll_cfg_val = 0,
1073 .set_l0s = true,
1074 .use_bsm = false,
1075 .pa_type = IWL_PA_SYSTEM,
1076 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1077 .shadow_ram_support = true,
1078 .ht_greenfield_support = true,
1079 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -07001080 .use_rts_for_aggregation = true, /* use rts/cts protection */
Shanyu Zhao18089722010-05-06 10:15:21 -07001081 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
1082 .supports_idle = true,
1083 .adv_thermal_throttle = true,
1084 .support_ct_kill_exit = true,
Wey-Yi Guy74e5c412010-08-23 07:57:02 -07001085 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
Shanyu Zhao18089722010-05-06 10:15:21 -07001086 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -07001087 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -07001088 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -07001089 .sensitivity_calib_by_driver = true,
1090 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001091 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -07001092 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -07001093 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
1094 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
1095 .advanced_bt_coexist = true,
Wey-Yi Guya4b96cc2010-08-23 07:57:08 -07001096 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
Wey-Yi Guy5d297d52010-08-23 07:57:09 -07001097 .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
Shanyu Zhao18089722010-05-06 10:15:21 -07001098};
1099
1100struct iwl_cfg iwl6000g2b_bg_cfg = {
1101 .name = "6000 Series 1x2 BG Gen2b",
1102 .fw_name_pre = IWL6000G2B_FW_PRE,
1103 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
1104 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
1105 .sku = IWL_SKU_G,
1106 .ops = &iwl6000g2b_ops,
1107 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1108 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
1109 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
1110 .num_of_queues = IWLAGN_NUM_QUEUES,
1111 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
1112 .mod_params = &iwlagn_mod_params,
1113 .valid_tx_ant = ANT_A,
1114 .valid_rx_ant = ANT_AB,
1115 .pll_cfg_val = 0,
1116 .set_l0s = true,
1117 .use_bsm = false,
1118 .pa_type = IWL_PA_SYSTEM,
1119 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1120 .shadow_ram_support = true,
1121 .led_compensation = 51,
1122 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
1123 .supports_idle = true,
1124 .adv_thermal_throttle = true,
1125 .support_ct_kill_exit = true,
Wey-Yi Guy74e5c412010-08-23 07:57:02 -07001126 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
Shanyu Zhao18089722010-05-06 10:15:21 -07001127 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -07001128 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -07001129 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -07001130 .sensitivity_calib_by_driver = true,
1131 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001132 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -07001133 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -07001134 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
1135 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
1136 .advanced_bt_coexist = true,
Wey-Yi Guya4b96cc2010-08-23 07:57:08 -07001137 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
Wey-Yi Guy5d297d52010-08-23 07:57:09 -07001138 .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
Shanyu Zhao18089722010-05-06 10:15:21 -07001139};
1140
Shanyu Zhao95b13012010-04-21 11:46:33 -07001141/*
1142 * "i": Internal configuration, use internal Power Amplifier
1143 */
Wey-Yi Guy65b79982009-07-31 14:28:07 -07001144struct iwl_cfg iwl6000i_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -08001145 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
Wey-Yi Guy65b79982009-07-31 14:28:07 -07001146 .fw_name_pre = IWL6000_FW_PRE,
1147 .ucode_api_max = IWL6000_UCODE_API_MAX,
1148 .ucode_api_min = IWL6000_UCODE_API_MIN,
1149 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
1150 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -07001151 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -07001152 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -07001153 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -07001154 .num_of_queues = IWLAGN_NUM_QUEUES,
1155 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7c2010-03-16 12:37:27 -07001156 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy65b79982009-07-31 14:28:07 -07001157 .valid_tx_ant = ANT_BC,
1158 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -07001159 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -07001160 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -07001161 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -07001162 .pa_type = IWL_PA_INTERNAL,
Wey-Yi Guy415e4992009-08-13 13:30:54 -07001163 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1164 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -07001165 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -07001166 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -07001167 .use_rts_for_aggregation = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -07001168 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -07001169 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -07001170 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -07001171 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -08001172 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -08001173 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001174 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -07001175 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -07001176 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -07001177 .sensitivity_calib_by_driver = true,
1178 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -08001179};
1180
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001181struct iwl_cfg iwl6000i_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -08001182 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001183 .fw_name_pre = IWL6000_FW_PRE,
1184 .ucode_api_max = IWL6000_UCODE_API_MAX,
1185 .ucode_api_min = IWL6000_UCODE_API_MIN,
1186 .sku = IWL_SKU_A|IWL_SKU_G,
1187 .ops = &iwl6000_ops,
1188 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1189 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -07001190 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -07001191 .num_of_queues = IWLAGN_NUM_QUEUES,
1192 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7c2010-03-16 12:37:27 -07001193 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001194 .valid_tx_ant = ANT_BC,
1195 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -07001196 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -07001197 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -07001198 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001199 .pa_type = IWL_PA_INTERNAL,
1200 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1201 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001202 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -07001203 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -07001204 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -07001205 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -07001206 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -08001207 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -08001208 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001209 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -07001210 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -07001211 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -07001212 .sensitivity_calib_by_driver = true,
1213 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001214};
1215
1216struct iwl_cfg iwl6000i_2bg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -08001217 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001218 .fw_name_pre = IWL6000_FW_PRE,
1219 .ucode_api_max = IWL6000_UCODE_API_MAX,
1220 .ucode_api_min = IWL6000_UCODE_API_MIN,
1221 .sku = IWL_SKU_G,
1222 .ops = &iwl6000_ops,
1223 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1224 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -07001225 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -07001226 .num_of_queues = IWLAGN_NUM_QUEUES,
1227 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7c2010-03-16 12:37:27 -07001228 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001229 .valid_tx_ant = ANT_BC,
1230 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -07001231 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -07001232 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -07001233 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001234 .pa_type = IWL_PA_INTERNAL,
1235 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1236 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001237 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -07001238 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -07001239 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -07001240 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -07001241 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -08001242 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -08001243 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001244 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -07001245 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -07001246 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -07001247 .sensitivity_calib_by_driver = true,
1248 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001249};
1250
Jay Sternberge1228372009-01-19 15:30:34 -08001251struct iwl_cfg iwl6050_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -08001252 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -08001253 .fw_name_pre = IWL6050_FW_PRE,
1254 .ucode_api_max = IWL6050_UCODE_API_MAX,
1255 .ucode_api_min = IWL6050_UCODE_API_MIN,
1256 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001257 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -07001258 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -07001259 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -07001260 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -07001261 .num_of_queues = IWLAGN_NUM_QUEUES,
1262 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7c2010-03-16 12:37:27 -07001263 .mod_params = &iwlagn_mod_params,
Jay Sternberg542cc792009-05-08 13:44:46 -07001264 .valid_tx_ant = ANT_AB,
1265 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -07001266 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -07001267 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -07001268 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -07001269 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -07001270 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy415e4992009-08-13 13:30:54 -07001271 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -07001272 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -07001273 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -07001274 .use_rts_for_aggregation = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -07001275 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -07001276 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -07001277 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -07001278 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -08001279 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -08001280 .chain_noise_scale = 1500,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001281 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -07001282 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -07001283 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -07001284 .sensitivity_calib_by_driver = true,
1285 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001286 .need_dc_calib = true,
Jay Sternberge1228372009-01-19 15:30:34 -08001287};
1288
Shanyu Zhao03264332010-06-29 17:27:27 -07001289struct iwl_cfg iwl6050g2_bgn_cfg = {
1290 .name = "6050 Series 1x2 BGN Gen2",
1291 .fw_name_pre = IWL6050_FW_PRE,
1292 .ucode_api_max = IWL6050_UCODE_API_MAX,
1293 .ucode_api_min = IWL6050_UCODE_API_MIN,
1294 .sku = IWL_SKU_G|IWL_SKU_N,
1295 .ops = &iwl6000_ops,
1296 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1297 .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION,
1298 .eeprom_calib_ver = EEPROM_6050G2_TX_POWER_VERSION,
1299 .num_of_queues = IWLAGN_NUM_QUEUES,
1300 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
1301 .mod_params = &iwlagn_mod_params,
1302 .valid_tx_ant = ANT_A,
1303 .valid_rx_ant = ANT_AB,
1304 .pll_cfg_val = 0,
1305 .set_l0s = true,
1306 .use_bsm = false,
1307 .pa_type = IWL_PA_SYSTEM,
1308 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
1309 .shadow_ram_support = true,
1310 .ht_greenfield_support = true,
1311 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -07001312 .use_rts_for_aggregation = true, /* use rts/cts protection */
Shanyu Zhao03264332010-06-29 17:27:27 -07001313 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
1314 .supports_idle = true,
1315 .adv_thermal_throttle = true,
1316 .support_ct_kill_exit = true,
1317 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
1318 .chain_noise_scale = 1500,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001319 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Shanyu Zhao03264332010-06-29 17:27:27 -07001320 .max_event_log_size = 1024,
1321 .ucode_tracing = true,
1322 .sensitivity_calib_by_driver = true,
1323 .chain_noise_calib_by_driver = true,
1324 .need_dc_calib = true,
1325};
1326
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001327struct iwl_cfg iwl6050_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -08001328 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001329 .fw_name_pre = IWL6050_FW_PRE,
1330 .ucode_api_max = IWL6050_UCODE_API_MAX,
1331 .ucode_api_min = IWL6050_UCODE_API_MIN,
1332 .sku = IWL_SKU_A|IWL_SKU_G,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001333 .ops = &iwl6000_ops,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001334 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -07001335 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -07001336 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -07001337 .num_of_queues = IWLAGN_NUM_QUEUES,
1338 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7c2010-03-16 12:37:27 -07001339 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001340 .valid_tx_ant = ANT_AB,
1341 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -07001342 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -07001343 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -07001344 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001345 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -07001346 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001347 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001348 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -07001349 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -07001350 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -07001351 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -07001352 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -08001353 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -08001354 .chain_noise_scale = 1500,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001355 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -07001356 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -07001357 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -07001358 .sensitivity_calib_by_driver = true,
1359 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001360 .need_dc_calib = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001361};
1362
Jay Sternberge1228372009-01-19 15:30:34 -08001363struct iwl_cfg iwl6000_3agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -08001364 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -08001365 .fw_name_pre = IWL6000_FW_PRE,
1366 .ucode_api_max = IWL6000_UCODE_API_MAX,
1367 .ucode_api_min = IWL6000_UCODE_API_MIN,
1368 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Jay Sternberg29f35c12009-01-29 11:09:16 -08001369 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -07001370 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -07001371 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -07001372 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -07001373 .num_of_queues = IWLAGN_NUM_QUEUES,
1374 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7c2010-03-16 12:37:27 -07001375 .mod_params = &iwlagn_mod_params,
Jay Sternbergc0bac762009-02-02 16:21:14 -08001376 .valid_tx_ant = ANT_ABC,
1377 .valid_rx_ant = ANT_ABC,
Ben Cahillfadb3582009-10-23 13:42:21 -07001378 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -07001379 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -07001380 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -07001381 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy415e4992009-08-13 13:30:54 -07001382 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1383 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -07001384 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -07001385 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -07001386 .use_rts_for_aggregation = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -07001387 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -07001388 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -07001389 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -07001390 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -08001391 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -08001392 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001393 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -07001394 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -07001395 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -07001396 .sensitivity_calib_by_driver = true,
1397 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -08001398};
1399
Jay Sternberge1228372009-01-19 15:30:34 -08001400MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
1401MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
Shanyu Zhao95b13012010-04-21 11:46:33 -07001402MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
Shanyu Zhao18089722010-05-06 10:15:21 -07001403MODULE_FIRMWARE(IWL6000G2B_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));