iwl-1000.c 4.4 KB

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