blob: 30dc1f3342022a242f8010dd2463487ffeb3006b [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 Guye517736a2010-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 Guy0924e5192009-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 Guy0924e5192009-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
Wey-Yi Guyda5dbb92010-08-23 07:57:13 -0700431 IWL_DEBUG_INFO(priv, "BT traffic load changes: %d\n",
432 priv->bt_traffic_load);
433
Johannes Berg9e4afc22010-08-23 07:56:57 -0700434 switch (priv->bt_traffic_load) {
435 case IWL_BT_COEX_TRAFFIC_LOAD_NONE:
436 smps_request = IEEE80211_SMPS_AUTOMATIC;
437 break;
438 case IWL_BT_COEX_TRAFFIC_LOAD_LOW:
439 smps_request = IEEE80211_SMPS_DYNAMIC;
440 break;
441 case IWL_BT_COEX_TRAFFIC_LOAD_HIGH:
442 case IWL_BT_COEX_TRAFFIC_LOAD_CONTINUOUS:
443 smps_request = IEEE80211_SMPS_STATIC;
444 break;
445 default:
446 IWL_ERR(priv, "Invalid BT traffic load: %d\n",
447 priv->bt_traffic_load);
448 break;
449 }
450
451 mutex_lock(&priv->mutex);
452
Wey-Yi Guyda5dbb92010-08-23 07:57:13 -0700453 if (priv->cfg->ops->lib->update_chain_flags)
454 priv->cfg->ops->lib->update_chain_flags(priv);
455
Johannes Berg9e4afc22010-08-23 07:56:57 -0700456 if (smps_request != -1 &&
457 priv->vif && priv->vif->type == NL80211_IFTYPE_STATION)
458 ieee80211_request_smps(priv->vif, smps_request);
459
460 mutex_unlock(&priv->mutex);
461}
462
Wey-Yi Guyfbba9412010-08-23 07:57:10 -0700463static void iwlagn_print_uartmsg(struct iwl_priv *priv,
464 struct iwl_bt_uart_msg *uart_msg)
465{
466 IWL_DEBUG_NOTIF(priv, "Message Type = 0x%X, SSN = 0x%X, "
467 "Update Req = 0x%X",
468 (BT_UART_MSG_FRAME1MSGTYPE_MSK & uart_msg->frame1) >>
469 BT_UART_MSG_FRAME1MSGTYPE_POS,
470 (BT_UART_MSG_FRAME1SSN_MSK & uart_msg->frame1) >>
471 BT_UART_MSG_FRAME1SSN_POS,
472 (BT_UART_MSG_FRAME1UPDATEREQ_MSK & uart_msg->frame1) >>
473 BT_UART_MSG_FRAME1UPDATEREQ_POS);
474
475 IWL_DEBUG_NOTIF(priv, "Open connections = 0x%X, Traffic load = 0x%X, "
476 "Chl_SeqN = 0x%X, In band = 0x%X",
477 (BT_UART_MSG_FRAME2OPENCONNECTIONS_MSK & uart_msg->frame2) >>
478 BT_UART_MSG_FRAME2OPENCONNECTIONS_POS,
479 (BT_UART_MSG_FRAME2TRAFFICLOAD_MSK & uart_msg->frame2) >>
480 BT_UART_MSG_FRAME2TRAFFICLOAD_POS,
481 (BT_UART_MSG_FRAME2CHLSEQN_MSK & uart_msg->frame2) >>
482 BT_UART_MSG_FRAME2CHLSEQN_POS,
483 (BT_UART_MSG_FRAME2INBAND_MSK & uart_msg->frame2) >>
484 BT_UART_MSG_FRAME2INBAND_POS);
485
486 IWL_DEBUG_NOTIF(priv, "SCO/eSCO = 0x%X, Sniff = 0x%X, A2DP = 0x%X, "
487 "ACL = 0x%X, Master = 0x%X, OBEX = 0x%X",
488 (BT_UART_MSG_FRAME3SCOESCO_MSK & uart_msg->frame3) >>
489 BT_UART_MSG_FRAME3SCOESCO_POS,
490 (BT_UART_MSG_FRAME3SNIFF_MSK & uart_msg->frame3) >>
491 BT_UART_MSG_FRAME3SNIFF_POS,
492 (BT_UART_MSG_FRAME3A2DP_MSK & uart_msg->frame3) >>
493 BT_UART_MSG_FRAME3A2DP_POS,
494 (BT_UART_MSG_FRAME3ACL_MSK & uart_msg->frame3) >>
495 BT_UART_MSG_FRAME3ACL_POS,
496 (BT_UART_MSG_FRAME3MASTER_MSK & uart_msg->frame3) >>
497 BT_UART_MSG_FRAME3MASTER_POS,
498 (BT_UART_MSG_FRAME3OBEX_MSK & uart_msg->frame3) >>
499 BT_UART_MSG_FRAME3OBEX_POS);
500
501 IWL_DEBUG_NOTIF(priv, "Idle duration = 0x%X",
502 (BT_UART_MSG_FRAME4IDLEDURATION_MSK & uart_msg->frame4) >>
503 BT_UART_MSG_FRAME4IDLEDURATION_POS);
504
505 IWL_DEBUG_NOTIF(priv, "Tx Activity = 0x%X, Rx Activity = 0x%X, "
506 "eSCO Retransmissions = 0x%X",
507 (BT_UART_MSG_FRAME5TXACTIVITY_MSK & uart_msg->frame5) >>
508 BT_UART_MSG_FRAME5TXACTIVITY_POS,
509 (BT_UART_MSG_FRAME5RXACTIVITY_MSK & uart_msg->frame5) >>
510 BT_UART_MSG_FRAME5RXACTIVITY_POS,
511 (BT_UART_MSG_FRAME5ESCORETRANSMIT_MSK & uart_msg->frame5) >>
512 BT_UART_MSG_FRAME5ESCORETRANSMIT_POS);
513
514 IWL_DEBUG_NOTIF(priv, "Sniff Interval = 0x%X, Discoverable = 0x%X",
515 (BT_UART_MSG_FRAME6SNIFFINTERVAL_MSK & uart_msg->frame6) >>
516 BT_UART_MSG_FRAME6SNIFFINTERVAL_POS,
517 (BT_UART_MSG_FRAME6DISCOVERABLE_MSK & uart_msg->frame6) >>
518 BT_UART_MSG_FRAME6DISCOVERABLE_POS);
519
520 IWL_DEBUG_NOTIF(priv, "Sniff Activity = 0x%X, Inquiry/Page SR Mode = "
521 "0x%X, Connectable = 0x%X",
522 (BT_UART_MSG_FRAME7SNIFFACTIVITY_MSK & uart_msg->frame7) >>
523 BT_UART_MSG_FRAME7SNIFFACTIVITY_POS,
524 (BT_UART_MSG_FRAME7INQUIRYPAGESRMODE_MSK & uart_msg->frame7) >>
525 BT_UART_MSG_FRAME7INQUIRYPAGESRMODE_POS,
526 (BT_UART_MSG_FRAME7CONNECTABLE_MSK & uart_msg->frame7) >>
527 BT_UART_MSG_FRAME7CONNECTABLE_POS);
528}
529
530static void iwl6000g2b_set_kill_ack_msk(struct iwl_priv *priv,
531 struct iwl_bt_uart_msg *uart_msg)
532{
533 u8 kill_ack_msk;
534 __le32 bt_kill_ack_msg[2] = {
535 cpu_to_le32(0xFFFFFFF), cpu_to_le32(0xFFFFFC00) };
536
537 kill_ack_msk = (((BT_UART_MSG_FRAME3A2DP_MSK |
538 BT_UART_MSG_FRAME3SNIFF_MSK |
539 BT_UART_MSG_FRAME3SCOESCO_MSK) &
540 uart_msg->frame3) == 0) ? 1 : 0;
541 if (priv->kill_ack_mask != bt_kill_ack_msg[kill_ack_msk]) {
542 priv->bt_valid |= IWL6000G2B_BT_VALID_KILL_ACK_MASK;
543 priv->kill_ack_mask = bt_kill_ack_msg[kill_ack_msk];
544 /* schedule to send runtime bt_config */
545 queue_work(priv->workqueue, &priv->bt_runtime_config);
546 }
547
548}
549
Johannes Berg9e4afc22010-08-23 07:56:57 -0700550static void iwl6000g2b_bt_coex_profile_notif(struct iwl_priv *priv,
551 struct iwl_rx_mem_buffer *rxb)
552{
Wey-Yi Guybee008b2010-08-23 07:57:04 -0700553 unsigned long flags;
Johannes Berg9e4afc22010-08-23 07:56:57 -0700554 struct iwl_rx_packet *pkt = rxb_addr(rxb);
555 struct iwl_bt_coex_profile_notif *coex = &pkt->u.bt_coex_profile_notif;
556 struct iwl6000g2b_bt_sco_cmd sco_cmd = { .flags = 0 };
Wey-Yi Guyfbba9412010-08-23 07:57:10 -0700557 struct iwl_bt_uart_msg *uart_msg = &coex->last_bt_uart_msg;
Wey-Yi Guyda5dbb92010-08-23 07:57:13 -0700558 u8 last_traffic_load;
Johannes Berg9e4afc22010-08-23 07:56:57 -0700559
560 IWL_DEBUG_NOTIF(priv, "BT Coex notification:\n");
561 IWL_DEBUG_NOTIF(priv, " status: %d\n", coex->bt_status);
562 IWL_DEBUG_NOTIF(priv, " traffic load: %d\n", coex->bt_traffic_load);
563 IWL_DEBUG_NOTIF(priv, " CI compliance: %d\n", coex->bt_ci_compliance);
Wey-Yi Guyfbba9412010-08-23 07:57:10 -0700564 iwlagn_print_uartmsg(priv, uart_msg);
Johannes Berg9e4afc22010-08-23 07:56:57 -0700565
Wey-Yi Guyda5dbb92010-08-23 07:57:13 -0700566 last_traffic_load = priv->notif_bt_traffic_load;
Johannes Berg590799492010-08-23 07:57:00 -0700567 priv->notif_bt_traffic_load = coex->bt_traffic_load;
Johannes Berg590799492010-08-23 07:57:00 -0700568 if (priv->iw_mode != NL80211_IFTYPE_ADHOC) {
Wey-Yi Guyda5dbb92010-08-23 07:57:13 -0700569 if (priv->bt_status != coex->bt_status ||
570 last_traffic_load != coex->bt_traffic_load) {
571 if (coex->bt_status) {
572 /* BT on */
573 if (!priv->bt_ch_announce)
574 priv->bt_traffic_load =
575 IWL_BT_COEX_TRAFFIC_LOAD_HIGH;
576 else
577 priv->bt_traffic_load =
578 coex->bt_traffic_load;
579 } else {
580 /* BT off */
581 priv->bt_traffic_load =
582 IWL_BT_COEX_TRAFFIC_LOAD_NONE;
583 }
584 priv->bt_status = coex->bt_status;
Johannes Berg590799492010-08-23 07:57:00 -0700585 queue_work(priv->workqueue,
586 &priv->bt_traffic_change_work);
587 }
Wey-Yi Guyfbba9412010-08-23 07:57:10 -0700588 if (priv->bt_sco_active !=
589 (uart_msg->frame3 & BT_UART_MSG_FRAME3SCOESCO_MSK)) {
590 priv->bt_sco_active = uart_msg->frame3 &
591 BT_UART_MSG_FRAME3SCOESCO_MSK;
592 if (priv->bt_sco_active)
593 sco_cmd.flags |= IWL6000G2B_BT_SCO_ACTIVE;
594 iwl_send_cmd_pdu_async(priv, REPLY_BT_COEX_SCO,
Johannes Berg590799492010-08-23 07:57:00 -0700595 sizeof(sco_cmd), &sco_cmd, NULL);
Wey-Yi Guyfbba9412010-08-23 07:57:10 -0700596 }
Johannes Berg9e4afc22010-08-23 07:56:57 -0700597 }
Wey-Yi Guybee008b2010-08-23 07:57:04 -0700598
Wey-Yi Guyfbba9412010-08-23 07:57:10 -0700599 iwl6000g2b_set_kill_ack_msk(priv, uart_msg);
600
Wey-Yi Guy5d297d52010-08-23 07:57:09 -0700601 /* FIXME: based on notification, adjust the prio_boost */
602
Wey-Yi Guybee008b2010-08-23 07:57:04 -0700603 spin_lock_irqsave(&priv->lock, flags);
604 priv->bt_ci_compliance = coex->bt_ci_compliance;
605 spin_unlock_irqrestore(&priv->lock, flags);
Johannes Berg9e4afc22010-08-23 07:56:57 -0700606}
607
608void iwl6000g2b_rx_handler_setup(struct iwl_priv *priv)
609{
610 iwlagn_rx_handler_setup(priv);
611 priv->rx_handlers[REPLY_BT_COEX_PROFILE_NOTIF] =
612 iwl6000g2b_bt_coex_profile_notif;
613}
614
615static void iwl6000g2b_bt_setup_deferred_work(struct iwl_priv *priv)
616{
617 iwlagn_setup_deferred_work(priv);
618
619 INIT_WORK(&priv->bt_traffic_change_work,
620 iwl6000g2b_bt_traffic_change_work);
621
622}
623
624static void iwl6000g2b_bt_cancel_deferred_work(struct iwl_priv *priv)
625{
626 cancel_work_sync(&priv->bt_traffic_change_work);
627}
628
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700629static struct iwl_lib_ops iwl6000_lib = {
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700630 .set_hw_params = iwl6000_hw_set_hw_params,
Wey-Yi Guyb305a082010-03-16 17:41:22 -0700631 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
632 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
633 .txq_set_sched = iwlagn_txq_set_sched,
634 .txq_agg_enable = iwlagn_txq_agg_enable,
635 .txq_agg_disable = iwlagn_txq_agg_disable,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700636 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
637 .txq_free_tfd = iwl_hw_txq_free_tfd,
638 .txq_init = iwl_hw_tx_queue_init,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700639 .rx_handler_setup = iwlagn_rx_handler_setup,
640 .setup_deferred_work = iwlagn_setup_deferred_work,
641 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
Wey-Yi Guy81b81762010-03-16 10:23:30 -0700642 .load_ucode = iwlagn_load_ucode,
Reinette Chatreb7a79402009-09-25 14:24:23 -0700643 .dump_nic_event_log = iwl_dump_nic_event_log,
644 .dump_nic_error_log = iwl_dump_nic_error_log,
Wey-Yi Guy696bdee2009-12-10 14:37:25 -0800645 .dump_csr = iwl_dump_csr,
Wey-Yi Guy1b3eb822010-01-15 13:43:39 -0800646 .dump_fh = iwl_dump_fh,
Wey-Yi Guy741a6262010-03-16 12:37:24 -0700647 .init_alive_start = iwlagn_init_alive_start,
648 .alive_notify = iwlagn_alive_notify,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700649 .send_tx_power = iwlagn_send_tx_power,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700650 .update_chain_flags = iwl_update_chain_flags,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700651 .set_channel_switch = iwl6000_hw_channel_switch,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700652 .apm_ops = {
Ben Cahillfadb3582009-10-23 13:42:21 -0700653 .init = iwl_apm_init,
Abhijeet Kolekard68b6032009-10-02 13:44:04 -0700654 .stop = iwl_apm_stop,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700655 .config = iwl6000_nic_config,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700656 .set_pwr_src = iwl_set_pwr_src,
657 },
658 .eeprom_ops = {
659 .regulatory_bands = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700660 EEPROM_REG_BAND_1_CHANNELS,
661 EEPROM_REG_BAND_2_CHANNELS,
662 EEPROM_REG_BAND_3_CHANNELS,
663 EEPROM_REG_BAND_4_CHANNELS,
664 EEPROM_REG_BAND_5_CHANNELS,
Shanyu Zhaof2fa1b02010-04-07 18:37:52 -0700665 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700666 EEPROM_REG_BAND_52_HT40_CHANNELS
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700667 },
668 .verify_signature = iwlcore_eeprom_verify_signature,
669 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
670 .release_semaphore = iwlcore_eeprom_release_semaphore,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700671 .calib_version = iwlagn_eeprom_calib_version,
672 .query_addr = iwlagn_eeprom_query_addr,
Wey-Yi Guyab9fd1b2009-08-21 13:34:23 -0700673 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700674 },
675 .post_associate = iwl_post_associate,
676 .isr = iwl_isr_ict,
677 .config_ap = iwl_config_ap,
678 .temp_ops = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700679 .temperature = iwlagn_temperature,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700680 .set_ct_kill = iwl6000_set_ct_threshold,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700681 .set_calib_version = iwl6000_set_calib_version,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700682 },
Johannes Berg1fa61b22010-04-28 08:44:52 -0700683 .manage_ibss_station = iwlagn_manage_ibss_station,
Daniel Halperin278c2f62010-06-14 13:10:29 -0700684 .update_bcast_station = iwl_update_bcast_station,
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -0700685 .debugfs_ops = {
686 .rx_stats_read = iwl_ucode_rx_stats_read,
687 .tx_stats_read = iwl_ucode_tx_stats_read,
688 .general_stats_read = iwl_ucode_general_stats_read,
Wey-Yi Guyffb7d892010-07-14 08:09:55 -0700689 .bt_stats_read = iwl_ucode_bt_stats_read,
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -0700690 },
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800691 .recover_from_tx_stall = iwl_bg_monitor_recover,
Wey-Yi Guyfa8f130c2010-03-05 14:22:46 -0800692 .check_plcp_health = iwl_good_plcp_health,
693 .check_ack_health = iwl_good_ack_health,
Wey-Yi Guy716c74b2010-06-24 13:22:36 -0700694 .txfifo_flush = iwlagn_txfifo_flush,
Wey-Yi Guy65550632010-06-24 13:18:35 -0700695 .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
Wey-Yi Guy0975cc82010-07-31 08:34:07 -0700696 .tt_ops = {
697 .lower_power_detection = iwl_tt_is_low_power_state,
698 .tt_power_mode = iwl_tt_current_power_mode,
699 .ct_kill_check = iwl_check_for_ct_kill,
700 }
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700701};
702
Johannes Berg9e4afc22010-08-23 07:56:57 -0700703static struct iwl_lib_ops iwl6000g2b_lib = {
704 .set_hw_params = iwl6000_hw_set_hw_params,
705 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
706 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
707 .txq_set_sched = iwlagn_txq_set_sched,
708 .txq_agg_enable = iwlagn_txq_agg_enable,
709 .txq_agg_disable = iwlagn_txq_agg_disable,
710 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
711 .txq_free_tfd = iwl_hw_txq_free_tfd,
712 .txq_init = iwl_hw_tx_queue_init,
713 .rx_handler_setup = iwl6000g2b_rx_handler_setup,
714 .setup_deferred_work = iwl6000g2b_bt_setup_deferred_work,
715 .cancel_deferred_work = iwl6000g2b_bt_cancel_deferred_work,
716 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
717 .load_ucode = iwlagn_load_ucode,
718 .dump_nic_event_log = iwl_dump_nic_event_log,
719 .dump_nic_error_log = iwl_dump_nic_error_log,
720 .dump_csr = iwl_dump_csr,
721 .dump_fh = iwl_dump_fh,
722 .init_alive_start = iwlagn_init_alive_start,
723 .alive_notify = iwlagn_alive_notify,
724 .send_tx_power = iwlagn_send_tx_power,
725 .update_chain_flags = iwl_update_chain_flags,
726 .set_channel_switch = iwl6000_hw_channel_switch,
727 .apm_ops = {
728 .init = iwl_apm_init,
729 .stop = iwl_apm_stop,
730 .config = iwl6000_nic_config,
731 .set_pwr_src = iwl_set_pwr_src,
732 },
733 .eeprom_ops = {
734 .regulatory_bands = {
735 EEPROM_REG_BAND_1_CHANNELS,
736 EEPROM_REG_BAND_2_CHANNELS,
737 EEPROM_REG_BAND_3_CHANNELS,
738 EEPROM_REG_BAND_4_CHANNELS,
739 EEPROM_REG_BAND_5_CHANNELS,
740 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
741 EEPROM_REG_BAND_52_HT40_CHANNELS
742 },
743 .verify_signature = iwlcore_eeprom_verify_signature,
744 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
745 .release_semaphore = iwlcore_eeprom_release_semaphore,
746 .calib_version = iwlagn_eeprom_calib_version,
747 .query_addr = iwlagn_eeprom_query_addr,
748 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
749 },
750 .post_associate = iwl_post_associate,
751 .isr = iwl_isr_ict,
752 .config_ap = iwl_config_ap,
753 .temp_ops = {
754 .temperature = iwlagn_temperature,
755 .set_ct_kill = iwl6000_set_ct_threshold,
756 .set_calib_version = iwl6000_set_calib_version,
757 },
758 .manage_ibss_station = iwlagn_manage_ibss_station,
759 .update_bcast_station = iwl_update_bcast_station,
760 .debugfs_ops = {
761 .rx_stats_read = iwl_ucode_rx_stats_read,
762 .tx_stats_read = iwl_ucode_tx_stats_read,
763 .general_stats_read = iwl_ucode_general_stats_read,
764 .bt_stats_read = iwl_ucode_bt_stats_read,
765 },
766 .recover_from_tx_stall = iwl_bg_monitor_recover,
767 .check_plcp_health = iwl_good_plcp_health,
768 .check_ack_health = iwl_good_ack_health,
769 .txfifo_flush = iwlagn_txfifo_flush,
770 .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
771 .tt_ops = {
772 .lower_power_detection = iwl_tt_is_low_power_state,
773 .tt_power_mode = iwl_tt_current_power_mode,
774 .ct_kill_check = iwl_check_for_ct_kill,
775 }
776};
777
Emese Revfy45d5d802009-12-14 00:59:53 +0100778static const struct iwl_ops iwl6000_ops = {
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700779 .lib = &iwl6000_lib,
Wey-Yi Guy7dc77db2010-03-16 10:23:31 -0700780 .hcmd = &iwlagn_hcmd,
781 .utils = &iwlagn_hcmd_utils,
Johannes Berge932a602009-10-02 13:44:03 -0700782 .led = &iwlagn_led_ops,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800783};
784
Shanyu Zhao18089722010-05-06 10:15:21 -0700785static struct iwl_hcmd_ops iwl6000g2b_hcmd = {
786 .rxon_assoc = iwlagn_send_rxon_assoc,
787 .commit_rxon = iwl_commit_rxon,
788 .set_rxon_chain = iwl_set_rxon_chain,
789 .set_tx_ant = iwlagn_send_tx_ant_config,
Johannes Berg670245e2010-08-23 07:56:55 -0700790 .send_bt_config = iwl6000g2b_send_bt_config,
Shanyu Zhao18089722010-05-06 10:15:21 -0700791};
792
793static const struct iwl_ops iwl6000g2b_ops = {
Johannes Berg9e4afc22010-08-23 07:56:57 -0700794 .lib = &iwl6000g2b_lib,
Shanyu Zhao18089722010-05-06 10:15:21 -0700795 .hcmd = &iwl6000g2b_hcmd,
796 .utils = &iwlagn_hcmd_utils,
797 .led = &iwlagn_led_ops,
798};
799
Shanyu Zhao95b13012010-04-21 11:46:33 -0700800struct iwl_cfg iwl6000g2a_2agn_cfg = {
801 .name = "6000 Series 2x2 AGN Gen2a",
802 .fw_name_pre = IWL6000G2A_FW_PRE,
Shanyu Zhao4b3e8062010-04-07 18:06:36 -0700803 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
804 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700805 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
806 .ops = &iwl6000_ops,
807 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Shanyu Zhao4b3e8062010-04-07 18:06:36 -0700808 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
809 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700810 .num_of_queues = IWLAGN_NUM_QUEUES,
811 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
812 .mod_params = &iwlagn_mod_params,
813 .valid_tx_ant = ANT_AB,
814 .valid_rx_ant = ANT_AB,
815 .pll_cfg_val = 0,
816 .set_l0s = true,
817 .use_bsm = false,
Wey-Yi Guy33e6f812010-04-09 09:36:11 -0700818 .pa_type = IWL_PA_SYSTEM,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700819 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
820 .shadow_ram_support = true,
821 .ht_greenfield_support = true,
822 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -0700823 .use_rts_for_aggregation = true, /* use rts/cts protection */
Jay Sternberg0b5af202010-03-17 16:16:12 -0700824 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
825 .supports_idle = true,
826 .adv_thermal_throttle = true,
827 .support_ct_kill_exit = true,
828 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
829 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -0700830 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Shanyu Zhao95b13012010-04-21 11:46:33 -0700831 .max_event_log_size = 512,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700832 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700833 .sensitivity_calib_by_driver = true,
834 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700835 .need_dc_calib = true,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700836};
837
Shanyu Zhao18089722010-05-06 10:15:21 -0700838struct iwl_cfg iwl6000g2a_2abg_cfg = {
839 .name = "6000 Series 2x2 ABG Gen2a",
840 .fw_name_pre = IWL6000G2A_FW_PRE,
841 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
842 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
843 .sku = IWL_SKU_A|IWL_SKU_G,
844 .ops = &iwl6000_ops,
845 .eeprom_size = OTP_LOW_IMAGE_SIZE,
846 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
847 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
848 .num_of_queues = IWLAGN_NUM_QUEUES,
849 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
850 .mod_params = &iwlagn_mod_params,
851 .valid_tx_ant = ANT_AB,
852 .valid_rx_ant = ANT_AB,
853 .pll_cfg_val = 0,
854 .set_l0s = true,
855 .use_bsm = false,
856 .pa_type = IWL_PA_SYSTEM,
857 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
858 .shadow_ram_support = true,
859 .led_compensation = 51,
860 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
861 .supports_idle = true,
862 .adv_thermal_throttle = true,
863 .support_ct_kill_exit = true,
864 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
865 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -0700866 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -0700867 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700868 .sensitivity_calib_by_driver = true,
869 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700870 .need_dc_calib = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700871};
872
873struct iwl_cfg iwl6000g2a_2bg_cfg = {
874 .name = "6000 Series 2x2 BG Gen2a",
875 .fw_name_pre = IWL6000G2A_FW_PRE,
876 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
877 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
878 .sku = IWL_SKU_G,
879 .ops = &iwl6000_ops,
880 .eeprom_size = OTP_LOW_IMAGE_SIZE,
881 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
882 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
883 .num_of_queues = IWLAGN_NUM_QUEUES,
884 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
885 .mod_params = &iwlagn_mod_params,
886 .valid_tx_ant = ANT_AB,
887 .valid_rx_ant = ANT_AB,
888 .pll_cfg_val = 0,
889 .set_l0s = true,
890 .use_bsm = false,
891 .pa_type = IWL_PA_SYSTEM,
892 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
893 .shadow_ram_support = true,
894 .led_compensation = 51,
895 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
896 .supports_idle = true,
897 .adv_thermal_throttle = true,
898 .support_ct_kill_exit = true,
899 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
900 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -0700901 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -0700902 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700903 .sensitivity_calib_by_driver = true,
904 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700905 .need_dc_calib = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700906};
907
908struct iwl_cfg iwl6000g2b_2agn_cfg = {
909 .name = "6000 Series 2x2 AGN Gen2b",
910 .fw_name_pre = IWL6000G2B_FW_PRE,
911 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
912 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
913 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
914 .ops = &iwl6000g2b_ops,
915 .eeprom_size = OTP_LOW_IMAGE_SIZE,
916 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
917 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
918 .num_of_queues = IWLAGN_NUM_QUEUES,
919 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
920 .mod_params = &iwlagn_mod_params,
921 .valid_tx_ant = ANT_AB,
922 .valid_rx_ant = ANT_AB,
923 .pll_cfg_val = 0,
924 .set_l0s = true,
925 .use_bsm = false,
926 .pa_type = IWL_PA_SYSTEM,
927 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
928 .shadow_ram_support = true,
929 .ht_greenfield_support = true,
930 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -0700931 .use_rts_for_aggregation = true, /* use rts/cts protection */
Shanyu Zhao18089722010-05-06 10:15:21 -0700932 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
933 .supports_idle = true,
934 .adv_thermal_throttle = true,
935 .support_ct_kill_exit = true,
Wey-Yi Guy74e5c412010-08-23 07:57:02 -0700936 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
Shanyu Zhao18089722010-05-06 10:15:21 -0700937 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -0700938 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -0700939 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700940 .sensitivity_calib_by_driver = true,
941 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700942 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -0700943 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700944 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
945 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
946 .advanced_bt_coexist = true,
Wey-Yi Guya4b96cc2010-08-23 07:57:08 -0700947 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
Wey-Yi Guy5d297d52010-08-23 07:57:09 -0700948 .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
Shanyu Zhao18089722010-05-06 10:15:21 -0700949};
950
951struct iwl_cfg iwl6000g2b_2abg_cfg = {
952 .name = "6000 Series 2x2 ABG Gen2b",
953 .fw_name_pre = IWL6000G2B_FW_PRE,
954 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
955 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
956 .sku = IWL_SKU_A|IWL_SKU_G,
957 .ops = &iwl6000g2b_ops,
958 .eeprom_size = OTP_LOW_IMAGE_SIZE,
959 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
960 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
961 .num_of_queues = IWLAGN_NUM_QUEUES,
962 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
963 .mod_params = &iwlagn_mod_params,
964 .valid_tx_ant = ANT_AB,
965 .valid_rx_ant = ANT_AB,
966 .pll_cfg_val = 0,
967 .set_l0s = true,
968 .use_bsm = false,
969 .pa_type = IWL_PA_SYSTEM,
970 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
971 .shadow_ram_support = true,
972 .led_compensation = 51,
973 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
974 .supports_idle = true,
975 .adv_thermal_throttle = true,
976 .support_ct_kill_exit = true,
Wey-Yi Guy74e5c412010-08-23 07:57:02 -0700977 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
Shanyu Zhao18089722010-05-06 10:15:21 -0700978 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -0700979 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -0700980 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700981 .sensitivity_calib_by_driver = true,
982 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700983 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -0700984 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700985 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
986 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
987 .advanced_bt_coexist = true,
Wey-Yi Guya4b96cc2010-08-23 07:57:08 -0700988 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
Wey-Yi Guy5d297d52010-08-23 07:57:09 -0700989 .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
Shanyu Zhao18089722010-05-06 10:15:21 -0700990};
991
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700992struct iwl_cfg iwl6000g2b_2bgn_cfg = {
993 .name = "6000 Series 2x2 BGN Gen2b",
994 .fw_name_pre = IWL6000G2B_FW_PRE,
995 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
996 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
997 .sku = IWL_SKU_G|IWL_SKU_N,
998 .ops = &iwl6000g2b_ops,
999 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1000 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
1001 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
1002 .num_of_queues = IWLAGN_NUM_QUEUES,
1003 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
1004 .mod_params = &iwlagn_mod_params,
1005 .valid_tx_ant = ANT_AB,
1006 .valid_rx_ant = ANT_AB,
1007 .pll_cfg_val = 0,
1008 .set_l0s = true,
1009 .use_bsm = false,
1010 .pa_type = IWL_PA_SYSTEM,
1011 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1012 .shadow_ram_support = true,
1013 .ht_greenfield_support = true,
1014 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -07001015 .use_rts_for_aggregation = true, /* use rts/cts protection */
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -07001016 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
1017 .supports_idle = true,
1018 .adv_thermal_throttle = true,
1019 .support_ct_kill_exit = true,
Wey-Yi Guy74e5c412010-08-23 07:57:02 -07001020 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -07001021 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -07001022 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -07001023 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -07001024 .sensitivity_calib_by_driver = true,
1025 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001026 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -07001027 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -07001028 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
1029 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
1030 .advanced_bt_coexist = true,
Wey-Yi Guya4b96cc2010-08-23 07:57:08 -07001031 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
Wey-Yi Guy5d297d52010-08-23 07:57:09 -07001032 .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -07001033};
1034
Shanyu Zhao18089722010-05-06 10:15:21 -07001035struct iwl_cfg iwl6000g2b_2bg_cfg = {
1036 .name = "6000 Series 2x2 BG Gen2b",
1037 .fw_name_pre = IWL6000G2B_FW_PRE,
1038 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
1039 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
1040 .sku = IWL_SKU_G,
1041 .ops = &iwl6000g2b_ops,
1042 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1043 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
1044 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
1045 .num_of_queues = IWLAGN_NUM_QUEUES,
1046 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
1047 .mod_params = &iwlagn_mod_params,
1048 .valid_tx_ant = ANT_AB,
1049 .valid_rx_ant = ANT_AB,
1050 .pll_cfg_val = 0,
1051 .set_l0s = true,
1052 .use_bsm = false,
1053 .pa_type = IWL_PA_SYSTEM,
1054 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1055 .shadow_ram_support = true,
1056 .led_compensation = 51,
1057 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
1058 .supports_idle = true,
1059 .adv_thermal_throttle = true,
1060 .support_ct_kill_exit = true,
Wey-Yi Guy74e5c412010-08-23 07:57:02 -07001061 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
Shanyu Zhao18089722010-05-06 10:15:21 -07001062 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -07001063 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -07001064 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -07001065 .sensitivity_calib_by_driver = true,
1066 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001067 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -07001068 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -07001069 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
1070 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
1071 .advanced_bt_coexist = true,
Wey-Yi Guya4b96cc2010-08-23 07:57:08 -07001072 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
Wey-Yi Guy5d297d52010-08-23 07:57:09 -07001073 .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
Shanyu Zhao18089722010-05-06 10:15:21 -07001074};
1075
1076struct iwl_cfg iwl6000g2b_bgn_cfg = {
1077 .name = "6000 Series 1x2 BGN Gen2b",
1078 .fw_name_pre = IWL6000G2B_FW_PRE,
1079 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
1080 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
1081 .sku = IWL_SKU_G|IWL_SKU_N,
1082 .ops = &iwl6000g2b_ops,
1083 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1084 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
1085 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
1086 .num_of_queues = IWLAGN_NUM_QUEUES,
1087 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
1088 .mod_params = &iwlagn_mod_params,
1089 .valid_tx_ant = ANT_A,
1090 .valid_rx_ant = ANT_AB,
1091 .pll_cfg_val = 0,
1092 .set_l0s = true,
1093 .use_bsm = false,
1094 .pa_type = IWL_PA_SYSTEM,
1095 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1096 .shadow_ram_support = true,
1097 .ht_greenfield_support = true,
1098 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -07001099 .use_rts_for_aggregation = true, /* use rts/cts protection */
Shanyu Zhao18089722010-05-06 10:15:21 -07001100 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
1101 .supports_idle = true,
1102 .adv_thermal_throttle = true,
1103 .support_ct_kill_exit = true,
Wey-Yi Guy74e5c412010-08-23 07:57:02 -07001104 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
Shanyu Zhao18089722010-05-06 10:15:21 -07001105 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -07001106 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -07001107 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -07001108 .sensitivity_calib_by_driver = true,
1109 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001110 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -07001111 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -07001112 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
1113 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
1114 .advanced_bt_coexist = true,
Wey-Yi Guya4b96cc2010-08-23 07:57:08 -07001115 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
Wey-Yi Guy5d297d52010-08-23 07:57:09 -07001116 .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
Shanyu Zhao18089722010-05-06 10:15:21 -07001117};
1118
1119struct iwl_cfg iwl6000g2b_bg_cfg = {
1120 .name = "6000 Series 1x2 BG Gen2b",
1121 .fw_name_pre = IWL6000G2B_FW_PRE,
1122 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
1123 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
1124 .sku = IWL_SKU_G,
1125 .ops = &iwl6000g2b_ops,
1126 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1127 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
1128 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
1129 .num_of_queues = IWLAGN_NUM_QUEUES,
1130 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
1131 .mod_params = &iwlagn_mod_params,
1132 .valid_tx_ant = ANT_A,
1133 .valid_rx_ant = ANT_AB,
1134 .pll_cfg_val = 0,
1135 .set_l0s = true,
1136 .use_bsm = false,
1137 .pa_type = IWL_PA_SYSTEM,
1138 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1139 .shadow_ram_support = true,
1140 .led_compensation = 51,
1141 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
1142 .supports_idle = true,
1143 .adv_thermal_throttle = true,
1144 .support_ct_kill_exit = true,
Wey-Yi Guy74e5c412010-08-23 07:57:02 -07001145 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
Shanyu Zhao18089722010-05-06 10:15:21 -07001146 .chain_noise_scale = 1000,
Wey-Yi Guy3198c682010-07-23 13:19:40 -07001147 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
Shanyu Zhao18089722010-05-06 10:15:21 -07001148 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -07001149 .sensitivity_calib_by_driver = true,
1150 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001151 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -07001152 .bt_statistics = true,
Johannes Berg670245e2010-08-23 07:56:55 -07001153 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
1154 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
1155 .advanced_bt_coexist = true,
Wey-Yi Guya4b96cc2010-08-23 07:57:08 -07001156 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
Wey-Yi Guy5d297d52010-08-23 07:57:09 -07001157 .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
Shanyu Zhao18089722010-05-06 10:15:21 -07001158};
1159
Shanyu Zhao95b13012010-04-21 11:46:33 -07001160/*
1161 * "i": Internal configuration, use internal Power Amplifier
1162 */
Wey-Yi Guy65b79982009-07-31 14:28:07 -07001163struct iwl_cfg iwl6000i_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -08001164 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
Wey-Yi Guy65b79982009-07-31 14:28:07 -07001165 .fw_name_pre = IWL6000_FW_PRE,
1166 .ucode_api_max = IWL6000_UCODE_API_MAX,
1167 .ucode_api_min = IWL6000_UCODE_API_MIN,
1168 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
1169 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -07001170 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -07001171 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -07001172 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -07001173 .num_of_queues = IWLAGN_NUM_QUEUES,
1174 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -07001175 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy65b79982009-07-31 14:28:07 -07001176 .valid_tx_ant = ANT_BC,
1177 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -07001178 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -07001179 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -07001180 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -07001181 .pa_type = IWL_PA_INTERNAL,
Wey-Yi Guy415e4992009-08-13 13:30:54 -07001182 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1183 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -07001184 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -07001185 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -07001186 .use_rts_for_aggregation = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -07001187 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -07001188 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -07001189 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -07001190 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -08001191 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -08001192 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001193 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -07001194 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -07001195 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -07001196 .sensitivity_calib_by_driver = true,
1197 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -08001198};
1199
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001200struct iwl_cfg iwl6000i_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -08001201 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001202 .fw_name_pre = IWL6000_FW_PRE,
1203 .ucode_api_max = IWL6000_UCODE_API_MAX,
1204 .ucode_api_min = IWL6000_UCODE_API_MIN,
1205 .sku = IWL_SKU_A|IWL_SKU_G,
1206 .ops = &iwl6000_ops,
1207 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1208 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -07001209 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -07001210 .num_of_queues = IWLAGN_NUM_QUEUES,
1211 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -07001212 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001213 .valid_tx_ant = ANT_BC,
1214 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -07001215 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -07001216 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -07001217 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001218 .pa_type = IWL_PA_INTERNAL,
1219 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1220 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001221 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -07001222 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -07001223 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -07001224 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -07001225 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -08001226 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -08001227 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001228 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -07001229 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -07001230 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -07001231 .sensitivity_calib_by_driver = true,
1232 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001233};
1234
1235struct iwl_cfg iwl6000i_2bg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -08001236 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001237 .fw_name_pre = IWL6000_FW_PRE,
1238 .ucode_api_max = IWL6000_UCODE_API_MAX,
1239 .ucode_api_min = IWL6000_UCODE_API_MIN,
1240 .sku = IWL_SKU_G,
1241 .ops = &iwl6000_ops,
1242 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1243 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -07001244 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -07001245 .num_of_queues = IWLAGN_NUM_QUEUES,
1246 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -07001247 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001248 .valid_tx_ant = ANT_BC,
1249 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -07001250 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -07001251 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -07001252 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001253 .pa_type = IWL_PA_INTERNAL,
1254 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1255 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001256 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -07001257 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -07001258 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -07001259 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -07001260 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -08001261 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -08001262 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001263 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -07001264 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -07001265 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -07001266 .sensitivity_calib_by_driver = true,
1267 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001268};
1269
Jay Sternberge1228372009-01-19 15:30:34 -08001270struct iwl_cfg iwl6050_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -08001271 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -08001272 .fw_name_pre = IWL6050_FW_PRE,
1273 .ucode_api_max = IWL6050_UCODE_API_MAX,
1274 .ucode_api_min = IWL6050_UCODE_API_MIN,
1275 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001276 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -07001277 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -07001278 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -07001279 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -07001280 .num_of_queues = IWLAGN_NUM_QUEUES,
1281 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -07001282 .mod_params = &iwlagn_mod_params,
Jay Sternberg542cc792009-05-08 13:44:46 -07001283 .valid_tx_ant = ANT_AB,
1284 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -07001285 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -07001286 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -07001287 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -07001288 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -07001289 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy415e4992009-08-13 13:30:54 -07001290 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -07001291 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -07001292 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -07001293 .use_rts_for_aggregation = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -07001294 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -07001295 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -07001296 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -07001297 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -08001298 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -08001299 .chain_noise_scale = 1500,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001300 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -07001301 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -07001302 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -07001303 .sensitivity_calib_by_driver = true,
1304 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001305 .need_dc_calib = true,
Jay Sternberge1228372009-01-19 15:30:34 -08001306};
1307
Shanyu Zhao03264332010-06-29 17:27:27 -07001308struct iwl_cfg iwl6050g2_bgn_cfg = {
1309 .name = "6050 Series 1x2 BGN Gen2",
1310 .fw_name_pre = IWL6050_FW_PRE,
1311 .ucode_api_max = IWL6050_UCODE_API_MAX,
1312 .ucode_api_min = IWL6050_UCODE_API_MIN,
1313 .sku = IWL_SKU_G|IWL_SKU_N,
1314 .ops = &iwl6000_ops,
1315 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1316 .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION,
1317 .eeprom_calib_ver = EEPROM_6050G2_TX_POWER_VERSION,
1318 .num_of_queues = IWLAGN_NUM_QUEUES,
1319 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
1320 .mod_params = &iwlagn_mod_params,
1321 .valid_tx_ant = ANT_A,
1322 .valid_rx_ant = ANT_AB,
1323 .pll_cfg_val = 0,
1324 .set_l0s = true,
1325 .use_bsm = false,
1326 .pa_type = IWL_PA_SYSTEM,
1327 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
1328 .shadow_ram_support = true,
1329 .ht_greenfield_support = true,
1330 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -07001331 .use_rts_for_aggregation = true, /* use rts/cts protection */
Shanyu Zhao03264332010-06-29 17:27:27 -07001332 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
1333 .supports_idle = true,
1334 .adv_thermal_throttle = true,
1335 .support_ct_kill_exit = true,
1336 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
1337 .chain_noise_scale = 1500,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001338 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Shanyu Zhao03264332010-06-29 17:27:27 -07001339 .max_event_log_size = 1024,
1340 .ucode_tracing = true,
1341 .sensitivity_calib_by_driver = true,
1342 .chain_noise_calib_by_driver = true,
1343 .need_dc_calib = true,
1344};
1345
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001346struct iwl_cfg iwl6050_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -08001347 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001348 .fw_name_pre = IWL6050_FW_PRE,
1349 .ucode_api_max = IWL6050_UCODE_API_MAX,
1350 .ucode_api_min = IWL6050_UCODE_API_MIN,
1351 .sku = IWL_SKU_A|IWL_SKU_G,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001352 .ops = &iwl6000_ops,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001353 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -07001354 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -07001355 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -07001356 .num_of_queues = IWLAGN_NUM_QUEUES,
1357 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -07001358 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001359 .valid_tx_ant = ANT_AB,
1360 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -07001361 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -07001362 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -07001363 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001364 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -07001365 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001366 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001367 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -07001368 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -07001369 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -07001370 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -07001371 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -08001372 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -08001373 .chain_noise_scale = 1500,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001374 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -07001375 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -07001376 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -07001377 .sensitivity_calib_by_driver = true,
1378 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -07001379 .need_dc_calib = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -07001380};
1381
Jay Sternberge1228372009-01-19 15:30:34 -08001382struct iwl_cfg iwl6000_3agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -08001383 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -08001384 .fw_name_pre = IWL6000_FW_PRE,
1385 .ucode_api_max = IWL6000_UCODE_API_MAX,
1386 .ucode_api_min = IWL6000_UCODE_API_MIN,
1387 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Jay Sternberg29f35c12009-01-29 11:09:16 -08001388 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -07001389 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -07001390 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -07001391 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -07001392 .num_of_queues = IWLAGN_NUM_QUEUES,
1393 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -07001394 .mod_params = &iwlagn_mod_params,
Jay Sternbergc0bac762009-02-02 16:21:14 -08001395 .valid_tx_ant = ANT_ABC,
1396 .valid_rx_ant = ANT_ABC,
Ben Cahillfadb3582009-10-23 13:42:21 -07001397 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -07001398 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -07001399 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -07001400 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy415e4992009-08-13 13:30:54 -07001401 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1402 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -07001403 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -07001404 .led_compensation = 51,
Johannes Berg94597ab2010-08-09 10:57:02 -07001405 .use_rts_for_aggregation = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -07001406 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -07001407 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -07001408 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -07001409 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -08001410 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -08001411 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -07001412 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -07001413 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -07001414 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -07001415 .sensitivity_calib_by_driver = true,
1416 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -08001417};
1418
Jay Sternberge1228372009-01-19 15:30:34 -08001419MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
1420MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
Shanyu Zhao95b13012010-04-21 11:46:33 -07001421MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
Shanyu Zhao18089722010-05-06 10:15:21 -07001422MODULE_FIRMWARE(IWL6000G2B_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));