Added DEBUG to USB - CONFIG_USB_DEBUG in Makefile

This commit is contained in:
kimocoder 2019-08-17 13:09:09 +02:00
parent ab77d23e50
commit a0bb0e1d42
7 changed files with 36 additions and 20 deletions

View File

@ -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

View File

@ -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)

View File

@ -102,7 +102,7 @@ void rtw_sw_led_blink_uc_trx_only(LED_DATA *led)
led->BlinkingLedState = RTW_LED_OFF; led->BlinkingLedState = RTW_LED_OFF;
else else
led->BlinkingLedState = RTW_LED_ON; led->BlinkingLedState = RTW_LED_ON;
if (bStopBlinking) { if (bStopBlinking) {
led->CurrLedState = RTW_LED_OFF; led->CurrLedState = RTW_LED_OFF;
led->bLedBlinkInProgress = _FALSE; led->bLedBlinkInProgress = _FALSE;
@ -225,7 +225,7 @@ void rtw_led_set_iface_en_mask(_adapter *adapter, u8 mask)
void rtw_led_set_ctl_en_mask(_adapter *adapter, u32 ctl_mask) void rtw_led_set_ctl_en_mask(_adapter *adapter, u32 ctl_mask)
{ {
struct led_priv *ledpriv = adapter_to_led(adapter); struct led_priv *ledpriv = adapter_to_led(adapter);
#if CONFIG_RTW_SW_LED_TRX_DA_CLASSIFY #if CONFIG_RTW_SW_LED_TRX_DA_CLASSIFY
if (ctl_mask & BIT(LED_CTL_TX)) if (ctl_mask & BIT(LED_CTL_TX))
ctl_mask |= BIT(LED_CTL_UC_TX) | BIT(LED_CTL_BMC_TX); ctl_mask |= BIT(LED_CTL_UC_TX) | BIT(LED_CTL_BMC_TX);

View File

@ -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)) {

View File

@ -1,7 +1,7 @@
/****************************************************************************** /******************************************************************************
* *
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as * under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
@ -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)) {

View File

@ -344,7 +344,7 @@ static u8 rtw_chbw_to_cfg80211_chan_def(struct wiphy *wiphy, struct cfg80211_cha
if (!chan) if (!chan)
goto exit; goto exit;
if (bw == CHANNEL_WIDTH_20) if (bw == CHANNEL_WIDTH_20)
chdef->width = ht ? NL80211_CHAN_WIDTH_20 : NL80211_CHAN_WIDTH_20_NOHT; chdef->width = ht ? NL80211_CHAN_WIDTH_20 : NL80211_CHAN_WIDTH_20_NOHT;
else if (bw == CHANNEL_WIDTH_40) else if (bw == CHANNEL_WIDTH_40)
chdef->width = NL80211_CHAN_WIDTH_40; chdef->width = NL80211_CHAN_WIDTH_40;

View File

@ -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: