diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2012-05-11 18:16:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-12 15:04:19 -0400 |
commit | 8cdddc3f9d6692f5690841468a9f63c19fb734ed (patch) | |
tree | 9a2f0b7bb86d6dda3e48a0fba5aa39297a8d4dc5 /include | |
parent | 007e5c8e6aad8526e234b2481d2104e3e1fe8b88 (diff) |
usb/net: rndis: eliminate first set of duplicate OIDs
The RNDIS protocol contains a vast number of Object ID:s (OIDs).
The current definitions had multiple definitions of these ID:s,
let's use the nicely RNDIS_*-prefixed defines from the HyperV
implementation, rename everywhere they're used, and copy+rename
the few that were missing from this list of objects.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/rndis.h | 108 |
1 files changed, 23 insertions, 85 deletions
diff --git a/include/linux/rndis.h b/include/linux/rndis.h index 61b4185b860c..ebc40b3f1b1b 100644 --- a/include/linux/rndis.h +++ b/include/linux/rndis.h | |||
@@ -30,7 +30,7 @@ | |||
30 | #define RNDIS_STATUS_MEDIA_DISCONNECT 0x4001000c | 30 | #define RNDIS_STATUS_MEDIA_DISCONNECT 0x4001000c |
31 | #define RNDIS_STATUS_MEDIA_SPECIFIC_INDICATION 0x40010012 | 31 | #define RNDIS_STATUS_MEDIA_SPECIFIC_INDICATION 0x40010012 |
32 | 32 | ||
33 | /* codes for OID_GEN_PHYSICAL_MEDIUM */ | 33 | /* codes for RNDIS_OID_GEN_PHYSICAL_MEDIUM */ |
34 | #define RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED 0x00000000 | 34 | #define RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED 0x00000000 |
35 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN 0x00000001 | 35 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN 0x00000001 |
36 | #define RNDIS_PHYSICAL_MEDIUM_CABLE_MODEM 0x00000002 | 36 | #define RNDIS_PHYSICAL_MEDIUM_CABLE_MODEM 0x00000002 |
@@ -42,16 +42,7 @@ | |||
42 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_WAN 0x00000008 | 42 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_WAN 0x00000008 |
43 | #define RNDIS_PHYSICAL_MEDIUM_MAX 0x00000009 | 43 | #define RNDIS_PHYSICAL_MEDIUM_MAX 0x00000009 |
44 | 44 | ||
45 | /* NOTE: about 30 OIDs are "mandatory" for peripherals to support ... and | 45 | /* packet filter bits used by RNDIS_OID_GEN_CURRENT_PACKET_FILTER */ |
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 | 46 | #define RNDIS_PACKET_TYPE_DIRECTED 0x00000001 |
56 | #define RNDIS_PACKET_TYPE_MULTICAST 0x00000002 | 47 | #define RNDIS_PACKET_TYPE_MULTICAST 0x00000002 |
57 | #define RNDIS_PACKET_TYPE_ALL_MULTICAST 0x00000004 | 48 | #define RNDIS_PACKET_TYPE_ALL_MULTICAST 0x00000004 |
@@ -76,70 +67,6 @@ | |||
76 | #define NDIS_DEVICE_WAKE_ON_PATTERN_MATCH_ENABLE 0x00000002 | 67 | #define NDIS_DEVICE_WAKE_ON_PATTERN_MATCH_ENABLE 0x00000002 |
77 | #define NDIS_DEVICE_WAKE_ON_MAGIC_PACKET_ENABLE 0x00000004 | 68 | #define NDIS_DEVICE_WAKE_ON_MAGIC_PACKET_ENABLE 0x00000004 |
78 | 69 | ||
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 */ | 70 | /* IEEE 802.3 (Ethernet) OIDs */ |
144 | #define NDIS_802_3_MAC_OPTION_PRIORITY 0x00000001 | 71 | #define NDIS_802_3_MAC_OPTION_PRIORITY 0x00000001 |
145 | 72 | ||
@@ -158,7 +85,7 @@ | |||
158 | #define OID_802_3_XMIT_TIMES_CRS_LOST 0x01020206 | 85 | #define OID_802_3_XMIT_TIMES_CRS_LOST 0x01020206 |
159 | #define OID_802_3_XMIT_LATE_COLLISIONS 0x01020207 | 86 | #define OID_802_3_XMIT_LATE_COLLISIONS 0x01020207 |
160 | 87 | ||
161 | /* OID_GEN_MINIPORT_INFO constants */ | 88 | /* RNDIS_OID_GEN_MINIPORT_INFO constants */ |
162 | #define NDIS_MINIPORT_BUS_MASTER 0x00000001 | 89 | #define NDIS_MINIPORT_BUS_MASTER 0x00000001 |
163 | #define NDIS_MINIPORT_WDM_DRIVER 0x00000002 | 90 | #define NDIS_MINIPORT_WDM_DRIVER 0x00000002 |
164 | #define NDIS_MINIPORT_SG_LIST 0x00000004 | 91 | #define NDIS_MINIPORT_SG_LIST 0x00000004 |
@@ -339,12 +266,13 @@ | |||
339 | #define RNDIS_STATUS_TOKEN_RING_OPEN_ERROR (0xC0011000L) | 266 | #define RNDIS_STATUS_TOKEN_RING_OPEN_ERROR (0xC0011000L) |
340 | 267 | ||
341 | /* Object Identifiers used by NdisRequest Query/Set Information */ | 268 | /* Object Identifiers used by NdisRequest Query/Set Information */ |
342 | /* General Objects */ | 269 | /* General (Required) Objects */ |
343 | #define RNDIS_OID_GEN_SUPPORTED_LIST 0x00010101 | 270 | #define RNDIS_OID_GEN_SUPPORTED_LIST 0x00010101 |
344 | #define RNDIS_OID_GEN_HARDWARE_STATUS 0x00010102 | 271 | #define RNDIS_OID_GEN_HARDWARE_STATUS 0x00010102 |
345 | #define RNDIS_OID_GEN_MEDIA_SUPPORTED 0x00010103 | 272 | #define RNDIS_OID_GEN_MEDIA_SUPPORTED 0x00010103 |
346 | #define RNDIS_OID_GEN_MEDIA_IN_USE 0x00010104 | 273 | #define RNDIS_OID_GEN_MEDIA_IN_USE 0x00010104 |
347 | #define RNDIS_OID_GEN_MAXIMUM_LOOKAHEAD 0x00010105 | 274 | #define RNDIS_OID_GEN_MAXIMUM_LOOKAHEAD 0x00010105 |
275 | #define RNDIS_OID_GEN_MAXIMUM_FRAME_SIZE 0x00010106 | ||
348 | #define RNDIS_OID_GEN_LINK_SPEED 0x00010107 | 276 | #define RNDIS_OID_GEN_LINK_SPEED 0x00010107 |
349 | #define RNDIS_OID_GEN_TRANSMIT_BUFFER_SPACE 0x00010108 | 277 | #define RNDIS_OID_GEN_TRANSMIT_BUFFER_SPACE 0x00010108 |
350 | #define RNDIS_OID_GEN_RECEIVE_BUFFER_SPACE 0x00010109 | 278 | #define RNDIS_OID_GEN_RECEIVE_BUFFER_SPACE 0x00010109 |
@@ -361,16 +289,25 @@ | |||
361 | #define RNDIS_OID_GEN_MEDIA_CONNECT_STATUS 0x00010114 | 289 | #define RNDIS_OID_GEN_MEDIA_CONNECT_STATUS 0x00010114 |
362 | #define RNDIS_OID_GEN_MAXIMUM_SEND_PACKETS 0x00010115 | 290 | #define RNDIS_OID_GEN_MAXIMUM_SEND_PACKETS 0x00010115 |
363 | #define RNDIS_OID_GEN_VENDOR_DRIVER_VERSION 0x00010116 | 291 | #define RNDIS_OID_GEN_VENDOR_DRIVER_VERSION 0x00010116 |
292 | #define RNDIS_OID_GEN_SUPPORTED_GUIDS 0x00010117 | ||
364 | #define RNDIS_OID_GEN_NETWORK_LAYER_ADDRESSES 0x00010118 | 293 | #define RNDIS_OID_GEN_NETWORK_LAYER_ADDRESSES 0x00010118 |
365 | #define RNDIS_OID_GEN_TRANSPORT_HEADER_OFFSET 0x00010119 | 294 | #define RNDIS_OID_GEN_TRANSPORT_HEADER_OFFSET 0x00010119 |
295 | #define RNDIS_OID_GEN_PHYSICAL_MEDIUM 0x00010202 | ||
366 | #define RNDIS_OID_GEN_MACHINE_NAME 0x0001021A | 296 | #define RNDIS_OID_GEN_MACHINE_NAME 0x0001021A |
297 | #define RNDIS_OID_GEN_RNDIS_CONFIG_PARAMETER 0x0001021B | ||
298 | #define RNDIS_OID_GEN_VLAN_ID 0x0001021C | ||
299 | |||
300 | /* Optional OIDs */ | ||
301 | #define OID_GEN_MEDIA_CAPABILITIES 0x00010201 | ||
367 | 302 | ||
303 | /* Required statistics OIDs */ | ||
368 | #define RNDIS_OID_GEN_XMIT_OK 0x00020101 | 304 | #define RNDIS_OID_GEN_XMIT_OK 0x00020101 |
369 | #define RNDIS_OID_GEN_RCV_OK 0x00020102 | 305 | #define RNDIS_OID_GEN_RCV_OK 0x00020102 |
370 | #define RNDIS_OID_GEN_XMIT_ERROR 0x00020103 | 306 | #define RNDIS_OID_GEN_XMIT_ERROR 0x00020103 |
371 | #define RNDIS_OID_GEN_RCV_ERROR 0x00020104 | 307 | #define RNDIS_OID_GEN_RCV_ERROR 0x00020104 |
372 | #define RNDIS_OID_GEN_RCV_NO_BUFFER 0x00020105 | 308 | #define RNDIS_OID_GEN_RCV_NO_BUFFER 0x00020105 |
373 | 309 | ||
310 | /* Optional statistics OIDs */ | ||
374 | #define RNDIS_OID_GEN_DIRECTED_BYTES_XMIT 0x00020201 | 311 | #define RNDIS_OID_GEN_DIRECTED_BYTES_XMIT 0x00020201 |
375 | #define RNDIS_OID_GEN_DIRECTED_FRAMES_XMIT 0x00020202 | 312 | #define RNDIS_OID_GEN_DIRECTED_FRAMES_XMIT 0x00020202 |
376 | #define RNDIS_OID_GEN_MULTICAST_BYTES_XMIT 0x00020203 | 313 | #define RNDIS_OID_GEN_MULTICAST_BYTES_XMIT 0x00020203 |
@@ -390,6 +327,15 @@ | |||
390 | #define RNDIS_OID_GEN_GET_TIME_CAPS 0x0002020F | 327 | #define RNDIS_OID_GEN_GET_TIME_CAPS 0x0002020F |
391 | #define RNDIS_OID_GEN_GET_NETCARD_TIME 0x00020210 | 328 | #define RNDIS_OID_GEN_GET_NETCARD_TIME 0x00020210 |
392 | 329 | ||
330 | #define RNDIS_OID_GEN_NETCARD_LOAD 0x00020211 | ||
331 | #define RNDIS_OID_GEN_DEVICE_PROFILE 0x00020212 | ||
332 | #define RNDIS_OID_GEN_INIT_TIME_MS 0x00020213 | ||
333 | #define RNDIS_OID_GEN_RESET_COUNTS 0x00020214 | ||
334 | #define RNDIS_OID_GEN_MEDIA_SENSE_COUNTS 0x00020215 | ||
335 | #define RNDIS_OID_GEN_FRIENDLY_NAME 0x00020216 | ||
336 | #define RNDIS_OID_GEN_MINIPORT_INFO 0x00020217 | ||
337 | #define RNDIS_OID_GEN_RESET_VERIFY_PARAMETERS 0x00020218 | ||
338 | |||
393 | /* These are connection-oriented general OIDs. */ | 339 | /* These are connection-oriented general OIDs. */ |
394 | /* These replace the above OIDs for connection-oriented media. */ | 340 | /* These replace the above OIDs for connection-oriented media. */ |
395 | #define RNDIS_OID_GEN_CO_SUPPORTED_LIST 0x00010101 | 341 | #define RNDIS_OID_GEN_CO_SUPPORTED_LIST 0x00010101 |
@@ -496,14 +442,6 @@ | |||
496 | /* From drivers/net/wireless/rndis_wlan.c */ | 442 | /* From drivers/net/wireless/rndis_wlan.c */ |
497 | 443 | ||
498 | /* various RNDIS OID defs */ | 444 | /* various RNDIS OID defs */ |
499 | #define OID_GEN_LINK_SPEED 0x00010107 | ||
500 | |||
501 | #define OID_GEN_XMIT_OK 0x00020101 | ||
502 | #define OID_GEN_RCV_OK 0x00020102 | ||
503 | #define OID_GEN_XMIT_ERROR 0x00020103 | ||
504 | #define OID_GEN_RCV_ERROR 0x00020104 | ||
505 | #define OID_GEN_RCV_NO_BUFFER 0x00020105 | ||
506 | |||
507 | #define OID_802_3_CURRENT_ADDRESS 0x01010102 | 445 | #define OID_802_3_CURRENT_ADDRESS 0x01010102 |
508 | #define OID_802_3_MULTICAST_LIST 0x01010103 | 446 | #define OID_802_3_MULTICAST_LIST 0x01010103 |
509 | #define OID_802_3_MAXIMUM_LIST_SIZE 0x01010104 | 447 | #define OID_802_3_MAXIMUM_LIST_SIZE 0x01010104 |