Remove some more dead code and unused definitions.
Martin Kaiser (8):
staging: r8188eu: remove empty trigger gpio code
staging: r8188eu: interface type is always usb
staging: r8188eu: remove two checks that are always false
staging: r8188eu: remove unused function prototypes
staging: r8188eu: PHY_SetRFPathSwitch_8188E is not used
staging: r8188eu: clean up Hal8188EPhyCfg.h
staging: r8188eu: remove procfs functions
staging: r8188eu: CurrentWirelessMode is not used
drivers/staging/r8188eu/Makefile | 1 -
drivers/staging/r8188eu/core/rtw_debug.c | 886 ------------------
.../staging/r8188eu/hal/HalHWImg8188E_BB.c | 14 +-
.../staging/r8188eu/hal/HalHWImg8188E_MAC.c | 3 +-
.../staging/r8188eu/hal/HalHWImg8188E_RF.c | 8 +-
drivers/staging/r8188eu/hal/HalPhyRf_8188e.c | 38 -
drivers/staging/r8188eu/hal/odm.c | 3 -
drivers/staging/r8188eu/hal/rtl8188e_dm.c | 2 -
drivers/staging/r8188eu/hal/usb_halinit.c | 8 -
.../staging/r8188eu/include/Hal8188EPhyCfg.h | 78 --
drivers/staging/r8188eu/include/hal_intf.h | 1 -
drivers/staging/r8188eu/include/odm.h | 11 +-
.../staging/r8188eu/include/rtl8188e_hal.h | 1 -
drivers/staging/r8188eu/include/rtw_debug.h | 148 ---
14 files changed, 6 insertions(+), 1196 deletions(-)
delete mode 100644 drivers/staging/r8188eu/core/rtw_debug.c
--
2.20.1
Remove the PHY_SetRFPathSwitch_8188E function which is not used.
It was the only caller of phy_setrfpathswitch_8188e, that function
can be removed as well.
Signed-off-by: Martin Kaiser <[email protected]>
---
drivers/staging/r8188eu/hal/HalPhyRf_8188e.c | 38 -------------------
.../staging/r8188eu/include/Hal8188EPhyCfg.h | 3 --
2 files changed, 41 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
index f01ee3cd8795..79f407c280be 100644
--- a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
+++ b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
@@ -1189,41 +1189,3 @@ void PHY_LCCalibrate_8188E(struct adapter *adapt)
phy_LCCalibrate_8188E(adapt, false);
}
}
-
-static void phy_setrfpathswitch_8188e(struct adapter *adapt, bool main, bool is2t)
-{
- struct hal_data_8188e *pHalData = GET_HAL_DATA(adapt);
- struct odm_dm_struct *dm_odm = &pHalData->odmpriv;
-
- if (!adapt->hw_init_completed) {
- u8 u1btmp;
- u1btmp = ODM_Read1Byte(dm_odm, REG_LEDCFG2) | BIT(7);
- ODM_Write1Byte(dm_odm, REG_LEDCFG2, u1btmp);
- ODM_SetBBReg(dm_odm, rFPGA0_XAB_RFParameter, BIT(13), 0x01);
- }
-
- if (is2t) { /* 92C */
- if (main)
- ODM_SetBBReg(dm_odm, rFPGA0_XB_RFInterfaceOE, BIT(5) | BIT(6), 0x1); /* 92C_Path_A */
- else
- ODM_SetBBReg(dm_odm, rFPGA0_XB_RFInterfaceOE, BIT(5) | BIT(6), 0x2); /* BT */
- } else { /* 88C */
- if (main)
- ODM_SetBBReg(dm_odm, rFPGA0_XA_RFInterfaceOE, BIT(8) | BIT(9), 0x2); /* Main */
- else
- ODM_SetBBReg(dm_odm, rFPGA0_XA_RFInterfaceOE, BIT(8) | BIT(9), 0x1); /* Aux */
- }
-}
-
-void PHY_SetRFPathSwitch_8188E(struct adapter *adapt, bool main)
-{
- struct hal_data_8188e *pHalData = GET_HAL_DATA(adapt);
- struct odm_dm_struct *dm_odm = &pHalData->odmpriv;
-
- if (dm_odm->RFType == ODM_2T2R) {
- phy_setrfpathswitch_8188e(adapt, main, true);
- } else {
- /* For 88C 1T1R */
- phy_setrfpathswitch_8188e(adapt, main, false);
- }
-}
diff --git a/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h b/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
index 084bccc5dcb9..feae0b32cac6 100644
--- a/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
+++ b/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
@@ -195,9 +195,6 @@ void PHY_SetBWMode8188E(struct adapter *adapter,
/* channel switch related funciton */
void PHY_SwChnl8188E(struct adapter *adapter, u8 channel);
-/* BB/MAC/RF other monitor API */
-void PHY_SetRFPathSwitch_8188E(struct adapter *adapter, bool main);
-
void storePwrIndexDiffRateOffset(struct adapter *adapter, u32 regaddr,
u32 mask, u32 data);
/*--------------------------Exported Function prototype---------------------*/
--
2.20.1
Thus wrote Phillip Potter ([email protected]):
> On Sat, Oct 16, 2021 at 01:30:00PM +0200, Martin Kaiser wrote:
> > Remove some more dead code and unused definitions.
> > Martin Kaiser (8):
> > staging: r8188eu: remove empty trigger gpio code
> > staging: r8188eu: interface type is always usb
> > staging: r8188eu: remove two checks that are always false
> > staging: r8188eu: remove unused function prototypes
> > staging: r8188eu: PHY_SetRFPathSwitch_8188E is not used
> > staging: r8188eu: clean up Hal8188EPhyCfg.h
> > staging: r8188eu: remove procfs functions
> > staging: r8188eu: CurrentWirelessMode is not used
> > drivers/staging/r8188eu/Makefile | 1 -
> > drivers/staging/r8188eu/core/rtw_debug.c | 886 ------------------
> > .../staging/r8188eu/hal/HalHWImg8188E_BB.c | 14 +-
> > .../staging/r8188eu/hal/HalHWImg8188E_MAC.c | 3 +-
> > .../staging/r8188eu/hal/HalHWImg8188E_RF.c | 8 +-
> > drivers/staging/r8188eu/hal/HalPhyRf_8188e.c | 38 -
> > drivers/staging/r8188eu/hal/odm.c | 3 -
> > drivers/staging/r8188eu/hal/rtl8188e_dm.c | 2 -
> > drivers/staging/r8188eu/hal/usb_halinit.c | 8 -
> > .../staging/r8188eu/include/Hal8188EPhyCfg.h | 78 --
> > drivers/staging/r8188eu/include/hal_intf.h | 1 -
> > drivers/staging/r8188eu/include/odm.h | 11 +-
> > .../staging/r8188eu/include/rtl8188e_hal.h | 1 -
> > drivers/staging/r8188eu/include/rtw_debug.h | 148 ---
> > 14 files changed, 6 insertions(+), 1196 deletions(-)
> > delete mode 100644 drivers/staging/r8188eu/core/rtw_debug.c
> > --
> > 2.20.1
Hi Phil,
> Looks good from what I can see, many thanks. Built and tested on my
> USB-N10 Nano.
> For whole series:
> Acked-by: Phillip Potter <[email protected]>
thanks for reviewing and testing.
Best regards,
Martin
On Sat, Oct 16, 2021 at 01:30:00PM +0200, Martin Kaiser wrote:
> Remove some more dead code and unused definitions.
>
> Martin Kaiser (8):
> staging: r8188eu: remove empty trigger gpio code
> staging: r8188eu: interface type is always usb
> staging: r8188eu: remove two checks that are always false
> staging: r8188eu: remove unused function prototypes
> staging: r8188eu: PHY_SetRFPathSwitch_8188E is not used
> staging: r8188eu: clean up Hal8188EPhyCfg.h
> staging: r8188eu: remove procfs functions
> staging: r8188eu: CurrentWirelessMode is not used
>
> drivers/staging/r8188eu/Makefile | 1 -
> drivers/staging/r8188eu/core/rtw_debug.c | 886 ------------------
> .../staging/r8188eu/hal/HalHWImg8188E_BB.c | 14 +-
> .../staging/r8188eu/hal/HalHWImg8188E_MAC.c | 3 +-
> .../staging/r8188eu/hal/HalHWImg8188E_RF.c | 8 +-
> drivers/staging/r8188eu/hal/HalPhyRf_8188e.c | 38 -
> drivers/staging/r8188eu/hal/odm.c | 3 -
> drivers/staging/r8188eu/hal/rtl8188e_dm.c | 2 -
> drivers/staging/r8188eu/hal/usb_halinit.c | 8 -
> .../staging/r8188eu/include/Hal8188EPhyCfg.h | 78 --
> drivers/staging/r8188eu/include/hal_intf.h | 1 -
> drivers/staging/r8188eu/include/odm.h | 11 +-
> .../staging/r8188eu/include/rtl8188e_hal.h | 1 -
> drivers/staging/r8188eu/include/rtw_debug.h | 148 ---
> 14 files changed, 6 insertions(+), 1196 deletions(-)
> delete mode 100644 drivers/staging/r8188eu/core/rtw_debug.c
>
> --
> 2.20.1
>
Dear Martin,
Looks good from what I can see, many thanks. Built and tested on my
USB-N10 Nano.
For whole series:
Acked-by: Phillip Potter <[email protected]>
Regards,
Phil
On 10/16/21 13:30, Martin Kaiser wrote:
> Remove the PHY_SetRFPathSwitch_8188E function which is not used.
>
> It was the only caller of phy_setrfpathswitch_8188e, that function
> can be removed as well.
>
> Signed-off-by: Martin Kaiser <[email protected]>
> ---
> drivers/staging/r8188eu/hal/HalPhyRf_8188e.c | 38 -------------------
> .../staging/r8188eu/include/Hal8188EPhyCfg.h | 3 --
> 2 files changed, 41 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
> index f01ee3cd8795..79f407c280be 100644
> --- a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
> +++ b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
> @@ -1189,41 +1189,3 @@ void PHY_LCCalibrate_8188E(struct adapter *adapt)
> phy_LCCalibrate_8188E(adapt, false);
> }
> }
> -
> -static void phy_setrfpathswitch_8188e(struct adapter *adapt, bool main, bool is2t)
> -{
> - struct hal_data_8188e *pHalData = GET_HAL_DATA(adapt);
> - struct odm_dm_struct *dm_odm = &pHalData->odmpriv;
> -
> - if (!adapt->hw_init_completed) {
> - u8 u1btmp;
> - u1btmp = ODM_Read1Byte(dm_odm, REG_LEDCFG2) | BIT(7);
> - ODM_Write1Byte(dm_odm, REG_LEDCFG2, u1btmp);
> - ODM_SetBBReg(dm_odm, rFPGA0_XAB_RFParameter, BIT(13), 0x01);
> - }
> -
> - if (is2t) { /* 92C */
> - if (main)
> - ODM_SetBBReg(dm_odm, rFPGA0_XB_RFInterfaceOE, BIT(5) | BIT(6), 0x1); /* 92C_Path_A */
> - else
> - ODM_SetBBReg(dm_odm, rFPGA0_XB_RFInterfaceOE, BIT(5) | BIT(6), 0x2); /* BT */
> - } else { /* 88C */
> - if (main)
> - ODM_SetBBReg(dm_odm, rFPGA0_XA_RFInterfaceOE, BIT(8) | BIT(9), 0x2); /* Main */
> - else
> - ODM_SetBBReg(dm_odm, rFPGA0_XA_RFInterfaceOE, BIT(8) | BIT(9), 0x1); /* Aux */
> - }
> -}
> -
> -void PHY_SetRFPathSwitch_8188E(struct adapter *adapt, bool main)
> -{
> - struct hal_data_8188e *pHalData = GET_HAL_DATA(adapt);
> - struct odm_dm_struct *dm_odm = &pHalData->odmpriv;
> -
> - if (dm_odm->RFType == ODM_2T2R) {
> - phy_setrfpathswitch_8188e(adapt, main, true);
> - } else {
> - /* For 88C 1T1R */
> - phy_setrfpathswitch_8188e(adapt, main, false);
> - }
> -}
> diff --git a/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h b/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
> index 084bccc5dcb9..feae0b32cac6 100644
> --- a/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
> +++ b/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
> @@ -195,9 +195,6 @@ void PHY_SetBWMode8188E(struct adapter *adapter,
> /* channel switch related funciton */
> void PHY_SwChnl8188E(struct adapter *adapter, u8 channel);
>
> -/* BB/MAC/RF other monitor API */
> -void PHY_SetRFPathSwitch_8188E(struct adapter *adapter, bool main);
> -
> void storePwrIndexDiffRateOffset(struct adapter *adapter, u32 regaddr,
> u32 mask, u32 data);
> /*--------------------------Exported Function prototype---------------------*/
>
Acked-by: Michael Straube <[email protected]>