blob: 85bde701351ea8a155bf0f71bfe44fc16d449a93 [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
Wey-Yi Guy62cb3c62010-09-28 17:43:10 -070054#define IWL6050_UCODE_API_MAX 5
Johannes Berg670245e2010-08-23 07:56:55 -070055#define IWL6000G2_UCODE_API_MAX 5
Wey-Yi Guy58a39092010-10-06 08:14:21 -070056#define IWL130_UCODE_API_MAX 5
Jay Sternberge1228372009-01-19 15:30:34 -080057
58/* Lowest firmware API version supported */
Wey-Yi Guy44246422009-10-23 13:42:34 -070059#define IWL6000_UCODE_API_MIN 4
60#define IWL6050_UCODE_API_MIN 4
Shanyu Zhao4b3e8062010-04-07 18:06:36 -070061#define IWL6000G2_UCODE_API_MIN 4
Wey-Yi Guy58a39092010-10-06 08:14:21 -070062#define IWL130_UCODE_API_MIN 5
Jay Sternberge1228372009-01-19 15:30:34 -080063
64#define IWL6000_FW_PRE "iwlwifi-6000-"
65#define _IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE #api ".ucode"
66#define IWL6000_MODULE_FIRMWARE(api) _IWL6000_MODULE_FIRMWARE(api)
67
68#define IWL6050_FW_PRE "iwlwifi-6050-"
69#define _IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE #api ".ucode"
70#define IWL6050_MODULE_FIRMWARE(api) _IWL6050_MODULE_FIRMWARE(api)
71
Shanyu Zhao95b13012010-04-21 11:46:33 -070072#define IWL6000G2A_FW_PRE "iwlwifi-6000g2a-"
73#define _IWL6000G2A_MODULE_FIRMWARE(api) IWL6000G2A_FW_PRE #api ".ucode"
74#define IWL6000G2A_MODULE_FIRMWARE(api) _IWL6000G2A_MODULE_FIRMWARE(api)
75
Shanyu Zhao18089722010-05-06 10:15:21 -070076#define IWL6000G2B_FW_PRE "iwlwifi-6000g2b-"
77#define _IWL6000G2B_MODULE_FIRMWARE(api) IWL6000G2B_FW_PRE #api ".ucode"
78#define IWL6000G2B_MODULE_FIRMWARE(api) _IWL6000G2B_MODULE_FIRMWARE(api)
79
Wey-Yi Guy58a39092010-10-06 08:14:21 -070080#define IWL130_FW_PRE "iwlwifi-130-"
Wey-Yi Guyd9d9a512010-10-06 16:39:17 -070081#define _IWL130_MODULE_FIRMWARE(api) IWL130_FW_PRE #api ".ucode"
82#define IWL130_MODULE_FIRMWARE(api) _IWL130_MODULE_FIRMWARE(api)
Shanyu Zhao4b3e8062010-04-07 18:06:36 -070083
Wey-Yi Guy672639d2009-07-24 11:13:01 -070084static void iwl6000_set_ct_threshold(struct iwl_priv *priv)
85{
86 /* want Celsius */
87 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD;
88 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
89}
90
Shanyu Zhao6b5ce502010-09-14 16:23:32 -070091static void iwl6050_additional_nic_config(struct iwl_priv *priv)
Abhijeet Kolekard5755932010-02-18 22:03:05 -080092{
Shanyu Zhao6b5ce502010-09-14 16:23:32 -070093 /* Indicate calibration version to uCode. */
94 if (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6)
Abhijeet Kolekard5755932010-02-18 22:03:05 -080095 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
96 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
97}
98
Shanyu Zhao02796d72010-09-14 16:23:42 -070099static void iwl6050g2_additional_nic_config(struct iwl_priv *priv)
100{
101 /* Indicate calibration version to uCode. */
102 if (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6)
103 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
104 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
105 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
106 CSR_GP_DRIVER_REG_BIT_6050_1x2);
107}
108
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700109/* NIC configuration for 6000 series */
110static void iwl6000_nic_config(struct iwl_priv *priv)
111{
Wey-Yi Guy9371d4e2009-09-11 10:38:10 -0700112 u16 radio_cfg;
113
114 radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG);
115
116 /* write radio config values to register */
117 if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) <= EEPROM_RF_CONFIG_TYPE_MAX)
118 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
119 EEPROM_RF_CFG_TYPE_MSK(radio_cfg) |
120 EEPROM_RF_CFG_STEP_MSK(radio_cfg) |
121 EEPROM_RF_CFG_DASH_MSK(radio_cfg));
122
123 /* set CSR_HW_CONFIG_REG for uCode use */
124 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
125 CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI |
126 CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700127
128 /* no locking required for register write */
Wey-Yi Guy740e7f52009-11-06 14:52:55 -0800129 if (priv->cfg->pa_type == IWL_PA_INTERNAL) {
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700130 /* 2x2 IPA phy type */
131 iwl_write32(priv, CSR_GP_DRIVER_REG,
132 CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
133 }
Shanyu Zhao6b5ce502010-09-14 16:23:32 -0700134 /* do additional nic configuration if needed */
135 if (priv->cfg->ops->nic &&
136 priv->cfg->ops->nic->additional_nic_config) {
137 priv->cfg->ops->nic->additional_nic_config(priv);
138 }
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700139}
140
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700141static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
142 .min_nrg_cck = 97,
143 .max_nrg_cck = 0, /* not used, set to 0 */
144 .auto_corr_min_ofdm = 80,
145 .auto_corr_min_ofdm_mrc = 128,
146 .auto_corr_min_ofdm_x1 = 105,
147 .auto_corr_min_ofdm_mrc_x1 = 192,
148
149 .auto_corr_max_ofdm = 145,
150 .auto_corr_max_ofdm_mrc = 232,
Wey-Yi Guy2494f632010-01-20 12:22:52 -0800151 .auto_corr_max_ofdm_x1 = 110,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700152 .auto_corr_max_ofdm_mrc_x1 = 232,
153
154 .auto_corr_min_cck = 125,
155 .auto_corr_max_cck = 175,
156 .auto_corr_min_cck_mrc = 160,
157 .auto_corr_max_cck_mrc = 310,
158 .nrg_th_cck = 97,
159 .nrg_th_ofdm = 100,
Wey-Yi Guy55036d62009-10-09 13:20:24 -0700160
161 .barker_corr_th_min = 190,
162 .barker_corr_th_min_mrc = 390,
163 .nrg_th_cca = 62,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700164};
165
166static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
167{
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700168 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700169 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700170 priv->cfg->base_params->num_of_queues =
Wey-Yi Guy88804e22009-10-09 13:20:28 -0700171 priv->cfg->mod_params->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700172
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700173 priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700174 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
175 priv->hw_params.scd_bc_tbls_size =
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700176 priv->cfg->base_params->num_of_queues *
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -0700177 sizeof(struct iwlagn_scd_bc_tbl);
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700178 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
Wey-Yi Guybf3c7fd2010-06-24 14:08:05 -0700179 priv->hw_params.max_stations = IWLAGN_STATION_COUNT;
Johannes Berga194e322010-08-27 08:53:46 -0700180 priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID;
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700181
182 priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
183 priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
184
185 priv->hw_params.max_bsm_size = 0;
186 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
187 BIT(IEEE80211_BAND_5GHZ);
188 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
189
190 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
191 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
192 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
193 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
194
Johannes Berg04536742010-09-22 18:02:08 +0200195 iwl6000_set_ct_threshold(priv);
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700196
197 /* Set initial sensitivity parameters */
198 /* Set initial calibration set */
199 priv->hw_params.sens = &iwl6000_sensitivity;
Wey-Yi Guye517736a2010-04-19 18:49:40 -0700200 priv->hw_params.calib_init_cfg =
201 BIT(IWL_CALIB_XTAL) |
202 BIT(IWL_CALIB_LO) |
203 BIT(IWL_CALIB_TX_IQ) |
204 BIT(IWL_CALIB_BASE_BAND);
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700205 if (priv->cfg->need_dc_calib)
Shanyu Zhao6d6a1af2010-09-14 18:13:31 -0700206 priv->hw_params.calib_rt_cfg |= BIT(IWL_CALIB_CFG_DC_IDX);
Shanyu Zhaobf53f932010-09-21 16:54:01 -0700207 if (priv->cfg->need_temp_offset_calib)
208 priv->hw_params.calib_init_cfg |= BIT(IWL_CALIB_TEMP_OFFSET);
Abhijeet Kolekar07f33f92010-01-22 14:22:47 -0800209
Wey-Yi Guya0ee74c2010-05-06 08:54:10 -0700210 priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
211
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700212 return 0;
213}
214
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700215static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
216 struct ieee80211_channel_switch *ch_switch)
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700217{
Johannes Berg246ed352010-08-23 10:46:32 +0200218 /*
219 * MULTI-FIXME
220 * See iwl_mac_channel_switch.
221 */
222 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700223 struct iwl6000_channel_switch_cmd cmd;
224 const struct iwl_channel_info *ch_info;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700225 u32 switch_time_in_usec, ucode_switch_time;
226 u16 ch;
227 u32 tsf_low;
228 u8 switch_count;
Johannes Berg246ed352010-08-23 10:46:32 +0200229 u16 beacon_interval = le16_to_cpu(ctx->timing.beacon_interval);
Johannes Berg8bd413e2010-08-23 10:46:40 +0200230 struct ieee80211_vif *vif = ctx->vif;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700231 struct iwl_host_cmd hcmd = {
232 .id = REPLY_CHANNEL_SWITCH,
233 .len = sizeof(cmd),
Wey-Yi Guy3839f7c2010-05-18 09:18:06 -0700234 .flags = CMD_SYNC,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700235 .data = &cmd,
236 };
237
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700238 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
Shanyu Zhao81e95432010-07-28 13:40:27 -0700239 ch = ch_switch->channel->hw_value;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700240 IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
Johannes Berg246ed352010-08-23 10:46:32 +0200241 ctx->active.channel, ch);
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700242 cmd.channel = cpu_to_le16(ch);
Johannes Berg246ed352010-08-23 10:46:32 +0200243 cmd.rxon_flags = ctx->staging.flags;
244 cmd.rxon_filter_flags = ctx->staging.filter_flags;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700245 switch_count = ch_switch->count;
246 tsf_low = ch_switch->timestamp & 0x0ffffffff;
247 /*
248 * calculate the ucode channel switch time
249 * adding TSF as one of the factor for when to switch
250 */
251 if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) {
252 if (switch_count > ((priv->ucode_beacon_time - tsf_low) /
253 beacon_interval)) {
254 switch_count -= (priv->ucode_beacon_time -
255 tsf_low) / beacon_interval;
256 } else
257 switch_count = 0;
258 }
259 if (switch_count <= 1)
260 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
261 else {
262 switch_time_in_usec =
263 vif->bss_conf.beacon_int * switch_count * TIME_UNIT;
264 ucode_switch_time = iwl_usecs_to_beacons(priv,
265 switch_time_in_usec,
266 beacon_interval);
267 cmd.switch_time = iwl_add_beacon_time(priv,
268 priv->ucode_beacon_time,
269 ucode_switch_time,
270 beacon_interval);
271 }
272 IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
273 cmd.switch_time);
274 ch_info = iwl_get_channel_info(priv, priv->band, ch);
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700275 if (ch_info)
276 cmd.expect_beacon = is_channel_radar(ch_info);
277 else {
278 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
Johannes Berg246ed352010-08-23 10:46:32 +0200279 ctx->active.channel, ch);
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700280 return -EFAULT;
281 }
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700282 priv->switch_rxon.channel = cmd.channel;
Wey-Yi Guy0924e5192009-11-06 14:52:54 -0800283 priv->switch_rxon.switch_in_progress = true;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700284
285 return iwl_send_cmd_sync(priv, &hcmd);
286}
287
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700288static struct iwl_lib_ops iwl6000_lib = {
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700289 .set_hw_params = iwl6000_hw_set_hw_params,
Wey-Yi Guyb305a082010-03-16 17:41:22 -0700290 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
291 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
292 .txq_set_sched = iwlagn_txq_set_sched,
293 .txq_agg_enable = iwlagn_txq_agg_enable,
294 .txq_agg_disable = iwlagn_txq_agg_disable,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700295 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
296 .txq_free_tfd = iwl_hw_txq_free_tfd,
297 .txq_init = iwl_hw_tx_queue_init,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700298 .rx_handler_setup = iwlagn_rx_handler_setup,
299 .setup_deferred_work = iwlagn_setup_deferred_work,
300 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
Wey-Yi Guy81b81762010-03-16 10:23:30 -0700301 .load_ucode = iwlagn_load_ucode,
Reinette Chatreb7a79402009-09-25 14:24:23 -0700302 .dump_nic_event_log = iwl_dump_nic_event_log,
303 .dump_nic_error_log = iwl_dump_nic_error_log,
Wey-Yi Guy696bdee2009-12-10 14:37:25 -0800304 .dump_csr = iwl_dump_csr,
Wey-Yi Guy1b3eb822010-01-15 13:43:39 -0800305 .dump_fh = iwl_dump_fh,
Wey-Yi Guy741a6262010-03-16 12:37:24 -0700306 .init_alive_start = iwlagn_init_alive_start,
307 .alive_notify = iwlagn_alive_notify,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700308 .send_tx_power = iwlagn_send_tx_power,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700309 .update_chain_flags = iwl_update_chain_flags,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700310 .set_channel_switch = iwl6000_hw_channel_switch,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700311 .apm_ops = {
Ben Cahillfadb3582009-10-23 13:42:21 -0700312 .init = iwl_apm_init,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700313 .config = iwl6000_nic_config,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700314 },
315 .eeprom_ops = {
316 .regulatory_bands = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700317 EEPROM_REG_BAND_1_CHANNELS,
318 EEPROM_REG_BAND_2_CHANNELS,
319 EEPROM_REG_BAND_3_CHANNELS,
320 EEPROM_REG_BAND_4_CHANNELS,
321 EEPROM_REG_BAND_5_CHANNELS,
Shanyu Zhaof2fa1b02010-04-07 18:37:52 -0700322 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700323 EEPROM_REG_BAND_52_HT40_CHANNELS
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700324 },
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700325 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
326 .release_semaphore = iwlcore_eeprom_release_semaphore,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700327 .calib_version = iwlagn_eeprom_calib_version,
328 .query_addr = iwlagn_eeprom_query_addr,
Wey-Yi Guyab9fd1b2009-08-21 13:34:23 -0700329 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700330 },
331 .post_associate = iwl_post_associate,
332 .isr = iwl_isr_ict,
333 .config_ap = iwl_config_ap,
334 .temp_ops = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700335 .temperature = iwlagn_temperature,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700336 },
Johannes Berg1fa61b22010-04-28 08:44:52 -0700337 .manage_ibss_station = iwlagn_manage_ibss_station,
Johannes Berga194e322010-08-27 08:53:46 -0700338 .update_bcast_stations = iwl_update_bcast_stations,
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -0700339 .debugfs_ops = {
340 .rx_stats_read = iwl_ucode_rx_stats_read,
341 .tx_stats_read = iwl_ucode_tx_stats_read,
342 .general_stats_read = iwl_ucode_general_stats_read,
Wey-Yi Guyffb7d892010-07-14 08:09:55 -0700343 .bt_stats_read = iwl_ucode_bt_stats_read,
Wey-Yi Guy54a9aa62010-09-05 10:49:42 -0700344 .reply_tx_error = iwl_reply_tx_error_read,
Abhijeet Kolekarb8c76262010-04-08 15:29:07 -0700345 },
Wey-Yi Guyb74e31a2010-03-01 17:23:50 -0800346 .recover_from_tx_stall = iwl_bg_monitor_recover,
Wey-Yi Guyfa8f1302010-03-05 14:22:46 -0800347 .check_plcp_health = iwl_good_plcp_health,
348 .check_ack_health = iwl_good_ack_health,
Wey-Yi Guy716c74b2010-06-24 13:22:36 -0700349 .txfifo_flush = iwlagn_txfifo_flush,
Wey-Yi Guy65550632010-06-24 13:18:35 -0700350 .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
Wey-Yi Guy0975cc82010-07-31 08:34:07 -0700351 .tt_ops = {
352 .lower_power_detection = iwl_tt_is_low_power_state,
353 .tt_power_mode = iwl_tt_current_power_mode,
354 .ct_kill_check = iwl_check_for_ct_kill,
355 }
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700356};
357
Johannes Berg9e4afc22010-08-23 07:56:57 -0700358static struct iwl_lib_ops iwl6000g2b_lib = {
359 .set_hw_params = iwl6000_hw_set_hw_params,
360 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
361 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
362 .txq_set_sched = iwlagn_txq_set_sched,
363 .txq_agg_enable = iwlagn_txq_agg_enable,
364 .txq_agg_disable = iwlagn_txq_agg_disable,
365 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
366 .txq_free_tfd = iwl_hw_txq_free_tfd,
367 .txq_init = iwl_hw_tx_queue_init,
Wey-Yi Guyb6e116e2010-08-23 07:57:14 -0700368 .rx_handler_setup = iwlagn_bt_rx_handler_setup,
369 .setup_deferred_work = iwlagn_bt_setup_deferred_work,
370 .cancel_deferred_work = iwlagn_bt_cancel_deferred_work,
Johannes Berg9e4afc22010-08-23 07:56:57 -0700371 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
372 .load_ucode = iwlagn_load_ucode,
373 .dump_nic_event_log = iwl_dump_nic_event_log,
374 .dump_nic_error_log = iwl_dump_nic_error_log,
375 .dump_csr = iwl_dump_csr,
376 .dump_fh = iwl_dump_fh,
377 .init_alive_start = iwlagn_init_alive_start,
378 .alive_notify = iwlagn_alive_notify,
379 .send_tx_power = iwlagn_send_tx_power,
380 .update_chain_flags = iwl_update_chain_flags,
381 .set_channel_switch = iwl6000_hw_channel_switch,
382 .apm_ops = {
383 .init = iwl_apm_init,
Johannes Berg9e4afc22010-08-23 07:56:57 -0700384 .config = iwl6000_nic_config,
Johannes Berg9e4afc22010-08-23 07:56:57 -0700385 },
386 .eeprom_ops = {
387 .regulatory_bands = {
388 EEPROM_REG_BAND_1_CHANNELS,
389 EEPROM_REG_BAND_2_CHANNELS,
390 EEPROM_REG_BAND_3_CHANNELS,
391 EEPROM_REG_BAND_4_CHANNELS,
392 EEPROM_REG_BAND_5_CHANNELS,
393 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
394 EEPROM_REG_BAND_52_HT40_CHANNELS
395 },
Johannes Berg9e4afc22010-08-23 07:56:57 -0700396 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
397 .release_semaphore = iwlcore_eeprom_release_semaphore,
398 .calib_version = iwlagn_eeprom_calib_version,
399 .query_addr = iwlagn_eeprom_query_addr,
400 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
401 },
402 .post_associate = iwl_post_associate,
403 .isr = iwl_isr_ict,
404 .config_ap = iwl_config_ap,
405 .temp_ops = {
406 .temperature = iwlagn_temperature,
Johannes Berg9e4afc22010-08-23 07:56:57 -0700407 },
408 .manage_ibss_station = iwlagn_manage_ibss_station,
Johannes Berga194e322010-08-27 08:53:46 -0700409 .update_bcast_stations = iwl_update_bcast_stations,
Johannes Berg9e4afc22010-08-23 07:56:57 -0700410 .debugfs_ops = {
411 .rx_stats_read = iwl_ucode_rx_stats_read,
412 .tx_stats_read = iwl_ucode_tx_stats_read,
413 .general_stats_read = iwl_ucode_general_stats_read,
414 .bt_stats_read = iwl_ucode_bt_stats_read,
Wey-Yi Guy54a9aa62010-09-05 10:49:42 -0700415 .reply_tx_error = iwl_reply_tx_error_read,
Johannes Berg9e4afc22010-08-23 07:56:57 -0700416 },
417 .recover_from_tx_stall = iwl_bg_monitor_recover,
418 .check_plcp_health = iwl_good_plcp_health,
419 .check_ack_health = iwl_good_ack_health,
420 .txfifo_flush = iwlagn_txfifo_flush,
421 .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
422 .tt_ops = {
423 .lower_power_detection = iwl_tt_is_low_power_state,
424 .tt_power_mode = iwl_tt_current_power_mode,
425 .ct_kill_check = iwl_check_for_ct_kill,
426 }
427};
428
Shanyu Zhao6b5ce502010-09-14 16:23:32 -0700429static struct iwl_nic_ops iwl6050_nic_ops = {
430 .additional_nic_config = &iwl6050_additional_nic_config,
431};
432
Shanyu Zhao02796d72010-09-14 16:23:42 -0700433static struct iwl_nic_ops iwl6050g2_nic_ops = {
434 .additional_nic_config = &iwl6050g2_additional_nic_config,
435};
436
Emese Revfy45d5d802009-12-14 00:59:53 +0100437static const struct iwl_ops iwl6000_ops = {
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700438 .lib = &iwl6000_lib,
Wey-Yi Guy7dc77db2010-03-16 10:23:31 -0700439 .hcmd = &iwlagn_hcmd,
440 .utils = &iwlagn_hcmd_utils,
Johannes Berge932a602009-10-02 13:44:03 -0700441 .led = &iwlagn_led_ops,
Johannes Bergdc21b542010-10-23 09:15:39 -0700442 .ieee80211_ops = &iwlagn_hw_ops,
Jay Sternberg29f35c12009-01-29 11:09:16 -0800443};
444
Shanyu Zhao6b5ce502010-09-14 16:23:32 -0700445static const struct iwl_ops iwl6050_ops = {
446 .lib = &iwl6000_lib,
447 .hcmd = &iwlagn_hcmd,
448 .utils = &iwlagn_hcmd_utils,
449 .led = &iwlagn_led_ops,
450 .nic = &iwl6050_nic_ops,
Johannes Bergdc21b542010-10-23 09:15:39 -0700451 .ieee80211_ops = &iwlagn_hw_ops,
Shanyu Zhao6b5ce502010-09-14 16:23:32 -0700452};
453
Shanyu Zhao02796d72010-09-14 16:23:42 -0700454static const struct iwl_ops iwl6050g2_ops = {
455 .lib = &iwl6000_lib,
456 .hcmd = &iwlagn_hcmd,
457 .utils = &iwlagn_hcmd_utils,
458 .led = &iwlagn_led_ops,
459 .nic = &iwl6050g2_nic_ops,
Johannes Bergdc21b542010-10-23 09:15:39 -0700460 .ieee80211_ops = &iwlagn_hw_ops,
Shanyu Zhao02796d72010-09-14 16:23:42 -0700461};
462
Shanyu Zhao18089722010-05-06 10:15:21 -0700463static const struct iwl_ops iwl6000g2b_ops = {
Johannes Berg9e4afc22010-08-23 07:56:57 -0700464 .lib = &iwl6000g2b_lib,
Wey-Yi Guyb6e116e2010-08-23 07:57:14 -0700465 .hcmd = &iwlagn_bt_hcmd,
Shanyu Zhao18089722010-05-06 10:15:21 -0700466 .utils = &iwlagn_hcmd_utils,
467 .led = &iwlagn_led_ops,
Johannes Bergdc21b542010-10-23 09:15:39 -0700468 .ieee80211_ops = &iwlagn_hw_ops,
Shanyu Zhao18089722010-05-06 10:15:21 -0700469};
470
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700471static struct iwl_base_params iwl6000_base_params = {
Jay Sternberg0b5af202010-03-17 16:16:12 -0700472 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700473 .num_of_queues = IWLAGN_NUM_QUEUES,
474 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700475 .pll_cfg_val = 0,
476 .set_l0s = true,
477 .use_bsm = false,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700478 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
479 .shadow_ram_support = true,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700480 .led_compensation = 51,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700481 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
482 .supports_idle = true,
483 .adv_thermal_throttle = true,
484 .support_ct_kill_exit = true,
485 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
486 .chain_noise_scale = 1000,
Wey-Yi Guyce606592010-07-23 13:19:39 -0700487 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
Shanyu Zhao95b13012010-04-21 11:46:33 -0700488 .max_event_log_size = 512,
Wey-Yi Guy6e5c8002010-04-27 14:00:28 -0700489 .ucode_tracing = true,
Wey-Yi Guy65d1f892010-04-25 15:41:43 -0700490 .sensitivity_calib_by_driver = true,
491 .chain_noise_calib_by_driver = true,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700492};
493
494static struct iwl_base_params iwl6050_base_params = {
495 .eeprom_size = OTP_LOW_IMAGE_SIZE,
496 .num_of_queues = IWLAGN_NUM_QUEUES,
497 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
498 .pll_cfg_val = 0,
499 .set_l0s = true,
500 .use_bsm = false,
501 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
502 .shadow_ram_support = true,
503 .led_compensation = 51,
504 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
505 .supports_idle = true,
506 .adv_thermal_throttle = true,
507 .support_ct_kill_exit = true,
508 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
509 .chain_noise_scale = 1500,
510 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
511 .max_event_log_size = 1024,
512 .ucode_tracing = true,
513 .sensitivity_calib_by_driver = true,
514 .chain_noise_calib_by_driver = true,
515};
Wey-Yi Guyde05ead2010-09-23 15:24:22 -0700516static struct iwl_base_params iwl6000_coex_base_params = {
517 .eeprom_size = OTP_LOW_IMAGE_SIZE,
518 .num_of_queues = IWLAGN_NUM_QUEUES,
519 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
520 .pll_cfg_val = 0,
521 .set_l0s = true,
522 .use_bsm = false,
523 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
524 .shadow_ram_support = true,
525 .led_compensation = 51,
526 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
527 .supports_idle = true,
528 .adv_thermal_throttle = true,
529 .support_ct_kill_exit = true,
530 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
531 .chain_noise_scale = 1000,
532 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
533 .max_event_log_size = 512,
534 .ucode_tracing = true,
535 .sensitivity_calib_by_driver = true,
536 .chain_noise_calib_by_driver = true,
537};
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700538
539static struct iwl_ht_params iwl6000_ht_params = {
540 .ht_greenfield_support = true,
541 .use_rts_for_aggregation = true, /* use rts/cts protection */
542};
543
544static struct iwl_bt_params iwl6000_bt_params = {
545 .bt_statistics = true,
546 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
547 .advanced_bt_coexist = true,
548 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
549 .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT,
550};
551
552struct iwl_cfg iwl6000g2a_2agn_cfg = {
553 .name = "6000 Series 2x2 AGN Gen2a",
554 .fw_name_pre = IWL6000G2A_FW_PRE,
555 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
556 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
557 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
558 .valid_tx_ant = ANT_AB,
559 .valid_rx_ant = ANT_AB,
560 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
561 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
562 .ops = &iwl6000_ops,
563 .mod_params = &iwlagn_mod_params,
564 .base_params = &iwl6000_base_params,
565 .ht_params = &iwl6000_ht_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700566 .need_dc_calib = true,
Shanyu Zhaobf53f932010-09-21 16:54:01 -0700567 .need_temp_offset_calib = true,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700568};
569
Shanyu Zhao18089722010-05-06 10:15:21 -0700570struct iwl_cfg iwl6000g2a_2abg_cfg = {
571 .name = "6000 Series 2x2 ABG Gen2a",
572 .fw_name_pre = IWL6000G2A_FW_PRE,
573 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
574 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
575 .sku = IWL_SKU_A|IWL_SKU_G,
Shanyu Zhao18089722010-05-06 10:15:21 -0700576 .valid_tx_ant = ANT_AB,
577 .valid_rx_ant = ANT_AB,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700578 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
579 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
580 .ops = &iwl6000_ops,
581 .mod_params = &iwlagn_mod_params,
582 .base_params = &iwl6000_base_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700583 .need_dc_calib = true,
Shanyu Zhaobf53f932010-09-21 16:54:01 -0700584 .need_temp_offset_calib = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700585};
586
587struct iwl_cfg iwl6000g2a_2bg_cfg = {
588 .name = "6000 Series 2x2 BG Gen2a",
589 .fw_name_pre = IWL6000G2A_FW_PRE,
590 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
591 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
592 .sku = IWL_SKU_G,
Shanyu Zhao18089722010-05-06 10:15:21 -0700593 .valid_tx_ant = ANT_AB,
594 .valid_rx_ant = ANT_AB,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700595 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
596 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
597 .ops = &iwl6000_ops,
598 .mod_params = &iwlagn_mod_params,
599 .base_params = &iwl6000_base_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700600 .need_dc_calib = true,
Shanyu Zhaobf53f932010-09-21 16:54:01 -0700601 .need_temp_offset_calib = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700602};
603
604struct iwl_cfg iwl6000g2b_2agn_cfg = {
605 .name = "6000 Series 2x2 AGN Gen2b",
606 .fw_name_pre = IWL6000G2B_FW_PRE,
607 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
608 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
609 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Shanyu Zhao18089722010-05-06 10:15:21 -0700610 .valid_tx_ant = ANT_AB,
611 .valid_rx_ant = ANT_AB,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700612 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
613 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
614 .ops = &iwl6000g2b_ops,
615 .mod_params = &iwlagn_mod_params,
Wey-Yi Guyde05ead2010-09-23 15:24:22 -0700616 .base_params = &iwl6000_coex_base_params,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700617 .bt_params = &iwl6000_bt_params,
618 .ht_params = &iwl6000_ht_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700619 .need_dc_calib = true,
Shanyu Zhaobf53f932010-09-21 16:54:01 -0700620 .need_temp_offset_calib = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700621 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
622 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
Shanyu Zhao18089722010-05-06 10:15:21 -0700623};
624
625struct iwl_cfg iwl6000g2b_2abg_cfg = {
626 .name = "6000 Series 2x2 ABG Gen2b",
627 .fw_name_pre = IWL6000G2B_FW_PRE,
628 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
629 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
630 .sku = IWL_SKU_A|IWL_SKU_G,
Shanyu Zhao18089722010-05-06 10:15:21 -0700631 .valid_tx_ant = ANT_AB,
632 .valid_rx_ant = ANT_AB,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700633 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
634 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
635 .ops = &iwl6000g2b_ops,
636 .mod_params = &iwlagn_mod_params,
Wey-Yi Guyde05ead2010-09-23 15:24:22 -0700637 .base_params = &iwl6000_coex_base_params,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700638 .bt_params = &iwl6000_bt_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700639 .need_dc_calib = true,
Shanyu Zhaobf53f932010-09-21 16:54:01 -0700640 .need_temp_offset_calib = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700641 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
642 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
Shanyu Zhao18089722010-05-06 10:15:21 -0700643};
644
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700645struct iwl_cfg iwl6000g2b_2bgn_cfg = {
646 .name = "6000 Series 2x2 BGN Gen2b",
647 .fw_name_pre = IWL6000G2B_FW_PRE,
648 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
649 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
650 .sku = IWL_SKU_G|IWL_SKU_N,
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700651 .valid_tx_ant = ANT_AB,
652 .valid_rx_ant = ANT_AB,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700653 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
654 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
655 .ops = &iwl6000g2b_ops,
656 .mod_params = &iwlagn_mod_params,
Wey-Yi Guyde05ead2010-09-23 15:24:22 -0700657 .base_params = &iwl6000_coex_base_params,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700658 .bt_params = &iwl6000_bt_params,
659 .ht_params = &iwl6000_ht_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700660 .need_dc_calib = true,
Shanyu Zhaobf53f932010-09-21 16:54:01 -0700661 .need_temp_offset_calib = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700662 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
663 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700664};
665
Shanyu Zhao18089722010-05-06 10:15:21 -0700666struct iwl_cfg iwl6000g2b_2bg_cfg = {
667 .name = "6000 Series 2x2 BG Gen2b",
668 .fw_name_pre = IWL6000G2B_FW_PRE,
669 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
670 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
671 .sku = IWL_SKU_G,
Shanyu Zhao18089722010-05-06 10:15:21 -0700672 .valid_tx_ant = ANT_AB,
673 .valid_rx_ant = ANT_AB,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700674 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
675 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
676 .ops = &iwl6000g2b_ops,
677 .mod_params = &iwlagn_mod_params,
Wey-Yi Guyde05ead2010-09-23 15:24:22 -0700678 .base_params = &iwl6000_coex_base_params,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700679 .bt_params = &iwl6000_bt_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700680 .need_dc_calib = true,
Shanyu Zhaobf53f932010-09-21 16:54:01 -0700681 .need_temp_offset_calib = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700682 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
683 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
Shanyu Zhao18089722010-05-06 10:15:21 -0700684};
685
686struct iwl_cfg iwl6000g2b_bgn_cfg = {
687 .name = "6000 Series 1x2 BGN Gen2b",
688 .fw_name_pre = IWL6000G2B_FW_PRE,
689 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
690 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
691 .sku = IWL_SKU_G|IWL_SKU_N,
Shanyu Zhao18089722010-05-06 10:15:21 -0700692 .valid_tx_ant = ANT_A,
693 .valid_rx_ant = ANT_AB,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700694 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
695 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
696 .ops = &iwl6000g2b_ops,
697 .mod_params = &iwlagn_mod_params,
Wey-Yi Guyde05ead2010-09-23 15:24:22 -0700698 .base_params = &iwl6000_coex_base_params,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700699 .bt_params = &iwl6000_bt_params,
700 .ht_params = &iwl6000_ht_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700701 .need_dc_calib = true,
Shanyu Zhaobf53f932010-09-21 16:54:01 -0700702 .need_temp_offset_calib = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700703 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
704 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
Shanyu Zhao18089722010-05-06 10:15:21 -0700705};
706
707struct iwl_cfg iwl6000g2b_bg_cfg = {
708 .name = "6000 Series 1x2 BG Gen2b",
709 .fw_name_pre = IWL6000G2B_FW_PRE,
710 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
711 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
712 .sku = IWL_SKU_G,
Shanyu Zhao18089722010-05-06 10:15:21 -0700713 .valid_tx_ant = ANT_A,
714 .valid_rx_ant = ANT_AB,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700715 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
716 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
717 .ops = &iwl6000g2b_ops,
718 .mod_params = &iwlagn_mod_params,
Wey-Yi Guyde05ead2010-09-23 15:24:22 -0700719 .base_params = &iwl6000_coex_base_params,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700720 .bt_params = &iwl6000_bt_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700721 .need_dc_calib = true,
Shanyu Zhaobf53f932010-09-21 16:54:01 -0700722 .need_temp_offset_calib = true,
Johannes Berg670245e2010-08-23 07:56:55 -0700723 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
724 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
Shanyu Zhao18089722010-05-06 10:15:21 -0700725};
726
Shanyu Zhao95b13012010-04-21 11:46:33 -0700727/*
728 * "i": Internal configuration, use internal Power Amplifier
729 */
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700730struct iwl_cfg iwl6000i_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800731 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
Wey-Yi Guy65b79982009-07-31 14:28:07 -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|IWL_SKU_N,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700736 .valid_tx_ant = ANT_BC,
737 .valid_rx_ant = ANT_BC,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700738 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
739 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
740 .ops = &iwl6000_ops,
741 .mod_params = &iwlagn_mod_params,
742 .base_params = &iwl6000_base_params,
743 .ht_params = &iwl6000_ht_params,
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700744 .pa_type = IWL_PA_INTERNAL,
Jay Sternberge1228372009-01-19 15:30:34 -0800745};
746
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700747struct iwl_cfg iwl6000i_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800748 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700749 .fw_name_pre = IWL6000_FW_PRE,
750 .ucode_api_max = IWL6000_UCODE_API_MAX,
751 .ucode_api_min = IWL6000_UCODE_API_MIN,
752 .sku = IWL_SKU_A|IWL_SKU_G,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700753 .valid_tx_ant = ANT_BC,
754 .valid_rx_ant = ANT_BC,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700755 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
756 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
757 .ops = &iwl6000_ops,
758 .mod_params = &iwlagn_mod_params,
759 .base_params = &iwl6000_base_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700760 .pa_type = IWL_PA_INTERNAL,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700761};
762
763struct iwl_cfg iwl6000i_2bg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800764 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700765 .fw_name_pre = IWL6000_FW_PRE,
766 .ucode_api_max = IWL6000_UCODE_API_MAX,
767 .ucode_api_min = IWL6000_UCODE_API_MIN,
768 .sku = IWL_SKU_G,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700769 .valid_tx_ant = ANT_BC,
770 .valid_rx_ant = ANT_BC,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700771 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
772 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
773 .ops = &iwl6000_ops,
774 .mod_params = &iwlagn_mod_params,
775 .base_params = &iwl6000_base_params,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700776 .pa_type = IWL_PA_INTERNAL,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700777};
778
Jay Sternberge1228372009-01-19 15:30:34 -0800779struct iwl_cfg iwl6050_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800780 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800781 .fw_name_pre = IWL6050_FW_PRE,
782 .ucode_api_max = IWL6050_UCODE_API_MAX,
783 .ucode_api_min = IWL6050_UCODE_API_MIN,
784 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Jay Sternberg542cc792009-05-08 13:44:46 -0700785 .valid_tx_ant = ANT_AB,
786 .valid_rx_ant = ANT_AB,
Wey-Yi Guy34f5a702010-10-06 13:46:11 -0700787 .ops = &iwl6050_ops,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700788 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
789 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
790 .mod_params = &iwlagn_mod_params,
791 .base_params = &iwl6050_base_params,
792 .ht_params = &iwl6000_ht_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700793 .need_dc_calib = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800794};
795
Shanyu Zhao03264332010-06-29 17:27:27 -0700796struct iwl_cfg iwl6050g2_bgn_cfg = {
797 .name = "6050 Series 1x2 BGN Gen2",
798 .fw_name_pre = IWL6050_FW_PRE,
799 .ucode_api_max = IWL6050_UCODE_API_MAX,
800 .ucode_api_min = IWL6050_UCODE_API_MIN,
801 .sku = IWL_SKU_G|IWL_SKU_N,
Shanyu Zhao03264332010-06-29 17:27:27 -0700802 .valid_tx_ant = ANT_A,
803 .valid_rx_ant = ANT_AB,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700804 .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION,
805 .eeprom_calib_ver = EEPROM_6050G2_TX_POWER_VERSION,
806 .ops = &iwl6050g2_ops,
807 .mod_params = &iwlagn_mod_params,
808 .base_params = &iwl6050_base_params,
809 .ht_params = &iwl6000_ht_params,
Shanyu Zhao03264332010-06-29 17:27:27 -0700810 .need_dc_calib = true,
811};
812
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700813struct iwl_cfg iwl6050_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800814 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700815 .fw_name_pre = IWL6050_FW_PRE,
816 .ucode_api_max = IWL6050_UCODE_API_MAX,
817 .ucode_api_min = IWL6050_UCODE_API_MIN,
818 .sku = IWL_SKU_A|IWL_SKU_G,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700819 .valid_tx_ant = ANT_AB,
820 .valid_rx_ant = ANT_AB,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700821 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
822 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
823 .ops = &iwl6050_ops,
824 .mod_params = &iwlagn_mod_params,
825 .base_params = &iwl6050_base_params,
Wey-Yi Guy178d1592010-06-15 16:14:53 -0700826 .need_dc_calib = true,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700827};
828
Jay Sternberge1228372009-01-19 15:30:34 -0800829struct iwl_cfg iwl6000_3agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800830 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800831 .fw_name_pre = IWL6000_FW_PRE,
832 .ucode_api_max = IWL6000_UCODE_API_MAX,
833 .ucode_api_min = IWL6000_UCODE_API_MIN,
834 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
Jay Sternbergc0bac762009-02-02 16:21:14 -0800835 .valid_tx_ant = ANT_ABC,
836 .valid_rx_ant = ANT_ABC,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700837 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
838 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
839 .ops = &iwl6000_ops,
840 .mod_params = &iwlagn_mod_params,
841 .base_params = &iwl6000_base_params,
842 .ht_params = &iwl6000_ht_params,
843 .need_dc_calib = true,
Jay Sternberge1228372009-01-19 15:30:34 -0800844};
845
Wey-Yi Guy58a39092010-10-06 08:14:21 -0700846struct iwl_cfg iwl130_bgn_cfg = {
847 .name = "Intel(R) 130 Series 1x1 BGN",
848 .fw_name_pre = IWL6000G2B_FW_PRE,
849 .ucode_api_max = IWL130_UCODE_API_MAX,
850 .ucode_api_min = IWL130_UCODE_API_MIN,
851 .sku = IWL_SKU_G|IWL_SKU_N,
852 .valid_tx_ant = ANT_A,
853 .valid_rx_ant = ANT_A,
854 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
855 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
856 .ops = &iwl6000g2b_ops,
857 .mod_params = &iwlagn_mod_params,
Wey-Yi Guyde05ead2010-09-23 15:24:22 -0700858 .base_params = &iwl6000_coex_base_params,
Wey-Yi Guy58a39092010-10-06 08:14:21 -0700859 .bt_params = &iwl6000_bt_params,
860 .ht_params = &iwl6000_ht_params,
861 .need_dc_calib = true,
862 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
863 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
864};
865
866struct iwl_cfg iwl130_bg_cfg = {
867 .name = "Intel(R) 130 Series 1x2 BG",
868 .fw_name_pre = IWL6000G2B_FW_PRE,
869 .ucode_api_max = IWL130_UCODE_API_MAX,
870 .ucode_api_min = IWL130_UCODE_API_MIN,
871 .sku = IWL_SKU_G,
872 .valid_tx_ant = ANT_A,
873 .valid_rx_ant = ANT_A,
874 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
875 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
876 .ops = &iwl6000g2b_ops,
877 .mod_params = &iwlagn_mod_params,
Wey-Yi Guyde05ead2010-09-23 15:24:22 -0700878 .base_params = &iwl6000_coex_base_params,
Wey-Yi Guy58a39092010-10-06 08:14:21 -0700879 .bt_params = &iwl6000_bt_params,
880 .need_dc_calib = true,
881 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
882 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
883};
884
Jay Sternberge1228372009-01-19 15:30:34 -0800885MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
886MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
Shanyu Zhao95b13012010-04-21 11:46:33 -0700887MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
Shanyu Zhao18089722010-05-06 10:15:21 -0700888MODULE_FIRMWARE(IWL6000G2B_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
Wey-Yi Guycf9768d62010-10-06 16:39:18 -0700889MODULE_FIRMWARE(IWL130_MODULE_FIRMWARE(IWL130_UCODE_API_MAX));