mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
staging: r8188eu: remove unused PHY_GetTxPowerLevel8188E()
Function PHY_GetTxPowerLevel8188E() is unused and it is the only user of function phy_TxPwrIdxToDbm(), remove both. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210908223903.10516-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
411c2b9b71
commit
d5cece41cf
@@ -670,85 +670,6 @@ static u8 phy_DbmToTxPwrIdx(struct adapter *Adapter, enum wireless_mode Wireless
|
||||
return 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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user