iwl-6000.c 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2008-2009 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/kernel.h>
  27. #include <linux/module.h>
  28. #include <linux/init.h>
  29. #include <linux/pci.h>
  30. #include <linux/dma-mapping.h>
  31. #include <linux/delay.h>
  32. #include <linux/skbuff.h>
  33. #include <linux/netdevice.h>
  34. #include <linux/wireless.h>
  35. #include <net/mac80211.h>
  36. #include <linux/etherdevice.h>
  37. #include <asm/unaligned.h>
  38. #include "iwl-eeprom.h"
  39. #include "iwl-dev.h"
  40. #include "iwl-core.h"
  41. #include "iwl-io.h"
  42. #include "iwl-sta.h"
  43. #include "iwl-helpers.h"
  44. #include "iwl-5000-hw.h"
  45. /* Highest firmware API version supported */
  46. #define IWL6000_UCODE_API_MAX 2
  47. #define IWL6050_UCODE_API_MAX 2
  48. /* Lowest firmware API version supported */
  49. #define IWL6000_UCODE_API_MIN 1
  50. #define IWL6050_UCODE_API_MIN 1
  51. #define IWL6000_FW_PRE "iwlwifi-6000-"
  52. #define _IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE #api ".ucode"
  53. #define IWL6000_MODULE_FIRMWARE(api) _IWL6000_MODULE_FIRMWARE(api)
  54. #define IWL6050_FW_PRE "iwlwifi-6050-"
  55. #define _IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE #api ".ucode"
  56. #define IWL6050_MODULE_FIRMWARE(api) _IWL6050_MODULE_FIRMWARE(api)
  57. struct iwl_cfg iwl6000_2ag_cfg = {
  58. .name = "6000 Series 2x2 AG",
  59. .fw_name_pre = IWL6000_FW_PRE,
  60. .ucode_api_max = IWL6000_UCODE_API_MAX,
  61. .ucode_api_min = IWL6000_UCODE_API_MIN,
  62. .sku = IWL_SKU_A|IWL_SKU_G,
  63. .ops = &iwl5000_ops,
  64. .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
  65. .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
  66. .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
  67. .mod_params = &iwl50_mod_params,
  68. .valid_tx_ant = ANT_BC,
  69. .valid_rx_ant = ANT_BC,
  70. .need_pll_cfg = false,
  71. };
  72. struct iwl_cfg iwl6000_2agn_cfg = {
  73. .name = "6000 Series 2x2 AGN",
  74. .fw_name_pre = IWL6000_FW_PRE,
  75. .ucode_api_max = IWL6000_UCODE_API_MAX,
  76. .ucode_api_min = IWL6000_UCODE_API_MIN,
  77. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  78. .ops = &iwl5000_ops,
  79. .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
  80. .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
  81. .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
  82. .mod_params = &iwl50_mod_params,
  83. .valid_tx_ant = ANT_BC,
  84. .valid_rx_ant = ANT_BC,
  85. .need_pll_cfg = false,
  86. };
  87. struct iwl_cfg iwl6050_2agn_cfg = {
  88. .name = "6050 Series 2x2 AGN",
  89. .fw_name_pre = IWL6050_FW_PRE,
  90. .ucode_api_max = IWL6050_UCODE_API_MAX,
  91. .ucode_api_min = IWL6050_UCODE_API_MIN,
  92. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  93. .ops = &iwl5000_ops,
  94. .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
  95. .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
  96. .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
  97. .mod_params = &iwl50_mod_params,
  98. .valid_tx_ant = ANT_BC,
  99. .valid_rx_ant = ANT_BC,
  100. .need_pll_cfg = false,
  101. };
  102. struct iwl_cfg iwl6000_3agn_cfg = {
  103. .name = "6000 Series 3x3 AGN",
  104. .fw_name_pre = IWL6000_FW_PRE,
  105. .ucode_api_max = IWL6000_UCODE_API_MAX,
  106. .ucode_api_min = IWL6000_UCODE_API_MIN,
  107. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  108. .ops = &iwl5000_ops,
  109. .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
  110. .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
  111. .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
  112. .mod_params = &iwl50_mod_params,
  113. .valid_tx_ant = ANT_ABC,
  114. .valid_rx_ant = ANT_ABC,
  115. .need_pll_cfg = false,
  116. };
  117. struct iwl_cfg iwl6050_3agn_cfg = {
  118. .name = "6050 Series 3x3 AGN",
  119. .fw_name_pre = IWL6050_FW_PRE,
  120. .ucode_api_max = IWL6050_UCODE_API_MAX,
  121. .ucode_api_min = IWL6050_UCODE_API_MIN,
  122. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  123. .ops = &iwl5000_ops,
  124. .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
  125. .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
  126. .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
  127. .mod_params = &iwl50_mod_params,
  128. .valid_tx_ant = ANT_ABC,
  129. .valid_rx_ant = ANT_ABC,
  130. .need_pll_cfg = false,
  131. };
  132. MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
  133. MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));