i2400m.h revision 655a7c081f83b8351ed5f11a6c6accd9458293a8
1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef __LINUX__WIMAX__I2400M_H__
20#define __LINUX__WIMAX__I2400M_H__
21#include <linux/types.h>
22struct i2400m_bcf_hdr {
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 __le32 module_type;
25 __le32 header_len;
26 __le32 header_version;
27 __le32 module_id;
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 __le32 module_vendor;
30 __le32 date;
31 __le32 size;
32 __le32 key_size;
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 __le32 modulus_size;
35 __le32 exponent_size;
36 __u8 reserved[88];
37} __attribute__ ((packed));
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39enum i2400m_brh_opcode {
40 I2400M_BRH_READ = 1,
41 I2400M_BRH_WRITE = 2,
42 I2400M_BRH_JUMP = 3,
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 I2400M_BRH_SIGNED_JUMP = 8,
45 I2400M_BRH_HASH_PAYLOAD_ONLY = 9,
46};
47enum i2400m_brh {
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 I2400M_BRH_SIGNATURE = 0xcbbc0000,
50 I2400M_BRH_SIGNATURE_MASK = 0xffff0000,
51 I2400M_BRH_SIGNATURE_SHIFT = 16,
52 I2400M_BRH_OPCODE_MASK = 0x0000000f,
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 I2400M_BRH_RESPONSE_MASK = 0x000000f0,
55 I2400M_BRH_RESPONSE_SHIFT = 4,
56 I2400M_BRH_DIRECT_ACCESS = 0x00000400,
57 I2400M_BRH_RESPONSE_REQUIRED = 0x00000200,
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59 I2400M_BRH_USE_CHECKSUM = 0x00000100,
60};
61struct i2400m_bootrom_header {
62 __le32 command;
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 __le32 target_addr;
65 __le32 data_size;
66 __le32 block_checksum;
67 char payload[0];
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69} __attribute__ ((packed));
70enum i2400m_pt {
71 I2400M_PT_DATA = 0,
72 I2400M_PT_CTRL,
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74 I2400M_PT_TRACE,
75 I2400M_PT_RESET_WARM,
76 I2400M_PT_RESET_COLD,
77 I2400M_PT_EDATA,
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 I2400M_PT_ILLEGAL
80};
81struct i2400m_pl_data_hdr {
82 __le32 reserved;
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84} __attribute__((packed));
85struct i2400m_pl_edata_hdr {
86 __le32 reorder;
87 __u8 cs;
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 __u8 reserved[11];
90} __attribute__((packed));
91enum i2400m_cs {
92 I2400M_CS_IPV4_0 = 0,
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 I2400M_CS_IPV4 = 2,
95};
96enum i2400m_ro {
97 I2400M_RO_NEEDED = 0x01,
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 I2400M_RO_TYPE = 0x03,
100 I2400M_RO_TYPE_SHIFT = 1,
101 I2400M_RO_CIN = 0x0f,
102 I2400M_RO_CIN_SHIFT = 4,
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 I2400M_RO_FBN = 0x07ff,
105 I2400M_RO_FBN_SHIFT = 8,
106 I2400M_RO_SN = 0x07ff,
107 I2400M_RO_SN_SHIFT = 21,
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109};
110enum i2400m_ro_type {
111 I2400M_RO_TYPE_RESET = 0,
112 I2400M_RO_TYPE_PACKET,
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114 I2400M_RO_TYPE_WS,
115 I2400M_RO_TYPE_PACKET_WS,
116};
117enum {
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119 I2400M_PL_ALIGN = 16,
120 I2400M_PL_SIZE_MAX = 0x3EFF,
121 I2400M_MAX_PLS_IN_MSG = 60,
122 I2400M_H2D_PREVIEW_BARKER = 0xcafe900d,
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124 I2400M_COLD_RESET_BARKER = 0xc01dc01d,
125 I2400M_WARM_RESET_BARKER = 0x50f750f7,
126 I2400M_NBOOT_BARKER = 0xdeadbeef,
127 I2400M_SBOOT_BARKER = 0x0ff1c1a1,
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 I2400M_SBOOT_BARKER_6050 = 0x80000001,
130 I2400M_ACK_BARKER = 0xfeedbabe,
131 I2400M_D2H_MSG_BARKER = 0xbeefbabe,
132};
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134struct i2400m_pld {
135 __le32 val;
136} __attribute__ ((packed));
137#define I2400M_PLD_SIZE_MASK 0x00003fff
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139#define I2400M_PLD_TYPE_SHIFT 16
140#define I2400M_PLD_TYPE_MASK 0x000f0000
141struct i2400m_msg_hdr {
142 union {
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144 __le32 barker;
145 __u32 size;
146 };
147 union {
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149 __le32 sequence;
150 __u32 offset;
151 };
152 __le16 num_pls;
153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154 __le16 rsv1;
155 __le16 padding;
156 __le16 rsv2;
157 struct i2400m_pld pld[0];
158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159} __attribute__ ((packed));
160enum {
161 I2400M_L3L4_VERSION = 0x0100,
162};
163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164enum i2400m_mt {
165 I2400M_MT_RESERVED = 0x0000,
166 I2400M_MT_INVALID = 0xffff,
167 I2400M_MT_REPORT_MASK = 0x8000,
168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169 I2400M_MT_GET_SCAN_RESULT = 0x4202,
170 I2400M_MT_SET_SCAN_PARAM = 0x4402,
171 I2400M_MT_CMD_RF_CONTROL = 0x4602,
172 I2400M_MT_CMD_SCAN = 0x4603,
173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174 I2400M_MT_CMD_CONNECT = 0x4604,
175 I2400M_MT_CMD_DISCONNECT = 0x4605,
176 I2400M_MT_CMD_EXIT_IDLE = 0x4606,
177 I2400M_MT_GET_LM_VERSION = 0x5201,
178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179 I2400M_MT_GET_DEVICE_INFO = 0x5202,
180 I2400M_MT_GET_LINK_STATUS = 0x5203,
181 I2400M_MT_GET_STATISTICS = 0x5204,
182 I2400M_MT_GET_STATE = 0x5205,
183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184 I2400M_MT_GET_MEDIA_STATUS = 0x5206,
185 I2400M_MT_SET_INIT_CONFIG = 0x5404,
186 I2400M_MT_CMD_INIT = 0x5601,
187 I2400M_MT_CMD_TERMINATE = 0x5602,
188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189 I2400M_MT_CMD_MODE_OF_OP = 0x5603,
190 I2400M_MT_CMD_RESET_DEVICE = 0x5604,
191 I2400M_MT_CMD_MONITOR_CONTROL = 0x5605,
192 I2400M_MT_CMD_ENTER_POWERSAVE = 0x5606,
193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194 I2400M_MT_GET_TLS_OPERATION_RESULT = 0x6201,
195 I2400M_MT_SET_EAP_SUCCESS = 0x6402,
196 I2400M_MT_SET_EAP_FAIL = 0x6403,
197 I2400M_MT_SET_EAP_KEY = 0x6404,
198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199 I2400M_MT_CMD_SEND_EAP_RESPONSE = 0x6602,
200 I2400M_MT_REPORT_SCAN_RESULT = 0xc002,
201 I2400M_MT_REPORT_STATE = 0xd002,
202 I2400M_MT_REPORT_POWERSAVE_READY = 0xd005,
203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204 I2400M_MT_REPORT_EAP_REQUEST = 0xe002,
205 I2400M_MT_REPORT_EAP_RESTART = 0xe003,
206 I2400M_MT_REPORT_ALT_ACCEPT = 0xe004,
207 I2400M_MT_REPORT_KEY_REQUEST = 0xe005,
208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209};
210enum i2400m_ms {
211 I2400M_MS_DONE_OK = 0,
212 I2400M_MS_DONE_IN_PROGRESS = 1,
213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214 I2400M_MS_INVALID_OP = 2,
215 I2400M_MS_BAD_STATE = 3,
216 I2400M_MS_ILLEGAL_VALUE = 4,
217 I2400M_MS_MISSING_PARAMS = 5,
218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219 I2400M_MS_VERSION_ERROR = 6,
220 I2400M_MS_ACCESSIBILITY_ERROR = 7,
221 I2400M_MS_BUSY = 8,
222 I2400M_MS_CORRUPTED_TLV = 9,
223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224 I2400M_MS_UNINITIALIZED = 10,
225 I2400M_MS_UNKNOWN_ERROR = 11,
226 I2400M_MS_PRODUCTION_ERROR = 12,
227 I2400M_MS_NO_RF = 13,
228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229 I2400M_MS_NOT_READY_FOR_POWERSAVE = 14,
230 I2400M_MS_THERMAL_CRITICAL = 15,
231 I2400M_MS_MAX
232};
233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234enum i2400m_tlv {
235 I2400M_TLV_L4_MESSAGE_VERSIONS = 129,
236 I2400M_TLV_SYSTEM_STATE = 141,
237 I2400M_TLV_MEDIA_STATUS = 161,
238/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239 I2400M_TLV_RF_OPERATION = 162,
240 I2400M_TLV_RF_STATUS = 163,
241 I2400M_TLV_DEVICE_RESET_TYPE = 132,
242 I2400M_TLV_CONFIG_IDLE_PARAMETERS = 601,
243/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244 I2400M_TLV_CONFIG_IDLE_TIMEOUT = 611,
245 I2400M_TLV_CONFIG_D2H_DATA_FORMAT = 614,
246 I2400M_TLV_CONFIG_DL_HOST_REORDER = 615,
247};
248/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249struct i2400m_tlv_hdr {
250 __le16 type;
251 __le16 length;
252 __u8 pl[0];
253/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254} __attribute__((packed));
255struct i2400m_l3l4_hdr {
256 __le16 type;
257 __le16 length;
258/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259 __le16 version;
260 __le16 resv1;
261 __le16 status;
262 __le16 resv2;
263/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
264 struct i2400m_tlv_hdr pl[0];
265} __attribute__((packed));
266enum i2400m_system_state {
267 I2400M_SS_UNINITIALIZED = 1,
268/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
269 I2400M_SS_INIT,
270 I2400M_SS_READY,
271 I2400M_SS_SCAN,
272 I2400M_SS_STANDBY,
273/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
274 I2400M_SS_CONNECTING,
275 I2400M_SS_WIMAX_CONNECTED,
276 I2400M_SS_DATA_PATH_CONNECTED,
277 I2400M_SS_IDLE,
278/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
279 I2400M_SS_DISCONNECTING,
280 I2400M_SS_OUT_OF_ZONE,
281 I2400M_SS_SLEEPACTIVE,
282 I2400M_SS_PRODUCTION,
283/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
284 I2400M_SS_CONFIG,
285 I2400M_SS_RF_OFF,
286 I2400M_SS_RF_SHUTDOWN,
287 I2400M_SS_DEVICE_DISCONNECT,
288/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
289 I2400M_SS_MAX,
290};
291struct i2400m_tlv_system_state {
292 struct i2400m_tlv_hdr hdr;
293/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
294 __le32 state;
295} __attribute__((packed));
296struct i2400m_tlv_l4_message_versions {
297 struct i2400m_tlv_hdr hdr;
298/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
299 __le16 major;
300 __le16 minor;
301 __le16 branch;
302 __le16 reserved;
303/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
304} __attribute__((packed));
305struct i2400m_tlv_detailed_device_info {
306 struct i2400m_tlv_hdr hdr;
307 __u8 reserved1[400];
308/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
309 __u8 mac_address[6];
310 __u8 reserved2[2];
311} __attribute__((packed));
312enum i2400m_rf_switch_status {
313/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
314 I2400M_RF_SWITCH_ON = 1,
315 I2400M_RF_SWITCH_OFF = 2,
316};
317struct i2400m_tlv_rf_switches_status {
318/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
319 struct i2400m_tlv_hdr hdr;
320 __u8 sw_rf_switch;
321 __u8 hw_rf_switch;
322 __u8 reserved[2];
323/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
324} __attribute__((packed));
325enum {
326 i2400m_rf_operation_on = 1,
327 i2400m_rf_operation_off = 2
328/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
329};
330struct i2400m_tlv_rf_operation {
331 struct i2400m_tlv_hdr hdr;
332 __le32 status;
333/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
334} __attribute__((packed));
335enum i2400m_tlv_reset_type {
336 I2400M_RESET_TYPE_COLD = 1,
337 I2400M_RESET_TYPE_WARM
338/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
339};
340struct i2400m_tlv_device_reset_type {
341 struct i2400m_tlv_hdr hdr;
342 __le32 reset_type;
343/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
344} __attribute__((packed));
345struct i2400m_tlv_config_idle_parameters {
346 struct i2400m_tlv_hdr hdr;
347 __le32 idle_timeout;
348/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
349 __le32 idle_paging_interval;
350} __attribute__((packed));
351enum i2400m_media_status {
352 I2400M_MEDIA_STATUS_LINK_UP = 1,
353/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
354 I2400M_MEDIA_STATUS_LINK_DOWN,
355 I2400M_MEDIA_STATUS_LINK_RENEW,
356};
357struct i2400m_tlv_media_status {
358/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
359 struct i2400m_tlv_hdr hdr;
360 __le32 media_status;
361} __attribute__((packed));
362struct i2400m_tlv_config_idle_timeout {
363/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
364 struct i2400m_tlv_hdr hdr;
365 __le32 timeout;
366} __attribute__((packed));
367struct i2400m_tlv_config_d2h_data_format {
368/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
369 struct i2400m_tlv_hdr hdr;
370 __u8 format;
371 __u8 reserved[3];
372} __attribute__((packed));
373/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
374struct i2400m_tlv_config_dl_host_reorder {
375 struct i2400m_tlv_hdr hdr;
376 __u8 reorder;
377 __u8 reserved[3];
378/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
379} __attribute__((packed));
380#endif
381