iwl-5000.c 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2012 Intel Corporation. All rights reserved.
  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. #include <linux/module.h>
  27. #include <linux/stringify.h>
  28. #include "iwl-config.h"
  29. #include "iwl-cfg.h"
  30. #include "iwl-dev.h" /* still needed */
  31. /* Highest firmware API version supported */
  32. #define IWL5000_UCODE_API_MAX 5
  33. #define IWL5150_UCODE_API_MAX 2
  34. /* Lowest firmware API version supported */
  35. #define IWL5000_UCODE_API_MIN 1
  36. #define IWL5150_UCODE_API_MIN 1
  37. #define IWL5000_FW_PRE "iwlwifi-5000-"
  38. #define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE __stringify(api) ".ucode"
  39. #define IWL5150_FW_PRE "iwlwifi-5150-"
  40. #define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE __stringify(api) ".ucode"
  41. static const struct iwl_base_params iwl5000_base_params = {
  42. .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
  43. .num_of_queues = IWLAGN_NUM_QUEUES,
  44. .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
  45. .led_compensation = 51,
  46. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
  47. .chain_noise_scale = 1000,
  48. .wd_timeout = IWL_WATCHHDOG_DISABLED,
  49. .max_event_log_size = 512,
  50. .no_idle_support = true,
  51. };
  52. static const struct iwl_ht_params iwl5000_ht_params = {
  53. .ht_greenfield_support = true,
  54. };
  55. #define IWL_DEVICE_5000 \
  56. .fw_name_pre = IWL5000_FW_PRE, \
  57. .ucode_api_max = IWL5000_UCODE_API_MAX, \
  58. .ucode_api_min = IWL5000_UCODE_API_MIN, \
  59. .device_family = IWL_DEVICE_FAMILY_5000, \
  60. .max_inst_size = IWLAGN_RTC_INST_SIZE, \
  61. .max_data_size = IWLAGN_RTC_DATA_SIZE, \
  62. .eeprom_ver = EEPROM_5000_EEPROM_VERSION, \
  63. .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, \
  64. .base_params = &iwl5000_base_params, \
  65. .led_mode = IWL_LED_BLINK
  66. const struct iwl_cfg iwl5300_agn_cfg = {
  67. .name = "Intel(R) Ultimate N WiFi Link 5300 AGN",
  68. IWL_DEVICE_5000,
  69. /* at least EEPROM 0x11A has wrong info */
  70. .valid_tx_ant = ANT_ABC, /* .cfg overwrite */
  71. .valid_rx_ant = ANT_ABC, /* .cfg overwrite */
  72. .ht_params = &iwl5000_ht_params,
  73. };
  74. const struct iwl_cfg iwl5100_bgn_cfg = {
  75. .name = "Intel(R) WiFi Link 5100 BGN",
  76. IWL_DEVICE_5000,
  77. .valid_tx_ant = ANT_B, /* .cfg overwrite */
  78. .valid_rx_ant = ANT_AB, /* .cfg overwrite */
  79. .ht_params = &iwl5000_ht_params,
  80. };
  81. const struct iwl_cfg iwl5100_abg_cfg = {
  82. .name = "Intel(R) WiFi Link 5100 ABG",
  83. IWL_DEVICE_5000,
  84. .valid_tx_ant = ANT_B, /* .cfg overwrite */
  85. .valid_rx_ant = ANT_AB, /* .cfg overwrite */
  86. };
  87. const struct iwl_cfg iwl5100_agn_cfg = {
  88. .name = "Intel(R) WiFi Link 5100 AGN",
  89. IWL_DEVICE_5000,
  90. .valid_tx_ant = ANT_B, /* .cfg overwrite */
  91. .valid_rx_ant = ANT_AB, /* .cfg overwrite */
  92. .ht_params = &iwl5000_ht_params,
  93. };
  94. const struct iwl_cfg iwl5350_agn_cfg = {
  95. .name = "Intel(R) WiMAX/WiFi Link 5350 AGN",
  96. .fw_name_pre = IWL5000_FW_PRE,
  97. .ucode_api_max = IWL5000_UCODE_API_MAX,
  98. .ucode_api_min = IWL5000_UCODE_API_MIN,
  99. .device_family = IWL_DEVICE_FAMILY_5000,
  100. .max_inst_size = IWLAGN_RTC_INST_SIZE,
  101. .max_data_size = IWLAGN_RTC_DATA_SIZE,
  102. .eeprom_ver = EEPROM_5050_EEPROM_VERSION,
  103. .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION,
  104. .base_params = &iwl5000_base_params,
  105. .ht_params = &iwl5000_ht_params,
  106. .led_mode = IWL_LED_BLINK,
  107. .internal_wimax_coex = true,
  108. };
  109. #define IWL_DEVICE_5150 \
  110. .fw_name_pre = IWL5150_FW_PRE, \
  111. .ucode_api_max = IWL5150_UCODE_API_MAX, \
  112. .ucode_api_min = IWL5150_UCODE_API_MIN, \
  113. .device_family = IWL_DEVICE_FAMILY_5150, \
  114. .max_inst_size = IWLAGN_RTC_INST_SIZE, \
  115. .max_data_size = IWLAGN_RTC_DATA_SIZE, \
  116. .eeprom_ver = EEPROM_5050_EEPROM_VERSION, \
  117. .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, \
  118. .base_params = &iwl5000_base_params, \
  119. .no_xtal_calib = true, \
  120. .led_mode = IWL_LED_BLINK, \
  121. .internal_wimax_coex = true
  122. const struct iwl_cfg iwl5150_agn_cfg = {
  123. .name = "Intel(R) WiMAX/WiFi Link 5150 AGN",
  124. IWL_DEVICE_5150,
  125. .ht_params = &iwl5000_ht_params,
  126. };
  127. const struct iwl_cfg iwl5150_abg_cfg = {
  128. .name = "Intel(R) WiMAX/WiFi Link 5150 ABG",
  129. IWL_DEVICE_5150,
  130. };
  131. MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
  132. MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX));