blob: 5f0f586931045259d7d0e735651c598a3db8748a [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 Zhao4b3e8062010-04-07 18:06:36 -070074
Wey-Yi Guy672639d2009-07-24 11:13:01 -070075static void iwl6000_set_ct_threshold(struct iwl_priv *priv)
76{
77 /* want Celsius */
78 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD;
79 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
80}
81
Abhijeet Kolekard5755932010-02-18 22:03:05 -080082/* Indicate calibration version to uCode. */
83static void iwl6050_set_calib_version(struct iwl_priv *priv)
84{
85 if (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6)
86 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
87 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
88}
89
Wey-Yi Guy65b79982009-07-31 14:28:07 -070090/* NIC configuration for 6000 series */
91static void iwl6000_nic_config(struct iwl_priv *priv)
92{
Wey-Yi Guy9371d4e2009-09-11 10:38:10 -070093 u16 radio_cfg;
94
95 radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG);
96
97 /* write radio config values to register */
98 if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) <= EEPROM_RF_CONFIG_TYPE_MAX)
99 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
100 EEPROM_RF_CFG_TYPE_MSK(radio_cfg) |
101 EEPROM_RF_CFG_STEP_MSK(radio_cfg) |
102 EEPROM_RF_CFG_DASH_MSK(radio_cfg));
103
104 /* set CSR_HW_CONFIG_REG for uCode use */
105 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
106 CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI |
107 CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700108
109 /* no locking required for register write */
Wey-Yi Guy740e7f52009-11-06 14:52:55 -0800110 if (priv->cfg->pa_type == IWL_PA_INTERNAL) {
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700111 /* 2x2 IPA phy type */
112 iwl_write32(priv, CSR_GP_DRIVER_REG,
113 CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
114 }
115 /* else do nothing, uCode configured */
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800116 if (priv->cfg->ops->lib->temp_ops.set_calib_version)
117 priv->cfg->ops->lib->temp_ops.set_calib_version(priv);
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700118}
119
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700120static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
121 .min_nrg_cck = 97,
122 .max_nrg_cck = 0, /* not used, set to 0 */
123 .auto_corr_min_ofdm = 80,
124 .auto_corr_min_ofdm_mrc = 128,
125 .auto_corr_min_ofdm_x1 = 105,
126 .auto_corr_min_ofdm_mrc_x1 = 192,
127
128 .auto_corr_max_ofdm = 145,
129 .auto_corr_max_ofdm_mrc = 232,
Wey-Yi Guy2494f632010-01-20 12:22:52 -0800130 .auto_corr_max_ofdm_x1 = 110,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700131 .auto_corr_max_ofdm_mrc_x1 = 232,
132
133 .auto_corr_min_cck = 125,
134 .auto_corr_max_cck = 175,
135 .auto_corr_min_cck_mrc = 160,
136 .auto_corr_max_cck_mrc = 310,
137 .nrg_th_cck = 97,
138 .nrg_th_ofdm = 100,
Wey-Yi Guy55036d62009-10-09 13:20:24 -0700139
140 .barker_corr_th_min = 190,
141 .barker_corr_th_min_mrc = 390,
142 .nrg_th_cca = 62,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700143};
144
145static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
146{
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700147 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700148 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700149 priv->cfg->num_of_queues =
150 priv->cfg->mod_params->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700151
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700152 priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700153 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
154 priv->hw_params.scd_bc_tbls_size =
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700155 priv->cfg->num_of_queues *
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700156 sizeof(struct iwlagn_scd_bc_tbl);
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700157 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
158 priv->hw_params.max_stations = IWL5000_STATION_COUNT;
159 priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
160
161 priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
162 priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
163
164 priv->hw_params.max_bsm_size = 0;
165 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
166 BIT(IEEE80211_BAND_5GHZ);
167 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
168
169 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
170 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
171 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
172 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
173
174 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
175 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
176
177 /* Set initial sensitivity parameters */
178 /* Set initial calibration set */
179 priv->hw_params.sens = &iwl6000_sensitivity;
Wey-Yi Guye517736a2010-04-19 18:49:40 -0700180 priv->hw_params.calib_init_cfg =
181 BIT(IWL_CALIB_XTAL) |
182 BIT(IWL_CALIB_LO) |
183 BIT(IWL_CALIB_TX_IQ) |
184 BIT(IWL_CALIB_BASE_BAND);
Abhijeet Kolekar07f33f92010-01-22 14:22:47 -0800185
Wey-Yi Guye517736a2010-04-19 18:49:40 -0700186 return 0;
187}
188
189static int iwl6050_hw_set_hw_params(struct iwl_priv *priv)
190{
191 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
192 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
193 priv->cfg->num_of_queues =
194 priv->cfg->mod_params->num_of_queues;
195
196 priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
197 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
198 priv->hw_params.scd_bc_tbls_size =
199 priv->cfg->num_of_queues *
200 sizeof(struct iwlagn_scd_bc_tbl);
201 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
202 priv->hw_params.max_stations = IWL5000_STATION_COUNT;
203 priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
204
205 priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
206 priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
207
208 priv->hw_params.max_bsm_size = 0;
209 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
210 BIT(IEEE80211_BAND_5GHZ);
211 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
212
213 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
214 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
215 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
216 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
217
218 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
219 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
220
221 /* Set initial sensitivity parameters */
222 /* Set initial calibration set */
223 priv->hw_params.sens = &iwl6000_sensitivity;
224 priv->hw_params.calib_init_cfg =
225 BIT(IWL_CALIB_XTAL) |
226 BIT(IWL_CALIB_DC) |
227 BIT(IWL_CALIB_LO) |
228 BIT(IWL_CALIB_TX_IQ) |
229 BIT(IWL_CALIB_BASE_BAND);
Abhijeet Kolekar07f33f92010-01-22 14:22:47 -0800230
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700231 return 0;
232}
233
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700234static int iwl6000_hw_channel_switch(struct iwl_priv *priv, u16 channel)
235{
236 struct iwl6000_channel_switch_cmd cmd;
237 const struct iwl_channel_info *ch_info;
238 struct iwl_host_cmd hcmd = {
239 .id = REPLY_CHANNEL_SWITCH,
240 .len = sizeof(cmd),
241 .flags = CMD_SIZE_HUGE,
242 .data = &cmd,
243 };
244
245 IWL_DEBUG_11H(priv, "channel switch from %d to %d\n",
246 priv->active_rxon.channel, channel);
247
248 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
249 cmd.channel = cpu_to_le16(channel);
Wey-Yi Guy0924e5192009-11-06 14:52:54 -0800250 cmd.rxon_flags = priv->staging_rxon.flags;
251 cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700252 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
253 ch_info = iwl_get_channel_info(priv, priv->band, channel);
254 if (ch_info)
255 cmd.expect_beacon = is_channel_radar(ch_info);
256 else {
257 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
258 priv->active_rxon.channel, channel);
259 return -EFAULT;
260 }
Wey-Yi Guy0924e5192009-11-06 14:52:54 -0800261 priv->switch_rxon.channel = cpu_to_le16(channel);
262 priv->switch_rxon.switch_in_progress = true;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700263
264 return iwl_send_cmd_sync(priv, &hcmd);
265}
266
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700267static struct iwl_lib_ops iwl6000_lib = {
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700268 .set_hw_params = iwl6000_hw_set_hw_params,
Wey-Yi Guyb305a082010-03-16 17:41:22 -0700269 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
270 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
271 .txq_set_sched = iwlagn_txq_set_sched,
272 .txq_agg_enable = iwlagn_txq_agg_enable,
273 .txq_agg_disable = iwlagn_txq_agg_disable,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700274 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
275 .txq_free_tfd = iwl_hw_txq_free_tfd,
276 .txq_init = iwl_hw_tx_queue_init,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700277 .rx_handler_setup = iwlagn_rx_handler_setup,
278 .setup_deferred_work = iwlagn_setup_deferred_work,
279 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
Wey-Yi Guy81b81762010-03-16 10:23:30 -0700280 .load_ucode = iwlagn_load_ucode,
Reinette Chatreb7a79402009-09-25 14:24:23 -0700281 .dump_nic_event_log = iwl_dump_nic_event_log,
282 .dump_nic_error_log = iwl_dump_nic_error_log,
Wey-Yi Guy696bdee2009-12-10 14:37:25 -0800283 .dump_csr = iwl_dump_csr,
Wey-Yi Guy1b3eb822010-01-15 13:43:39 -0800284 .dump_fh = iwl_dump_fh,
Wey-Yi Guy741a6262010-03-16 12:37:24 -0700285 .init_alive_start = iwlagn_init_alive_start,
286 .alive_notify = iwlagn_alive_notify,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700287 .send_tx_power = iwlagn_send_tx_power,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700288 .update_chain_flags = iwl_update_chain_flags,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700289 .set_channel_switch = iwl6000_hw_channel_switch,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700290 .apm_ops = {
Ben Cahillfadb3582009-10-23 13:42:21 -0700291 .init = iwl_apm_init,
Abhijeet Kolekard68b6032009-10-02 13:44:04 -0700292 .stop = iwl_apm_stop,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700293 .config = iwl6000_nic_config,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700294 .set_pwr_src = iwl_set_pwr_src,
295 },
296 .eeprom_ops = {
297 .regulatory_bands = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700298 EEPROM_REG_BAND_1_CHANNELS,
299 EEPROM_REG_BAND_2_CHANNELS,
300 EEPROM_REG_BAND_3_CHANNELS,
301 EEPROM_REG_BAND_4_CHANNELS,
302 EEPROM_REG_BAND_5_CHANNELS,
Shanyu Zhaof2fa1b02010-04-07 18:37:52 -0700303 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700304 EEPROM_REG_BAND_52_HT40_CHANNELS
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700305 },
306 .verify_signature = iwlcore_eeprom_verify_signature,
307 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
308 .release_semaphore = iwlcore_eeprom_release_semaphore,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700309 .calib_version = iwlagn_eeprom_calib_version,
310 .query_addr = iwlagn_eeprom_query_addr,
Wey-Yi Guyab9fd1b2009-08-21 13:34:23 -0700311 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700312 },
313 .post_associate = iwl_post_associate,
314 .isr = iwl_isr_ict,
315 .config_ap = iwl_config_ap,
316 .temp_ops = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700317 .temperature = iwlagn_temperature,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700318 .set_ct_kill = iwl6000_set_ct_threshold,
319 },
Reinette Chatre3459ab52010-01-22 14:22:49 -0800320 .add_bcast_station = iwl_add_bcast_station,
Johannes Berg1fa61b22010-04-28 08:44:52 -0700321 .manage_ibss_station = iwlagn_manage_ibss_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 Guy672639d2009-07-24 11:13:01 -0700330};
331
Emese Revfy45d5d802009-12-14 00:59:53 +0100332static const struct iwl_ops iwl6000_ops = {
Wey-Yi Guy792bc3c2010-03-16 10:23:29 -0700333 .ucode = &iwlagn_ucode,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700334 .lib = &iwl6000_lib,
Wey-Yi Guy7dc77db2010-03-16 10:23:31 -0700335 .hcmd = &iwlagn_hcmd,
336 .utils = &iwlagn_hcmd_utils,
Johannes Berge932a602009-10-02 13:44:03 -0700337 .led = &iwlagn_led_ops,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800338};
339
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800340static struct iwl_lib_ops iwl6050_lib = {
Wey-Yi Guye517736a2010-04-19 18:49:40 -0700341 .set_hw_params = iwl6050_hw_set_hw_params,
Wey-Yi Guyb305a082010-03-16 17:41:22 -0700342 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
343 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
344 .txq_set_sched = iwlagn_txq_set_sched,
345 .txq_agg_enable = iwlagn_txq_agg_enable,
346 .txq_agg_disable = iwlagn_txq_agg_disable,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800347 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
348 .txq_free_tfd = iwl_hw_txq_free_tfd,
349 .txq_init = iwl_hw_tx_queue_init,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700350 .rx_handler_setup = iwlagn_rx_handler_setup,
351 .setup_deferred_work = iwlagn_setup_deferred_work,
352 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
Wey-Yi Guy81b81762010-03-16 10:23:30 -0700353 .load_ucode = iwlagn_load_ucode,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800354 .dump_nic_event_log = iwl_dump_nic_event_log,
355 .dump_nic_error_log = iwl_dump_nic_error_log,
356 .dump_csr = iwl_dump_csr,
357 .dump_fh = iwl_dump_fh,
Wey-Yi Guy741a6262010-03-16 12:37:24 -0700358 .init_alive_start = iwlagn_init_alive_start,
359 .alive_notify = iwlagn_alive_notify,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700360 .send_tx_power = iwlagn_send_tx_power,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800361 .update_chain_flags = iwl_update_chain_flags,
362 .set_channel_switch = iwl6000_hw_channel_switch,
363 .apm_ops = {
364 .init = iwl_apm_init,
365 .stop = iwl_apm_stop,
366 .config = iwl6000_nic_config,
367 .set_pwr_src = iwl_set_pwr_src,
368 },
369 .eeprom_ops = {
370 .regulatory_bands = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700371 EEPROM_REG_BAND_1_CHANNELS,
372 EEPROM_REG_BAND_2_CHANNELS,
373 EEPROM_REG_BAND_3_CHANNELS,
374 EEPROM_REG_BAND_4_CHANNELS,
375 EEPROM_REG_BAND_5_CHANNELS,
Shanyu Zhaof2fa1b02010-04-07 18:37:52 -0700376 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700377 EEPROM_REG_BAND_52_HT40_CHANNELS
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800378 },
379 .verify_signature = iwlcore_eeprom_verify_signature,
380 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
381 .release_semaphore = iwlcore_eeprom_release_semaphore,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700382 .calib_version = iwlagn_eeprom_calib_version,
383 .query_addr = iwlagn_eeprom_query_addr,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800384 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
385 },
386 .post_associate = iwl_post_associate,
387 .isr = iwl_isr_ict,
388 .config_ap = iwl_config_ap,
389 .temp_ops = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700390 .temperature = iwlagn_temperature,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800391 .set_ct_kill = iwl6000_set_ct_threshold,
392 .set_calib_version = iwl6050_set_calib_version,
393 },
394 .add_bcast_station = iwl_add_bcast_station,
Johannes Berg1fa61b22010-04-28 08:44:52 -0700395 .manage_ibss_station = iwlagn_manage_ibss_station,
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -0700396 .debugfs_ops = {
397 .rx_stats_read = iwl_ucode_rx_stats_read,
398 .tx_stats_read = iwl_ucode_tx_stats_read,
399 .general_stats_read = iwl_ucode_general_stats_read,
400 },
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800401 .recover_from_tx_stall = iwl_bg_monitor_recover,
Wey-Yi Guyfa8f1302010-03-05 14:22:46 -0800402 .check_plcp_health = iwl_good_plcp_health,
403 .check_ack_health = iwl_good_ack_health,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800404};
405
406static const struct iwl_ops iwl6050_ops = {
Wey-Yi Guy792bc3c2010-03-16 10:23:29 -0700407 .ucode = &iwlagn_ucode,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800408 .lib = &iwl6050_lib,
Wey-Yi Guy7dc77db2010-03-16 10:23:31 -0700409 .hcmd = &iwlagn_hcmd,
410 .utils = &iwlagn_hcmd_utils,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800411 .led = &iwlagn_led_ops,
412};
413
Shanyu Zhao95b13012010-04-21 11:46:33 -0700414
415struct iwl_cfg iwl6000g2a_2agn_cfg = {
416 .name = "6000 Series 2x2 AGN Gen2a",
417 .fw_name_pre = IWL6000G2A_FW_PRE,
Shanyu Zhao4b3e8062010-04-07 18:06:36 -0700418 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
419 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700420 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
421 .ops = &iwl6000_ops,
422 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Shanyu Zhao4b3e8062010-04-07 18:06:36 -0700423 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
424 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700425 .num_of_queues = IWLAGN_NUM_QUEUES,
426 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
427 .mod_params = &iwlagn_mod_params,
428 .valid_tx_ant = ANT_AB,
429 .valid_rx_ant = ANT_AB,
430 .pll_cfg_val = 0,
431 .set_l0s = true,
432 .use_bsm = false,
Wey-Yi Guy33e6f812010-04-09 09:36:11 -0700433 .pa_type = IWL_PA_SYSTEM,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700434 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
435 .shadow_ram_support = true,
436 .ht_greenfield_support = true,
437 .led_compensation = 51,
438 .use_rts_for_ht = true, /* use rts/cts protection */
439 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
440 .supports_idle = true,
441 .adv_thermal_throttle = true,
442 .support_ct_kill_exit = true,
443 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
444 .chain_noise_scale = 1000,
445 .monitor_recover_period = IWL_MONITORING_PERIOD,
Shanyu Zhao95b13012010-04-21 11:46:33 -0700446 .max_event_log_size = 512,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700447 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700448 .sensitivity_calib_by_driver = true,
449 .chain_noise_calib_by_driver = true,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700450};
451
Shanyu Zhao95b13012010-04-21 11:46:33 -0700452/*
453 * "i": Internal configuration, use internal Power Amplifier
454 */
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700455struct iwl_cfg iwl6000i_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800456 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700457 .fw_name_pre = IWL6000_FW_PRE,
458 .ucode_api_max = IWL6000_UCODE_API_MAX,
459 .ucode_api_min = IWL6000_UCODE_API_MIN,
460 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
461 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700462 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700463 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700464 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700465 .num_of_queues = IWLAGN_NUM_QUEUES,
466 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700467 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700468 .valid_tx_ant = ANT_BC,
469 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700470 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700471 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700472 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700473 .pa_type = IWL_PA_INTERNAL,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700474 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
475 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700476 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700477 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700478 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700479 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700480 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700481 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700482 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800483 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800484 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800485 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700486 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700487 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700488 .sensitivity_calib_by_driver = true,
489 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800490};
491
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700492struct iwl_cfg iwl6000i_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800493 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700494 .fw_name_pre = IWL6000_FW_PRE,
495 .ucode_api_max = IWL6000_UCODE_API_MAX,
496 .ucode_api_min = IWL6000_UCODE_API_MIN,
497 .sku = IWL_SKU_A|IWL_SKU_G,
498 .ops = &iwl6000_ops,
499 .eeprom_size = OTP_LOW_IMAGE_SIZE,
500 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700501 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700502 .num_of_queues = IWLAGN_NUM_QUEUES,
503 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700504 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700505 .valid_tx_ant = ANT_BC,
506 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700507 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700508 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700509 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700510 .pa_type = IWL_PA_INTERNAL,
511 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
512 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700513 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700514 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700515 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700516 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700517 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800518 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800519 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800520 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700521 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700522 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700523 .sensitivity_calib_by_driver = true,
524 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700525};
526
527struct iwl_cfg iwl6000i_2bg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800528 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700529 .fw_name_pre = IWL6000_FW_PRE,
530 .ucode_api_max = IWL6000_UCODE_API_MAX,
531 .ucode_api_min = IWL6000_UCODE_API_MIN,
532 .sku = IWL_SKU_G,
533 .ops = &iwl6000_ops,
534 .eeprom_size = OTP_LOW_IMAGE_SIZE,
535 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700536 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700537 .num_of_queues = IWLAGN_NUM_QUEUES,
538 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700539 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700540 .valid_tx_ant = ANT_BC,
541 .valid_rx_ant = ANT_BC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700542 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700543 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700544 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700545 .pa_type = IWL_PA_INTERNAL,
546 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
547 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700548 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700549 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700550 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700551 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700552 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800553 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800554 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800555 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700556 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700557 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700558 .sensitivity_calib_by_driver = true,
559 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700560};
561
Jay Sternberge1228372009-01-19 15:30:34 -0800562struct iwl_cfg iwl6050_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800563 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800564 .fw_name_pre = IWL6050_FW_PRE,
565 .ucode_api_max = IWL6050_UCODE_API_MAX,
566 .ucode_api_min = IWL6050_UCODE_API_MIN,
567 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800568 .ops = &iwl6050_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700569 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700570 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700571 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700572 .num_of_queues = IWLAGN_NUM_QUEUES,
573 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700574 .mod_params = &iwlagn_mod_params,
Jay Sternberg542cc792009-05-08 13:44:46 -0700575 .valid_tx_ant = ANT_AB,
576 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700577 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700578 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700579 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700580 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700581 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700582 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700583 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700584 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700585 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700586 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700587 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700588 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700589 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800590 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800591 .chain_noise_scale = 1500,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800592 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700593 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700594 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700595 .sensitivity_calib_by_driver = true,
596 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800597};
598
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700599struct iwl_cfg iwl6050_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800600 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700601 .fw_name_pre = IWL6050_FW_PRE,
602 .ucode_api_max = IWL6050_UCODE_API_MAX,
603 .ucode_api_min = IWL6050_UCODE_API_MIN,
604 .sku = IWL_SKU_A|IWL_SKU_G,
Abhijeet Kolekard5755932010-02-18 22:03:05 -0800605 .ops = &iwl6050_ops,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700606 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy32b7e242009-10-16 14:25:51 -0700607 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700608 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700609 .num_of_queues = IWLAGN_NUM_QUEUES,
610 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700611 .mod_params = &iwlagn_mod_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700612 .valid_tx_ant = ANT_AB,
613 .valid_rx_ant = ANT_AB,
Ben Cahillfadb3582009-10-23 13:42:21 -0700614 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700615 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700616 .use_bsm = false,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700617 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy3ab312a2009-10-16 14:25:52 -0700618 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700619 .shadow_ram_support = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700620 .led_compensation = 51,
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700621 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700622 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700623 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700624 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800625 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800626 .chain_noise_scale = 1500,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800627 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700628 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700629 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700630 .sensitivity_calib_by_driver = true,
631 .chain_noise_calib_by_driver = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700632};
633
Jay Sternberge1228372009-01-19 15:30:34 -0800634struct iwl_cfg iwl6000_3agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800635 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800636 .fw_name_pre = IWL6000_FW_PRE,
637 .ucode_api_max = IWL6000_UCODE_API_MAX,
638 .ucode_api_min = IWL6000_UCODE_API_MIN,
639 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800640 .ops = &iwl6000_ops,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700641 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Wey-Yi Guy1f4b9662009-09-17 10:43:46 -0700642 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
Wey-Yi Guy00e70592010-03-16 12:37:26 -0700643 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700644 .num_of_queues = IWLAGN_NUM_QUEUES,
645 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Wey-Yi Guy348ee7cd2010-03-16 12:37:27 -0700646 .mod_params = &iwlagn_mod_params,
Jay Sternbergc0bac762009-02-02 16:21:14 -0800647 .valid_tx_ant = ANT_ABC,
648 .valid_rx_ant = ANT_ABC,
Ben Cahillfadb3582009-10-23 13:42:21 -0700649 .pll_cfg_val = 0,
Ben Cahilla6c5c732009-10-30 14:36:07 -0700650 .set_l0s = true,
Ben Cahillfadb3582009-10-23 13:42:21 -0700651 .use_bsm = false,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700652 .pa_type = IWL_PA_SYSTEM,
Wey-Yi Guy415e4992009-08-13 13:30:54 -0700653 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
654 .shadow_ram_support = true,
Daniel C Halperinb2617932009-08-13 13:30:59 -0700655 .ht_greenfield_support = true,
Wey-Yi Guyf2d0d0e2009-09-11 10:38:14 -0700656 .led_compensation = 51,
Wey-Yi Guy47eef9b2009-09-17 10:43:44 -0700657 .use_rts_for_ht = true, /* use rts/cts protection */
Wey-Yi Guyd8c07e72009-09-25 14:24:26 -0700658 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
Johannes Berg78f5fb72009-09-25 14:24:27 -0700659 .supports_idle = true,
Wey-Yi Guy6047b4f2009-10-23 13:42:27 -0700660 .adv_thermal_throttle = true,
Wey-Yi Guy480e8402009-10-23 13:42:28 -0700661 .support_ct_kill_exit = true,
Trieu 'Andrew' Nguyen3e4fb5f2010-01-22 14:22:46 -0800662 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
Ben Cahilld4fe5ac2010-02-05 11:33:46 -0800663 .chain_noise_scale = 1000,
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800664 .monitor_recover_period = IWL_MONITORING_PERIOD,
Wey-Yi Guy678b3852010-03-26 12:54:37 -0700665 .max_event_log_size = 1024,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700666 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700667 .sensitivity_calib_by_driver = true,
668 .chain_noise_calib_by_driver = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800669};
670
Jay Sternberge1228372009-01-19 15:30:34 -0800671MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
672MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
Shanyu Zhao95b13012010-04-21 11:46:33 -0700673MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));