aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-05-11 18:17:19 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-12 15:13:39 -0400
commite20289ed3f83e3b065f53d36dc1805937ce55d84 (patch)
treee44f6235c4a22a6b608376b1993760fb0399931c
parent514911678fdcb35f7f69ebf96daf0e22cdae95ae (diff)
usb/net: rndis: fixup a few name prefixes
This switches a horde of NDIS_*-prefixed variables to the RNDIS_* prefix. Most of them aren't used much and causes no changes. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/usb/gadget/rndis.c4
-rw-r--r--include/linux/rndis.h107
2 files changed, 54 insertions, 57 deletions
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c
index d747e8912627..b35babed6fcb 100644
--- a/drivers/usb/gadget/rndis.c
+++ b/drivers/usb/gadget/rndis.c
@@ -346,8 +346,8 @@ static int gen_ndis_query_resp(int configNr, u32 OID, u8 *buf,
346 case RNDIS_OID_GEN_MAC_OPTIONS: /* from WinME */ 346 case RNDIS_OID_GEN_MAC_OPTIONS: /* from WinME */
347 pr_debug("%s: RNDIS_OID_GEN_MAC_OPTIONS\n", __func__); 347 pr_debug("%s: RNDIS_OID_GEN_MAC_OPTIONS\n", __func__);
348 *outbuf = cpu_to_le32( 348 *outbuf = cpu_to_le32(
349 NDIS_MAC_OPTION_RECEIVE_SERIALIZED 349 RNDIS_MAC_OPTION_RECEIVE_SERIALIZED
350 | NDIS_MAC_OPTION_FULL_DUPLEX); 350 | RNDIS_MAC_OPTION_FULL_DUPLEX);
351 retval = 0; 351 retval = 0;
352 break; 352 break;
353 353
diff --git a/include/linux/rndis.h b/include/linux/rndis.h
index 18a27a448f92..3f2ba8fa2f2e 100644
--- a/include/linux/rndis.h
+++ b/include/linux/rndis.h
@@ -3,12 +3,21 @@
3 * definitions of the magic numbers used by this protocol 3 * definitions of the magic numbers used by this protocol
4 */ 4 */
5 5
6#define RNDIS_MSG_COMPLETION 0x80000000 6/* Remote NDIS Versions */
7#define RNDIS_MAJOR_VERSION 0x00000001
8#define RNDIS_MINOR_VERSION 0x00000000
9
10/* Device Flags */
11#define RNDIS_DF_CONNECTIONLESS 0x00000001U
12#define RNDIS_DF_CONNECTION_ORIENTED 0x00000002U
13#define RNDIS_DF_RAW_DATA 0x00000004U
7 14
8/* codes for "msg_type" field of rndis messages; 15/*
16 * Codes for "msg_type" field of rndis messages;
9 * only the data channel uses packet messages (maybe batched); 17 * only the data channel uses packet messages (maybe batched);
10 * everything else goes on the control channel. 18 * everything else goes on the control channel.
11 */ 19 */
20#define RNDIS_MSG_COMPLETION 0x80000000
12#define RNDIS_MSG_PACKET 0x00000001 /* 1-N packets */ 21#define RNDIS_MSG_PACKET 0x00000001 /* 1-N packets */
13#define RNDIS_MSG_INIT 0x00000002 22#define RNDIS_MSG_INIT 0x00000002
14#define RNDIS_MSG_INIT_C (RNDIS_MSG_INIT|RNDIS_MSG_COMPLETION) 23#define RNDIS_MSG_INIT_C (RNDIS_MSG_INIT|RNDIS_MSG_COMPLETION)
@@ -151,58 +160,41 @@
151#define RNDIS_PACKET_TYPE_FUNCTIONAL 0x00004000 160#define RNDIS_PACKET_TYPE_FUNCTIONAL 0x00004000
152#define RNDIS_PACKET_TYPE_MAC_FRAME 0x00008000 161#define RNDIS_PACKET_TYPE_MAC_FRAME 0x00008000
153 162
154/* NDIS_PNP_CAPABILITIES.Flags constants */
155#define NDIS_DEVICE_WAKE_UP_ENABLE 0x00000001
156#define NDIS_DEVICE_WAKE_ON_PATTERN_MATCH_ENABLE 0x00000002
157#define NDIS_DEVICE_WAKE_ON_MAGIC_PACKET_ENABLE 0x00000004
158
159/* IEEE 802.3 (Ethernet) OIDs */
160#define NDIS_802_3_MAC_OPTION_PRIORITY 0x00000001
161
162/* RNDIS_OID_GEN_MINIPORT_INFO constants */ 163/* RNDIS_OID_GEN_MINIPORT_INFO constants */
163#define NDIS_MINIPORT_BUS_MASTER 0x00000001 164#define RNDIS_MINIPORT_BUS_MASTER 0x00000001
164#define NDIS_MINIPORT_WDM_DRIVER 0x00000002 165#define RNDIS_MINIPORT_WDM_DRIVER 0x00000002
165#define NDIS_MINIPORT_SG_LIST 0x00000004 166#define RNDIS_MINIPORT_SG_LIST 0x00000004
166#define NDIS_MINIPORT_SUPPORTS_MEDIA_QUERY 0x00000008 167#define RNDIS_MINIPORT_SUPPORTS_MEDIA_QUERY 0x00000008
167#define NDIS_MINIPORT_INDICATES_PACKETS 0x00000010 168#define RNDIS_MINIPORT_INDICATES_PACKETS 0x00000010
168#define NDIS_MINIPORT_IGNORE_PACKET_QUEUE 0x00000020 169#define RNDIS_MINIPORT_IGNORE_PACKET_QUEUE 0x00000020
169#define NDIS_MINIPORT_IGNORE_REQUEST_QUEUE 0x00000040 170#define RNDIS_MINIPORT_IGNORE_REQUEST_QUEUE 0x00000040
170#define NDIS_MINIPORT_IGNORE_TOKEN_RING_ERRORS 0x00000080 171#define RNDIS_MINIPORT_IGNORE_TOKEN_RING_ERRORS 0x00000080
171#define NDIS_MINIPORT_INTERMEDIATE_DRIVER 0x00000100 172#define RNDIS_MINIPORT_INTERMEDIATE_DRIVER 0x00000100
172#define NDIS_MINIPORT_IS_NDIS_5 0x00000200 173#define RNDIS_MINIPORT_IS_NDIS_5 0x00000200
173#define NDIS_MINIPORT_IS_CO 0x00000400 174#define RNDIS_MINIPORT_IS_CO 0x00000400
174#define NDIS_MINIPORT_DESERIALIZE 0x00000800 175#define RNDIS_MINIPORT_DESERIALIZE 0x00000800
175#define NDIS_MINIPORT_REQUIRES_MEDIA_POLLING 0x00001000 176#define RNDIS_MINIPORT_REQUIRES_MEDIA_POLLING 0x00001000
176#define NDIS_MINIPORT_SUPPORTS_MEDIA_SENSE 0x00002000 177#define RNDIS_MINIPORT_SUPPORTS_MEDIA_SENSE 0x00002000
177#define NDIS_MINIPORT_NETBOOT_CARD 0x00004000 178#define RNDIS_MINIPORT_NETBOOT_CARD 0x00004000
178#define NDIS_MINIPORT_PM_SUPPORTED 0x00008000 179#define RNDIS_MINIPORT_PM_SUPPORTED 0x00008000
179#define NDIS_MINIPORT_SUPPORTS_MAC_ADDRESS_OVERWRITE 0x00010000 180#define RNDIS_MINIPORT_SUPPORTS_MAC_ADDRESS_OVERWRITE 0x00010000
180#define NDIS_MINIPORT_USES_SAFE_BUFFER_APIS 0x00020000 181#define RNDIS_MINIPORT_USES_SAFE_BUFFER_APIS 0x00020000
181#define NDIS_MINIPORT_HIDDEN 0x00040000 182#define RNDIS_MINIPORT_HIDDEN 0x00040000
182#define NDIS_MINIPORT_SWENUM 0x00080000 183#define RNDIS_MINIPORT_SWENUM 0x00080000
183#define NDIS_MINIPORT_SURPRISE_REMOVE_OK 0x00100000 184#define RNDIS_MINIPORT_SURPRISE_REMOVE_OK 0x00100000
184#define NDIS_MINIPORT_NO_HALT_ON_SUSPEND 0x00200000 185#define RNDIS_MINIPORT_NO_HALT_ON_SUSPEND 0x00200000
185#define NDIS_MINIPORT_HARDWARE_DEVICE 0x00400000 186#define RNDIS_MINIPORT_HARDWARE_DEVICE 0x00400000
186#define NDIS_MINIPORT_SUPPORTS_CANCEL_SEND_PACKETS 0x00800000 187#define RNDIS_MINIPORT_SUPPORTS_CANCEL_SEND_PACKETS 0x00800000
187#define NDIS_MINIPORT_64BITS_DMA 0x01000000 188#define RNDIS_MINIPORT_64BITS_DMA 0x01000000
188 189
189#define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA 0x00000001 190#define RNDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA 0x00000001
190#define NDIS_MAC_OPTION_RECEIVE_SERIALIZED 0x00000002 191#define RNDIS_MAC_OPTION_RECEIVE_SERIALIZED 0x00000002
191#define NDIS_MAC_OPTION_TRANSFERS_NOT_PEND 0x00000004 192#define RNDIS_MAC_OPTION_TRANSFERS_NOT_PEND 0x00000004
192#define NDIS_MAC_OPTION_NO_LOOPBACK 0x00000008 193#define RNDIS_MAC_OPTION_NO_LOOPBACK 0x00000008
193#define NDIS_MAC_OPTION_FULL_DUPLEX 0x00000010 194#define RNDIS_MAC_OPTION_FULL_DUPLEX 0x00000010
194#define NDIS_MAC_OPTION_EOTX_INDICATION 0x00000020 195#define RNDIS_MAC_OPTION_EOTX_INDICATION 0x00000020
195#define NDIS_MAC_OPTION_8021P_PRIORITY 0x00000040 196#define RNDIS_MAC_OPTION_8021P_PRIORITY 0x00000040
196#define NDIS_MAC_OPTION_RESERVED 0x80000000 197#define RNDIS_MAC_OPTION_RESERVED 0x80000000
197
198/* Remote NDIS Versions */
199#define RNDIS_MAJOR_VERSION 0x00000001
200#define RNDIS_MINOR_VERSION 0x00000000
201
202/* Device Flags */
203#define RNDIS_DF_CONNECTIONLESS 0x00000001U
204#define RNDIS_DF_CONNECTION_ORIENTED 0x00000002U
205#define RNDIS_DF_RAW_DATA 0x00000004U
206 198
207/* Object Identifiers used by NdisRequest Query/Set Information */ 199/* Object Identifiers used by NdisRequest Query/Set Information */
208/* General (Required) Objects */ 200/* General (Required) Objects */
@@ -237,7 +229,7 @@
237#define RNDIS_OID_GEN_VLAN_ID 0x0001021C 229#define RNDIS_OID_GEN_VLAN_ID 0x0001021C
238 230
239/* Optional OIDs */ 231/* Optional OIDs */
240#define OID_GEN_MEDIA_CAPABILITIES 0x00010201 232#define RNDIS_OID_GEN_MEDIA_CAPABILITIES 0x00010201
241 233
242/* Required statistics OIDs */ 234/* Required statistics OIDs */
243#define RNDIS_OID_GEN_XMIT_OK 0x00020101 235#define RNDIS_OID_GEN_XMIT_OK 0x00020101
@@ -327,7 +319,7 @@
327#define RNDIS_OID_802_3_MAXIMUM_LIST_SIZE 0x01010104 319#define RNDIS_OID_802_3_MAXIMUM_LIST_SIZE 0x01010104
328#define RNDIS_OID_802_3_MAC_OPTIONS 0x01010105 320#define RNDIS_OID_802_3_MAC_OPTIONS 0x01010105
329 321
330#define NDIS_802_3_MAC_OPTION_PRIORITY 0x00000001 322#define RNDIS_802_3_MAC_OPTION_PRIORITY 0x00000001
331 323
332#define RNDIS_OID_802_3_RCV_ERROR_ALIGNMENT 0x01020101 324#define RNDIS_OID_802_3_RCV_ERROR_ALIGNMENT 0x01020101
333#define RNDIS_OID_802_3_XMIT_ONE_COLLISION 0x01020102 325#define RNDIS_OID_802_3_XMIT_ONE_COLLISION 0x01020102
@@ -376,6 +368,11 @@
376#define RNDIS_OID_PNP_REMOVE_WAKE_UP_PATTERN 0xFD010104 368#define RNDIS_OID_PNP_REMOVE_WAKE_UP_PATTERN 0xFD010104
377#define RNDIS_OID_PNP_ENABLE_WAKE_UP 0xFD010106 369#define RNDIS_OID_PNP_ENABLE_WAKE_UP 0xFD010106
378 370
371/* RNDIS_PNP_CAPABILITIES.Flags constants */
372#define RNDIS_DEVICE_WAKE_UP_ENABLE 0x00000001
373#define RNDIS_DEVICE_WAKE_ON_PATTERN_MATCH_ENABLE 0x00000002
374#define RNDIS_DEVICE_WAKE_ON_MAGIC_PACKET_ENABLE 0x00000004
375
379#define REMOTE_CONDIS_MP_CREATE_VC_MSG 0x00008001 376#define REMOTE_CONDIS_MP_CREATE_VC_MSG 0x00008001
380#define REMOTE_CONDIS_MP_DELETE_VC_MSG 0x00008002 377#define REMOTE_CONDIS_MP_DELETE_VC_MSG 0x00008002
381#define REMOTE_CONDIS_MP_ACTIVATE_VC_MSG 0x00008005 378#define REMOTE_CONDIS_MP_ACTIVATE_VC_MSG 0x00008005