staging: rtl8192e: Move PowerSaveControl to r8192e_priv
authorMike McCormack <mikem@ring3k.org>
Thu, 3 Mar 2011 13:44:47 +0000 (22:44 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 7 Mar 2011 21:31:42 +0000 (13:31 -0800)
This variable is not used by the ieee80211 library, so
move it rtl8192e's private struct.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/rtl8192e/ieee80211/ieee80211.h
drivers/staging/rtl8192e/r8190_rtl8256.c
drivers/staging/rtl8192e/r8192E.h
drivers/staging/rtl8192e/r8192E_core.c
drivers/staging/rtl8192e/r8192E_wx.c

index 2c5750bfe98eb7c8f78b733603ed3bd0ec2ba15a..1998a0b4af92f5c4c24c614023e6b531354c744b 100644 (file)
@@ -2243,7 +2243,7 @@ struct ieee80211_device {
        //added by amy for AP roaming
        RT_LINK_DETECT_T        LinkDetectInfo;
         //added by amy for ps
-       RT_POWER_SAVE_CONTROL   PowerSaveControl;
+       //RT_POWER_SAVE_CONTROL PowerSaveControl;
 //}
        /* used if IEEE_SOFTMAC_TX_QUEUE is set */
        struct  tx_pending_t tx_pending;
index ed45bcdb8367735594a6c952de8c957f60baf13c..b4d45d6fd92e2ecc4299d78d89d955b3b1802e06 100644 (file)
@@ -324,7 +324,7 @@ static bool
 SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
-       PRT_POWER_SAVE_CONTROL  pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl));
+       PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;
        bool bResult = true;
 
        if (eRFPowerState == priv->eRFPowerState &&
index 6a6d09578d4b27a79a84a3bae9802f8d2be32175..6862bf22a9b1a3feb874dff751bc7182647ae825 100644 (file)
@@ -939,6 +939,7 @@ typedef struct r8192_priv
        // Use to calculate PWBD.
        RT_RF_POWER_STATE               eRFPowerState;
        RT_RF_CHANGE_SOURCE     RfOffReason;
+       RT_POWER_SAVE_CONTROL   PowerSaveControl;
        u8      bCckHighPower;
        long    undecorated_smoothed_pwdb;
        long    undecorated_smoothed_cck_adc_pwdb[4];
index fbdb5c1a8df63b54d8cfcbdddae07f3305bed0be..fbbede29b0307eaec4773eb1899b222296ea8d32 100644 (file)
@@ -1907,7 +1907,7 @@ static void rtl8192_init_priv_variable(struct net_device* dev)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
        u8 i;
-       PRT_POWER_SAVE_CONTROL  pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl));
+       PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;
 
        // Default Halt the NIC if RF is OFF.
        pPSC->RegRfPsLevel |= RT_RF_OFF_LEVL_HALT_NIC;
@@ -1948,8 +1948,8 @@ static void rtl8192_init_priv_variable(struct net_device* dev)
        //added by amy for power save
        priv->RfOffReason = 0;
        priv->bHwRfOffAction = 0;
-       priv->ieee80211->PowerSaveControl.bInactivePs = true;
-       priv->ieee80211->PowerSaveControl.bIPSModeBackup = false;
+       priv->PowerSaveControl.bInactivePs = true;
+       priv->PowerSaveControl.bIPSModeBackup = false;
 
        priv->ieee80211->current_network.beacon_interval = DEFAULT_BEACONINTERVAL;
        priv->ieee80211->iw_mode = IW_MODE_INFRA;
@@ -3090,7 +3090,7 @@ rtl819x_ifcheck_resetornot(struct net_device *dev)
 void InactivePsWorkItemCallback(struct net_device *dev)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
-       PRT_POWER_SAVE_CONTROL  pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl));
+       PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;
 
        RT_TRACE(COMP_POWER, "InactivePsWorkItemCallback() --------->\n");
        //
@@ -3163,7 +3163,7 @@ bool MgntActSet_802_11_PowerSaveMode(struct net_device *dev,      u8 rtPsMode)
 void LeisurePSEnter(struct net_device *dev)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
-       PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl));
+       PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;
 
        if(!((priv->ieee80211->iw_mode == IW_MODE_INFRA) &&
                (priv->ieee80211->state == IEEE80211_LINKED)) ||
@@ -3193,7 +3193,7 @@ void LeisurePSEnter(struct net_device *dev)
 void LeisurePSLeave(struct net_device *dev)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
-       PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl));
+       PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;
 
        if (pPSC->bLeisurePs)
        {
@@ -3213,7 +3213,7 @@ void
 IPSEnter(struct net_device *dev)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
-       PRT_POWER_SAVE_CONTROL          pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl));
+       PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;
        RT_RF_POWER_STATE                       rtState;
 
        if (pPSC->bInactivePs)
@@ -3248,7 +3248,7 @@ void
 IPSLeave(struct net_device *dev)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
-       PRT_POWER_SAVE_CONTROL  pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl));
+       PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;
        RT_RF_POWER_STATE       rtState;
 
        if (pPSC->bInactivePs)
@@ -3280,7 +3280,7 @@ void ieee80211_ips_leave_wq(struct net_device *dev)
        RT_RF_POWER_STATE       rtState;
        rtState = priv->eRFPowerState;
 
-       if(priv->ieee80211->PowerSaveControl.bInactivePs){
+       if (priv->PowerSaveControl.bInactivePs){
                if(rtState == eRfOff){
                        if(priv->RfOffReason > RF_CHANGE_BY_IPS)
                        {
@@ -3347,7 +3347,7 @@ static void rtl819x_watchdog_wqcallback(struct work_struct *work)
                if((ieee->iw_mode == IW_MODE_INFRA) && (ieee->state == IEEE80211_NOLINK) &&
                    (priv->eRFPowerState == eRfOn) && !ieee->is_set_key &&
                    (!ieee->proto_stoppping) && !ieee->wx_set_enc){
-                       if(ieee->PowerSaveControl.ReturnPoint == IPS_CALLBACK_NONE){
+                       if (priv->PowerSaveControl.ReturnPoint == IPS_CALLBACK_NONE){
                                IPSEnter(dev);
                        }
                }
@@ -5046,7 +5046,7 @@ void setKey(      struct net_device *dev,
        struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
        RT_RF_POWER_STATE       rtState;
        rtState = priv->eRFPowerState;
-       if(priv->ieee80211->PowerSaveControl.bInactivePs){
+       if (priv->PowerSaveControl.bInactivePs){
                if(rtState == eRfOff){
                        if(priv->RfOffReason > RF_CHANGE_BY_IPS)
                        {
@@ -5110,7 +5110,7 @@ bool NicIFEnableNIC(struct net_device* dev)
 {
        RT_STATUS init_status = RT_STATUS_SUCCESS;
        struct r8192_priv* priv = ieee80211_priv(dev);
-       PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl));
+       PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;
 
        //YJ,add,091109
        if (priv->up == 0){
index cf6e231d5600c244ea62882d9340aa1608cb863f..7ce9f6e78307432721fdae400bfa8359f808451f 100644 (file)
@@ -220,7 +220,7 @@ static int r8192_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
 #ifdef ENABLE_IPS
        if(wrqu->mode == IW_MODE_ADHOC){
 
-               if(priv->ieee80211->PowerSaveControl.bInactivePs){
+               if (priv->PowerSaveControl.bInactivePs) {
                        if(rtState == eRfOff){
                                if(priv->RfOffReason > RF_CHANGE_BY_IPS)
                                {
@@ -406,7 +406,7 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
 #ifdef ENABLE_IPS
        priv->ieee80211->actscanning = true;
        if(priv->ieee80211->state != IEEE80211_LINKED){
-               if(priv->ieee80211->PowerSaveControl.bInactivePs){
+               if (priv->PowerSaveControl.bInactivePs) {
                        if(rtState == eRfOff){
                                if(priv->RfOffReason > RF_CHANGE_BY_IPS)
                                {
@@ -1017,7 +1017,7 @@ static int r8192_wx_adapter_power_status(struct net_device *dev,
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
 #ifdef ENABLE_LPS
-       PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl));
+       PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;
        struct ieee80211_device* ieee = priv->ieee80211;
 #endif
        down(&priv->wx_sem);