Commit 676de74d authored by Dean Camera's avatar Dean Camera

Don't validate the Device Descriptor's vendor ID when validating that a device...

Don't validate the Device Descriptor's vendor ID when validating that a device is an Android Accessory device; the Product ID and (later) Accessory protocol support is enough to probe AOA class support without having to maintain a list of Android device manufacture VID values.
parent 84a739ae
......@@ -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))
......
......@@ -64,9 +64,6 @@
#endif
/* Macros: */
/** Vendor ID value in a Device Descriptor to indicate an Android device. */
#define ANDROID_VENDOR_ID 0x18D1
/** Product ID value in a Device Descriptor to indicate an Android device in Open Accessory mode. */
#define ANDROID_ACCESSORY_PRODUCT_ID 0x2D00
......
......@@ -44,9 +44,6 @@ bool AOA_Host_ValidateAccessoryDevice(USB_ClassInfo_AOA_Host_t* const AOAInterfa
if (DeviceDescriptor->Header.Type != DTYPE_Device)
return false;
if (DeviceDescriptor->VendorID != ANDROID_VENDOR_ID)
return false;
*NeedModeSwitch = ((DeviceDescriptor->ProductID != ANDROID_ACCESSORY_PRODUCT_ID) &&
(DeviceDescriptor->ProductID != ANDROID_ACCESSORY_ADB_PRODUCT_ID));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment