blob: f124ec69716898a9acf14d137be8036246ca908d [file] [log] [blame]
Jay Sternberge1228372009-01-19 15:30:34 -08001/******************************************************************************
2 *
Wey-Yi Guy4e318262011-12-27 11:21:32 -08003 * Copyright(c) 2008 - 2012 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>
Jay Sternberge1228372009-01-19 15:30:34 -080030#include <linux/delay.h>
31#include <linux/skbuff.h>
32#include <linux/netdevice.h>
Jay Sternberge1228372009-01-19 15:30:34 -080033#include <net/mac80211.h>
34#include <linux/etherdevice.h>
35#include <asm/unaligned.h>
Evgeni Golov8fcbd4dc2011-06-12 05:34:31 -070036#include <linux/stringify.h>
Jay Sternberge1228372009-01-19 15:30:34 -080037
38#include "iwl-eeprom.h"
39#include "iwl-dev.h"
40#include "iwl-core.h"
41#include "iwl-io.h"
Johannes Berga1175122010-01-21 06:21:10 -080042#include "iwl-agn.h"
Wey-Yi Guy19e6cda2010-03-16 17:41:23 -070043#include "iwl-agn-hw.h"
Emmanuel Grumbachbdfbf092011-07-08 08:46:16 -070044#include "iwl-trans.h"
Emmanuel Grumbach48f20d32011-08-25 23:10:36 -070045#include "iwl-shared.h"
Johannes Bergcebcbd72011-09-15 11:46:46 -070046#include "iwl-cfg.h"
Jay Sternberge1228372009-01-19 15:30:34 -080047
48/* Highest firmware API version supported */
Johannes Bergb9148112011-11-04 07:22:37 -070049#define IWL6000_UCODE_API_MAX 6
Wey-Yi Guy62cb3c62010-09-28 17:43:10 -070050#define IWL6050_UCODE_API_MAX 5
Johannes Bergca9a4602011-07-23 10:24:45 -070051#define IWL6000G2_UCODE_API_MAX 6
52
53/* Oldest version we won't warn about */
Johannes Bergb9148112011-11-04 07:22:37 -070054#define IWL6000_UCODE_API_OK 4
Johannes Bergca9a4602011-07-23 10:24:45 -070055#define IWL6000G2_UCODE_API_OK 5
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-"
Evgeni Golov8fcbd4dc2011-06-12 05:34:31 -070063#define IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE __stringify(api) ".ucode"
Jay Sternberge1228372009-01-19 15:30:34 -080064
65#define IWL6050_FW_PRE "iwlwifi-6050-"
Evgeni Golov8fcbd4dc2011-06-12 05:34:31 -070066#define IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE __stringify(api) ".ucode"
Jay Sternberge1228372009-01-19 15:30:34 -080067
Wey-Yi Guy1956e1a2011-01-08 10:25:14 -080068#define IWL6005_FW_PRE "iwlwifi-6000g2a-"
Evgeni Golov8fcbd4dc2011-06-12 05:34:31 -070069#define IWL6005_MODULE_FIRMWARE(api) IWL6005_FW_PRE __stringify(api) ".ucode"
Shanyu Zhao95b13012010-04-21 11:46:33 -070070
Wey-Yi Guy1956e1a2011-01-08 10:25:14 -080071#define IWL6030_FW_PRE "iwlwifi-6000g2b-"
Evgeni Golov8fcbd4dc2011-06-12 05:34:31 -070072#define IWL6030_MODULE_FIRMWARE(api) IWL6030_FW_PRE __stringify(api) ".ucode"
Shanyu Zhao18089722010-05-06 10:15:21 -070073
Wey-Yi Guy672639d2009-07-24 11:13:01 -070074static void iwl6000_set_ct_threshold(struct iwl_priv *priv)
75{
76 /* want Celsius */
Johannes Berg9e295112012-04-09 17:46:55 -070077 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD;
78 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
Wey-Yi Guy672639d2009-07-24 11:13:01 -070079}
80
Wey-Yi Guy65b79982009-07-31 14:28:07 -070081/* NIC configuration for 6000 series */
82static void iwl6000_nic_config(struct iwl_priv *priv)
83{
Wey-Yi Guy86cb3b42011-06-14 15:23:39 -070084 iwl_rf_config(priv);
Wey-Yi Guy65b79982009-07-31 14:28:07 -070085
Johannes Berg2d771cb2012-04-09 17:47:00 -070086 switch (cfg(priv)->device_family) {
87 case IWL_DEVICE_FAMILY_6005:
88 case IWL_DEVICE_FAMILY_6030:
89 case IWL_DEVICE_FAMILY_6000:
90 break;
91 case IWL_DEVICE_FAMILY_6000i:
92 /* 2x2 IPA phy type */
93 iwl_write32(trans(priv), CSR_GP_DRIVER_REG,
94 CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
95 break;
96 case IWL_DEVICE_FAMILY_6050:
97 /* Indicate calibration version to uCode. */
98 if (iwl_eeprom_calib_version(priv) >= 6)
99 iwl_set_bit(trans(priv), CSR_GP_DRIVER_REG,
100 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
101 break;
102 case IWL_DEVICE_FAMILY_6150:
103 /* Indicate calibration version to uCode. */
104 if (iwl_eeprom_calib_version(priv) >= 6)
105 iwl_set_bit(trans(priv), CSR_GP_DRIVER_REG,
106 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
107 iwl_set_bit(trans(priv), CSR_GP_DRIVER_REG,
108 CSR_GP_DRIVER_REG_BIT_6050_1x2);
109 break;
110 default:
111 WARN_ON(1);
112 }
Wey-Yi Guy65b79982009-07-31 14:28:07 -0700113}
114
Johannes Berg9563fe12012-03-07 09:52:21 -0800115static const struct iwl_sensitivity_ranges iwl6000_sensitivity = {
Wey-Yi Guye7515ba2011-07-23 10:24:49 -0700116 .min_nrg_cck = 110,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700117 .auto_corr_min_ofdm = 80,
118 .auto_corr_min_ofdm_mrc = 128,
119 .auto_corr_min_ofdm_x1 = 105,
120 .auto_corr_min_ofdm_mrc_x1 = 192,
121
122 .auto_corr_max_ofdm = 145,
123 .auto_corr_max_ofdm_mrc = 232,
Wey-Yi Guy2494f632010-01-20 12:22:52 -0800124 .auto_corr_max_ofdm_x1 = 110,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700125 .auto_corr_max_ofdm_mrc_x1 = 232,
126
127 .auto_corr_min_cck = 125,
128 .auto_corr_max_cck = 175,
129 .auto_corr_min_cck_mrc = 160,
130 .auto_corr_max_cck_mrc = 310,
Wey-Yi Guye7515ba2011-07-23 10:24:49 -0700131 .nrg_th_cck = 110,
132 .nrg_th_ofdm = 110,
Wey-Yi Guy55036d62009-10-09 13:20:24 -0700133
134 .barker_corr_th_min = 190,
Wey-Yi Guye7515ba2011-07-23 10:24:49 -0700135 .barker_corr_th_min_mrc = 336,
Wey-Yi Guy55036d62009-10-09 13:20:24 -0700136 .nrg_th_cca = 62,
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700137};
138
Emmanuel Grumbach6d4dec72012-02-17 10:52:03 -0800139static void iwl6000_hw_set_hw_params(struct iwl_priv *priv)
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700140{
Johannes Berg9e295112012-04-09 17:46:55 -0700141 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700142 BIT(IEEE80211_BAND_5GHZ);
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700143
Johannes Berg9e295112012-04-09 17:46:55 -0700144 priv->hw_params.tx_chains_num =
145 num_of_ant(priv->hw_params.valid_tx_ant);
Don Fry38622412011-12-16 07:07:36 -0800146 if (cfg(priv)->rx_with_siso_diversity)
Johannes Berg9e295112012-04-09 17:46:55 -0700147 priv->hw_params.rx_chains_num = 1;
Wey-Yi Guy17423ea2010-12-06 11:51:39 -0800148 else
Johannes Berg9e295112012-04-09 17:46:55 -0700149 priv->hw_params.rx_chains_num =
150 num_of_ant(priv->hw_params.valid_rx_ant);
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700151
Johannes Berg04536742010-09-22 18:02:08 +0200152 iwl6000_set_ct_threshold(priv);
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700153
154 /* Set initial sensitivity parameters */
Johannes Berg9e295112012-04-09 17:46:55 -0700155 priv->hw_params.sens = &iwl6000_sensitivity;
Abhijeet Kolekar07f33f92010-01-22 14:22:47 -0800156
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700157}
158
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700159static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
160 struct ieee80211_channel_switch *ch_switch)
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700161{
Johannes Berg246ed352010-08-23 10:46:32 +0200162 /*
163 * MULTI-FIXME
Wey-Yi Guyade4c642011-10-10 07:27:11 -0700164 * See iwlagn_mac_channel_switch.
Johannes Berg246ed352010-08-23 10:46:32 +0200165 */
166 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700167 struct iwl6000_channel_switch_cmd cmd;
168 const struct iwl_channel_info *ch_info;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700169 u32 switch_time_in_usec, ucode_switch_time;
170 u16 ch;
171 u32 tsf_low;
172 u8 switch_count;
Johannes Berg246ed352010-08-23 10:46:32 +0200173 u16 beacon_interval = le16_to_cpu(ctx->timing.beacon_interval);
Johannes Berg8bd413e2010-08-23 10:46:40 +0200174 struct ieee80211_vif *vif = ctx->vif;
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700175 struct iwl_host_cmd hcmd = {
176 .id = REPLY_CHANNEL_SWITCH,
Johannes Berg3fa50732011-05-04 07:50:38 -0700177 .len = { sizeof(cmd), },
Wey-Yi Guy3839f7c2010-05-18 09:18:06 -0700178 .flags = CMD_SYNC,
Johannes Berg3fa50732011-05-04 07:50:38 -0700179 .data = { &cmd, },
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700180 };
181
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700182 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
Shanyu Zhao81e95432010-07-28 13:40:27 -0700183 ch = ch_switch->channel->hw_value;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700184 IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
Johannes Berg246ed352010-08-23 10:46:32 +0200185 ctx->active.channel, ch);
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700186 cmd.channel = cpu_to_le16(ch);
Johannes Berg246ed352010-08-23 10:46:32 +0200187 cmd.rxon_flags = ctx->staging.flags;
188 cmd.rxon_filter_flags = ctx->staging.filter_flags;
Wey-Yi Guy79d07322010-05-06 08:54:11 -0700189 switch_count = ch_switch->count;
190 tsf_low = ch_switch->timestamp & 0x0ffffffff;
191 /*
192 * calculate the ucode channel switch time
193 * adding TSF as one of the factor for when to switch
194 */
195 if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) {
196 if (switch_count > ((priv->ucode_beacon_time - tsf_low) /
197 beacon_interval)) {
198 switch_count -= (priv->ucode_beacon_time -
199 tsf_low) / beacon_interval;
200 } else
201 switch_count = 0;
202 }
203 if (switch_count <= 1)
204 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
205 else {
206 switch_time_in_usec =
207 vif->bss_conf.beacon_int * switch_count * TIME_UNIT;
208 ucode_switch_time = iwl_usecs_to_beacons(priv,
209 switch_time_in_usec,
210 beacon_interval);
211 cmd.switch_time = iwl_add_beacon_time(priv,
212 priv->ucode_beacon_time,
213 ucode_switch_time,
214 beacon_interval);
215 }
216 IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
217 cmd.switch_time);
218 ch_info = iwl_get_channel_info(priv, priv->band, ch);
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700219 if (ch_info)
220 cmd.expect_beacon = is_channel_radar(ch_info);
221 else {
222 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
Johannes Berg246ed352010-08-23 10:46:32 +0200223 ctx->active.channel, ch);
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700224 return -EFAULT;
225 }
226
Johannes Berge10a0532012-03-06 13:30:39 -0800227 return iwl_dvm_send_cmd(priv, &hcmd);
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700228}
229
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700230static struct iwl_lib_ops iwl6000_lib = {
Wey-Yi Guyf3a2a422009-09-11 10:38:11 -0700231 .set_hw_params = iwl6000_hw_set_hw_params,
Wey-Yi Guy4a56e962009-10-23 13:42:29 -0700232 .set_channel_switch = iwl6000_hw_channel_switch,
Fry, Donald He4c598b2011-07-08 08:46:18 -0700233 .nic_config = iwl6000_nic_config,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700234 .eeprom_ops = {
235 .regulatory_bands = {
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700236 EEPROM_REG_BAND_1_CHANNELS,
237 EEPROM_REG_BAND_2_CHANNELS,
238 EEPROM_REG_BAND_3_CHANNELS,
239 EEPROM_REG_BAND_4_CHANNELS,
240 EEPROM_REG_BAND_5_CHANNELS,
Shanyu Zhaof2fa1b02010-04-07 18:37:52 -0700241 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
Wey-Yi Guye04ed0a2010-03-16 17:47:58 -0700242 EEPROM_REG_BAND_52_HT40_CHANNELS
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700243 },
Johannes Berg51dc51d2012-03-07 09:52:20 -0800244 .enhanced_txpower = true,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700245 },
Wey-Yi Guy909fc3c2011-07-08 08:46:20 -0700246 .temperature = iwlagn_temperature,
Wey-Yi Guy672639d2009-07-24 11:13:01 -0700247};
248
Wey-Yi Guy1956e1a2011-01-08 10:25:14 -0800249static struct iwl_lib_ops iwl6030_lib = {
Johannes Berg9e4afc22010-08-23 07:56:57 -0700250 .set_hw_params = iwl6000_hw_set_hw_params,
Johannes Berg9e4afc22010-08-23 07:56:57 -0700251 .set_channel_switch = iwl6000_hw_channel_switch,
Fry, Donald He4c598b2011-07-08 08:46:18 -0700252 .nic_config = iwl6000_nic_config,
Johannes Berg9e4afc22010-08-23 07:56:57 -0700253 .eeprom_ops = {
254 .regulatory_bands = {
255 EEPROM_REG_BAND_1_CHANNELS,
256 EEPROM_REG_BAND_2_CHANNELS,
257 EEPROM_REG_BAND_3_CHANNELS,
258 EEPROM_REG_BAND_4_CHANNELS,
259 EEPROM_REG_BAND_5_CHANNELS,
260 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
261 EEPROM_REG_BAND_52_HT40_CHANNELS
262 },
Johannes Berg51dc51d2012-03-07 09:52:20 -0800263 .enhanced_txpower = true,
Johannes Berg9e4afc22010-08-23 07:56:57 -0700264 },
Wey-Yi Guy909fc3c2011-07-08 08:46:20 -0700265 .temperature = iwlagn_temperature,
Johannes Berg9e4afc22010-08-23 07:56:57 -0700266};
267
Johannes Berg6794f3e2012-03-06 13:30:56 -0800268static const struct iwl_base_params iwl6000_base_params = {
Jay Sternberg0b5af202010-03-17 16:16:12 -0700269 .eeprom_size = OTP_LOW_IMAGE_SIZE,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700270 .num_of_queues = IWLAGN_NUM_QUEUES,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700271 .pll_cfg_val = 0,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700272 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
273 .shadow_ram_support = true,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700274 .led_compensation = 51,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700275 .adv_thermal_throttle = true,
276 .support_ct_kill_exit = true,
277 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
278 .chain_noise_scale = 1000,
Stanislaw Gruszka22de94d2010-12-03 15:41:48 +0100279 .wd_timeout = IWL_DEF_WD_TIMEOUT,
Shanyu Zhao95b13012010-04-21 11:46:33 -0700280 .max_event_log_size = 512,
Wey-Yi Guyf81c1f42010-11-10 09:56:50 -0800281 .shadow_reg_enable = true,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700282};
283
Johannes Berg6794f3e2012-03-06 13:30:56 -0800284static const struct iwl_base_params iwl6050_base_params = {
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700285 .eeprom_size = OTP_LOW_IMAGE_SIZE,
286 .num_of_queues = IWLAGN_NUM_QUEUES,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700287 .pll_cfg_val = 0,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700288 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
289 .shadow_ram_support = true,
290 .led_compensation = 51,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700291 .adv_thermal_throttle = true,
292 .support_ct_kill_exit = true,
293 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
294 .chain_noise_scale = 1500,
Stanislaw Gruszka22de94d2010-12-03 15:41:48 +0100295 .wd_timeout = IWL_DEF_WD_TIMEOUT,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700296 .max_event_log_size = 1024,
Wey-Yi Guyf81c1f42010-11-10 09:56:50 -0800297 .shadow_reg_enable = true,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700298};
Johannes Berg6794f3e2012-03-06 13:30:56 -0800299
300static const struct iwl_base_params iwl6000_g2_base_params = {
Wey-Yi Guyde05ead2010-09-23 15:24:22 -0700301 .eeprom_size = OTP_LOW_IMAGE_SIZE,
302 .num_of_queues = IWLAGN_NUM_QUEUES,
Wey-Yi Guyde05ead2010-09-23 15:24:22 -0700303 .pll_cfg_val = 0,
Wey-Yi Guyde05ead2010-09-23 15:24:22 -0700304 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
305 .shadow_ram_support = true,
Wey-Yi Guy4fb33242010-11-29 10:45:16 -0800306 .led_compensation = 57,
Wey-Yi Guyde05ead2010-09-23 15:24:22 -0700307 .adv_thermal_throttle = true,
308 .support_ct_kill_exit = true,
309 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
310 .chain_noise_scale = 1000,
Stanislaw Gruszka22de94d2010-12-03 15:41:48 +0100311 .wd_timeout = IWL_LONG_WD_TIMEOUT,
Wey-Yi Guyde05ead2010-09-23 15:24:22 -0700312 .max_event_log_size = 512,
Wey-Yi Guyf81c1f42010-11-10 09:56:50 -0800313 .shadow_reg_enable = true,
Wey-Yi Guyde05ead2010-09-23 15:24:22 -0700314};
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700315
Johannes Berg6794f3e2012-03-06 13:30:56 -0800316static const struct iwl_ht_params iwl6000_ht_params = {
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700317 .ht_greenfield_support = true,
318 .use_rts_for_aggregation = true, /* use rts/cts protection */
319};
320
Johannes Berg6794f3e2012-03-06 13:30:56 -0800321static const struct iwl_bt_params iwl6000_bt_params = {
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700322 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
323 .advanced_bt_coexist = true,
Wey-Yi Guy66e863a52010-11-08 14:54:37 -0800324 .agg_time_limit = BT_AGG_THRESHOLD_DEF,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700325 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
326 .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT,
Wey-Yi Guye3661762010-11-23 10:58:54 -0800327 .bt_sco_disable = true,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700328};
329
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800330#define IWL_DEVICE_6005 \
Johannes Bergca9a4602011-07-23 10:24:45 -0700331 .fw_name_pre = IWL6005_FW_PRE, \
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800332 .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
Johannes Bergca9a4602011-07-23 10:24:45 -0700333 .ucode_api_ok = IWL6000G2_UCODE_API_OK, \
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800334 .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
Johannes Berg2d771cb2012-04-09 17:47:00 -0700335 .device_family = IWL_DEVICE_FAMILY_6005, \
Emmanuel Grumbachdae66d02012-02-07 12:56:26 +0200336 .max_inst_size = IWL60_RTC_INST_SIZE, \
337 .max_data_size = IWL60_RTC_DATA_SIZE, \
Wey-Yi Guy1956e1a2011-01-08 10:25:14 -0800338 .eeprom_ver = EEPROM_6005_EEPROM_VERSION, \
339 .eeprom_calib_ver = EEPROM_6005_TX_POWER_VERSION, \
Wey-Yi Guy90c300c2011-07-07 08:33:01 -0700340 .lib = &iwl6000_lib, \
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800341 .base_params = &iwl6000_g2_base_params, \
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800342 .need_temp_offset_calib = true, \
343 .led_mode = IWL_LED_RF_STATE
344
Johannes Berg706c4ff2012-03-05 11:24:33 -0800345const struct iwl_cfg iwl6005_2agn_cfg = {
Wey-Yi Guy55017ab2010-11-17 12:13:53 -0800346 .name = "Intel(R) Centrino(R) Advanced-N 6205 AGN",
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800347 IWL_DEVICE_6005,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700348 .ht_params = &iwl6000_ht_params,
Jay Sternberg0b5af202010-03-17 16:16:12 -0700349};
350
Johannes Berg706c4ff2012-03-05 11:24:33 -0800351const struct iwl_cfg iwl6005_2abg_cfg = {
Wey-Yi Guy55017ab2010-11-17 12:13:53 -0800352 .name = "Intel(R) Centrino(R) Advanced-N 6205 ABG",
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800353 IWL_DEVICE_6005,
Shanyu Zhao18089722010-05-06 10:15:21 -0700354};
355
Johannes Berg706c4ff2012-03-05 11:24:33 -0800356const struct iwl_cfg iwl6005_2bg_cfg = {
Wey-Yi Guy55017ab2010-11-17 12:13:53 -0800357 .name = "Intel(R) Centrino(R) Advanced-N 6205 BG",
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800358 IWL_DEVICE_6005,
Shanyu Zhao18089722010-05-06 10:15:21 -0700359};
360
Johannes Berg706c4ff2012-03-05 11:24:33 -0800361const struct iwl_cfg iwl6005_2agn_sff_cfg = {
Wey-Yi Guy6a9ae0d2011-08-25 23:10:56 -0700362 .name = "Intel(R) Centrino(R) Advanced-N 6205S AGN",
363 IWL_DEVICE_6005,
364 .ht_params = &iwl6000_ht_params,
365};
366
Johannes Berg706c4ff2012-03-05 11:24:33 -0800367const struct iwl_cfg iwl6005_2agn_d_cfg = {
Wey-Yi Guy5131a602011-10-10 07:27:00 -0700368 .name = "Intel(R) Centrino(R) Advanced-N 6205D AGN",
369 IWL_DEVICE_6005,
370 .ht_params = &iwl6000_ht_params,
371};
372
Johannes Berg706c4ff2012-03-05 11:24:33 -0800373const struct iwl_cfg iwl6005_2agn_mow1_cfg = {
Wey-Yi Guy37891122012-02-22 10:21:09 -0800374 .name = "Intel(R) Centrino(R) Advanced-N 6206 AGN",
375 IWL_DEVICE_6005,
376 .ht_params = &iwl6000_ht_params,
377};
Johannes Berg706c4ff2012-03-05 11:24:33 -0800378
379const struct iwl_cfg iwl6005_2agn_mow2_cfg = {
Wey-Yi Guy37891122012-02-22 10:21:09 -0800380 .name = "Intel(R) Centrino(R) Advanced-N 6207 AGN",
381 IWL_DEVICE_6005,
382 .ht_params = &iwl6000_ht_params,
383};
384
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800385#define IWL_DEVICE_6030 \
Johannes Bergca9a4602011-07-23 10:24:45 -0700386 .fw_name_pre = IWL6030_FW_PRE, \
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800387 .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
Johannes Bergca9a4602011-07-23 10:24:45 -0700388 .ucode_api_ok = IWL6000G2_UCODE_API_OK, \
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800389 .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
Johannes Berg2d771cb2012-04-09 17:47:00 -0700390 .device_family = IWL_DEVICE_FAMILY_6030, \
Emmanuel Grumbachdae66d02012-02-07 12:56:26 +0200391 .max_inst_size = IWL60_RTC_INST_SIZE, \
392 .max_data_size = IWL60_RTC_DATA_SIZE, \
Wey-Yi Guy1956e1a2011-01-08 10:25:14 -0800393 .eeprom_ver = EEPROM_6030_EEPROM_VERSION, \
394 .eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
Wey-Yi Guy90c300c2011-07-07 08:33:01 -0700395 .lib = &iwl6030_lib, \
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800396 .base_params = &iwl6000_g2_base_params, \
397 .bt_params = &iwl6000_bt_params, \
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800398 .need_temp_offset_calib = true, \
399 .led_mode = IWL_LED_RF_STATE, \
Stanislaw Gruszkacd017f22010-12-23 15:12:30 +0100400 .adv_pm = true \
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800401
Johannes Berg706c4ff2012-03-05 11:24:33 -0800402const struct iwl_cfg iwl6030_2agn_cfg = {
Wey-Yi Guyd2eceef2010-11-17 12:13:54 -0800403 .name = "Intel(R) Centrino(R) Advanced-N 6230 AGN",
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800404 IWL_DEVICE_6030,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700405 .ht_params = &iwl6000_ht_params,
Shanyu Zhao18089722010-05-06 10:15:21 -0700406};
407
Johannes Berg706c4ff2012-03-05 11:24:33 -0800408const struct iwl_cfg iwl6030_2abg_cfg = {
Wey-Yi Guyd2eceef2010-11-17 12:13:54 -0800409 .name = "Intel(R) Centrino(R) Advanced-N 6230 ABG",
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800410 IWL_DEVICE_6030,
Shanyu Zhao18089722010-05-06 10:15:21 -0700411};
412
Johannes Berg706c4ff2012-03-05 11:24:33 -0800413const struct iwl_cfg iwl6030_2bgn_cfg = {
Wey-Yi Guyd2eceef2010-11-17 12:13:54 -0800414 .name = "Intel(R) Centrino(R) Advanced-N 6230 BGN",
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800415 IWL_DEVICE_6030,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700416 .ht_params = &iwl6000_ht_params,
Shanyu Zhao9f6e1ba2010-05-11 15:21:54 -0700417};
418
Johannes Berg706c4ff2012-03-05 11:24:33 -0800419const struct iwl_cfg iwl6030_2bg_cfg = {
Wey-Yi Guyd2eceef2010-11-17 12:13:54 -0800420 .name = "Intel(R) Centrino(R) Advanced-N 6230 BG",
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800421 IWL_DEVICE_6030,
Shanyu Zhao18089722010-05-06 10:15:21 -0700422};
423
Johannes Berg706c4ff2012-03-05 11:24:33 -0800424const struct iwl_cfg iwl6035_2agn_cfg = {
Don Fry6195d132011-12-06 10:42:41 -0800425 .name = "Intel(R) Centrino(R) Advanced-N 6235 AGN",
Wey-Yi Guyd103e342011-03-10 03:17:16 -0800426 IWL_DEVICE_6030,
427 .ht_params = &iwl6000_ht_params,
428};
429
Johannes Berg706c4ff2012-03-05 11:24:33 -0800430const struct iwl_cfg iwl1030_bgn_cfg = {
Wey-Yi Guyd2eceef2010-11-17 12:13:54 -0800431 .name = "Intel(R) Centrino(R) Wireless-N 1030 BGN",
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800432 IWL_DEVICE_6030,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700433 .ht_params = &iwl6000_ht_params,
Shanyu Zhao18089722010-05-06 10:15:21 -0700434};
435
Johannes Berg706c4ff2012-03-05 11:24:33 -0800436const struct iwl_cfg iwl1030_bg_cfg = {
Wey-Yi Guyd2eceef2010-11-17 12:13:54 -0800437 .name = "Intel(R) Centrino(R) Wireless-N 1030 BG",
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800438 IWL_DEVICE_6030,
439};
440
Johannes Berg706c4ff2012-03-05 11:24:33 -0800441const struct iwl_cfg iwl130_bgn_cfg = {
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800442 .name = "Intel(R) Centrino(R) Wireless-N 130 BGN",
443 IWL_DEVICE_6030,
444 .ht_params = &iwl6000_ht_params,
445 .rx_with_siso_diversity = true,
446};
447
Johannes Berg706c4ff2012-03-05 11:24:33 -0800448const struct iwl_cfg iwl130_bg_cfg = {
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800449 .name = "Intel(R) Centrino(R) Wireless-N 130 BG",
450 IWL_DEVICE_6030,
451 .rx_with_siso_diversity = true,
Shanyu Zhao18089722010-05-06 10:15:21 -0700452};
453
Shanyu Zhao95b13012010-04-21 11:46:33 -0700454/*
455 * "i": Internal configuration, use internal Power Amplifier
456 */
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800457#define IWL_DEVICE_6000i \
458 .fw_name_pre = IWL6000_FW_PRE, \
459 .ucode_api_max = IWL6000_UCODE_API_MAX, \
Johannes Bergb9148112011-11-04 07:22:37 -0700460 .ucode_api_ok = IWL6000_UCODE_API_OK, \
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800461 .ucode_api_min = IWL6000_UCODE_API_MIN, \
Johannes Berg2d771cb2012-04-09 17:47:00 -0700462 .device_family = IWL_DEVICE_FAMILY_6000i, \
Emmanuel Grumbachdae66d02012-02-07 12:56:26 +0200463 .max_inst_size = IWL60_RTC_INST_SIZE, \
464 .max_data_size = IWL60_RTC_DATA_SIZE, \
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800465 .valid_tx_ant = ANT_BC, /* .cfg overwrite */ \
466 .valid_rx_ant = ANT_BC, /* .cfg overwrite */ \
467 .eeprom_ver = EEPROM_6000_EEPROM_VERSION, \
468 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, \
Wey-Yi Guy90c300c2011-07-07 08:33:01 -0700469 .lib = &iwl6000_lib, \
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800470 .base_params = &iwl6000_base_params, \
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800471 .led_mode = IWL_LED_BLINK
472
Johannes Berg706c4ff2012-03-05 11:24:33 -0800473const struct iwl_cfg iwl6000i_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800474 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800475 IWL_DEVICE_6000i,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700476 .ht_params = &iwl6000_ht_params,
Jay Sternberge1228372009-01-19 15:30:34 -0800477};
478
Johannes Berg706c4ff2012-03-05 11:24:33 -0800479const struct iwl_cfg iwl6000i_2abg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800480 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800481 IWL_DEVICE_6000i,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700482};
483
Johannes Berg706c4ff2012-03-05 11:24:33 -0800484const struct iwl_cfg iwl6000i_2bg_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800485 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800486 IWL_DEVICE_6000i,
Wey-Yi Guy5953a622009-09-17 10:43:53 -0700487};
488
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800489#define IWL_DEVICE_6050 \
490 .fw_name_pre = IWL6050_FW_PRE, \
491 .ucode_api_max = IWL6050_UCODE_API_MAX, \
492 .ucode_api_min = IWL6050_UCODE_API_MIN, \
Johannes Berg2d771cb2012-04-09 17:47:00 -0700493 .device_family = IWL_DEVICE_FAMILY_6050, \
Emmanuel Grumbachdae66d02012-02-07 12:56:26 +0200494 .max_inst_size = IWL60_RTC_INST_SIZE, \
495 .max_data_size = IWL60_RTC_DATA_SIZE, \
Wey-Yi Guyff458ed2011-01-31 13:56:03 -0800496 .valid_tx_ant = ANT_AB, /* .cfg overwrite */ \
497 .valid_rx_ant = ANT_AB, /* .cfg overwrite */ \
Wey-Yi Guy90c300c2011-07-07 08:33:01 -0700498 .lib = &iwl6000_lib, \
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800499 .eeprom_ver = EEPROM_6050_EEPROM_VERSION, \
500 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, \
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800501 .base_params = &iwl6050_base_params, \
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800502 .led_mode = IWL_LED_BLINK, \
503 .internal_wimax_coex = true
504
Johannes Berg706c4ff2012-03-05 11:24:33 -0800505const struct iwl_cfg iwl6050_2agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800506 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800507 IWL_DEVICE_6050,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700508 .ht_params = &iwl6000_ht_params,
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800509};
510
Johannes Berg706c4ff2012-03-05 11:24:33 -0800511const struct iwl_cfg iwl6050_2abg_cfg = {
Wey-Yi Guy65af8de2010-12-08 07:51:50 -0800512 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
513 IWL_DEVICE_6050,
Jay Sternberge1228372009-01-19 15:30:34 -0800514};
515
Wey-Yi Guy11441812011-05-30 09:32:52 -0700516#define IWL_DEVICE_6150 \
517 .fw_name_pre = IWL6050_FW_PRE, \
518 .ucode_api_max = IWL6050_UCODE_API_MAX, \
519 .ucode_api_min = IWL6050_UCODE_API_MIN, \
Johannes Berg2d771cb2012-04-09 17:47:00 -0700520 .device_family = IWL_DEVICE_FAMILY_6150, \
Emmanuel Grumbachdae66d02012-02-07 12:56:26 +0200521 .max_inst_size = IWL60_RTC_INST_SIZE, \
522 .max_data_size = IWL60_RTC_DATA_SIZE, \
Wey-Yi Guy90c300c2011-07-07 08:33:01 -0700523 .lib = &iwl6000_lib, \
Wey-Yi Guy11441812011-05-30 09:32:52 -0700524 .eeprom_ver = EEPROM_6150_EEPROM_VERSION, \
525 .eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION, \
526 .base_params = &iwl6050_base_params, \
Wey-Yi Guy11441812011-05-30 09:32:52 -0700527 .led_mode = IWL_LED_BLINK, \
528 .internal_wimax_coex = true
529
Johannes Berg706c4ff2012-03-05 11:24:33 -0800530const struct iwl_cfg iwl6150_bgn_cfg = {
Wey-Yi Guyf9dc6462010-11-17 12:13:52 -0800531 .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN",
Wey-Yi Guy11441812011-05-30 09:32:52 -0700532 IWL_DEVICE_6150,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700533 .ht_params = &iwl6000_ht_params,
Wey-Yi Guy11441812011-05-30 09:32:52 -0700534};
535
Johannes Berg706c4ff2012-03-05 11:24:33 -0800536const struct iwl_cfg iwl6150_bg_cfg = {
Wey-Yi Guy11441812011-05-30 09:32:52 -0700537 .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BG",
538 IWL_DEVICE_6150,
Shanyu Zhao03264332010-06-29 17:27:27 -0700539};
540
Johannes Berg706c4ff2012-03-05 11:24:33 -0800541const struct iwl_cfg iwl6000_3agn_cfg = {
Shanyu Zhaoc11362c2010-03-05 17:05:20 -0800542 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
Jay Sternberge1228372009-01-19 15:30:34 -0800543 .fw_name_pre = IWL6000_FW_PRE,
544 .ucode_api_max = IWL6000_UCODE_API_MAX,
Johannes Bergb9148112011-11-04 07:22:37 -0700545 .ucode_api_ok = IWL6000_UCODE_API_OK,
Jay Sternberge1228372009-01-19 15:30:34 -0800546 .ucode_api_min = IWL6000_UCODE_API_MIN,
Johannes Berg2d771cb2012-04-09 17:47:00 -0700547 .device_family = IWL_DEVICE_FAMILY_6000,
Emmanuel Grumbachdae66d02012-02-07 12:56:26 +0200548 .max_inst_size = IWL60_RTC_INST_SIZE,
549 .max_data_size = IWL60_RTC_DATA_SIZE,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700550 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
551 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
Wey-Yi Guy90c300c2011-07-07 08:33:01 -0700552 .lib = &iwl6000_lib,
Wey-Yi Guy7cb1b082010-10-06 08:10:00 -0700553 .base_params = &iwl6000_base_params,
554 .ht_params = &iwl6000_ht_params,
Wey-Yi Guy564b3442010-11-09 09:21:34 -0800555 .led_mode = IWL_LED_BLINK,
Jay Sternberge1228372009-01-19 15:30:34 -0800556};
557
Johannes Bergb9148112011-11-04 07:22:37 -0700558MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_OK));
Jay Sternberge1228372009-01-19 15:30:34 -0800559MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
Wey-Yi Guy1956e1a2011-01-08 10:25:14 -0800560MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
561MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));