staging: r8188eu: remove unused functions from hal/rtl8188e_phycfg.c
cover staging: r8188eu: remove unused functions from hal/rtl8188e_phycfg.c
This series removes unused functions from the file hal/rtl8188e_phycfg.c.
Michael Straube (4):
staging: r8188eu: remove unused PHY_GetTxPowerLevel8188E()
staging: r8188eu: remove unused PHY_ScanOperationBackup8188E()
staging: r8188eu: remove unused PHY_UpdateTxPowerDbm8188E()
staging: r8188eu: remove unused rtl8192c_PHY_GetHWRegOriginalValue()
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 185 ------------------ .../staging/r8188eu/include/Hal8188EPhyCfg.h | 7 - 2 files changed, 192 deletions(-)
Signature · 1 line
2.33.0
PATCH 1/4 staging: r8188eu: remove unused PHY_GetTxPowerLevel8188E()
Function PHY_GetTxPowerLevel8188E() is unused and it is the only user of function phy_TxPwrIdxToDbm(), remove both.
--- drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 79 ------------------- .../staging/r8188eu/include/Hal8188EPhyCfg.h | 1 - 2 files changed, 80 deletions(-)
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c +0 -79
@@ -670,85 +670,6 @@ static u8 phy_DbmToTxPwrIdx(struct adapter *Adapter, enum wireless_mode Wirelessreturn TxPwrIdx; } -/* */ -/* Description: */ -/* Map Tx power index into dBm according to */ -/* current HW model, for example, RF and PA, and */ -/* current wireless mode. */ -/* By Bruce, 2008-01-29. */ -/* */ -static int phy_TxPwrIdxToDbm (struct adapter *Adapter,enum wireless_mode WirelessMode,u8 TxPwrIdx) -{ -int Offset =0 ; -int PwrOutDbm =0 ; - -/* */ -/* Tested by MP, we found that CCK Index 0 equals to -7dbm, OFDM legacy equals to -8dbm. */ -/* Note: */ -/* The mapping may be different by different NICs. Do not use this formula for what needs accurate result. */ -/* By Bruce, 2008-01-29. */ -/* */ -switch (WirelessMode) { -case WIRELESS_MODE_B : - Offset =-7 ; -break ; -case WIRELESS_MODE_G : -case WIRELESS_MODE_N_24G : -default : - Offset =-8 ; -break ; - } - - PwrOutDbm = TxPwrIdx /2 + Offset;/* Discard the decimal part. */ - -return PwrOutDbm; -} - -/*----------------------------------------------------------------------------- -* Function: GetTxPowerLevel8190() -* -* Overview: This function is export to "common" moudule -* -* Input: struct adapter *Adapter -* psByte Power Level -* -* Output: NONE -* -* Return: NONE -* -*---------------------------------------------------------------------------*/ -void PHY_GetTxPowerLevel8188E (struct adapter *Adapter,u32 *powerlevel) -{ -struct hal_data_8188e *pHalData =GET_HAL_DATA (Adapter); -u8 TxPwrLevel =0 ; -int TxPwrDbm; - -/* */ -/* Because the Tx power indexes are different, we report the maximum of them to */ -/* meet the CCX TPC request. By Bruce, 2008-01-31. */ -/* */ - -/* CCK */ - TxPwrLevel = pHalData->CurrentCckTxPwrIdx; - TxPwrDbm =phy_TxPwrIdxToDbm (Adapter,WIRELESS_MODE_B , TxPwrLevel); - -/* Legacy OFDM */ - TxPwrLevel = pHalData->CurrentOfdm24GTxPwrIdx + pHalData->LegacyHTTxPowerDiff; - -/* Compare with Legacy OFDM Tx power. */ -if (phy_TxPwrIdxToDbm (Adapter,WIRELESS_MODE_G , TxPwrLevel) > TxPwrDbm) - TxPwrDbm =phy_TxPwrIdxToDbm (Adapter,WIRELESS_MODE_G , TxPwrLevel); - -/* HT OFDM */ - TxPwrLevel = pHalData->CurrentOfdm24GTxPwrIdx; - -/* Compare with HT OFDM Tx power. */ -if (phy_TxPwrIdxToDbm (Adapter,WIRELESS_MODE_N_24G , TxPwrLevel) > TxPwrDbm) - TxPwrDbm =phy_TxPwrIdxToDbm (Adapter,WIRELESS_MODE_N_24G , TxPwrLevel); - - *powerlevel = TxPwrDbm; -} -static void getTxPowerIndex88E (struct adapter *Adapter,u8 channel,u8 *cckPowerLevel,u8 *ofdmPowerLevel,u8 *BW20PowerLevel,u8 *BW40PowerLevel)
drivers/staging/r8188eu/include/Hal8188EPhyCfg.h +0 -1
@@ -189,7 +189,6 @@ int PHY_RFConfig8188E(struct adapter *adapter);void rtl8192c_PHY_GetHWRegOriginalValue (struct adapter *adapter);/* BB TX Power R/W */ -void PHY_GetTxPowerLevel8188E (struct adapter *adapter,u32 *powerlevel);void PHY_SetTxPowerLevel8188E (struct adapter *adapter,u8 channel);bool PHY_UpdateTxPowerDbm8188E (struct adapter *adapter,int power);
Signature · 1 line
2.33.0
PATCH 2/4 staging: r8188eu: remove unused PHY_ScanOperationBackup8188E()
In reply to Michael StraubeFunction PHY_ScanOperationBackup8188E() is unused and empty, remove it.
--- drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 8 -------- drivers/staging/r8188eu/include/Hal8188EPhyCfg.h | 2 -- 2 files changed, 10 deletions(-)
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c +0 -8
@@ -830,14 +830,6 @@ PHY_UpdateTxPowerDbm8188E(return true; } -void -PHY_ScanOperationBackup8188E ( -struct adapter *Adapter, -u8 Operation - ) -{ -} -/*----------------------------------------------------------------------------- * Function: PHY_SetBWModeCallback8192C() *
drivers/staging/r8188eu/include/Hal8188EPhyCfg.h +0 -2
@@ -192,8 +192,6 @@ void rtl8192c_PHY_GetHWRegOriginalValue(struct adapter *adapter);void PHY_SetTxPowerLevel8188E (struct adapter *adapter,u8 channel);bool PHY_UpdateTxPowerDbm8188E (struct adapter *adapter,int power); -void PHY_ScanOperationBackup8188E (struct adapter *Adapter,u8 Operation); -/* Switch bandwidth for 8192S */ void PHY_SetBWMode8188E (struct adapter *adapter,enum ht_channel_width chnlwidth,unsigned char offset);
Signature · 1 line
2.33.0
PATCH 3/4 staging: r8188eu: remove unused PHY_UpdateTxPowerDbm8188E()
In reply to Michael StraubeFunction PHY_UpdateTxPowerDbm8188E() is unused and it is the only user of function phy_DbmToTxPwrIdx(), remove both.
--- drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 80 ------------------- .../staging/r8188eu/include/Hal8188EPhyCfg.h | 1 - 2 files changed, 81 deletions(-)
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c +0 -80
@@ -627,49 +627,6 @@ rtl8192c_PHY_GetHWRegOriginalValue( pHalData->framesyncC34 =PHY_QueryBBReg (Adapter, rOFDM0_RxDetector2, bMaskDWord); } -/* */ -/* Description: */ -/* Map dBm into Tx power index according to */ -/* current HW model, for example, RF and PA, and */ -/* current wireless mode. */ -/* By Bruce, 2008-01-29. */ -/* */ -static u8 phy_DbmToTxPwrIdx (struct adapter *Adapter,enum wireless_mode WirelessMode,int PowerInDbm) -{ -u8 TxPwrIdx =0 ; -int Offset =0 ; - -/* */ -/* Tested by MP, we found that CCK Index 0 equals to 8dbm, OFDM legacy equals to */ -/* 3dbm, and OFDM HT equals to 0dbm respectively. */ -/* Note: */ -/* The mapping may be different by different NICs. Do not use this formula for what needs accurate result. */ -/* By Bruce, 2008-01-29. */ -/* */ -switch (WirelessMode) { -case WIRELESS_MODE_B : - Offset =-7 ; -break ; - -case WIRELESS_MODE_G : -case WIRELESS_MODE_N_24G : -default : - Offset =-8 ; -break ; - } - -if ((PowerInDbm - Offset) >0 ) - TxPwrIdx = (u8)((PowerInDbm - Offset) *2 ); -else - TxPwrIdx =0 ; - -/* Tx Power Index is too large. */ -if (TxPwrIdx >MAX_TXPWR_IDX_NMODE_92S ) - TxPwrIdx =MAX_TXPWR_IDX_NMODE_92S ; - -return TxPwrIdx; -} -static void getTxPowerIndex88E (struct adapter *Adapter,u8 channel,u8 *cckPowerLevel,u8 *ofdmPowerLevel,u8 *BW20PowerLevel,u8 *BW40PowerLevel)
@@ -793,43 +750,6 @@ PHY_SetTxPowerLevel8188E(rtl8188e_PHY_RF6052SetOFDMTxPower (Adapter, &ofdmPowerLevel[0 ], &BW20PowerLevel[0 ], &BW40PowerLevel[0 ], channel); } -/* */ -/* Description: */ -/* Update transmit power level of all channel supported. */ -/* */ -/* TODO: */ -/* A mode. */ -/* By Bruce, 2008-02-04. */ -/* */ -bool -PHY_UpdateTxPowerDbm8188E ( -struct adapter *Adapter, -int powerInDbm - ) -{ -struct hal_data_8188e *pHalData =GET_HAL_DATA (Adapter); -u8 idx; -u8 rf_path; - -/* TODO: A mode Tx power. */ -u8 CckTxPwrIdx =phy_DbmToTxPwrIdx (Adapter,WIRELESS_MODE_B , powerInDbm); -u8 OfdmTxPwrIdx =phy_DbmToTxPwrIdx (Adapter,WIRELESS_MODE_N_24G , powerInDbm); - -if (OfdmTxPwrIdx - pHalData->LegacyHTTxPowerDiff >0 ) - OfdmTxPwrIdx -= pHalData->LegacyHTTxPowerDiff; -else - OfdmTxPwrIdx =0 ; - -for (idx =0 ; idx <14 ; idx++) { -for (rf_path =0 ; rf_path <2 ; rf_path++) { - pHalData->TxPwrLevelCck[rf_path][idx] = CckTxPwrIdx; - pHalData->TxPwrLevelHT40_1S[rf_path][idx] = - pHalData->TxPwrLevelHT40_2S[rf_path][idx] = OfdmTxPwrIdx; - } - } -return true; -} -/*----------------------------------------------------------------------------- * Function: PHY_SetBWModeCallback8192C() *
drivers/staging/r8188eu/include/Hal8188EPhyCfg.h +0 -1
@@ -190,7 +190,6 @@ void rtl8192c_PHY_GetHWRegOriginalValue(struct adapter *adapter);/* BB TX Power R/W */ void PHY_SetTxPowerLevel8188E (struct adapter *adapter,u8 channel); -bool PHY_UpdateTxPowerDbm8188E (struct adapter *adapter,int power);/* Switch bandwidth for 8192S */ void PHY_SetBWMode8188E(struct adapter *adapter,
Signature · 1 line
2.33.0
PATCH 4/4 staging: r8188eu: remove unused rtl8192c_PHY_GetHWRegOriginalValue()
In reply to Michael StraubeFunction rtl8192c_PHY_GetHWRegOriginalValue() is unused, remove it.
--- drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 18 ------------------ .../staging/r8188eu/include/Hal8188EPhyCfg.h | 3 --- 2 files changed, 21 deletions(-)
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c +0 -18
@@ -609,24 +609,6 @@ int PHY_RFConfig8188E(struct adapter *Adapter)return rtStatus; } -void -rtl8192c_PHY_GetHWRegOriginalValue ( -struct adapter *Adapter - ) -{ -struct hal_data_8188e *pHalData =GET_HAL_DATA (Adapter); - -/* read rx initial gain */ - pHalData->DefaultInitialGain[0 ] = (u8 )PHY_QueryBBReg (Adapter, rOFDM0_XAAGCCore1, bMaskByte0); - pHalData->DefaultInitialGain[1 ] = (u8 )PHY_QueryBBReg (Adapter, rOFDM0_XBAGCCore1, bMaskByte0); - pHalData->DefaultInitialGain[2 ] = (u8 )PHY_QueryBBReg (Adapter, rOFDM0_XCAGCCore1, bMaskByte0); - pHalData->DefaultInitialGain[3 ] = (u8 )PHY_QueryBBReg (Adapter, rOFDM0_XDAGCCore1, bMaskByte0); - -/* read framesync */ - pHalData->framesync = (u8 )PHY_QueryBBReg (Adapter, rOFDM0_RxDetector3, bMaskByte0); - pHalData->framesyncC34 =PHY_QueryBBReg (Adapter, rOFDM0_RxDetector2, bMaskDWord); -} -static void getTxPowerIndex88E (struct adapter *Adapter,u8 channel,u8 *cckPowerLevel,u8 *ofdmPowerLevel,u8 *BW20PowerLevel,u8 *BW40PowerLevel)
drivers/staging/r8188eu/include/Hal8188EPhyCfg.h +0 -3
@@ -185,9 +185,6 @@ int PHY_MACConfig8188E(struct adapter *adapter);int PHY_BBConfig8188E (struct adapter *adapter);int PHY_RFConfig8188E (struct adapter *adapter); -/* Read initi reg value for tx power setting. */ -void rtl8192c_PHY_GetHWRegOriginalValue (struct adapter *adapter); -/* BB TX Power R/W */ void PHY_SetTxPowerLevel8188E (struct adapter *adapter,u8 channel);
Signature · 1 line
2.33.0