iwl-1000.c 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2008 - 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-csr.h"
  31. #include "iwl-agn-hw.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_WATCHHDOG_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. };
  65. #define IWL_DEVICE_1000 \
  66. .fw_name_pre = IWL1000_FW_PRE, \
  67. .ucode_api_max = IWL1000_UCODE_API_MAX, \
  68. .ucode_api_ok = IWL1000_UCODE_API_OK, \
  69. .ucode_api_min = IWL1000_UCODE_API_MIN, \
  70. .device_family = IWL_DEVICE_FAMILY_1000, \
  71. .max_inst_size = IWLAGN_RTC_INST_SIZE, \
  72. .max_data_size = IWLAGN_RTC_DATA_SIZE, \
  73. .eeprom_ver = EEPROM_1000_EEPROM_VERSION, \
  74. .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, \
  75. .base_params = &iwl1000_base_params, \
  76. .led_mode = IWL_LED_BLINK
  77. const struct iwl_cfg iwl1000_bgn_cfg = {
  78. .name = "Intel(R) Centrino(R) Wireless-N 1000 BGN",
  79. IWL_DEVICE_1000,
  80. .ht_params = &iwl1000_ht_params,
  81. };
  82. const struct iwl_cfg iwl1000_bg_cfg = {
  83. .name = "Intel(R) Centrino(R) Wireless-N 1000 BG",
  84. IWL_DEVICE_1000,
  85. };
  86. #define IWL_DEVICE_100 \
  87. .fw_name_pre = IWL100_FW_PRE, \
  88. .ucode_api_max = IWL100_UCODE_API_MAX, \
  89. .ucode_api_ok = IWL100_UCODE_API_OK, \
  90. .ucode_api_min = IWL100_UCODE_API_MIN, \
  91. .device_family = IWL_DEVICE_FAMILY_100, \
  92. .max_inst_size = IWLAGN_RTC_INST_SIZE, \
  93. .max_data_size = IWLAGN_RTC_DATA_SIZE, \
  94. .eeprom_ver = EEPROM_1000_EEPROM_VERSION, \
  95. .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, \
  96. .base_params = &iwl1000_base_params, \
  97. .led_mode = IWL_LED_RF_STATE, \
  98. .rx_with_siso_diversity = true
  99. const struct iwl_cfg iwl100_bgn_cfg = {
  100. .name = "Intel(R) Centrino(R) Wireless-N 100 BGN",
  101. IWL_DEVICE_100,
  102. .ht_params = &iwl1000_ht_params,
  103. };
  104. const struct iwl_cfg iwl100_bg_cfg = {
  105. .name = "Intel(R) Centrino(R) Wireless-N 100 BG",
  106. IWL_DEVICE_100,
  107. };
  108. MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_OK));
  109. MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_OK));