aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2006-04-02 14:19:08 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-04-14 14:12:24 -0400
commit51400f1d6ef7ca871b584117527f7c6b12bf182b (patch)
tree457e02d46cbf31227a6947c678a171066439b19c /drivers/usb
parent68dcc688d1f042842a8fb523e4a584b3211181d1 (diff)
[PATCH] USB: rndis_host whitespace/comment updates
This adds a "avoid proprietary protocols" warnoff, identifying several of the known deficiencies in Microsoft's excuse-for-specification, and fixes some whitespace bugs. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/net/rndis_host.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/drivers/usb/net/rndis_host.c b/drivers/usb/net/rndis_host.c
index 49991ac1bf3b..94ddfe16fdda 100644
--- a/drivers/usb/net/rndis_host.c
+++ b/drivers/usb/net/rndis_host.c
@@ -39,6 +39,20 @@
39 * RNDIS is NDIS remoted over USB. It's a MSFT variant of CDC ACM ... of 39 * RNDIS is NDIS remoted over USB. It's a MSFT variant of CDC ACM ... of
40 * course ACM was intended for modems, not Ethernet links! USB's standard 40 * course ACM was intended for modems, not Ethernet links! USB's standard
41 * for Ethernet links is "CDC Ethernet", which is significantly simpler. 41 * for Ethernet links is "CDC Ethernet", which is significantly simpler.
42 *
43 * NOTE that Microsoft's "RNDIS 1.0" specification is incomplete. Issues
44 * include:
45 * - Power management in particular relies on information that's scattered
46 * through other documentation, and which is incomplete or incorrect even
47 * there.
48 * - There are various undocumented protocol requirements, such as the
49 * need to send unused garbage in control-OUT messages.
50 * - In some cases, MS-Windows will emit undocumented requests; this
51 * matters more to peripheral implementations than host ones.
52 *
53 * For these reasons and others, ** USE OF RNDIS IS STRONGLY DISCOURAGED ** in
54 * favor of such non-proprietary alternatives as CDC Ethernet or the newer (and
55 * currently rare) "Ethernet Emulation Model" (EEM).
42 */ 56 */
43 57
44/* 58/*
@@ -72,17 +86,17 @@ struct rndis_msg_hdr {
72 */ 86 */
73#define RNDIS_MSG_PACKET ccpu2(0x00000001) /* 1-N packets */ 87#define RNDIS_MSG_PACKET ccpu2(0x00000001) /* 1-N packets */
74#define RNDIS_MSG_INIT ccpu2(0x00000002) 88#define RNDIS_MSG_INIT ccpu2(0x00000002)
75#define RNDIS_MSG_INIT_C (RNDIS_MSG_INIT|RNDIS_MSG_COMPLETION) 89#define RNDIS_MSG_INIT_C (RNDIS_MSG_INIT|RNDIS_MSG_COMPLETION)
76#define RNDIS_MSG_HALT ccpu2(0x00000003) 90#define RNDIS_MSG_HALT ccpu2(0x00000003)
77#define RNDIS_MSG_QUERY ccpu2(0x00000004) 91#define RNDIS_MSG_QUERY ccpu2(0x00000004)
78#define RNDIS_MSG_QUERY_C (RNDIS_MSG_QUERY|RNDIS_MSG_COMPLETION) 92#define RNDIS_MSG_QUERY_C (RNDIS_MSG_QUERY|RNDIS_MSG_COMPLETION)
79#define RNDIS_MSG_SET ccpu2(0x00000005) 93#define RNDIS_MSG_SET ccpu2(0x00000005)
80#define RNDIS_MSG_SET_C (RNDIS_MSG_SET|RNDIS_MSG_COMPLETION) 94#define RNDIS_MSG_SET_C (RNDIS_MSG_SET|RNDIS_MSG_COMPLETION)
81#define RNDIS_MSG_RESET ccpu2(0x00000006) 95#define RNDIS_MSG_RESET ccpu2(0x00000006)
82#define RNDIS_MSG_RESET_C (RNDIS_MSG_RESET|RNDIS_MSG_COMPLETION) 96#define RNDIS_MSG_RESET_C (RNDIS_MSG_RESET|RNDIS_MSG_COMPLETION)
83#define RNDIS_MSG_INDICATE ccpu2(0x00000007) 97#define RNDIS_MSG_INDICATE ccpu2(0x00000007)
84#define RNDIS_MSG_KEEPALIVE ccpu2(0x00000008) 98#define RNDIS_MSG_KEEPALIVE ccpu2(0x00000008)
85#define RNDIS_MSG_KEEPALIVE_C (RNDIS_MSG_KEEPALIVE|RNDIS_MSG_COMPLETION) 99#define RNDIS_MSG_KEEPALIVE_C (RNDIS_MSG_KEEPALIVE|RNDIS_MSG_COMPLETION)
86 100
87/* codes for "status" field of completion messages */ 101/* codes for "status" field of completion messages */
88#define RNDIS_STATUS_SUCCESS ccpu2(0x00000000) 102#define RNDIS_STATUS_SUCCESS ccpu2(0x00000000)
@@ -596,13 +610,13 @@ static struct usb_driver rndis_driver = {
596 610
597static int __init rndis_init(void) 611static int __init rndis_init(void)
598{ 612{
599 return usb_register(&rndis_driver); 613 return usb_register(&rndis_driver);
600} 614}
601module_init(rndis_init); 615module_init(rndis_init);
602 616
603static void __exit rndis_exit(void) 617static void __exit rndis_exit(void)
604{ 618{
605 usb_deregister(&rndis_driver); 619 usb_deregister(&rndis_driver);
606} 620}
607module_exit(rndis_exit); 621module_exit(rndis_exit);
608 622