1 /******************************************************************************
3 * Copyright(c) 2007 - 2013 Intel Corporation. All rights reserved.
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.
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
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
18 * The full GNU General Public License is included in this distribution in the
19 * file called LICENSE.
21 * Contact Information:
22 * Intel Linux Wireless <ilw@linux.intel.com>
23 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
25 *****************************************************************************/
27 #include <linux/module.h>
28 #include <linux/stringify.h>
29 #include "iwl-config.h"
30 #include "iwl-agn-hw.h"
33 /* Highest firmware API version supported */
34 #define IWL5000_UCODE_API_MAX 5
35 #define IWL5150_UCODE_API_MAX 2
37 /* Oldest version we won't warn about */
38 #define IWL5000_UCODE_API_OK 5
39 #define IWL5150_UCODE_API_OK 2
41 /* Lowest firmware API version supported */
42 #define IWL5000_UCODE_API_MIN 1
43 #define IWL5150_UCODE_API_MIN 1
46 #define EEPROM_5000_TX_POWER_VERSION (4)
47 #define EEPROM_5000_EEPROM_VERSION (0x11A)
48 #define EEPROM_5050_TX_POWER_VERSION (4)
49 #define EEPROM_5050_EEPROM_VERSION (0x21E)
51 #define IWL5000_FW_PRE "iwlwifi-5000-"
52 #define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE __stringify(api) ".ucode"
54 #define IWL5150_FW_PRE "iwlwifi-5150-"
55 #define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE __stringify(api) ".ucode"
57 static const struct iwl_base_params iwl5000_base_params
= {
58 .eeprom_size
= IWLAGN_EEPROM_IMG_SIZE
,
59 .num_of_queues
= IWLAGN_NUM_QUEUES
,
60 .pll_cfg_val
= CSR50_ANA_PLL_CFG_VAL
,
61 .led_compensation
= 51,
62 .wd_timeout
= IWL_WATCHDOG_DISABLED
,
63 .max_event_log_size
= 512,
66 static const struct iwl_ht_params iwl5000_ht_params
= {
67 .ht_greenfield_support
= true,
68 .ht40_bands
= BIT(IEEE80211_BAND_2GHZ
) | BIT(IEEE80211_BAND_5GHZ
),
71 static const struct iwl_eeprom_params iwl5000_eeprom_params
= {
73 EEPROM_REG_BAND_1_CHANNELS
,
74 EEPROM_REG_BAND_2_CHANNELS
,
75 EEPROM_REG_BAND_3_CHANNELS
,
76 EEPROM_REG_BAND_4_CHANNELS
,
77 EEPROM_REG_BAND_5_CHANNELS
,
78 EEPROM_REG_BAND_24_HT40_CHANNELS
,
79 EEPROM_REG_BAND_52_HT40_CHANNELS
83 #define IWL_DEVICE_5000 \
84 .fw_name_pre = IWL5000_FW_PRE, \
85 .ucode_api_max = IWL5000_UCODE_API_MAX, \
86 .ucode_api_ok = IWL5000_UCODE_API_OK, \
87 .ucode_api_min = IWL5000_UCODE_API_MIN, \
88 .device_family = IWL_DEVICE_FAMILY_5000, \
89 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
90 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
91 .nvm_ver = EEPROM_5000_EEPROM_VERSION, \
92 .nvm_calib_ver = EEPROM_5000_TX_POWER_VERSION, \
93 .base_params = &iwl5000_base_params, \
94 .eeprom_params = &iwl5000_eeprom_params, \
95 .led_mode = IWL_LED_BLINK
97 const struct iwl_cfg iwl5300_agn_cfg
= {
98 .name
= "Intel(R) Ultimate N WiFi Link 5300 AGN",
100 /* at least EEPROM 0x11A has wrong info */
101 .valid_tx_ant
= ANT_ABC
, /* .cfg overwrite */
102 .valid_rx_ant
= ANT_ABC
, /* .cfg overwrite */
103 .ht_params
= &iwl5000_ht_params
,
106 const struct iwl_cfg iwl5100_bgn_cfg
= {
107 .name
= "Intel(R) WiFi Link 5100 BGN",
109 .valid_tx_ant
= ANT_B
, /* .cfg overwrite */
110 .valid_rx_ant
= ANT_AB
, /* .cfg overwrite */
111 .ht_params
= &iwl5000_ht_params
,
114 const struct iwl_cfg iwl5100_abg_cfg
= {
115 .name
= "Intel(R) WiFi Link 5100 ABG",
117 .valid_tx_ant
= ANT_B
, /* .cfg overwrite */
118 .valid_rx_ant
= ANT_AB
, /* .cfg overwrite */
121 const struct iwl_cfg iwl5100_agn_cfg
= {
122 .name
= "Intel(R) WiFi Link 5100 AGN",
124 .valid_tx_ant
= ANT_B
, /* .cfg overwrite */
125 .valid_rx_ant
= ANT_AB
, /* .cfg overwrite */
126 .ht_params
= &iwl5000_ht_params
,
129 const struct iwl_cfg iwl5350_agn_cfg
= {
130 .name
= "Intel(R) WiMAX/WiFi Link 5350 AGN",
131 .fw_name_pre
= IWL5000_FW_PRE
,
132 .ucode_api_max
= IWL5000_UCODE_API_MAX
,
133 .ucode_api_ok
= IWL5000_UCODE_API_OK
,
134 .ucode_api_min
= IWL5000_UCODE_API_MIN
,
135 .device_family
= IWL_DEVICE_FAMILY_5000
,
136 .max_inst_size
= IWLAGN_RTC_INST_SIZE
,
137 .max_data_size
= IWLAGN_RTC_DATA_SIZE
,
138 .nvm_ver
= EEPROM_5050_EEPROM_VERSION
,
139 .nvm_calib_ver
= EEPROM_5050_TX_POWER_VERSION
,
140 .base_params
= &iwl5000_base_params
,
141 .eeprom_params
= &iwl5000_eeprom_params
,
142 .ht_params
= &iwl5000_ht_params
,
143 .led_mode
= IWL_LED_BLINK
,
144 .internal_wimax_coex
= true,
147 #define IWL_DEVICE_5150 \
148 .fw_name_pre = IWL5150_FW_PRE, \
149 .ucode_api_max = IWL5150_UCODE_API_MAX, \
150 .ucode_api_ok = IWL5150_UCODE_API_OK, \
151 .ucode_api_min = IWL5150_UCODE_API_MIN, \
152 .device_family = IWL_DEVICE_FAMILY_5150, \
153 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
154 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
155 .nvm_ver = EEPROM_5050_EEPROM_VERSION, \
156 .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION, \
157 .base_params = &iwl5000_base_params, \
158 .eeprom_params = &iwl5000_eeprom_params, \
159 .led_mode = IWL_LED_BLINK, \
160 .internal_wimax_coex = true
162 const struct iwl_cfg iwl5150_agn_cfg
= {
163 .name
= "Intel(R) WiMAX/WiFi Link 5150 AGN",
165 .ht_params
= &iwl5000_ht_params
,
169 const struct iwl_cfg iwl5150_abg_cfg
= {
170 .name
= "Intel(R) WiMAX/WiFi Link 5150 ABG",
174 MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_OK
));
175 MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_OK
));