1000.c 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2008 - 2013 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-csr.h"
  30. #include "iwl-agn-hw.h"
  31. #include "cfg.h"
  32. /* Highest firmware API version supported */
  33. #define IWL1000_UCODE_API_MAX 5
  34. #define IWL100_UCODE_API_MAX 5
  35. /* Oldest version we won't warn about */
  36. #define IWL1000_UCODE_API_OK 5
  37. #define IWL100_UCODE_API_OK 5
  38. /* Lowest firmware API version supported */
  39. #define IWL1000_UCODE_API_MIN 1
  40. #define IWL100_UCODE_API_MIN 5
  41. /* EEPROM version */
  42. #define EEPROM_1000_TX_POWER_VERSION (4)
  43. #define EEPROM_1000_EEPROM_VERSION (0x15C)
  44. #define IWL1000_FW_PRE "iwlwifi-1000-"
  45. #define IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE __stringify(api) ".ucode"
  46. #define IWL100_FW_PRE "iwlwifi-100-"
  47. #define IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE __stringify(api) ".ucode"
  48. static const struct iwl_base_params iwl1000_base_params = {
  49. .num_of_queues = IWLAGN_NUM_QUEUES,
  50. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  51. .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
  52. .max_ll_items = OTP_MAX_LL_ITEMS_1000,
  53. .shadow_ram_support = false,
  54. .led_compensation = 51,
  55. .support_ct_kill_exit = true,
  56. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
  57. .chain_noise_scale = 1000,
  58. .wd_timeout = IWL_WATCHDOG_DISABLED,
  59. .max_event_log_size = 128,
  60. };
  61. static const struct iwl_ht_params iwl1000_ht_params = {
  62. .ht_greenfield_support = true,
  63. .use_rts_for_aggregation = true, /* use rts/cts protection */
  64. .ht40_bands = BIT(IEEE80211_BAND_2GHZ),
  65. };
  66. static const struct iwl_eeprom_params iwl1000_eeprom_params = {
  67. .regulatory_bands = {
  68. EEPROM_REG_BAND_1_CHANNELS,
  69. EEPROM_REG_BAND_2_CHANNELS,
  70. EEPROM_REG_BAND_3_CHANNELS,
  71. EEPROM_REG_BAND_4_CHANNELS,
  72. EEPROM_REG_BAND_5_CHANNELS,
  73. EEPROM_REG_BAND_24_HT40_CHANNELS,
  74. EEPROM_REGULATORY_BAND_NO_HT40,
  75. }
  76. };
  77. #define IWL_DEVICE_1000 \
  78. .fw_name_pre = IWL1000_FW_PRE, \
  79. .ucode_api_max = IWL1000_UCODE_API_MAX, \
  80. .ucode_api_ok = IWL1000_UCODE_API_OK, \
  81. .ucode_api_min = IWL1000_UCODE_API_MIN, \
  82. .device_family = IWL_DEVICE_FAMILY_1000, \
  83. .max_inst_size = IWLAGN_RTC_INST_SIZE, \
  84. .max_data_size = IWLAGN_RTC_DATA_SIZE, \
  85. .nvm_ver = EEPROM_1000_EEPROM_VERSION, \
  86. .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \
  87. .base_params = &iwl1000_base_params, \
  88. .eeprom_params = &iwl1000_eeprom_params, \
  89. .led_mode = IWL_LED_BLINK
  90. const struct iwl_cfg iwl1000_bgn_cfg = {
  91. .name = "Intel(R) Centrino(R) Wireless-N 1000 BGN",
  92. IWL_DEVICE_1000,
  93. .ht_params = &iwl1000_ht_params,
  94. };
  95. const struct iwl_cfg iwl1000_bg_cfg = {
  96. .name = "Intel(R) Centrino(R) Wireless-N 1000 BG",
  97. IWL_DEVICE_1000,
  98. };
  99. #define IWL_DEVICE_100 \
  100. .fw_name_pre = IWL100_FW_PRE, \
  101. .ucode_api_max = IWL100_UCODE_API_MAX, \
  102. .ucode_api_ok = IWL100_UCODE_API_OK, \
  103. .ucode_api_min = IWL100_UCODE_API_MIN, \
  104. .device_family = IWL_DEVICE_FAMILY_100, \
  105. .max_inst_size = IWLAGN_RTC_INST_SIZE, \
  106. .max_data_size = IWLAGN_RTC_DATA_SIZE, \
  107. .nvm_ver = EEPROM_1000_EEPROM_VERSION, \
  108. .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \
  109. .base_params = &iwl1000_base_params, \
  110. .eeprom_params = &iwl1000_eeprom_params, \
  111. .led_mode = IWL_LED_RF_STATE, \
  112. .rx_with_siso_diversity = true
  113. const struct iwl_cfg iwl100_bgn_cfg = {
  114. .name = "Intel(R) Centrino(R) Wireless-N 100 BGN",
  115. IWL_DEVICE_100,
  116. .ht_params = &iwl1000_ht_params,
  117. };
  118. const struct iwl_cfg iwl100_bg_cfg = {
  119. .name = "Intel(R) Centrino(R) Wireless-N 100 BG",
  120. IWL_DEVICE_100,
  121. };
  122. MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_OK));
  123. MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_OK));