iwl-6000.c 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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 1
  47. #define IWL6050_UCODE_API_MAX 1
  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. };
  69. struct iwl_cfg iwl6000_2agn_cfg = {
  70. .name = "6000 Series 2x2 AGN",
  71. .fw_name_pre = IWL6000_FW_PRE,
  72. .ucode_api_max = IWL6000_UCODE_API_MAX,
  73. .ucode_api_min = IWL6000_UCODE_API_MIN,
  74. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  75. .ops = &iwl5000_ops,
  76. .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
  77. .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
  78. .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
  79. .mod_params = &iwl50_mod_params,
  80. };
  81. struct iwl_cfg iwl6050_2agn_cfg = {
  82. .name = "6050 Series 2x2 AGN",
  83. .fw_name_pre = IWL6050_FW_PRE,
  84. .ucode_api_max = IWL6050_UCODE_API_MAX,
  85. .ucode_api_min = IWL6050_UCODE_API_MIN,
  86. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  87. .ops = &iwl5000_ops,
  88. .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
  89. .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
  90. .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
  91. .mod_params = &iwl50_mod_params,
  92. };
  93. struct iwl_cfg iwl6000_3agn_cfg = {
  94. .name = "6000 Series 3x3 AGN",
  95. .fw_name_pre = IWL6000_FW_PRE,
  96. .ucode_api_max = IWL6000_UCODE_API_MAX,
  97. .ucode_api_min = IWL6000_UCODE_API_MIN,
  98. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  99. .ops = &iwl5000_ops,
  100. .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
  101. .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
  102. .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
  103. .mod_params = &iwl50_mod_params,
  104. };
  105. struct iwl_cfg iwl6050_3agn_cfg = {
  106. .name = "6050 Series 3x3 AGN",
  107. .fw_name_pre = IWL6050_FW_PRE,
  108. .ucode_api_max = IWL6050_UCODE_API_MAX,
  109. .ucode_api_min = IWL6050_UCODE_API_MIN,
  110. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  111. .ops = &iwl5000_ops,
  112. .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
  113. .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
  114. .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
  115. .mod_params = &iwl50_mod_params,
  116. };
  117. MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
  118. MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));