mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2025-01-07 06:35:29 +00:00
Added DEBUG to USB - CONFIG_USB_DEBUG in Makefile
This commit is contained in:
parent
ab77d23e50
commit
a0bb0e1d42
15
Makefile
15
Makefile
@ -44,25 +44,11 @@ EXTRA_CFLAGS += -I$(src)/include
|
|||||||
CONFIG_AUTOCFG_CP = n
|
CONFIG_AUTOCFG_CP = n
|
||||||
|
|
||||||
########################## WIFI IC ############################
|
########################## WIFI IC ############################
|
||||||
CONFIG_RTL8188E = n
|
|
||||||
CONFIG_RTL8812A = y
|
CONFIG_RTL8812A = y
|
||||||
CONFIG_RTL8821A = y
|
CONFIG_RTL8821A = y
|
||||||
CONFIG_RTL8192E = n
|
|
||||||
CONFIG_RTL8723B = n
|
|
||||||
CONFIG_RTL8814A = y
|
CONFIG_RTL8814A = y
|
||||||
CONFIG_RTL8723C = n
|
|
||||||
CONFIG_RTL8188F = n
|
|
||||||
CONFIG_RTL8188GTV = n
|
|
||||||
CONFIG_RTL8822B = n
|
|
||||||
CONFIG_RTL8723D = n
|
|
||||||
CONFIG_RTL8821C = n
|
|
||||||
CONFIG_RTL8710B = n
|
|
||||||
CONFIG_RTL8192F = n
|
|
||||||
######################### Interface ###########################
|
######################### Interface ###########################
|
||||||
CONFIG_USB_HCI = y
|
CONFIG_USB_HCI = y
|
||||||
CONFIG_PCI_HCI = n
|
|
||||||
CONFIG_SDIO_HCI = n
|
|
||||||
CONFIG_GSPI_HCI = n
|
|
||||||
########################## Features ###########################
|
########################## Features ###########################
|
||||||
CONFIG_MP_INCLUDED = y
|
CONFIG_MP_INCLUDED = y
|
||||||
CONFIG_POWER_SAVING = n
|
CONFIG_POWER_SAVING = n
|
||||||
@ -109,6 +95,7 @@ CONFIG_RTW_DEBUG = y
|
|||||||
# default log level is _DRV_INFO_ = 4,
|
# default log level is _DRV_INFO_ = 4,
|
||||||
# please refer to "How_to_set_driver_debug_log_level.doc" to set the available level.
|
# please refer to "How_to_set_driver_debug_log_level.doc" to set the available level.
|
||||||
CONFIG_RTW_LOG_LEVEL = 4
|
CONFIG_RTW_LOG_LEVEL = 4
|
||||||
|
CONFIG_USB_DEBUG = n
|
||||||
#DEBUG=1
|
#DEBUG=1
|
||||||
######################## Wake On Lan ##########################
|
######################## Wake On Lan ##########################
|
||||||
CONFIG_WOWLAN = n
|
CONFIG_WOWLAN = n
|
||||||
|
@ -5405,6 +5405,10 @@ u8 rtw_halmac_switch_usb_mode(struct dvobj_priv *d, enum RTW_USB_SPEED usb_mode)
|
|||||||
mac = dvobj_to_halmac(d);
|
mac = dvobj_to_halmac(d);
|
||||||
api = HALMAC_GET_API(mac);
|
api = HALMAC_GET_API(mac);
|
||||||
halmac_usb_mode = _usb_mode_drv2halmac(usb_mode);
|
halmac_usb_mode = _usb_mode_drv2halmac(usb_mode);
|
||||||
|
#ifdef CONFIG_USB_DEBUG
|
||||||
|
dev_info(&d->pusbdev->dev,
|
||||||
|
DRV_NAME " call api->halmac_set_hw_value()\n");
|
||||||
|
#endif
|
||||||
status = api->halmac_set_hw_value(mac, HALMAC_HW_USB_MODE, (void *)&halmac_usb_mode);
|
status = api->halmac_set_hw_value(mac, HALMAC_HW_USB_MODE, (void *)&halmac_usb_mode);
|
||||||
|
|
||||||
if (HALMAC_RET_SUCCESS != status)
|
if (HALMAC_RET_SUCCESS != status)
|
||||||
|
@ -2458,6 +2458,10 @@ u8 SetHwReg8812AU(PADAPTER Adapter, u8 variable, u8 *val)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case HW_VAR_USB_MODE:
|
case HW_VAR_USB_MODE:
|
||||||
|
#ifdef CONFIG_USB_DEBUG
|
||||||
|
dev_info(&pdvobjpriv->pusbdev->dev,
|
||||||
|
DRV_NAME " switch sethwreg HW_VAR_USB_MODE\n");
|
||||||
|
#endif
|
||||||
/* U2 to U3 */
|
/* U2 to U3 */
|
||||||
if (registry_par->switch_usb_mode == 1) {
|
if (registry_par->switch_usb_mode == 1) {
|
||||||
if (IS_HIGH_SPEED_USB(Adapter)) {
|
if (IS_HIGH_SPEED_USB(Adapter)) {
|
||||||
|
@ -2179,6 +2179,10 @@ u8 SetHwReg8814AU(PADAPTER Adapter, u8 variable, u8* val)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case HW_VAR_USB_MODE:
|
case HW_VAR_USB_MODE:
|
||||||
|
#ifdef CONFIG_USB_DEBUG
|
||||||
|
dev_info(&pdvobjpriv->pusbdev->dev,
|
||||||
|
DRV_NAME " switch sethwreg HW_VAR_USB_MODE\n");
|
||||||
|
#endif
|
||||||
/* U2 to U3 */
|
/* U2 to U3 */
|
||||||
if (registry_par->switch_usb_mode == 1) {
|
if (registry_par->switch_usb_mode == 1) {
|
||||||
if (IS_HIGH_SPEED_USB(Adapter)) {
|
if (IS_HIGH_SPEED_USB(Adapter)) {
|
||||||
|
@ -716,17 +716,34 @@ static void usb_dvobj_deinit(struct usb_interface *usb_intf)
|
|||||||
static int usb_reprobe_switch_usb_mode(PADAPTER Adapter)
|
static int usb_reprobe_switch_usb_mode(PADAPTER Adapter)
|
||||||
{
|
{
|
||||||
struct registry_priv *registry_par = &Adapter->registrypriv;
|
struct registry_priv *registry_par = &Adapter->registrypriv;
|
||||||
|
#ifdef CONFIG_USB_DEBUG
|
||||||
|
struct dvobj_priv *d = adapter_to_dvobj(Adapter);
|
||||||
|
#endif
|
||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||||
u8 ret = _FALSE;
|
u8 ret = _FALSE;
|
||||||
|
|
||||||
|
#ifdef CONFIG_USB_DEBUG
|
||||||
|
dev_info(&d->pusbdev->dev, DRV_NAME " %s \n", __func__);
|
||||||
|
#endif
|
||||||
/* efuse not allow driver to switch usb mode */
|
/* efuse not allow driver to switch usb mode */
|
||||||
if (pHalData->EEPROMUsbSwitch == _FALSE)
|
if (pHalData->EEPROMUsbSwitch == _FALSE) {
|
||||||
goto exit;
|
goto exit;
|
||||||
|
#ifdef CONFIG_USB_DEBUG
|
||||||
|
dev_info(&d->pusbdev->dev, DRV_NAME " no eeprom switch\n");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/* registry not allow driver to switch usb mode */
|
/* registry not allow driver to switch usb mode */
|
||||||
if (registry_par->switch_usb_mode == 0)
|
if (registry_par->switch_usb_mode == 0) {
|
||||||
goto exit;
|
goto exit;
|
||||||
|
#ifdef CONFIG_USB_DEBUG
|
||||||
|
dev_info(&d->pusbdev->dev, DRV_NAME " no module param\n");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_USB_DEBUG
|
||||||
|
dev_info(&d->pusbdev->dev, DRV_NAME " try hw reg HW_VAR_USB_MODE\n");
|
||||||
|
#endif
|
||||||
rtw_hal_set_hwreg(Adapter, HW_VAR_USB_MODE, &ret);
|
rtw_hal_set_hwreg(Adapter, HW_VAR_USB_MODE, &ret);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
Loading…
Reference in New Issue
Block a user