ChangeSet 1.1722.97.50, 2004/06/07 17:01:22-07:00, david-b@pacbell.net [PATCH] USB: rndis (4/4) start documenting spec variances 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. 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 Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/rndis.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+) diff -Nru a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c --- a/drivers/usb/gadget/rndis.c Fri Jun 18 10:59:31 2004 +++ b/drivers/usb/gadget/rndis.c Fri Jun 18 10:59:31 2004 @@ -252,6 +252,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 */ @@ -1044,6 +1057,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);