Fixed RNDISEthernet not working under Linux due to Linux requiring an "optional"...
authorDean Camera <dean@fourwalledcubicle.com>
Mon, 11 May 2009 08:58:53 +0000 (08:58 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Mon, 11 May 2009 08:58:53 +0000 (08:58 +0000)
Demos/Device/RNDISEthernet/RNDIS.c
Demos/Device/RNDISEthernet/RNDISConstants.h
LUFA/ChangeLog.txt

index ee0c8c3..c5202bc 100644 (file)
@@ -50,6 +50,7 @@ static char           PROGMEM AdapterVendorDescription[] = "LUFA RNDIS Adapter";
 static const uint32_t PROGMEM AdapterSupportedOIDList[]  =\r
                                                        {\r
                                                                OID_GEN_SUPPORTED_LIST,\r
+                                                               OID_GEN_PHYSICAL_MEDIUM,\r
                                                                OID_GEN_HARDWARE_STATUS,\r
                                                                OID_GEN_MEDIA_SUPPORTED,\r
                                                                OID_GEN_MEDIA_IN_USE,\r
@@ -253,6 +254,13 @@ static bool ProcessNDISQuery(uint32_t OId, void* QueryData, uint16_t QuerySize,
                        memcpy_P(ResponseData, AdapterSupportedOIDList, sizeof(AdapterSupportedOIDList));\r
                        \r
                        return true;\r
+               case OID_GEN_PHYSICAL_MEDIUM:\r
+                       *ResponseSize = sizeof(uint32_t);\r
+                       \r
+                       /* Indicate that the device is a true ethernet link */\r
+                       *((uint32_t*)ResponseData) = 0;\r
+                       \r
+                       return true;\r
                case OID_GEN_HARDWARE_STATUS:\r
                        *ResponseSize = sizeof(uint32_t);\r
                        \r
index 91a7e89..3296666 100644 (file)
@@ -82,6 +82,7 @@
                #define OID_GEN_CURRENT_PACKET_FILTER         0x0001010EUL\r
                #define OID_GEN_MAXIMUM_TOTAL_SIZE            0x00010111UL\r
                #define OID_GEN_MEDIA_CONNECT_STATUS          0x00010114UL\r
+               #define OID_GEN_PHYSICAL_MEDIUM               0x00010202UL\r
                #define OID_GEN_XMIT_OK                       0x00020101UL\r
                #define OID_GEN_RCV_OK                        0x00020102UL\r
                #define OID_GEN_XMIT_ERROR                    0x00020103UL\r
index c71b088..cc19808 100644 (file)
@@ -10,6 +10,8 @@
   *\r
   *  - Fixed bug in RNDISEthernet and DualCDC demos not using the correct USB_ControlRequest structure for control request data\r
   *  - Fixed documentation showing incorrect USB mode support on the supported AVRs list\r
+  *  - Fixed RNDISEthernet not working under Linux due to Linux requiring an "optional" request which was unhandled\r
+  *\r
   *\r
   *  \section Sec_ChangeLog090510 Version 090510\r
   *\r