From d74b406b1790f6cfade4af8e49b4b064d7817f05 Mon Sep 17 00:00:00 2001 From: evilphish Date: Tue, 24 Oct 2017 23:51:08 +0200 Subject: [PATCH] fix USB3 mode switch for 8814 --- hal/rtl8814a/usb/usb_halinit.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/hal/rtl8814a/usb/usb_halinit.c b/hal/rtl8814a/usb/usb_halinit.c index f3caf31..0a40392 100644 --- a/hal/rtl8814a/usb/usb_halinit.c +++ b/hal/rtl8814a/usb/usb_halinit.c @@ -1974,16 +1974,24 @@ hal_ReadUsbModeSwitch_8814AU( IN BOOLEAN AutoloadFail ) { -#if 0 - if(AutoloadFail) + + HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); + + if (AutoloadFail) + pHalData->EEPROMUsbSwitch = _FALSE; + else + /* check efuse 0x08 bit2 */ + pHalData->EEPROMUsbSwitch = (PROMContent[EEPROM_USB_MODE_8814A] & BIT1) >> 1; + + /* if(AutoloadFail) { UsbModeSwitch_SetUsbModeMechOn(Adapter, _FALSE); } else { UsbModeSwitch_SetUsbModeMechOn(Adapter, ((PROMContent[8]&BIT1)>>1)); - } -#endif + }*/ + } static VOID