\r
if (EFI_ERROR(Status)) goto err; \r
\r
- SetupMsg.RequestType = USB_REQ_TYPE_VENDOR\r
- | USB_TARGET_DEVICE; \r
- SetupMsg.Request = CMD_RXQTC;\r
- SetupMsg.Value = 0x8000;\r
- SetupMsg.Index = 0x8001;\r
- SetupMsg.Length = 0;\r
- Status = Ax88772UsbCommand ( pNicDevice,\r
+ if (pNicDevice->Flags != FLAG_TYPE_AX88772) {\r
+ SetupMsg.RequestType = USB_REQ_TYPE_VENDOR\r
+ | USB_TARGET_DEVICE;\r
+ SetupMsg.Request = CMD_RXQTC;\r
+ SetupMsg.Value = 0x8000;\r
+ SetupMsg.Index = 0x8001;\r
+ SetupMsg.Length = 0;\r
+ Status = Ax88772UsbCommand ( pNicDevice,\r
&SetupMsg,\r
- NULL ); \r
+ NULL );\r
+ }\r
+\r
err:\r
return Status;\r
}\r
UINTN LengthInBytes;\r
EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath = NULL;\r
MAC_ADDR_DEVICE_PATH MacDeviceNode;\r
+ EFI_USB_DEVICE_DESCRIPTOR Device;\r
+ UINT32 Index;\r
\r
//\r
// Allocate the device structure\r
goto EXIT;\r
}\r
\r
+ Status = pNicDevice->pUsbIo->UsbGetDeviceDescriptor ( pNicDevice->pUsbIo, &Device );\r
+ if (EFI_ERROR ( Status )) {\r
+ gBS->CloseProtocol (\r
+ Controller,\r
+ &gEfiUsbIoProtocolGuid,\r
+ pThis->DriverBindingHandle,\r
+ Controller\r
+ );\r
+ gBS->FreePool ( pNicDevice );\r
+ goto EXIT;\r
+ } else {\r
+ //\r
+ // Validate the adapter\r
+ //\r
+ for (Index = 0; ASIX_DONGLES[Index].VendorId != 0; Index++) {\r
+ if (ASIX_DONGLES[Index].VendorId == Device.IdVendor &&\r
+ ASIX_DONGLES[Index].ProductId == Device.IdProduct) {\r
+ break;\r
+ }\r
+ }\r
+\r
+ if (ASIX_DONGLES[Index].VendorId == 0) {\r
+ gBS->CloseProtocol (\r
+ Controller,\r
+ &gEfiUsbIoProtocolGuid,\r
+ pThis->DriverBindingHandle,\r
+ Controller\r
+ );\r
+ gBS->FreePool ( pNicDevice );\r
+ goto EXIT;\r
+ }\r
+\r
+ pNicDevice->Flags = ASIX_DONGLES[Index].Flags;\r
+ }\r
+\r
//\r
// Set Device Path\r
// \r