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