Fixed RNDISEthernet not working under Linux due to Linux requiring an "optional" request which was unhandled.

This commit is contained in:
Dean Camera 2009-05-11 08:58:53 +00:00
parent e0985b9950
commit ea74397095
3 changed files with 11 additions and 0 deletions

View file

@ -50,6 +50,7 @@ static char PROGMEM AdapterVendorDescription[] = "LUFA RNDIS Adapter";
static const uint32_t PROGMEM AdapterSupportedOIDList[] =
{
OID_GEN_SUPPORTED_LIST,
OID_GEN_PHYSICAL_MEDIUM,
OID_GEN_HARDWARE_STATUS,
OID_GEN_MEDIA_SUPPORTED,
OID_GEN_MEDIA_IN_USE,
@ -252,6 +253,13 @@ static bool ProcessNDISQuery(uint32_t OId, void* QueryData, uint16_t QuerySize,
/* Copy the list of supported NDIS OID tokens to the response buffer */
memcpy_P(ResponseData, AdapterSupportedOIDList, sizeof(AdapterSupportedOIDList));
return true;
case OID_GEN_PHYSICAL_MEDIUM:
*ResponseSize = sizeof(uint32_t);
/* Indicate that the device is a true ethernet link */
*((uint32_t*)ResponseData) = 0;
return true;
case OID_GEN_HARDWARE_STATUS:
*ResponseSize = sizeof(uint32_t);