]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: rtl8192e: Move eRFPowerState to r8192e_priv struct
authorMike McCormack <mikem@ring3k.org>
Thu, 3 Mar 2011 13:41:35 +0000 (22:41 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 7 Mar 2011 21:31:41 +0000 (13:31 -0800)
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/ieee80211/ieee80211_softmac.c
drivers/staging/rtl8192e/r8190_rtl8256.c
drivers/staging/rtl8192e/r8192E.h
drivers/staging/rtl8192e/r8192E_core.c
drivers/staging/rtl8192e/r8192E_wx.c
drivers/staging/rtl8192e/r819xE_phy.c

index 8501c4aced6fd3898933ce462be5516e7e6a9b88..8d2b5758d32f4ecfc323fdd434e28c265900c799 100644 (file)
@@ -1988,7 +1988,6 @@ struct ieee80211_device {
        RT_PS_MODE      dot11PowerSaveMode; // Power save mode configured.
        bool actscanning;
        bool beinretry;
-       RT_RF_POWER_STATE               eRFPowerState;
        RT_RF_CHANGE_SOURCE     RfOffReason;
        bool is_set_key;
        //11n spec related I wonder if These info structure need to be moved out of ieee80211_device
index 2640a4f2e81fe9c57e7dee6e99d60aea3ca58d8b..012256c0fc5244ce1aef6369c017d9d3df5d78f3 100644 (file)
@@ -1420,17 +1420,6 @@ void ieee80211_associate_procedure_wq(struct work_struct *work)
        printk("===>%s(), chan:%d\n", __FUNCTION__, ieee->current_network.channel);
        HTSetConnectBwMode(ieee, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT);
 
-#ifdef ENABLE_IPS
-       if(ieee->eRFPowerState == eRfOff)
-       {
-               if(ieee->ieee80211_ips_leave_wq != NULL)
-                       ieee->ieee80211_ips_leave_wq(ieee->dev);
-
-               up(&ieee->wx_sem);
-               return;
-       }
-#endif
-
        ieee->associate_seq = 1;
        ieee80211_associate_step1(ieee);
 
index 0838bec7b6822f4b87d617a8abf8723646f2bf57..14d62bfc3455c1544590f424ee4092e73d871279 100644 (file)
@@ -327,7 +327,7 @@ SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)
        PRT_POWER_SAVE_CONTROL  pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl));
        bool bResult = true;
 
-       if (eRFPowerState == priv->ieee80211->eRFPowerState &&
+       if (eRFPowerState == priv->eRFPowerState &&
            priv->bHwRfOffAction == 0) {
                bResult = false;
                goto out;
@@ -338,7 +338,7 @@ SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)
        case eRfOn:
 
                // turn on RF
-               if ((priv->ieee80211->eRFPowerState == eRfOff) &&
+               if ((priv->eRFPowerState == eRfOff) &&
                    RT_IN_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC))
                {
                        /*
@@ -384,7 +384,7 @@ SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)
        case eRfSleep:
 
                // HW setting had been configured with deeper mode.
-               if(priv->ieee80211->eRFPowerState == eRfOff)
+               if(priv->eRFPowerState == eRfOff)
                        break;
 
                r8192e_drain_tx_queues(priv);
@@ -423,7 +423,7 @@ SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)
        if(bResult)
        {
                // Update current RF state variable.
-               priv->ieee80211->eRFPowerState = eRFPowerState;
+               priv->eRFPowerState = eRFPowerState;
        }
 
 out:
@@ -640,7 +640,7 @@ MgntActSet_RF_State(
 
        spin_lock(&priv->rf_ps_lock);
 
-       rtState = priv->ieee80211->eRFPowerState;
+       rtState = priv->eRFPowerState;
 
        switch(StateToSet)
        {
index 9b93ed9a57502bd83ba213f512acf750a76c032b..59cdfc7cce5cb43fc15fb007bb05a5bc61567942 100644 (file)
@@ -37,6 +37,7 @@
 #include <linux/random.h>
 #include <linux/version.h>
 #include <asm/io.h>
+#include "ieee80211/rtl819x_HT.h"
 #include "ieee80211/ieee80211.h"
 
 
@@ -929,6 +930,7 @@ typedef struct r8192_priv
        char                            CCKPresentAttentuation_difference;
        char                            CCKPresentAttentuation;
        // Use to calculate PWBD.
+       RT_RF_POWER_STATE               eRFPowerState;
        u8      bCckHighPower;
        long    undecorated_smoothed_pwdb;
        long    undecorated_smoothed_cck_adc_pwdb[4];
index 2897ac251737d21688d5407f7dd018a8b436d28e..5e25353dbc53006b15c3eb375d46978bb5bc3fc2 100644 (file)
@@ -2847,7 +2847,7 @@ static RT_STATUS rtl8192_adapter_start(struct net_device *dev)
        else
        {
                RT_TRACE((COMP_INIT|COMP_RF|COMP_POWER), "%s(): RF-ON \n",__FUNCTION__);
-               priv->ieee80211->eRFPowerState = eRfOn;
+               priv->eRFPowerState = eRfOn;
                priv->ieee80211->RfOffReason = 0;
        }
 }
@@ -3059,7 +3059,7 @@ rtl819x_ifcheck_resetornot(struct net_device *dev)
        RESET_TYPE      RxResetType = RESET_TYPE_NORESET;
        RT_RF_POWER_STATE       rfState;
 
-       rfState = priv->ieee80211->eRFPowerState;
+       rfState = priv->eRFPowerState;
 
        if( rfState != eRfOff &&
                /*ADAPTER_TEST_STATUS_FLAG(Adapter, ADAPTER_STATUS_FW_DOWNLOAD_FAILURE)) &&*/
@@ -3218,7 +3218,7 @@ IPSEnter(struct net_device *dev)
 
        if (pPSC->bInactivePs)
        {
-               rtState = priv->ieee80211->eRFPowerState;
+               rtState = priv->eRFPowerState;
                //
                // Added by Bruce, 2007-12-25.
                // Do not enter IPS in the following conditions:
@@ -3253,7 +3253,7 @@ IPSLeave(struct net_device *dev)
 
        if (pPSC->bInactivePs)
        {
-               rtState = priv->ieee80211->eRFPowerState;
+               rtState = priv->eRFPowerState;
                if (rtState != eRfOn  && !pPSC->bSwRfProcessing && priv->ieee80211->RfOffReason <= RF_CHANGE_BY_IPS)
                {
                        RT_TRACE(COMP_POWER, "IPSLeave(): Turn on RF.\n");
@@ -3278,7 +3278,7 @@ void ieee80211_ips_leave_wq(struct net_device *dev)
 {
        struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
        RT_RF_POWER_STATE       rtState;
-       rtState = priv->ieee80211->eRFPowerState;
+       rtState = priv->eRFPowerState;
 
        if(priv->ieee80211->PowerSaveControl.bInactivePs){
                if(rtState == eRfOff){
@@ -3345,7 +3345,7 @@ static void rtl819x_watchdog_wqcallback(struct work_struct *work)
 #ifdef ENABLE_IPS
        if(ieee->actscanning == false){
                if((ieee->iw_mode == IW_MODE_INFRA) && (ieee->state == IEEE80211_NOLINK) &&
-                   (ieee->eRFPowerState == eRfOn)&&!ieee->is_set_key &&
+                   (priv->eRFPowerState == eRfOn) && !ieee->is_set_key &&
                    (!ieee->proto_stoppping) && !ieee->wx_set_enc){
                        if(ieee->PowerSaveControl.ReturnPoint == IPS_CALLBACK_NONE){
                                IPSEnter(dev);
@@ -3408,7 +3408,7 @@ static void rtl819x_watchdog_wqcallback(struct work_struct *work)
                        rtl819x_update_rxcounts(priv, &TotalRxBcnNum, &TotalRxDataNum);
                        if((TotalRxBcnNum+TotalRxDataNum) == 0)
                        {
-                               if( ieee->eRFPowerState == eRfOff)
+                               if (priv->eRFPowerState == eRfOff)
                                        RT_TRACE(COMP_ERR,"========>%s()\n",__FUNCTION__);
                                printk("===>%s(): AP is power off,connect another one\n",__FUNCTION__);
                                //              Dot11d_Reset(dev);
@@ -3478,7 +3478,7 @@ static int _rtl8192_up(struct net_device *dev)
        }
        RT_TRACE(COMP_INIT, "start adapter finished\n");
 
-       if(priv->ieee80211->eRFPowerState!=eRfOn)
+       if (priv->eRFPowerState != eRfOn)
                MgntActSet_RF_State(dev, eRfOn, priv->ieee80211->RfOffReason);
 
        if(priv->ieee80211->state != IEEE80211_LINKED)
@@ -5045,7 +5045,7 @@ void setKey(      struct net_device *dev,
 #ifdef ENABLE_IPS
        struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
        RT_RF_POWER_STATE       rtState;
-       rtState = priv->ieee80211->eRFPowerState;
+       rtState = priv->eRFPowerState;
        if(priv->ieee80211->PowerSaveControl.bInactivePs){
                if(rtState == eRfOff){
                        if(priv->ieee80211->RfOffReason > RF_CHANGE_BY_IPS)
index bd89bb04955e1349fb9a543500ce2db90b616a2a..280a1b720c34b7c984498f6bc00edbfc475a7a99 100644 (file)
@@ -215,7 +215,7 @@ static int r8192_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
        if (priv->bHwRadioOff)
                return 0;
 
-       rtState = priv->ieee80211->eRFPowerState;
+       rtState = priv->eRFPowerState;
        down(&priv->wx_sem);
 #ifdef ENABLE_IPS
        if(wrqu->mode == IW_MODE_ADHOC){
@@ -384,7 +384,7 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
        if (priv->bHwRadioOff)
                return 0;
 
-       rtState = priv->ieee80211->eRFPowerState;
+       rtState = priv->eRFPowerState;
 
        if(!priv->up) return -ENETDOWN;
        if (priv->ieee80211->LinkDetectInfo.bBusyTraffic == true)
@@ -475,7 +475,7 @@ static int r8192_wx_set_essid(struct net_device *dev,
        if (priv->bHwRadioOff)
                return 0;
 
-       rtState = priv->ieee80211->eRFPowerState;
+       rtState = priv->eRFPowerState;
        down(&priv->wx_sem);
 
 #ifdef ENABLE_IPS
index f4d220ad322ab6f515005d385d4aefc06ad67d19..44e1123797c4869be4365838f15ac4eeab85ba27 100644 (file)
@@ -810,7 +810,7 @@ void rtl8192_phy_SetRFReg(struct net_device* dev, RF90_RADIO_PATH_E eRFPath, u32
 
        if (!rtl8192_phy_CheckIsLegalRFPath(dev, eRFPath))
                return;
-       if(priv->ieee80211->eRFPowerState != eRfOn && !priv->being_init_adapter)
+       if (priv->eRFPowerState != eRfOn && !priv->being_init_adapter)
                return;
        //down(&priv->rf_sem);
 
@@ -859,7 +859,7 @@ u32 rtl8192_phy_QueryRFReg(struct net_device* dev, RF90_RADIO_PATH_E eRFPath, u3
        struct r8192_priv *priv = ieee80211_priv(dev);
        if (!rtl8192_phy_CheckIsLegalRFPath(dev, eRFPath))
                return 0;
-       if(priv->ieee80211->eRFPowerState != eRfOn && !priv->being_init_adapter)
+       if (priv->eRFPowerState != eRfOn && !priv->being_init_adapter)
                return  0;
        down(&priv->rf_sem);
        if (priv->Rf_Mode == RF_OP_By_FW)