Commit de7c885a authored by Larry Finger's avatar Larry Finger

staging: rtl8192e: Convert typedef RT_RF_POWER_STATE to enum rt_rf_power_state

Remove typedef from enum.
Rename enum.
Rename uses.
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
parent f6ce577e
...@@ -108,7 +108,7 @@ cmpk_count_txstatistic( ...@@ -108,7 +108,7 @@ cmpk_count_txstatistic(
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
#ifdef ENABLE_PS #ifdef ENABLE_PS
RT_RF_POWER_STATE rtState; enum rt_rf_power_state rtState;
pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_RF_STATE, (pu1Byte)(&rtState)); pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_RF_STATE, (pu1Byte)(&rtState));
...@@ -272,7 +272,7 @@ static void cmpk_count_tx_status( struct net_device *dev, ...@@ -272,7 +272,7 @@ static void cmpk_count_tx_status( struct net_device *dev,
#ifdef ENABLE_PS #ifdef ENABLE_PS
RT_RF_POWER_STATE rtstate; enum rt_rf_power_state rtstate;
pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_RF_STATE, (pu1Byte)(&rtState)); pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_RF_STATE, (pu1Byte)(&rtState));
......
...@@ -1377,7 +1377,7 @@ PHY_SetRtl8192eRfOff(struct net_device* dev ) ...@@ -1377,7 +1377,7 @@ PHY_SetRtl8192eRfOff(struct net_device* dev )
bool bool
SetRFPowerState8190( SetRFPowerState8190(
struct net_device* dev, struct net_device* dev,
RT_RF_POWER_STATE eRFPowerState enum rt_rf_power_state eRFPowerState
) )
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
...@@ -1547,7 +1547,7 @@ SetRFPowerState8190( ...@@ -1547,7 +1547,7 @@ SetRFPowerState8190(
bool bool
SetRFPowerState( SetRFPowerState(
struct net_device* dev, struct net_device* dev,
RT_RF_POWER_STATE eRFPowerState enum rt_rf_power_state eRFPowerState
) )
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
......
...@@ -123,7 +123,7 @@ extern void PHY_SetRtl8192eRfOff(struct net_device *dev); ...@@ -123,7 +123,7 @@ extern void PHY_SetRtl8192eRfOff(struct net_device *dev);
bool bool
SetRFPowerState( SetRFPowerState(
struct net_device* dev, struct net_device* dev,
RT_RF_POWER_STATE eRFPowerState enum rt_rf_power_state eRFPowerState
); );
#define PHY_SetRFPowerState SetRFPowerState #define PHY_SetRFPowerState SetRFPowerState
......
...@@ -119,7 +119,7 @@ void setKey(struct net_device *dev, ...@@ -119,7 +119,7 @@ void setKey(struct net_device *dev,
u16 usConfig = 0; u16 usConfig = 0;
u8 i; u8 i;
struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev); struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
RT_RF_POWER_STATE rtState; enum rt_rf_power_state rtState;
rtState = priv->rtllib->eRFPowerState; rtState = priv->rtllib->eRFPowerState;
if (priv->rtllib->PowerSaveControl.bInactivePs){ if (priv->rtllib->PowerSaveControl.bInactivePs){
if (rtState == eRfOff){ if (rtState == eRfOff){
......
...@@ -349,7 +349,7 @@ void write_nic_word(struct net_device *dev, int x,u16 y) ...@@ -349,7 +349,7 @@ void write_nic_word(struct net_device *dev, int x,u16 y)
bool bool
MgntActSet_RF_State( MgntActSet_RF_State(
struct net_device* dev, struct net_device* dev,
RT_RF_POWER_STATE StateToSet, enum rt_rf_power_state StateToSet,
RT_RF_CHANGE_SOURCE ChangeSource, RT_RF_CHANGE_SOURCE ChangeSource,
bool ProtectOrNot bool ProtectOrNot
) )
...@@ -358,7 +358,7 @@ MgntActSet_RF_State( ...@@ -358,7 +358,7 @@ MgntActSet_RF_State(
struct rtllib_device * ieee = priv->rtllib; struct rtllib_device * ieee = priv->rtllib;
bool bActionAllowed = false; bool bActionAllowed = false;
bool bConnectBySSID = false; bool bConnectBySSID = false;
RT_RF_POWER_STATE rtState; enum rt_rf_power_state rtState;
u16 RFWaitCounter = 0; u16 RFWaitCounter = 0;
unsigned long flag; unsigned long flag;
RT_TRACE((COMP_PS | COMP_RF), "===>MgntActSet_RF_State(): StateToSet(%d)\n",StateToSet); RT_TRACE((COMP_PS | COMP_RF), "===>MgntActSet_RF_State(): StateToSet(%d)\n",StateToSet);
...@@ -1495,7 +1495,7 @@ rtl819x_ifcheck_resetornot(struct net_device *dev) ...@@ -1495,7 +1495,7 @@ rtl819x_ifcheck_resetornot(struct net_device *dev)
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
enum reset_type TxResetType = RESET_TYPE_NORESET; enum reset_type TxResetType = RESET_TYPE_NORESET;
enum reset_type RxResetType = RESET_TYPE_NORESET; enum reset_type RxResetType = RESET_TYPE_NORESET;
RT_RF_POWER_STATE rfState; enum rt_rf_power_state rfState;
rfState = priv->rtllib->eRFPowerState; rfState = priv->rtllib->eRFPowerState;
......
...@@ -1089,7 +1089,7 @@ bool NicIFDisableNIC(struct net_device* dev); ...@@ -1089,7 +1089,7 @@ bool NicIFDisableNIC(struct net_device* dev);
bool bool
MgntActSet_RF_State( MgntActSet_RF_State(
struct net_device* dev, struct net_device* dev,
RT_RF_POWER_STATE StateToSet, enum rt_rf_power_state StateToSet,
RT_RF_CHANGE_SOURCE ChangeSource, RT_RF_CHANGE_SOURCE ChangeSource,
bool ProtectOrNot bool ProtectOrNot
); );
......
...@@ -2671,7 +2671,7 @@ extern void dm_CheckRfCtrlGPIO(void *data) ...@@ -2671,7 +2671,7 @@ extern void dm_CheckRfCtrlGPIO(void *data)
struct r8192_priv *priv = container_of_dwork_rsl(data, struct r8192_priv,gpio_change_rf_wq); struct r8192_priv *priv = container_of_dwork_rsl(data, struct r8192_priv,gpio_change_rf_wq);
struct net_device *dev = priv->rtllib->dev; struct net_device *dev = priv->rtllib->dev;
u8 tmp1byte; u8 tmp1byte;
RT_RF_POWER_STATE eRfPowerStateToSet; enum rt_rf_power_state eRfPowerStateToSet;
bool bActuallySet = false; bool bActuallySet = false;
char *argv[3]; char *argv[3];
......
...@@ -134,7 +134,7 @@ IPSEnter(struct net_device *dev) ...@@ -134,7 +134,7 @@ IPSEnter(struct net_device *dev)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)(&(priv->rtllib->PowerSaveControl)); struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)(&(priv->rtllib->PowerSaveControl));
RT_RF_POWER_STATE rtState; enum rt_rf_power_state rtState;
if (pPSC->bInactivePs) if (pPSC->bInactivePs)
{ {
...@@ -157,7 +157,7 @@ IPSLeave(struct net_device *dev) ...@@ -157,7 +157,7 @@ IPSLeave(struct net_device *dev)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)(&(priv->rtllib->PowerSaveControl)); struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)(&(priv->rtllib->PowerSaveControl));
RT_RF_POWER_STATE rtState; enum rt_rf_power_state rtState;
if (pPSC->bInactivePs) if (pPSC->bInactivePs)
{ {
...@@ -184,7 +184,7 @@ void IPSLeave_wq(void *data) ...@@ -184,7 +184,7 @@ void IPSLeave_wq(void *data)
void rtllib_ips_leave_wq(struct net_device *dev) void rtllib_ips_leave_wq(struct net_device *dev)
{ {
struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev); struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
RT_RF_POWER_STATE rtState; enum rt_rf_power_state rtState;
rtState = priv->rtllib->eRFPowerState; rtState = priv->rtllib->eRFPowerState;
if (priv->rtllib->PowerSaveControl.bInactivePs){ if (priv->rtllib->PowerSaveControl.bInactivePs){
......
...@@ -316,7 +316,7 @@ static int r8192_wx_set_mode(struct net_device *dev, struct iw_request_info *a, ...@@ -316,7 +316,7 @@ static int r8192_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
struct rtllib_device* ieee = netdev_priv_rsl(dev); struct rtllib_device* ieee = netdev_priv_rsl(dev);
RT_RF_POWER_STATE rtState; enum rt_rf_power_state rtState;
int ret; int ret;
if (priv->bHwRadioOff == true) if (priv->bHwRadioOff == true)
...@@ -447,7 +447,7 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a, ...@@ -447,7 +447,7 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
struct rtllib_device* ieee = priv->rtllib; struct rtllib_device* ieee = priv->rtllib;
RT_RF_POWER_STATE rtState; enum rt_rf_power_state rtState;
int ret; int ret;
if (!(ieee->softmac_features & IEEE_SOFTMAC_SCAN)){ if (!(ieee->softmac_features & IEEE_SOFTMAC_SCAN)){
......
...@@ -1824,12 +1824,11 @@ struct ibss_parms { ...@@ -1824,12 +1824,11 @@ struct ibss_parms {
}; };
#define MAX_NUM_RATES 264 #define MAX_NUM_RATES 264
typedef enum _RT_RF_POWER_STATE enum rt_rf_power_state {
{
eRfOn, eRfOn,
eRfSleep, eRfSleep,
eRfOff eRfOff
} RT_RF_POWER_STATE; };
#define MAX_SUPPORT_WOL_PATTERN_NUM 8 #define MAX_SUPPORT_WOL_PATTERN_NUM 8
...@@ -1859,7 +1858,7 @@ struct rt_pwr_save_ctrl { ...@@ -1859,7 +1858,7 @@ struct rt_pwr_save_ctrl {
bool bIPSModeBackup; bool bIPSModeBackup;
bool bHaltAdapterClkRQ; bool bHaltAdapterClkRQ;
bool bSwRfProcessing; bool bSwRfProcessing;
RT_RF_POWER_STATE eInactivePowerState; enum rt_rf_power_state eInactivePowerState;
struct work_struct InactivePsWorkItem; struct work_struct InactivePsWorkItem;
struct timer_list InactivePsTimer; struct timer_list InactivePsTimer;
...@@ -2125,7 +2124,7 @@ struct rtllib_device { ...@@ -2125,7 +2124,7 @@ struct rtllib_device {
bool FirstIe_InScan; bool FirstIe_InScan;
bool be_scan_inprogress; bool be_scan_inprogress;
bool beinretry; bool beinretry;
RT_RF_POWER_STATE eRFPowerState; enum rt_rf_power_state eRFPowerState;
RT_RF_CHANGE_SOURCE RfOffReason; RT_RF_CHANGE_SOURCE RfOffReason;
bool is_set_key; bool is_set_key;
bool wx_set_enc; bool wx_set_enc;
......
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