staging: r8188eu: remove include/odm_debug.h
authorPhillip Potter <phil@philpotter.co.uk>
Sat, 31 Jul 2021 00:39:37 +0000 (01:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Jul 2021 07:24:52 +0000 (09:24 +0200)
Remove include/odm_debug.h in its entirety. To do this, first:

(1) Remove DebugLevel and DebugComponents members from the struct
    odm_dm_struct definition, and any uses of these elsewhere in
    the driver.

(2) Remove the function ODM_InitDebugSetting from hal/odm_debug.c
    whilst leaving the file in place for now as it contains a global
    which is still used and will be removed by further cleanup code.
    Also remove all of its callers. All the function does is set the
    members mentioned above.

(3) Remove the now redundant constants and their usages:
    ODM_CMNINFO_DBG_LEVEL
    ODM_CMNINFO_DBG_COMP
    HW_DEF_ODM_DBG_FLAG
    HW_DEF_FA_CNT_DUMP
    This includes usage within a few hexadecimal ioctl switch cases
    in os_dep/ioctl_linux.c (although only the call itself within
    0x11 as it contains additional code currently).

(4) Finally, remove the file itself and its inclusion within
    include/odm_precomp.h, as none of the remaining content is used
    from anywhere else in the driver.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20210731003937.68615-15-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/odm.c
drivers/staging/r8188eu/hal/odm_debug.c
drivers/staging/r8188eu/hal/rtl8188e_dm.c
drivers/staging/r8188eu/hal/usb_halinit.c
drivers/staging/r8188eu/include/hal_intf.h
drivers/staging/r8188eu/include/odm.h
drivers/staging/r8188eu/include/odm_debug.h [deleted file]
drivers/staging/r8188eu/include/odm_precomp.h
drivers/staging/r8188eu/os_dep/ioctl_linux.c

index 783d4f4a53a53ece2ff24256164c87818cdde641..0bc83631103641c46ef633a5512b5aeaab2444c4 100644 (file)
@@ -416,12 +416,6 @@ void ODM_CmnInfoUpdate(struct odm_dm_struct *pDM_Odm, u32 CmnInfo, u64 Value)
        case    ODM_CMNINFO_RSSI_MIN:
                pDM_Odm->RSSI_Min = (u8)Value;
                break;
-       case    ODM_CMNINFO_DBG_COMP:
-               pDM_Odm->DebugComponents = Value;
-               break;
-       case    ODM_CMNINFO_DBG_LEVEL:
-               pDM_Odm->DebugLevel = (u32)Value;
-               break;
        case    ODM_CMNINFO_RA_THRESHOLD_HIGH:
                pDM_Odm->RateAdaptive.HighRSSIThresh = (u8)Value;
                break;
@@ -439,8 +433,6 @@ void odm_CommonInfoSelfInit(struct odm_dm_struct *pDM_Odm)
                pDM_Odm->AntDivType = CG_TRX_HW_ANTDIV;
        if (pDM_Odm->SupportICType & (ODM_RTL8723A))
                pDM_Odm->AntDivType = CGCS_RX_SW_ANTDIV;
-
-       ODM_InitDebugSetting(pDM_Odm);
 }
 
 void odm_CommonInfoSelfUpdate(struct odm_dm_struct *pDM_Odm)
index fad1c3cca25b14a7ed8eecac33ca58ae2ab0e3c5..7029ec4f771e1c522fe56191a53f395abff2d8f5 100644 (file)
@@ -3,11 +3,4 @@
 
 #include "../include/odm_precomp.h"
 
-void ODM_InitDebugSetting(struct odm_dm_struct *pDM_Odm)
-{
-       pDM_Odm->DebugLevel = ODM_DBG_TRACE;
-
-       pDM_Odm->DebugComponents = 0;
-}
-
 u32 GlobalDebugLevel;
index 294b082a6c09eaae08478db3631a970c09dabf55..0e264c39d6360570b3b833c25b2f192363f8f533 100644 (file)
@@ -193,7 +193,6 @@ void rtl8188e_init_dm_priv(struct adapter *Adapter)
 
        memset(pdmpriv, 0, sizeof(struct dm_priv));
        Init_ODM_ComInfo_88E(Adapter);
-       ODM_InitDebugSetting(podmpriv);
 }
 
 void rtl8188e_deinit_dm_priv(struct adapter *Adapter)
index c90a7574b1cfe998379a3141d86e06df0aca6a57..d985894c0f30281d10acdb4a7a42739357b4913c 100644 (file)
@@ -2035,12 +2035,6 @@ GetHalDefVar8188EUsb(
                        }
                }
                break;
-       case HW_DEF_ODM_DBG_FLAG:
-               {
-                       struct odm_dm_struct *dm_ocm = &(haldata->odmpriv);
-                       pr_info("dm_ocm->DebugComponents = 0x%llx\n", dm_ocm->DebugComponents);
-               }
-               break;
        case HAL_DEF_DBG_DUMP_RXPKT:
                *((u8 *)pValue) = haldata->bDumpRxPkt;
                break;
@@ -2099,23 +2093,6 @@ static u8 SetHalDefVar8188EUsb(struct adapter *Adapter, enum hal_def_variable eV
        case HAL_DEF_DBG_DUMP_TXPKT:
                haldata->bDumpTxPkt = *((u8 *)pValue);
                break;
-       case HW_DEF_FA_CNT_DUMP:
-               {
-                       u8 bRSSIDump = *((u8 *)pValue);
-                       struct odm_dm_struct *dm_ocm = &(haldata->odmpriv);
-                       if (bRSSIDump)
-                               dm_ocm->DebugComponents =       ODM_COMP_DIG|ODM_COMP_FA_CNT    ;
-                       else
-                               dm_ocm->DebugComponents = 0;
-               }
-               break;
-       case HW_DEF_ODM_DBG_FLAG:
-               {
-                       u64     DebugComponents = *((u64 *)pValue);
-                       struct odm_dm_struct *dm_ocm = &(haldata->odmpriv);
-                       dm_ocm->DebugComponents = DebugComponents;
-               }
-               break;
        default:
                bResult = _FAIL;
                break;
index 81d959c6fd4ee729e3f4cc3ee0a4856cc766b08a..8f62cbe9ba373758ccf9a5fe773a066f0797427c 100644 (file)
@@ -113,8 +113,6 @@ enum hal_def_variable {
        HW_VAR_MAX_RX_AMPDU_FACTOR,
        HW_DEF_RA_INFO_DUMP,
        HAL_DEF_DBG_DUMP_TXPKT,
-       HW_DEF_FA_CNT_DUMP,
-       HW_DEF_ODM_DBG_FLAG,
 };
 
 enum hal_odm_variable {
index 15827b6a5729b6ead87c47d3056a6e26a61de1ba..2a6fd4072e006d8bce834cd17c5a6c715d506477 100644 (file)
@@ -388,8 +388,6 @@ enum odm_common_info_def {
        ODM_CMNINFO_WIFI_DISPLAY,
        ODM_CMNINFO_LINK,
        ODM_CMNINFO_RSSI_MIN,
-       ODM_CMNINFO_DBG_COMP,                   /*  u64 */
-       ODM_CMNINFO_DBG_LEVEL,                  /*  u32 */
        ODM_CMNINFO_RA_THRESHOLD_HIGH,          /*  u8 */
        ODM_CMNINFO_RA_THRESHOLD_LOW,           /*  u8 */
        ODM_CMNINFO_RF_ANTENNA_TYPE,            /*  u8 */
@@ -748,8 +746,6 @@ struct odm_dm_struct {
        bool    odm_ready;
 
        struct rtl8192cd_priv *fake_priv;
-       u64     DebugComponents;
-       u32     DebugLevel;
 
 /*  ODM HANDLE, DRIVER NEEDS NOT TO HOOK------ */
        bool    bCckHighPower;
diff --git a/drivers/staging/r8188eu/include/odm_debug.h b/drivers/staging/r8188eu/include/odm_debug.h
deleted file mode 100644 (file)
index c71d890..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
-/* Copyright(c) 2007 - 2011 Realtek Corporation. */
-
-#ifndef        __ODM_DBG_H__
-#define __ODM_DBG_H__
-
-/*  */
-/*     Define the debug levels */
-/*  */
-/*     1. DBG_TRACE and DBG_LOUD are used for normal cases. */
-/*     They can help SW engineer to develop or trace states changed */
-/*     and also help HW enginner to trace every operation to and from HW, */
-/*     e.g IO, Tx, Rx. */
-/*  */
-/*     2. DBG_WARNNING and DBG_SERIOUS are used for unusual or error cases, */
-/*     which help us to debug SW or HW. */
-
-/*     Never used in a call to ODM_RT_TRACE()! */
-#define ODM_DBG_OFF                            1
-
-/*     Fatal bug. */
-/*     For example, Tx/Rx/IO locked up, OS hangs, memory access violation, */
-/*     resource allocation failed, unexpected HW behavior, HW BUG and so on. */
-#define ODM_DBG_SERIOUS                                2
-
-/*     Abnormal, rare, or unexpeted cases. */
-/*     For example, IRP/Packet/OID canceled, device suprisely unremoved and so on. */
-#define ODM_DBG_WARNING                                3
-
-/*     Normal case with useful information about current SW or HW state. */
-/*     For example, Tx/Rx descriptor to fill, Tx/Rx descr. completed status, */
-/*     SW protocol state change, dynamic mechanism state change and so on. */
-/*  */
-#define ODM_DBG_LOUD                                   4
-
-/*     Normal case with detail execution flow or information. */
-#define ODM_DBG_TRACE                                  5
-
-/*  Define the tracing components */
-/* BB Functions */
-#define ODM_COMP_DIG                                   BIT0
-#define ODM_COMP_RA_MASK                               BIT1
-#define ODM_COMP_DYNAMIC_TXPWR                         BIT2
-#define ODM_COMP_FA_CNT                                        BIT3
-#define ODM_COMP_RSSI_MONITOR                          BIT4
-#define ODM_COMP_CCK_PD                                        BIT5
-#define ODM_COMP_ANT_DIV                               BIT6
-#define ODM_COMP_PWR_SAVE                              BIT7
-#define ODM_COMP_PWR_TRA                               BIT8
-#define ODM_COMP_RATE_ADAPTIVE                         BIT9
-#define ODM_COMP_PATH_DIV                              BIT10
-#define ODM_COMP_PSD                                   BIT11
-#define ODM_COMP_DYNAMIC_PRICCA                                BIT12
-#define ODM_COMP_RXHP                                  BIT13
-/* MAC Functions */
-#define ODM_COMP_EDCA_TURBO                            BIT16
-#define ODM_COMP_EARLY_MODE                            BIT17
-/* RF Functions */
-#define ODM_COMP_TX_PWR_TRACK                          BIT24
-#define ODM_COMP_RX_GAIN_TRACK                         BIT25
-#define ODM_COMP_CALIBRATION                           BIT26
-/* Common Functions */
-#define ODM_COMP_COMMON                                        BIT30
-#define ODM_COMP_INIT                                  BIT31
-
-/*------------------------Export Marco Definition---------------------------*/
-void ODM_InitDebugSetting(struct odm_dm_struct *pDM_Odm);
-
-#endif /*  __ODM_DBG_H__ */
index 9072acd26386bf0e82469386a520256676ce1f99..a1d6d674bda6647228c7046c53d963647f254baf 100644 (file)
@@ -18,7 +18,6 @@
 
 #include "odm.h"
 #include "odm_HWConfig.h"
-#include "odm_debug.h"
 #include "odm_RegDefine11AC.h"
 #include "odm_RegDefine11N.h"
 
index ffce43f99dd60d16a7a44966916a6e0a28eed5c4..c763714cda581d54919187ceb78107db6e8c80e2 100644 (file)
@@ -4455,7 +4455,6 @@ static int rtw_dbg_port(struct net_device *dev,
                case 0x11:
                        DBG_88E("turn %s Rx RSSI display function\n", (extra_arg == 1) ? "on" : "off");
                        padapter->bRxRSSIDisplay = extra_arg;
-                       rtw_hal_set_def_var(padapter, HW_DEF_FA_CNT_DUMP, &extra_arg);
                        break;
                case 0x12: /* set rx_stbc */
                {
@@ -4492,32 +4491,6 @@ static int rtw_dbg_port(struct net_device *dev,
                        DBG_88E("get wifi_spec =%d\n", pregpriv->wifi_spec);
                }
                        break;
-               case 0x16:
-                       if (arg == 0xff) {
-                               pr_info("ODM_COMP_DIG\t\tBIT0\n");
-                               pr_info("ODM_COMP_RA_MASK\t\tBIT1\n");
-                               pr_info("ODM_COMP_DYNAMIC_TXPWR\tBIT2\n");
-                               pr_info("ODM_COMP_FA_CNT\t\tBIT3\n");
-                               pr_info("ODM_COMP_RSSI_MONITOR\tBIT4\n");
-                               pr_info("ODM_COMP_CCK_PD\t\tBIT5\n");
-                               pr_info("ODM_COMP_ANT_DIV\t\tBIT6\n");
-                               pr_info("ODM_COMP_PWR_SAVE\t\tBIT7\n");
-                               pr_info("ODM_COMP_PWR_TRAIN\tBIT8\n");
-                               pr_info("ODM_COMP_RATE_ADAPTIVE\tBIT9\n");
-                               pr_info("ODM_COMP_PATH_DIV\t\tBIT10\n");
-                               pr_info("ODM_COMP_PSD   \tBIT11\n");
-                               pr_info("ODM_COMP_DYNAMIC_PRICCA\tBIT12\n");
-                               pr_info("ODM_COMP_RXHP\t\tBIT13\n");
-                               pr_info("ODM_COMP_EDCA_TURBO\tBIT16\n");
-                               pr_info("ODM_COMP_EARLY_MODE\tBIT17\n");
-                               pr_info("ODM_COMP_TX_PWR_TRACK\tBIT24\n");
-                               pr_info("ODM_COMP_RX_GAIN_TRACK\tBIT25\n");
-                               pr_info("ODM_COMP_CALIBRATION\tBIT26\n");
-                               rtw_hal_get_def_var(padapter, HW_DEF_ODM_DBG_FLAG, &extra_arg);
-                       } else {
-                               rtw_hal_set_def_var(padapter, HW_DEF_ODM_DBG_FLAG, &extra_arg);
-                       }
-                       break;
                case 0x23:
                        DBG_88E("turn %s the bNotifyChannelChange Variable\n", (extra_arg == 1) ? "on" : "off");
                        padapter->bNotifyChannelChange = extra_arg;