blob: a4e58d85f8896da6b73cfad4c0515866926167ad [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
Shanyu Zhao4b3e8062010-04-07 18:06:36 -070055#define IWL6000G2_UCODE_API_MAX 4
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
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700125static 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,
Wey-Yi Guy2494f632010-01-20 12:22:52 -0800135 .auto_corr_max_ofdm_x1 = 110,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700136 .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,
Wey-Yi Guy55036d62009-10-09 13:20:24 -0700144
145 .barker_corr_th_min = 190,
146 .barker_corr_th_min_mrc = 390,
147 .nrg_th_cca = 62,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700148};
149
150static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
151{
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700152 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700153 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700154 priv->cfg->num_of_queues =
155 priv->cfg->mod_params->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700156
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700157 priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700158 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
159 priv->hw_params.scd_bc_tbls_size =
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700160 priv->cfg->num_of_queues *
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700161 sizeof(struct iwlagn_scd_bc_tbl);
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700162 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
Wey-Yi Guybf3c7fd2010-06-24 14:08:05 -0700163 priv->hw_params.max_stations = IWLAGN_STATION_COUNT;
164 priv->hw_params.bcast_sta_id = IWLAGN_BROADCAST_ID;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700165
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;
Wey-Yi Guye517736a2010-04-19 18:49:40 -0700185 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);
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700190 if (priv->cfg->need_dc_calib)
191 priv->hw_params.calib_init_cfg |= BIT(IWL_CALIB_DC);
Abhijeet Kolekar07f33f92010-01-22 14:22:47 -0800192
Wey-Yi Guya0ee74c2010-05-06 08:54:10 -0700193 priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
194
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700195 return 0;
196}
197
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700198static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
199 struct ieee80211_channel_switch *ch_switch)
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700200{
201 struct iwl6000_channel_switch_cmd cmd;
202 const struct iwl_channel_info *ch_info;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700203 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;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700209 struct iwl_host_cmd hcmd = {
210 .id = REPLY_CHANNEL_SWITCH,
211 .len = sizeof(cmd),
Wey-Yi Guy3839f7c2010-05-18 09:18:06 -0700212 .flags = CMD_SYNC,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700213 .data = &cmd,
214 };
215
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700216 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700217 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);
Wey-Yi Guy0924e5192009-11-06 14:52:54 -0800221 cmd.rxon_flags = priv->staging_rxon.flags;
222 cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700223 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);
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700253 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",
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700257 priv->active_rxon.channel, ch);
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700258 return -EFAULT;
259 }
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700260 priv->switch_rxon.channel = cmd.channel;
Wey-Yi Guy0924e5192009-11-06 14:52:54 -0800261 priv->switch_rxon.switch_in_progress = true;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700262
263 return iwl_send_cmd_sync(priv, &hcmd);
264}
265
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700266static struct iwl_lib_ops iwl6000_lib = {
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700267 .set_hw_params = iwl6000_hw_set_hw_params,
Wey-Yi Guyb305a082010-03-16 17:41:22 -0700268 .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,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700273 .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,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700276 .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,
Wey-Yi Guy81b81762010-03-16 10:23:30 -0700279 .load_ucode = iwlagn_load_ucode,
Reinette Chatreb7a79402009-09-25 14:24:23 -0700280 .dump_nic_event_log = iwl_dump_nic_event_log,
281 .dump_nic_error_log = iwl_dump_nic_error_log,
Wey-Yi Guy696bdee2009-12-10 14:37:25 -0800282 .dump_csr = iwl_dump_csr,
Wey-Yi Guy1b3eb822010-01-15 13:43:39 -0800283 .dump_fh = iwl_dump_fh,
Wey-Yi Guy741a6262010-03-16 12:37:24 -0700284 .init_alive_start = iwlagn_init_alive_start,
285 .alive_notify = iwlagn_alive_notify,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700286 .send_tx_power = iwlagn_send_tx_power,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700287 .update_chain_flags = iwl_update_chain_flags,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700288 .set_channel_switch = iwl6000_hw_channel_switch,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700289 .apm_ops = {
Ben Cahillfadb3582009-10-23 13:42:21 -0700290 .init = iwl_apm_init,
Abhijeet Kolekard68b6032009-10-02 13:44:04 -0700291 .stop = iwl_apm_stop,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700292 .config = iwl6000_nic_config,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700293 .set_pwr_src = iwl_set_pwr_src,
294 },
295 .eeprom_ops = {
296 .regulatory_bands = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700297 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,
Shanyu Zhaof2fa1b02010-04-07 18:37:52 -0700302 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700303 EEPROM_REG_BAND_52_HT40_CHANNELS
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700304 },
305 .verify_signature = iwlcore_eeprom_verify_signature,
306 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
307 .release_semaphore = iwlcore_eeprom_release_semaphore,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700308 .calib_version = iwlagn_eeprom_calib_version,
309 .query_addr = iwlagn_eeprom_query_addr,
Wey-Yi Guyab9fd1b2009-08-21 13:34:23 -0700310 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700311 },
312 .post_associate = iwl_post_associate,
313 .isr = iwl_isr_ict,
314 .config_ap = iwl_config_ap,
315 .temp_ops = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700316 .temperature = iwlagn_temperature,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700317 .set_ct_kill = iwl6000_set_ct_threshold,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700318 .set_calib_version = iwl6000_set_calib_version,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700319 },
Johannes Berg1fa61b22010-04-28 08:44:52 -0700320 .manage_ibss_station = iwlagn_manage_ibss_station,
Daniel Halperin278c2f62010-06-14 13:10:29 -0700321 .update_bcast_station = iwl_update_bcast_station,
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -0700322 .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 },
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800327 .recover_from_tx_stall = iwl_bg_monitor_recover,
Wey-Yi Guyfa8f1302010-03-05 14:22:46 -0800328 .check_plcp_health = iwl_good_plcp_health,
329 .check_ack_health = iwl_good_ack_health,
Wey-Yi Guy716c74b2010-06-24 13:22:36 -0700330 .txfifo_flush = iwlagn_txfifo_flush,
Wey-Yi Guy65550632010-06-24 13:18:35 -0700331 .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700332};
333
Emese Revfy45d5d802009-12-14 00:59:53 +0100334static const struct iwl_ops iwl6000_ops = {
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700335 .lib = &iwl6000_lib,
Wey-Yi Guy7dc77db2010-03-16 10:23:31 -0700336 .hcmd = &iwlagn_hcmd,
337 .utils = &iwlagn_hcmd_utils,
Johannes Berge932a602009-10-02 13:44:03 -0700338 .led = &iwlagn_led_ops,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800339};
340
Shanyu Zhao18089722010-05-06 10:15:21 -0700341static void do_not_send_bt_config(struct iwl_priv *priv)
342{
343}
344
345static struct iwl_hcmd_ops iwl6000g2b_hcmd = {
346 .rxon_assoc = iwlagn_send_rxon_assoc,
347 .commit_rxon = iwl_commit_rxon,
348 .set_rxon_chain = iwl_set_rxon_chain,
349 .set_tx_ant = iwlagn_send_tx_ant_config,
350 .send_bt_config = do_not_send_bt_config,
351};
352
353static const struct iwl_ops iwl6000g2b_ops = {
354 .lib = &iwl6000_lib,
355 .hcmd = &iwl6000g2b_hcmd,
356 .utils = &iwlagn_hcmd_utils,
357 .led = &iwlagn_led_ops,
358};
359
Shanyu Zhao95b13012010-04-21 11:46:33 -0700360struct iwl_cfg iwl6000g2a_2agn_cfg = {
361 .name = "6000 Series 2x2 AGN Gen2a",
362 .fw_name_pre = IWL6000G2A_FW_PRE,
Shanyu Zhao4b3e8062010-04-07 18:06:36 -0700363 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
364 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700365 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
366 .ops = &iwl6000_ops,
367 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Shanyu Zhao4b3e8062010-04-07 18:06:36 -0700368 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
369 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700370 .num_of_queues = IWLAGN_NUM_QUEUES,
371 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
372 .mod_params = &iwlagn_mod_params,
373 .valid_tx_ant = ANT_AB,
374 .valid_rx_ant = ANT_AB,
375 .pll_cfg_val = 0,
376 .set_l0s = true,
377 .use_bsm = false,
Wey-Yi Guy33e6f812010-04-09 09:36:11 -0700378 .pa_type = IWL_PA_SYSTEM,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700379 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
380 .shadow_ram_support = true,
381 .ht_greenfield_support = true,
382 .led_compensation = 51,
383 .use_rts_for_ht = true, /* use rts/cts protection */
384 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
385 .supports_idle = true,
386 .adv_thermal_throttle = true,
387 .support_ct_kill_exit = true,
388 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
389 .chain_noise_scale = 1000,
390 .monitor_recover_period = IWL_MONITORING_PERIOD,
Shanyu Zhao95b13012010-04-21 11:46:33 -0700391 .max_event_log_size = 512,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700392 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700393 .sensitivity_calib_by_driver = true,
394 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700395 .need_dc_calib = true,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700396};
397
Shanyu Zhao18089722010-05-06 10:15:21 -0700398struct iwl_cfg iwl6000g2a_2abg_cfg = {
399 .name = "6000 Series 2x2 ABG Gen2a",
400 .fw_name_pre = IWL6000G2A_FW_PRE,
401 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
402 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
403 .sku = IWL_SKU_A|IWL_SKU_G,
404 .ops = &iwl6000_ops,
405 .eeprom_size = OTP_LOW_IMAGE_SIZE,
406 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
407 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
408 .num_of_queues = IWLAGN_NUM_QUEUES,
409 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
410 .mod_params = &iwlagn_mod_params,
411 .valid_tx_ant = ANT_AB,
412 .valid_rx_ant = ANT_AB,
413 .pll_cfg_val = 0,
414 .set_l0s = true,
415 .use_bsm = false,
416 .pa_type = IWL_PA_SYSTEM,
417 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
418 .shadow_ram_support = true,
419 .led_compensation = 51,
420 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
421 .supports_idle = true,
422 .adv_thermal_throttle = true,
423 .support_ct_kill_exit = true,
424 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
425 .chain_noise_scale = 1000,
426 .monitor_recover_period = IWL_MONITORING_PERIOD,
427 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700428 .sensitivity_calib_by_driver = true,
429 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700430 .need_dc_calib = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700431};
432
433struct iwl_cfg iwl6000g2a_2bg_cfg = {
434 .name = "6000 Series 2x2 BG Gen2a",
435 .fw_name_pre = IWL6000G2A_FW_PRE,
436 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
437 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
438 .sku = IWL_SKU_G,
439 .ops = &iwl6000_ops,
440 .eeprom_size = OTP_LOW_IMAGE_SIZE,
441 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
442 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
443 .num_of_queues = IWLAGN_NUM_QUEUES,
444 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
445 .mod_params = &iwlagn_mod_params,
446 .valid_tx_ant = ANT_AB,
447 .valid_rx_ant = ANT_AB,
448 .pll_cfg_val = 0,
449 .set_l0s = true,
450 .use_bsm = false,
451 .pa_type = IWL_PA_SYSTEM,
452 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
453 .shadow_ram_support = true,
454 .led_compensation = 51,
455 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
456 .supports_idle = true,
457 .adv_thermal_throttle = true,
458 .support_ct_kill_exit = true,
459 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
460 .chain_noise_scale = 1000,
461 .monitor_recover_period = IWL_MONITORING_PERIOD,
462 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700463 .sensitivity_calib_by_driver = true,
464 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700465 .need_dc_calib = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700466};
467
468struct iwl_cfg iwl6000g2b_2agn_cfg = {
469 .name = "6000 Series 2x2 AGN Gen2b",
470 .fw_name_pre = IWL6000G2B_FW_PRE,
471 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
472 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
473 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
474 .ops = &iwl6000g2b_ops,
475 .eeprom_size = OTP_LOW_IMAGE_SIZE,
476 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
477 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
478 .num_of_queues = IWLAGN_NUM_QUEUES,
479 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
480 .mod_params = &iwlagn_mod_params,
481 .valid_tx_ant = ANT_AB,
482 .valid_rx_ant = ANT_AB,
483 .pll_cfg_val = 0,
484 .set_l0s = true,
485 .use_bsm = false,
486 .pa_type = IWL_PA_SYSTEM,
487 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
488 .shadow_ram_support = true,
489 .ht_greenfield_support = true,
490 .led_compensation = 51,
491 .use_rts_for_ht = true, /* use rts/cts protection */
492 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
493 .supports_idle = true,
494 .adv_thermal_throttle = true,
495 .support_ct_kill_exit = true,
496 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
497 .chain_noise_scale = 1000,
498 .monitor_recover_period = IWL_MONITORING_PERIOD,
499 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700500 .sensitivity_calib_by_driver = true,
501 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700502 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -0700503 .bt_statistics = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700504};
505
506struct iwl_cfg iwl6000g2b_2abg_cfg = {
507 .name = "6000 Series 2x2 ABG Gen2b",
508 .fw_name_pre = IWL6000G2B_FW_PRE,
509 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
510 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
511 .sku = IWL_SKU_A|IWL_SKU_G,
512 .ops = &iwl6000g2b_ops,
513 .eeprom_size = OTP_LOW_IMAGE_SIZE,
514 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
515 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
516 .num_of_queues = IWLAGN_NUM_QUEUES,
517 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
518 .mod_params = &iwlagn_mod_params,
519 .valid_tx_ant = ANT_AB,
520 .valid_rx_ant = ANT_AB,
521 .pll_cfg_val = 0,
522 .set_l0s = true,
523 .use_bsm = false,
524 .pa_type = IWL_PA_SYSTEM,
525 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
526 .shadow_ram_support = true,
527 .led_compensation = 51,
528 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
529 .supports_idle = true,
530 .adv_thermal_throttle = true,
531 .support_ct_kill_exit = true,
532 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
533 .chain_noise_scale = 1000,
534 .monitor_recover_period = IWL_MONITORING_PERIOD,
535 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700536 .sensitivity_calib_by_driver = true,
537 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700538 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -0700539 .bt_statistics = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700540};
541
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700542struct iwl_cfg iwl6000g2b_2bgn_cfg = {
543 .name = "6000 Series 2x2 BGN Gen2b",
544 .fw_name_pre = IWL6000G2B_FW_PRE,
545 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
546 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
547 .sku = IWL_SKU_G|IWL_SKU_N,
548 .ops = &iwl6000g2b_ops,
549 .eeprom_size = OTP_LOW_IMAGE_SIZE,
550 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
551 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
552 .num_of_queues = IWLAGN_NUM_QUEUES,
553 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
554 .mod_params = &iwlagn_mod_params,
555 .valid_tx_ant = ANT_AB,
556 .valid_rx_ant = ANT_AB,
557 .pll_cfg_val = 0,
558 .set_l0s = true,
559 .use_bsm = false,
560 .pa_type = IWL_PA_SYSTEM,
561 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
562 .shadow_ram_support = true,
563 .ht_greenfield_support = true,
564 .led_compensation = 51,
565 .use_rts_for_ht = true, /* use rts/cts protection */
566 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
567 .supports_idle = true,
568 .adv_thermal_throttle = true,
569 .support_ct_kill_exit = true,
570 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
571 .chain_noise_scale = 1000,
572 .monitor_recover_period = IWL_MONITORING_PERIOD,
573 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700574 .sensitivity_calib_by_driver = true,
575 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700576 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -0700577 .bt_statistics = true,
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700578};
579
Shanyu Zhao18089722010-05-06 10:15:21 -0700580struct iwl_cfg iwl6000g2b_2bg_cfg = {
581 .name = "6000 Series 2x2 BG Gen2b",
582 .fw_name_pre = IWL6000G2B_FW_PRE,
583 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
584 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
585 .sku = IWL_SKU_G,
586 .ops = &iwl6000g2b_ops,
587 .eeprom_size = OTP_LOW_IMAGE_SIZE,
588 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
589 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
590 .num_of_queues = IWLAGN_NUM_QUEUES,
591 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
592 .mod_params = &iwlagn_mod_params,
593 .valid_tx_ant = ANT_AB,
594 .valid_rx_ant = ANT_AB,
595 .pll_cfg_val = 0,
596 .set_l0s = true,
597 .use_bsm = false,
598 .pa_type = IWL_PA_SYSTEM,
599 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
600 .shadow_ram_support = true,
601 .led_compensation = 51,
602 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
603 .supports_idle = true,
604 .adv_thermal_throttle = true,
605 .support_ct_kill_exit = true,
606 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
607 .chain_noise_scale = 1000,
608 .monitor_recover_period = IWL_MONITORING_PERIOD,
609 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700610 .sensitivity_calib_by_driver = true,
611 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700612 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -0700613 .bt_statistics = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700614};
615
616struct iwl_cfg iwl6000g2b_bgn_cfg = {
617 .name = "6000 Series 1x2 BGN Gen2b",
618 .fw_name_pre = IWL6000G2B_FW_PRE,
619 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
620 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
621 .sku = IWL_SKU_G|IWL_SKU_N,
622 .ops = &iwl6000g2b_ops,
623 .eeprom_size = OTP_LOW_IMAGE_SIZE,
624 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
625 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
626 .num_of_queues = IWLAGN_NUM_QUEUES,
627 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
628 .mod_params = &iwlagn_mod_params,
629 .valid_tx_ant = ANT_A,
630 .valid_rx_ant = ANT_AB,
631 .pll_cfg_val = 0,
632 .set_l0s = true,
633 .use_bsm = false,
634 .pa_type = IWL_PA_SYSTEM,
635 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
636 .shadow_ram_support = true,
637 .ht_greenfield_support = true,
638 .led_compensation = 51,
639 .use_rts_for_ht = true, /* use rts/cts protection */
640 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
641 .supports_idle = true,
642 .adv_thermal_throttle = true,
643 .support_ct_kill_exit = true,
644 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
645 .chain_noise_scale = 1000,
646 .monitor_recover_period = IWL_MONITORING_PERIOD,
647 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700648 .sensitivity_calib_by_driver = true,
649 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700650 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -0700651 .bt_statistics = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700652};
653
654struct iwl_cfg iwl6000g2b_bg_cfg = {
655 .name = "6000 Series 1x2 BG Gen2b",
656 .fw_name_pre = IWL6000G2B_FW_PRE,
657 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
658 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
659 .sku = IWL_SKU_G,
660 .ops = &iwl6000g2b_ops,
661 .eeprom_size = OTP_LOW_IMAGE_SIZE,
662 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
663 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
664 .num_of_queues = IWLAGN_NUM_QUEUES,
665 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
666 .mod_params = &iwlagn_mod_params,
667 .valid_tx_ant = ANT_A,
668 .valid_rx_ant = ANT_AB,
669 .pll_cfg_val = 0,
670 .set_l0s = true,
671 .use_bsm = false,
672 .pa_type = IWL_PA_SYSTEM,
673 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
674 .shadow_ram_support = true,
675 .led_compensation = 51,
676 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
677 .supports_idle = true,
678 .adv_thermal_throttle = true,
679 .support_ct_kill_exit = true,
680 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
681 .chain_noise_scale = 1000,
682 .monitor_recover_period = IWL_MONITORING_PERIOD,
683 .max_event_log_size = 512,
Wey-Yi Guy679db792010-06-21 12:15:17 -0700684 .sensitivity_calib_by_driver = true,
685 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700686 .need_dc_calib = true,
Wey-Yi Guyaf8ee052010-07-14 08:08:05 -0700687 .bt_statistics = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700688};
689
Shanyu Zhao95b13012010-04-21 11:46:33 -0700690/*
691 * "i": Internal configuration, use internal Power Amplifier
692 */
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700693struct iwl_cfg iwl6000i_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800694 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700695 .fw_name_pre = IWL6000_FW_PRE,
696 .ucode_api_max = IWL6000_UCODE_API_MAX,
697 .ucode_api_min = IWL6000_UCODE_API_MIN,
698 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
699 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700700 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700701 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700702 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700703 .num_of_queues = IWLAGN_NUM_QUEUES,
704 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700705 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700706 .valid_tx_ant = ANT_BC,
707 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700708 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700709 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700710 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700711 .pa_type = IWL_PA_INTERNAL,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700712 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
713 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700714 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700715 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700716 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700717 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700718 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700719 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700720 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800721 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800722 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800723 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700724 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700725 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700726 .sensitivity_calib_by_driver = true,
727 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800728};
729
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700730struct iwl_cfg iwl6000i_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800731 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700732 .fw_name_pre = IWL6000_FW_PRE,
733 .ucode_api_max = IWL6000_UCODE_API_MAX,
734 .ucode_api_min = IWL6000_UCODE_API_MIN,
735 .sku = IWL_SKU_A|IWL_SKU_G,
736 .ops = &iwl6000_ops,
737 .eeprom_size = OTP_LOW_IMAGE_SIZE,
738 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700739 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700740 .num_of_queues = IWLAGN_NUM_QUEUES,
741 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700742 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700743 .valid_tx_ant = ANT_BC,
744 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700745 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700746 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700747 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700748 .pa_type = IWL_PA_INTERNAL,
749 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
750 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700751 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700752 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700753 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700754 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700755 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800756 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800757 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800758 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700759 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700760 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700761 .sensitivity_calib_by_driver = true,
762 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700763};
764
765struct iwl_cfg iwl6000i_2bg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800766 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700767 .fw_name_pre = IWL6000_FW_PRE,
768 .ucode_api_max = IWL6000_UCODE_API_MAX,
769 .ucode_api_min = IWL6000_UCODE_API_MIN,
770 .sku = IWL_SKU_G,
771 .ops = &iwl6000_ops,
772 .eeprom_size = OTP_LOW_IMAGE_SIZE,
773 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700774 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700775 .num_of_queues = IWLAGN_NUM_QUEUES,
776 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700777 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700778 .valid_tx_ant = ANT_BC,
779 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700780 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700781 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700782 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700783 .pa_type = IWL_PA_INTERNAL,
784 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
785 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700786 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700787 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700788 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700789 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700790 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800791 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800792 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800793 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700794 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700795 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700796 .sensitivity_calib_by_driver = true,
797 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700798};
799
Jay Sternberge1228372009-01-19 15:30:34 -0800800struct iwl_cfg iwl6050_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800801 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800802 .fw_name_pre = IWL6050_FW_PRE,
803 .ucode_api_max = IWL6050_UCODE_API_MAX,
804 .ucode_api_min = IWL6050_UCODE_API_MIN,
805 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700806 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700807 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700808 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700809 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700810 .num_of_queues = IWLAGN_NUM_QUEUES,
811 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700812 .mod_params = &iwlagn_mod_params,
Jay Sternberg542cc792009-05-08 13:44:46 -0700813 .valid_tx_ant = ANT_AB,
814 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700815 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700816 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700817 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700818 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700819 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700820 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700821 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700822 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700823 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700824 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700825 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700826 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700827 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800828 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800829 .chain_noise_scale = 1500,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800830 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700831 .max_event_log_size = 1024,
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 Sternberge1228372009-01-19 15:30:34 -0800836};
837
Shanyu Zhao03264332010-06-29 17:27:27 -0700838struct iwl_cfg iwl6050g2_bgn_cfg = {
839 .name = "6050 Series 1x2 BGN Gen2",
840 .fw_name_pre = IWL6050_FW_PRE,
841 .ucode_api_max = IWL6050_UCODE_API_MAX,
842 .ucode_api_min = IWL6050_UCODE_API_MIN,
843 .sku = IWL_SKU_G|IWL_SKU_N,
844 .ops = &iwl6000_ops,
845 .eeprom_size = OTP_LOW_IMAGE_SIZE,
846 .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION,
847 .eeprom_calib_ver = EEPROM_6050G2_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_A,
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_6x50,
858 .shadow_ram_support = true,
859 .ht_greenfield_support = true,
860 .led_compensation = 51,
861 .use_rts_for_ht = true, /* use rts/cts protection */
862 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
863 .supports_idle = true,
864 .adv_thermal_throttle = true,
865 .support_ct_kill_exit = true,
866 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
867 .chain_noise_scale = 1500,
868 .monitor_recover_period = IWL_MONITORING_PERIOD,
869 .max_event_log_size = 1024,
870 .ucode_tracing = true,
871 .sensitivity_calib_by_driver = true,
872 .chain_noise_calib_by_driver = true,
873 .need_dc_calib = true,
874};
875
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700876struct iwl_cfg iwl6050_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800877 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700878 .fw_name_pre = IWL6050_FW_PRE,
879 .ucode_api_max = IWL6050_UCODE_API_MAX,
880 .ucode_api_min = IWL6050_UCODE_API_MIN,
881 .sku = IWL_SKU_A|IWL_SKU_G,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700882 .ops = &iwl6000_ops,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700883 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700884 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700885 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700886 .num_of_queues = IWLAGN_NUM_QUEUES,
887 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700888 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700889 .valid_tx_ant = ANT_AB,
890 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700891 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700892 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700893 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700894 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700895 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700896 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700897 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700898 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700899 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700900 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700901 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800902 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800903 .chain_noise_scale = 1500,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800904 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700905 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700906 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700907 .sensitivity_calib_by_driver = true,
908 .chain_noise_calib_by_driver = true,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700909 .need_dc_calib = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700910};
911
Jay Sternberge1228372009-01-19 15:30:34 -0800912struct iwl_cfg iwl6000_3agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800913 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800914 .fw_name_pre = IWL6000_FW_PRE,
915 .ucode_api_max = IWL6000_UCODE_API_MAX,
916 .ucode_api_min = IWL6000_UCODE_API_MIN,
917 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800918 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700919 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700920 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700921 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700922 .num_of_queues = IWLAGN_NUM_QUEUES,
923 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700924 .mod_params = &iwlagn_mod_params,
Jay Sternbergc0bac762009-02-02 16:21:14 -0800925 .valid_tx_ant = ANT_ABC,
926 .valid_rx_ant = ANT_ABC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700927 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700928 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700929 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700930 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700931 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
932 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700933 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700934 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700935 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700936 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700937 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700938 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700939 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800940 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800941 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800942 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700943 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700944 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700945 .sensitivity_calib_by_driver = true,
946 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800947};
948
Jay Sternberge1228372009-01-19 15:30:34 -0800949MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
950MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
Shanyu Zhao95b13012010-04-21 11:46:33 -0700951MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
Shanyu Zhao18089722010-05-06 10:15:21 -0700952MODULE_FIRMWARE(IWL6000G2B_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));