diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/wireless/iwlwifi/iwl-6000.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-6000.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 405 |
1 files changed, 342 insertions, 63 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index 1473452ba22f..92b3e64fc14d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /****************************************************************************** | 1 | /****************************************************************************** |
2 | * | 2 | * |
3 | * Copyright(c) 2008-2009 Intel Corporation. All rights reserved. | 3 | * Copyright(c) 2008 - 2010 Intel Corporation. All rights reserved. |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 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 | 6 | * under the terms of version 2 of the GNU General Public License as |
@@ -44,14 +44,16 @@ | |||
44 | #include "iwl-sta.h" | 44 | #include "iwl-sta.h" |
45 | #include "iwl-helpers.h" | 45 | #include "iwl-helpers.h" |
46 | #include "iwl-5000-hw.h" | 46 | #include "iwl-5000-hw.h" |
47 | #include "iwl-6000-hw.h" | ||
48 | #include "iwl-agn-led.h" | ||
47 | 49 | ||
48 | /* Highest firmware API version supported */ | 50 | /* Highest firmware API version supported */ |
49 | #define IWL6000_UCODE_API_MAX 4 | 51 | #define IWL6000_UCODE_API_MAX 4 |
50 | #define IWL6050_UCODE_API_MAX 4 | 52 | #define IWL6050_UCODE_API_MAX 4 |
51 | 53 | ||
52 | /* Lowest firmware API version supported */ | 54 | /* Lowest firmware API version supported */ |
53 | #define IWL6000_UCODE_API_MIN 1 | 55 | #define IWL6000_UCODE_API_MIN 4 |
54 | #define IWL6050_UCODE_API_MIN 1 | 56 | #define IWL6050_UCODE_API_MIN 4 |
55 | 57 | ||
56 | #define IWL6000_FW_PRE "iwlwifi-6000-" | 58 | #define IWL6000_FW_PRE "iwlwifi-6000-" |
57 | #define _IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE #api ".ucode" | 59 | #define _IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE #api ".ucode" |
@@ -68,26 +70,161 @@ static void iwl6000_set_ct_threshold(struct iwl_priv *priv) | |||
68 | priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD; | 70 | priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD; |
69 | } | 71 | } |
70 | 72 | ||
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 | |||
71 | /* NIC configuration for 6000 series */ | 81 | /* NIC configuration for 6000 series */ |
72 | static void iwl6000_nic_config(struct iwl_priv *priv) | 82 | static void iwl6000_nic_config(struct iwl_priv *priv) |
73 | { | 83 | { |
74 | iwl5000_nic_config(priv); | 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); | ||
75 | 99 | ||
76 | /* no locking required for register write */ | 100 | /* no locking required for register write */ |
77 | if (priv->cfg->pa_type == IWL_PA_HYBRID) { | 101 | if (priv->cfg->pa_type == IWL_PA_INTERNAL) { |
78 | /* 2x2 hybrid phy type */ | ||
79 | iwl_write32(priv, CSR_GP_DRIVER_REG, | ||
80 | CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_HYB); | ||
81 | } else if (priv->cfg->pa_type == IWL_PA_INTERNAL) { | ||
82 | /* 2x2 IPA phy type */ | 102 | /* 2x2 IPA phy type */ |
83 | iwl_write32(priv, CSR_GP_DRIVER_REG, | 103 | iwl_write32(priv, CSR_GP_DRIVER_REG, |
84 | CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA); | 104 | CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA); |
85 | } | 105 | } |
86 | /* else do nothing, uCode configured */ | 106 | /* else do nothing, uCode configured */ |
107 | if (priv->cfg->ops->lib->temp_ops.set_calib_version) | ||
108 | priv->cfg->ops->lib->temp_ops.set_calib_version(priv); | ||
109 | } | ||
110 | |||
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, | ||
121 | .auto_corr_max_ofdm_x1 = 110, | ||
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, | ||
130 | |||
131 | .barker_corr_th_min = 190, | ||
132 | .barker_corr_th_min_mrc = 390, | ||
133 | .nrg_th_cca = 62, | ||
134 | }; | ||
135 | |||
136 | static int iwl6000_hw_set_hw_params(struct iwl_priv *priv) | ||
137 | { | ||
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; | ||
142 | |||
143 | priv->hw_params.max_txq_num = priv->cfg->num_of_queues; | ||
144 | priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; | ||
145 | priv->hw_params.scd_bc_tbls_size = | ||
146 | priv->cfg->num_of_queues * | ||
147 | sizeof(struct iwl5000_scd_bc_tbl); | ||
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; | ||
171 | switch (priv->hw_rev & CSR_HW_REV_TYPE_MSK) { | ||
172 | case CSR_HW_REV_TYPE_6x50: | ||
173 | priv->hw_params.calib_init_cfg = | ||
174 | BIT(IWL_CALIB_XTAL) | | ||
175 | BIT(IWL_CALIB_DC) | | ||
176 | BIT(IWL_CALIB_LO) | | ||
177 | BIT(IWL_CALIB_TX_IQ) | | ||
178 | BIT(IWL_CALIB_BASE_BAND); | ||
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 | |||
190 | return 0; | ||
191 | } | ||
192 | |||
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); | ||
209 | cmd.rxon_flags = priv->staging_rxon.flags; | ||
210 | cmd.rxon_filter_flags = priv->staging_rxon.filter_flags; | ||
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 | } | ||
220 | priv->switch_rxon.channel = cpu_to_le16(channel); | ||
221 | priv->switch_rxon.switch_in_progress = true; | ||
222 | |||
223 | return iwl_send_cmd_sync(priv, &hcmd); | ||
87 | } | 224 | } |
88 | 225 | ||
89 | static struct iwl_lib_ops iwl6000_lib = { | 226 | static struct iwl_lib_ops iwl6000_lib = { |
90 | .set_hw_params = iwl5000_hw_set_hw_params, | 227 | .set_hw_params = iwl6000_hw_set_hw_params, |
91 | .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl, | 228 | .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl, |
92 | .txq_inval_byte_cnt_tbl = iwl5000_txq_inval_byte_cnt_tbl, | 229 | .txq_inval_byte_cnt_tbl = iwl5000_txq_inval_byte_cnt_tbl, |
93 | .txq_set_sched = iwl5000_txq_set_sched, | 230 | .txq_set_sched = iwl5000_txq_set_sched, |
@@ -102,14 +239,16 @@ static struct iwl_lib_ops iwl6000_lib = { | |||
102 | .load_ucode = iwl5000_load_ucode, | 239 | .load_ucode = iwl5000_load_ucode, |
103 | .dump_nic_event_log = iwl_dump_nic_event_log, | 240 | .dump_nic_event_log = iwl_dump_nic_event_log, |
104 | .dump_nic_error_log = iwl_dump_nic_error_log, | 241 | .dump_nic_error_log = iwl_dump_nic_error_log, |
242 | .dump_csr = iwl_dump_csr, | ||
243 | .dump_fh = iwl_dump_fh, | ||
105 | .init_alive_start = iwl5000_init_alive_start, | 244 | .init_alive_start = iwl5000_init_alive_start, |
106 | .alive_notify = iwl5000_alive_notify, | 245 | .alive_notify = iwl5000_alive_notify, |
107 | .send_tx_power = iwl5000_send_tx_power, | 246 | .send_tx_power = iwl5000_send_tx_power, |
108 | .update_chain_flags = iwl_update_chain_flags, | 247 | .update_chain_flags = iwl_update_chain_flags, |
248 | .set_channel_switch = iwl6000_hw_channel_switch, | ||
109 | .apm_ops = { | 249 | .apm_ops = { |
110 | .init = iwl5000_apm_init, | 250 | .init = iwl_apm_init, |
111 | .reset = iwl5000_apm_reset, | 251 | .stop = iwl_apm_stop, |
112 | .stop = iwl5000_apm_stop, | ||
113 | .config = iwl6000_nic_config, | 252 | .config = iwl6000_nic_config, |
114 | .set_pwr_src = iwl_set_pwr_src, | 253 | .set_pwr_src = iwl_set_pwr_src, |
115 | }, | 254 | }, |
@@ -120,7 +259,7 @@ static struct iwl_lib_ops iwl6000_lib = { | |||
120 | EEPROM_5000_REG_BAND_3_CHANNELS, | 259 | EEPROM_5000_REG_BAND_3_CHANNELS, |
121 | EEPROM_5000_REG_BAND_4_CHANNELS, | 260 | EEPROM_5000_REG_BAND_4_CHANNELS, |
122 | EEPROM_5000_REG_BAND_5_CHANNELS, | 261 | EEPROM_5000_REG_BAND_5_CHANNELS, |
123 | EEPROM_5000_REG_BAND_24_HT40_CHANNELS, | 262 | EEPROM_6000_REG_BAND_24_HT40_CHANNELS, |
124 | EEPROM_5000_REG_BAND_52_HT40_CHANNELS | 263 | EEPROM_5000_REG_BAND_52_HT40_CHANNELS |
125 | }, | 264 | }, |
126 | .verify_signature = iwlcore_eeprom_verify_signature, | 265 | .verify_signature = iwlcore_eeprom_verify_signature, |
@@ -137,27 +276,86 @@ static struct iwl_lib_ops iwl6000_lib = { | |||
137 | .temperature = iwl5000_temperature, | 276 | .temperature = iwl5000_temperature, |
138 | .set_ct_kill = iwl6000_set_ct_threshold, | 277 | .set_ct_kill = iwl6000_set_ct_threshold, |
139 | }, | 278 | }, |
279 | .add_bcast_station = iwl_add_bcast_station, | ||
140 | }; | 280 | }; |
141 | 281 | ||
142 | static struct iwl_hcmd_utils_ops iwl6000_hcmd_utils = { | 282 | static const struct iwl_ops iwl6000_ops = { |
143 | .get_hcmd_size = iwl5000_get_hcmd_size, | ||
144 | .build_addsta_hcmd = iwl5000_build_addsta_hcmd, | ||
145 | .rts_tx_cmd_flag = iwl5000_rts_tx_cmd_flag, | ||
146 | .calc_rssi = iwl5000_calc_rssi, | ||
147 | }; | ||
148 | |||
149 | static struct iwl_ops iwl6000_ops = { | ||
150 | .ucode = &iwl5000_ucode, | 283 | .ucode = &iwl5000_ucode, |
151 | .lib = &iwl6000_lib, | 284 | .lib = &iwl6000_lib, |
152 | .hcmd = &iwl5000_hcmd, | 285 | .hcmd = &iwl5000_hcmd, |
153 | .utils = &iwl6000_hcmd_utils, | 286 | .utils = &iwl5000_hcmd_utils, |
287 | .led = &iwlagn_led_ops, | ||
288 | }; | ||
289 | |||
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_6000_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, | ||
154 | }; | 345 | }; |
155 | 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 | }; | ||
156 | 354 | ||
157 | /* | 355 | /* |
158 | * "h": Hybrid configuration, use both internal and external Power Amplifier | 356 | * "i": Internal configuration, use internal Power Amplifier |
159 | */ | 357 | */ |
160 | struct iwl_cfg iwl6000h_2agn_cfg = { | 358 | struct iwl_cfg iwl6000i_2agn_cfg = { |
161 | .name = "6000 Series 2x2 AGN", | 359 | .name = "6000 Series 2x2 AGN", |
162 | .fw_name_pre = IWL6000_FW_PRE, | 360 | .fw_name_pre = IWL6000_FW_PRE, |
163 | .ucode_api_max = IWL6000_UCODE_API_MAX, | 361 | .ucode_api_max = IWL6000_UCODE_API_MAX, |
@@ -165,41 +363,90 @@ struct iwl_cfg iwl6000h_2agn_cfg = { | |||
165 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | 363 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, |
166 | .ops = &iwl6000_ops, | 364 | .ops = &iwl6000_ops, |
167 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 365 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
168 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, | 366 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, |
169 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, | 367 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, |
368 | .num_of_queues = IWL50_NUM_QUEUES, | ||
369 | .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES, | ||
170 | .mod_params = &iwl50_mod_params, | 370 | .mod_params = &iwl50_mod_params, |
171 | .valid_tx_ant = ANT_AB, | 371 | .valid_tx_ant = ANT_BC, |
172 | .valid_rx_ant = ANT_AB, | 372 | .valid_rx_ant = ANT_BC, |
173 | .need_pll_cfg = false, | 373 | .pll_cfg_val = 0, |
174 | .pa_type = IWL_PA_HYBRID, | 374 | .set_l0s = true, |
375 | .use_bsm = false, | ||
376 | .pa_type = IWL_PA_INTERNAL, | ||
175 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | 377 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, |
176 | .shadow_ram_support = true, | 378 | .shadow_ram_support = true, |
177 | .ht_greenfield_support = true, | 379 | .ht_greenfield_support = true, |
380 | .led_compensation = 51, | ||
178 | .use_rts_for_ht = true, /* use rts/cts protection */ | 381 | .use_rts_for_ht = true, /* use rts/cts protection */ |
382 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
383 | .supports_idle = true, | ||
384 | .adv_thermal_throttle = true, | ||
385 | .support_ct_kill_exit = true, | ||
386 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
387 | .chain_noise_scale = 1000, | ||
179 | }; | 388 | }; |
180 | 389 | ||
181 | /* | 390 | struct iwl_cfg iwl6000i_2abg_cfg = { |
182 | * "i": Internal configuration, use internal Power Amplifier | 391 | .name = "6000 Series 2x2 ABG", |
183 | */ | ||
184 | struct iwl_cfg iwl6000i_2agn_cfg = { | ||
185 | .name = "6000 Series 2x2 AGN", | ||
186 | .fw_name_pre = IWL6000_FW_PRE, | 392 | .fw_name_pre = IWL6000_FW_PRE, |
187 | .ucode_api_max = IWL6000_UCODE_API_MAX, | 393 | .ucode_api_max = IWL6000_UCODE_API_MAX, |
188 | .ucode_api_min = IWL6000_UCODE_API_MIN, | 394 | .ucode_api_min = IWL6000_UCODE_API_MIN, |
189 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | 395 | .sku = IWL_SKU_A|IWL_SKU_G, |
190 | .ops = &iwl6000_ops, | 396 | .ops = &iwl6000_ops, |
191 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 397 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
192 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, | 398 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, |
193 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, | 399 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, |
400 | .num_of_queues = IWL50_NUM_QUEUES, | ||
401 | .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES, | ||
194 | .mod_params = &iwl50_mod_params, | 402 | .mod_params = &iwl50_mod_params, |
195 | .valid_tx_ant = ANT_BC, | 403 | .valid_tx_ant = ANT_BC, |
196 | .valid_rx_ant = ANT_BC, | 404 | .valid_rx_ant = ANT_BC, |
197 | .need_pll_cfg = false, | 405 | .pll_cfg_val = 0, |
406 | .set_l0s = true, | ||
407 | .use_bsm = false, | ||
198 | .pa_type = IWL_PA_INTERNAL, | 408 | .pa_type = IWL_PA_INTERNAL, |
199 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | 409 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, |
200 | .shadow_ram_support = true, | 410 | .shadow_ram_support = true, |
201 | .ht_greenfield_support = true, | 411 | .ht_greenfield_support = true, |
202 | .use_rts_for_ht = true, /* use rts/cts protection */ | 412 | .led_compensation = 51, |
413 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
414 | .supports_idle = true, | ||
415 | .adv_thermal_throttle = true, | ||
416 | .support_ct_kill_exit = true, | ||
417 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
418 | .chain_noise_scale = 1000, | ||
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, | ||
431 | .num_of_queues = IWL50_NUM_QUEUES, | ||
432 | .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES, | ||
433 | .mod_params = &iwl50_mod_params, | ||
434 | .valid_tx_ant = ANT_BC, | ||
435 | .valid_rx_ant = ANT_BC, | ||
436 | .pll_cfg_val = 0, | ||
437 | .set_l0s = true, | ||
438 | .use_bsm = false, | ||
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, | ||
444 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
445 | .supports_idle = true, | ||
446 | .adv_thermal_throttle = true, | ||
447 | .support_ct_kill_exit = true, | ||
448 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
449 | .chain_noise_scale = 1000, | ||
203 | }; | 450 | }; |
204 | 451 | ||
205 | struct iwl_cfg iwl6050_2agn_cfg = { | 452 | struct iwl_cfg iwl6050_2agn_cfg = { |
@@ -208,61 +455,93 @@ struct iwl_cfg iwl6050_2agn_cfg = { | |||
208 | .ucode_api_max = IWL6050_UCODE_API_MAX, | 455 | .ucode_api_max = IWL6050_UCODE_API_MAX, |
209 | .ucode_api_min = IWL6050_UCODE_API_MIN, | 456 | .ucode_api_min = IWL6050_UCODE_API_MIN, |
210 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | 457 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, |
211 | .ops = &iwl6000_ops, | 458 | .ops = &iwl6050_ops, |
212 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 459 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
213 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, | 460 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, |
214 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, | 461 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, |
462 | .num_of_queues = IWL50_NUM_QUEUES, | ||
463 | .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES, | ||
215 | .mod_params = &iwl50_mod_params, | 464 | .mod_params = &iwl50_mod_params, |
216 | .valid_tx_ant = ANT_AB, | 465 | .valid_tx_ant = ANT_AB, |
217 | .valid_rx_ant = ANT_AB, | 466 | .valid_rx_ant = ANT_AB, |
218 | .need_pll_cfg = false, | 467 | .pll_cfg_val = 0, |
468 | .set_l0s = true, | ||
469 | .use_bsm = false, | ||
219 | .pa_type = IWL_PA_SYSTEM, | 470 | .pa_type = IWL_PA_SYSTEM, |
220 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | 471 | .max_ll_items = OTP_MAX_LL_ITEMS_6x50, |
221 | .shadow_ram_support = true, | 472 | .shadow_ram_support = true, |
222 | .ht_greenfield_support = true, | 473 | .ht_greenfield_support = true, |
474 | .led_compensation = 51, | ||
223 | .use_rts_for_ht = true, /* use rts/cts protection */ | 475 | .use_rts_for_ht = true, /* use rts/cts protection */ |
476 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
477 | .supports_idle = true, | ||
478 | .adv_thermal_throttle = true, | ||
479 | .support_ct_kill_exit = true, | ||
480 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
481 | .chain_noise_scale = 1500, | ||
224 | }; | 482 | }; |
225 | 483 | ||
226 | struct iwl_cfg iwl6000_3agn_cfg = { | 484 | struct iwl_cfg iwl6050_2abg_cfg = { |
227 | .name = "6000 Series 3x3 AGN", | 485 | .name = "6050 Series 2x2 ABG", |
228 | .fw_name_pre = IWL6000_FW_PRE, | 486 | .fw_name_pre = IWL6050_FW_PRE, |
229 | .ucode_api_max = IWL6000_UCODE_API_MAX, | 487 | .ucode_api_max = IWL6050_UCODE_API_MAX, |
230 | .ucode_api_min = IWL6000_UCODE_API_MIN, | 488 | .ucode_api_min = IWL6050_UCODE_API_MIN, |
231 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | 489 | .sku = IWL_SKU_A|IWL_SKU_G, |
232 | .ops = &iwl6000_ops, | 490 | .ops = &iwl6050_ops, |
233 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 491 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
234 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, | 492 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, |
235 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, | 493 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, |
494 | .num_of_queues = IWL50_NUM_QUEUES, | ||
495 | .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES, | ||
236 | .mod_params = &iwl50_mod_params, | 496 | .mod_params = &iwl50_mod_params, |
237 | .valid_tx_ant = ANT_ABC, | 497 | .valid_tx_ant = ANT_AB, |
238 | .valid_rx_ant = ANT_ABC, | 498 | .valid_rx_ant = ANT_AB, |
239 | .need_pll_cfg = false, | 499 | .pll_cfg_val = 0, |
500 | .set_l0s = true, | ||
501 | .use_bsm = false, | ||
240 | .pa_type = IWL_PA_SYSTEM, | 502 | .pa_type = IWL_PA_SYSTEM, |
241 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | 503 | .max_ll_items = OTP_MAX_LL_ITEMS_6x50, |
242 | .shadow_ram_support = true, | 504 | .shadow_ram_support = true, |
243 | .ht_greenfield_support = true, | 505 | .ht_greenfield_support = true, |
244 | .use_rts_for_ht = true, /* use rts/cts protection */ | 506 | .led_compensation = 51, |
507 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
508 | .supports_idle = true, | ||
509 | .adv_thermal_throttle = true, | ||
510 | .support_ct_kill_exit = true, | ||
511 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
512 | .chain_noise_scale = 1500, | ||
245 | }; | 513 | }; |
246 | 514 | ||
247 | struct iwl_cfg iwl6050_3agn_cfg = { | 515 | struct iwl_cfg iwl6000_3agn_cfg = { |
248 | .name = "6050 Series 3x3 AGN", | 516 | .name = "6000 Series 3x3 AGN", |
249 | .fw_name_pre = IWL6050_FW_PRE, | 517 | .fw_name_pre = IWL6000_FW_PRE, |
250 | .ucode_api_max = IWL6050_UCODE_API_MAX, | 518 | .ucode_api_max = IWL6000_UCODE_API_MAX, |
251 | .ucode_api_min = IWL6050_UCODE_API_MIN, | 519 | .ucode_api_min = IWL6000_UCODE_API_MIN, |
252 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | 520 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, |
253 | .ops = &iwl6000_ops, | 521 | .ops = &iwl6000_ops, |
254 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 522 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
255 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, | 523 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, |
256 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, | 524 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, |
525 | .num_of_queues = IWL50_NUM_QUEUES, | ||
526 | .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES, | ||
257 | .mod_params = &iwl50_mod_params, | 527 | .mod_params = &iwl50_mod_params, |
258 | .valid_tx_ant = ANT_ABC, | 528 | .valid_tx_ant = ANT_ABC, |
259 | .valid_rx_ant = ANT_ABC, | 529 | .valid_rx_ant = ANT_ABC, |
260 | .need_pll_cfg = false, | 530 | .pll_cfg_val = 0, |
531 | .set_l0s = true, | ||
532 | .use_bsm = false, | ||
261 | .pa_type = IWL_PA_SYSTEM, | 533 | .pa_type = IWL_PA_SYSTEM, |
262 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | 534 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, |
263 | .shadow_ram_support = true, | 535 | .shadow_ram_support = true, |
264 | .ht_greenfield_support = true, | 536 | .ht_greenfield_support = true, |
537 | .led_compensation = 51, | ||
265 | .use_rts_for_ht = true, /* use rts/cts protection */ | 538 | .use_rts_for_ht = true, /* use rts/cts protection */ |
539 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
540 | .supports_idle = true, | ||
541 | .adv_thermal_throttle = true, | ||
542 | .support_ct_kill_exit = true, | ||
543 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
544 | .chain_noise_scale = 1000, | ||
266 | }; | 545 | }; |
267 | 546 | ||
268 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); | 547 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); |