aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-2000.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-2000.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-2000.c79
1 files changed, 32 insertions, 47 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c
index e76e02c28928..bca462c47e37 100644
--- a/drivers/net/wireless/iwlwifi/iwl-2000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-2000.c
@@ -46,17 +46,16 @@
46#include "iwl-helpers.h" 46#include "iwl-helpers.h"
47#include "iwl-agn-hw.h" 47#include "iwl-agn-hw.h"
48#include "iwl-6000-hw.h" 48#include "iwl-6000-hw.h"
49#include "iwl-agn-debugfs.h"
50 49
51/* Highest firmware API version supported */ 50/* Highest firmware API version supported */
52#define IWL2030_UCODE_API_MAX 5 51#define IWL2030_UCODE_API_MAX 5
53#define IWL2000_UCODE_API_MAX 5 52#define IWL2000_UCODE_API_MAX 5
54#define IWL200_UCODE_API_MAX 5 53#define IWL105_UCODE_API_MAX 5
55 54
56/* Lowest firmware API version supported */ 55/* Lowest firmware API version supported */
57#define IWL2030_UCODE_API_MIN 5 56#define IWL2030_UCODE_API_MIN 5
58#define IWL2000_UCODE_API_MIN 5 57#define IWL2000_UCODE_API_MIN 5
59#define IWL200_UCODE_API_MIN 5 58#define IWL105_UCODE_API_MIN 5
60 59
61#define IWL2030_FW_PRE "iwlwifi-2030-" 60#define IWL2030_FW_PRE "iwlwifi-2030-"
62#define IWL2030_MODULE_FIRMWARE(api) IWL2030_FW_PRE #api ".ucode" 61#define IWL2030_MODULE_FIRMWARE(api) IWL2030_FW_PRE #api ".ucode"
@@ -64,8 +63,8 @@
64#define IWL2000_FW_PRE "iwlwifi-2000-" 63#define IWL2000_FW_PRE "iwlwifi-2000-"
65#define IWL2000_MODULE_FIRMWARE(api) IWL2000_FW_PRE #api ".ucode" 64#define IWL2000_MODULE_FIRMWARE(api) IWL2000_FW_PRE #api ".ucode"
66 65
67#define IWL200_FW_PRE "iwlwifi-200-" 66#define IWL105_FW_PRE "iwlwifi-105-"
68#define IWL200_MODULE_FIRMWARE(api) IWL200_FW_PRE #api ".ucode" 67#define IWL105_MODULE_FIRMWARE(api) IWL105_FW_PRE #api ".ucode"
69 68
70static void iwl2000_set_ct_threshold(struct iwl_priv *priv) 69static void iwl2000_set_ct_threshold(struct iwl_priv *priv)
71{ 70{
@@ -128,10 +127,10 @@ static struct iwl_sensitivity_ranges iwl2000_sensitivity = {
128 127
129static int iwl2000_hw_set_hw_params(struct iwl_priv *priv) 128static int iwl2000_hw_set_hw_params(struct iwl_priv *priv)
130{ 129{
131 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && 130 if (iwlagn_mod_params.num_of_queues >= IWL_MIN_NUM_QUEUES &&
132 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES) 131 iwlagn_mod_params.num_of_queues <= IWLAGN_NUM_QUEUES)
133 priv->cfg->base_params->num_of_queues = 132 priv->cfg->base_params->num_of_queues =
134 priv->cfg->mod_params->num_of_queues; 133 iwlagn_mod_params.num_of_queues;
135 134
136 priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues; 135 priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues;
137 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; 136 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
@@ -280,22 +279,12 @@ static struct iwl_lib_ops iwl2000_lib = {
280 EEPROM_6000_REG_BAND_24_HT40_CHANNELS, 279 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
281 EEPROM_REGULATORY_BAND_NO_HT40, 280 EEPROM_REGULATORY_BAND_NO_HT40,
282 }, 281 },
283 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
284 .release_semaphore = iwlcore_eeprom_release_semaphore,
285 .calib_version = iwlagn_eeprom_calib_version,
286 .query_addr = iwlagn_eeprom_query_addr, 282 .query_addr = iwlagn_eeprom_query_addr,
287 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower, 283 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
288 }, 284 },
289 .temp_ops = { 285 .temp_ops = {
290 .temperature = iwlagn_temperature, 286 .temperature = iwlagn_temperature,
291 }, 287 },
292 .debugfs_ops = {
293 .rx_stats_read = iwl_ucode_rx_stats_read,
294 .tx_stats_read = iwl_ucode_tx_stats_read,
295 .general_stats_read = iwl_ucode_general_stats_read,
296 .bt_stats_read = iwl_ucode_bt_stats_read,
297 .reply_tx_error = iwl_reply_tx_error_read,
298 },
299 .txfifo_flush = iwlagn_txfifo_flush, 288 .txfifo_flush = iwlagn_txfifo_flush,
300 .dev_txfifo_flush = iwlagn_dev_txfifo_flush, 289 .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
301}; 290};
@@ -312,13 +301,13 @@ static const struct iwl_ops iwl2030_ops = {
312 .utils = &iwlagn_hcmd_utils, 301 .utils = &iwlagn_hcmd_utils,
313}; 302};
314 303
315static const struct iwl_ops iwl200_ops = { 304static const struct iwl_ops iwl105_ops = {
316 .lib = &iwl2000_lib, 305 .lib = &iwl2000_lib,
317 .hcmd = &iwlagn_hcmd, 306 .hcmd = &iwlagn_hcmd,
318 .utils = &iwlagn_hcmd_utils, 307 .utils = &iwlagn_hcmd_utils,
319}; 308};
320 309
321static const struct iwl_ops iwl230_ops = { 310static const struct iwl_ops iwl135_ops = {
322 .lib = &iwl2000_lib, 311 .lib = &iwl2000_lib,
323 .hcmd = &iwlagn_bt_hcmd, 312 .hcmd = &iwlagn_bt_hcmd,
324 .utils = &iwlagn_hcmd_utils, 313 .utils = &iwlagn_hcmd_utils,
@@ -383,7 +372,6 @@ static struct iwl_bt_params iwl2030_bt_params = {
383 .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \ 372 .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \
384 .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ 373 .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
385 .ops = &iwl2000_ops, \ 374 .ops = &iwl2000_ops, \
386 .mod_params = &iwlagn_mod_params, \
387 .base_params = &iwl2000_base_params, \ 375 .base_params = &iwl2000_base_params, \
388 .need_dc_calib = true, \ 376 .need_dc_calib = true, \
389 .need_temp_offset_calib = true, \ 377 .need_temp_offset_calib = true, \
@@ -409,7 +397,6 @@ struct iwl_cfg iwl2000_2bg_cfg = {
409 .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \ 397 .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \
410 .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ 398 .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
411 .ops = &iwl2030_ops, \ 399 .ops = &iwl2030_ops, \
412 .mod_params = &iwlagn_mod_params, \
413 .base_params = &iwl2030_base_params, \ 400 .base_params = &iwl2030_base_params, \
414 .bt_params = &iwl2030_bt_params, \ 401 .bt_params = &iwl2030_bt_params, \
415 .need_dc_calib = true, \ 402 .need_dc_calib = true, \
@@ -429,14 +416,13 @@ struct iwl_cfg iwl2030_2bg_cfg = {
429 IWL_DEVICE_2030, 416 IWL_DEVICE_2030,
430}; 417};
431 418
432#define IWL_DEVICE_200 \ 419#define IWL_DEVICE_105 \
433 .fw_name_pre = IWL200_FW_PRE, \ 420 .fw_name_pre = IWL105_FW_PRE, \
434 .ucode_api_max = IWL200_UCODE_API_MAX, \ 421 .ucode_api_max = IWL105_UCODE_API_MAX, \
435 .ucode_api_min = IWL200_UCODE_API_MIN, \ 422 .ucode_api_min = IWL105_UCODE_API_MIN, \
436 .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \ 423 .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \
437 .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ 424 .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
438 .ops = &iwl200_ops, \ 425 .ops = &iwl105_ops, \
439 .mod_params = &iwlagn_mod_params, \
440 .base_params = &iwl2000_base_params, \ 426 .base_params = &iwl2000_base_params, \
441 .need_dc_calib = true, \ 427 .need_dc_calib = true, \
442 .need_temp_offset_calib = true, \ 428 .need_temp_offset_calib = true, \
@@ -444,25 +430,24 @@ struct iwl_cfg iwl2030_2bg_cfg = {
444 .adv_pm = true, \ 430 .adv_pm = true, \
445 .rx_with_siso_diversity = true \ 431 .rx_with_siso_diversity = true \
446 432
447struct iwl_cfg iwl200_bg_cfg = { 433struct iwl_cfg iwl105_bg_cfg = {
448 .name = "200 Series 1x1 BG", 434 .name = "105 Series 1x1 BG",
449 IWL_DEVICE_200, 435 IWL_DEVICE_105,
450}; 436};
451 437
452struct iwl_cfg iwl200_bgn_cfg = { 438struct iwl_cfg iwl105_bgn_cfg = {
453 .name = "200 Series 1x1 BGN", 439 .name = "105 Series 1x1 BGN",
454 IWL_DEVICE_200, 440 IWL_DEVICE_105,
455 .ht_params = &iwl2000_ht_params, 441 .ht_params = &iwl2000_ht_params,
456}; 442};
457 443
458#define IWL_DEVICE_230 \ 444#define IWL_DEVICE_135 \
459 .fw_name_pre = IWL200_FW_PRE, \ 445 .fw_name_pre = IWL105_FW_PRE, \
460 .ucode_api_max = IWL200_UCODE_API_MAX, \ 446 .ucode_api_max = IWL105_UCODE_API_MAX, \
461 .ucode_api_min = IWL200_UCODE_API_MIN, \ 447 .ucode_api_min = IWL105_UCODE_API_MIN, \
462 .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \ 448 .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \
463 .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ 449 .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
464 .ops = &iwl230_ops, \ 450 .ops = &iwl135_ops, \
465 .mod_params = &iwlagn_mod_params, \
466 .base_params = &iwl2030_base_params, \ 451 .base_params = &iwl2030_base_params, \
467 .bt_params = &iwl2030_bt_params, \ 452 .bt_params = &iwl2030_bt_params, \
468 .need_dc_calib = true, \ 453 .need_dc_calib = true, \
@@ -471,17 +456,17 @@ struct iwl_cfg iwl200_bgn_cfg = {
471 .adv_pm = true, \ 456 .adv_pm = true, \
472 .rx_with_siso_diversity = true \ 457 .rx_with_siso_diversity = true \
473 458
474struct iwl_cfg iwl230_bg_cfg = { 459struct iwl_cfg iwl135_bg_cfg = {
475 .name = "200 Series 1x1 BG/BT", 460 .name = "105 Series 1x1 BG/BT",
476 IWL_DEVICE_230, 461 IWL_DEVICE_135,
477}; 462};
478 463
479struct iwl_cfg iwl230_bgn_cfg = { 464struct iwl_cfg iwl135_bgn_cfg = {
480 .name = "200 Series 1x1 BGN/BT", 465 .name = "105 Series 1x1 BGN/BT",
481 IWL_DEVICE_230, 466 IWL_DEVICE_135,
482 .ht_params = &iwl2000_ht_params, 467 .ht_params = &iwl2000_ht_params,
483}; 468};
484 469
485MODULE_FIRMWARE(IWL2000_MODULE_FIRMWARE(IWL2000_UCODE_API_MAX)); 470MODULE_FIRMWARE(IWL2000_MODULE_FIRMWARE(IWL2000_UCODE_API_MAX));
486MODULE_FIRMWARE(IWL2030_MODULE_FIRMWARE(IWL2030_UCODE_API_MAX)); 471MODULE_FIRMWARE(IWL2030_MODULE_FIRMWARE(IWL2030_UCODE_API_MAX));
487MODULE_FIRMWARE(IWL200_MODULE_FIRMWARE(IWL200_UCODE_API_MAX)); 472MODULE_FIRMWARE(IWL105_MODULE_FIRMWARE(IWL105_UCODE_API_MAX));