iwlwifi: add bt full concurrency support
[deliverable/linux.git] / drivers / net / wireless / iwlwifi / iwl-6000.c
CommitLineData
e1228374
JS
1/******************************************************************************
2 *
1f447808 3 * Copyright(c) 2008 - 2010 Intel Corporation. All rights reserved.
e1228374
JS
4 *
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"
a1175124 45#include "iwl-agn.h"
e1228374 46#include "iwl-helpers.h"
19e6cda0 47#include "iwl-agn-hw.h"
f3a2a424 48#include "iwl-6000-hw.h"
e932a609 49#include "iwl-agn-led.h"
b8c76267 50#include "iwl-agn-debugfs.h"
e1228374
JS
51
52/* Highest firmware API version supported */
fcbaf8b0
WYG
53#define IWL6000_UCODE_API_MAX 4
54#define IWL6050_UCODE_API_MAX 4
670245ed 55#define IWL6000G2_UCODE_API_MAX 5
e1228374
JS
56
57/* Lowest firmware API version supported */
44246421
WYG
58#define IWL6000_UCODE_API_MIN 4
59#define IWL6050_UCODE_API_MIN 4
4b3e8062 60#define IWL6000G2_UCODE_API_MIN 4
e1228374
JS
61
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
95b13014
SZ
70#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
1808972f
SZ
74#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
4b3e8062 78
672639de
WYG
79static 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
d5755939 86/* Indicate calibration version to uCode. */
178d1596 87static void iwl6000_set_calib_version(struct iwl_priv *priv)
d5755939 88{
178d1596
WYG
89 if (priv->cfg->need_dc_calib &&
90 (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6))
d5755939
AK
91 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
92 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
93}
94
65b7998a
WYG
95/* NIC configuration for 6000 series */
96static void iwl6000_nic_config(struct iwl_priv *priv)
97{
9371d4ed
WYG
98 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);
65b7998a
WYG
113
114 /* no locking required for register write */
740e7f51 115 if (priv->cfg->pa_type == IWL_PA_INTERNAL) {
65b7998a
WYG
116 /* 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 */
d5755939
AK
121 if (priv->cfg->ops->lib->temp_ops.set_calib_version)
122 priv->cfg->ops->lib->temp_ops.set_calib_version(priv);
65b7998a
WYG
123}
124
670245ed
JB
125/*
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
bee008b7
WYG
204static 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
670245ed
JB
219static void iwl6000g2b_send_bt_config(struct iwl_priv *priv)
220{
221 struct iwl6000g2b_bt_cmd bt_cmd = {
222 .prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
223 .max_kill = IWL6000G2B_BT_MAX_KILL_DEFAULT,
224 .bt3_timer_t7_value = IWL6000G2B_BT3_T7_DEFAULT,
225 .kill_ack_mask = IWL6000G2B_BT_KILL_ACK_MASK_DEFAULT,
226 .kill_cts_mask = IWL6000G2B_BT_KILL_CTS_MASK_DEFAULT,
227 .bt3_prio_sample_time = IWL6000G2B_BT3_PRIO_SAMPLE_DEFAULT,
228 .bt3_timer_t2_value = IWL6000G2B_BT3_T2_DEFAULT,
229 .valid = IWL6000G2B_BT_VALID_ENABLE_FLAGS,
230 };
231
232 BUILD_BUG_ON(sizeof(iwl6000g2b_def_3w_lookup) !=
233 sizeof(bt_cmd.bt3_lookup_table));
234
59079949
JB
235 /*
236 * Configure BT coex mode to "no coexistence" when the
237 * user disabled BT coexistence, we have no interface
238 * (might be in monitor mode), or the interface is in
239 * IBSS mode (no proper uCode support for coex then).
240 */
241 if (!bt_coex_active || !priv->vif ||
242 priv->iw_mode == NL80211_IFTYPE_ADHOC) {
670245ed
JB
243 bt_cmd.flags = 0;
244 } else {
245 bt_cmd.flags = IWL6000G2B_BT_FLAG_CHANNEL_INHIBITION |
246 IWL6000G2B_BT_FLAG_COEX_MODE_3W <<
247 IWL6000G2B_BT_FLAG_COEX_MODE_SHIFT;
248 bt_cmd.valid |= IWL6000G2B_BT_ALL_VALID_MSK;
249 }
250
bee008b7
WYG
251 if (priv->bt_full_concurrent)
252 memcpy(bt_cmd.bt3_lookup_table, iwl6000g2b_concurrent_lookup,
253 sizeof(iwl6000g2b_concurrent_lookup));
254 else
255 memcpy(bt_cmd.bt3_lookup_table, iwl6000g2b_def_3w_lookup,
256 sizeof(iwl6000g2b_def_3w_lookup));
670245ed 257
bee008b7
WYG
258 IWL_DEBUG_INFO(priv, "BT coex %s in %s mode\n",
259 bt_cmd.flags ? "active" : "disabled",
260 priv->bt_full_concurrent ?
261 "full concurrency" : "3-wire");
670245ed
JB
262
263 if (iwl_send_cmd_pdu(priv, REPLY_BT_CONFIG, sizeof(bt_cmd), &bt_cmd))
264 IWL_ERR(priv, "failed to send BT Coex Config\n");
511b082d
JB
265
266 /*
267 * When we are doing a restart, need to also reconfigure BT
268 * SCO to the device. If not doing a restart, bt_sco_active
269 * will always be false, so there's no need to have an extra
270 * variable to check for it.
271 */
272 if (priv->bt_sco_active) {
273 struct iwl6000g2b_bt_sco_cmd sco_cmd = { .flags = 0 };
274
275 if (priv->bt_sco_active)
276 sco_cmd.flags |= IWL6000G2B_BT_SCO_ACTIVE;
277 if (iwl_send_cmd_pdu(priv, REPLY_BT_COEX_SCO,
278 sizeof(sco_cmd), &sco_cmd))
279 IWL_ERR(priv, "failed to send BT SCO command\n");
280 }
670245ed
JB
281}
282
f3a2a424
WYG
283static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
284 .min_nrg_cck = 97,
285 .max_nrg_cck = 0, /* not used, set to 0 */
286 .auto_corr_min_ofdm = 80,
287 .auto_corr_min_ofdm_mrc = 128,
288 .auto_corr_min_ofdm_x1 = 105,
289 .auto_corr_min_ofdm_mrc_x1 = 192,
290
291 .auto_corr_max_ofdm = 145,
292 .auto_corr_max_ofdm_mrc = 232,
2494f63c 293 .auto_corr_max_ofdm_x1 = 110,
f3a2a424
WYG
294 .auto_corr_max_ofdm_mrc_x1 = 232,
295
296 .auto_corr_min_cck = 125,
297 .auto_corr_max_cck = 175,
298 .auto_corr_min_cck_mrc = 160,
299 .auto_corr_max_cck_mrc = 310,
300 .nrg_th_cck = 97,
301 .nrg_th_ofdm = 100,
55036d66
WYG
302
303 .barker_corr_th_min = 190,
304 .barker_corr_th_min_mrc = 390,
305 .nrg_th_cca = 62,
f3a2a424
WYG
306};
307
308static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
309{
88804e2b 310 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
19e6cda0 311 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
88804e2b
WYG
312 priv->cfg->num_of_queues =
313 priv->cfg->mod_params->num_of_queues;
f3a2a424 314
88804e2b 315 priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
f3a2a424
WYG
316 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
317 priv->hw_params.scd_bc_tbls_size =
88804e2b 318 priv->cfg->num_of_queues *
19e6cda0 319 sizeof(struct iwlagn_scd_bc_tbl);
f3a2a424 320 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
bf3c7fdd
WYG
321 priv->hw_params.max_stations = IWLAGN_STATION_COUNT;
322 priv->hw_params.bcast_sta_id = IWLAGN_BROADCAST_ID;
f3a2a424
WYG
323
324 priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
325 priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
326
327 priv->hw_params.max_bsm_size = 0;
328 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
329 BIT(IEEE80211_BAND_5GHZ);
330 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
331
332 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
333 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
334 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
335 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
336
337 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
338 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
339
340 /* Set initial sensitivity parameters */
341 /* Set initial calibration set */
342 priv->hw_params.sens = &iwl6000_sensitivity;
e517736a
WYG
343 priv->hw_params.calib_init_cfg =
344 BIT(IWL_CALIB_XTAL) |
345 BIT(IWL_CALIB_LO) |
346 BIT(IWL_CALIB_TX_IQ) |
347 BIT(IWL_CALIB_BASE_BAND);
178d1596
WYG
348 if (priv->cfg->need_dc_calib)
349 priv->hw_params.calib_init_cfg |= BIT(IWL_CALIB_DC);
07f33f92 350
a0ee74cf
WYG
351 priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
352
f3a2a424
WYG
353 return 0;
354}
355
79d07325
WYG
356static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
357 struct ieee80211_channel_switch *ch_switch)
4a56e965
WYG
358{
359 struct iwl6000_channel_switch_cmd cmd;
360 const struct iwl_channel_info *ch_info;
79d07325
WYG
361 u32 switch_time_in_usec, ucode_switch_time;
362 u16 ch;
363 u32 tsf_low;
364 u8 switch_count;
365 u16 beacon_interval = le16_to_cpu(priv->rxon_timing.beacon_interval);
366 struct ieee80211_vif *vif = priv->vif;
4a56e965
WYG
367 struct iwl_host_cmd hcmd = {
368 .id = REPLY_CHANNEL_SWITCH,
369 .len = sizeof(cmd),
3839f7ce 370 .flags = CMD_SYNC,
4a56e965
WYG
371 .data = &cmd,
372 };
373
4a56e965 374 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
81e95430 375 ch = ch_switch->channel->hw_value;
79d07325
WYG
376 IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
377 priv->active_rxon.channel, ch);
378 cmd.channel = cpu_to_le16(ch);
0924e519
WYG
379 cmd.rxon_flags = priv->staging_rxon.flags;
380 cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
79d07325
WYG
381 switch_count = ch_switch->count;
382 tsf_low = ch_switch->timestamp & 0x0ffffffff;
383 /*
384 * calculate the ucode channel switch time
385 * adding TSF as one of the factor for when to switch
386 */
387 if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) {
388 if (switch_count > ((priv->ucode_beacon_time - tsf_low) /
389 beacon_interval)) {
390 switch_count -= (priv->ucode_beacon_time -
391 tsf_low) / beacon_interval;
392 } else
393 switch_count = 0;
394 }
395 if (switch_count <= 1)
396 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
397 else {
398 switch_time_in_usec =
399 vif->bss_conf.beacon_int * switch_count * TIME_UNIT;
400 ucode_switch_time = iwl_usecs_to_beacons(priv,
401 switch_time_in_usec,
402 beacon_interval);
403 cmd.switch_time = iwl_add_beacon_time(priv,
404 priv->ucode_beacon_time,
405 ucode_switch_time,
406 beacon_interval);
407 }
408 IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
409 cmd.switch_time);
410 ch_info = iwl_get_channel_info(priv, priv->band, ch);
4a56e965
WYG
411 if (ch_info)
412 cmd.expect_beacon = is_channel_radar(ch_info);
413 else {
414 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
79d07325 415 priv->active_rxon.channel, ch);
4a56e965
WYG
416 return -EFAULT;
417 }
79d07325 418 priv->switch_rxon.channel = cmd.channel;
0924e519 419 priv->switch_rxon.switch_in_progress = true;
4a56e965
WYG
420
421 return iwl_send_cmd_sync(priv, &hcmd);
422}
423
9e4afc21
JB
424static void iwl6000g2b_bt_traffic_change_work(struct work_struct *work)
425{
426 struct iwl_priv *priv =
427 container_of(work, struct iwl_priv, bt_traffic_change_work);
428 int smps_request = -1;
429
430 switch (priv->bt_traffic_load) {
431 case IWL_BT_COEX_TRAFFIC_LOAD_NONE:
432 smps_request = IEEE80211_SMPS_AUTOMATIC;
433 break;
434 case IWL_BT_COEX_TRAFFIC_LOAD_LOW:
435 smps_request = IEEE80211_SMPS_DYNAMIC;
436 break;
437 case IWL_BT_COEX_TRAFFIC_LOAD_HIGH:
438 case IWL_BT_COEX_TRAFFIC_LOAD_CONTINUOUS:
439 smps_request = IEEE80211_SMPS_STATIC;
440 break;
441 default:
442 IWL_ERR(priv, "Invalid BT traffic load: %d\n",
443 priv->bt_traffic_load);
444 break;
445 }
446
447 mutex_lock(&priv->mutex);
448
449 if (smps_request != -1 &&
450 priv->vif && priv->vif->type == NL80211_IFTYPE_STATION)
451 ieee80211_request_smps(priv->vif, smps_request);
452
453 mutex_unlock(&priv->mutex);
454}
455
456static void iwl6000g2b_bt_coex_profile_notif(struct iwl_priv *priv,
457 struct iwl_rx_mem_buffer *rxb)
458{
bee008b7 459 unsigned long flags;
9e4afc21
JB
460 struct iwl_rx_packet *pkt = rxb_addr(rxb);
461 struct iwl_bt_coex_profile_notif *coex = &pkt->u.bt_coex_profile_notif;
462 struct iwl6000g2b_bt_sco_cmd sco_cmd = { .flags = 0 };
463
464 IWL_DEBUG_NOTIF(priv, "BT Coex notification:\n");
465 IWL_DEBUG_NOTIF(priv, " status: %d\n", coex->bt_status);
466 IWL_DEBUG_NOTIF(priv, " traffic load: %d\n", coex->bt_traffic_load);
467 IWL_DEBUG_NOTIF(priv, " CI compliance: %d\n", coex->bt_ci_compliance);
468 IWL_DEBUG_NOTIF(priv, " UART msg: %.2x:%.2x:%.2x:%.2x:%.2x:%.2x:"
469 "%.2x:%.2x\n",
470 coex->uart_msg[0], coex->uart_msg[1], coex->uart_msg[2],
471 coex->uart_msg[3], coex->uart_msg[4], coex->uart_msg[5],
472 coex->uart_msg[6], coex->uart_msg[7]);
473
59079949 474 priv->notif_bt_traffic_load = coex->bt_traffic_load;
9e4afc21 475
59079949
JB
476 if (priv->iw_mode != NL80211_IFTYPE_ADHOC) {
477 if (coex->bt_traffic_load != priv->bt_traffic_load) {
478 priv->bt_traffic_load = coex->bt_traffic_load;
9e4afc21 479
59079949
JB
480 queue_work(priv->workqueue,
481 &priv->bt_traffic_change_work);
482 }
483
484 /* FIXME: add defines for this check */
485 priv->bt_sco_active = coex->uart_msg[3] & 1;
486 if (priv->bt_sco_active)
487 sco_cmd.flags |= IWL6000G2B_BT_SCO_ACTIVE;
488 iwl_send_cmd_pdu_async(priv, REPLY_BT_COEX_SCO,
489 sizeof(sco_cmd), &sco_cmd, NULL);
490 }
bee008b7
WYG
491
492 spin_lock_irqsave(&priv->lock, flags);
493 priv->bt_ci_compliance = coex->bt_ci_compliance;
494 spin_unlock_irqrestore(&priv->lock, flags);
9e4afc21
JB
495}
496
497void iwl6000g2b_rx_handler_setup(struct iwl_priv *priv)
498{
499 iwlagn_rx_handler_setup(priv);
500 priv->rx_handlers[REPLY_BT_COEX_PROFILE_NOTIF] =
501 iwl6000g2b_bt_coex_profile_notif;
502}
503
504static void iwl6000g2b_bt_setup_deferred_work(struct iwl_priv *priv)
505{
506 iwlagn_setup_deferred_work(priv);
507
508 INIT_WORK(&priv->bt_traffic_change_work,
509 iwl6000g2b_bt_traffic_change_work);
510
511}
512
513static void iwl6000g2b_bt_cancel_deferred_work(struct iwl_priv *priv)
514{
515 cancel_work_sync(&priv->bt_traffic_change_work);
516}
517
672639de 518static struct iwl_lib_ops iwl6000_lib = {
f3a2a424 519 .set_hw_params = iwl6000_hw_set_hw_params,
b305a080
WYG
520 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
521 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
522 .txq_set_sched = iwlagn_txq_set_sched,
523 .txq_agg_enable = iwlagn_txq_agg_enable,
524 .txq_agg_disable = iwlagn_txq_agg_disable,
672639de
WYG
525 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
526 .txq_free_tfd = iwl_hw_txq_free_tfd,
527 .txq_init = iwl_hw_tx_queue_init,
e04ed0a5
WYG
528 .rx_handler_setup = iwlagn_rx_handler_setup,
529 .setup_deferred_work = iwlagn_setup_deferred_work,
530 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
81b8176e 531 .load_ucode = iwlagn_load_ucode,
b7a79404
RC
532 .dump_nic_event_log = iwl_dump_nic_event_log,
533 .dump_nic_error_log = iwl_dump_nic_error_log,
696bdee3 534 .dump_csr = iwl_dump_csr,
1b3eb823 535 .dump_fh = iwl_dump_fh,
741a6266
WYG
536 .init_alive_start = iwlagn_init_alive_start,
537 .alive_notify = iwlagn_alive_notify,
e04ed0a5 538 .send_tx_power = iwlagn_send_tx_power,
672639de 539 .update_chain_flags = iwl_update_chain_flags,
4a56e965 540 .set_channel_switch = iwl6000_hw_channel_switch,
672639de 541 .apm_ops = {
fadb3582 542 .init = iwl_apm_init,
d68b603c 543 .stop = iwl_apm_stop,
65b7998a 544 .config = iwl6000_nic_config,
672639de
WYG
545 .set_pwr_src = iwl_set_pwr_src,
546 },
547 .eeprom_ops = {
548 .regulatory_bands = {
e04ed0a5
WYG
549 EEPROM_REG_BAND_1_CHANNELS,
550 EEPROM_REG_BAND_2_CHANNELS,
551 EEPROM_REG_BAND_3_CHANNELS,
552 EEPROM_REG_BAND_4_CHANNELS,
553 EEPROM_REG_BAND_5_CHANNELS,
f2fa1b01 554 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
e04ed0a5 555 EEPROM_REG_BAND_52_HT40_CHANNELS
672639de
WYG
556 },
557 .verify_signature = iwlcore_eeprom_verify_signature,
558 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
559 .release_semaphore = iwlcore_eeprom_release_semaphore,
e04ed0a5
WYG
560 .calib_version = iwlagn_eeprom_calib_version,
561 .query_addr = iwlagn_eeprom_query_addr,
ab9fd1bf 562 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
672639de
WYG
563 },
564 .post_associate = iwl_post_associate,
565 .isr = iwl_isr_ict,
566 .config_ap = iwl_config_ap,
567 .temp_ops = {
e04ed0a5 568 .temperature = iwlagn_temperature,
672639de 569 .set_ct_kill = iwl6000_set_ct_threshold,
178d1596 570 .set_calib_version = iwl6000_set_calib_version,
672639de 571 },
1fa61b2e 572 .manage_ibss_station = iwlagn_manage_ibss_station,
278c2f6f 573 .update_bcast_station = iwl_update_bcast_station,
b8c76267
AK
574 .debugfs_ops = {
575 .rx_stats_read = iwl_ucode_rx_stats_read,
576 .tx_stats_read = iwl_ucode_tx_stats_read,
577 .general_stats_read = iwl_ucode_general_stats_read,
ffb7d896 578 .bt_stats_read = iwl_ucode_bt_stats_read,
b8c76267 579 },
b74e31a9 580 .recover_from_tx_stall = iwl_bg_monitor_recover,
fa8f130c
WYG
581 .check_plcp_health = iwl_good_plcp_health,
582 .check_ack_health = iwl_good_ack_health,
716c74b0 583 .txfifo_flush = iwlagn_txfifo_flush,
65550636 584 .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
0975cc8f
WYG
585 .tt_ops = {
586 .lower_power_detection = iwl_tt_is_low_power_state,
587 .tt_power_mode = iwl_tt_current_power_mode,
588 .ct_kill_check = iwl_check_for_ct_kill,
589 }
672639de
WYG
590};
591
9e4afc21
JB
592static struct iwl_lib_ops iwl6000g2b_lib = {
593 .set_hw_params = iwl6000_hw_set_hw_params,
594 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
595 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
596 .txq_set_sched = iwlagn_txq_set_sched,
597 .txq_agg_enable = iwlagn_txq_agg_enable,
598 .txq_agg_disable = iwlagn_txq_agg_disable,
599 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
600 .txq_free_tfd = iwl_hw_txq_free_tfd,
601 .txq_init = iwl_hw_tx_queue_init,
602 .rx_handler_setup = iwl6000g2b_rx_handler_setup,
603 .setup_deferred_work = iwl6000g2b_bt_setup_deferred_work,
604 .cancel_deferred_work = iwl6000g2b_bt_cancel_deferred_work,
605 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
606 .load_ucode = iwlagn_load_ucode,
607 .dump_nic_event_log = iwl_dump_nic_event_log,
608 .dump_nic_error_log = iwl_dump_nic_error_log,
609 .dump_csr = iwl_dump_csr,
610 .dump_fh = iwl_dump_fh,
611 .init_alive_start = iwlagn_init_alive_start,
612 .alive_notify = iwlagn_alive_notify,
613 .send_tx_power = iwlagn_send_tx_power,
614 .update_chain_flags = iwl_update_chain_flags,
615 .set_channel_switch = iwl6000_hw_channel_switch,
616 .apm_ops = {
617 .init = iwl_apm_init,
618 .stop = iwl_apm_stop,
619 .config = iwl6000_nic_config,
620 .set_pwr_src = iwl_set_pwr_src,
621 },
622 .eeprom_ops = {
623 .regulatory_bands = {
624 EEPROM_REG_BAND_1_CHANNELS,
625 EEPROM_REG_BAND_2_CHANNELS,
626 EEPROM_REG_BAND_3_CHANNELS,
627 EEPROM_REG_BAND_4_CHANNELS,
628 EEPROM_REG_BAND_5_CHANNELS,
629 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
630 EEPROM_REG_BAND_52_HT40_CHANNELS
631 },
632 .verify_signature = iwlcore_eeprom_verify_signature,
633 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
634 .release_semaphore = iwlcore_eeprom_release_semaphore,
635 .calib_version = iwlagn_eeprom_calib_version,
636 .query_addr = iwlagn_eeprom_query_addr,
637 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
638 },
639 .post_associate = iwl_post_associate,
640 .isr = iwl_isr_ict,
641 .config_ap = iwl_config_ap,
642 .temp_ops = {
643 .temperature = iwlagn_temperature,
644 .set_ct_kill = iwl6000_set_ct_threshold,
645 .set_calib_version = iwl6000_set_calib_version,
646 },
647 .manage_ibss_station = iwlagn_manage_ibss_station,
648 .update_bcast_station = iwl_update_bcast_station,
649 .debugfs_ops = {
650 .rx_stats_read = iwl_ucode_rx_stats_read,
651 .tx_stats_read = iwl_ucode_tx_stats_read,
652 .general_stats_read = iwl_ucode_general_stats_read,
653 .bt_stats_read = iwl_ucode_bt_stats_read,
654 },
655 .recover_from_tx_stall = iwl_bg_monitor_recover,
656 .check_plcp_health = iwl_good_plcp_health,
657 .check_ack_health = iwl_good_ack_health,
658 .txfifo_flush = iwlagn_txfifo_flush,
659 .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
660 .tt_ops = {
661 .lower_power_detection = iwl_tt_is_low_power_state,
662 .tt_power_mode = iwl_tt_current_power_mode,
663 .ct_kill_check = iwl_check_for_ct_kill,
664 }
665};
666
45d5d805 667static const struct iwl_ops iwl6000_ops = {
672639de 668 .lib = &iwl6000_lib,
7dc77dba
WYG
669 .hcmd = &iwlagn_hcmd,
670 .utils = &iwlagn_hcmd_utils,
e932a609 671 .led = &iwlagn_led_ops,
29f35c14
JS
672};
673
1808972f
SZ
674static struct iwl_hcmd_ops iwl6000g2b_hcmd = {
675 .rxon_assoc = iwlagn_send_rxon_assoc,
676 .commit_rxon = iwl_commit_rxon,
677 .set_rxon_chain = iwl_set_rxon_chain,
678 .set_tx_ant = iwlagn_send_tx_ant_config,
670245ed 679 .send_bt_config = iwl6000g2b_send_bt_config,
1808972f
SZ
680};
681
682static const struct iwl_ops iwl6000g2b_ops = {
9e4afc21 683 .lib = &iwl6000g2b_lib,
1808972f
SZ
684 .hcmd = &iwl6000g2b_hcmd,
685 .utils = &iwlagn_hcmd_utils,
686 .led = &iwlagn_led_ops,
687};
688
95b13014
SZ
689struct iwl_cfg iwl6000g2a_2agn_cfg = {
690 .name = "6000 Series 2x2 AGN Gen2a",
691 .fw_name_pre = IWL6000G2A_FW_PRE,
4b3e8062
SZ
692 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
693 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
0b5af201
JS
694 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
695 .ops = &iwl6000_ops,
696 .eeprom_size = OTP_LOW_IMAGE_SIZE,
4b3e8062
SZ
697 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
698 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
0b5af201
JS
699 .num_of_queues = IWLAGN_NUM_QUEUES,
700 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
701 .mod_params = &iwlagn_mod_params,
702 .valid_tx_ant = ANT_AB,
703 .valid_rx_ant = ANT_AB,
704 .pll_cfg_val = 0,
705 .set_l0s = true,
706 .use_bsm = false,
33e6f816 707 .pa_type = IWL_PA_SYSTEM,
0b5af201
JS
708 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
709 .shadow_ram_support = true,
710 .ht_greenfield_support = true,
711 .led_compensation = 51,
94597ab2 712 .use_rts_for_aggregation = true, /* use rts/cts protection */
0b5af201
JS
713 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
714 .supports_idle = true,
715 .adv_thermal_throttle = true,
716 .support_ct_kill_exit = true,
717 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
718 .chain_noise_scale = 1000,
ce60659a 719 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
95b13014 720 .max_event_log_size = 512,
6e5c800e 721 .ucode_tracing = true,
65d1f896
WYG
722 .sensitivity_calib_by_driver = true,
723 .chain_noise_calib_by_driver = true,
178d1596 724 .need_dc_calib = true,
0b5af201
JS
725};
726
1808972f
SZ
727struct iwl_cfg iwl6000g2a_2abg_cfg = {
728 .name = "6000 Series 2x2 ABG Gen2a",
729 .fw_name_pre = IWL6000G2A_FW_PRE,
730 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
731 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
732 .sku = IWL_SKU_A|IWL_SKU_G,
733 .ops = &iwl6000_ops,
734 .eeprom_size = OTP_LOW_IMAGE_SIZE,
735 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
736 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
737 .num_of_queues = IWLAGN_NUM_QUEUES,
738 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
739 .mod_params = &iwlagn_mod_params,
740 .valid_tx_ant = ANT_AB,
741 .valid_rx_ant = ANT_AB,
742 .pll_cfg_val = 0,
743 .set_l0s = true,
744 .use_bsm = false,
745 .pa_type = IWL_PA_SYSTEM,
746 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
747 .shadow_ram_support = true,
748 .led_compensation = 51,
749 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
750 .supports_idle = true,
751 .adv_thermal_throttle = true,
752 .support_ct_kill_exit = true,
753 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
754 .chain_noise_scale = 1000,
ce60659a 755 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
1808972f 756 .max_event_log_size = 512,
679db794
WYG
757 .sensitivity_calib_by_driver = true,
758 .chain_noise_calib_by_driver = true,
178d1596 759 .need_dc_calib = true,
1808972f
SZ
760};
761
762struct iwl_cfg iwl6000g2a_2bg_cfg = {
763 .name = "6000 Series 2x2 BG Gen2a",
764 .fw_name_pre = IWL6000G2A_FW_PRE,
765 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
766 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
767 .sku = IWL_SKU_G,
768 .ops = &iwl6000_ops,
769 .eeprom_size = OTP_LOW_IMAGE_SIZE,
770 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
771 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
772 .num_of_queues = IWLAGN_NUM_QUEUES,
773 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
774 .mod_params = &iwlagn_mod_params,
775 .valid_tx_ant = ANT_AB,
776 .valid_rx_ant = ANT_AB,
777 .pll_cfg_val = 0,
778 .set_l0s = true,
779 .use_bsm = false,
780 .pa_type = IWL_PA_SYSTEM,
781 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
782 .shadow_ram_support = true,
783 .led_compensation = 51,
784 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
785 .supports_idle = true,
786 .adv_thermal_throttle = true,
787 .support_ct_kill_exit = true,
788 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
789 .chain_noise_scale = 1000,
ce60659a 790 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
1808972f 791 .max_event_log_size = 512,
679db794
WYG
792 .sensitivity_calib_by_driver = true,
793 .chain_noise_calib_by_driver = true,
178d1596 794 .need_dc_calib = true,
1808972f
SZ
795};
796
797struct iwl_cfg iwl6000g2b_2agn_cfg = {
798 .name = "6000 Series 2x2 AGN Gen2b",
799 .fw_name_pre = IWL6000G2B_FW_PRE,
800 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
801 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
802 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
803 .ops = &iwl6000g2b_ops,
804 .eeprom_size = OTP_LOW_IMAGE_SIZE,
805 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
806 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
807 .num_of_queues = IWLAGN_NUM_QUEUES,
808 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
809 .mod_params = &iwlagn_mod_params,
810 .valid_tx_ant = ANT_AB,
811 .valid_rx_ant = ANT_AB,
812 .pll_cfg_val = 0,
813 .set_l0s = true,
814 .use_bsm = false,
815 .pa_type = IWL_PA_SYSTEM,
816 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
817 .shadow_ram_support = true,
818 .ht_greenfield_support = true,
819 .led_compensation = 51,
94597ab2 820 .use_rts_for_aggregation = true, /* use rts/cts protection */
1808972f
SZ
821 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
822 .supports_idle = true,
823 .adv_thermal_throttle = true,
824 .support_ct_kill_exit = true,
74e5c41b 825 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
1808972f 826 .chain_noise_scale = 1000,
3198c68c 827 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
1808972f 828 .max_event_log_size = 512,
679db794
WYG
829 .sensitivity_calib_by_driver = true,
830 .chain_noise_calib_by_driver = true,
178d1596 831 .need_dc_calib = true,
af8ee055 832 .bt_statistics = true,
670245ed
JB
833 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
834 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
835 .advanced_bt_coexist = true,
1808972f
SZ
836};
837
838struct iwl_cfg iwl6000g2b_2abg_cfg = {
839 .name = "6000 Series 2x2 ABG Gen2b",
840 .fw_name_pre = IWL6000G2B_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 = &iwl6000g2b_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,
74e5c41b 864 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
1808972f 865 .chain_noise_scale = 1000,
3198c68c 866 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
1808972f 867 .max_event_log_size = 512,
679db794
WYG
868 .sensitivity_calib_by_driver = true,
869 .chain_noise_calib_by_driver = true,
178d1596 870 .need_dc_calib = true,
af8ee055 871 .bt_statistics = true,
670245ed
JB
872 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
873 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
874 .advanced_bt_coexist = true,
1808972f
SZ
875};
876
9f6e1baf
SZ
877struct iwl_cfg iwl6000g2b_2bgn_cfg = {
878 .name = "6000 Series 2x2 BGN Gen2b",
879 .fw_name_pre = IWL6000G2B_FW_PRE,
880 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
881 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
882 .sku = IWL_SKU_G|IWL_SKU_N,
883 .ops = &iwl6000g2b_ops,
884 .eeprom_size = OTP_LOW_IMAGE_SIZE,
885 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
886 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
887 .num_of_queues = IWLAGN_NUM_QUEUES,
888 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
889 .mod_params = &iwlagn_mod_params,
890 .valid_tx_ant = ANT_AB,
891 .valid_rx_ant = ANT_AB,
892 .pll_cfg_val = 0,
893 .set_l0s = true,
894 .use_bsm = false,
895 .pa_type = IWL_PA_SYSTEM,
896 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
897 .shadow_ram_support = true,
898 .ht_greenfield_support = true,
899 .led_compensation = 51,
94597ab2 900 .use_rts_for_aggregation = true, /* use rts/cts protection */
9f6e1baf
SZ
901 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
902 .supports_idle = true,
903 .adv_thermal_throttle = true,
904 .support_ct_kill_exit = true,
74e5c41b 905 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
9f6e1baf 906 .chain_noise_scale = 1000,
3198c68c 907 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
9f6e1baf 908 .max_event_log_size = 512,
679db794
WYG
909 .sensitivity_calib_by_driver = true,
910 .chain_noise_calib_by_driver = true,
178d1596 911 .need_dc_calib = true,
af8ee055 912 .bt_statistics = true,
670245ed
JB
913 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
914 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
915 .advanced_bt_coexist = true,
9f6e1baf
SZ
916};
917
1808972f
SZ
918struct iwl_cfg iwl6000g2b_2bg_cfg = {
919 .name = "6000 Series 2x2 BG Gen2b",
920 .fw_name_pre = IWL6000G2B_FW_PRE,
921 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
922 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
923 .sku = IWL_SKU_G,
924 .ops = &iwl6000g2b_ops,
925 .eeprom_size = OTP_LOW_IMAGE_SIZE,
926 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
927 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
928 .num_of_queues = IWLAGN_NUM_QUEUES,
929 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
930 .mod_params = &iwlagn_mod_params,
931 .valid_tx_ant = ANT_AB,
932 .valid_rx_ant = ANT_AB,
933 .pll_cfg_val = 0,
934 .set_l0s = true,
935 .use_bsm = false,
936 .pa_type = IWL_PA_SYSTEM,
937 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
938 .shadow_ram_support = true,
939 .led_compensation = 51,
940 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
941 .supports_idle = true,
942 .adv_thermal_throttle = true,
943 .support_ct_kill_exit = true,
74e5c41b 944 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
1808972f 945 .chain_noise_scale = 1000,
3198c68c 946 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
1808972f 947 .max_event_log_size = 512,
679db794
WYG
948 .sensitivity_calib_by_driver = true,
949 .chain_noise_calib_by_driver = true,
178d1596 950 .need_dc_calib = true,
af8ee055 951 .bt_statistics = true,
670245ed
JB
952 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
953 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
954 .advanced_bt_coexist = true,
1808972f
SZ
955};
956
957struct iwl_cfg iwl6000g2b_bgn_cfg = {
958 .name = "6000 Series 1x2 BGN Gen2b",
959 .fw_name_pre = IWL6000G2B_FW_PRE,
960 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
961 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
962 .sku = IWL_SKU_G|IWL_SKU_N,
963 .ops = &iwl6000g2b_ops,
964 .eeprom_size = OTP_LOW_IMAGE_SIZE,
965 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
966 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
967 .num_of_queues = IWLAGN_NUM_QUEUES,
968 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
969 .mod_params = &iwlagn_mod_params,
970 .valid_tx_ant = ANT_A,
971 .valid_rx_ant = ANT_AB,
972 .pll_cfg_val = 0,
973 .set_l0s = true,
974 .use_bsm = false,
975 .pa_type = IWL_PA_SYSTEM,
976 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
977 .shadow_ram_support = true,
978 .ht_greenfield_support = true,
979 .led_compensation = 51,
94597ab2 980 .use_rts_for_aggregation = true, /* use rts/cts protection */
1808972f
SZ
981 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
982 .supports_idle = true,
983 .adv_thermal_throttle = true,
984 .support_ct_kill_exit = true,
74e5c41b 985 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
1808972f 986 .chain_noise_scale = 1000,
3198c68c 987 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
1808972f 988 .max_event_log_size = 512,
679db794
WYG
989 .sensitivity_calib_by_driver = true,
990 .chain_noise_calib_by_driver = true,
178d1596 991 .need_dc_calib = true,
af8ee055 992 .bt_statistics = true,
670245ed
JB
993 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
994 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
995 .advanced_bt_coexist = true,
1808972f
SZ
996};
997
998struct iwl_cfg iwl6000g2b_bg_cfg = {
999 .name = "6000 Series 1x2 BG Gen2b",
1000 .fw_name_pre = IWL6000G2B_FW_PRE,
1001 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
1002 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
1003 .sku = IWL_SKU_G,
1004 .ops = &iwl6000g2b_ops,
1005 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1006 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
1007 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
1008 .num_of_queues = IWLAGN_NUM_QUEUES,
1009 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
1010 .mod_params = &iwlagn_mod_params,
1011 .valid_tx_ant = ANT_A,
1012 .valid_rx_ant = ANT_AB,
1013 .pll_cfg_val = 0,
1014 .set_l0s = true,
1015 .use_bsm = false,
1016 .pa_type = IWL_PA_SYSTEM,
1017 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1018 .shadow_ram_support = true,
1019 .led_compensation = 51,
1020 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
1021 .supports_idle = true,
1022 .adv_thermal_throttle = true,
1023 .support_ct_kill_exit = true,
74e5c41b 1024 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
1808972f 1025 .chain_noise_scale = 1000,
3198c68c 1026 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
1808972f 1027 .max_event_log_size = 512,
679db794
WYG
1028 .sensitivity_calib_by_driver = true,
1029 .chain_noise_calib_by_driver = true,
178d1596 1030 .need_dc_calib = true,
af8ee055 1031 .bt_statistics = true,
670245ed
JB
1032 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
1033 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
1034 .advanced_bt_coexist = true,
1808972f
SZ
1035};
1036
95b13014
SZ
1037/*
1038 * "i": Internal configuration, use internal Power Amplifier
1039 */
65b7998a 1040struct iwl_cfg iwl6000i_2agn_cfg = {
c11362c0 1041 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
65b7998a
WYG
1042 .fw_name_pre = IWL6000_FW_PRE,
1043 .ucode_api_max = IWL6000_UCODE_API_MAX,
1044 .ucode_api_min = IWL6000_UCODE_API_MIN,
1045 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
1046 .ops = &iwl6000_ops,
415e4993 1047 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1f4b9665 1048 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
00e70590 1049 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
19e6cda0
WYG
1050 .num_of_queues = IWLAGN_NUM_QUEUES,
1051 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
348ee7cd 1052 .mod_params = &iwlagn_mod_params,
65b7998a
WYG
1053 .valid_tx_ant = ANT_BC,
1054 .valid_rx_ant = ANT_BC,
fadb3582 1055 .pll_cfg_val = 0,
a6c5c731 1056 .set_l0s = true,
fadb3582 1057 .use_bsm = false,
65b7998a 1058 .pa_type = IWL_PA_INTERNAL,
415e4993
WYG
1059 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1060 .shadow_ram_support = true,
b261793d 1061 .ht_greenfield_support = true,
f2d0d0e2 1062 .led_compensation = 51,
94597ab2 1063 .use_rts_for_aggregation = true, /* use rts/cts protection */
d8c07e7a 1064 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
78f5fb7f 1065 .supports_idle = true,
6047b4f9 1066 .adv_thermal_throttle = true,
480e8407 1067 .support_ct_kill_exit = true,
3e4fb5fa 1068 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
d4fe5ac9 1069 .chain_noise_scale = 1000,
ce60659a 1070 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
678b385d 1071 .max_event_log_size = 1024,
6e5c800e 1072 .ucode_tracing = true,
65d1f896
WYG
1073 .sensitivity_calib_by_driver = true,
1074 .chain_noise_calib_by_driver = true,
e1228374
JS
1075};
1076
5953a62e 1077struct iwl_cfg iwl6000i_2abg_cfg = {
c11362c0 1078 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
5953a62e
WYG
1079 .fw_name_pre = IWL6000_FW_PRE,
1080 .ucode_api_max = IWL6000_UCODE_API_MAX,
1081 .ucode_api_min = IWL6000_UCODE_API_MIN,
1082 .sku = IWL_SKU_A|IWL_SKU_G,
1083 .ops = &iwl6000_ops,
1084 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1085 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
00e70590 1086 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
19e6cda0
WYG
1087 .num_of_queues = IWLAGN_NUM_QUEUES,
1088 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
348ee7cd 1089 .mod_params = &iwlagn_mod_params,
5953a62e
WYG
1090 .valid_tx_ant = ANT_BC,
1091 .valid_rx_ant = ANT_BC,
fadb3582 1092 .pll_cfg_val = 0,
a6c5c731 1093 .set_l0s = true,
fadb3582 1094 .use_bsm = false,
5953a62e
WYG
1095 .pa_type = IWL_PA_INTERNAL,
1096 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1097 .shadow_ram_support = true,
5953a62e 1098 .led_compensation = 51,
d8c07e7a 1099 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
78f5fb7f 1100 .supports_idle = true,
6047b4f9 1101 .adv_thermal_throttle = true,
480e8407 1102 .support_ct_kill_exit = true,
3e4fb5fa 1103 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
d4fe5ac9 1104 .chain_noise_scale = 1000,
ce60659a 1105 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
678b385d 1106 .max_event_log_size = 1024,
6e5c800e 1107 .ucode_tracing = true,
65d1f896
WYG
1108 .sensitivity_calib_by_driver = true,
1109 .chain_noise_calib_by_driver = true,
5953a62e
WYG
1110};
1111
1112struct iwl_cfg iwl6000i_2bg_cfg = {
c11362c0 1113 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
5953a62e
WYG
1114 .fw_name_pre = IWL6000_FW_PRE,
1115 .ucode_api_max = IWL6000_UCODE_API_MAX,
1116 .ucode_api_min = IWL6000_UCODE_API_MIN,
1117 .sku = IWL_SKU_G,
1118 .ops = &iwl6000_ops,
1119 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1120 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
00e70590 1121 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
19e6cda0
WYG
1122 .num_of_queues = IWLAGN_NUM_QUEUES,
1123 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
348ee7cd 1124 .mod_params = &iwlagn_mod_params,
5953a62e
WYG
1125 .valid_tx_ant = ANT_BC,
1126 .valid_rx_ant = ANT_BC,
fadb3582 1127 .pll_cfg_val = 0,
a6c5c731 1128 .set_l0s = true,
fadb3582 1129 .use_bsm = false,
5953a62e
WYG
1130 .pa_type = IWL_PA_INTERNAL,
1131 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1132 .shadow_ram_support = true,
5953a62e 1133 .led_compensation = 51,
d8c07e7a 1134 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
78f5fb7f 1135 .supports_idle = true,
6047b4f9 1136 .adv_thermal_throttle = true,
480e8407 1137 .support_ct_kill_exit = true,
3e4fb5fa 1138 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
d4fe5ac9 1139 .chain_noise_scale = 1000,
ce60659a 1140 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
678b385d 1141 .max_event_log_size = 1024,
6e5c800e 1142 .ucode_tracing = true,
65d1f896
WYG
1143 .sensitivity_calib_by_driver = true,
1144 .chain_noise_calib_by_driver = true,
5953a62e
WYG
1145};
1146
e1228374 1147struct iwl_cfg iwl6050_2agn_cfg = {
c11362c0 1148 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
e1228374
JS
1149 .fw_name_pre = IWL6050_FW_PRE,
1150 .ucode_api_max = IWL6050_UCODE_API_MAX,
1151 .ucode_api_min = IWL6050_UCODE_API_MIN,
1152 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
178d1596 1153 .ops = &iwl6000_ops,
415e4993 1154 .eeprom_size = OTP_LOW_IMAGE_SIZE,
32b7e244 1155 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
00e70590 1156 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
19e6cda0
WYG
1157 .num_of_queues = IWLAGN_NUM_QUEUES,
1158 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
348ee7cd 1159 .mod_params = &iwlagn_mod_params,
542cc793
JS
1160 .valid_tx_ant = ANT_AB,
1161 .valid_rx_ant = ANT_AB,
fadb3582 1162 .pll_cfg_val = 0,
a6c5c731 1163 .set_l0s = true,
fadb3582 1164 .use_bsm = false,
65b7998a 1165 .pa_type = IWL_PA_SYSTEM,
3ab312a8 1166 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
415e4993 1167 .shadow_ram_support = true,
b261793d 1168 .ht_greenfield_support = true,
f2d0d0e2 1169 .led_compensation = 51,
94597ab2 1170 .use_rts_for_aggregation = true, /* use rts/cts protection */
d8c07e7a 1171 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
03264339
SZ
1172 .supports_idle = true,
1173 .adv_thermal_throttle = true,
1174 .support_ct_kill_exit = true,
1175 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
1176 .chain_noise_scale = 1500,
ce60659a 1177 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
03264339
SZ
1178 .max_event_log_size = 1024,
1179 .ucode_tracing = true,
1180 .sensitivity_calib_by_driver = true,
1181 .chain_noise_calib_by_driver = true,
1182 .need_dc_calib = true,
1183};
1184
1185struct iwl_cfg iwl6050g2_bgn_cfg = {
1186 .name = "6050 Series 1x2 BGN Gen2",
1187 .fw_name_pre = IWL6050_FW_PRE,
1188 .ucode_api_max = IWL6050_UCODE_API_MAX,
1189 .ucode_api_min = IWL6050_UCODE_API_MIN,
1190 .sku = IWL_SKU_G|IWL_SKU_N,
1191 .ops = &iwl6000_ops,
1192 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1193 .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION,
1194 .eeprom_calib_ver = EEPROM_6050G2_TX_POWER_VERSION,
1195 .num_of_queues = IWLAGN_NUM_QUEUES,
1196 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
1197 .mod_params = &iwlagn_mod_params,
1198 .valid_tx_ant = ANT_A,
1199 .valid_rx_ant = ANT_AB,
1200 .pll_cfg_val = 0,
1201 .set_l0s = true,
1202 .use_bsm = false,
1203 .pa_type = IWL_PA_SYSTEM,
1204 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
1205 .shadow_ram_support = true,
1206 .ht_greenfield_support = true,
1207 .led_compensation = 51,
94597ab2 1208 .use_rts_for_aggregation = true, /* use rts/cts protection */
03264339 1209 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
78f5fb7f 1210 .supports_idle = true,
6047b4f9 1211 .adv_thermal_throttle = true,
480e8407 1212 .support_ct_kill_exit = true,
3e4fb5fa 1213 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
d4fe5ac9 1214 .chain_noise_scale = 1500,
ce60659a 1215 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
678b385d 1216 .max_event_log_size = 1024,
6e5c800e 1217 .ucode_tracing = true,
65d1f896
WYG
1218 .sensitivity_calib_by_driver = true,
1219 .chain_noise_calib_by_driver = true,
178d1596 1220 .need_dc_calib = true,
e1228374
JS
1221};
1222
5953a62e 1223struct iwl_cfg iwl6050_2abg_cfg = {
c11362c0 1224 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
5953a62e
WYG
1225 .fw_name_pre = IWL6050_FW_PRE,
1226 .ucode_api_max = IWL6050_UCODE_API_MAX,
1227 .ucode_api_min = IWL6050_UCODE_API_MIN,
1228 .sku = IWL_SKU_A|IWL_SKU_G,
178d1596 1229 .ops = &iwl6000_ops,
5953a62e 1230 .eeprom_size = OTP_LOW_IMAGE_SIZE,
32b7e244 1231 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
00e70590 1232 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
19e6cda0
WYG
1233 .num_of_queues = IWLAGN_NUM_QUEUES,
1234 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
348ee7cd 1235 .mod_params = &iwlagn_mod_params,
5953a62e
WYG
1236 .valid_tx_ant = ANT_AB,
1237 .valid_rx_ant = ANT_AB,
fadb3582 1238 .pll_cfg_val = 0,
a6c5c731 1239 .set_l0s = true,
fadb3582 1240 .use_bsm = false,
5953a62e 1241 .pa_type = IWL_PA_SYSTEM,
3ab312a8 1242 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
5953a62e 1243 .shadow_ram_support = true,
5953a62e 1244 .led_compensation = 51,
d8c07e7a 1245 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
78f5fb7f 1246 .supports_idle = true,
6047b4f9 1247 .adv_thermal_throttle = true,
480e8407 1248 .support_ct_kill_exit = true,
3e4fb5fa 1249 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
d4fe5ac9 1250 .chain_noise_scale = 1500,
ce60659a 1251 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
678b385d 1252 .max_event_log_size = 1024,
6e5c800e 1253 .ucode_tracing = true,
65d1f896
WYG
1254 .sensitivity_calib_by_driver = true,
1255 .chain_noise_calib_by_driver = true,
178d1596 1256 .need_dc_calib = true,
5953a62e
WYG
1257};
1258
e1228374 1259struct iwl_cfg iwl6000_3agn_cfg = {
c11362c0 1260 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
e1228374
JS
1261 .fw_name_pre = IWL6000_FW_PRE,
1262 .ucode_api_max = IWL6000_UCODE_API_MAX,
1263 .ucode_api_min = IWL6000_UCODE_API_MIN,
1264 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
29f35c14 1265 .ops = &iwl6000_ops,
415e4993 1266 .eeprom_size = OTP_LOW_IMAGE_SIZE,
1f4b9665 1267 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
00e70590 1268 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
19e6cda0
WYG
1269 .num_of_queues = IWLAGN_NUM_QUEUES,
1270 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
348ee7cd 1271 .mod_params = &iwlagn_mod_params,
c0bac76a
JS
1272 .valid_tx_ant = ANT_ABC,
1273 .valid_rx_ant = ANT_ABC,
fadb3582 1274 .pll_cfg_val = 0,
a6c5c731 1275 .set_l0s = true,
fadb3582 1276 .use_bsm = false,
65b7998a 1277 .pa_type = IWL_PA_SYSTEM,
415e4993
WYG
1278 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
1279 .shadow_ram_support = true,
b261793d 1280 .ht_greenfield_support = true,
f2d0d0e2 1281 .led_compensation = 51,
94597ab2 1282 .use_rts_for_aggregation = true, /* use rts/cts protection */
d8c07e7a 1283 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
78f5fb7f 1284 .supports_idle = true,
6047b4f9 1285 .adv_thermal_throttle = true,
480e8407 1286 .support_ct_kill_exit = true,
3e4fb5fa 1287 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
d4fe5ac9 1288 .chain_noise_scale = 1000,
ce60659a 1289 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
678b385d 1290 .max_event_log_size = 1024,
6e5c800e 1291 .ucode_tracing = true,
65d1f896
WYG
1292 .sensitivity_calib_by_driver = true,
1293 .chain_noise_calib_by_driver = true,
e1228374
JS
1294};
1295
e1228374
JS
1296MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
1297MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
95b13014 1298MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
1808972f 1299MODULE_FIRMWARE(IWL6000G2B_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
This page took 0.434184 seconds and 5 git commands to generate.