- memcpy(UsbDeviceDescriptorPatch, p, sizeof(UsbDeviceDescriptorPatch));
-
- A_SFLASH_READ_4B(u32Tmp, FLASH_SIZE - EE_DATA_RESERVED_LEN + FLASH_USB_VENDOR_ID_OFFSET*2);
- UsbDeviceDescriptorPatch[VENDOR_ID_OFFSET] = mSWAP_BYTE(mLOW_WORD0(u32Tmp));
- UsbDeviceDescriptorPatch[PRODUCT_ID_OFFSET] = mSWAP_BYTE(mHIGH_WORD0(u32Tmp));
+ ath_hal_memcpy(UsbDeviceDescriptorPatch, p, sizeof(UsbDeviceDescriptorPatch));
+
+ UsbDeviceDescriptorPatch[BCD_DEVICE_OFFSET] =
+ BCD_DEVICE_FW_SIGNATURE;
+
+ /* Patch for custom id from flash */
+ if (bEepromExist == FALSE) {
+ A_SFLASH_READ_4B(u32Tmp, FLASH_SIZE -
+ EE_DATA_RESERVED_LEN + FLASH_USB_VENDOR_ID_OFFSET*2);
+ UsbDeviceDescriptorPatch[VENDOR_ID_OFFSET] =
+ mSWAP_BYTE(mLOW_WORD0(u32Tmp));
+ UsbDeviceDescriptorPatch[PRODUCT_ID_OFFSET] =
+ mSWAP_BYTE(mHIGH_WORD0(u32Tmp));
+ }