Commit | Line | Data |
---|---|---|
e1228374 JS |
1 | /****************************************************************************** |
2 | * | |
1f447808 | 3 | * Copyright(c) 2008 - 2010 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 <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" | |
45 | #include "iwl-helpers.h" | |
46 | #include "iwl-5000-hw.h" | |
f3a2a424 | 47 | #include "iwl-6000-hw.h" |
e932a609 | 48 | #include "iwl-agn-led.h" |
e1228374 JS |
49 | |
50 | /* Highest firmware API version supported */ | |
fcbaf8b0 WYG |
51 | #define IWL6000_UCODE_API_MAX 4 |
52 | #define IWL6050_UCODE_API_MAX 4 | |
e1228374 JS |
53 | |
54 | /* Lowest firmware API version supported */ | |
44246421 WYG |
55 | #define IWL6000_UCODE_API_MIN 4 |
56 | #define IWL6050_UCODE_API_MIN 4 | |
e1228374 JS |
57 | |
58 | #define IWL6000_FW_PRE "iwlwifi-6000-" | |
59 | #define _IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE #api ".ucode" | |
60 | #define IWL6000_MODULE_FIRMWARE(api) _IWL6000_MODULE_FIRMWARE(api) | |
61 | ||
62 | #define IWL6050_FW_PRE "iwlwifi-6050-" | |
63 | #define _IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE #api ".ucode" | |
64 | #define IWL6050_MODULE_FIRMWARE(api) _IWL6050_MODULE_FIRMWARE(api) | |
65 | ||
672639de WYG |
66 | static void iwl6000_set_ct_threshold(struct iwl_priv *priv) |
67 | { | |
68 | /* want Celsius */ | |
69 | priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD; | |
70 | priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD; | |
71 | } | |
72 | ||
d5755939 AK |
73 | /* Indicate calibration version to uCode. */ |
74 | static void iwl6050_set_calib_version(struct iwl_priv *priv) | |
75 | { | |
76 | if (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6) | |
77 | iwl_set_bit(priv, CSR_GP_DRIVER_REG, | |
78 | CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); | |
79 | } | |
80 | ||
65b7998a WYG |
81 | /* NIC configuration for 6000 series */ |
82 | static void iwl6000_nic_config(struct iwl_priv *priv) | |
83 | { | |
9371d4ed WYG |
84 | u16 radio_cfg; |
85 | ||
86 | radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG); | |
87 | ||
88 | /* write radio config values to register */ | |
89 | if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) <= EEPROM_RF_CONFIG_TYPE_MAX) | |
90 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, | |
91 | EEPROM_RF_CFG_TYPE_MSK(radio_cfg) | | |
92 | EEPROM_RF_CFG_STEP_MSK(radio_cfg) | | |
93 | EEPROM_RF_CFG_DASH_MSK(radio_cfg)); | |
94 | ||
95 | /* set CSR_HW_CONFIG_REG for uCode use */ | |
96 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, | |
97 | CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI | | |
98 | CSR_HW_IF_CONFIG_REG_BIT_MAC_SI); | |
65b7998a WYG |
99 | |
100 | /* no locking required for register write */ | |
740e7f51 | 101 | if (priv->cfg->pa_type == IWL_PA_INTERNAL) { |
65b7998a WYG |
102 | /* 2x2 IPA phy type */ |
103 | iwl_write32(priv, CSR_GP_DRIVER_REG, | |
104 | CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA); | |
105 | } | |
106 | /* else do nothing, uCode configured */ | |
d5755939 AK |
107 | if (priv->cfg->ops->lib->temp_ops.set_calib_version) |
108 | priv->cfg->ops->lib->temp_ops.set_calib_version(priv); | |
65b7998a WYG |
109 | } |
110 | ||
f3a2a424 WYG |
111 | static struct iwl_sensitivity_ranges iwl6000_sensitivity = { |
112 | .min_nrg_cck = 97, | |
113 | .max_nrg_cck = 0, /* not used, set to 0 */ | |
114 | .auto_corr_min_ofdm = 80, | |
115 | .auto_corr_min_ofdm_mrc = 128, | |
116 | .auto_corr_min_ofdm_x1 = 105, | |
117 | .auto_corr_min_ofdm_mrc_x1 = 192, | |
118 | ||
119 | .auto_corr_max_ofdm = 145, | |
120 | .auto_corr_max_ofdm_mrc = 232, | |
2494f63c | 121 | .auto_corr_max_ofdm_x1 = 110, |
f3a2a424 WYG |
122 | .auto_corr_max_ofdm_mrc_x1 = 232, |
123 | ||
124 | .auto_corr_min_cck = 125, | |
125 | .auto_corr_max_cck = 175, | |
126 | .auto_corr_min_cck_mrc = 160, | |
127 | .auto_corr_max_cck_mrc = 310, | |
128 | .nrg_th_cck = 97, | |
129 | .nrg_th_ofdm = 100, | |
55036d66 WYG |
130 | |
131 | .barker_corr_th_min = 190, | |
132 | .barker_corr_th_min_mrc = 390, | |
133 | .nrg_th_cca = 62, | |
f3a2a424 WYG |
134 | }; |
135 | ||
136 | static int iwl6000_hw_set_hw_params(struct iwl_priv *priv) | |
137 | { | |
88804e2b WYG |
138 | if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && |
139 | priv->cfg->mod_params->num_of_queues <= IWL50_NUM_QUEUES) | |
140 | priv->cfg->num_of_queues = | |
141 | priv->cfg->mod_params->num_of_queues; | |
f3a2a424 | 142 | |
88804e2b | 143 | priv->hw_params.max_txq_num = priv->cfg->num_of_queues; |
f3a2a424 WYG |
144 | priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; |
145 | priv->hw_params.scd_bc_tbls_size = | |
88804e2b WYG |
146 | priv->cfg->num_of_queues * |
147 | sizeof(struct iwl5000_scd_bc_tbl); | |
f3a2a424 WYG |
148 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); |
149 | priv->hw_params.max_stations = IWL5000_STATION_COUNT; | |
150 | priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID; | |
151 | ||
152 | priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE; | |
153 | priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE; | |
154 | ||
155 | priv->hw_params.max_bsm_size = 0; | |
156 | priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) | | |
157 | BIT(IEEE80211_BAND_5GHZ); | |
158 | priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR; | |
159 | ||
160 | priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant); | |
161 | priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant); | |
162 | priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant; | |
163 | priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant; | |
164 | ||
165 | if (priv->cfg->ops->lib->temp_ops.set_ct_kill) | |
166 | priv->cfg->ops->lib->temp_ops.set_ct_kill(priv); | |
167 | ||
168 | /* Set initial sensitivity parameters */ | |
169 | /* Set initial calibration set */ | |
170 | priv->hw_params.sens = &iwl6000_sensitivity; | |
07f33f92 AK |
171 | switch (priv->hw_rev & CSR_HW_REV_TYPE_MSK) { |
172 | case CSR_HW_REV_TYPE_6x50: | |
173 | priv->hw_params.calib_init_cfg = | |
f3a2a424 | 174 | BIT(IWL_CALIB_XTAL) | |
07f33f92 | 175 | BIT(IWL_CALIB_DC) | |
f3a2a424 WYG |
176 | BIT(IWL_CALIB_LO) | |
177 | BIT(IWL_CALIB_TX_IQ) | | |
f3a2a424 | 178 | BIT(IWL_CALIB_BASE_BAND); |
07f33f92 AK |
179 | |
180 | break; | |
181 | default: | |
182 | priv->hw_params.calib_init_cfg = | |
183 | BIT(IWL_CALIB_XTAL) | | |
184 | BIT(IWL_CALIB_LO) | | |
185 | BIT(IWL_CALIB_TX_IQ) | | |
186 | BIT(IWL_CALIB_BASE_BAND); | |
187 | break; | |
188 | } | |
189 | ||
f3a2a424 WYG |
190 | return 0; |
191 | } | |
192 | ||
4a56e965 WYG |
193 | static int iwl6000_hw_channel_switch(struct iwl_priv *priv, u16 channel) |
194 | { | |
195 | struct iwl6000_channel_switch_cmd cmd; | |
196 | const struct iwl_channel_info *ch_info; | |
197 | struct iwl_host_cmd hcmd = { | |
198 | .id = REPLY_CHANNEL_SWITCH, | |
199 | .len = sizeof(cmd), | |
200 | .flags = CMD_SIZE_HUGE, | |
201 | .data = &cmd, | |
202 | }; | |
203 | ||
204 | IWL_DEBUG_11H(priv, "channel switch from %d to %d\n", | |
205 | priv->active_rxon.channel, channel); | |
206 | ||
207 | cmd.band = priv->band == IEEE80211_BAND_2GHZ; | |
208 | cmd.channel = cpu_to_le16(channel); | |
0924e519 WYG |
209 | cmd.rxon_flags = priv->staging_rxon.flags; |
210 | cmd.rxon_filter_flags = priv->staging_rxon.filter_flags; | |
4a56e965 WYG |
211 | cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time); |
212 | ch_info = iwl_get_channel_info(priv, priv->band, channel); | |
213 | if (ch_info) | |
214 | cmd.expect_beacon = is_channel_radar(ch_info); | |
215 | else { | |
216 | IWL_ERR(priv, "invalid channel switch from %u to %u\n", | |
217 | priv->active_rxon.channel, channel); | |
218 | return -EFAULT; | |
219 | } | |
0924e519 WYG |
220 | priv->switch_rxon.channel = cpu_to_le16(channel); |
221 | priv->switch_rxon.switch_in_progress = true; | |
4a56e965 WYG |
222 | |
223 | return iwl_send_cmd_sync(priv, &hcmd); | |
224 | } | |
225 | ||
672639de | 226 | static struct iwl_lib_ops iwl6000_lib = { |
f3a2a424 | 227 | .set_hw_params = iwl6000_hw_set_hw_params, |
672639de WYG |
228 | .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl, |
229 | .txq_inval_byte_cnt_tbl = iwl5000_txq_inval_byte_cnt_tbl, | |
230 | .txq_set_sched = iwl5000_txq_set_sched, | |
231 | .txq_agg_enable = iwl5000_txq_agg_enable, | |
232 | .txq_agg_disable = iwl5000_txq_agg_disable, | |
233 | .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, | |
234 | .txq_free_tfd = iwl_hw_txq_free_tfd, | |
235 | .txq_init = iwl_hw_tx_queue_init, | |
236 | .rx_handler_setup = iwl5000_rx_handler_setup, | |
237 | .setup_deferred_work = iwl5000_setup_deferred_work, | |
238 | .is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr, | |
239 | .load_ucode = iwl5000_load_ucode, | |
b7a79404 RC |
240 | .dump_nic_event_log = iwl_dump_nic_event_log, |
241 | .dump_nic_error_log = iwl_dump_nic_error_log, | |
696bdee3 | 242 | .dump_csr = iwl_dump_csr, |
1b3eb823 | 243 | .dump_fh = iwl_dump_fh, |
672639de WYG |
244 | .init_alive_start = iwl5000_init_alive_start, |
245 | .alive_notify = iwl5000_alive_notify, | |
246 | .send_tx_power = iwl5000_send_tx_power, | |
247 | .update_chain_flags = iwl_update_chain_flags, | |
4a56e965 | 248 | .set_channel_switch = iwl6000_hw_channel_switch, |
672639de | 249 | .apm_ops = { |
fadb3582 | 250 | .init = iwl_apm_init, |
d68b603c | 251 | .stop = iwl_apm_stop, |
65b7998a | 252 | .config = iwl6000_nic_config, |
672639de WYG |
253 | .set_pwr_src = iwl_set_pwr_src, |
254 | }, | |
255 | .eeprom_ops = { | |
256 | .regulatory_bands = { | |
257 | EEPROM_5000_REG_BAND_1_CHANNELS, | |
258 | EEPROM_5000_REG_BAND_2_CHANNELS, | |
259 | EEPROM_5000_REG_BAND_3_CHANNELS, | |
260 | EEPROM_5000_REG_BAND_4_CHANNELS, | |
261 | EEPROM_5000_REG_BAND_5_CHANNELS, | |
7aafef1c WYG |
262 | EEPROM_5000_REG_BAND_24_HT40_CHANNELS, |
263 | EEPROM_5000_REG_BAND_52_HT40_CHANNELS | |
672639de WYG |
264 | }, |
265 | .verify_signature = iwlcore_eeprom_verify_signature, | |
266 | .acquire_semaphore = iwlcore_eeprom_acquire_semaphore, | |
267 | .release_semaphore = iwlcore_eeprom_release_semaphore, | |
268 | .calib_version = iwl5000_eeprom_calib_version, | |
269 | .query_addr = iwl5000_eeprom_query_addr, | |
ab9fd1bf | 270 | .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower, |
672639de WYG |
271 | }, |
272 | .post_associate = iwl_post_associate, | |
273 | .isr = iwl_isr_ict, | |
274 | .config_ap = iwl_config_ap, | |
275 | .temp_ops = { | |
276 | .temperature = iwl5000_temperature, | |
277 | .set_ct_kill = iwl6000_set_ct_threshold, | |
278 | }, | |
3459ab5a | 279 | .add_bcast_station = iwl_add_bcast_station, |
672639de WYG |
280 | }; |
281 | ||
45d5d805 | 282 | static const struct iwl_ops iwl6000_ops = { |
cc0f555d | 283 | .ucode = &iwl5000_ucode, |
672639de | 284 | .lib = &iwl6000_lib, |
29f35c14 | 285 | .hcmd = &iwl5000_hcmd, |
d8c07e7a | 286 | .utils = &iwl5000_hcmd_utils, |
e932a609 | 287 | .led = &iwlagn_led_ops, |
29f35c14 JS |
288 | }; |
289 | ||
d5755939 AK |
290 | static struct iwl_lib_ops iwl6050_lib = { |
291 | .set_hw_params = iwl6000_hw_set_hw_params, | |
292 | .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl, | |
293 | .txq_inval_byte_cnt_tbl = iwl5000_txq_inval_byte_cnt_tbl, | |
294 | .txq_set_sched = iwl5000_txq_set_sched, | |
295 | .txq_agg_enable = iwl5000_txq_agg_enable, | |
296 | .txq_agg_disable = iwl5000_txq_agg_disable, | |
297 | .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, | |
298 | .txq_free_tfd = iwl_hw_txq_free_tfd, | |
299 | .txq_init = iwl_hw_tx_queue_init, | |
300 | .rx_handler_setup = iwl5000_rx_handler_setup, | |
301 | .setup_deferred_work = iwl5000_setup_deferred_work, | |
302 | .is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr, | |
303 | .load_ucode = iwl5000_load_ucode, | |
304 | .dump_nic_event_log = iwl_dump_nic_event_log, | |
305 | .dump_nic_error_log = iwl_dump_nic_error_log, | |
306 | .dump_csr = iwl_dump_csr, | |
307 | .dump_fh = iwl_dump_fh, | |
308 | .init_alive_start = iwl5000_init_alive_start, | |
309 | .alive_notify = iwl5000_alive_notify, | |
310 | .send_tx_power = iwl5000_send_tx_power, | |
311 | .update_chain_flags = iwl_update_chain_flags, | |
312 | .set_channel_switch = iwl6000_hw_channel_switch, | |
313 | .apm_ops = { | |
314 | .init = iwl_apm_init, | |
315 | .stop = iwl_apm_stop, | |
316 | .config = iwl6000_nic_config, | |
317 | .set_pwr_src = iwl_set_pwr_src, | |
318 | }, | |
319 | .eeprom_ops = { | |
320 | .regulatory_bands = { | |
321 | EEPROM_5000_REG_BAND_1_CHANNELS, | |
322 | EEPROM_5000_REG_BAND_2_CHANNELS, | |
323 | EEPROM_5000_REG_BAND_3_CHANNELS, | |
324 | EEPROM_5000_REG_BAND_4_CHANNELS, | |
325 | EEPROM_5000_REG_BAND_5_CHANNELS, | |
326 | EEPROM_5000_REG_BAND_24_HT40_CHANNELS, | |
327 | EEPROM_5000_REG_BAND_52_HT40_CHANNELS | |
328 | }, | |
329 | .verify_signature = iwlcore_eeprom_verify_signature, | |
330 | .acquire_semaphore = iwlcore_eeprom_acquire_semaphore, | |
331 | .release_semaphore = iwlcore_eeprom_release_semaphore, | |
332 | .calib_version = iwl5000_eeprom_calib_version, | |
333 | .query_addr = iwl5000_eeprom_query_addr, | |
334 | .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower, | |
335 | }, | |
336 | .post_associate = iwl_post_associate, | |
337 | .isr = iwl_isr_ict, | |
338 | .config_ap = iwl_config_ap, | |
339 | .temp_ops = { | |
340 | .temperature = iwl5000_temperature, | |
341 | .set_ct_kill = iwl6000_set_ct_threshold, | |
342 | .set_calib_version = iwl6050_set_calib_version, | |
343 | }, | |
344 | .add_bcast_station = iwl_add_bcast_station, | |
345 | }; | |
346 | ||
347 | static const struct iwl_ops iwl6050_ops = { | |
348 | .ucode = &iwl5000_ucode, | |
349 | .lib = &iwl6050_lib, | |
350 | .hcmd = &iwl5000_hcmd, | |
351 | .utils = &iwl5000_hcmd_utils, | |
352 | .led = &iwlagn_led_ops, | |
353 | }; | |
354 | ||
65b7998a WYG |
355 | /* |
356 | * "i": Internal configuration, use internal Power Amplifier | |
357 | */ | |
358 | struct iwl_cfg iwl6000i_2agn_cfg = { | |
359 | .name = "6000 Series 2x2 AGN", | |
360 | .fw_name_pre = IWL6000_FW_PRE, | |
361 | .ucode_api_max = IWL6000_UCODE_API_MAX, | |
362 | .ucode_api_min = IWL6000_UCODE_API_MIN, | |
363 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | |
364 | .ops = &iwl6000_ops, | |
415e4993 | 365 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
1f4b9665 | 366 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, |
65b7998a | 367 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, |
88804e2b WYG |
368 | .num_of_queues = IWL50_NUM_QUEUES, |
369 | .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES, | |
65b7998a WYG |
370 | .mod_params = &iwl50_mod_params, |
371 | .valid_tx_ant = ANT_BC, | |
372 | .valid_rx_ant = ANT_BC, | |
fadb3582 | 373 | .pll_cfg_val = 0, |
a6c5c731 | 374 | .set_l0s = true, |
fadb3582 | 375 | .use_bsm = false, |
65b7998a | 376 | .pa_type = IWL_PA_INTERNAL, |
415e4993 WYG |
377 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, |
378 | .shadow_ram_support = true, | |
b261793d | 379 | .ht_greenfield_support = true, |
f2d0d0e2 | 380 | .led_compensation = 51, |
47eef9bd | 381 | .use_rts_for_ht = true, /* use rts/cts protection */ |
d8c07e7a | 382 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
78f5fb7f | 383 | .supports_idle = true, |
6047b4f9 | 384 | .adv_thermal_throttle = true, |
480e8407 | 385 | .support_ct_kill_exit = true, |
3e4fb5fa | 386 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
d4fe5ac9 | 387 | .chain_noise_scale = 1000, |
e1228374 JS |
388 | }; |
389 | ||
5953a62e WYG |
390 | struct iwl_cfg iwl6000i_2abg_cfg = { |
391 | .name = "6000 Series 2x2 ABG", | |
392 | .fw_name_pre = IWL6000_FW_PRE, | |
393 | .ucode_api_max = IWL6000_UCODE_API_MAX, | |
394 | .ucode_api_min = IWL6000_UCODE_API_MIN, | |
395 | .sku = IWL_SKU_A|IWL_SKU_G, | |
396 | .ops = &iwl6000_ops, | |
397 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
398 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, | |
399 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, | |
88804e2b WYG |
400 | .num_of_queues = IWL50_NUM_QUEUES, |
401 | .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES, | |
5953a62e WYG |
402 | .mod_params = &iwl50_mod_params, |
403 | .valid_tx_ant = ANT_BC, | |
404 | .valid_rx_ant = ANT_BC, | |
fadb3582 | 405 | .pll_cfg_val = 0, |
a6c5c731 | 406 | .set_l0s = true, |
fadb3582 | 407 | .use_bsm = false, |
5953a62e WYG |
408 | .pa_type = IWL_PA_INTERNAL, |
409 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
410 | .shadow_ram_support = true, | |
411 | .ht_greenfield_support = true, | |
412 | .led_compensation = 51, | |
d8c07e7a | 413 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
78f5fb7f | 414 | .supports_idle = true, |
6047b4f9 | 415 | .adv_thermal_throttle = true, |
480e8407 | 416 | .support_ct_kill_exit = true, |
3e4fb5fa | 417 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
d4fe5ac9 | 418 | .chain_noise_scale = 1000, |
5953a62e WYG |
419 | }; |
420 | ||
421 | struct iwl_cfg iwl6000i_2bg_cfg = { | |
422 | .name = "6000 Series 2x2 BG", | |
423 | .fw_name_pre = IWL6000_FW_PRE, | |
424 | .ucode_api_max = IWL6000_UCODE_API_MAX, | |
425 | .ucode_api_min = IWL6000_UCODE_API_MIN, | |
426 | .sku = IWL_SKU_G, | |
427 | .ops = &iwl6000_ops, | |
428 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
429 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, | |
430 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, | |
88804e2b WYG |
431 | .num_of_queues = IWL50_NUM_QUEUES, |
432 | .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES, | |
5953a62e WYG |
433 | .mod_params = &iwl50_mod_params, |
434 | .valid_tx_ant = ANT_BC, | |
435 | .valid_rx_ant = ANT_BC, | |
fadb3582 | 436 | .pll_cfg_val = 0, |
a6c5c731 | 437 | .set_l0s = true, |
fadb3582 | 438 | .use_bsm = false, |
5953a62e WYG |
439 | .pa_type = IWL_PA_INTERNAL, |
440 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
441 | .shadow_ram_support = true, | |
442 | .ht_greenfield_support = true, | |
443 | .led_compensation = 51, | |
d8c07e7a | 444 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
78f5fb7f | 445 | .supports_idle = true, |
6047b4f9 | 446 | .adv_thermal_throttle = true, |
480e8407 | 447 | .support_ct_kill_exit = true, |
3e4fb5fa | 448 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
d4fe5ac9 | 449 | .chain_noise_scale = 1000, |
5953a62e WYG |
450 | }; |
451 | ||
e1228374 JS |
452 | struct iwl_cfg iwl6050_2agn_cfg = { |
453 | .name = "6050 Series 2x2 AGN", | |
454 | .fw_name_pre = IWL6050_FW_PRE, | |
455 | .ucode_api_max = IWL6050_UCODE_API_MAX, | |
456 | .ucode_api_min = IWL6050_UCODE_API_MIN, | |
457 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | |
d5755939 | 458 | .ops = &iwl6050_ops, |
415e4993 | 459 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
32b7e244 | 460 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, |
e1228374 | 461 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, |
88804e2b WYG |
462 | .num_of_queues = IWL50_NUM_QUEUES, |
463 | .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES, | |
e1228374 | 464 | .mod_params = &iwl50_mod_params, |
542cc793 JS |
465 | .valid_tx_ant = ANT_AB, |
466 | .valid_rx_ant = ANT_AB, | |
fadb3582 | 467 | .pll_cfg_val = 0, |
a6c5c731 | 468 | .set_l0s = true, |
fadb3582 | 469 | .use_bsm = false, |
65b7998a | 470 | .pa_type = IWL_PA_SYSTEM, |
3ab312a8 | 471 | .max_ll_items = OTP_MAX_LL_ITEMS_6x50, |
415e4993 | 472 | .shadow_ram_support = true, |
b261793d | 473 | .ht_greenfield_support = true, |
f2d0d0e2 | 474 | .led_compensation = 51, |
47eef9bd | 475 | .use_rts_for_ht = true, /* use rts/cts protection */ |
d8c07e7a | 476 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
78f5fb7f | 477 | .supports_idle = true, |
6047b4f9 | 478 | .adv_thermal_throttle = true, |
480e8407 | 479 | .support_ct_kill_exit = true, |
3e4fb5fa | 480 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
d4fe5ac9 | 481 | .chain_noise_scale = 1500, |
e1228374 JS |
482 | }; |
483 | ||
5953a62e WYG |
484 | struct iwl_cfg iwl6050_2abg_cfg = { |
485 | .name = "6050 Series 2x2 ABG", | |
486 | .fw_name_pre = IWL6050_FW_PRE, | |
487 | .ucode_api_max = IWL6050_UCODE_API_MAX, | |
488 | .ucode_api_min = IWL6050_UCODE_API_MIN, | |
489 | .sku = IWL_SKU_A|IWL_SKU_G, | |
d5755939 | 490 | .ops = &iwl6050_ops, |
5953a62e | 491 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
32b7e244 | 492 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, |
5953a62e | 493 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, |
88804e2b WYG |
494 | .num_of_queues = IWL50_NUM_QUEUES, |
495 | .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES, | |
5953a62e WYG |
496 | .mod_params = &iwl50_mod_params, |
497 | .valid_tx_ant = ANT_AB, | |
498 | .valid_rx_ant = ANT_AB, | |
fadb3582 | 499 | .pll_cfg_val = 0, |
a6c5c731 | 500 | .set_l0s = true, |
fadb3582 | 501 | .use_bsm = false, |
5953a62e | 502 | .pa_type = IWL_PA_SYSTEM, |
3ab312a8 | 503 | .max_ll_items = OTP_MAX_LL_ITEMS_6x50, |
5953a62e WYG |
504 | .shadow_ram_support = true, |
505 | .ht_greenfield_support = true, | |
506 | .led_compensation = 51, | |
d8c07e7a | 507 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
78f5fb7f | 508 | .supports_idle = true, |
6047b4f9 | 509 | .adv_thermal_throttle = true, |
480e8407 | 510 | .support_ct_kill_exit = true, |
3e4fb5fa | 511 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
d4fe5ac9 | 512 | .chain_noise_scale = 1500, |
5953a62e WYG |
513 | }; |
514 | ||
e1228374 JS |
515 | struct iwl_cfg iwl6000_3agn_cfg = { |
516 | .name = "6000 Series 3x3 AGN", | |
517 | .fw_name_pre = IWL6000_FW_PRE, | |
518 | .ucode_api_max = IWL6000_UCODE_API_MAX, | |
519 | .ucode_api_min = IWL6000_UCODE_API_MIN, | |
520 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | |
29f35c14 | 521 | .ops = &iwl6000_ops, |
415e4993 | 522 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
1f4b9665 | 523 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, |
e1228374 | 524 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, |
88804e2b WYG |
525 | .num_of_queues = IWL50_NUM_QUEUES, |
526 | .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES, | |
e1228374 | 527 | .mod_params = &iwl50_mod_params, |
c0bac76a JS |
528 | .valid_tx_ant = ANT_ABC, |
529 | .valid_rx_ant = ANT_ABC, | |
fadb3582 | 530 | .pll_cfg_val = 0, |
a6c5c731 | 531 | .set_l0s = true, |
fadb3582 | 532 | .use_bsm = false, |
65b7998a | 533 | .pa_type = IWL_PA_SYSTEM, |
415e4993 WYG |
534 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, |
535 | .shadow_ram_support = true, | |
b261793d | 536 | .ht_greenfield_support = true, |
f2d0d0e2 | 537 | .led_compensation = 51, |
47eef9bd | 538 | .use_rts_for_ht = true, /* use rts/cts protection */ |
d8c07e7a | 539 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
78f5fb7f | 540 | .supports_idle = true, |
6047b4f9 | 541 | .adv_thermal_throttle = true, |
480e8407 | 542 | .support_ct_kill_exit = true, |
3e4fb5fa | 543 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
d4fe5ac9 | 544 | .chain_noise_scale = 1000, |
e1228374 JS |
545 | }; |
546 | ||
e1228374 JS |
547 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); |
548 | MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX)); |