7000.c 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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-agn-hw.h"
  30. #include "cfg.h"
  31. /* Highest firmware API version supported */
  32. #define IWL7260_UCODE_API_MAX 6
  33. #define IWL3160_UCODE_API_MAX 6
  34. /* Oldest version we won't warn about */
  35. #define IWL7260_UCODE_API_OK 6
  36. #define IWL3160_UCODE_API_OK 6
  37. /* Lowest firmware API version supported */
  38. #define IWL7260_UCODE_API_MIN 6
  39. #define IWL3160_UCODE_API_MIN 6
  40. /* NVM versions */
  41. #define IWL7260_NVM_VERSION 0x0a1d
  42. #define IWL7260_TX_POWER_VERSION 0xffff /* meaningless */
  43. #define IWL3160_NVM_VERSION 0x709
  44. #define IWL3160_TX_POWER_VERSION 0xffff /* meaningless */
  45. #define IWL7260_FW_PRE "iwlwifi-7260-"
  46. #define IWL7260_MODULE_FIRMWARE(api) IWL7260_FW_PRE __stringify(api) ".ucode"
  47. #define IWL3160_FW_PRE "iwlwifi-3160-"
  48. #define IWL3160_MODULE_FIRMWARE(api) IWL3160_FW_PRE __stringify(api) ".ucode"
  49. static const struct iwl_base_params iwl7000_base_params = {
  50. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  51. .num_of_queues = IWLAGN_NUM_QUEUES,
  52. .pll_cfg_val = 0,
  53. .shadow_ram_support = true,
  54. .led_compensation = 57,
  55. .adv_thermal_throttle = true,
  56. .support_ct_kill_exit = true,
  57. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  58. .chain_noise_scale = 1000,
  59. .wd_timeout = IWL_LONG_WD_TIMEOUT,
  60. .max_event_log_size = 512,
  61. .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
  62. };
  63. static const struct iwl_ht_params iwl7000_ht_params = {
  64. .ht_greenfield_support = true,
  65. .use_rts_for_aggregation = true, /* use rts/cts protection */
  66. .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ),
  67. };
  68. #define IWL_DEVICE_7000 \
  69. .ucode_api_max = IWL7260_UCODE_API_MAX, \
  70. .ucode_api_ok = IWL7260_UCODE_API_OK, \
  71. .ucode_api_min = IWL7260_UCODE_API_MIN, \
  72. .device_family = IWL_DEVICE_FAMILY_7000, \
  73. .max_inst_size = IWL60_RTC_INST_SIZE, \
  74. .max_data_size = IWL60_RTC_DATA_SIZE, \
  75. .base_params = &iwl7000_base_params, \
  76. /* TODO: .bt_params? */ \
  77. .need_temp_offset_calib = true, \
  78. .led_mode = IWL_LED_RF_STATE, \
  79. .adv_pm = true \
  80. const struct iwl_cfg iwl7260_2ac_cfg = {
  81. .name = "Intel(R) Dual Band Wireless AC7260",
  82. .fw_name_pre = IWL7260_FW_PRE,
  83. IWL_DEVICE_7000,
  84. .ht_params = &iwl7000_ht_params,
  85. .nvm_ver = IWL7260_NVM_VERSION,
  86. .nvm_calib_ver = IWL7260_TX_POWER_VERSION,
  87. };
  88. const struct iwl_cfg iwl3160_ac_cfg = {
  89. .name = "Intel(R) Dual Band Wireless AC3160",
  90. .fw_name_pre = IWL3160_FW_PRE,
  91. IWL_DEVICE_7000,
  92. .ht_params = &iwl7000_ht_params,
  93. .nvm_ver = IWL3160_NVM_VERSION,
  94. .nvm_calib_ver = IWL3160_TX_POWER_VERSION,
  95. };
  96. MODULE_FIRMWARE(IWL7260_MODULE_FIRMWARE(IWL7260_UCODE_API_OK));
  97. MODULE_FIRMWARE(IWL3160_MODULE_FIRMWARE(IWL3160_UCODE_API_OK));