aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rndis.h
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-05-11 18:16:39 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-12 15:08:06 -0400
commit17c51b6ccc7d470a8801135e0af7f97915f46e32 (patch)
tree5e927f50f9469a3acce703dff0f5ea918163c8e2 /include/linux/rndis.h
parent91d6aef7d12fc1ba860e0d1c9a445cfcf15655bd (diff)
usb/net: rndis: merge media type definitions
Let's have a unified table of RNDIS media. We used to have a similar table with NDIS_* prefix from the gadget driver, but since we're only using RNDIS in the kernel (IIRC NDIS, non-remote, is for the windows- internal network drivers so what do we care) let's prefix everything with RNDIS. Some of the definitions were conflicting, in one of the defines 0x0B is bearer "CO WAN" and in two others "BPC". Well I took the majority vote. Two definition of medium 0x09 calls it "wireless WAN" but one vote for "wireless LAN" but in this case I am sticking with the minority, "Wide Area Network" does not make much sense in this case as far as I can tell. NOTE: latin singular and plural is so screwed up in these defines that it makes my eyes bleed. But I will not attempt to submit a patch converting all use of _MEDIA_ to _MEDIUM_ while I can probably tell from the semantics of the code that RNDIS_MEDIA_STATE_CONNECTED is most probably (erroneously) referring to a singular, unless it can return an array of connected media. I suspect these erroneous plurals are used in documentation and such so I don't want to mess around with things for no functional change. 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.h60
1 files changed, 22 insertions, 38 deletions
diff --git a/include/linux/rndis.h b/include/linux/rndis.h
index 2e0b1bd108c9..485795930013 100644
--- a/include/linux/rndis.h
+++ b/include/linux/rndis.h
@@ -112,6 +112,28 @@
112#define RNDIS_PHYSICAL_MEDIUM_WIRELESS_WAN 0x00000008 112#define RNDIS_PHYSICAL_MEDIUM_WIRELESS_WAN 0x00000008
113#define RNDIS_PHYSICAL_MEDIUM_MAX 0x00000009 113#define RNDIS_PHYSICAL_MEDIUM_MAX 0x00000009
114 114
115/* Remote NDIS medium types. */
116#define RNDIS_MEDIUM_UNSPECIFIED 0x00000000
117#define RNDIS_MEDIUM_802_3 0x00000000
118#define RNDIS_MEDIUM_802_5 0x00000001
119#define RNDIS_MEDIUM_FDDI 0x00000002
120#define RNDIS_MEDIUM_WAN 0x00000003
121#define RNDIS_MEDIUM_LOCAL_TALK 0x00000004
122#define RNDIS_MEDIUM_ARCNET_RAW 0x00000006
123#define RNDIS_MEDIUM_ARCNET_878_2 0x00000007
124#define RNDIS_MEDIUM_ATM 0x00000008
125#define RNDIS_MEDIUM_WIRELESS_LAN 0x00000009
126#define RNDIS_MEDIUM_IRDA 0x0000000A
127#define RNDIS_MEDIUM_BPC 0x0000000B
128#define RNDIS_MEDIUM_CO_WAN 0x0000000C
129#define RNDIS_MEDIUM_1394 0x0000000D
130/* Not a real medium, defined as an upper-bound */
131#define RNDIS_MEDIUM_MAX 0x0000000E
132
133/* Remote NDIS medium connection states. */
134#define RNDIS_MEDIA_STATE_CONNECTED 0x00000000
135#define RNDIS_MEDIA_STATE_DISCONNECTED 0x00000001
136
115/* packet filter bits used by RNDIS_OID_GEN_CURRENT_PACKET_FILTER */ 137/* packet filter bits used by RNDIS_OID_GEN_CURRENT_PACKET_FILTER */
116#define RNDIS_PACKET_TYPE_DIRECTED 0x00000001 138#define RNDIS_PACKET_TYPE_DIRECTED 0x00000001
117#define RNDIS_PACKET_TYPE_MULTICAST 0x00000002 139#define RNDIS_PACKET_TYPE_MULTICAST 0x00000002
@@ -163,21 +185,6 @@
163#define NDIS_MINIPORT_SUPPORTS_CANCEL_SEND_PACKETS 0x00800000 185#define NDIS_MINIPORT_SUPPORTS_CANCEL_SEND_PACKETS 0x00800000
164#define NDIS_MINIPORT_64BITS_DMA 0x01000000 186#define NDIS_MINIPORT_64BITS_DMA 0x01000000
165 187
166#define NDIS_MEDIUM_802_3 0x00000000
167#define NDIS_MEDIUM_802_5 0x00000001
168#define NDIS_MEDIUM_FDDI 0x00000002
169#define NDIS_MEDIUM_WAN 0x00000003
170#define NDIS_MEDIUM_LOCAL_TALK 0x00000004
171#define NDIS_MEDIUM_DIX 0x00000005
172#define NDIS_MEDIUM_ARCENT_RAW 0x00000006
173#define NDIS_MEDIUM_ARCENT_878_2 0x00000007
174#define NDIS_MEDIUM_ATM 0x00000008
175#define NDIS_MEDIUM_WIRELESS_LAN 0x00000009
176#define NDIS_MEDIUM_IRDA 0x0000000A
177#define NDIS_MEDIUM_BPC 0x0000000B
178#define NDIS_MEDIUM_CO_WAN 0x0000000C
179#define NDIS_MEDIUM_1394 0x0000000D
180
181#define NDIS_PACKET_TYPE_DIRECTED 0x00000001 188#define NDIS_PACKET_TYPE_DIRECTED 0x00000001
182#define NDIS_PACKET_TYPE_MULTICAST 0x00000002 189#define NDIS_PACKET_TYPE_MULTICAST 0x00000002
183#define NDIS_PACKET_TYPE_ALL_MULTICAST 0x00000004 190#define NDIS_PACKET_TYPE_ALL_MULTICAST 0x00000004
@@ -191,9 +198,6 @@
191#define NDIS_PACKET_TYPE_FUNCTIONAL 0x00000400 198#define NDIS_PACKET_TYPE_FUNCTIONAL 0x00000400
192#define NDIS_PACKET_TYPE_MAC_FRAME 0x00000800 199#define NDIS_PACKET_TYPE_MAC_FRAME 0x00000800
193 200
194#define NDIS_MEDIA_STATE_CONNECTED 0x00000000
195#define NDIS_MEDIA_STATE_DISCONNECTED 0x00000001
196
197#define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA 0x00000001 201#define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA 0x00000001
198#define NDIS_MAC_OPTION_RECEIVE_SERIALIZED 0x00000002 202#define NDIS_MAC_OPTION_RECEIVE_SERIALIZED 0x00000002
199#define NDIS_MAC_OPTION_TRANSFERS_NOT_PEND 0x00000004 203#define NDIS_MAC_OPTION_TRANSFERS_NOT_PEND 0x00000004
@@ -421,23 +425,3 @@
421 * driver and remote device, if necessary. 425 * driver and remote device, if necessary.
422 */ 426 */
423#define REMOTE_NDIS_BUS_MSG 0xff000001 427#define REMOTE_NDIS_BUS_MSG 0xff000001
424
425/* Remote NDIS medium types. */
426#define RNDIS_MEDIUM_802_3 0x00000000
427#define RNDIS_MEDIUM_802_5 0x00000001
428#define RNDIS_MEDIUM_FDDI 0x00000002
429#define RNDIS_MEDIUM_WAN 0x00000003
430#define RNDIS_MEDIUM_LOCAL_TALK 0x00000004
431#define RNDIS_MEDIUM_ARCNET_RAW 0x00000006
432#define RNDIS_MEDIUM_ARCNET_878_2 0x00000007
433#define RNDIS_MEDIUM_ATM 0x00000008
434#define RNDIS_MEDIUM_WIRELESS_WAN 0x00000009
435#define RNDIS_MEDIUM_IRDA 0x0000000a
436#define RNDIS_MEDIUM_CO_WAN 0x0000000b
437/* Not a real medium, defined as an upper-bound */
438#define RNDIS_MEDIUM_MAX 0x0000000d
439
440
441/* Remote NDIS medium connection states. */
442#define RNDIS_MEDIA_STATE_CONNECTED 0x00000000
443#define RNDIS_MEDIA_STATE_DISCONNECTED 0x00000001