diff options
author | Abhijeet Kolekar <abhijeet.kolekar@intel.com> | 2010-02-19 01:03:05 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-02-19 15:52:49 -0500 |
commit | d5755939e810f38c969a1d1b0effb2b75095b94e (patch) | |
tree | 8f74e854de37aac9cb8c993f78fb6af522a60165 /drivers/net/wireless/iwlwifi/iwl-6000.c | |
parent | d2dfe6df755abb365aa3e2e67d88bda3cce5fd12 (diff) |
iwlwifi: indicate calib version for 6050 series
Indicate calibration version to uCode
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-6000.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 79 |
1 files changed, 77 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index 782e23a26984..c4844adff92a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -70,6 +70,14 @@ static void iwl6000_set_ct_threshold(struct iwl_priv *priv) | |||
70 | priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD; | 70 | priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD; |
71 | } | 71 | } |
72 | 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 | |||
73 | /* NIC configuration for 6000 series */ | 81 | /* NIC configuration for 6000 series */ |
74 | static void iwl6000_nic_config(struct iwl_priv *priv) | 82 | static void iwl6000_nic_config(struct iwl_priv *priv) |
75 | { | 83 | { |
@@ -96,6 +104,8 @@ static void iwl6000_nic_config(struct iwl_priv *priv) | |||
96 | CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA); | 104 | CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA); |
97 | } | 105 | } |
98 | /* 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); | ||
99 | } | 109 | } |
100 | 110 | ||
101 | static struct iwl_sensitivity_ranges iwl6000_sensitivity = { | 111 | static struct iwl_sensitivity_ranges iwl6000_sensitivity = { |
@@ -277,6 +287,71 @@ static const struct iwl_ops iwl6000_ops = { | |||
277 | .led = &iwlagn_led_ops, | 287 | .led = &iwlagn_led_ops, |
278 | }; | 288 | }; |
279 | 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_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 | |||
280 | /* | 355 | /* |
281 | * "i": Internal configuration, use internal Power Amplifier | 356 | * "i": Internal configuration, use internal Power Amplifier |
282 | */ | 357 | */ |
@@ -380,7 +455,7 @@ struct iwl_cfg iwl6050_2agn_cfg = { | |||
380 | .ucode_api_max = IWL6050_UCODE_API_MAX, | 455 | .ucode_api_max = IWL6050_UCODE_API_MAX, |
381 | .ucode_api_min = IWL6050_UCODE_API_MIN, | 456 | .ucode_api_min = IWL6050_UCODE_API_MIN, |
382 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | 457 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, |
383 | .ops = &iwl6000_ops, | 458 | .ops = &iwl6050_ops, |
384 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 459 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
385 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, | 460 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, |
386 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, | 461 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, |
@@ -412,7 +487,7 @@ struct iwl_cfg iwl6050_2abg_cfg = { | |||
412 | .ucode_api_max = IWL6050_UCODE_API_MAX, | 487 | .ucode_api_max = IWL6050_UCODE_API_MAX, |
413 | .ucode_api_min = IWL6050_UCODE_API_MIN, | 488 | .ucode_api_min = IWL6050_UCODE_API_MIN, |
414 | .sku = IWL_SKU_A|IWL_SKU_G, | 489 | .sku = IWL_SKU_A|IWL_SKU_G, |
415 | .ops = &iwl6000_ops, | 490 | .ops = &iwl6050_ops, |
416 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 491 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
417 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, | 492 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, |
418 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, | 493 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, |