Commit f434f9d5 authored by Mateusz Kulikowski's avatar Mateusz Kulikowski Committed by Greg Kroah-Hartman

staging: rtl8192e: Rename MgntActSet_RF_State

Use naming schema found in other rtlwifi devices.
Rename MgntActSet_RF_State to rtl92e_set_rf_state.
Signed-off-by: default avatarMateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a643d927
......@@ -881,18 +881,18 @@ bool rtl92e_start_adapter(struct net_device *dev)
RT_TRACE((COMP_INIT | COMP_RF | COMP_POWER),
"%s(): Turn off RF for RegRfOff ----------\n",
__func__);
MgntActSet_RF_State(dev, eRfOff, RF_CHANGE_BY_SW, true);
rtl92e_set_rf_state(dev, eRfOff, RF_CHANGE_BY_SW, true);
} else if (priv->rtllib->RfOffReason > RF_CHANGE_BY_PS) {
RT_TRACE((COMP_INIT|COMP_RF|COMP_POWER),
"%s(): Turn off RF for RfOffReason(%d) ----------\n",
__func__, priv->rtllib->RfOffReason);
MgntActSet_RF_State(dev, eRfOff, priv->rtllib->RfOffReason,
rtl92e_set_rf_state(dev, eRfOff, priv->rtllib->RfOffReason,
true);
} else if (priv->rtllib->RfOffReason >= RF_CHANGE_BY_IPS) {
RT_TRACE((COMP_INIT|COMP_RF|COMP_POWER),
"%s(): Turn off RF for RfOffReason(%d) ----------\n",
__func__, priv->rtllib->RfOffReason);
MgntActSet_RF_State(dev, eRfOff, priv->rtllib->RfOffReason,
rtl92e_set_rf_state(dev, eRfOff, priv->rtllib->RfOffReason,
true);
} else {
RT_TRACE((COMP_INIT|COMP_RF|COMP_POWER), "%s(): RF-ON\n",
......
......@@ -149,7 +149,7 @@ void write_nic_word(struct net_device *dev, int x, u16 y)
/****************************************************************************
-----------------------------GENERAL FUNCTION-------------------------
*****************************************************************************/
bool MgntActSet_RF_State(struct net_device *dev,
bool rtl92e_set_rf_state(struct net_device *dev,
enum rt_rf_power_state StateToSet,
RT_RF_CHANGE_SOURCE ChangeSource,
bool ProtectOrNot)
......@@ -163,7 +163,7 @@ bool MgntActSet_RF_State(struct net_device *dev,
unsigned long flag;
RT_TRACE((COMP_PS | COMP_RF),
"===>MgntActSet_RF_State(): StateToSet(%d)\n", StateToSet);
"===>rtl92e_set_rf_state(): StateToSet(%d)\n", StateToSet);
ProtectOrNot = false;
......@@ -174,13 +174,13 @@ bool MgntActSet_RF_State(struct net_device *dev,
if (priv->RFChangeInProgress) {
spin_unlock_irqrestore(&priv->rf_ps_lock, flag);
RT_TRACE((COMP_PS | COMP_RF),
"MgntActSet_RF_State(): RF Change in progress! Wait to set..StateToSet(%d).\n",
"rtl92e_set_rf_state(): RF Change in progress! Wait to set..StateToSet(%d).\n",
StateToSet);
while (priv->RFChangeInProgress) {
RFWaitCounter++;
RT_TRACE((COMP_PS | COMP_RF),
"MgntActSet_RF_State(): Wait 1 ms (%d times)...\n",
"rtl92e_set_rf_state(): Wait 1 ms (%d times)...\n",
RFWaitCounter);
mdelay(1);
......@@ -218,7 +218,7 @@ bool MgntActSet_RF_State(struct net_device *dev,
bConnectBySSID = true;
} else {
RT_TRACE((COMP_PS | COMP_RF),
"MgntActSet_RF_State - eRfon reject pMgntInfo->RfOffReason= 0x%x, ChangeSource=0x%X\n",
"rtl92e_set_rf_state - eRfon reject pMgntInfo->RfOffReason= 0x%x, ChangeSource=0x%X\n",
priv->rtllib->RfOffReason, ChangeSource);
}
......@@ -255,7 +255,7 @@ bool MgntActSet_RF_State(struct net_device *dev,
if (bActionAllowed) {
RT_TRACE((COMP_PS | COMP_RF),
"MgntActSet_RF_State(): Action is allowed.... StateToSet(%d), RfOffReason(%#X)\n",
"rtl92e_set_rf_state(): Action is allowed.... StateToSet(%d), RfOffReason(%#X)\n",
StateToSet, priv->rtllib->RfOffReason);
PHY_SetRFPowerState(dev, StateToSet);
if (StateToSet == eRfOn) {
......@@ -268,7 +268,7 @@ bool MgntActSet_RF_State(struct net_device *dev,
}
} else {
RT_TRACE((COMP_PS | COMP_RF),
"MgntActSet_RF_State(): Action is rejected.... StateToSet(%d), ChangeSource(%#X), RfOffReason(%#X)\n",
"rtl92e_set_rf_state(): Action is rejected.... StateToSet(%d), ChangeSource(%#X), RfOffReason(%#X)\n",
StateToSet, ChangeSource, priv->rtllib->RfOffReason);
}
......@@ -278,7 +278,7 @@ bool MgntActSet_RF_State(struct net_device *dev,
spin_unlock_irqrestore(&priv->rf_ps_lock, flag);
}
RT_TRACE((COMP_PS | COMP_RF), "<===MgntActSet_RF_State()\n");
RT_TRACE((COMP_PS | COMP_RF), "<===rtl92e_set_rf_state()\n");
return bActionAllowed;
}
......
......@@ -617,7 +617,7 @@ void rtl8192_record_rxdesc_forlateruse(struct rtllib_rx_stats *psrc_stats,
bool NicIFEnableNIC(struct net_device *dev);
bool NicIFDisableNIC(struct net_device *dev);
bool MgntActSet_RF_State(struct net_device *dev,
bool rtl92e_set_rf_state(struct net_device *dev,
enum rt_rf_power_state StateToSet,
RT_RF_CHANGE_SOURCE ChangeSource,
bool ProtectOrNot);
......
......@@ -1892,7 +1892,7 @@ static void dm_CheckRfCtrlGPIO(void *data)
if (bActuallySet) {
mdelay(1000);
priv->bHwRfOffAction = 1;
MgntActSet_RF_State(dev, eRfPowerStateToSet, RF_CHANGE_BY_HW,
rtl92e_set_rf_state(dev, eRfPowerStateToSet, RF_CHANGE_BY_HW,
true);
if (priv->bHwRadioOff)
argv[1] = "RFOFF";
......
......@@ -45,7 +45,7 @@ int rtl8192E_suspend(struct pci_dev *pdev, pm_message_t state)
netif_device_detach(dev);
if (!priv->rtllib->bSupportRemoteWakeUp) {
MgntActSet_RF_State(dev, eRfOff, RF_CHANGE_BY_INIT, true);
rtl92e_set_rf_state(dev, eRfOff, RF_CHANGE_BY_INIT, true);
ulRegRead = read_nic_dword(dev, CPU_GEN);
ulRegRead |= CPU_GEN_SYSTEM_RESET;
write_nic_dword(dev, CPU_GEN, ulRegRead);
......@@ -108,7 +108,7 @@ int rtl8192E_resume(struct pci_dev *pdev)
dev->netdev_ops->ndo_open(dev);
if (!priv->rtllib->bSupportRemoteWakeUp)
MgntActSet_RF_State(dev, eRfOn, RF_CHANGE_BY_INIT, true);
rtl92e_set_rf_state(dev, eRfOn, RF_CHANGE_BY_INIT, true);
out:
RT_TRACE(COMP_POWER, "<================r8192E resume call.\n");
......
......@@ -45,7 +45,7 @@ static void rtl8192_hw_sleep_down(struct net_device *dev)
spin_unlock_irqrestore(&priv->rf_ps_lock, flags);
RT_TRACE(COMP_DBG, "%s()============>come to sleep down\n", __func__);
MgntActSet_RF_State(dev, eRfSleep, RF_CHANGE_BY_PS, false);
rtl92e_set_rf_state(dev, eRfSleep, RF_CHANGE_BY_PS, false);
}
void rtl8192_hw_sleep_wq(void *data)
......@@ -74,7 +74,7 @@ void rtl8192_hw_wakeup(struct net_device *dev)
}
spin_unlock_irqrestore(&priv->rf_ps_lock, flags);
RT_TRACE(COMP_PS, "%s()============>come to wake up\n", __func__);
MgntActSet_RF_State(dev, eRfOn, RF_CHANGE_BY_PS, false);
rtl92e_set_rf_state(dev, eRfOn, RF_CHANGE_BY_PS, false);
}
void rtl8192_hw_wakeup_wq(void *data)
......@@ -133,7 +133,7 @@ static void InactivePsWorkItemCallback(struct net_device *dev)
RT_TRACE(COMP_PS, "InactivePsWorkItemCallback(): Set RF to %s.\n",
pPSC->eInactivePowerState == eRfOff ? "OFF" : "ON");
MgntActSet_RF_State(dev, pPSC->eInactivePowerState, RF_CHANGE_BY_IPS,
rtl92e_set_rf_state(dev, pPSC->eInactivePowerState, RF_CHANGE_BY_IPS,
false);
pPSC->bSwRfProcessing = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment