]>
Commit | Line | Data |
---|---|---|
e1228374 JS |
1 | /****************************************************************************** |
2 | * | |
901069c7 | 3 | * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. |
e1228374 JS |
4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | |
6 | * under the terms of version 2 of the GNU General Public License as | |
7 | * published by the Free Software Foundation. | |
8 | * | |
9 | * This program is distributed in the hope that it will be useful, but WITHOUT | |
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
12 | * more details. | |
13 | * | |
14 | * You should have received a copy of the GNU General Public License along with | |
15 | * this program; if not, write to the Free Software Foundation, Inc., | |
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA | |
17 | * | |
18 | * The full GNU General Public License is included in this distribution in the | |
19 | * file called LICENSE. | |
20 | * | |
21 | * Contact Information: | |
22 | * Intel Linux Wireless <[email protected]> | |
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" | |
a1175124 | 45 | #include "iwl-agn.h" |
e1228374 | 46 | #include "iwl-helpers.h" |
19e6cda0 | 47 | #include "iwl-agn-hw.h" |
f3a2a424 | 48 | #include "iwl-6000-hw.h" |
e1228374 JS |
49 | |
50 | /* Highest firmware API version supported */ | |
fcbaf8b0 | 51 | #define IWL6000_UCODE_API_MAX 4 |
62cb3c6a | 52 | #define IWL6050_UCODE_API_MAX 5 |
670245ed | 53 | #define IWL6000G2_UCODE_API_MAX 5 |
e1228374 JS |
54 | |
55 | /* Lowest firmware API version supported */ | |
44246421 WYG |
56 | #define IWL6000_UCODE_API_MIN 4 |
57 | #define IWL6050_UCODE_API_MIN 4 | |
4b3e8062 | 58 | #define IWL6000G2_UCODE_API_MIN 4 |
e1228374 JS |
59 | |
60 | #define IWL6000_FW_PRE "iwlwifi-6000-" | |
1d5cc555 | 61 | #define IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE #api ".ucode" |
e1228374 JS |
62 | |
63 | #define IWL6050_FW_PRE "iwlwifi-6050-" | |
1d5cc555 | 64 | #define IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE #api ".ucode" |
e1228374 | 65 | |
1956e1ad | 66 | #define IWL6005_FW_PRE "iwlwifi-6000g2a-" |
1d5cc555 | 67 | #define IWL6005_MODULE_FIRMWARE(api) IWL6005_FW_PRE #api ".ucode" |
95b13014 | 68 | |
1956e1ad | 69 | #define IWL6030_FW_PRE "iwlwifi-6000g2b-" |
1d5cc555 | 70 | #define IWL6030_MODULE_FIRMWARE(api) IWL6030_FW_PRE #api ".ucode" |
1808972f | 71 | |
672639de WYG |
72 | static void iwl6000_set_ct_threshold(struct iwl_priv *priv) |
73 | { | |
74 | /* want Celsius */ | |
75 | priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD; | |
76 | priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD; | |
77 | } | |
78 | ||
6b5ce501 | 79 | static void iwl6050_additional_nic_config(struct iwl_priv *priv) |
d5755939 | 80 | { |
6b5ce501 | 81 | /* Indicate calibration version to uCode. */ |
16b80b71 | 82 | if (iwlagn_eeprom_calib_version(priv) >= 6) |
d5755939 AK |
83 | iwl_set_bit(priv, CSR_GP_DRIVER_REG, |
84 | CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); | |
85 | } | |
86 | ||
1956e1ad | 87 | static void iwl6150_additional_nic_config(struct iwl_priv *priv) |
02796d77 SZ |
88 | { |
89 | /* Indicate calibration version to uCode. */ | |
16b80b71 | 90 | if (iwlagn_eeprom_calib_version(priv) >= 6) |
02796d77 SZ |
91 | iwl_set_bit(priv, CSR_GP_DRIVER_REG, |
92 | CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); | |
93 | iwl_set_bit(priv, CSR_GP_DRIVER_REG, | |
94 | CSR_GP_DRIVER_REG_BIT_6050_1x2); | |
95 | } | |
96 | ||
65b7998a WYG |
97 | /* NIC configuration for 6000 series */ |
98 | static void iwl6000_nic_config(struct iwl_priv *priv) | |
99 | { | |
9371d4ed WYG |
100 | u16 radio_cfg; |
101 | ||
102 | radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG); | |
103 | ||
104 | /* write radio config values to register */ | |
105 | if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) <= EEPROM_RF_CONFIG_TYPE_MAX) | |
106 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, | |
107 | EEPROM_RF_CFG_TYPE_MSK(radio_cfg) | | |
108 | EEPROM_RF_CFG_STEP_MSK(radio_cfg) | | |
109 | EEPROM_RF_CFG_DASH_MSK(radio_cfg)); | |
110 | ||
111 | /* set CSR_HW_CONFIG_REG for uCode use */ | |
112 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, | |
113 | CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI | | |
114 | CSR_HW_IF_CONFIG_REG_BIT_MAC_SI); | |
65b7998a WYG |
115 | |
116 | /* no locking required for register write */ | |
740e7f51 | 117 | if (priv->cfg->pa_type == IWL_PA_INTERNAL) { |
65b7998a WYG |
118 | /* 2x2 IPA phy type */ |
119 | iwl_write32(priv, CSR_GP_DRIVER_REG, | |
120 | CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA); | |
121 | } | |
6b5ce501 SZ |
122 | /* do additional nic configuration if needed */ |
123 | if (priv->cfg->ops->nic && | |
124 | priv->cfg->ops->nic->additional_nic_config) { | |
125 | priv->cfg->ops->nic->additional_nic_config(priv); | |
126 | } | |
65b7998a WYG |
127 | } |
128 | ||
f3a2a424 WYG |
129 | static struct iwl_sensitivity_ranges iwl6000_sensitivity = { |
130 | .min_nrg_cck = 97, | |
131 | .max_nrg_cck = 0, /* not used, set to 0 */ | |
132 | .auto_corr_min_ofdm = 80, | |
133 | .auto_corr_min_ofdm_mrc = 128, | |
134 | .auto_corr_min_ofdm_x1 = 105, | |
135 | .auto_corr_min_ofdm_mrc_x1 = 192, | |
136 | ||
137 | .auto_corr_max_ofdm = 145, | |
138 | .auto_corr_max_ofdm_mrc = 232, | |
2494f63c | 139 | .auto_corr_max_ofdm_x1 = 110, |
f3a2a424 WYG |
140 | .auto_corr_max_ofdm_mrc_x1 = 232, |
141 | ||
142 | .auto_corr_min_cck = 125, | |
143 | .auto_corr_max_cck = 175, | |
144 | .auto_corr_min_cck_mrc = 160, | |
145 | .auto_corr_max_cck_mrc = 310, | |
146 | .nrg_th_cck = 97, | |
147 | .nrg_th_ofdm = 100, | |
55036d66 WYG |
148 | |
149 | .barker_corr_th_min = 190, | |
150 | .barker_corr_th_min_mrc = 390, | |
151 | .nrg_th_cca = 62, | |
f3a2a424 WYG |
152 | }; |
153 | ||
154 | static int iwl6000_hw_set_hw_params(struct iwl_priv *priv) | |
155 | { | |
9d143e9a DF |
156 | if (iwlagn_mod_params.num_of_queues >= IWL_MIN_NUM_QUEUES && |
157 | iwlagn_mod_params.num_of_queues <= IWLAGN_NUM_QUEUES) | |
7cb1b088 | 158 | priv->cfg->base_params->num_of_queues = |
9d143e9a | 159 | iwlagn_mod_params.num_of_queues; |
f3a2a424 | 160 | |
7cb1b088 | 161 | priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues; |
f3a2a424 WYG |
162 | priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; |
163 | priv->hw_params.scd_bc_tbls_size = | |
7cb1b088 | 164 | priv->cfg->base_params->num_of_queues * |
19e6cda0 | 165 | sizeof(struct iwlagn_scd_bc_tbl); |
f3a2a424 | 166 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); |
bf3c7fdd | 167 | priv->hw_params.max_stations = IWLAGN_STATION_COUNT; |
a194e324 | 168 | priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID; |
f3a2a424 WYG |
169 | |
170 | priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE; | |
171 | priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE; | |
172 | ||
f3a2a424 WYG |
173 | priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) | |
174 | BIT(IEEE80211_BAND_5GHZ); | |
175 | priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR; | |
176 | ||
177 | priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant); | |
17423ea8 WYG |
178 | if (priv->cfg->rx_with_siso_diversity) |
179 | priv->hw_params.rx_chains_num = 1; | |
180 | else | |
181 | priv->hw_params.rx_chains_num = | |
182 | num_of_ant(priv->cfg->valid_rx_ant); | |
f3a2a424 WYG |
183 | priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant; |
184 | priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant; | |
185 | ||
0453674c | 186 | iwl6000_set_ct_threshold(priv); |
f3a2a424 WYG |
187 | |
188 | /* Set initial sensitivity parameters */ | |
189 | /* Set initial calibration set */ | |
190 | priv->hw_params.sens = &iwl6000_sensitivity; | |
e517736a WYG |
191 | priv->hw_params.calib_init_cfg = |
192 | BIT(IWL_CALIB_XTAL) | | |
193 | BIT(IWL_CALIB_LO) | | |
194 | BIT(IWL_CALIB_TX_IQ) | | |
195 | BIT(IWL_CALIB_BASE_BAND); | |
178d1596 | 196 | if (priv->cfg->need_dc_calib) |
6d6a1afd | 197 | priv->hw_params.calib_rt_cfg |= BIT(IWL_CALIB_CFG_DC_IDX); |
bf53f939 SZ |
198 | if (priv->cfg->need_temp_offset_calib) |
199 | priv->hw_params.calib_init_cfg |= BIT(IWL_CALIB_TEMP_OFFSET); | |
07f33f92 | 200 | |
a0ee74cf WYG |
201 | priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS; |
202 | ||
f3a2a424 WYG |
203 | return 0; |
204 | } | |
205 | ||
79d07325 WYG |
206 | static int iwl6000_hw_channel_switch(struct iwl_priv *priv, |
207 | struct ieee80211_channel_switch *ch_switch) | |
4a56e965 | 208 | { |
246ed355 JB |
209 | /* |
210 | * MULTI-FIXME | |
211 | * See iwl_mac_channel_switch. | |
212 | */ | |
213 | struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; | |
4a56e965 WYG |
214 | struct iwl6000_channel_switch_cmd cmd; |
215 | const struct iwl_channel_info *ch_info; | |
79d07325 WYG |
216 | u32 switch_time_in_usec, ucode_switch_time; |
217 | u16 ch; | |
218 | u32 tsf_low; | |
219 | u8 switch_count; | |
246ed355 | 220 | u16 beacon_interval = le16_to_cpu(ctx->timing.beacon_interval); |
8bd413e6 | 221 | struct ieee80211_vif *vif = ctx->vif; |
4a56e965 WYG |
222 | struct iwl_host_cmd hcmd = { |
223 | .id = REPLY_CHANNEL_SWITCH, | |
3fa50738 | 224 | .len = { sizeof(cmd), }, |
3839f7ce | 225 | .flags = CMD_SYNC, |
3fa50738 | 226 | .data = { &cmd, }, |
4a56e965 WYG |
227 | }; |
228 | ||
4a56e965 | 229 | cmd.band = priv->band == IEEE80211_BAND_2GHZ; |
81e95430 | 230 | ch = ch_switch->channel->hw_value; |
79d07325 | 231 | IWL_DEBUG_11H(priv, "channel switch from %u to %u\n", |
246ed355 | 232 | ctx->active.channel, ch); |
79d07325 | 233 | cmd.channel = cpu_to_le16(ch); |
246ed355 JB |
234 | cmd.rxon_flags = ctx->staging.flags; |
235 | cmd.rxon_filter_flags = ctx->staging.filter_flags; | |
79d07325 WYG |
236 | switch_count = ch_switch->count; |
237 | tsf_low = ch_switch->timestamp & 0x0ffffffff; | |
238 | /* | |
239 | * calculate the ucode channel switch time | |
240 | * adding TSF as one of the factor for when to switch | |
241 | */ | |
242 | if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) { | |
243 | if (switch_count > ((priv->ucode_beacon_time - tsf_low) / | |
244 | beacon_interval)) { | |
245 | switch_count -= (priv->ucode_beacon_time - | |
246 | tsf_low) / beacon_interval; | |
247 | } else | |
248 | switch_count = 0; | |
249 | } | |
250 | if (switch_count <= 1) | |
251 | cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time); | |
252 | else { | |
253 | switch_time_in_usec = | |
254 | vif->bss_conf.beacon_int * switch_count * TIME_UNIT; | |
255 | ucode_switch_time = iwl_usecs_to_beacons(priv, | |
256 | switch_time_in_usec, | |
257 | beacon_interval); | |
258 | cmd.switch_time = iwl_add_beacon_time(priv, | |
259 | priv->ucode_beacon_time, | |
260 | ucode_switch_time, | |
261 | beacon_interval); | |
262 | } | |
263 | IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n", | |
264 | cmd.switch_time); | |
265 | ch_info = iwl_get_channel_info(priv, priv->band, ch); | |
4a56e965 WYG |
266 | if (ch_info) |
267 | cmd.expect_beacon = is_channel_radar(ch_info); | |
268 | else { | |
269 | IWL_ERR(priv, "invalid channel switch from %u to %u\n", | |
246ed355 | 270 | ctx->active.channel, ch); |
4a56e965 WYG |
271 | return -EFAULT; |
272 | } | |
273 | ||
274 | return iwl_send_cmd_sync(priv, &hcmd); | |
275 | } | |
276 | ||
672639de | 277 | static struct iwl_lib_ops iwl6000_lib = { |
f3a2a424 | 278 | .set_hw_params = iwl6000_hw_set_hw_params, |
e04ed0a5 WYG |
279 | .rx_handler_setup = iwlagn_rx_handler_setup, |
280 | .setup_deferred_work = iwlagn_setup_deferred_work, | |
281 | .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr, | |
e04ed0a5 | 282 | .send_tx_power = iwlagn_send_tx_power, |
672639de | 283 | .update_chain_flags = iwl_update_chain_flags, |
4a56e965 | 284 | .set_channel_switch = iwl6000_hw_channel_switch, |
672639de | 285 | .apm_ops = { |
fadb3582 | 286 | .init = iwl_apm_init, |
65b7998a | 287 | .config = iwl6000_nic_config, |
672639de WYG |
288 | }, |
289 | .eeprom_ops = { | |
290 | .regulatory_bands = { | |
e04ed0a5 WYG |
291 | EEPROM_REG_BAND_1_CHANNELS, |
292 | EEPROM_REG_BAND_2_CHANNELS, | |
293 | EEPROM_REG_BAND_3_CHANNELS, | |
294 | EEPROM_REG_BAND_4_CHANNELS, | |
295 | EEPROM_REG_BAND_5_CHANNELS, | |
f2fa1b01 | 296 | EEPROM_6000_REG_BAND_24_HT40_CHANNELS, |
e04ed0a5 | 297 | EEPROM_REG_BAND_52_HT40_CHANNELS |
672639de | 298 | }, |
e04ed0a5 | 299 | .query_addr = iwlagn_eeprom_query_addr, |
ab9fd1bf | 300 | .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower, |
672639de | 301 | }, |
672639de | 302 | .temp_ops = { |
e04ed0a5 | 303 | .temperature = iwlagn_temperature, |
672639de | 304 | }, |
716c74b0 | 305 | .txfifo_flush = iwlagn_txfifo_flush, |
65550636 | 306 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, |
672639de WYG |
307 | }; |
308 | ||
1956e1ad | 309 | static struct iwl_lib_ops iwl6030_lib = { |
9e4afc21 | 310 | .set_hw_params = iwl6000_hw_set_hw_params, |
b6e116e8 WYG |
311 | .rx_handler_setup = iwlagn_bt_rx_handler_setup, |
312 | .setup_deferred_work = iwlagn_bt_setup_deferred_work, | |
313 | .cancel_deferred_work = iwlagn_bt_cancel_deferred_work, | |
9e4afc21 | 314 | .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr, |
9e4afc21 JB |
315 | .send_tx_power = iwlagn_send_tx_power, |
316 | .update_chain_flags = iwl_update_chain_flags, | |
317 | .set_channel_switch = iwl6000_hw_channel_switch, | |
318 | .apm_ops = { | |
319 | .init = iwl_apm_init, | |
9e4afc21 | 320 | .config = iwl6000_nic_config, |
9e4afc21 JB |
321 | }, |
322 | .eeprom_ops = { | |
323 | .regulatory_bands = { | |
324 | EEPROM_REG_BAND_1_CHANNELS, | |
325 | EEPROM_REG_BAND_2_CHANNELS, | |
326 | EEPROM_REG_BAND_3_CHANNELS, | |
327 | EEPROM_REG_BAND_4_CHANNELS, | |
328 | EEPROM_REG_BAND_5_CHANNELS, | |
329 | EEPROM_6000_REG_BAND_24_HT40_CHANNELS, | |
330 | EEPROM_REG_BAND_52_HT40_CHANNELS | |
331 | }, | |
9e4afc21 JB |
332 | .query_addr = iwlagn_eeprom_query_addr, |
333 | .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower, | |
334 | }, | |
9e4afc21 JB |
335 | .temp_ops = { |
336 | .temperature = iwlagn_temperature, | |
9e4afc21 | 337 | }, |
9e4afc21 JB |
338 | .txfifo_flush = iwlagn_txfifo_flush, |
339 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, | |
9e4afc21 JB |
340 | }; |
341 | ||
6b5ce501 SZ |
342 | static struct iwl_nic_ops iwl6050_nic_ops = { |
343 | .additional_nic_config = &iwl6050_additional_nic_config, | |
344 | }; | |
345 | ||
1956e1ad WYG |
346 | static struct iwl_nic_ops iwl6150_nic_ops = { |
347 | .additional_nic_config = &iwl6150_additional_nic_config, | |
02796d77 SZ |
348 | }; |
349 | ||
45d5d805 | 350 | static const struct iwl_ops iwl6000_ops = { |
672639de | 351 | .lib = &iwl6000_lib, |
7dc77dba WYG |
352 | .hcmd = &iwlagn_hcmd, |
353 | .utils = &iwlagn_hcmd_utils, | |
29f35c14 JS |
354 | }; |
355 | ||
6b5ce501 SZ |
356 | static const struct iwl_ops iwl6050_ops = { |
357 | .lib = &iwl6000_lib, | |
358 | .hcmd = &iwlagn_hcmd, | |
359 | .utils = &iwlagn_hcmd_utils, | |
6b5ce501 SZ |
360 | .nic = &iwl6050_nic_ops, |
361 | }; | |
362 | ||
1956e1ad | 363 | static const struct iwl_ops iwl6150_ops = { |
02796d77 SZ |
364 | .lib = &iwl6000_lib, |
365 | .hcmd = &iwlagn_hcmd, | |
366 | .utils = &iwlagn_hcmd_utils, | |
1956e1ad | 367 | .nic = &iwl6150_nic_ops, |
02796d77 SZ |
368 | }; |
369 | ||
1956e1ad WYG |
370 | static const struct iwl_ops iwl6030_ops = { |
371 | .lib = &iwl6030_lib, | |
b6e116e8 | 372 | .hcmd = &iwlagn_bt_hcmd, |
1808972f | 373 | .utils = &iwlagn_hcmd_utils, |
1808972f SZ |
374 | }; |
375 | ||
7cb1b088 | 376 | static struct iwl_base_params iwl6000_base_params = { |
0b5af201 | 377 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
0b5af201 JS |
378 | .num_of_queues = IWLAGN_NUM_QUEUES, |
379 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
0b5af201 | 380 | .pll_cfg_val = 0, |
0b5af201 JS |
381 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, |
382 | .shadow_ram_support = true, | |
0b5af201 | 383 | .led_compensation = 51, |
0b5af201 | 384 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
0b5af201 JS |
385 | .adv_thermal_throttle = true, |
386 | .support_ct_kill_exit = true, | |
387 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | |
388 | .chain_noise_scale = 1000, | |
22de94de | 389 | .wd_timeout = IWL_DEF_WD_TIMEOUT, |
95b13014 | 390 | .max_event_log_size = 512, |
f81c1f48 | 391 | .shadow_reg_enable = true, |
0b5af201 JS |
392 | }; |
393 | ||
7cb1b088 | 394 | static struct iwl_base_params iwl6050_base_params = { |
1808972f | 395 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
1808972f SZ |
396 | .num_of_queues = IWLAGN_NUM_QUEUES, |
397 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
1808972f | 398 | .pll_cfg_val = 0, |
7cb1b088 | 399 | .max_ll_items = OTP_MAX_LL_ITEMS_6x50, |
1808972f SZ |
400 | .shadow_ram_support = true, |
401 | .led_compensation = 51, | |
402 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | |
1808972f SZ |
403 | .adv_thermal_throttle = true, |
404 | .support_ct_kill_exit = true, | |
405 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | |
7cb1b088 | 406 | .chain_noise_scale = 1500, |
22de94de | 407 | .wd_timeout = IWL_DEF_WD_TIMEOUT, |
7cb1b088 | 408 | .max_event_log_size = 1024, |
f81c1f48 | 409 | .shadow_reg_enable = true, |
7cb1b088 | 410 | }; |
4fb33244 | 411 | static struct iwl_base_params iwl6000_g2_base_params = { |
de05ead8 WYG |
412 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
413 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
414 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
415 | .pll_cfg_val = 0, | |
de05ead8 WYG |
416 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, |
417 | .shadow_ram_support = true, | |
4fb33244 | 418 | .led_compensation = 57, |
de05ead8 | 419 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
de05ead8 WYG |
420 | .adv_thermal_throttle = true, |
421 | .support_ct_kill_exit = true, | |
422 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | |
423 | .chain_noise_scale = 1000, | |
22de94de | 424 | .wd_timeout = IWL_LONG_WD_TIMEOUT, |
de05ead8 | 425 | .max_event_log_size = 512, |
f81c1f48 | 426 | .shadow_reg_enable = true, |
de05ead8 | 427 | }; |
7cb1b088 WYG |
428 | |
429 | static struct iwl_ht_params iwl6000_ht_params = { | |
430 | .ht_greenfield_support = true, | |
431 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | |
432 | }; | |
433 | ||
434 | static struct iwl_bt_params iwl6000_bt_params = { | |
7cb1b088 WYG |
435 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
436 | .advanced_bt_coexist = true, | |
66e863a5 | 437 | .agg_time_limit = BT_AGG_THRESHOLD_DEF, |
7cb1b088 WYG |
438 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, |
439 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, | |
e366176e | 440 | .bt_sco_disable = true, |
7cb1b088 WYG |
441 | }; |
442 | ||
65af8dea | 443 | #define IWL_DEVICE_6005 \ |
1956e1ad | 444 | .fw_name_pre = IWL6005_FW_PRE, \ |
65af8dea WYG |
445 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, \ |
446 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, \ | |
1956e1ad WYG |
447 | .eeprom_ver = EEPROM_6005_EEPROM_VERSION, \ |
448 | .eeprom_calib_ver = EEPROM_6005_TX_POWER_VERSION, \ | |
65af8dea | 449 | .ops = &iwl6000_ops, \ |
65af8dea WYG |
450 | .base_params = &iwl6000_g2_base_params, \ |
451 | .need_dc_calib = true, \ | |
452 | .need_temp_offset_calib = true, \ | |
453 | .led_mode = IWL_LED_RF_STATE | |
454 | ||
8b3ee296 | 455 | struct iwl_cfg iwl6005_2agn_cfg = { |
55017ab8 | 456 | .name = "Intel(R) Centrino(R) Advanced-N 6205 AGN", |
65af8dea | 457 | IWL_DEVICE_6005, |
7cb1b088 | 458 | .ht_params = &iwl6000_ht_params, |
7cb1b088 WYG |
459 | }; |
460 | ||
8b3ee296 | 461 | struct iwl_cfg iwl6005_2abg_cfg = { |
55017ab8 | 462 | .name = "Intel(R) Centrino(R) Advanced-N 6205 ABG", |
65af8dea | 463 | IWL_DEVICE_6005, |
1808972f SZ |
464 | }; |
465 | ||
8b3ee296 | 466 | struct iwl_cfg iwl6005_2bg_cfg = { |
55017ab8 | 467 | .name = "Intel(R) Centrino(R) Advanced-N 6205 BG", |
65af8dea WYG |
468 | IWL_DEVICE_6005, |
469 | }; | |
470 | ||
471 | #define IWL_DEVICE_6030 \ | |
1956e1ad | 472 | .fw_name_pre = IWL6030_FW_PRE, \ |
65af8dea WYG |
473 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, \ |
474 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, \ | |
1956e1ad WYG |
475 | .eeprom_ver = EEPROM_6030_EEPROM_VERSION, \ |
476 | .eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION, \ | |
477 | .ops = &iwl6030_ops, \ | |
65af8dea WYG |
478 | .base_params = &iwl6000_g2_base_params, \ |
479 | .bt_params = &iwl6000_bt_params, \ | |
480 | .need_dc_calib = true, \ | |
481 | .need_temp_offset_calib = true, \ | |
482 | .led_mode = IWL_LED_RF_STATE, \ | |
cd017f25 | 483 | .adv_pm = true \ |
1808972f | 484 | |
8b3ee296 | 485 | struct iwl_cfg iwl6030_2agn_cfg = { |
d2eceef0 | 486 | .name = "Intel(R) Centrino(R) Advanced-N 6230 AGN", |
65af8dea | 487 | IWL_DEVICE_6030, |
7cb1b088 | 488 | .ht_params = &iwl6000_ht_params, |
1808972f SZ |
489 | }; |
490 | ||
8b3ee296 | 491 | struct iwl_cfg iwl6030_2abg_cfg = { |
d2eceef0 | 492 | .name = "Intel(R) Centrino(R) Advanced-N 6230 ABG", |
65af8dea | 493 | IWL_DEVICE_6030, |
1808972f SZ |
494 | }; |
495 | ||
8b3ee296 | 496 | struct iwl_cfg iwl6030_2bgn_cfg = { |
d2eceef0 | 497 | .name = "Intel(R) Centrino(R) Advanced-N 6230 BGN", |
65af8dea | 498 | IWL_DEVICE_6030, |
7cb1b088 | 499 | .ht_params = &iwl6000_ht_params, |
9f6e1baf SZ |
500 | }; |
501 | ||
8b3ee296 | 502 | struct iwl_cfg iwl6030_2bg_cfg = { |
d2eceef0 | 503 | .name = "Intel(R) Centrino(R) Advanced-N 6230 BG", |
65af8dea | 504 | IWL_DEVICE_6030, |
1808972f SZ |
505 | }; |
506 | ||
d103e344 WYG |
507 | struct iwl_cfg iwl6035_2agn_cfg = { |
508 | .name = "6035 Series 2x2 AGN/BT", | |
509 | IWL_DEVICE_6030, | |
510 | .ht_params = &iwl6000_ht_params, | |
511 | }; | |
512 | ||
513 | struct iwl_cfg iwl6035_2abg_cfg = { | |
514 | .name = "6035 Series 2x2 ABG/BT", | |
515 | IWL_DEVICE_6030, | |
516 | }; | |
517 | ||
518 | struct iwl_cfg iwl6035_2bg_cfg = { | |
519 | .name = "6035 Series 2x2 BG/BT", | |
520 | IWL_DEVICE_6030, | |
521 | }; | |
522 | ||
8b3ee296 | 523 | struct iwl_cfg iwl1030_bgn_cfg = { |
d2eceef0 | 524 | .name = "Intel(R) Centrino(R) Wireless-N 1030 BGN", |
65af8dea | 525 | IWL_DEVICE_6030, |
7cb1b088 | 526 | .ht_params = &iwl6000_ht_params, |
1808972f SZ |
527 | }; |
528 | ||
8b3ee296 | 529 | struct iwl_cfg iwl1030_bg_cfg = { |
d2eceef0 | 530 | .name = "Intel(R) Centrino(R) Wireless-N 1030 BG", |
65af8dea WYG |
531 | IWL_DEVICE_6030, |
532 | }; | |
533 | ||
534 | struct iwl_cfg iwl130_bgn_cfg = { | |
535 | .name = "Intel(R) Centrino(R) Wireless-N 130 BGN", | |
536 | IWL_DEVICE_6030, | |
537 | .ht_params = &iwl6000_ht_params, | |
538 | .rx_with_siso_diversity = true, | |
539 | }; | |
540 | ||
541 | struct iwl_cfg iwl130_bg_cfg = { | |
542 | .name = "Intel(R) Centrino(R) Wireless-N 130 BG", | |
543 | IWL_DEVICE_6030, | |
544 | .rx_with_siso_diversity = true, | |
1808972f SZ |
545 | }; |
546 | ||
95b13014 SZ |
547 | /* |
548 | * "i": Internal configuration, use internal Power Amplifier | |
549 | */ | |
65af8dea WYG |
550 | #define IWL_DEVICE_6000i \ |
551 | .fw_name_pre = IWL6000_FW_PRE, \ | |
552 | .ucode_api_max = IWL6000_UCODE_API_MAX, \ | |
553 | .ucode_api_min = IWL6000_UCODE_API_MIN, \ | |
554 | .valid_tx_ant = ANT_BC, /* .cfg overwrite */ \ | |
555 | .valid_rx_ant = ANT_BC, /* .cfg overwrite */ \ | |
556 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, \ | |
557 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, \ | |
558 | .ops = &iwl6000_ops, \ | |
65af8dea WYG |
559 | .base_params = &iwl6000_base_params, \ |
560 | .pa_type = IWL_PA_INTERNAL, \ | |
561 | .led_mode = IWL_LED_BLINK | |
562 | ||
65b7998a | 563 | struct iwl_cfg iwl6000i_2agn_cfg = { |
c11362c0 | 564 | .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN", |
65af8dea | 565 | IWL_DEVICE_6000i, |
7cb1b088 | 566 | .ht_params = &iwl6000_ht_params, |
e1228374 JS |
567 | }; |
568 | ||
5953a62e | 569 | struct iwl_cfg iwl6000i_2abg_cfg = { |
c11362c0 | 570 | .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG", |
65af8dea | 571 | IWL_DEVICE_6000i, |
5953a62e WYG |
572 | }; |
573 | ||
574 | struct iwl_cfg iwl6000i_2bg_cfg = { | |
c11362c0 | 575 | .name = "Intel(R) Centrino(R) Advanced-N 6200 BG", |
65af8dea WYG |
576 | IWL_DEVICE_6000i, |
577 | }; | |
578 | ||
579 | #define IWL_DEVICE_6050 \ | |
580 | .fw_name_pre = IWL6050_FW_PRE, \ | |
581 | .ucode_api_max = IWL6050_UCODE_API_MAX, \ | |
582 | .ucode_api_min = IWL6050_UCODE_API_MIN, \ | |
ff458edc WYG |
583 | .valid_tx_ant = ANT_AB, /* .cfg overwrite */ \ |
584 | .valid_rx_ant = ANT_AB, /* .cfg overwrite */ \ | |
65af8dea WYG |
585 | .ops = &iwl6050_ops, \ |
586 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, \ | |
587 | .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, \ | |
65af8dea WYG |
588 | .base_params = &iwl6050_base_params, \ |
589 | .need_dc_calib = true, \ | |
590 | .led_mode = IWL_LED_BLINK, \ | |
591 | .internal_wimax_coex = true | |
5953a62e | 592 | |
e1228374 | 593 | struct iwl_cfg iwl6050_2agn_cfg = { |
c11362c0 | 594 | .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN", |
65af8dea | 595 | IWL_DEVICE_6050, |
7cb1b088 | 596 | .ht_params = &iwl6000_ht_params, |
65af8dea WYG |
597 | }; |
598 | ||
599 | struct iwl_cfg iwl6050_2abg_cfg = { | |
600 | .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG", | |
601 | IWL_DEVICE_6050, | |
03264339 SZ |
602 | }; |
603 | ||
1144181c WYG |
604 | #define IWL_DEVICE_6150 \ |
605 | .fw_name_pre = IWL6050_FW_PRE, \ | |
606 | .ucode_api_max = IWL6050_UCODE_API_MAX, \ | |
607 | .ucode_api_min = IWL6050_UCODE_API_MIN, \ | |
608 | .ops = &iwl6150_ops, \ | |
609 | .eeprom_ver = EEPROM_6150_EEPROM_VERSION, \ | |
610 | .eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION, \ | |
611 | .base_params = &iwl6050_base_params, \ | |
612 | .need_dc_calib = true, \ | |
613 | .led_mode = IWL_LED_BLINK, \ | |
614 | .internal_wimax_coex = true | |
615 | ||
8b3ee296 | 616 | struct iwl_cfg iwl6150_bgn_cfg = { |
f9dc6467 | 617 | .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN", |
1144181c | 618 | IWL_DEVICE_6150, |
7cb1b088 | 619 | .ht_params = &iwl6000_ht_params, |
1144181c WYG |
620 | }; |
621 | ||
622 | struct iwl_cfg iwl6150_bg_cfg = { | |
623 | .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BG", | |
624 | IWL_DEVICE_6150, | |
e1228374 JS |
625 | }; |
626 | ||
627 | struct iwl_cfg iwl6000_3agn_cfg = { | |
c11362c0 | 628 | .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN", |
e1228374 JS |
629 | .fw_name_pre = IWL6000_FW_PRE, |
630 | .ucode_api_max = IWL6000_UCODE_API_MAX, | |
631 | .ucode_api_min = IWL6000_UCODE_API_MIN, | |
1f4b9665 | 632 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, |
00e70590 | 633 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, |
7cb1b088 | 634 | .ops = &iwl6000_ops, |
7cb1b088 WYG |
635 | .base_params = &iwl6000_base_params, |
636 | .ht_params = &iwl6000_ht_params, | |
637 | .need_dc_calib = true, | |
564b344c | 638 | .led_mode = IWL_LED_BLINK, |
e1228374 JS |
639 | }; |
640 | ||
e1228374 JS |
641 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); |
642 | MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX)); | |
1956e1ad WYG |
643 | MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX)); |
644 | MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX)); |