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" | |
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" |
e932a609 | 49 | #include "iwl-agn-led.h" |
b8c76267 | 50 | #include "iwl-agn-debugfs.h" |
e1228374 JS |
51 | |
52 | /* Highest firmware API version supported */ | |
fcbaf8b0 WYG |
53 | #define IWL6000_UCODE_API_MAX 4 |
54 | #define IWL6050_UCODE_API_MAX 4 | |
670245ed | 55 | #define IWL6000G2_UCODE_API_MAX 5 |
e1228374 JS |
56 | |
57 | /* Lowest firmware API version supported */ | |
44246421 WYG |
58 | #define IWL6000_UCODE_API_MIN 4 |
59 | #define IWL6050_UCODE_API_MIN 4 | |
4b3e8062 | 60 | #define IWL6000G2_UCODE_API_MIN 4 |
e1228374 JS |
61 | |
62 | #define IWL6000_FW_PRE "iwlwifi-6000-" | |
63 | #define _IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE #api ".ucode" | |
64 | #define IWL6000_MODULE_FIRMWARE(api) _IWL6000_MODULE_FIRMWARE(api) | |
65 | ||
66 | #define IWL6050_FW_PRE "iwlwifi-6050-" | |
67 | #define _IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE #api ".ucode" | |
68 | #define IWL6050_MODULE_FIRMWARE(api) _IWL6050_MODULE_FIRMWARE(api) | |
69 | ||
95b13014 SZ |
70 | #define IWL6000G2A_FW_PRE "iwlwifi-6000g2a-" |
71 | #define _IWL6000G2A_MODULE_FIRMWARE(api) IWL6000G2A_FW_PRE #api ".ucode" | |
72 | #define IWL6000G2A_MODULE_FIRMWARE(api) _IWL6000G2A_MODULE_FIRMWARE(api) | |
73 | ||
1808972f SZ |
74 | #define IWL6000G2B_FW_PRE "iwlwifi-6000g2b-" |
75 | #define _IWL6000G2B_MODULE_FIRMWARE(api) IWL6000G2B_FW_PRE #api ".ucode" | |
76 | #define IWL6000G2B_MODULE_FIRMWARE(api) _IWL6000G2B_MODULE_FIRMWARE(api) | |
77 | ||
4b3e8062 | 78 | |
672639de WYG |
79 | static void iwl6000_set_ct_threshold(struct iwl_priv *priv) |
80 | { | |
81 | /* want Celsius */ | |
82 | priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD; | |
83 | priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD; | |
84 | } | |
85 | ||
d5755939 | 86 | /* Indicate calibration version to uCode. */ |
178d1596 | 87 | static void iwl6000_set_calib_version(struct iwl_priv *priv) |
d5755939 | 88 | { |
178d1596 WYG |
89 | if (priv->cfg->need_dc_calib && |
90 | (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6)) | |
d5755939 AK |
91 | iwl_set_bit(priv, CSR_GP_DRIVER_REG, |
92 | CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); | |
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 | } | |
120 | /* else do nothing, uCode configured */ | |
d5755939 AK |
121 | if (priv->cfg->ops->lib->temp_ops.set_calib_version) |
122 | priv->cfg->ops->lib->temp_ops.set_calib_version(priv); | |
65b7998a WYG |
123 | } |
124 | ||
f3a2a424 WYG |
125 | static struct iwl_sensitivity_ranges iwl6000_sensitivity = { |
126 | .min_nrg_cck = 97, | |
127 | .max_nrg_cck = 0, /* not used, set to 0 */ | |
128 | .auto_corr_min_ofdm = 80, | |
129 | .auto_corr_min_ofdm_mrc = 128, | |
130 | .auto_corr_min_ofdm_x1 = 105, | |
131 | .auto_corr_min_ofdm_mrc_x1 = 192, | |
132 | ||
133 | .auto_corr_max_ofdm = 145, | |
134 | .auto_corr_max_ofdm_mrc = 232, | |
2494f63c | 135 | .auto_corr_max_ofdm_x1 = 110, |
f3a2a424 WYG |
136 | .auto_corr_max_ofdm_mrc_x1 = 232, |
137 | ||
138 | .auto_corr_min_cck = 125, | |
139 | .auto_corr_max_cck = 175, | |
140 | .auto_corr_min_cck_mrc = 160, | |
141 | .auto_corr_max_cck_mrc = 310, | |
142 | .nrg_th_cck = 97, | |
143 | .nrg_th_ofdm = 100, | |
55036d66 WYG |
144 | |
145 | .barker_corr_th_min = 190, | |
146 | .barker_corr_th_min_mrc = 390, | |
147 | .nrg_th_cca = 62, | |
f3a2a424 WYG |
148 | }; |
149 | ||
150 | static int iwl6000_hw_set_hw_params(struct iwl_priv *priv) | |
151 | { | |
88804e2b | 152 | if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && |
19e6cda0 | 153 | priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES) |
88804e2b WYG |
154 | priv->cfg->num_of_queues = |
155 | priv->cfg->mod_params->num_of_queues; | |
f3a2a424 | 156 | |
88804e2b | 157 | priv->hw_params.max_txq_num = priv->cfg->num_of_queues; |
f3a2a424 WYG |
158 | priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; |
159 | priv->hw_params.scd_bc_tbls_size = | |
88804e2b | 160 | priv->cfg->num_of_queues * |
19e6cda0 | 161 | sizeof(struct iwlagn_scd_bc_tbl); |
f3a2a424 | 162 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); |
bf3c7fdd WYG |
163 | priv->hw_params.max_stations = IWLAGN_STATION_COUNT; |
164 | priv->hw_params.bcast_sta_id = IWLAGN_BROADCAST_ID; | |
f3a2a424 WYG |
165 | |
166 | priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE; | |
167 | priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE; | |
168 | ||
169 | priv->hw_params.max_bsm_size = 0; | |
170 | priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) | | |
171 | BIT(IEEE80211_BAND_5GHZ); | |
172 | priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR; | |
173 | ||
174 | priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant); | |
175 | priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant); | |
176 | priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant; | |
177 | priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant; | |
178 | ||
179 | if (priv->cfg->ops->lib->temp_ops.set_ct_kill) | |
180 | priv->cfg->ops->lib->temp_ops.set_ct_kill(priv); | |
181 | ||
182 | /* Set initial sensitivity parameters */ | |
183 | /* Set initial calibration set */ | |
184 | priv->hw_params.sens = &iwl6000_sensitivity; | |
e517736a WYG |
185 | priv->hw_params.calib_init_cfg = |
186 | BIT(IWL_CALIB_XTAL) | | |
187 | BIT(IWL_CALIB_LO) | | |
188 | BIT(IWL_CALIB_TX_IQ) | | |
189 | BIT(IWL_CALIB_BASE_BAND); | |
178d1596 WYG |
190 | if (priv->cfg->need_dc_calib) |
191 | priv->hw_params.calib_init_cfg |= BIT(IWL_CALIB_DC); | |
07f33f92 | 192 | |
a0ee74cf WYG |
193 | priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS; |
194 | ||
f3a2a424 WYG |
195 | return 0; |
196 | } | |
197 | ||
79d07325 WYG |
198 | static int iwl6000_hw_channel_switch(struct iwl_priv *priv, |
199 | struct ieee80211_channel_switch *ch_switch) | |
4a56e965 WYG |
200 | { |
201 | struct iwl6000_channel_switch_cmd cmd; | |
202 | const struct iwl_channel_info *ch_info; | |
79d07325 WYG |
203 | u32 switch_time_in_usec, ucode_switch_time; |
204 | u16 ch; | |
205 | u32 tsf_low; | |
206 | u8 switch_count; | |
207 | u16 beacon_interval = le16_to_cpu(priv->rxon_timing.beacon_interval); | |
208 | struct ieee80211_vif *vif = priv->vif; | |
4a56e965 WYG |
209 | struct iwl_host_cmd hcmd = { |
210 | .id = REPLY_CHANNEL_SWITCH, | |
211 | .len = sizeof(cmd), | |
3839f7ce | 212 | .flags = CMD_SYNC, |
4a56e965 WYG |
213 | .data = &cmd, |
214 | }; | |
215 | ||
4a56e965 | 216 | cmd.band = priv->band == IEEE80211_BAND_2GHZ; |
81e95430 | 217 | ch = ch_switch->channel->hw_value; |
79d07325 WYG |
218 | IWL_DEBUG_11H(priv, "channel switch from %u to %u\n", |
219 | priv->active_rxon.channel, ch); | |
220 | cmd.channel = cpu_to_le16(ch); | |
0924e519 WYG |
221 | cmd.rxon_flags = priv->staging_rxon.flags; |
222 | cmd.rxon_filter_flags = priv->staging_rxon.filter_flags; | |
79d07325 WYG |
223 | switch_count = ch_switch->count; |
224 | tsf_low = ch_switch->timestamp & 0x0ffffffff; | |
225 | /* | |
226 | * calculate the ucode channel switch time | |
227 | * adding TSF as one of the factor for when to switch | |
228 | */ | |
229 | if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) { | |
230 | if (switch_count > ((priv->ucode_beacon_time - tsf_low) / | |
231 | beacon_interval)) { | |
232 | switch_count -= (priv->ucode_beacon_time - | |
233 | tsf_low) / beacon_interval; | |
234 | } else | |
235 | switch_count = 0; | |
236 | } | |
237 | if (switch_count <= 1) | |
238 | cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time); | |
239 | else { | |
240 | switch_time_in_usec = | |
241 | vif->bss_conf.beacon_int * switch_count * TIME_UNIT; | |
242 | ucode_switch_time = iwl_usecs_to_beacons(priv, | |
243 | switch_time_in_usec, | |
244 | beacon_interval); | |
245 | cmd.switch_time = iwl_add_beacon_time(priv, | |
246 | priv->ucode_beacon_time, | |
247 | ucode_switch_time, | |
248 | beacon_interval); | |
249 | } | |
250 | IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n", | |
251 | cmd.switch_time); | |
252 | ch_info = iwl_get_channel_info(priv, priv->band, ch); | |
4a56e965 WYG |
253 | if (ch_info) |
254 | cmd.expect_beacon = is_channel_radar(ch_info); | |
255 | else { | |
256 | IWL_ERR(priv, "invalid channel switch from %u to %u\n", | |
79d07325 | 257 | priv->active_rxon.channel, ch); |
4a56e965 WYG |
258 | return -EFAULT; |
259 | } | |
79d07325 | 260 | priv->switch_rxon.channel = cmd.channel; |
0924e519 | 261 | priv->switch_rxon.switch_in_progress = true; |
4a56e965 WYG |
262 | |
263 | return iwl_send_cmd_sync(priv, &hcmd); | |
264 | } | |
265 | ||
672639de | 266 | static struct iwl_lib_ops iwl6000_lib = { |
f3a2a424 | 267 | .set_hw_params = iwl6000_hw_set_hw_params, |
b305a080 WYG |
268 | .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl, |
269 | .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl, | |
270 | .txq_set_sched = iwlagn_txq_set_sched, | |
271 | .txq_agg_enable = iwlagn_txq_agg_enable, | |
272 | .txq_agg_disable = iwlagn_txq_agg_disable, | |
672639de WYG |
273 | .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, |
274 | .txq_free_tfd = iwl_hw_txq_free_tfd, | |
275 | .txq_init = iwl_hw_tx_queue_init, | |
e04ed0a5 WYG |
276 | .rx_handler_setup = iwlagn_rx_handler_setup, |
277 | .setup_deferred_work = iwlagn_setup_deferred_work, | |
278 | .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr, | |
81b8176e | 279 | .load_ucode = iwlagn_load_ucode, |
b7a79404 RC |
280 | .dump_nic_event_log = iwl_dump_nic_event_log, |
281 | .dump_nic_error_log = iwl_dump_nic_error_log, | |
696bdee3 | 282 | .dump_csr = iwl_dump_csr, |
1b3eb823 | 283 | .dump_fh = iwl_dump_fh, |
741a6266 WYG |
284 | .init_alive_start = iwlagn_init_alive_start, |
285 | .alive_notify = iwlagn_alive_notify, | |
e04ed0a5 | 286 | .send_tx_power = iwlagn_send_tx_power, |
672639de | 287 | .update_chain_flags = iwl_update_chain_flags, |
4a56e965 | 288 | .set_channel_switch = iwl6000_hw_channel_switch, |
672639de | 289 | .apm_ops = { |
fadb3582 | 290 | .init = iwl_apm_init, |
d68b603c | 291 | .stop = iwl_apm_stop, |
65b7998a | 292 | .config = iwl6000_nic_config, |
672639de WYG |
293 | .set_pwr_src = iwl_set_pwr_src, |
294 | }, | |
295 | .eeprom_ops = { | |
296 | .regulatory_bands = { | |
e04ed0a5 WYG |
297 | EEPROM_REG_BAND_1_CHANNELS, |
298 | EEPROM_REG_BAND_2_CHANNELS, | |
299 | EEPROM_REG_BAND_3_CHANNELS, | |
300 | EEPROM_REG_BAND_4_CHANNELS, | |
301 | EEPROM_REG_BAND_5_CHANNELS, | |
f2fa1b01 | 302 | EEPROM_6000_REG_BAND_24_HT40_CHANNELS, |
e04ed0a5 | 303 | EEPROM_REG_BAND_52_HT40_CHANNELS |
672639de WYG |
304 | }, |
305 | .verify_signature = iwlcore_eeprom_verify_signature, | |
306 | .acquire_semaphore = iwlcore_eeprom_acquire_semaphore, | |
307 | .release_semaphore = iwlcore_eeprom_release_semaphore, | |
e04ed0a5 WYG |
308 | .calib_version = iwlagn_eeprom_calib_version, |
309 | .query_addr = iwlagn_eeprom_query_addr, | |
ab9fd1bf | 310 | .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower, |
672639de WYG |
311 | }, |
312 | .post_associate = iwl_post_associate, | |
313 | .isr = iwl_isr_ict, | |
314 | .config_ap = iwl_config_ap, | |
315 | .temp_ops = { | |
e04ed0a5 | 316 | .temperature = iwlagn_temperature, |
672639de | 317 | .set_ct_kill = iwl6000_set_ct_threshold, |
178d1596 | 318 | .set_calib_version = iwl6000_set_calib_version, |
672639de | 319 | }, |
1fa61b2e | 320 | .manage_ibss_station = iwlagn_manage_ibss_station, |
278c2f6f | 321 | .update_bcast_station = iwl_update_bcast_station, |
b8c76267 AK |
322 | .debugfs_ops = { |
323 | .rx_stats_read = iwl_ucode_rx_stats_read, | |
324 | .tx_stats_read = iwl_ucode_tx_stats_read, | |
325 | .general_stats_read = iwl_ucode_general_stats_read, | |
ffb7d896 | 326 | .bt_stats_read = iwl_ucode_bt_stats_read, |
b8c76267 | 327 | }, |
b74e31a9 | 328 | .recover_from_tx_stall = iwl_bg_monitor_recover, |
fa8f130c WYG |
329 | .check_plcp_health = iwl_good_plcp_health, |
330 | .check_ack_health = iwl_good_ack_health, | |
716c74b0 | 331 | .txfifo_flush = iwlagn_txfifo_flush, |
65550636 | 332 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, |
0975cc8f WYG |
333 | .tt_ops = { |
334 | .lower_power_detection = iwl_tt_is_low_power_state, | |
335 | .tt_power_mode = iwl_tt_current_power_mode, | |
336 | .ct_kill_check = iwl_check_for_ct_kill, | |
337 | } | |
672639de WYG |
338 | }; |
339 | ||
9e4afc21 JB |
340 | static struct iwl_lib_ops iwl6000g2b_lib = { |
341 | .set_hw_params = iwl6000_hw_set_hw_params, | |
342 | .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl, | |
343 | .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl, | |
344 | .txq_set_sched = iwlagn_txq_set_sched, | |
345 | .txq_agg_enable = iwlagn_txq_agg_enable, | |
346 | .txq_agg_disable = iwlagn_txq_agg_disable, | |
347 | .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, | |
348 | .txq_free_tfd = iwl_hw_txq_free_tfd, | |
349 | .txq_init = iwl_hw_tx_queue_init, | |
b6e116e8 WYG |
350 | .rx_handler_setup = iwlagn_bt_rx_handler_setup, |
351 | .setup_deferred_work = iwlagn_bt_setup_deferred_work, | |
352 | .cancel_deferred_work = iwlagn_bt_cancel_deferred_work, | |
9e4afc21 JB |
353 | .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr, |
354 | .load_ucode = iwlagn_load_ucode, | |
355 | .dump_nic_event_log = iwl_dump_nic_event_log, | |
356 | .dump_nic_error_log = iwl_dump_nic_error_log, | |
357 | .dump_csr = iwl_dump_csr, | |
358 | .dump_fh = iwl_dump_fh, | |
359 | .init_alive_start = iwlagn_init_alive_start, | |
360 | .alive_notify = iwlagn_alive_notify, | |
361 | .send_tx_power = iwlagn_send_tx_power, | |
362 | .update_chain_flags = iwl_update_chain_flags, | |
363 | .set_channel_switch = iwl6000_hw_channel_switch, | |
364 | .apm_ops = { | |
365 | .init = iwl_apm_init, | |
366 | .stop = iwl_apm_stop, | |
367 | .config = iwl6000_nic_config, | |
368 | .set_pwr_src = iwl_set_pwr_src, | |
369 | }, | |
370 | .eeprom_ops = { | |
371 | .regulatory_bands = { | |
372 | EEPROM_REG_BAND_1_CHANNELS, | |
373 | EEPROM_REG_BAND_2_CHANNELS, | |
374 | EEPROM_REG_BAND_3_CHANNELS, | |
375 | EEPROM_REG_BAND_4_CHANNELS, | |
376 | EEPROM_REG_BAND_5_CHANNELS, | |
377 | EEPROM_6000_REG_BAND_24_HT40_CHANNELS, | |
378 | EEPROM_REG_BAND_52_HT40_CHANNELS | |
379 | }, | |
380 | .verify_signature = iwlcore_eeprom_verify_signature, | |
381 | .acquire_semaphore = iwlcore_eeprom_acquire_semaphore, | |
382 | .release_semaphore = iwlcore_eeprom_release_semaphore, | |
383 | .calib_version = iwlagn_eeprom_calib_version, | |
384 | .query_addr = iwlagn_eeprom_query_addr, | |
385 | .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower, | |
386 | }, | |
387 | .post_associate = iwl_post_associate, | |
388 | .isr = iwl_isr_ict, | |
389 | .config_ap = iwl_config_ap, | |
390 | .temp_ops = { | |
391 | .temperature = iwlagn_temperature, | |
392 | .set_ct_kill = iwl6000_set_ct_threshold, | |
393 | .set_calib_version = iwl6000_set_calib_version, | |
394 | }, | |
395 | .manage_ibss_station = iwlagn_manage_ibss_station, | |
396 | .update_bcast_station = iwl_update_bcast_station, | |
397 | .debugfs_ops = { | |
398 | .rx_stats_read = iwl_ucode_rx_stats_read, | |
399 | .tx_stats_read = iwl_ucode_tx_stats_read, | |
400 | .general_stats_read = iwl_ucode_general_stats_read, | |
401 | .bt_stats_read = iwl_ucode_bt_stats_read, | |
402 | }, | |
403 | .recover_from_tx_stall = iwl_bg_monitor_recover, | |
404 | .check_plcp_health = iwl_good_plcp_health, | |
405 | .check_ack_health = iwl_good_ack_health, | |
406 | .txfifo_flush = iwlagn_txfifo_flush, | |
407 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, | |
408 | .tt_ops = { | |
409 | .lower_power_detection = iwl_tt_is_low_power_state, | |
410 | .tt_power_mode = iwl_tt_current_power_mode, | |
411 | .ct_kill_check = iwl_check_for_ct_kill, | |
412 | } | |
413 | }; | |
414 | ||
45d5d805 | 415 | static const struct iwl_ops iwl6000_ops = { |
672639de | 416 | .lib = &iwl6000_lib, |
7dc77dba WYG |
417 | .hcmd = &iwlagn_hcmd, |
418 | .utils = &iwlagn_hcmd_utils, | |
e932a609 | 419 | .led = &iwlagn_led_ops, |
29f35c14 JS |
420 | }; |
421 | ||
1808972f | 422 | static const struct iwl_ops iwl6000g2b_ops = { |
9e4afc21 | 423 | .lib = &iwl6000g2b_lib, |
b6e116e8 | 424 | .hcmd = &iwlagn_bt_hcmd, |
1808972f SZ |
425 | .utils = &iwlagn_hcmd_utils, |
426 | .led = &iwlagn_led_ops, | |
427 | }; | |
428 | ||
95b13014 SZ |
429 | struct iwl_cfg iwl6000g2a_2agn_cfg = { |
430 | .name = "6000 Series 2x2 AGN Gen2a", | |
431 | .fw_name_pre = IWL6000G2A_FW_PRE, | |
4b3e8062 SZ |
432 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, |
433 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | |
0b5af201 JS |
434 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, |
435 | .ops = &iwl6000_ops, | |
436 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
4b3e8062 SZ |
437 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, |
438 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | |
0b5af201 JS |
439 | .num_of_queues = IWLAGN_NUM_QUEUES, |
440 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
441 | .mod_params = &iwlagn_mod_params, | |
442 | .valid_tx_ant = ANT_AB, | |
443 | .valid_rx_ant = ANT_AB, | |
444 | .pll_cfg_val = 0, | |
445 | .set_l0s = true, | |
446 | .use_bsm = false, | |
33e6f816 | 447 | .pa_type = IWL_PA_SYSTEM, |
0b5af201 JS |
448 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, |
449 | .shadow_ram_support = true, | |
450 | .ht_greenfield_support = true, | |
451 | .led_compensation = 51, | |
94597ab2 | 452 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
0b5af201 JS |
453 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
454 | .supports_idle = true, | |
455 | .adv_thermal_throttle = true, | |
456 | .support_ct_kill_exit = true, | |
457 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | |
458 | .chain_noise_scale = 1000, | |
ce60659a | 459 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
95b13014 | 460 | .max_event_log_size = 512, |
6e5c800e | 461 | .ucode_tracing = true, |
65d1f896 WYG |
462 | .sensitivity_calib_by_driver = true, |
463 | .chain_noise_calib_by_driver = true, | |
178d1596 | 464 | .need_dc_calib = true, |
0b5af201 JS |
465 | }; |
466 | ||
1808972f SZ |
467 | struct iwl_cfg iwl6000g2a_2abg_cfg = { |
468 | .name = "6000 Series 2x2 ABG Gen2a", | |
469 | .fw_name_pre = IWL6000G2A_FW_PRE, | |
470 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | |
471 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | |
472 | .sku = IWL_SKU_A|IWL_SKU_G, | |
473 | .ops = &iwl6000_ops, | |
474 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
475 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | |
476 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | |
477 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
478 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
479 | .mod_params = &iwlagn_mod_params, | |
480 | .valid_tx_ant = ANT_AB, | |
481 | .valid_rx_ant = ANT_AB, | |
482 | .pll_cfg_val = 0, | |
483 | .set_l0s = true, | |
484 | .use_bsm = false, | |
485 | .pa_type = IWL_PA_SYSTEM, | |
486 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
487 | .shadow_ram_support = true, | |
488 | .led_compensation = 51, | |
489 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | |
490 | .supports_idle = true, | |
491 | .adv_thermal_throttle = true, | |
492 | .support_ct_kill_exit = true, | |
493 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | |
494 | .chain_noise_scale = 1000, | |
ce60659a | 495 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
1808972f | 496 | .max_event_log_size = 512, |
679db794 WYG |
497 | .sensitivity_calib_by_driver = true, |
498 | .chain_noise_calib_by_driver = true, | |
178d1596 | 499 | .need_dc_calib = true, |
1808972f SZ |
500 | }; |
501 | ||
502 | struct iwl_cfg iwl6000g2a_2bg_cfg = { | |
503 | .name = "6000 Series 2x2 BG Gen2a", | |
504 | .fw_name_pre = IWL6000G2A_FW_PRE, | |
505 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | |
506 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | |
507 | .sku = IWL_SKU_G, | |
508 | .ops = &iwl6000_ops, | |
509 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
510 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | |
511 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | |
512 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
513 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
514 | .mod_params = &iwlagn_mod_params, | |
515 | .valid_tx_ant = ANT_AB, | |
516 | .valid_rx_ant = ANT_AB, | |
517 | .pll_cfg_val = 0, | |
518 | .set_l0s = true, | |
519 | .use_bsm = false, | |
520 | .pa_type = IWL_PA_SYSTEM, | |
521 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
522 | .shadow_ram_support = true, | |
523 | .led_compensation = 51, | |
524 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | |
525 | .supports_idle = true, | |
526 | .adv_thermal_throttle = true, | |
527 | .support_ct_kill_exit = true, | |
528 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | |
529 | .chain_noise_scale = 1000, | |
ce60659a | 530 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
1808972f | 531 | .max_event_log_size = 512, |
679db794 WYG |
532 | .sensitivity_calib_by_driver = true, |
533 | .chain_noise_calib_by_driver = true, | |
178d1596 | 534 | .need_dc_calib = true, |
1808972f SZ |
535 | }; |
536 | ||
537 | struct iwl_cfg iwl6000g2b_2agn_cfg = { | |
538 | .name = "6000 Series 2x2 AGN Gen2b", | |
539 | .fw_name_pre = IWL6000G2B_FW_PRE, | |
540 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | |
541 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | |
542 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | |
543 | .ops = &iwl6000g2b_ops, | |
544 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
545 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | |
546 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | |
547 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
548 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
549 | .mod_params = &iwlagn_mod_params, | |
550 | .valid_tx_ant = ANT_AB, | |
551 | .valid_rx_ant = ANT_AB, | |
552 | .pll_cfg_val = 0, | |
553 | .set_l0s = true, | |
554 | .use_bsm = false, | |
555 | .pa_type = IWL_PA_SYSTEM, | |
556 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
557 | .shadow_ram_support = true, | |
558 | .ht_greenfield_support = true, | |
559 | .led_compensation = 51, | |
94597ab2 | 560 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
1808972f SZ |
561 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
562 | .supports_idle = true, | |
563 | .adv_thermal_throttle = true, | |
564 | .support_ct_kill_exit = true, | |
74e5c41b | 565 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, |
1808972f | 566 | .chain_noise_scale = 1000, |
3198c68c | 567 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, |
1808972f | 568 | .max_event_log_size = 512, |
679db794 WYG |
569 | .sensitivity_calib_by_driver = true, |
570 | .chain_noise_calib_by_driver = true, | |
178d1596 | 571 | .need_dc_calib = true, |
af8ee055 | 572 | .bt_statistics = true, |
670245ed JB |
573 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
574 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | |
575 | .advanced_bt_coexist = true, | |
a4b96cc4 | 576 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, |
b6e116e8 | 577 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, |
1808972f SZ |
578 | }; |
579 | ||
580 | struct iwl_cfg iwl6000g2b_2abg_cfg = { | |
581 | .name = "6000 Series 2x2 ABG Gen2b", | |
582 | .fw_name_pre = IWL6000G2B_FW_PRE, | |
583 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | |
584 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | |
585 | .sku = IWL_SKU_A|IWL_SKU_G, | |
586 | .ops = &iwl6000g2b_ops, | |
587 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
588 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | |
589 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | |
590 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
591 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
592 | .mod_params = &iwlagn_mod_params, | |
593 | .valid_tx_ant = ANT_AB, | |
594 | .valid_rx_ant = ANT_AB, | |
595 | .pll_cfg_val = 0, | |
596 | .set_l0s = true, | |
597 | .use_bsm = false, | |
598 | .pa_type = IWL_PA_SYSTEM, | |
599 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
600 | .shadow_ram_support = true, | |
601 | .led_compensation = 51, | |
602 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | |
603 | .supports_idle = true, | |
604 | .adv_thermal_throttle = true, | |
605 | .support_ct_kill_exit = true, | |
74e5c41b | 606 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, |
1808972f | 607 | .chain_noise_scale = 1000, |
3198c68c | 608 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, |
1808972f | 609 | .max_event_log_size = 512, |
679db794 WYG |
610 | .sensitivity_calib_by_driver = true, |
611 | .chain_noise_calib_by_driver = true, | |
178d1596 | 612 | .need_dc_calib = true, |
af8ee055 | 613 | .bt_statistics = true, |
670245ed JB |
614 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
615 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | |
616 | .advanced_bt_coexist = true, | |
a4b96cc4 | 617 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, |
b6e116e8 | 618 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, |
1808972f SZ |
619 | }; |
620 | ||
9f6e1baf SZ |
621 | struct iwl_cfg iwl6000g2b_2bgn_cfg = { |
622 | .name = "6000 Series 2x2 BGN Gen2b", | |
623 | .fw_name_pre = IWL6000G2B_FW_PRE, | |
624 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | |
625 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | |
626 | .sku = IWL_SKU_G|IWL_SKU_N, | |
627 | .ops = &iwl6000g2b_ops, | |
628 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
629 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | |
630 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | |
631 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
632 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
633 | .mod_params = &iwlagn_mod_params, | |
634 | .valid_tx_ant = ANT_AB, | |
635 | .valid_rx_ant = ANT_AB, | |
636 | .pll_cfg_val = 0, | |
637 | .set_l0s = true, | |
638 | .use_bsm = false, | |
639 | .pa_type = IWL_PA_SYSTEM, | |
640 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
641 | .shadow_ram_support = true, | |
642 | .ht_greenfield_support = true, | |
643 | .led_compensation = 51, | |
94597ab2 | 644 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
9f6e1baf SZ |
645 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
646 | .supports_idle = true, | |
647 | .adv_thermal_throttle = true, | |
648 | .support_ct_kill_exit = true, | |
74e5c41b | 649 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, |
9f6e1baf | 650 | .chain_noise_scale = 1000, |
3198c68c | 651 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, |
9f6e1baf | 652 | .max_event_log_size = 512, |
679db794 WYG |
653 | .sensitivity_calib_by_driver = true, |
654 | .chain_noise_calib_by_driver = true, | |
178d1596 | 655 | .need_dc_calib = true, |
af8ee055 | 656 | .bt_statistics = true, |
670245ed JB |
657 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
658 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | |
659 | .advanced_bt_coexist = true, | |
a4b96cc4 | 660 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, |
b6e116e8 | 661 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, |
9f6e1baf SZ |
662 | }; |
663 | ||
1808972f SZ |
664 | struct iwl_cfg iwl6000g2b_2bg_cfg = { |
665 | .name = "6000 Series 2x2 BG Gen2b", | |
666 | .fw_name_pre = IWL6000G2B_FW_PRE, | |
667 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | |
668 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | |
669 | .sku = IWL_SKU_G, | |
670 | .ops = &iwl6000g2b_ops, | |
671 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
672 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | |
673 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | |
674 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
675 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
676 | .mod_params = &iwlagn_mod_params, | |
677 | .valid_tx_ant = ANT_AB, | |
678 | .valid_rx_ant = ANT_AB, | |
679 | .pll_cfg_val = 0, | |
680 | .set_l0s = true, | |
681 | .use_bsm = false, | |
682 | .pa_type = IWL_PA_SYSTEM, | |
683 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
684 | .shadow_ram_support = true, | |
685 | .led_compensation = 51, | |
686 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | |
687 | .supports_idle = true, | |
688 | .adv_thermal_throttle = true, | |
689 | .support_ct_kill_exit = true, | |
74e5c41b | 690 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, |
1808972f | 691 | .chain_noise_scale = 1000, |
3198c68c | 692 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, |
1808972f | 693 | .max_event_log_size = 512, |
679db794 WYG |
694 | .sensitivity_calib_by_driver = true, |
695 | .chain_noise_calib_by_driver = true, | |
178d1596 | 696 | .need_dc_calib = true, |
af8ee055 | 697 | .bt_statistics = true, |
670245ed JB |
698 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
699 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | |
700 | .advanced_bt_coexist = true, | |
a4b96cc4 | 701 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, |
b6e116e8 | 702 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, |
1808972f SZ |
703 | }; |
704 | ||
705 | struct iwl_cfg iwl6000g2b_bgn_cfg = { | |
706 | .name = "6000 Series 1x2 BGN Gen2b", | |
707 | .fw_name_pre = IWL6000G2B_FW_PRE, | |
708 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | |
709 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | |
710 | .sku = IWL_SKU_G|IWL_SKU_N, | |
711 | .ops = &iwl6000g2b_ops, | |
712 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
713 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | |
714 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | |
715 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
716 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
717 | .mod_params = &iwlagn_mod_params, | |
718 | .valid_tx_ant = ANT_A, | |
719 | .valid_rx_ant = ANT_AB, | |
720 | .pll_cfg_val = 0, | |
721 | .set_l0s = true, | |
722 | .use_bsm = false, | |
723 | .pa_type = IWL_PA_SYSTEM, | |
724 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
725 | .shadow_ram_support = true, | |
726 | .ht_greenfield_support = true, | |
727 | .led_compensation = 51, | |
94597ab2 | 728 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
1808972f SZ |
729 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
730 | .supports_idle = true, | |
731 | .adv_thermal_throttle = true, | |
732 | .support_ct_kill_exit = true, | |
74e5c41b | 733 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, |
1808972f | 734 | .chain_noise_scale = 1000, |
3198c68c | 735 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, |
1808972f | 736 | .max_event_log_size = 512, |
679db794 WYG |
737 | .sensitivity_calib_by_driver = true, |
738 | .chain_noise_calib_by_driver = true, | |
178d1596 | 739 | .need_dc_calib = true, |
af8ee055 | 740 | .bt_statistics = true, |
670245ed JB |
741 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
742 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | |
743 | .advanced_bt_coexist = true, | |
a4b96cc4 | 744 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, |
b6e116e8 | 745 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, |
1808972f SZ |
746 | }; |
747 | ||
748 | struct iwl_cfg iwl6000g2b_bg_cfg = { | |
749 | .name = "6000 Series 1x2 BG Gen2b", | |
750 | .fw_name_pre = IWL6000G2B_FW_PRE, | |
751 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | |
752 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | |
753 | .sku = IWL_SKU_G, | |
754 | .ops = &iwl6000g2b_ops, | |
755 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
756 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | |
757 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | |
758 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
759 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
760 | .mod_params = &iwlagn_mod_params, | |
761 | .valid_tx_ant = ANT_A, | |
762 | .valid_rx_ant = ANT_AB, | |
763 | .pll_cfg_val = 0, | |
764 | .set_l0s = true, | |
765 | .use_bsm = false, | |
766 | .pa_type = IWL_PA_SYSTEM, | |
767 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
768 | .shadow_ram_support = true, | |
769 | .led_compensation = 51, | |
770 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | |
771 | .supports_idle = true, | |
772 | .adv_thermal_throttle = true, | |
773 | .support_ct_kill_exit = true, | |
74e5c41b | 774 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, |
1808972f | 775 | .chain_noise_scale = 1000, |
3198c68c | 776 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, |
1808972f | 777 | .max_event_log_size = 512, |
679db794 WYG |
778 | .sensitivity_calib_by_driver = true, |
779 | .chain_noise_calib_by_driver = true, | |
178d1596 | 780 | .need_dc_calib = true, |
af8ee055 | 781 | .bt_statistics = true, |
670245ed JB |
782 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
783 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | |
784 | .advanced_bt_coexist = true, | |
a4b96cc4 | 785 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, |
b6e116e8 | 786 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, |
1808972f SZ |
787 | }; |
788 | ||
95b13014 SZ |
789 | /* |
790 | * "i": Internal configuration, use internal Power Amplifier | |
791 | */ | |
65b7998a | 792 | struct iwl_cfg iwl6000i_2agn_cfg = { |
c11362c0 | 793 | .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN", |
65b7998a WYG |
794 | .fw_name_pre = IWL6000_FW_PRE, |
795 | .ucode_api_max = IWL6000_UCODE_API_MAX, | |
796 | .ucode_api_min = IWL6000_UCODE_API_MIN, | |
797 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | |
798 | .ops = &iwl6000_ops, | |
415e4993 | 799 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
1f4b9665 | 800 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, |
00e70590 | 801 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, |
19e6cda0 WYG |
802 | .num_of_queues = IWLAGN_NUM_QUEUES, |
803 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
348ee7cd | 804 | .mod_params = &iwlagn_mod_params, |
65b7998a WYG |
805 | .valid_tx_ant = ANT_BC, |
806 | .valid_rx_ant = ANT_BC, | |
fadb3582 | 807 | .pll_cfg_val = 0, |
a6c5c731 | 808 | .set_l0s = true, |
fadb3582 | 809 | .use_bsm = false, |
65b7998a | 810 | .pa_type = IWL_PA_INTERNAL, |
415e4993 WYG |
811 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, |
812 | .shadow_ram_support = true, | |
b261793d | 813 | .ht_greenfield_support = true, |
f2d0d0e2 | 814 | .led_compensation = 51, |
94597ab2 | 815 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
d8c07e7a | 816 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
78f5fb7f | 817 | .supports_idle = true, |
6047b4f9 | 818 | .adv_thermal_throttle = true, |
480e8407 | 819 | .support_ct_kill_exit = true, |
3e4fb5fa | 820 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
d4fe5ac9 | 821 | .chain_noise_scale = 1000, |
ce60659a | 822 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
678b385d | 823 | .max_event_log_size = 1024, |
6e5c800e | 824 | .ucode_tracing = true, |
65d1f896 WYG |
825 | .sensitivity_calib_by_driver = true, |
826 | .chain_noise_calib_by_driver = true, | |
e1228374 JS |
827 | }; |
828 | ||
5953a62e | 829 | struct iwl_cfg iwl6000i_2abg_cfg = { |
c11362c0 | 830 | .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG", |
5953a62e WYG |
831 | .fw_name_pre = IWL6000_FW_PRE, |
832 | .ucode_api_max = IWL6000_UCODE_API_MAX, | |
833 | .ucode_api_min = IWL6000_UCODE_API_MIN, | |
834 | .sku = IWL_SKU_A|IWL_SKU_G, | |
835 | .ops = &iwl6000_ops, | |
836 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
837 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, | |
00e70590 | 838 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, |
19e6cda0 WYG |
839 | .num_of_queues = IWLAGN_NUM_QUEUES, |
840 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
348ee7cd | 841 | .mod_params = &iwlagn_mod_params, |
5953a62e WYG |
842 | .valid_tx_ant = ANT_BC, |
843 | .valid_rx_ant = ANT_BC, | |
fadb3582 | 844 | .pll_cfg_val = 0, |
a6c5c731 | 845 | .set_l0s = true, |
fadb3582 | 846 | .use_bsm = false, |
5953a62e WYG |
847 | .pa_type = IWL_PA_INTERNAL, |
848 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
849 | .shadow_ram_support = true, | |
5953a62e | 850 | .led_compensation = 51, |
d8c07e7a | 851 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
78f5fb7f | 852 | .supports_idle = true, |
6047b4f9 | 853 | .adv_thermal_throttle = true, |
480e8407 | 854 | .support_ct_kill_exit = true, |
3e4fb5fa | 855 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
d4fe5ac9 | 856 | .chain_noise_scale = 1000, |
ce60659a | 857 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
678b385d | 858 | .max_event_log_size = 1024, |
6e5c800e | 859 | .ucode_tracing = true, |
65d1f896 WYG |
860 | .sensitivity_calib_by_driver = true, |
861 | .chain_noise_calib_by_driver = true, | |
5953a62e WYG |
862 | }; |
863 | ||
864 | struct iwl_cfg iwl6000i_2bg_cfg = { | |
c11362c0 | 865 | .name = "Intel(R) Centrino(R) Advanced-N 6200 BG", |
5953a62e WYG |
866 | .fw_name_pre = IWL6000_FW_PRE, |
867 | .ucode_api_max = IWL6000_UCODE_API_MAX, | |
868 | .ucode_api_min = IWL6000_UCODE_API_MIN, | |
869 | .sku = IWL_SKU_G, | |
870 | .ops = &iwl6000_ops, | |
871 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
872 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, | |
00e70590 | 873 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, |
19e6cda0 WYG |
874 | .num_of_queues = IWLAGN_NUM_QUEUES, |
875 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
348ee7cd | 876 | .mod_params = &iwlagn_mod_params, |
5953a62e WYG |
877 | .valid_tx_ant = ANT_BC, |
878 | .valid_rx_ant = ANT_BC, | |
fadb3582 | 879 | .pll_cfg_val = 0, |
a6c5c731 | 880 | .set_l0s = true, |
fadb3582 | 881 | .use_bsm = false, |
5953a62e WYG |
882 | .pa_type = IWL_PA_INTERNAL, |
883 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
884 | .shadow_ram_support = true, | |
5953a62e | 885 | .led_compensation = 51, |
d8c07e7a | 886 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
78f5fb7f | 887 | .supports_idle = true, |
6047b4f9 | 888 | .adv_thermal_throttle = true, |
480e8407 | 889 | .support_ct_kill_exit = true, |
3e4fb5fa | 890 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
d4fe5ac9 | 891 | .chain_noise_scale = 1000, |
ce60659a | 892 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
678b385d | 893 | .max_event_log_size = 1024, |
6e5c800e | 894 | .ucode_tracing = true, |
65d1f896 WYG |
895 | .sensitivity_calib_by_driver = true, |
896 | .chain_noise_calib_by_driver = true, | |
5953a62e WYG |
897 | }; |
898 | ||
e1228374 | 899 | struct iwl_cfg iwl6050_2agn_cfg = { |
c11362c0 | 900 | .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN", |
e1228374 JS |
901 | .fw_name_pre = IWL6050_FW_PRE, |
902 | .ucode_api_max = IWL6050_UCODE_API_MAX, | |
903 | .ucode_api_min = IWL6050_UCODE_API_MIN, | |
904 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | |
178d1596 | 905 | .ops = &iwl6000_ops, |
415e4993 | 906 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
32b7e244 | 907 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, |
00e70590 | 908 | .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, |
19e6cda0 WYG |
909 | .num_of_queues = IWLAGN_NUM_QUEUES, |
910 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
348ee7cd | 911 | .mod_params = &iwlagn_mod_params, |
542cc793 JS |
912 | .valid_tx_ant = ANT_AB, |
913 | .valid_rx_ant = ANT_AB, | |
fadb3582 | 914 | .pll_cfg_val = 0, |
a6c5c731 | 915 | .set_l0s = true, |
fadb3582 | 916 | .use_bsm = false, |
65b7998a | 917 | .pa_type = IWL_PA_SYSTEM, |
3ab312a8 | 918 | .max_ll_items = OTP_MAX_LL_ITEMS_6x50, |
415e4993 | 919 | .shadow_ram_support = true, |
b261793d | 920 | .ht_greenfield_support = true, |
f2d0d0e2 | 921 | .led_compensation = 51, |
94597ab2 | 922 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
d8c07e7a | 923 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
03264339 SZ |
924 | .supports_idle = true, |
925 | .adv_thermal_throttle = true, | |
926 | .support_ct_kill_exit = true, | |
927 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | |
928 | .chain_noise_scale = 1500, | |
ce60659a | 929 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
03264339 SZ |
930 | .max_event_log_size = 1024, |
931 | .ucode_tracing = true, | |
932 | .sensitivity_calib_by_driver = true, | |
933 | .chain_noise_calib_by_driver = true, | |
934 | .need_dc_calib = true, | |
935 | }; | |
936 | ||
937 | struct iwl_cfg iwl6050g2_bgn_cfg = { | |
938 | .name = "6050 Series 1x2 BGN Gen2", | |
939 | .fw_name_pre = IWL6050_FW_PRE, | |
940 | .ucode_api_max = IWL6050_UCODE_API_MAX, | |
941 | .ucode_api_min = IWL6050_UCODE_API_MIN, | |
942 | .sku = IWL_SKU_G|IWL_SKU_N, | |
943 | .ops = &iwl6000_ops, | |
944 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
945 | .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION, | |
946 | .eeprom_calib_ver = EEPROM_6050G2_TX_POWER_VERSION, | |
947 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
948 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
949 | .mod_params = &iwlagn_mod_params, | |
950 | .valid_tx_ant = ANT_A, | |
951 | .valid_rx_ant = ANT_AB, | |
952 | .pll_cfg_val = 0, | |
953 | .set_l0s = true, | |
954 | .use_bsm = false, | |
955 | .pa_type = IWL_PA_SYSTEM, | |
956 | .max_ll_items = OTP_MAX_LL_ITEMS_6x50, | |
957 | .shadow_ram_support = true, | |
958 | .ht_greenfield_support = true, | |
959 | .led_compensation = 51, | |
94597ab2 | 960 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
03264339 | 961 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
78f5fb7f | 962 | .supports_idle = true, |
6047b4f9 | 963 | .adv_thermal_throttle = true, |
480e8407 | 964 | .support_ct_kill_exit = true, |
3e4fb5fa | 965 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
d4fe5ac9 | 966 | .chain_noise_scale = 1500, |
ce60659a | 967 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
678b385d | 968 | .max_event_log_size = 1024, |
6e5c800e | 969 | .ucode_tracing = true, |
65d1f896 WYG |
970 | .sensitivity_calib_by_driver = true, |
971 | .chain_noise_calib_by_driver = true, | |
178d1596 | 972 | .need_dc_calib = true, |
e1228374 JS |
973 | }; |
974 | ||
5953a62e | 975 | struct iwl_cfg iwl6050_2abg_cfg = { |
c11362c0 | 976 | .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG", |
5953a62e WYG |
977 | .fw_name_pre = IWL6050_FW_PRE, |
978 | .ucode_api_max = IWL6050_UCODE_API_MAX, | |
979 | .ucode_api_min = IWL6050_UCODE_API_MIN, | |
980 | .sku = IWL_SKU_A|IWL_SKU_G, | |
178d1596 | 981 | .ops = &iwl6000_ops, |
5953a62e | 982 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
32b7e244 | 983 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, |
00e70590 | 984 | .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, |
19e6cda0 WYG |
985 | .num_of_queues = IWLAGN_NUM_QUEUES, |
986 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
348ee7cd | 987 | .mod_params = &iwlagn_mod_params, |
5953a62e WYG |
988 | .valid_tx_ant = ANT_AB, |
989 | .valid_rx_ant = ANT_AB, | |
fadb3582 | 990 | .pll_cfg_val = 0, |
a6c5c731 | 991 | .set_l0s = true, |
fadb3582 | 992 | .use_bsm = false, |
5953a62e | 993 | .pa_type = IWL_PA_SYSTEM, |
3ab312a8 | 994 | .max_ll_items = OTP_MAX_LL_ITEMS_6x50, |
5953a62e | 995 | .shadow_ram_support = true, |
5953a62e | 996 | .led_compensation = 51, |
d8c07e7a | 997 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
78f5fb7f | 998 | .supports_idle = true, |
6047b4f9 | 999 | .adv_thermal_throttle = true, |
480e8407 | 1000 | .support_ct_kill_exit = true, |
3e4fb5fa | 1001 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
d4fe5ac9 | 1002 | .chain_noise_scale = 1500, |
ce60659a | 1003 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
678b385d | 1004 | .max_event_log_size = 1024, |
6e5c800e | 1005 | .ucode_tracing = true, |
65d1f896 WYG |
1006 | .sensitivity_calib_by_driver = true, |
1007 | .chain_noise_calib_by_driver = true, | |
178d1596 | 1008 | .need_dc_calib = true, |
5953a62e WYG |
1009 | }; |
1010 | ||
e1228374 | 1011 | struct iwl_cfg iwl6000_3agn_cfg = { |
c11362c0 | 1012 | .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN", |
e1228374 JS |
1013 | .fw_name_pre = IWL6000_FW_PRE, |
1014 | .ucode_api_max = IWL6000_UCODE_API_MAX, | |
1015 | .ucode_api_min = IWL6000_UCODE_API_MIN, | |
1016 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | |
29f35c14 | 1017 | .ops = &iwl6000_ops, |
415e4993 | 1018 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
1f4b9665 | 1019 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, |
00e70590 | 1020 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, |
19e6cda0 WYG |
1021 | .num_of_queues = IWLAGN_NUM_QUEUES, |
1022 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
348ee7cd | 1023 | .mod_params = &iwlagn_mod_params, |
c0bac76a JS |
1024 | .valid_tx_ant = ANT_ABC, |
1025 | .valid_rx_ant = ANT_ABC, | |
fadb3582 | 1026 | .pll_cfg_val = 0, |
a6c5c731 | 1027 | .set_l0s = true, |
fadb3582 | 1028 | .use_bsm = false, |
65b7998a | 1029 | .pa_type = IWL_PA_SYSTEM, |
415e4993 WYG |
1030 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, |
1031 | .shadow_ram_support = true, | |
b261793d | 1032 | .ht_greenfield_support = true, |
f2d0d0e2 | 1033 | .led_compensation = 51, |
94597ab2 | 1034 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
d8c07e7a | 1035 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
78f5fb7f | 1036 | .supports_idle = true, |
6047b4f9 | 1037 | .adv_thermal_throttle = true, |
480e8407 | 1038 | .support_ct_kill_exit = true, |
3e4fb5fa | 1039 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
d4fe5ac9 | 1040 | .chain_noise_scale = 1000, |
ce60659a | 1041 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
678b385d | 1042 | .max_event_log_size = 1024, |
6e5c800e | 1043 | .ucode_tracing = true, |
65d1f896 WYG |
1044 | .sensitivity_calib_by_driver = true, |
1045 | .chain_noise_calib_by_driver = true, | |
e1228374 JS |
1046 | }; |
1047 | ||
e1228374 JS |
1048 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); |
1049 | MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX)); | |
95b13014 | 1050 | MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX)); |
1808972f | 1051 | MODULE_FIRMWARE(IWL6000G2B_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX)); |