diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2012-05-11 18:15:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-12 15:02:22 -0400 |
commit | 7591157e1848b5db900b34016e2a2182329a93bb (patch) | |
tree | 47b1a5cfd7f4f1162831638d5be4514b3b8bc74b /include/linux/rndis.h | |
parent | 7390e8b0dee778b0a964337558990a91094e679a (diff) |
usb/net: rndis: break out <linux/rndis.h> defines
As a first step to consolidate the RNDIS implementations, break out
a common file with all the #defines and move it to <linux/rndis.h>.
This also deletes the immediate duplicated defines in the
<linux/rndis.h> file that yields a lot of compilation warnings.
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/rndis.h')
-rw-r--r-- | include/linux/rndis.h | 561 |
1 files changed, 561 insertions, 0 deletions
diff --git a/include/linux/rndis.h b/include/linux/rndis.h new file mode 100644 index 000000000000..430d72eefc09 --- /dev/null +++ b/include/linux/rndis.h | |||
@@ -0,0 +1,561 @@ | |||
1 | /* From include/linux/usb/rndis_host.h */ | ||
2 | |||
3 | #define RNDIS_MSG_COMPLETION 0x80000000 | ||
4 | |||
5 | /* codes for "msg_type" field of rndis messages; | ||
6 | * only the data channel uses packet messages (maybe batched); | ||
7 | * everything else goes on the control channel. | ||
8 | */ | ||
9 | #define RNDIS_MSG_PACKET 0x00000001 /* 1-N packets */ | ||
10 | #define RNDIS_MSG_INIT 0x00000002 | ||
11 | #define RNDIS_MSG_INIT_C (RNDIS_MSG_INIT|RNDIS_MSG_COMPLETION) | ||
12 | #define RNDIS_MSG_HALT 0x00000003 | ||
13 | #define RNDIS_MSG_QUERY 0x00000004 | ||
14 | #define RNDIS_MSG_QUERY_C (RNDIS_MSG_QUERY|RNDIS_MSG_COMPLETION) | ||
15 | #define RNDIS_MSG_SET 0x00000005 | ||
16 | #define RNDIS_MSG_SET_C (RNDIS_MSG_SET|RNDIS_MSG_COMPLETION) | ||
17 | #define RNDIS_MSG_RESET 0x00000006 | ||
18 | #define RNDIS_MSG_RESET_C (RNDIS_MSG_RESET|RNDIS_MSG_COMPLETION) | ||
19 | #define RNDIS_MSG_INDICATE 0x00000007 | ||
20 | #define RNDIS_MSG_KEEPALIVE 0x00000008 | ||
21 | #define RNDIS_MSG_KEEPALIVE_C (RNDIS_MSG_KEEPALIVE|RNDIS_MSG_COMPLETION) | ||
22 | |||
23 | |||
24 | /* codes for "status" field of completion messages */ | ||
25 | #define RNDIS_STATUS_SUCCESS 0x00000000 | ||
26 | #define RNDIS_STATUS_FAILURE 0xc0000001 | ||
27 | #define RNDIS_STATUS_INVALID_DATA 0xc0010015 | ||
28 | #define RNDIS_STATUS_NOT_SUPPORTED 0xc00000bb | ||
29 | #define RNDIS_STATUS_MEDIA_CONNECT 0x4001000b | ||
30 | #define RNDIS_STATUS_MEDIA_DISCONNECT 0x4001000c | ||
31 | #define RNDIS_STATUS_MEDIA_SPECIFIC_INDICATION 0x40010012 | ||
32 | |||
33 | /* codes for OID_GEN_PHYSICAL_MEDIUM */ | ||
34 | #define RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED 0x00000000 | ||
35 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN 0x00000001 | ||
36 | #define RNDIS_PHYSICAL_MEDIUM_CABLE_MODEM 0x00000002 | ||
37 | #define RNDIS_PHYSICAL_MEDIUM_PHONE_LINE 0x00000003 | ||
38 | #define RNDIS_PHYSICAL_MEDIUM_POWER_LINE 0x00000004 | ||
39 | #define RNDIS_PHYSICAL_MEDIUM_DSL 0x00000005 | ||
40 | #define RNDIS_PHYSICAL_MEDIUM_FIBRE_CHANNEL 0x00000006 | ||
41 | #define RNDIS_PHYSICAL_MEDIUM_1394 0x00000007 | ||
42 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_WAN 0x00000008 | ||
43 | #define RNDIS_PHYSICAL_MEDIUM_MAX 0x00000009 | ||
44 | |||
45 | /* NOTE: about 30 OIDs are "mandatory" for peripherals to support ... and | ||
46 | * there are gobs more that may optionally be supported. We'll avoid as much | ||
47 | * of that mess as possible. | ||
48 | */ | ||
49 | #define OID_802_3_PERMANENT_ADDRESS 0x01010101 | ||
50 | #define OID_GEN_MAXIMUM_FRAME_SIZE 0x00010106 | ||
51 | #define OID_GEN_CURRENT_PACKET_FILTER 0x0001010e | ||
52 | #define OID_GEN_PHYSICAL_MEDIUM 0x00010202 | ||
53 | |||
54 | /* packet filter bits used by OID_GEN_CURRENT_PACKET_FILTER */ | ||
55 | #define RNDIS_PACKET_TYPE_DIRECTED 0x00000001 | ||
56 | #define RNDIS_PACKET_TYPE_MULTICAST 0x00000002 | ||
57 | #define RNDIS_PACKET_TYPE_ALL_MULTICAST 0x00000004 | ||
58 | #define RNDIS_PACKET_TYPE_BROADCAST 0x00000008 | ||
59 | #define RNDIS_PACKET_TYPE_SOURCE_ROUTING 0x00000010 | ||
60 | #define RNDIS_PACKET_TYPE_PROMISCUOUS 0x00000020 | ||
61 | #define RNDIS_PACKET_TYPE_SMT 0x00000040 | ||
62 | #define RNDIS_PACKET_TYPE_ALL_LOCAL 0x00000080 | ||
63 | #define RNDIS_PACKET_TYPE_GROUP 0x00001000 | ||
64 | #define RNDIS_PACKET_TYPE_ALL_FUNCTIONAL 0x00002000 | ||
65 | #define RNDIS_PACKET_TYPE_FUNCTIONAL 0x00004000 | ||
66 | #define RNDIS_PACKET_TYPE_MAC_FRAME 0x00008000 | ||
67 | |||
68 | /* From drivers/usb/gadget/ndis.h */ | ||
69 | |||
70 | #define NDIS_STATUS_MULTICAST_FULL 0xC0010009 | ||
71 | #define NDIS_STATUS_MULTICAST_EXISTS 0xC001000A | ||
72 | #define NDIS_STATUS_MULTICAST_NOT_FOUND 0xC001000B | ||
73 | |||
74 | /* NDIS_PNP_CAPABILITIES.Flags constants */ | ||
75 | #define NDIS_DEVICE_WAKE_UP_ENABLE 0x00000001 | ||
76 | #define NDIS_DEVICE_WAKE_ON_PATTERN_MATCH_ENABLE 0x00000002 | ||
77 | #define NDIS_DEVICE_WAKE_ON_MAGIC_PACKET_ENABLE 0x00000004 | ||
78 | |||
79 | /* Required Object IDs (OIDs) */ | ||
80 | #define OID_GEN_SUPPORTED_LIST 0x00010101 | ||
81 | #define OID_GEN_HARDWARE_STATUS 0x00010102 | ||
82 | #define OID_GEN_MEDIA_SUPPORTED 0x00010103 | ||
83 | #define OID_GEN_MEDIA_IN_USE 0x00010104 | ||
84 | #define OID_GEN_MAXIMUM_LOOKAHEAD 0x00010105 | ||
85 | #define OID_GEN_LINK_SPEED 0x00010107 | ||
86 | #define OID_GEN_TRANSMIT_BUFFER_SPACE 0x00010108 | ||
87 | #define OID_GEN_RECEIVE_BUFFER_SPACE 0x00010109 | ||
88 | #define OID_GEN_TRANSMIT_BLOCK_SIZE 0x0001010A | ||
89 | #define OID_GEN_RECEIVE_BLOCK_SIZE 0x0001010B | ||
90 | #define OID_GEN_VENDOR_ID 0x0001010C | ||
91 | #define OID_GEN_VENDOR_DESCRIPTION 0x0001010D | ||
92 | #define OID_GEN_CURRENT_LOOKAHEAD 0x0001010F | ||
93 | #define OID_GEN_DRIVER_VERSION 0x00010110 | ||
94 | #define OID_GEN_MAXIMUM_TOTAL_SIZE 0x00010111 | ||
95 | #define OID_GEN_PROTOCOL_OPTIONS 0x00010112 | ||
96 | #define OID_GEN_MAC_OPTIONS 0x00010113 | ||
97 | #define OID_GEN_MEDIA_CONNECT_STATUS 0x00010114 | ||
98 | #define OID_GEN_MAXIMUM_SEND_PACKETS 0x00010115 | ||
99 | #define OID_GEN_VENDOR_DRIVER_VERSION 0x00010116 | ||
100 | #define OID_GEN_SUPPORTED_GUIDS 0x00010117 | ||
101 | #define OID_GEN_NETWORK_LAYER_ADDRESSES 0x00010118 | ||
102 | #define OID_GEN_TRANSPORT_HEADER_OFFSET 0x00010119 | ||
103 | #define OID_GEN_MACHINE_NAME 0x0001021A | ||
104 | #define OID_GEN_RNDIS_CONFIG_PARAMETER 0x0001021B | ||
105 | #define OID_GEN_VLAN_ID 0x0001021C | ||
106 | |||
107 | /* Optional OIDs */ | ||
108 | #define OID_GEN_MEDIA_CAPABILITIES 0x00010201 | ||
109 | |||
110 | /* Required statistics OIDs */ | ||
111 | #define OID_GEN_XMIT_OK 0x00020101 | ||
112 | #define OID_GEN_RCV_OK 0x00020102 | ||
113 | #define OID_GEN_XMIT_ERROR 0x00020103 | ||
114 | #define OID_GEN_RCV_ERROR 0x00020104 | ||
115 | #define OID_GEN_RCV_NO_BUFFER 0x00020105 | ||
116 | |||
117 | /* Optional statistics OIDs */ | ||
118 | #define OID_GEN_DIRECTED_BYTES_XMIT 0x00020201 | ||
119 | #define OID_GEN_DIRECTED_FRAMES_XMIT 0x00020202 | ||
120 | #define OID_GEN_MULTICAST_BYTES_XMIT 0x00020203 | ||
121 | #define OID_GEN_MULTICAST_FRAMES_XMIT 0x00020204 | ||
122 | #define OID_GEN_BROADCAST_BYTES_XMIT 0x00020205 | ||
123 | #define OID_GEN_BROADCAST_FRAMES_XMIT 0x00020206 | ||
124 | #define OID_GEN_DIRECTED_BYTES_RCV 0x00020207 | ||
125 | #define OID_GEN_DIRECTED_FRAMES_RCV 0x00020208 | ||
126 | #define OID_GEN_MULTICAST_BYTES_RCV 0x00020209 | ||
127 | #define OID_GEN_MULTICAST_FRAMES_RCV 0x0002020A | ||
128 | #define OID_GEN_BROADCAST_BYTES_RCV 0x0002020B | ||
129 | #define OID_GEN_BROADCAST_FRAMES_RCV 0x0002020C | ||
130 | #define OID_GEN_RCV_CRC_ERROR 0x0002020D | ||
131 | #define OID_GEN_TRANSMIT_QUEUE_LENGTH 0x0002020E | ||
132 | #define OID_GEN_GET_TIME_CAPS 0x0002020F | ||
133 | #define OID_GEN_GET_NETCARD_TIME 0x00020210 | ||
134 | #define OID_GEN_NETCARD_LOAD 0x00020211 | ||
135 | #define OID_GEN_DEVICE_PROFILE 0x00020212 | ||
136 | #define OID_GEN_INIT_TIME_MS 0x00020213 | ||
137 | #define OID_GEN_RESET_COUNTS 0x00020214 | ||
138 | #define OID_GEN_MEDIA_SENSE_COUNTS 0x00020215 | ||
139 | #define OID_GEN_FRIENDLY_NAME 0x00020216 | ||
140 | #define OID_GEN_MINIPORT_INFO 0x00020217 | ||
141 | #define OID_GEN_RESET_VERIFY_PARAMETERS 0x00020218 | ||
142 | |||
143 | /* IEEE 802.3 (Ethernet) OIDs */ | ||
144 | #define NDIS_802_3_MAC_OPTION_PRIORITY 0x00000001 | ||
145 | |||
146 | #define OID_802_3_CURRENT_ADDRESS 0x01010102 | ||
147 | #define OID_802_3_MULTICAST_LIST 0x01010103 | ||
148 | #define OID_802_3_MAXIMUM_LIST_SIZE 0x01010104 | ||
149 | #define OID_802_3_MAC_OPTIONS 0x01010105 | ||
150 | #define OID_802_3_RCV_ERROR_ALIGNMENT 0x01020101 | ||
151 | #define OID_802_3_XMIT_ONE_COLLISION 0x01020102 | ||
152 | #define OID_802_3_XMIT_MORE_COLLISIONS 0x01020103 | ||
153 | #define OID_802_3_XMIT_DEFERRED 0x01020201 | ||
154 | #define OID_802_3_XMIT_MAX_COLLISIONS 0x01020202 | ||
155 | #define OID_802_3_RCV_OVERRUN 0x01020203 | ||
156 | #define OID_802_3_XMIT_UNDERRUN 0x01020204 | ||
157 | #define OID_802_3_XMIT_HEARTBEAT_FAILURE 0x01020205 | ||
158 | #define OID_802_3_XMIT_TIMES_CRS_LOST 0x01020206 | ||
159 | #define OID_802_3_XMIT_LATE_COLLISIONS 0x01020207 | ||
160 | |||
161 | /* OID_GEN_MINIPORT_INFO constants */ | ||
162 | #define NDIS_MINIPORT_BUS_MASTER 0x00000001 | ||
163 | #define NDIS_MINIPORT_WDM_DRIVER 0x00000002 | ||
164 | #define NDIS_MINIPORT_SG_LIST 0x00000004 | ||
165 | #define NDIS_MINIPORT_SUPPORTS_MEDIA_QUERY 0x00000008 | ||
166 | #define NDIS_MINIPORT_INDICATES_PACKETS 0x00000010 | ||
167 | #define NDIS_MINIPORT_IGNORE_PACKET_QUEUE 0x00000020 | ||
168 | #define NDIS_MINIPORT_IGNORE_REQUEST_QUEUE 0x00000040 | ||
169 | #define NDIS_MINIPORT_IGNORE_TOKEN_RING_ERRORS 0x00000080 | ||
170 | #define NDIS_MINIPORT_INTERMEDIATE_DRIVER 0x00000100 | ||
171 | #define NDIS_MINIPORT_IS_NDIS_5 0x00000200 | ||
172 | #define NDIS_MINIPORT_IS_CO 0x00000400 | ||
173 | #define NDIS_MINIPORT_DESERIALIZE 0x00000800 | ||
174 | #define NDIS_MINIPORT_REQUIRES_MEDIA_POLLING 0x00001000 | ||
175 | #define NDIS_MINIPORT_SUPPORTS_MEDIA_SENSE 0x00002000 | ||
176 | #define NDIS_MINIPORT_NETBOOT_CARD 0x00004000 | ||
177 | #define NDIS_MINIPORT_PM_SUPPORTED 0x00008000 | ||
178 | #define NDIS_MINIPORT_SUPPORTS_MAC_ADDRESS_OVERWRITE 0x00010000 | ||
179 | #define NDIS_MINIPORT_USES_SAFE_BUFFER_APIS 0x00020000 | ||
180 | #define NDIS_MINIPORT_HIDDEN 0x00040000 | ||
181 | #define NDIS_MINIPORT_SWENUM 0x00080000 | ||
182 | #define NDIS_MINIPORT_SURPRISE_REMOVE_OK 0x00100000 | ||
183 | #define NDIS_MINIPORT_NO_HALT_ON_SUSPEND 0x00200000 | ||
184 | #define NDIS_MINIPORT_HARDWARE_DEVICE 0x00400000 | ||
185 | #define NDIS_MINIPORT_SUPPORTS_CANCEL_SEND_PACKETS 0x00800000 | ||
186 | #define NDIS_MINIPORT_64BITS_DMA 0x01000000 | ||
187 | |||
188 | #define NDIS_MEDIUM_802_3 0x00000000 | ||
189 | #define NDIS_MEDIUM_802_5 0x00000001 | ||
190 | #define NDIS_MEDIUM_FDDI 0x00000002 | ||
191 | #define NDIS_MEDIUM_WAN 0x00000003 | ||
192 | #define NDIS_MEDIUM_LOCAL_TALK 0x00000004 | ||
193 | #define NDIS_MEDIUM_DIX 0x00000005 | ||
194 | #define NDIS_MEDIUM_ARCENT_RAW 0x00000006 | ||
195 | #define NDIS_MEDIUM_ARCENT_878_2 0x00000007 | ||
196 | #define NDIS_MEDIUM_ATM 0x00000008 | ||
197 | #define NDIS_MEDIUM_WIRELESS_LAN 0x00000009 | ||
198 | #define NDIS_MEDIUM_IRDA 0x0000000A | ||
199 | #define NDIS_MEDIUM_BPC 0x0000000B | ||
200 | #define NDIS_MEDIUM_CO_WAN 0x0000000C | ||
201 | #define NDIS_MEDIUM_1394 0x0000000D | ||
202 | |||
203 | #define NDIS_PACKET_TYPE_DIRECTED 0x00000001 | ||
204 | #define NDIS_PACKET_TYPE_MULTICAST 0x00000002 | ||
205 | #define NDIS_PACKET_TYPE_ALL_MULTICAST 0x00000004 | ||
206 | #define NDIS_PACKET_TYPE_BROADCAST 0x00000008 | ||
207 | #define NDIS_PACKET_TYPE_SOURCE_ROUTING 0x00000010 | ||
208 | #define NDIS_PACKET_TYPE_PROMISCUOUS 0x00000020 | ||
209 | #define NDIS_PACKET_TYPE_SMT 0x00000040 | ||
210 | #define NDIS_PACKET_TYPE_ALL_LOCAL 0x00000080 | ||
211 | #define NDIS_PACKET_TYPE_GROUP 0x00000100 | ||
212 | #define NDIS_PACKET_TYPE_ALL_FUNCTIONAL 0x00000200 | ||
213 | #define NDIS_PACKET_TYPE_FUNCTIONAL 0x00000400 | ||
214 | #define NDIS_PACKET_TYPE_MAC_FRAME 0x00000800 | ||
215 | |||
216 | #define NDIS_MEDIA_STATE_CONNECTED 0x00000000 | ||
217 | #define NDIS_MEDIA_STATE_DISCONNECTED 0x00000001 | ||
218 | |||
219 | #define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA 0x00000001 | ||
220 | #define NDIS_MAC_OPTION_RECEIVE_SERIALIZED 0x00000002 | ||
221 | #define NDIS_MAC_OPTION_TRANSFERS_NOT_PEND 0x00000004 | ||
222 | #define NDIS_MAC_OPTION_NO_LOOPBACK 0x00000008 | ||
223 | #define NDIS_MAC_OPTION_FULL_DUPLEX 0x00000010 | ||
224 | #define NDIS_MAC_OPTION_EOTX_INDICATION 0x00000020 | ||
225 | #define NDIS_MAC_OPTION_8021P_PRIORITY 0x00000040 | ||
226 | #define NDIS_MAC_OPTION_RESERVED 0x80000000 | ||
227 | |||
228 | /* From drivers/usb/gadget/rndis.h */ | ||
229 | |||
230 | /* Remote NDIS Versions */ | ||
231 | #define RNDIS_MAJOR_VERSION 0x00000001 | ||
232 | #define RNDIS_MINOR_VERSION 0x00000000 | ||
233 | |||
234 | /* For all not specified status messages: | ||
235 | * RNDIS_STATUS_Xxx -> NDIS_STATUS_Xxx | ||
236 | */ | ||
237 | |||
238 | /* Message Set for Connectionless (802.3) Devices */ | ||
239 | #define REMOTE_NDIS_PACKET_MSG 0x00000001U | ||
240 | #define REMOTE_NDIS_INITIALIZE_MSG 0x00000002U /* Initialize device */ | ||
241 | #define REMOTE_NDIS_HALT_MSG 0x00000003U | ||
242 | #define REMOTE_NDIS_QUERY_MSG 0x00000004U | ||
243 | #define REMOTE_NDIS_SET_MSG 0x00000005U | ||
244 | #define REMOTE_NDIS_RESET_MSG 0x00000006U | ||
245 | #define REMOTE_NDIS_INDICATE_STATUS_MSG 0x00000007U | ||
246 | #define REMOTE_NDIS_KEEPALIVE_MSG 0x00000008U | ||
247 | |||
248 | /* Message completion */ | ||
249 | #define REMOTE_NDIS_INITIALIZE_CMPLT 0x80000002U | ||
250 | #define REMOTE_NDIS_QUERY_CMPLT 0x80000004U | ||
251 | #define REMOTE_NDIS_SET_CMPLT 0x80000005U | ||
252 | #define REMOTE_NDIS_RESET_CMPLT 0x80000006U | ||
253 | #define REMOTE_NDIS_KEEPALIVE_CMPLT 0x80000008U | ||
254 | |||
255 | /* Device Flags */ | ||
256 | #define RNDIS_DF_CONNECTIONLESS 0x00000001U | ||
257 | #define RNDIS_DF_CONNECTION_ORIENTED 0x00000002U | ||
258 | #define RNDIS_DF_RAW_DATA 0x00000004U | ||
259 | |||
260 | /* from drivers/net/sk98lin/h/skgepnmi.h */ | ||
261 | #define OID_PNP_CAPABILITIES 0xFD010100 | ||
262 | #define OID_PNP_SET_POWER 0xFD010101 | ||
263 | #define OID_PNP_QUERY_POWER 0xFD010102 | ||
264 | #define OID_PNP_ADD_WAKE_UP_PATTERN 0xFD010103 | ||
265 | #define OID_PNP_REMOVE_WAKE_UP_PATTERN 0xFD010104 | ||
266 | #define OID_PNP_ENABLE_WAKE_UP 0xFD010106 | ||
267 | |||
268 | /* From drivers/net/hyperv/hyperv_net.h */ | ||
269 | |||
270 | /* Status codes */ | ||
271 | |||
272 | #ifndef STATUS_SUCCESS | ||
273 | #define STATUS_SUCCESS (0x00000000L) | ||
274 | #endif | ||
275 | |||
276 | #ifndef STATUS_UNSUCCESSFUL | ||
277 | #define STATUS_UNSUCCESSFUL (0xC0000001L) | ||
278 | #endif | ||
279 | |||
280 | #ifndef STATUS_PENDING | ||
281 | #define STATUS_PENDING (0x00000103L) | ||
282 | #endif | ||
283 | |||
284 | #ifndef STATUS_INSUFFICIENT_RESOURCES | ||
285 | #define STATUS_INSUFFICIENT_RESOURCES (0xC000009AL) | ||
286 | #endif | ||
287 | |||
288 | #ifndef STATUS_BUFFER_OVERFLOW | ||
289 | #define STATUS_BUFFER_OVERFLOW (0x80000005L) | ||
290 | #endif | ||
291 | |||
292 | #ifndef STATUS_NOT_SUPPORTED | ||
293 | #define STATUS_NOT_SUPPORTED (0xC00000BBL) | ||
294 | #endif | ||
295 | |||
296 | #define RNDIS_STATUS_PENDING (STATUS_PENDING) | ||
297 | #define RNDIS_STATUS_NOT_RECOGNIZED (0x00010001L) | ||
298 | #define RNDIS_STATUS_NOT_COPIED (0x00010002L) | ||
299 | #define RNDIS_STATUS_NOT_ACCEPTED (0x00010003L) | ||
300 | #define RNDIS_STATUS_CALL_ACTIVE (0x00010007L) | ||
301 | |||
302 | #define RNDIS_STATUS_ONLINE (0x40010003L) | ||
303 | #define RNDIS_STATUS_RESET_START (0x40010004L) | ||
304 | #define RNDIS_STATUS_RESET_END (0x40010005L) | ||
305 | #define RNDIS_STATUS_RING_STATUS (0x40010006L) | ||
306 | #define RNDIS_STATUS_CLOSED (0x40010007L) | ||
307 | #define RNDIS_STATUS_WAN_LINE_UP (0x40010008L) | ||
308 | #define RNDIS_STATUS_WAN_LINE_DOWN (0x40010009L) | ||
309 | #define RNDIS_STATUS_WAN_FRAGMENT (0x4001000AL) | ||
310 | #define RNDIS_STATUS_HARDWARE_LINE_UP (0x4001000DL) | ||
311 | #define RNDIS_STATUS_HARDWARE_LINE_DOWN (0x4001000EL) | ||
312 | #define RNDIS_STATUS_INTERFACE_UP (0x4001000FL) | ||
313 | #define RNDIS_STATUS_INTERFACE_DOWN (0x40010010L) | ||
314 | #define RNDIS_STATUS_MEDIA_BUSY (0x40010011L) | ||
315 | #define RNDIS_STATUS_WW_INDICATION RDIA_SPECIFIC_INDICATION | ||
316 | #define RNDIS_STATUS_LINK_SPEED_CHANGE (0x40010013L) | ||
317 | |||
318 | #define RNDIS_STATUS_NOT_RESETTABLE (0x80010001L) | ||
319 | #define RNDIS_STATUS_SOFT_ERRORS (0x80010003L) | ||
320 | #define RNDIS_STATUS_HARD_ERRORS (0x80010004L) | ||
321 | #define RNDIS_STATUS_BUFFER_OVERFLOW (STATUS_BUFFER_OVERFLOW) | ||
322 | |||
323 | #define RNDIS_STATUS_RESOURCES (STATUS_INSUFFICIENT_RESOURCES) | ||
324 | #define RNDIS_STATUS_CLOSING (0xC0010002L) | ||
325 | #define RNDIS_STATUS_BAD_VERSION (0xC0010004L) | ||
326 | #define RNDIS_STATUS_BAD_CHARACTERISTICS (0xC0010005L) | ||
327 | #define RNDIS_STATUS_ADAPTER_NOT_FOUND (0xC0010006L) | ||
328 | #define RNDIS_STATUS_OPEN_FAILED (0xC0010007L) | ||
329 | #define RNDIS_STATUS_DEVICE_FAILED (0xC0010008L) | ||
330 | #define RNDIS_STATUS_MULTICAST_FULL (0xC0010009L) | ||
331 | #define RNDIS_STATUS_MULTICAST_EXISTS (0xC001000AL) | ||
332 | #define RNDIS_STATUS_MULTICAST_NOT_FOUND (0xC001000BL) | ||
333 | #define RNDIS_STATUS_REQUEST_ABORTED (0xC001000CL) | ||
334 | #define RNDIS_STATUS_RESET_IN_PROGRESS (0xC001000DL) | ||
335 | #define RNDIS_STATUS_CLOSING_INDICATING (0xC001000EL) | ||
336 | #define RNDIS_STATUS_INVALID_PACKET (0xC001000FL) | ||
337 | #define RNDIS_STATUS_OPEN_LIST_FULL (0xC0010010L) | ||
338 | #define RNDIS_STATUS_ADAPTER_NOT_READY (0xC0010011L) | ||
339 | #define RNDIS_STATUS_ADAPTER_NOT_OPEN (0xC0010012L) | ||
340 | #define RNDIS_STATUS_NOT_INDICATING (0xC0010013L) | ||
341 | #define RNDIS_STATUS_INVALID_LENGTH (0xC0010014L) | ||
342 | #define RNDIS_STATUS_BUFFER_TOO_SHORT (0xC0010016L) | ||
343 | #define RNDIS_STATUS_INVALID_OID (0xC0010017L) | ||
344 | #define RNDIS_STATUS_ADAPTER_REMOVED (0xC0010018L) | ||
345 | #define RNDIS_STATUS_UNSUPPORTED_MEDIA (0xC0010019L) | ||
346 | #define RNDIS_STATUS_GROUP_ADDRESS_IN_USE (0xC001001AL) | ||
347 | #define RNDIS_STATUS_FILE_NOT_FOUND (0xC001001BL) | ||
348 | #define RNDIS_STATUS_ERROR_READING_FILE (0xC001001CL) | ||
349 | #define RNDIS_STATUS_ALREADY_MAPPED (0xC001001DL) | ||
350 | #define RNDIS_STATUS_RESOURCE_CONFLICT (0xC001001EL) | ||
351 | #define RNDIS_STATUS_NO_CABLE (0xC001001FL) | ||
352 | |||
353 | #define RNDIS_STATUS_INVALID_SAP (0xC0010020L) | ||
354 | #define RNDIS_STATUS_SAP_IN_USE (0xC0010021L) | ||
355 | #define RNDIS_STATUS_INVALID_ADDRESS (0xC0010022L) | ||
356 | #define RNDIS_STATUS_VC_NOT_ACTIVATED (0xC0010023L) | ||
357 | #define RNDIS_STATUS_DEST_OUT_OF_ORDER (0xC0010024L) | ||
358 | #define RNDIS_STATUS_VC_NOT_AVAILABLE (0xC0010025L) | ||
359 | #define RNDIS_STATUS_CELLRATE_NOT_AVAILABLE (0xC0010026L) | ||
360 | #define RNDIS_STATUS_INCOMPATABLE_QOS (0xC0010027L) | ||
361 | #define RNDIS_STATUS_AAL_PARAMS_UNSUPPORTED (0xC0010028L) | ||
362 | #define RNDIS_STATUS_NO_ROUTE_TO_DESTINATION (0xC0010029L) | ||
363 | |||
364 | #define RNDIS_STATUS_TOKEN_RING_OPEN_ERROR (0xC0011000L) | ||
365 | |||
366 | /* Object Identifiers used by NdisRequest Query/Set Information */ | ||
367 | /* General Objects */ | ||
368 | #define RNDIS_OID_GEN_SUPPORTED_LIST 0x00010101 | ||
369 | #define RNDIS_OID_GEN_HARDWARE_STATUS 0x00010102 | ||
370 | #define RNDIS_OID_GEN_MEDIA_SUPPORTED 0x00010103 | ||
371 | #define RNDIS_OID_GEN_MEDIA_IN_USE 0x00010104 | ||
372 | #define RNDIS_OID_GEN_MAXIMUM_LOOKAHEAD 0x00010105 | ||
373 | #define RNDIS_OID_GEN_LINK_SPEED 0x00010107 | ||
374 | #define RNDIS_OID_GEN_TRANSMIT_BUFFER_SPACE 0x00010108 | ||
375 | #define RNDIS_OID_GEN_RECEIVE_BUFFER_SPACE 0x00010109 | ||
376 | #define RNDIS_OID_GEN_TRANSMIT_BLOCK_SIZE 0x0001010A | ||
377 | #define RNDIS_OID_GEN_RECEIVE_BLOCK_SIZE 0x0001010B | ||
378 | #define RNDIS_OID_GEN_VENDOR_ID 0x0001010C | ||
379 | #define RNDIS_OID_GEN_VENDOR_DESCRIPTION 0x0001010D | ||
380 | #define RNDIS_OID_GEN_CURRENT_PACKET_FILTER 0x0001010E | ||
381 | #define RNDIS_OID_GEN_CURRENT_LOOKAHEAD 0x0001010F | ||
382 | #define RNDIS_OID_GEN_DRIVER_VERSION 0x00010110 | ||
383 | #define RNDIS_OID_GEN_MAXIMUM_TOTAL_SIZE 0x00010111 | ||
384 | #define RNDIS_OID_GEN_PROTOCOL_OPTIONS 0x00010112 | ||
385 | #define RNDIS_OID_GEN_MAC_OPTIONS 0x00010113 | ||
386 | #define RNDIS_OID_GEN_MEDIA_CONNECT_STATUS 0x00010114 | ||
387 | #define RNDIS_OID_GEN_MAXIMUM_SEND_PACKETS 0x00010115 | ||
388 | #define RNDIS_OID_GEN_VENDOR_DRIVER_VERSION 0x00010116 | ||
389 | #define RNDIS_OID_GEN_NETWORK_LAYER_ADDRESSES 0x00010118 | ||
390 | #define RNDIS_OID_GEN_TRANSPORT_HEADER_OFFSET 0x00010119 | ||
391 | #define RNDIS_OID_GEN_MACHINE_NAME 0x0001021A | ||
392 | |||
393 | #define RNDIS_OID_GEN_XMIT_OK 0x00020101 | ||
394 | #define RNDIS_OID_GEN_RCV_OK 0x00020102 | ||
395 | #define RNDIS_OID_GEN_XMIT_ERROR 0x00020103 | ||
396 | #define RNDIS_OID_GEN_RCV_ERROR 0x00020104 | ||
397 | #define RNDIS_OID_GEN_RCV_NO_BUFFER 0x00020105 | ||
398 | |||
399 | #define RNDIS_OID_GEN_DIRECTED_BYTES_XMIT 0x00020201 | ||
400 | #define RNDIS_OID_GEN_DIRECTED_FRAMES_XMIT 0x00020202 | ||
401 | #define RNDIS_OID_GEN_MULTICAST_BYTES_XMIT 0x00020203 | ||
402 | #define RNDIS_OID_GEN_MULTICAST_FRAMES_XMIT 0x00020204 | ||
403 | #define RNDIS_OID_GEN_BROADCAST_BYTES_XMIT 0x00020205 | ||
404 | #define RNDIS_OID_GEN_BROADCAST_FRAMES_XMIT 0x00020206 | ||
405 | #define RNDIS_OID_GEN_DIRECTED_BYTES_RCV 0x00020207 | ||
406 | #define RNDIS_OID_GEN_DIRECTED_FRAMES_RCV 0x00020208 | ||
407 | #define RNDIS_OID_GEN_MULTICAST_BYTES_RCV 0x00020209 | ||
408 | #define RNDIS_OID_GEN_MULTICAST_FRAMES_RCV 0x0002020A | ||
409 | #define RNDIS_OID_GEN_BROADCAST_BYTES_RCV 0x0002020B | ||
410 | #define RNDIS_OID_GEN_BROADCAST_FRAMES_RCV 0x0002020C | ||
411 | |||
412 | #define RNDIS_OID_GEN_RCV_CRC_ERROR 0x0002020D | ||
413 | #define RNDIS_OID_GEN_TRANSMIT_QUEUE_LENGTH 0x0002020E | ||
414 | |||
415 | #define RNDIS_OID_GEN_GET_TIME_CAPS 0x0002020F | ||
416 | #define RNDIS_OID_GEN_GET_NETCARD_TIME 0x00020210 | ||
417 | |||
418 | /* These are connection-oriented general OIDs. */ | ||
419 | /* These replace the above OIDs for connection-oriented media. */ | ||
420 | #define RNDIS_OID_GEN_CO_SUPPORTED_LIST 0x00010101 | ||
421 | #define RNDIS_OID_GEN_CO_HARDWARE_STATUS 0x00010102 | ||
422 | #define RNDIS_OID_GEN_CO_MEDIA_SUPPORTED 0x00010103 | ||
423 | #define RNDIS_OID_GEN_CO_MEDIA_IN_USE 0x00010104 | ||
424 | #define RNDIS_OID_GEN_CO_LINK_SPEED 0x00010105 | ||
425 | #define RNDIS_OID_GEN_CO_VENDOR_ID 0x00010106 | ||
426 | #define RNDIS_OID_GEN_CO_VENDOR_DESCRIPTION 0x00010107 | ||
427 | #define RNDIS_OID_GEN_CO_DRIVER_VERSION 0x00010108 | ||
428 | #define RNDIS_OID_GEN_CO_PROTOCOL_OPTIONS 0x00010109 | ||
429 | #define RNDIS_OID_GEN_CO_MAC_OPTIONS 0x0001010A | ||
430 | #define RNDIS_OID_GEN_CO_MEDIA_CONNECT_STATUS 0x0001010B | ||
431 | #define RNDIS_OID_GEN_CO_VENDOR_DRIVER_VERSION 0x0001010C | ||
432 | #define RNDIS_OID_GEN_CO_MINIMUM_LINK_SPEED 0x0001010D | ||
433 | |||
434 | #define RNDIS_OID_GEN_CO_GET_TIME_CAPS 0x00010201 | ||
435 | #define RNDIS_OID_GEN_CO_GET_NETCARD_TIME 0x00010202 | ||
436 | |||
437 | /* These are connection-oriented statistics OIDs. */ | ||
438 | #define RNDIS_OID_GEN_CO_XMIT_PDUS_OK 0x00020101 | ||
439 | #define RNDIS_OID_GEN_CO_RCV_PDUS_OK 0x00020102 | ||
440 | #define RNDIS_OID_GEN_CO_XMIT_PDUS_ERROR 0x00020103 | ||
441 | #define RNDIS_OID_GEN_CO_RCV_PDUS_ERROR 0x00020104 | ||
442 | #define RNDIS_OID_GEN_CO_RCV_PDUS_NO_BUFFER 0x00020105 | ||
443 | |||
444 | |||
445 | #define RNDIS_OID_GEN_CO_RCV_CRC_ERROR 0x00020201 | ||
446 | #define RNDIS_OID_GEN_CO_TRANSMIT_QUEUE_LENGTH 0x00020202 | ||
447 | #define RNDIS_OID_GEN_CO_BYTES_XMIT 0x00020203 | ||
448 | #define RNDIS_OID_GEN_CO_BYTES_RCV 0x00020204 | ||
449 | #define RNDIS_OID_GEN_CO_BYTES_XMIT_OUTSTANDING 0x00020205 | ||
450 | #define RNDIS_OID_GEN_CO_NETCARD_LOAD 0x00020206 | ||
451 | |||
452 | /* These are objects for Connection-oriented media call-managers. */ | ||
453 | #define RNDIS_OID_CO_ADD_PVC 0xFF000001 | ||
454 | #define RNDIS_OID_CO_DELETE_PVC 0xFF000002 | ||
455 | #define RNDIS_OID_CO_GET_CALL_INFORMATION 0xFF000003 | ||
456 | #define RNDIS_OID_CO_ADD_ADDRESS 0xFF000004 | ||
457 | #define RNDIS_OID_CO_DELETE_ADDRESS 0xFF000005 | ||
458 | #define RNDIS_OID_CO_GET_ADDRESSES 0xFF000006 | ||
459 | #define RNDIS_OID_CO_ADDRESS_CHANGE 0xFF000007 | ||
460 | #define RNDIS_OID_CO_SIGNALING_ENABLED 0xFF000008 | ||
461 | #define RNDIS_OID_CO_SIGNALING_DISABLED 0xFF000009 | ||
462 | |||
463 | /* 802.3 Objects (Ethernet) */ | ||
464 | #define RNDIS_OID_802_3_PERMANENT_ADDRESS 0x01010101 | ||
465 | #define RNDIS_OID_802_3_CURRENT_ADDRESS 0x01010102 | ||
466 | #define RNDIS_OID_802_3_MULTICAST_LIST 0x01010103 | ||
467 | #define RNDIS_OID_802_3_MAXIMUM_LIST_SIZE 0x01010104 | ||
468 | #define RNDIS_OID_802_3_MAC_OPTIONS 0x01010105 | ||
469 | |||
470 | #define NDIS_802_3_MAC_OPTION_PRIORITY 0x00000001 | ||
471 | |||
472 | #define RNDIS_OID_802_3_RCV_ERROR_ALIGNMENT 0x01020101 | ||
473 | #define RNDIS_OID_802_3_XMIT_ONE_COLLISION 0x01020102 | ||
474 | #define RNDIS_OID_802_3_XMIT_MORE_COLLISIONS 0x01020103 | ||
475 | |||
476 | #define RNDIS_OID_802_3_XMIT_DEFERRED 0x01020201 | ||
477 | #define RNDIS_OID_802_3_XMIT_MAX_COLLISIONS 0x01020202 | ||
478 | #define RNDIS_OID_802_3_RCV_OVERRUN 0x01020203 | ||
479 | #define RNDIS_OID_802_3_XMIT_UNDERRUN 0x01020204 | ||
480 | #define RNDIS_OID_802_3_XMIT_HEARTBEAT_FAILURE 0x01020205 | ||
481 | #define RNDIS_OID_802_3_XMIT_TIMES_CRS_LOST 0x01020206 | ||
482 | #define RNDIS_OID_802_3_XMIT_LATE_COLLISIONS 0x01020207 | ||
483 | |||
484 | #define REMOTE_CONDIS_MP_CREATE_VC_MSG 0x00008001 | ||
485 | #define REMOTE_CONDIS_MP_DELETE_VC_MSG 0x00008002 | ||
486 | #define REMOTE_CONDIS_MP_ACTIVATE_VC_MSG 0x00008005 | ||
487 | #define REMOTE_CONDIS_MP_DEACTIVATE_VC_MSG 0x00008006 | ||
488 | #define REMOTE_CONDIS_INDICATE_STATUS_MSG 0x00008007 | ||
489 | |||
490 | #define REMOTE_CONDIS_MP_CREATE_VC_CMPLT 0x80008001 | ||
491 | #define REMOTE_CONDIS_MP_DELETE_VC_CMPLT 0x80008002 | ||
492 | #define REMOTE_CONDIS_MP_ACTIVATE_VC_CMPLT 0x80008005 | ||
493 | #define REMOTE_CONDIS_MP_DEACTIVATE_VC_CMPLT 0x80008006 | ||
494 | |||
495 | /* | ||
496 | * Reserved message type for private communication between lower-layer host | ||
497 | * driver and remote device, if necessary. | ||
498 | */ | ||
499 | #define REMOTE_NDIS_BUS_MSG 0xff000001 | ||
500 | |||
501 | /* Remote NDIS medium types. */ | ||
502 | #define RNDIS_MEDIUM_802_3 0x00000000 | ||
503 | #define RNDIS_MEDIUM_802_5 0x00000001 | ||
504 | #define RNDIS_MEDIUM_FDDI 0x00000002 | ||
505 | #define RNDIS_MEDIUM_WAN 0x00000003 | ||
506 | #define RNDIS_MEDIUM_LOCAL_TALK 0x00000004 | ||
507 | #define RNDIS_MEDIUM_ARCNET_RAW 0x00000006 | ||
508 | #define RNDIS_MEDIUM_ARCNET_878_2 0x00000007 | ||
509 | #define RNDIS_MEDIUM_ATM 0x00000008 | ||
510 | #define RNDIS_MEDIUM_WIRELESS_WAN 0x00000009 | ||
511 | #define RNDIS_MEDIUM_IRDA 0x0000000a | ||
512 | #define RNDIS_MEDIUM_CO_WAN 0x0000000b | ||
513 | /* Not a real medium, defined as an upper-bound */ | ||
514 | #define RNDIS_MEDIUM_MAX 0x0000000d | ||
515 | |||
516 | |||
517 | /* Remote NDIS medium connection states. */ | ||
518 | #define RNDIS_MEDIA_STATE_CONNECTED 0x00000000 | ||
519 | #define RNDIS_MEDIA_STATE_DISCONNECTED 0x00000001 | ||
520 | |||
521 | /* From drivers/net/wireless/rndis_wlan.c */ | ||
522 | |||
523 | /* various RNDIS OID defs */ | ||
524 | #define OID_GEN_LINK_SPEED 0x00010107 | ||
525 | |||
526 | #define OID_GEN_XMIT_OK 0x00020101 | ||
527 | #define OID_GEN_RCV_OK 0x00020102 | ||
528 | #define OID_GEN_XMIT_ERROR 0x00020103 | ||
529 | #define OID_GEN_RCV_ERROR 0x00020104 | ||
530 | #define OID_GEN_RCV_NO_BUFFER 0x00020105 | ||
531 | |||
532 | #define OID_802_3_CURRENT_ADDRESS 0x01010102 | ||
533 | #define OID_802_3_MULTICAST_LIST 0x01010103 | ||
534 | #define OID_802_3_MAXIMUM_LIST_SIZE 0x01010104 | ||
535 | |||
536 | #define OID_802_11_BSSID 0x0d010101 | ||
537 | #define OID_802_11_SSID 0x0d010102 | ||
538 | #define OID_802_11_INFRASTRUCTURE_MODE 0x0d010108 | ||
539 | #define OID_802_11_ADD_WEP 0x0d010113 | ||
540 | #define OID_802_11_REMOVE_WEP 0x0d010114 | ||
541 | #define OID_802_11_DISASSOCIATE 0x0d010115 | ||
542 | #define OID_802_11_AUTHENTICATION_MODE 0x0d010118 | ||
543 | #define OID_802_11_PRIVACY_FILTER 0x0d010119 | ||
544 | #define OID_802_11_BSSID_LIST_SCAN 0x0d01011a | ||
545 | #define OID_802_11_ENCRYPTION_STATUS 0x0d01011b | ||
546 | #define OID_802_11_ADD_KEY 0x0d01011d | ||
547 | #define OID_802_11_REMOVE_KEY 0x0d01011e | ||
548 | #define OID_802_11_ASSOCIATION_INFORMATION 0x0d01011f | ||
549 | #define OID_802_11_CAPABILITY 0x0d010122 | ||
550 | #define OID_802_11_PMKID 0x0d010123 | ||
551 | #define OID_802_11_NETWORK_TYPES_SUPPORTED 0x0d010203 | ||
552 | #define OID_802_11_NETWORK_TYPE_IN_USE 0x0d010204 | ||
553 | #define OID_802_11_TX_POWER_LEVEL 0x0d010205 | ||
554 | #define OID_802_11_RSSI 0x0d010206 | ||
555 | #define OID_802_11_RSSI_TRIGGER 0x0d010207 | ||
556 | #define OID_802_11_FRAGMENTATION_THRESHOLD 0x0d010209 | ||
557 | #define OID_802_11_RTS_THRESHOLD 0x0d01020a | ||
558 | #define OID_802_11_SUPPORTED_RATES 0x0d01020e | ||
559 | #define OID_802_11_CONFIGURATION 0x0d010211 | ||
560 | #define OID_802_11_POWER_MODE 0x0d010216 | ||
561 | #define OID_802_11_BSSID_LIST 0x0d010217 | ||