The function rtl8192_SetRFPowerState() is not used anywhere, remove it. Signed-off-by: Michael Straube <straube.linux@xxxxxxxxx> --- drivers/staging/rtl8192u/r819xU_phy.c | 87 --------------------------- drivers/staging/rtl8192u/r819xU_phy.h | 2 - 2 files changed, 89 deletions(-) diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c index 97f4d89500ae..e6836eacc7aa 100644 --- a/drivers/staging/rtl8192u/r819xU_phy.c +++ b/drivers/staging/rtl8192u/r819xU_phy.c @@ -1044,93 +1044,6 @@ static void rtl8192_SetTxPowerLevel(struct net_device *dev, u8 channel) } } -/****************************************************************************** - * function: This function sets RF state on or off - * input: net_device *dev - * RT_RF_POWER_STATE eRFPowerState //Power State to set - * output: none - * return: none - * notice: - *****************************************************************************/ -bool rtl8192_SetRFPowerState(struct net_device *dev, - RT_RF_POWER_STATE eRFPowerState) -{ - bool bResult = true; - struct r8192_priv *priv = ieee80211_priv(dev); - - if (eRFPowerState == priv->ieee80211->eRFPowerState) - return false; - - if (priv->SetRFPowerStateInProgress) - return false; - - priv->SetRFPowerStateInProgress = true; - - switch (priv->rf_chip) { - case RF_8256: - switch (eRFPowerState) { - case eRfOn: - /* RF-A, RF-B */ - /* enable RF-Chip A/B - 0x860[4] */ - rtl8192_setBBreg(dev, rFPGA0_XA_RFInterfaceOE, BIT(4), - 0x1); - /* analog to digital on - 0x88c[9:8] */ - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0x300, - 0x3); - /* digital to analog on - 0x880[4:3] */ - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x18, - 0x3); - /* rx antenna on - 0xc04[1:0] */ - rtl8192_setBBreg(dev, rOFDM0_TRxPathEnable, 0x3, 0x3); - /* rx antenna on - 0xd04[1:0] */ - rtl8192_setBBreg(dev, rOFDM1_TRxPathEnable, 0x3, 0x3); - /* analog to digital part2 on - 0x880[6:5] */ - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x60, - 0x3); - - break; - - case eRfSleep: - - break; - - case eRfOff: - /* RF-A, RF-B */ - /* disable RF-Chip A/B - 0x860[4] */ - rtl8192_setBBreg(dev, rFPGA0_XA_RFInterfaceOE, BIT(4), - 0x0); - /* analog to digital off, for power save */ - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0xf00, - 0x0); /* 0x88c[11:8] */ - /* digital to analog off, for power save - 0x880[4:3] */ - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x18, - 0x0); - /* rx antenna off - 0xc04[3:0] */ - rtl8192_setBBreg(dev, rOFDM0_TRxPathEnable, 0xf, 0x0); - /* rx antenna off - 0xd04[3:0] */ - rtl8192_setBBreg(dev, rOFDM1_TRxPathEnable, 0xf, 0x0); - /* analog to digital part2 off, for power save */ - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x60, - 0x0); /* 0x880[6:5] */ - - break; - - default: - bResult = false; - RT_TRACE(COMP_ERR, "%s(): unknown state to set: 0x%X\n", - __func__, eRFPowerState); - break; - } - break; - default: - RT_TRACE(COMP_ERR, "Not support rf_chip(%x)\n", priv->rf_chip); - break; - } - priv->SetRFPowerStateInProgress = false; - - return bResult; -} - /****************************************************************************** * function: This function sets command table variable (struct sw_chnl_cmd). * input: sw_chnl_cmd *CmdTable //table to be set diff --git a/drivers/staging/rtl8192u/r819xU_phy.h b/drivers/staging/rtl8192u/r819xU_phy.h index 8c2933264407..bafaa6a90c50 100644 --- a/drivers/staging/rtl8192u/r819xU_phy.h +++ b/drivers/staging/rtl8192u/r819xU_phy.h @@ -74,8 +74,6 @@ void rtl8192_SetBWMode(struct net_device *dev, enum ht_extension_chan_offset offset); void rtl8192_SwChnl_WorkItem(struct net_device *dev); void rtl8192_SetBWModeWorkItem(struct net_device *dev); -bool rtl8192_SetRFPowerState(struct net_device *dev, - RT_RF_POWER_STATE eRFPowerState); void InitialGain819xUsb(struct net_device *dev, u8 Operation); void InitialGainOperateWorkItemCallBack(struct work_struct *work); -- 2.39.2