Commit ca990011 authored by Larry Finger's avatar Larry Finger

staging: rtl8192e: Convert typedef RT_POWER_SAVE_CONTROL to struct rt_pwr_save_ctrl

Remove typedef from struct.
Rename struct.
Rename uses.
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
parent 628c30e8
...@@ -1381,7 +1381,7 @@ SetRFPowerState8190( ...@@ -1381,7 +1381,7 @@ SetRFPowerState8190(
) )
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)(&(priv->rtllib->PowerSaveControl));
bool bResult = true; bool bResult = true;
u8 i = 0, QueueID = 0; u8 i = 0, QueueID = 0;
struct rtl8192_tx_ring *ring = NULL; struct rtl8192_tx_ring *ring = NULL;
......
...@@ -1003,7 +1003,7 @@ void rtl8192_SetWirelessMode(struct net_device* dev, u8 wireless_mode) ...@@ -1003,7 +1003,7 @@ void rtl8192_SetWirelessMode(struct net_device* dev, u8 wireless_mode)
int _rtl8192_sta_up(struct net_device *dev,bool is_silent_reset) int _rtl8192_sta_up(struct net_device *dev,bool is_silent_reset)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)(&(priv->rtllib->PowerSaveControl));
bool init_status = true; bool init_status = true;
priv->bDriverIsGoingToUnload = false; priv->bDriverIsGoingToUnload = false;
priv->bdisable_nic = false; priv->bdisable_nic = false;
...@@ -1153,7 +1153,7 @@ static void rtl8192_init_priv_handler(struct net_device* dev) ...@@ -1153,7 +1153,7 @@ static void rtl8192_init_priv_handler(struct net_device* dev)
static void rtl8192_init_priv_constant(struct net_device* dev) static void rtl8192_init_priv_constant(struct net_device* dev)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)(&(priv->rtllib->PowerSaveControl));
pPSC->RegMaxLPSAwakeIntvl = 5; pPSC->RegMaxLPSAwakeIntvl = 5;
...@@ -1681,7 +1681,7 @@ void rtl819x_watchdog_wqcallback(void *data) ...@@ -1681,7 +1681,7 @@ void rtl819x_watchdog_wqcallback(void *data)
RESET_TYPE ResetType = RESET_TYPE_NORESET; RESET_TYPE ResetType = RESET_TYPE_NORESET;
static u8 check_reset_cnt = 0; static u8 check_reset_cnt = 0;
unsigned long flags; unsigned long flags;
PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)(&(priv->rtllib->PowerSaveControl));
bool bBusyTraffic = false; bool bBusyTraffic = false;
bool bHigherBusyTraffic = false; bool bHigherBusyTraffic = false;
bool bHigherBusyRxTraffic = false; bool bHigherBusyRxTraffic = false;
...@@ -3139,7 +3139,7 @@ bool NicIFEnableNIC(struct net_device* dev) ...@@ -3139,7 +3139,7 @@ bool NicIFEnableNIC(struct net_device* dev)
{ {
bool init_status = true; bool init_status = true;
struct r8192_priv* priv = rtllib_priv(dev); struct r8192_priv* priv = rtllib_priv(dev);
PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)(&(priv->rtllib->PowerSaveControl));
if (IS_NIC_DOWN(priv)){ if (IS_NIC_DOWN(priv)){
RT_TRACE(COMP_ERR, "ERR!!! %s(): Driver is already down!\n",__func__); RT_TRACE(COMP_ERR, "ERR!!! %s(): Driver is already down!\n",__func__);
......
...@@ -116,7 +116,7 @@ void rtl8192_hw_to_sleep(struct net_device *dev, u32 th, u32 tl) ...@@ -116,7 +116,7 @@ void rtl8192_hw_to_sleep(struct net_device *dev, u32 th, u32 tl)
void InactivePsWorkItemCallback(struct net_device *dev) void InactivePsWorkItemCallback(struct net_device *dev)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)(&(priv->rtllib->PowerSaveControl));
RT_TRACE(COMP_PS, "InactivePsWorkItemCallback() ---------> \n"); RT_TRACE(COMP_PS, "InactivePsWorkItemCallback() ---------> \n");
pPSC->bSwRfProcessing = true; pPSC->bSwRfProcessing = true;
...@@ -133,7 +133,7 @@ void ...@@ -133,7 +133,7 @@ void
IPSEnter(struct net_device *dev) IPSEnter(struct net_device *dev)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)(&(priv->rtllib->PowerSaveControl));
RT_RF_POWER_STATE rtState; RT_RF_POWER_STATE rtState;
if (pPSC->bInactivePs) if (pPSC->bInactivePs)
...@@ -156,7 +156,7 @@ void ...@@ -156,7 +156,7 @@ void
IPSLeave(struct net_device *dev) IPSLeave(struct net_device *dev)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)(&(priv->rtllib->PowerSaveControl));
RT_RF_POWER_STATE rtState; RT_RF_POWER_STATE rtState;
if (pPSC->bInactivePs) if (pPSC->bInactivePs)
...@@ -240,7 +240,7 @@ bool MgntActSet_802_11_PowerSaveMode(struct net_device *dev, u8 rtPsMode) ...@@ -240,7 +240,7 @@ bool MgntActSet_802_11_PowerSaveMode(struct net_device *dev, u8 rtPsMode)
void LeisurePSEnter(struct net_device *dev) void LeisurePSEnter(struct net_device *dev)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)(&(priv->rtllib->PowerSaveControl));
RT_TRACE(COMP_PS, "LeisurePSEnter()...\n"); RT_TRACE(COMP_PS, "LeisurePSEnter()...\n");
RT_TRACE(COMP_PS, "pPSC->bLeisurePs = %d, ieee->ps = %d,pPSC->LpsIdleCount is %d,RT_CHECK_FOR_HANG_PERIOD is %d\n", RT_TRACE(COMP_PS, "pPSC->bLeisurePs = %d, ieee->ps = %d,pPSC->LpsIdleCount is %d,RT_CHECK_FOR_HANG_PERIOD is %d\n",
...@@ -272,7 +272,7 @@ void LeisurePSEnter(struct net_device *dev) ...@@ -272,7 +272,7 @@ void LeisurePSEnter(struct net_device *dev)
void LeisurePSLeave(struct net_device *dev) void LeisurePSLeave(struct net_device *dev)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)(&(priv->rtllib->PowerSaveControl));
RT_TRACE(COMP_PS, "LeisurePSLeave()...\n"); RT_TRACE(COMP_PS, "LeisurePSLeave()...\n");
......
...@@ -218,7 +218,7 @@ static int r8192_wx_adapter_power_status(struct net_device *dev, ...@@ -218,7 +218,7 @@ static int r8192_wx_adapter_power_status(struct net_device *dev,
union iwreq_data *wrqu, char *extra) union iwreq_data *wrqu, char *extra)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)(&(priv->rtllib->PowerSaveControl));
struct rtllib_device* ieee = priv->rtllib; struct rtllib_device* ieee = priv->rtllib;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -266,7 +266,7 @@ static int r8192se_wx_set_lps_awake_interval(struct net_device *dev, ...@@ -266,7 +266,7 @@ static int r8192se_wx_set_lps_awake_interval(struct net_device *dev,
union iwreq_data *wrqu, char *extra) union iwreq_data *wrqu, char *extra)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)(&(priv->rtllib->PowerSaveControl));
down(&priv->wx_sem); down(&priv->wx_sem);
......
...@@ -1859,8 +1859,7 @@ struct rt_pm_wol_info { ...@@ -1859,8 +1859,7 @@ struct rt_pm_wol_info {
WOLPATTERN_TYPE PatternType; WOLPATTERN_TYPE PatternType;
};//, *struct rt_pm_wol_info *; };//, *struct rt_pm_wol_info *;
typedef struct _RT_POWER_SAVE_CONTROL struct rt_pwr_save_ctrl {
{
bool bInactivePs; bool bInactivePs;
bool bIPSModeBackup; bool bIPSModeBackup;
...@@ -1917,7 +1916,7 @@ typedef struct _RT_POWER_SAVE_CONTROL ...@@ -1917,7 +1916,7 @@ typedef struct _RT_POWER_SAVE_CONTROL
u8 oWLANMode; u8 oWLANMode;
struct rt_pm_wol_info PmWoLPatternInfo[MAX_SUPPORT_WOL_PATTERN_NUM]; struct rt_pm_wol_info PmWoLPatternInfo[MAX_SUPPORT_WOL_PATTERN_NUM];
}RT_POWER_SAVE_CONTROL,*PRT_POWER_SAVE_CONTROL; };//,*struct rt_pwr_save_ctrl *;
typedef u32 RT_RF_CHANGE_SOURCE; typedef u32 RT_RF_CHANGE_SOURCE;
#define RF_CHANGE_BY_SW BIT31 #define RF_CHANGE_BY_SW BIT31
...@@ -2391,7 +2390,7 @@ struct rtllib_device { ...@@ -2391,7 +2390,7 @@ struct rtllib_device {
RT_LINK_DETECT_T LinkDetectInfo; RT_LINK_DETECT_T LinkDetectInfo;
bool bIsAggregateFrame; bool bIsAggregateFrame;
RT_POWER_SAVE_CONTROL PowerSaveControl; struct rt_pwr_save_ctrl PowerSaveControl;
u8 amsdu_in_process; u8 amsdu_in_process;
/* used if IEEE_SOFTMAC_TX_QUEUE is set */ /* used if IEEE_SOFTMAC_TX_QUEUE is set */
......
...@@ -1577,7 +1577,7 @@ void rtllib_associate_step2(struct rtllib_device *ieee) ...@@ -1577,7 +1577,7 @@ void rtllib_associate_step2(struct rtllib_device *ieee)
void rtllib_associate_complete_wq(void *data) void rtllib_associate_complete_wq(void *data)
{ {
struct rtllib_device *ieee = (struct rtllib_device *)container_of_work_rsl(data, struct rtllib_device, associate_complete_wq); struct rtllib_device *ieee = (struct rtllib_device *)container_of_work_rsl(data, struct rtllib_device, associate_complete_wq);
PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(ieee->PowerSaveControl)); struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)(&(ieee->PowerSaveControl));
printk(KERN_INFO "Associated successfully\n"); printk(KERN_INFO "Associated successfully\n");
if (ieee->is_silent_reset == 0){ if (ieee->is_silent_reset == 0){
printk("normal associate\n"); printk("normal associate\n");
...@@ -2041,7 +2041,7 @@ short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u32 *time_h, u32 *time_l) ...@@ -2041,7 +2041,7 @@ short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u32 *time_h, u32 *time_l)
{ {
int timeout = ieee->ps_timeout; int timeout = ieee->ps_timeout;
u8 dtim; u8 dtim;
PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(ieee->PowerSaveControl)); struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)(&(ieee->PowerSaveControl));
/*if (ieee->ps == RTLLIB_PS_DISABLED || /*if (ieee->ps == RTLLIB_PS_DISABLED ||
ieee->iw_mode != IW_MODE_INFRA || ieee->iw_mode != IW_MODE_INFRA ||
ieee->state != RTLLIB_LINKED) ieee->state != RTLLIB_LINKED)
......
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