This partially reverts one of the changes in an earlier patch,
starting to document where Microsoft's spec is lying.  Needed
to interop with Windows ME.

- Dave

The Windows ME implementation of RNDIS relies on a message that
Microsoft's specification says isn't used.  Restore this (removed
in earlier cleanup), and start collecting comments specifically
on where MSFT violates its own specifications.

Signed-off-by:  David Brownell <[EMAIL PROTECTED]>


--- 1.10/drivers/usb/gadget/rndis.c     Mon Jun  7 12:51:48 2004
+++ edited/drivers/usb/gadget/rndis.c   Mon Jun  7 14:04:50 2004
@@ -261,6 +261,19 @@
                retval = 0;
                break;
 
+       /* The RNDIS specification is incomplete/wrong.   Some versions
+        * of MS-Windows expect OIDs that aren't specified there.  Other
+        * versions emit undefined RNDIS messages. DOCUMENT ALL THESE!
+        */
+       case OID_GEN_MAC_OPTIONS:               /* from WinME */
+               DEBUG("%s: OID_GEN_MAC_OPTIONS\n", __FUNCTION__);
+               length = 4;
+               *((u32 *) resp + 6) = __constant_cpu_to_le32(
+                         NDIS_MAC_OPTION_RECEIVE_SERIALIZED
+                       | NDIS_MAC_OPTION_FULL_DUPLEX);
+               retval = 0;
+               break;
+
        /* statistics OIDs (table 4-2) */
 
        /* mandatory */
@@ -1078,6 +1091,10 @@
                                                 buf);
                
        default: 
+               /* At least Windows XP emits some undefined RNDIS messages.
+                * In one case those messages seemed to relate to the host
+                * suspending itself.
+                */
                printk (KERN_WARNING
                        "%s: unknown RNDIS message 0x%08X len %d\n", 
                        __FUNCTION__ , MsgType, MsgLength);

Reply via email to