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