blob: 446b6619b20150437152a16e58f09f9e385610e0 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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>
Christopher Ferris38062f92014-07-09 15:33:25 -070022#include <linux/if_ether.h>
Christopher Ferris38062f92014-07-09 15:33:25 -070023struct i2400m_bcf_hdr {
Tao Baod7db5942015-01-28 10:07:51 -080024 __le32 module_type;
25 __le32 header_len;
26 __le32 header_version;
Tao Baod7db5942015-01-28 10:07:51 -080027 __le32 module_id;
28 __le32 module_vendor;
29 __le32 date;
30 __le32 size;
Tao Baod7db5942015-01-28 10:07:51 -080031 __le32 key_size;
32 __le32 modulus_size;
33 __le32 exponent_size;
34 __u8 reserved[88];
Tao Baod7db5942015-01-28 10:07:51 -080035} __attribute__((packed));
Ben Cheng655a7c02013-10-16 16:09:24 -070036enum i2400m_brh_opcode {
Tao Baod7db5942015-01-28 10:07:51 -080037 I2400M_BRH_READ = 1,
38 I2400M_BRH_WRITE = 2,
Tao Baod7db5942015-01-28 10:07:51 -080039 I2400M_BRH_JUMP = 3,
40 I2400M_BRH_SIGNED_JUMP = 8,
41 I2400M_BRH_HASH_PAYLOAD_ONLY = 9,
Ben Cheng655a7c02013-10-16 16:09:24 -070042};
Christopher Ferris38062f92014-07-09 15:33:25 -070043enum i2400m_brh {
Tao Baod7db5942015-01-28 10:07:51 -080044 I2400M_BRH_SIGNATURE = 0xcbbc0000,
45 I2400M_BRH_SIGNATURE_MASK = 0xffff0000,
46 I2400M_BRH_SIGNATURE_SHIFT = 16,
Tao Baod7db5942015-01-28 10:07:51 -080047 I2400M_BRH_OPCODE_MASK = 0x0000000f,
48 I2400M_BRH_RESPONSE_MASK = 0x000000f0,
49 I2400M_BRH_RESPONSE_SHIFT = 4,
50 I2400M_BRH_DIRECT_ACCESS = 0x00000400,
Tao Baod7db5942015-01-28 10:07:51 -080051 I2400M_BRH_RESPONSE_REQUIRED = 0x00000200,
52 I2400M_BRH_USE_CHECKSUM = 0x00000100,
Ben Cheng655a7c02013-10-16 16:09:24 -070053};
54struct i2400m_bootrom_header {
Tao Baod7db5942015-01-28 10:07:51 -080055 __le32 command;
56 __le32 target_addr;
57 __le32 data_size;
58 __le32 block_checksum;
Tao Baod7db5942015-01-28 10:07:51 -080059 char payload[0];
60} __attribute__((packed));
Ben Cheng655a7c02013-10-16 16:09:24 -070061enum i2400m_pt {
Tao Baod7db5942015-01-28 10:07:51 -080062 I2400M_PT_DATA = 0,
Tao Baod7db5942015-01-28 10:07:51 -080063 I2400M_PT_CTRL,
64 I2400M_PT_TRACE,
65 I2400M_PT_RESET_WARM,
66 I2400M_PT_RESET_COLD,
Tao Baod7db5942015-01-28 10:07:51 -080067 I2400M_PT_EDATA,
68 I2400M_PT_ILLEGAL
Ben Cheng655a7c02013-10-16 16:09:24 -070069};
70struct i2400m_pl_data_hdr {
Tao Baod7db5942015-01-28 10:07:51 -080071 __le32 reserved;
Ben Cheng655a7c02013-10-16 16:09:24 -070072} __attribute__((packed));
73struct i2400m_pl_edata_hdr {
Tao Baod7db5942015-01-28 10:07:51 -080074 __le32 reorder;
Tao Baod7db5942015-01-28 10:07:51 -080075 __u8 cs;
76 __u8 reserved[11];
Ben Cheng655a7c02013-10-16 16:09:24 -070077} __attribute__((packed));
78enum i2400m_cs {
Tao Baod7db5942015-01-28 10:07:51 -080079 I2400M_CS_IPV4_0 = 0,
80 I2400M_CS_IPV4 = 2,
Ben Cheng655a7c02013-10-16 16:09:24 -070081};
82enum i2400m_ro {
Tao Baod7db5942015-01-28 10:07:51 -080083 I2400M_RO_NEEDED = 0x01,
84 I2400M_RO_TYPE = 0x03,
85 I2400M_RO_TYPE_SHIFT = 1,
86 I2400M_RO_CIN = 0x0f,
Tao Baod7db5942015-01-28 10:07:51 -080087 I2400M_RO_CIN_SHIFT = 4,
88 I2400M_RO_FBN = 0x07ff,
89 I2400M_RO_FBN_SHIFT = 8,
90 I2400M_RO_SN = 0x07ff,
Tao Baod7db5942015-01-28 10:07:51 -080091 I2400M_RO_SN_SHIFT = 21,
Ben Cheng655a7c02013-10-16 16:09:24 -070092};
93enum i2400m_ro_type {
Tao Baod7db5942015-01-28 10:07:51 -080094 I2400M_RO_TYPE_RESET = 0,
Tao Baod7db5942015-01-28 10:07:51 -080095 I2400M_RO_TYPE_PACKET,
96 I2400M_RO_TYPE_WS,
97 I2400M_RO_TYPE_PACKET_WS,
Ben Cheng655a7c02013-10-16 16:09:24 -070098};
Christopher Ferris38062f92014-07-09 15:33:25 -070099enum {
Tao Baod7db5942015-01-28 10:07:51 -0800100 I2400M_PL_ALIGN = 16,
101 I2400M_PL_SIZE_MAX = 0x3EFF,
102 I2400M_MAX_PLS_IN_MSG = 60,
Tao Baod7db5942015-01-28 10:07:51 -0800103 I2400M_H2D_PREVIEW_BARKER = 0xcafe900d,
104 I2400M_COLD_RESET_BARKER = 0xc01dc01d,
105 I2400M_WARM_RESET_BARKER = 0x50f750f7,
106 I2400M_NBOOT_BARKER = 0xdeadbeef,
Tao Baod7db5942015-01-28 10:07:51 -0800107 I2400M_SBOOT_BARKER = 0x0ff1c1a1,
108 I2400M_SBOOT_BARKER_6050 = 0x80000001,
109 I2400M_ACK_BARKER = 0xfeedbabe,
110 I2400M_D2H_MSG_BARKER = 0xbeefbabe,
Christopher Ferris38062f92014-07-09 15:33:25 -0700111};
Ben Cheng655a7c02013-10-16 16:09:24 -0700112struct i2400m_pld {
Tao Baod7db5942015-01-28 10:07:51 -0800113 __le32 val;
114} __attribute__((packed));
Christopher Ferris38062f92014-07-09 15:33:25 -0700115#define I2400M_PLD_SIZE_MASK 0x00003fff
Ben Cheng655a7c02013-10-16 16:09:24 -0700116#define I2400M_PLD_TYPE_SHIFT 16
117#define I2400M_PLD_TYPE_MASK 0x000f0000
118struct i2400m_msg_hdr {
Tao Baod7db5942015-01-28 10:07:51 -0800119 union {
120 __le32 barker;
121 __u32 size;
122 };
Tao Baod7db5942015-01-28 10:07:51 -0800123 union {
124 __le32 sequence;
125 __u32 offset;
126 };
Tao Baod7db5942015-01-28 10:07:51 -0800127 __le16 num_pls;
128 __le16 rsv1;
129 __le16 padding;
130 __le16 rsv2;
Tao Baod7db5942015-01-28 10:07:51 -0800131 struct i2400m_pld pld[0];
132} __attribute__((packed));
Ben Cheng655a7c02013-10-16 16:09:24 -0700133enum {
Tao Baod7db5942015-01-28 10:07:51 -0800134 I2400M_L3L4_VERSION = 0x0100,
Christopher Ferris38062f92014-07-09 15:33:25 -0700135};
Ben Cheng655a7c02013-10-16 16:09:24 -0700136enum i2400m_mt {
Tao Baod7db5942015-01-28 10:07:51 -0800137 I2400M_MT_RESERVED = 0x0000,
138 I2400M_MT_INVALID = 0xffff,
Tao Baod7db5942015-01-28 10:07:51 -0800139 I2400M_MT_REPORT_MASK = 0x8000,
140 I2400M_MT_GET_SCAN_RESULT = 0x4202,
141 I2400M_MT_SET_SCAN_PARAM = 0x4402,
142 I2400M_MT_CMD_RF_CONTROL = 0x4602,
Tao Baod7db5942015-01-28 10:07:51 -0800143 I2400M_MT_CMD_SCAN = 0x4603,
144 I2400M_MT_CMD_CONNECT = 0x4604,
145 I2400M_MT_CMD_DISCONNECT = 0x4605,
146 I2400M_MT_CMD_EXIT_IDLE = 0x4606,
Tao Baod7db5942015-01-28 10:07:51 -0800147 I2400M_MT_GET_LM_VERSION = 0x5201,
148 I2400M_MT_GET_DEVICE_INFO = 0x5202,
149 I2400M_MT_GET_LINK_STATUS = 0x5203,
150 I2400M_MT_GET_STATISTICS = 0x5204,
Tao Baod7db5942015-01-28 10:07:51 -0800151 I2400M_MT_GET_STATE = 0x5205,
152 I2400M_MT_GET_MEDIA_STATUS = 0x5206,
153 I2400M_MT_SET_INIT_CONFIG = 0x5404,
154 I2400M_MT_CMD_INIT = 0x5601,
Tao Baod7db5942015-01-28 10:07:51 -0800155 I2400M_MT_CMD_TERMINATE = 0x5602,
156 I2400M_MT_CMD_MODE_OF_OP = 0x5603,
157 I2400M_MT_CMD_RESET_DEVICE = 0x5604,
158 I2400M_MT_CMD_MONITOR_CONTROL = 0x5605,
Tao Baod7db5942015-01-28 10:07:51 -0800159 I2400M_MT_CMD_ENTER_POWERSAVE = 0x5606,
160 I2400M_MT_GET_TLS_OPERATION_RESULT = 0x6201,
161 I2400M_MT_SET_EAP_SUCCESS = 0x6402,
162 I2400M_MT_SET_EAP_FAIL = 0x6403,
Tao Baod7db5942015-01-28 10:07:51 -0800163 I2400M_MT_SET_EAP_KEY = 0x6404,
164 I2400M_MT_CMD_SEND_EAP_RESPONSE = 0x6602,
165 I2400M_MT_REPORT_SCAN_RESULT = 0xc002,
166 I2400M_MT_REPORT_STATE = 0xd002,
Tao Baod7db5942015-01-28 10:07:51 -0800167 I2400M_MT_REPORT_POWERSAVE_READY = 0xd005,
168 I2400M_MT_REPORT_EAP_REQUEST = 0xe002,
169 I2400M_MT_REPORT_EAP_RESTART = 0xe003,
170 I2400M_MT_REPORT_ALT_ACCEPT = 0xe004,
Tao Baod7db5942015-01-28 10:07:51 -0800171 I2400M_MT_REPORT_KEY_REQUEST = 0xe005,
Ben Cheng655a7c02013-10-16 16:09:24 -0700172};
173enum i2400m_ms {
Tao Baod7db5942015-01-28 10:07:51 -0800174 I2400M_MS_DONE_OK = 0,
Tao Baod7db5942015-01-28 10:07:51 -0800175 I2400M_MS_DONE_IN_PROGRESS = 1,
176 I2400M_MS_INVALID_OP = 2,
177 I2400M_MS_BAD_STATE = 3,
178 I2400M_MS_ILLEGAL_VALUE = 4,
Tao Baod7db5942015-01-28 10:07:51 -0800179 I2400M_MS_MISSING_PARAMS = 5,
180 I2400M_MS_VERSION_ERROR = 6,
181 I2400M_MS_ACCESSIBILITY_ERROR = 7,
182 I2400M_MS_BUSY = 8,
Tao Baod7db5942015-01-28 10:07:51 -0800183 I2400M_MS_CORRUPTED_TLV = 9,
184 I2400M_MS_UNINITIALIZED = 10,
185 I2400M_MS_UNKNOWN_ERROR = 11,
186 I2400M_MS_PRODUCTION_ERROR = 12,
Tao Baod7db5942015-01-28 10:07:51 -0800187 I2400M_MS_NO_RF = 13,
188 I2400M_MS_NOT_READY_FOR_POWERSAVE = 14,
189 I2400M_MS_THERMAL_CRITICAL = 15,
190 I2400M_MS_MAX
Christopher Ferris38062f92014-07-09 15:33:25 -0700191};
Ben Cheng655a7c02013-10-16 16:09:24 -0700192enum i2400m_tlv {
Tao Baod7db5942015-01-28 10:07:51 -0800193 I2400M_TLV_L4_MESSAGE_VERSIONS = 129,
194 I2400M_TLV_SYSTEM_STATE = 141,
Tao Baod7db5942015-01-28 10:07:51 -0800195 I2400M_TLV_MEDIA_STATUS = 161,
196 I2400M_TLV_RF_OPERATION = 162,
197 I2400M_TLV_RF_STATUS = 163,
198 I2400M_TLV_DEVICE_RESET_TYPE = 132,
Tao Baod7db5942015-01-28 10:07:51 -0800199 I2400M_TLV_CONFIG_IDLE_PARAMETERS = 601,
200 I2400M_TLV_CONFIG_IDLE_TIMEOUT = 611,
201 I2400M_TLV_CONFIG_D2H_DATA_FORMAT = 614,
202 I2400M_TLV_CONFIG_DL_HOST_REORDER = 615,
Christopher Ferris38062f92014-07-09 15:33:25 -0700203};
Ben Cheng655a7c02013-10-16 16:09:24 -0700204struct i2400m_tlv_hdr {
Tao Baod7db5942015-01-28 10:07:51 -0800205 __le16 type;
206 __le16 length;
Tao Baod7db5942015-01-28 10:07:51 -0800207 __u8 pl[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700208} __attribute__((packed));
209struct i2400m_l3l4_hdr {
Tao Baod7db5942015-01-28 10:07:51 -0800210 __le16 type;
Tao Baod7db5942015-01-28 10:07:51 -0800211 __le16 length;
212 __le16 version;
213 __le16 resv1;
214 __le16 status;
Tao Baod7db5942015-01-28 10:07:51 -0800215 __le16 resv2;
216 struct i2400m_tlv_hdr pl[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700217} __attribute__((packed));
218enum i2400m_system_state {
Tao Baod7db5942015-01-28 10:07:51 -0800219 I2400M_SS_UNINITIALIZED = 1,
220 I2400M_SS_INIT,
221 I2400M_SS_READY,
222 I2400M_SS_SCAN,
Tao Baod7db5942015-01-28 10:07:51 -0800223 I2400M_SS_STANDBY,
224 I2400M_SS_CONNECTING,
225 I2400M_SS_WIMAX_CONNECTED,
226 I2400M_SS_DATA_PATH_CONNECTED,
Tao Baod7db5942015-01-28 10:07:51 -0800227 I2400M_SS_IDLE,
228 I2400M_SS_DISCONNECTING,
229 I2400M_SS_OUT_OF_ZONE,
230 I2400M_SS_SLEEPACTIVE,
Tao Baod7db5942015-01-28 10:07:51 -0800231 I2400M_SS_PRODUCTION,
232 I2400M_SS_CONFIG,
233 I2400M_SS_RF_OFF,
234 I2400M_SS_RF_SHUTDOWN,
Tao Baod7db5942015-01-28 10:07:51 -0800235 I2400M_SS_DEVICE_DISCONNECT,
236 I2400M_SS_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -0700237};
238struct i2400m_tlv_system_state {
Tao Baod7db5942015-01-28 10:07:51 -0800239 struct i2400m_tlv_hdr hdr;
240 __le32 state;
Ben Cheng655a7c02013-10-16 16:09:24 -0700241} __attribute__((packed));
242struct i2400m_tlv_l4_message_versions {
Tao Baod7db5942015-01-28 10:07:51 -0800243 struct i2400m_tlv_hdr hdr;
244 __le16 major;
245 __le16 minor;
246 __le16 branch;
Tao Baod7db5942015-01-28 10:07:51 -0800247 __le16 reserved;
Ben Cheng655a7c02013-10-16 16:09:24 -0700248} __attribute__((packed));
249struct i2400m_tlv_detailed_device_info {
Tao Baod7db5942015-01-28 10:07:51 -0800250 struct i2400m_tlv_hdr hdr;
Tao Baod7db5942015-01-28 10:07:51 -0800251 __u8 reserved1[400];
252 __u8 mac_address[ETH_ALEN];
253 __u8 reserved2[2];
Ben Cheng655a7c02013-10-16 16:09:24 -0700254} __attribute__((packed));
Christopher Ferris38062f92014-07-09 15:33:25 -0700255enum i2400m_rf_switch_status {
Tao Baod7db5942015-01-28 10:07:51 -0800256 I2400M_RF_SWITCH_ON = 1,
257 I2400M_RF_SWITCH_OFF = 2,
Ben Cheng655a7c02013-10-16 16:09:24 -0700258};
Christopher Ferris38062f92014-07-09 15:33:25 -0700259struct i2400m_tlv_rf_switches_status {
Tao Baod7db5942015-01-28 10:07:51 -0800260 struct i2400m_tlv_hdr hdr;
261 __u8 sw_rf_switch;
262 __u8 hw_rf_switch;
Tao Baod7db5942015-01-28 10:07:51 -0800263 __u8 reserved[2];
Ben Cheng655a7c02013-10-16 16:09:24 -0700264} __attribute__((packed));
265enum {
Tao Baod7db5942015-01-28 10:07:51 -0800266 i2400m_rf_operation_on = 1,
Tao Baod7db5942015-01-28 10:07:51 -0800267 i2400m_rf_operation_off = 2
Ben Cheng655a7c02013-10-16 16:09:24 -0700268};
269struct i2400m_tlv_rf_operation {
Tao Baod7db5942015-01-28 10:07:51 -0800270 struct i2400m_tlv_hdr hdr;
Tao Baod7db5942015-01-28 10:07:51 -0800271 __le32 status;
Ben Cheng655a7c02013-10-16 16:09:24 -0700272} __attribute__((packed));
273enum i2400m_tlv_reset_type {
Tao Baod7db5942015-01-28 10:07:51 -0800274 I2400M_RESET_TYPE_COLD = 1,
Tao Baod7db5942015-01-28 10:07:51 -0800275 I2400M_RESET_TYPE_WARM
Ben Cheng655a7c02013-10-16 16:09:24 -0700276};
277struct i2400m_tlv_device_reset_type {
Tao Baod7db5942015-01-28 10:07:51 -0800278 struct i2400m_tlv_hdr hdr;
Tao Baod7db5942015-01-28 10:07:51 -0800279 __le32 reset_type;
Ben Cheng655a7c02013-10-16 16:09:24 -0700280} __attribute__((packed));
281struct i2400m_tlv_config_idle_parameters {
Tao Baod7db5942015-01-28 10:07:51 -0800282 struct i2400m_tlv_hdr hdr;
Tao Baod7db5942015-01-28 10:07:51 -0800283 __le32 idle_timeout;
284 __le32 idle_paging_interval;
Ben Cheng655a7c02013-10-16 16:09:24 -0700285} __attribute__((packed));
286enum i2400m_media_status {
Tao Baod7db5942015-01-28 10:07:51 -0800287 I2400M_MEDIA_STATUS_LINK_UP = 1,
288 I2400M_MEDIA_STATUS_LINK_DOWN,
289 I2400M_MEDIA_STATUS_LINK_RENEW,
Ben Cheng655a7c02013-10-16 16:09:24 -0700290};
Christopher Ferris38062f92014-07-09 15:33:25 -0700291struct i2400m_tlv_media_status {
Tao Baod7db5942015-01-28 10:07:51 -0800292 struct i2400m_tlv_hdr hdr;
293 __le32 media_status;
Ben Cheng655a7c02013-10-16 16:09:24 -0700294} __attribute__((packed));
Christopher Ferris38062f92014-07-09 15:33:25 -0700295struct i2400m_tlv_config_idle_timeout {
Tao Baod7db5942015-01-28 10:07:51 -0800296 struct i2400m_tlv_hdr hdr;
297 __le32 timeout;
Ben Cheng655a7c02013-10-16 16:09:24 -0700298} __attribute__((packed));
Christopher Ferris38062f92014-07-09 15:33:25 -0700299struct i2400m_tlv_config_d2h_data_format {
Tao Baod7db5942015-01-28 10:07:51 -0800300 struct i2400m_tlv_hdr hdr;
301 __u8 format;
302 __u8 reserved[3];
Christopher Ferris38062f92014-07-09 15:33:25 -0700303} __attribute__((packed));
Ben Cheng655a7c02013-10-16 16:09:24 -0700304struct i2400m_tlv_config_dl_host_reorder {
Tao Baod7db5942015-01-28 10:07:51 -0800305 struct i2400m_tlv_hdr hdr;
306 __u8 reorder;
Tao Baod7db5942015-01-28 10:07:51 -0800307 __u8 reserved[3];
Ben Cheng655a7c02013-10-16 16:09:24 -0700308} __attribute__((packed));
309#endif