Don't validate the Device Descriptor's vendor ID when validating that a device is...
authorDean Camera <dean@fourwalledcubicle.com>
Wed, 14 Dec 2011 02:52:42 +0000 (02:52 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Wed, 14 Dec 2011 02:52:42 +0000 (02:52 +0000)
Demos/Host/LowLevel/AndroidAccessoryHost/DeviceDescriptor.c
LUFA/Drivers/USB/Class/Common/AndroidAccessoryClassCommon.h
LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c

index be6bf10..4e174f0 100644 (file)
@@ -55,10 +55,6 @@ uint8_t ProcessDeviceDescriptor(void)
        if (DeviceDescriptor.Header.Type != DTYPE_Device)
          return InvalidDeviceDataReturned;
 
-       /* Validate returned device Vendor ID against the Android ADK spec values */
-       if (DeviceDescriptor.VendorID != ANDROID_VENDOR_ID)
-         return IncorrectAndroidDevice;
-
        /* Check the product ID to determine if the Android device is in accessory mode */
        if ((DeviceDescriptor.ProductID != ANDROID_ACCESSORY_PRODUCT_ID) &&
            (DeviceDescriptor.ProductID != ANDROID_ACCESSORY_ADB_PRODUCT_ID))
index f786437..45e7ca5 100644 (file)
@@ -64,9 +64,6 @@
                #endif\r
 \r
        /* Macros: */\r
-               /** Vendor ID value in a Device Descriptor to indicate an Android device. */\r
-               #define ANDROID_VENDOR_ID                   0x18D1\r
-\r
                /** Product ID value in a Device Descriptor to indicate an Android device in Open Accessory mode. */\r
                #define ANDROID_ACCESSORY_PRODUCT_ID        0x2D00\r
 \r
index 56a913d..8ff6429 100644 (file)
@@ -44,9 +44,6 @@ bool AOA_Host_ValidateAccessoryDevice(USB_ClassInfo_AOA_Host_t* const AOAInterfa
        if (DeviceDescriptor->Header.Type != DTYPE_Device)\r
          return false;\r
 \r
-       if (DeviceDescriptor->VendorID != ANDROID_VENDOR_ID)\r
-         return false;\r
-\r
        *NeedModeSwitch = ((DeviceDescriptor->ProductID != ANDROID_ACCESSORY_PRODUCT_ID) &&\r
                           (DeviceDescriptor->ProductID != ANDROID_ACCESSORY_ADB_PRODUCT_ID));\r
 \r