1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27#include <linux/module.h>
28#include <linux/stringify.h>
29#include "iwl-config.h"
30#include "iwl-agn-hw.h"
31#include "iwl-csr.h"
32
33
34#define IWL5000_UCODE_API_MAX 5
35#define IWL5150_UCODE_API_MAX 2
36
37
38#define IWL5000_UCODE_API_OK 5
39#define IWL5150_UCODE_API_OK 2
40
41
42#define IWL5000_UCODE_API_MIN 1
43#define IWL5150_UCODE_API_MIN 1
44
45
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)
50
51#define IWL5000_FW_PRE "iwlwifi-5000-"
52#define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE __stringify(api) ".ucode"
53
54#define IWL5150_FW_PRE "iwlwifi-5150-"
55#define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE __stringify(api) ".ucode"
56
57static 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,
64 .scd_chain_ext_wa = true,
65};
66
67static const struct iwl_ht_params iwl5000_ht_params = {
68 .ht_greenfield_support = true,
69 .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ),
70};
71
72static const struct iwl_eeprom_params iwl5000_eeprom_params = {
73 .regulatory_bands = {
74 EEPROM_REG_BAND_1_CHANNELS,
75 EEPROM_REG_BAND_2_CHANNELS,
76 EEPROM_REG_BAND_3_CHANNELS,
77 EEPROM_REG_BAND_4_CHANNELS,
78 EEPROM_REG_BAND_5_CHANNELS,
79 EEPROM_REG_BAND_24_HT40_CHANNELS,
80 EEPROM_REG_BAND_52_HT40_CHANNELS
81 },
82};
83
84#define IWL_DEVICE_5000 \
85 .fw_name_pre = IWL5000_FW_PRE, \
86 .ucode_api_max = IWL5000_UCODE_API_MAX, \
87 .ucode_api_ok = IWL5000_UCODE_API_OK, \
88 .ucode_api_min = IWL5000_UCODE_API_MIN, \
89 .device_family = IWL_DEVICE_FAMILY_5000, \
90 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
91 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
92 .nvm_ver = EEPROM_5000_EEPROM_VERSION, \
93 .nvm_calib_ver = EEPROM_5000_TX_POWER_VERSION, \
94 .base_params = &iwl5000_base_params, \
95 .eeprom_params = &iwl5000_eeprom_params, \
96 .led_mode = IWL_LED_BLINK, \
97 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
98
99const struct iwl_cfg iwl5300_agn_cfg = {
100 .name = "Intel(R) Ultimate N WiFi Link 5300 AGN",
101 IWL_DEVICE_5000,
102
103 .valid_tx_ant = ANT_ABC,
104 .valid_rx_ant = ANT_ABC,
105 .ht_params = &iwl5000_ht_params,
106};
107
108const struct iwl_cfg iwl5100_bgn_cfg = {
109 .name = "Intel(R) WiFi Link 5100 BGN",
110 IWL_DEVICE_5000,
111 .valid_tx_ant = ANT_B,
112 .valid_rx_ant = ANT_AB,
113 .ht_params = &iwl5000_ht_params,
114};
115
116const struct iwl_cfg iwl5100_abg_cfg = {
117 .name = "Intel(R) WiFi Link 5100 ABG",
118 IWL_DEVICE_5000,
119 .valid_tx_ant = ANT_B,
120 .valid_rx_ant = ANT_AB,
121};
122
123const struct iwl_cfg iwl5100_agn_cfg = {
124 .name = "Intel(R) WiFi Link 5100 AGN",
125 IWL_DEVICE_5000,
126 .valid_tx_ant = ANT_B,
127 .valid_rx_ant = ANT_AB,
128 .ht_params = &iwl5000_ht_params,
129};
130
131const struct iwl_cfg iwl5350_agn_cfg = {
132 .name = "Intel(R) WiMAX/WiFi Link 5350 AGN",
133 .fw_name_pre = IWL5000_FW_PRE,
134 .ucode_api_max = IWL5000_UCODE_API_MAX,
135 .ucode_api_ok = IWL5000_UCODE_API_OK,
136 .ucode_api_min = IWL5000_UCODE_API_MIN,
137 .device_family = IWL_DEVICE_FAMILY_5000,
138 .max_inst_size = IWLAGN_RTC_INST_SIZE,
139 .max_data_size = IWLAGN_RTC_DATA_SIZE,
140 .nvm_ver = EEPROM_5050_EEPROM_VERSION,
141 .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION,
142 .base_params = &iwl5000_base_params,
143 .eeprom_params = &iwl5000_eeprom_params,
144 .ht_params = &iwl5000_ht_params,
145 .led_mode = IWL_LED_BLINK,
146 .internal_wimax_coex = true,
147};
148
149#define IWL_DEVICE_5150 \
150 .fw_name_pre = IWL5150_FW_PRE, \
151 .ucode_api_max = IWL5150_UCODE_API_MAX, \
152 .ucode_api_ok = IWL5150_UCODE_API_OK, \
153 .ucode_api_min = IWL5150_UCODE_API_MIN, \
154 .device_family = IWL_DEVICE_FAMILY_5150, \
155 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
156 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
157 .nvm_ver = EEPROM_5050_EEPROM_VERSION, \
158 .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION, \
159 .base_params = &iwl5000_base_params, \
160 .eeprom_params = &iwl5000_eeprom_params, \
161 .led_mode = IWL_LED_BLINK, \
162 .internal_wimax_coex = true, \
163 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
164
165const struct iwl_cfg iwl5150_agn_cfg = {
166 .name = "Intel(R) WiMAX/WiFi Link 5150 AGN",
167 IWL_DEVICE_5150,
168 .ht_params = &iwl5000_ht_params,
169
170};
171
172const struct iwl_cfg iwl5150_abg_cfg = {
173 .name = "Intel(R) WiMAX/WiFi Link 5150 ABG",
174 IWL_DEVICE_5150,
175};
176
177MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_OK));
178MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_OK));
179