iwlwifi: update LQ for bcast station on channel change
[deliverable/linux.git] / drivers / net / wireless / iwlwifi / iwl-6000.c
1 /******************************************************************************
2 *
3 * Copyright(c) 2008 - 2010 Intel Corporation. All rights reserved.
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"
45 #include "iwl-agn.h"
46 #include "iwl-helpers.h"
47 #include "iwl-agn-hw.h"
48 #include "iwl-6000-hw.h"
49 #include "iwl-agn-led.h"
50 #include "iwl-agn-debugfs.h"
51
52 /* Highest firmware API version supported */
53 #define IWL6000_UCODE_API_MAX 4
54 #define IWL6050_UCODE_API_MAX 4
55 #define IWL6000G2_UCODE_API_MAX 4
56
57 /* Lowest firmware API version supported */
58 #define IWL6000_UCODE_API_MIN 4
59 #define IWL6050_UCODE_API_MIN 4
60 #define IWL6000G2_UCODE_API_MIN 4
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
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
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
78
79 static 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
86 /* Indicate calibration version to uCode. */
87 static void iwl6000_set_calib_version(struct iwl_priv *priv)
88 {
89 if (priv->cfg->need_dc_calib &&
90 (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6))
91 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
92 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
93 }
94
95 /* NIC configuration for 6000 series */
96 static void iwl6000_nic_config(struct iwl_priv *priv)
97 {
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);
113
114 /* no locking required for register write */
115 if (priv->cfg->pa_type == IWL_PA_INTERNAL) {
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 */
121 if (priv->cfg->ops->lib->temp_ops.set_calib_version)
122 priv->cfg->ops->lib->temp_ops.set_calib_version(priv);
123 }
124
125 static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
126 .min_nrg_cck = 97,
127 .max_nrg_cck = 0, /* not used, set to 0 */
128 .auto_corr_min_ofdm = 80,
129 .auto_corr_min_ofdm_mrc = 128,
130 .auto_corr_min_ofdm_x1 = 105,
131 .auto_corr_min_ofdm_mrc_x1 = 192,
132
133 .auto_corr_max_ofdm = 145,
134 .auto_corr_max_ofdm_mrc = 232,
135 .auto_corr_max_ofdm_x1 = 110,
136 .auto_corr_max_ofdm_mrc_x1 = 232,
137
138 .auto_corr_min_cck = 125,
139 .auto_corr_max_cck = 175,
140 .auto_corr_min_cck_mrc = 160,
141 .auto_corr_max_cck_mrc = 310,
142 .nrg_th_cck = 97,
143 .nrg_th_ofdm = 100,
144
145 .barker_corr_th_min = 190,
146 .barker_corr_th_min_mrc = 390,
147 .nrg_th_cca = 62,
148 };
149
150 static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
151 {
152 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
153 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
154 priv->cfg->num_of_queues =
155 priv->cfg->mod_params->num_of_queues;
156
157 priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
158 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
159 priv->hw_params.scd_bc_tbls_size =
160 priv->cfg->num_of_queues *
161 sizeof(struct iwlagn_scd_bc_tbl);
162 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
163 priv->hw_params.max_stations = IWL5000_STATION_COUNT;
164 priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
165
166 priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
167 priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
168
169 priv->hw_params.max_bsm_size = 0;
170 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
171 BIT(IEEE80211_BAND_5GHZ);
172 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
173
174 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
175 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
176 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
177 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
178
179 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
180 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
181
182 /* Set initial sensitivity parameters */
183 /* Set initial calibration set */
184 priv->hw_params.sens = &iwl6000_sensitivity;
185 priv->hw_params.calib_init_cfg =
186 BIT(IWL_CALIB_XTAL) |
187 BIT(IWL_CALIB_LO) |
188 BIT(IWL_CALIB_TX_IQ) |
189 BIT(IWL_CALIB_BASE_BAND);
190 if (priv->cfg->need_dc_calib)
191 priv->hw_params.calib_init_cfg |= BIT(IWL_CALIB_DC);
192
193 priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
194
195 return 0;
196 }
197
198 static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
199 struct ieee80211_channel_switch *ch_switch)
200 {
201 struct iwl6000_channel_switch_cmd cmd;
202 const struct iwl_channel_info *ch_info;
203 u32 switch_time_in_usec, ucode_switch_time;
204 u16 ch;
205 u32 tsf_low;
206 u8 switch_count;
207 u16 beacon_interval = le16_to_cpu(priv->rxon_timing.beacon_interval);
208 struct ieee80211_vif *vif = priv->vif;
209 struct iwl_host_cmd hcmd = {
210 .id = REPLY_CHANNEL_SWITCH,
211 .len = sizeof(cmd),
212 .flags = CMD_SYNC,
213 .data = &cmd,
214 };
215
216 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
217 ch = ieee80211_frequency_to_channel(ch_switch->channel->center_freq);
218 IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
219 priv->active_rxon.channel, ch);
220 cmd.channel = cpu_to_le16(ch);
221 cmd.rxon_flags = priv->staging_rxon.flags;
222 cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
223 switch_count = ch_switch->count;
224 tsf_low = ch_switch->timestamp & 0x0ffffffff;
225 /*
226 * calculate the ucode channel switch time
227 * adding TSF as one of the factor for when to switch
228 */
229 if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) {
230 if (switch_count > ((priv->ucode_beacon_time - tsf_low) /
231 beacon_interval)) {
232 switch_count -= (priv->ucode_beacon_time -
233 tsf_low) / beacon_interval;
234 } else
235 switch_count = 0;
236 }
237 if (switch_count <= 1)
238 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
239 else {
240 switch_time_in_usec =
241 vif->bss_conf.beacon_int * switch_count * TIME_UNIT;
242 ucode_switch_time = iwl_usecs_to_beacons(priv,
243 switch_time_in_usec,
244 beacon_interval);
245 cmd.switch_time = iwl_add_beacon_time(priv,
246 priv->ucode_beacon_time,
247 ucode_switch_time,
248 beacon_interval);
249 }
250 IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
251 cmd.switch_time);
252 ch_info = iwl_get_channel_info(priv, priv->band, ch);
253 if (ch_info)
254 cmd.expect_beacon = is_channel_radar(ch_info);
255 else {
256 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
257 priv->active_rxon.channel, ch);
258 return -EFAULT;
259 }
260 priv->switch_rxon.channel = cmd.channel;
261 priv->switch_rxon.switch_in_progress = true;
262
263 return iwl_send_cmd_sync(priv, &hcmd);
264 }
265
266 static struct iwl_lib_ops iwl6000_lib = {
267 .set_hw_params = iwl6000_hw_set_hw_params,
268 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
269 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
270 .txq_set_sched = iwlagn_txq_set_sched,
271 .txq_agg_enable = iwlagn_txq_agg_enable,
272 .txq_agg_disable = iwlagn_txq_agg_disable,
273 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
274 .txq_free_tfd = iwl_hw_txq_free_tfd,
275 .txq_init = iwl_hw_tx_queue_init,
276 .rx_handler_setup = iwlagn_rx_handler_setup,
277 .setup_deferred_work = iwlagn_setup_deferred_work,
278 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
279 .load_ucode = iwlagn_load_ucode,
280 .dump_nic_event_log = iwl_dump_nic_event_log,
281 .dump_nic_error_log = iwl_dump_nic_error_log,
282 .dump_csr = iwl_dump_csr,
283 .dump_fh = iwl_dump_fh,
284 .init_alive_start = iwlagn_init_alive_start,
285 .alive_notify = iwlagn_alive_notify,
286 .send_tx_power = iwlagn_send_tx_power,
287 .update_chain_flags = iwl_update_chain_flags,
288 .set_channel_switch = iwl6000_hw_channel_switch,
289 .apm_ops = {
290 .init = iwl_apm_init,
291 .stop = iwl_apm_stop,
292 .config = iwl6000_nic_config,
293 .set_pwr_src = iwl_set_pwr_src,
294 },
295 .eeprom_ops = {
296 .regulatory_bands = {
297 EEPROM_REG_BAND_1_CHANNELS,
298 EEPROM_REG_BAND_2_CHANNELS,
299 EEPROM_REG_BAND_3_CHANNELS,
300 EEPROM_REG_BAND_4_CHANNELS,
301 EEPROM_REG_BAND_5_CHANNELS,
302 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
303 EEPROM_REG_BAND_52_HT40_CHANNELS
304 },
305 .verify_signature = iwlcore_eeprom_verify_signature,
306 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
307 .release_semaphore = iwlcore_eeprom_release_semaphore,
308 .calib_version = iwlagn_eeprom_calib_version,
309 .query_addr = iwlagn_eeprom_query_addr,
310 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
311 },
312 .post_associate = iwl_post_associate,
313 .isr = iwl_isr_ict,
314 .config_ap = iwl_config_ap,
315 .temp_ops = {
316 .temperature = iwlagn_temperature,
317 .set_ct_kill = iwl6000_set_ct_threshold,
318 .set_calib_version = iwl6000_set_calib_version,
319 },
320 .manage_ibss_station = iwlagn_manage_ibss_station,
321 .update_bcast_station = iwl_update_bcast_station,
322 .debugfs_ops = {
323 .rx_stats_read = iwl_ucode_rx_stats_read,
324 .tx_stats_read = iwl_ucode_tx_stats_read,
325 .general_stats_read = iwl_ucode_general_stats_read,
326 },
327 .recover_from_tx_stall = iwl_bg_monitor_recover,
328 .check_plcp_health = iwl_good_plcp_health,
329 .check_ack_health = iwl_good_ack_health,
330 };
331
332 static const struct iwl_ops iwl6000_ops = {
333 .lib = &iwl6000_lib,
334 .hcmd = &iwlagn_hcmd,
335 .utils = &iwlagn_hcmd_utils,
336 .led = &iwlagn_led_ops,
337 };
338
339 static void do_not_send_bt_config(struct iwl_priv *priv)
340 {
341 }
342
343 static struct iwl_hcmd_ops iwl6000g2b_hcmd = {
344 .rxon_assoc = iwlagn_send_rxon_assoc,
345 .commit_rxon = iwl_commit_rxon,
346 .set_rxon_chain = iwl_set_rxon_chain,
347 .set_tx_ant = iwlagn_send_tx_ant_config,
348 .send_bt_config = do_not_send_bt_config,
349 };
350
351 static const struct iwl_ops iwl6000g2b_ops = {
352 .lib = &iwl6000_lib,
353 .hcmd = &iwl6000g2b_hcmd,
354 .utils = &iwlagn_hcmd_utils,
355 .led = &iwlagn_led_ops,
356 };
357
358 struct iwl_cfg iwl6000g2a_2agn_cfg = {
359 .name = "6000 Series 2x2 AGN Gen2a",
360 .fw_name_pre = IWL6000G2A_FW_PRE,
361 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
362 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
363 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
364 .ops = &iwl6000_ops,
365 .eeprom_size = OTP_LOW_IMAGE_SIZE,
366 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
367 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
368 .num_of_queues = IWLAGN_NUM_QUEUES,
369 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
370 .mod_params = &iwlagn_mod_params,
371 .valid_tx_ant = ANT_AB,
372 .valid_rx_ant = ANT_AB,
373 .pll_cfg_val = 0,
374 .set_l0s = true,
375 .use_bsm = false,
376 .pa_type = IWL_PA_SYSTEM,
377 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
378 .shadow_ram_support = true,
379 .ht_greenfield_support = true,
380 .led_compensation = 51,
381 .use_rts_for_ht = true, /* use rts/cts protection */
382 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
383 .supports_idle = true,
384 .adv_thermal_throttle = true,
385 .support_ct_kill_exit = true,
386 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
387 .chain_noise_scale = 1000,
388 .monitor_recover_period = IWL_MONITORING_PERIOD,
389 .max_event_log_size = 512,
390 .ucode_tracing = true,
391 .sensitivity_calib_by_driver = true,
392 .chain_noise_calib_by_driver = true,
393 .need_dc_calib = true,
394 };
395
396 struct iwl_cfg iwl6000g2a_2abg_cfg = {
397 .name = "6000 Series 2x2 ABG Gen2a",
398 .fw_name_pre = IWL6000G2A_FW_PRE,
399 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
400 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
401 .sku = IWL_SKU_A|IWL_SKU_G,
402 .ops = &iwl6000_ops,
403 .eeprom_size = OTP_LOW_IMAGE_SIZE,
404 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
405 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
406 .num_of_queues = IWLAGN_NUM_QUEUES,
407 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
408 .mod_params = &iwlagn_mod_params,
409 .valid_tx_ant = ANT_AB,
410 .valid_rx_ant = ANT_AB,
411 .pll_cfg_val = 0,
412 .set_l0s = true,
413 .use_bsm = false,
414 .pa_type = IWL_PA_SYSTEM,
415 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
416 .shadow_ram_support = true,
417 .led_compensation = 51,
418 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
419 .supports_idle = true,
420 .adv_thermal_throttle = true,
421 .support_ct_kill_exit = true,
422 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
423 .chain_noise_scale = 1000,
424 .monitor_recover_period = IWL_MONITORING_PERIOD,
425 .max_event_log_size = 512,
426 .need_dc_calib = true,
427 };
428
429 struct iwl_cfg iwl6000g2a_2bg_cfg = {
430 .name = "6000 Series 2x2 BG Gen2a",
431 .fw_name_pre = IWL6000G2A_FW_PRE,
432 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
433 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
434 .sku = IWL_SKU_G,
435 .ops = &iwl6000_ops,
436 .eeprom_size = OTP_LOW_IMAGE_SIZE,
437 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
438 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
439 .num_of_queues = IWLAGN_NUM_QUEUES,
440 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
441 .mod_params = &iwlagn_mod_params,
442 .valid_tx_ant = ANT_AB,
443 .valid_rx_ant = ANT_AB,
444 .pll_cfg_val = 0,
445 .set_l0s = true,
446 .use_bsm = false,
447 .pa_type = IWL_PA_SYSTEM,
448 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
449 .shadow_ram_support = true,
450 .led_compensation = 51,
451 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
452 .supports_idle = true,
453 .adv_thermal_throttle = true,
454 .support_ct_kill_exit = true,
455 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
456 .chain_noise_scale = 1000,
457 .monitor_recover_period = IWL_MONITORING_PERIOD,
458 .max_event_log_size = 512,
459 .need_dc_calib = true,
460 };
461
462 struct iwl_cfg iwl6000g2b_2agn_cfg = {
463 .name = "6000 Series 2x2 AGN Gen2b",
464 .fw_name_pre = IWL6000G2B_FW_PRE,
465 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
466 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
467 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
468 .ops = &iwl6000g2b_ops,
469 .eeprom_size = OTP_LOW_IMAGE_SIZE,
470 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
471 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
472 .num_of_queues = IWLAGN_NUM_QUEUES,
473 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
474 .mod_params = &iwlagn_mod_params,
475 .valid_tx_ant = ANT_AB,
476 .valid_rx_ant = ANT_AB,
477 .pll_cfg_val = 0,
478 .set_l0s = true,
479 .use_bsm = false,
480 .pa_type = IWL_PA_SYSTEM,
481 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
482 .shadow_ram_support = true,
483 .ht_greenfield_support = true,
484 .led_compensation = 51,
485 .use_rts_for_ht = true, /* use rts/cts protection */
486 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
487 .supports_idle = true,
488 .adv_thermal_throttle = true,
489 .support_ct_kill_exit = true,
490 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
491 .chain_noise_scale = 1000,
492 .monitor_recover_period = IWL_MONITORING_PERIOD,
493 .max_event_log_size = 512,
494 .need_dc_calib = true,
495 };
496
497 struct iwl_cfg iwl6000g2b_2abg_cfg = {
498 .name = "6000 Series 2x2 ABG Gen2b",
499 .fw_name_pre = IWL6000G2B_FW_PRE,
500 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
501 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
502 .sku = IWL_SKU_A|IWL_SKU_G,
503 .ops = &iwl6000g2b_ops,
504 .eeprom_size = OTP_LOW_IMAGE_SIZE,
505 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
506 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
507 .num_of_queues = IWLAGN_NUM_QUEUES,
508 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
509 .mod_params = &iwlagn_mod_params,
510 .valid_tx_ant = ANT_AB,
511 .valid_rx_ant = ANT_AB,
512 .pll_cfg_val = 0,
513 .set_l0s = true,
514 .use_bsm = false,
515 .pa_type = IWL_PA_SYSTEM,
516 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
517 .shadow_ram_support = true,
518 .led_compensation = 51,
519 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
520 .supports_idle = true,
521 .adv_thermal_throttle = true,
522 .support_ct_kill_exit = true,
523 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
524 .chain_noise_scale = 1000,
525 .monitor_recover_period = IWL_MONITORING_PERIOD,
526 .max_event_log_size = 512,
527 .need_dc_calib = true,
528 };
529
530 struct iwl_cfg iwl6000g2b_2bgn_cfg = {
531 .name = "6000 Series 2x2 BGN Gen2b",
532 .fw_name_pre = IWL6000G2B_FW_PRE,
533 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
534 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
535 .sku = IWL_SKU_G|IWL_SKU_N,
536 .ops = &iwl6000g2b_ops,
537 .eeprom_size = OTP_LOW_IMAGE_SIZE,
538 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
539 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
540 .num_of_queues = IWLAGN_NUM_QUEUES,
541 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
542 .mod_params = &iwlagn_mod_params,
543 .valid_tx_ant = ANT_AB,
544 .valid_rx_ant = ANT_AB,
545 .pll_cfg_val = 0,
546 .set_l0s = true,
547 .use_bsm = false,
548 .pa_type = IWL_PA_SYSTEM,
549 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
550 .shadow_ram_support = true,
551 .ht_greenfield_support = true,
552 .led_compensation = 51,
553 .use_rts_for_ht = true, /* use rts/cts protection */
554 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
555 .supports_idle = true,
556 .adv_thermal_throttle = true,
557 .support_ct_kill_exit = true,
558 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
559 .chain_noise_scale = 1000,
560 .monitor_recover_period = IWL_MONITORING_PERIOD,
561 .max_event_log_size = 512,
562 .need_dc_calib = true,
563 };
564
565 struct iwl_cfg iwl6000g2b_2bg_cfg = {
566 .name = "6000 Series 2x2 BG Gen2b",
567 .fw_name_pre = IWL6000G2B_FW_PRE,
568 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
569 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
570 .sku = IWL_SKU_G,
571 .ops = &iwl6000g2b_ops,
572 .eeprom_size = OTP_LOW_IMAGE_SIZE,
573 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
574 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
575 .num_of_queues = IWLAGN_NUM_QUEUES,
576 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
577 .mod_params = &iwlagn_mod_params,
578 .valid_tx_ant = ANT_AB,
579 .valid_rx_ant = ANT_AB,
580 .pll_cfg_val = 0,
581 .set_l0s = true,
582 .use_bsm = false,
583 .pa_type = IWL_PA_SYSTEM,
584 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
585 .shadow_ram_support = true,
586 .led_compensation = 51,
587 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
588 .supports_idle = true,
589 .adv_thermal_throttle = true,
590 .support_ct_kill_exit = true,
591 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
592 .chain_noise_scale = 1000,
593 .monitor_recover_period = IWL_MONITORING_PERIOD,
594 .max_event_log_size = 512,
595 .need_dc_calib = true,
596 };
597
598 struct iwl_cfg iwl6000g2b_bgn_cfg = {
599 .name = "6000 Series 1x2 BGN Gen2b",
600 .fw_name_pre = IWL6000G2B_FW_PRE,
601 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
602 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
603 .sku = IWL_SKU_G|IWL_SKU_N,
604 .ops = &iwl6000g2b_ops,
605 .eeprom_size = OTP_LOW_IMAGE_SIZE,
606 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
607 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
608 .num_of_queues = IWLAGN_NUM_QUEUES,
609 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
610 .mod_params = &iwlagn_mod_params,
611 .valid_tx_ant = ANT_A,
612 .valid_rx_ant = ANT_AB,
613 .pll_cfg_val = 0,
614 .set_l0s = true,
615 .use_bsm = false,
616 .pa_type = IWL_PA_SYSTEM,
617 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
618 .shadow_ram_support = true,
619 .ht_greenfield_support = true,
620 .led_compensation = 51,
621 .use_rts_for_ht = true, /* use rts/cts protection */
622 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
623 .supports_idle = true,
624 .adv_thermal_throttle = true,
625 .support_ct_kill_exit = true,
626 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
627 .chain_noise_scale = 1000,
628 .monitor_recover_period = IWL_MONITORING_PERIOD,
629 .max_event_log_size = 512,
630 .need_dc_calib = true,
631 };
632
633 struct iwl_cfg iwl6000g2b_bg_cfg = {
634 .name = "6000 Series 1x2 BG Gen2b",
635 .fw_name_pre = IWL6000G2B_FW_PRE,
636 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
637 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
638 .sku = IWL_SKU_G,
639 .ops = &iwl6000g2b_ops,
640 .eeprom_size = OTP_LOW_IMAGE_SIZE,
641 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
642 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
643 .num_of_queues = IWLAGN_NUM_QUEUES,
644 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
645 .mod_params = &iwlagn_mod_params,
646 .valid_tx_ant = ANT_A,
647 .valid_rx_ant = ANT_AB,
648 .pll_cfg_val = 0,
649 .set_l0s = true,
650 .use_bsm = false,
651 .pa_type = IWL_PA_SYSTEM,
652 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
653 .shadow_ram_support = true,
654 .led_compensation = 51,
655 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
656 .supports_idle = true,
657 .adv_thermal_throttle = true,
658 .support_ct_kill_exit = true,
659 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
660 .chain_noise_scale = 1000,
661 .monitor_recover_period = IWL_MONITORING_PERIOD,
662 .max_event_log_size = 512,
663 .need_dc_calib = true,
664 };
665
666 /*
667 * "i": Internal configuration, use internal Power Amplifier
668 */
669 struct iwl_cfg iwl6000i_2agn_cfg = {
670 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
671 .fw_name_pre = IWL6000_FW_PRE,
672 .ucode_api_max = IWL6000_UCODE_API_MAX,
673 .ucode_api_min = IWL6000_UCODE_API_MIN,
674 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
675 .ops = &iwl6000_ops,
676 .eeprom_size = OTP_LOW_IMAGE_SIZE,
677 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
678 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
679 .num_of_queues = IWLAGN_NUM_QUEUES,
680 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
681 .mod_params = &iwlagn_mod_params,
682 .valid_tx_ant = ANT_BC,
683 .valid_rx_ant = ANT_BC,
684 .pll_cfg_val = 0,
685 .set_l0s = true,
686 .use_bsm = false,
687 .pa_type = IWL_PA_INTERNAL,
688 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
689 .shadow_ram_support = true,
690 .ht_greenfield_support = true,
691 .led_compensation = 51,
692 .use_rts_for_ht = true, /* use rts/cts protection */
693 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
694 .supports_idle = true,
695 .adv_thermal_throttle = true,
696 .support_ct_kill_exit = true,
697 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
698 .chain_noise_scale = 1000,
699 .monitor_recover_period = IWL_MONITORING_PERIOD,
700 .max_event_log_size = 1024,
701 .ucode_tracing = true,
702 .sensitivity_calib_by_driver = true,
703 .chain_noise_calib_by_driver = true,
704 };
705
706 struct iwl_cfg iwl6000i_2abg_cfg = {
707 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
708 .fw_name_pre = IWL6000_FW_PRE,
709 .ucode_api_max = IWL6000_UCODE_API_MAX,
710 .ucode_api_min = IWL6000_UCODE_API_MIN,
711 .sku = IWL_SKU_A|IWL_SKU_G,
712 .ops = &iwl6000_ops,
713 .eeprom_size = OTP_LOW_IMAGE_SIZE,
714 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
715 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
716 .num_of_queues = IWLAGN_NUM_QUEUES,
717 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
718 .mod_params = &iwlagn_mod_params,
719 .valid_tx_ant = ANT_BC,
720 .valid_rx_ant = ANT_BC,
721 .pll_cfg_val = 0,
722 .set_l0s = true,
723 .use_bsm = false,
724 .pa_type = IWL_PA_INTERNAL,
725 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
726 .shadow_ram_support = true,
727 .led_compensation = 51,
728 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
729 .supports_idle = true,
730 .adv_thermal_throttle = true,
731 .support_ct_kill_exit = true,
732 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
733 .chain_noise_scale = 1000,
734 .monitor_recover_period = IWL_MONITORING_PERIOD,
735 .max_event_log_size = 1024,
736 .ucode_tracing = true,
737 .sensitivity_calib_by_driver = true,
738 .chain_noise_calib_by_driver = true,
739 };
740
741 struct iwl_cfg iwl6000i_2bg_cfg = {
742 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
743 .fw_name_pre = IWL6000_FW_PRE,
744 .ucode_api_max = IWL6000_UCODE_API_MAX,
745 .ucode_api_min = IWL6000_UCODE_API_MIN,
746 .sku = IWL_SKU_G,
747 .ops = &iwl6000_ops,
748 .eeprom_size = OTP_LOW_IMAGE_SIZE,
749 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
750 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
751 .num_of_queues = IWLAGN_NUM_QUEUES,
752 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
753 .mod_params = &iwlagn_mod_params,
754 .valid_tx_ant = ANT_BC,
755 .valid_rx_ant = ANT_BC,
756 .pll_cfg_val = 0,
757 .set_l0s = true,
758 .use_bsm = false,
759 .pa_type = IWL_PA_INTERNAL,
760 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
761 .shadow_ram_support = true,
762 .led_compensation = 51,
763 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
764 .supports_idle = true,
765 .adv_thermal_throttle = true,
766 .support_ct_kill_exit = true,
767 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
768 .chain_noise_scale = 1000,
769 .monitor_recover_period = IWL_MONITORING_PERIOD,
770 .max_event_log_size = 1024,
771 .ucode_tracing = true,
772 .sensitivity_calib_by_driver = true,
773 .chain_noise_calib_by_driver = true,
774 };
775
776 struct iwl_cfg iwl6050_2agn_cfg = {
777 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
778 .fw_name_pre = IWL6050_FW_PRE,
779 .ucode_api_max = IWL6050_UCODE_API_MAX,
780 .ucode_api_min = IWL6050_UCODE_API_MIN,
781 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
782 .ops = &iwl6000_ops,
783 .eeprom_size = OTP_LOW_IMAGE_SIZE,
784 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
785 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
786 .num_of_queues = IWLAGN_NUM_QUEUES,
787 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
788 .mod_params = &iwlagn_mod_params,
789 .valid_tx_ant = ANT_AB,
790 .valid_rx_ant = ANT_AB,
791 .pll_cfg_val = 0,
792 .set_l0s = true,
793 .use_bsm = false,
794 .pa_type = IWL_PA_SYSTEM,
795 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
796 .shadow_ram_support = true,
797 .ht_greenfield_support = true,
798 .led_compensation = 51,
799 .use_rts_for_ht = true, /* use rts/cts protection */
800 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
801 .supports_idle = true,
802 .adv_thermal_throttle = true,
803 .support_ct_kill_exit = true,
804 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
805 .chain_noise_scale = 1500,
806 .monitor_recover_period = IWL_MONITORING_PERIOD,
807 .max_event_log_size = 1024,
808 .ucode_tracing = true,
809 .sensitivity_calib_by_driver = true,
810 .chain_noise_calib_by_driver = true,
811 .need_dc_calib = true,
812 };
813
814 struct iwl_cfg iwl6050_2abg_cfg = {
815 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
816 .fw_name_pre = IWL6050_FW_PRE,
817 .ucode_api_max = IWL6050_UCODE_API_MAX,
818 .ucode_api_min = IWL6050_UCODE_API_MIN,
819 .sku = IWL_SKU_A|IWL_SKU_G,
820 .ops = &iwl6000_ops,
821 .eeprom_size = OTP_LOW_IMAGE_SIZE,
822 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
823 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
824 .num_of_queues = IWLAGN_NUM_QUEUES,
825 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
826 .mod_params = &iwlagn_mod_params,
827 .valid_tx_ant = ANT_AB,
828 .valid_rx_ant = ANT_AB,
829 .pll_cfg_val = 0,
830 .set_l0s = true,
831 .use_bsm = false,
832 .pa_type = IWL_PA_SYSTEM,
833 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
834 .shadow_ram_support = true,
835 .led_compensation = 51,
836 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
837 .supports_idle = true,
838 .adv_thermal_throttle = true,
839 .support_ct_kill_exit = true,
840 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
841 .chain_noise_scale = 1500,
842 .monitor_recover_period = IWL_MONITORING_PERIOD,
843 .max_event_log_size = 1024,
844 .ucode_tracing = true,
845 .sensitivity_calib_by_driver = true,
846 .chain_noise_calib_by_driver = true,
847 .need_dc_calib = true,
848 };
849
850 struct iwl_cfg iwl6000_3agn_cfg = {
851 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
852 .fw_name_pre = IWL6000_FW_PRE,
853 .ucode_api_max = IWL6000_UCODE_API_MAX,
854 .ucode_api_min = IWL6000_UCODE_API_MIN,
855 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
856 .ops = &iwl6000_ops,
857 .eeprom_size = OTP_LOW_IMAGE_SIZE,
858 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
859 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
860 .num_of_queues = IWLAGN_NUM_QUEUES,
861 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
862 .mod_params = &iwlagn_mod_params,
863 .valid_tx_ant = ANT_ABC,
864 .valid_rx_ant = ANT_ABC,
865 .pll_cfg_val = 0,
866 .set_l0s = true,
867 .use_bsm = false,
868 .pa_type = IWL_PA_SYSTEM,
869 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
870 .shadow_ram_support = true,
871 .ht_greenfield_support = true,
872 .led_compensation = 51,
873 .use_rts_for_ht = true, /* use rts/cts protection */
874 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
875 .supports_idle = true,
876 .adv_thermal_throttle = true,
877 .support_ct_kill_exit = true,
878 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
879 .chain_noise_scale = 1000,
880 .monitor_recover_period = IWL_MONITORING_PERIOD,
881 .max_event_log_size = 1024,
882 .ucode_tracing = true,
883 .sensitivity_calib_by_driver = true,
884 .chain_noise_calib_by_driver = true,
885 };
886
887 MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
888 MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
889 MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
890 MODULE_FIRMWARE(IWL6000G2B_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
This page took 0.05899 seconds and 6 git commands to generate.