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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63#ifndef __IWL_CONFIG_H__
64#define __IWL_CONFIG_H__
65
66#include <linux/types.h>
67#include <net/mac80211.h>
68
69
70enum iwl_device_family {
71 IWL_DEVICE_FAMILY_UNDEFINED,
72 IWL_DEVICE_FAMILY_1000,
73 IWL_DEVICE_FAMILY_100,
74 IWL_DEVICE_FAMILY_2000,
75 IWL_DEVICE_FAMILY_2030,
76 IWL_DEVICE_FAMILY_105,
77 IWL_DEVICE_FAMILY_135,
78 IWL_DEVICE_FAMILY_5000,
79 IWL_DEVICE_FAMILY_5150,
80 IWL_DEVICE_FAMILY_6000,
81 IWL_DEVICE_FAMILY_6000i,
82 IWL_DEVICE_FAMILY_6005,
83 IWL_DEVICE_FAMILY_6030,
84 IWL_DEVICE_FAMILY_6050,
85 IWL_DEVICE_FAMILY_6150,
86 IWL_DEVICE_FAMILY_7000,
87};
88
89
90
91
92
93
94
95
96
97
98enum iwl_led_mode {
99 IWL_LED_DEFAULT,
100 IWL_LED_RF_STATE,
101 IWL_LED_BLINK,
102 IWL_LED_DISABLE,
103};
104
105
106
107
108
109#define IWL_MAX_PLCP_ERR_THRESHOLD_MIN 1
110#define IWL_MAX_PLCP_ERR_THRESHOLD_DEF 50
111#define IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF 100
112#define IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF 200
113#define IWL_MAX_PLCP_ERR_THRESHOLD_MAX 255
114#define IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE 0
115
116
117#define IWL_WATCHDOG_DISABLED 0
118#define IWL_DEF_WD_TIMEOUT 2000
119#define IWL_LONG_WD_TIMEOUT 10000
120#define IWL_MAX_WD_TIMEOUT 120000
121
122
123#define ANT_NONE 0x0
124#define ANT_A BIT(0)
125#define ANT_B BIT(1)
126#define ANT_C BIT(2)
127#define ANT_AB (ANT_A | ANT_B)
128#define ANT_AC (ANT_A | ANT_C)
129#define ANT_BC (ANT_B | ANT_C)
130#define ANT_ABC (ANT_A | ANT_B | ANT_C)
131
132
133
134
135
136
137
138
139
140
141
142
143struct iwl_base_params {
144 int eeprom_size;
145 int num_of_queues;
146
147 u32 pll_cfg_val;
148
149 const u16 max_ll_items;
150 const bool shadow_ram_support;
151 u16 led_compensation;
152 unsigned int wd_timeout;
153 u32 max_event_log_size;
154 const bool shadow_reg_enable;
155 const bool pcie_l1_allowed;
156};
157
158
159
160
161
162struct iwl_ht_params {
163 enum ieee80211_smps_mode smps_mode;
164 const bool ht_greenfield_support;
165 bool use_rts_for_aggregation;
166 u8 ht40_bands;
167};
168
169
170
171
172#define EEPROM_REG_BAND_1_CHANNELS 0x08
173#define EEPROM_REG_BAND_2_CHANNELS 0x26
174#define EEPROM_REG_BAND_3_CHANNELS 0x42
175#define EEPROM_REG_BAND_4_CHANNELS 0x5C
176#define EEPROM_REG_BAND_5_CHANNELS 0x74
177#define EEPROM_REG_BAND_24_HT40_CHANNELS 0x82
178#define EEPROM_REG_BAND_52_HT40_CHANNELS 0x92
179#define EEPROM_6000_REG_BAND_24_HT40_CHANNELS 0x80
180#define EEPROM_REGULATORY_BAND_NO_HT40 0
181
182struct iwl_eeprom_params {
183 const u8 regulatory_bands[7];
184 bool enhanced_txpower;
185};
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217struct iwl_cfg {
218
219 const char *name;
220 const char *fw_name_pre;
221 const unsigned int ucode_api_max;
222 const unsigned int ucode_api_ok;
223 const unsigned int ucode_api_min;
224 const enum iwl_device_family device_family;
225 const u32 max_data_size;
226 const u32 max_inst_size;
227 u8 valid_tx_ant;
228 u8 valid_rx_ant;
229 bool bt_shared_single_ant;
230 u16 nvm_ver;
231 u16 nvm_calib_ver;
232
233 const struct iwl_base_params *base_params;
234
235 const struct iwl_ht_params *ht_params;
236 const struct iwl_eeprom_params *eeprom_params;
237 enum iwl_led_mode led_mode;
238 const bool rx_with_siso_diversity;
239 const bool internal_wimax_coex;
240 const bool host_interrupt_operation_mode;
241 bool high_temp;
242};
243
244
245
246
247#if IS_ENABLED(CONFIG_IWLDVM)
248extern const struct iwl_cfg iwl5300_agn_cfg;
249extern const struct iwl_cfg iwl5100_agn_cfg;
250extern const struct iwl_cfg iwl5350_agn_cfg;
251extern const struct iwl_cfg iwl5100_bgn_cfg;
252extern const struct iwl_cfg iwl5100_abg_cfg;
253extern const struct iwl_cfg iwl5150_agn_cfg;
254extern const struct iwl_cfg iwl5150_abg_cfg;
255extern const struct iwl_cfg iwl6005_2agn_cfg;
256extern const struct iwl_cfg iwl6005_2abg_cfg;
257extern const struct iwl_cfg iwl6005_2bg_cfg;
258extern const struct iwl_cfg iwl6005_2agn_sff_cfg;
259extern const struct iwl_cfg iwl6005_2agn_d_cfg;
260extern const struct iwl_cfg iwl6005_2agn_mow1_cfg;
261extern const struct iwl_cfg iwl6005_2agn_mow2_cfg;
262extern const struct iwl_cfg iwl1030_bgn_cfg;
263extern const struct iwl_cfg iwl1030_bg_cfg;
264extern const struct iwl_cfg iwl6030_2agn_cfg;
265extern const struct iwl_cfg iwl6030_2abg_cfg;
266extern const struct iwl_cfg iwl6030_2bgn_cfg;
267extern const struct iwl_cfg iwl6030_2bg_cfg;
268extern const struct iwl_cfg iwl6000i_2agn_cfg;
269extern const struct iwl_cfg iwl6000i_2abg_cfg;
270extern const struct iwl_cfg iwl6000i_2bg_cfg;
271extern const struct iwl_cfg iwl6000_3agn_cfg;
272extern const struct iwl_cfg iwl6050_2agn_cfg;
273extern const struct iwl_cfg iwl6050_2abg_cfg;
274extern const struct iwl_cfg iwl6150_bgn_cfg;
275extern const struct iwl_cfg iwl6150_bg_cfg;
276extern const struct iwl_cfg iwl1000_bgn_cfg;
277extern const struct iwl_cfg iwl1000_bg_cfg;
278extern const struct iwl_cfg iwl100_bgn_cfg;
279extern const struct iwl_cfg iwl100_bg_cfg;
280extern const struct iwl_cfg iwl130_bgn_cfg;
281extern const struct iwl_cfg iwl130_bg_cfg;
282extern const struct iwl_cfg iwl2000_2bgn_cfg;
283extern const struct iwl_cfg iwl2000_2bgn_d_cfg;
284extern const struct iwl_cfg iwl2030_2bgn_cfg;
285extern const struct iwl_cfg iwl6035_2agn_cfg;
286extern const struct iwl_cfg iwl6035_2agn_sff_cfg;
287extern const struct iwl_cfg iwl105_bgn_cfg;
288extern const struct iwl_cfg iwl105_bgn_d_cfg;
289extern const struct iwl_cfg iwl135_bgn_cfg;
290#endif
291#if IS_ENABLED(CONFIG_IWLMVM)
292extern const struct iwl_cfg iwl7260_2ac_cfg;
293extern const struct iwl_cfg iwl7260_2ac_cfg_high_temp;
294extern const struct iwl_cfg iwl7260_2n_cfg;
295extern const struct iwl_cfg iwl7260_n_cfg;
296extern const struct iwl_cfg iwl3160_2ac_cfg;
297extern const struct iwl_cfg iwl3160_2n_cfg;
298extern const struct iwl_cfg iwl3160_n_cfg;
299extern const struct iwl_cfg iwl7265_2ac_cfg;
300extern const struct iwl_cfg iwl7265_2n_cfg;
301extern const struct iwl_cfg iwl7265_n_cfg;
302#endif
303
304#endif
305