aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192e
diff options
context:
space:
mode:
authorMike McCormack <mikem@ring3k.org>2011-03-03 08:44:47 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-07 16:31:42 -0500
commit31d664e56bb508aaa00de3952f0746dcd9d18a01 (patch)
tree2b3431c22cbcfc8e33c4a1514197f260ac72c592 /drivers/staging/rtl8192e
parent774dee1c1af9dd4994d5055bf2507c9ad72991e3 (diff)
staging: rtl8192e: Move PowerSaveControl to r8192e_priv
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>
Diffstat (limited to 'drivers/staging/rtl8192e')
-rw-r--r--drivers/staging/rtl8192e/ieee80211/ieee80211.h2
-rw-r--r--drivers/staging/rtl8192e/r8190_rtl8256.c2
-rw-r--r--drivers/staging/rtl8192e/r8192E.h1
-rw-r--r--drivers/staging/rtl8192e/r8192E_core.c24
-rw-r--r--drivers/staging/rtl8192e/r8192E_wx.c6
5 files changed, 18 insertions, 17 deletions
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211.h b/drivers/staging/rtl8192e/ieee80211/ieee80211.h
index 2c5750bfe98..1998a0b4af9 100644
--- a/drivers/staging/rtl8192e/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192e/ieee80211/ieee80211.h
@@ -2243,7 +2243,7 @@ struct ieee80211_device {
2243 //added by amy for AP roaming 2243 //added by amy for AP roaming
2244 RT_LINK_DETECT_T LinkDetectInfo; 2244 RT_LINK_DETECT_T LinkDetectInfo;
2245 //added by amy for ps 2245 //added by amy for ps
2246 RT_POWER_SAVE_CONTROL PowerSaveControl; 2246 //RT_POWER_SAVE_CONTROL PowerSaveControl;
2247//} 2247//}
2248 /* used if IEEE_SOFTMAC_TX_QUEUE is set */ 2248 /* used if IEEE_SOFTMAC_TX_QUEUE is set */
2249 struct tx_pending_t tx_pending; 2249 struct tx_pending_t tx_pending;
diff --git a/drivers/staging/rtl8192e/r8190_rtl8256.c b/drivers/staging/rtl8192e/r8190_rtl8256.c
index ed45bcdb836..b4d45d6fd92 100644
--- a/drivers/staging/rtl8192e/r8190_rtl8256.c
+++ b/drivers/staging/rtl8192e/r8190_rtl8256.c
@@ -324,7 +324,7 @@ static bool
324SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState) 324SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)
325{ 325{
326 struct r8192_priv *priv = ieee80211_priv(dev); 326 struct r8192_priv *priv = ieee80211_priv(dev);
327 PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl)); 327 PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;
328 bool bResult = true; 328 bool bResult = true;
329 329
330 if (eRFPowerState == priv->eRFPowerState && 330 if (eRFPowerState == priv->eRFPowerState &&
diff --git a/drivers/staging/rtl8192e/r8192E.h b/drivers/staging/rtl8192e/r8192E.h
index 6a6d09578d4..6862bf22a9b 100644
--- a/drivers/staging/rtl8192e/r8192E.h
+++ b/drivers/staging/rtl8192e/r8192E.h
@@ -939,6 +939,7 @@ typedef struct r8192_priv
939 // Use to calculate PWBD. 939 // Use to calculate PWBD.
940 RT_RF_POWER_STATE eRFPowerState; 940 RT_RF_POWER_STATE eRFPowerState;
941 RT_RF_CHANGE_SOURCE RfOffReason; 941 RT_RF_CHANGE_SOURCE RfOffReason;
942 RT_POWER_SAVE_CONTROL PowerSaveControl;
942 u8 bCckHighPower; 943 u8 bCckHighPower;
943 long undecorated_smoothed_pwdb; 944 long undecorated_smoothed_pwdb;
944 long undecorated_smoothed_cck_adc_pwdb[4]; 945 long undecorated_smoothed_cck_adc_pwdb[4];
diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c
index fbdb5c1a8df..fbbede29b03 100644
--- a/drivers/staging/rtl8192e/r8192E_core.c
+++ b/drivers/staging/rtl8192e/r8192E_core.c
@@ -1907,7 +1907,7 @@ static void rtl8192_init_priv_variable(struct net_device* dev)
1907{ 1907{
1908 struct r8192_priv *priv = ieee80211_priv(dev); 1908 struct r8192_priv *priv = ieee80211_priv(dev);
1909 u8 i; 1909 u8 i;
1910 PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl)); 1910 PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;
1911 1911
1912 // Default Halt the NIC if RF is OFF. 1912 // Default Halt the NIC if RF is OFF.
1913 pPSC->RegRfPsLevel |= RT_RF_OFF_LEVL_HALT_NIC; 1913 pPSC->RegRfPsLevel |= RT_RF_OFF_LEVL_HALT_NIC;
@@ -1948,8 +1948,8 @@ static void rtl8192_init_priv_variable(struct net_device* dev)
1948 //added by amy for power save 1948 //added by amy for power save
1949 priv->RfOffReason = 0; 1949 priv->RfOffReason = 0;
1950 priv->bHwRfOffAction = 0; 1950 priv->bHwRfOffAction = 0;
1951 priv->ieee80211->PowerSaveControl.bInactivePs = true; 1951 priv->PowerSaveControl.bInactivePs = true;
1952 priv->ieee80211->PowerSaveControl.bIPSModeBackup = false; 1952 priv->PowerSaveControl.bIPSModeBackup = false;
1953 1953
1954 priv->ieee80211->current_network.beacon_interval = DEFAULT_BEACONINTERVAL; 1954 priv->ieee80211->current_network.beacon_interval = DEFAULT_BEACONINTERVAL;
1955 priv->ieee80211->iw_mode = IW_MODE_INFRA; 1955 priv->ieee80211->iw_mode = IW_MODE_INFRA;
@@ -3090,7 +3090,7 @@ rtl819x_ifcheck_resetornot(struct net_device *dev)
3090void InactivePsWorkItemCallback(struct net_device *dev) 3090void InactivePsWorkItemCallback(struct net_device *dev)
3091{ 3091{
3092 struct r8192_priv *priv = ieee80211_priv(dev); 3092 struct r8192_priv *priv = ieee80211_priv(dev);
3093 PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl)); 3093 PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;
3094 3094
3095 RT_TRACE(COMP_POWER, "InactivePsWorkItemCallback() --------->\n"); 3095 RT_TRACE(COMP_POWER, "InactivePsWorkItemCallback() --------->\n");
3096 // 3096 //
@@ -3163,7 +3163,7 @@ bool MgntActSet_802_11_PowerSaveMode(struct net_device *dev, u8 rtPsMode)
3163void LeisurePSEnter(struct net_device *dev) 3163void LeisurePSEnter(struct net_device *dev)
3164{ 3164{
3165 struct r8192_priv *priv = ieee80211_priv(dev); 3165 struct r8192_priv *priv = ieee80211_priv(dev);
3166 PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl)); 3166 PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;
3167 3167
3168 if(!((priv->ieee80211->iw_mode == IW_MODE_INFRA) && 3168 if(!((priv->ieee80211->iw_mode == IW_MODE_INFRA) &&
3169 (priv->ieee80211->state == IEEE80211_LINKED)) || 3169 (priv->ieee80211->state == IEEE80211_LINKED)) ||
@@ -3193,7 +3193,7 @@ void LeisurePSEnter(struct net_device *dev)
3193void LeisurePSLeave(struct net_device *dev) 3193void LeisurePSLeave(struct net_device *dev)
3194{ 3194{
3195 struct r8192_priv *priv = ieee80211_priv(dev); 3195 struct r8192_priv *priv = ieee80211_priv(dev);
3196 PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl)); 3196 PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;
3197 3197
3198 if (pPSC->bLeisurePs) 3198 if (pPSC->bLeisurePs)
3199 { 3199 {
@@ -3213,7 +3213,7 @@ void
3213IPSEnter(struct net_device *dev) 3213IPSEnter(struct net_device *dev)
3214{ 3214{
3215 struct r8192_priv *priv = ieee80211_priv(dev); 3215 struct r8192_priv *priv = ieee80211_priv(dev);
3216 PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl)); 3216 PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;
3217 RT_RF_POWER_STATE rtState; 3217 RT_RF_POWER_STATE rtState;
3218 3218
3219 if (pPSC->bInactivePs) 3219 if (pPSC->bInactivePs)
@@ -3248,7 +3248,7 @@ void
3248IPSLeave(struct net_device *dev) 3248IPSLeave(struct net_device *dev)
3249{ 3249{
3250 struct r8192_priv *priv = ieee80211_priv(dev); 3250 struct r8192_priv *priv = ieee80211_priv(dev);
3251 PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl)); 3251 PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;
3252 RT_RF_POWER_STATE rtState; 3252 RT_RF_POWER_STATE rtState;
3253 3253
3254 if (pPSC->bInactivePs) 3254 if (pPSC->bInactivePs)
@@ -3280,7 +3280,7 @@ void ieee80211_ips_leave_wq(struct net_device *dev)
3280 RT_RF_POWER_STATE rtState; 3280 RT_RF_POWER_STATE rtState;
3281 rtState = priv->eRFPowerState; 3281 rtState = priv->eRFPowerState;
3282 3282
3283 if(priv->ieee80211->PowerSaveControl.bInactivePs){ 3283 if (priv->PowerSaveControl.bInactivePs){
3284 if(rtState == eRfOff){ 3284 if(rtState == eRfOff){
3285 if(priv->RfOffReason > RF_CHANGE_BY_IPS) 3285 if(priv->RfOffReason > RF_CHANGE_BY_IPS)
3286 { 3286 {
@@ -3347,7 +3347,7 @@ static void rtl819x_watchdog_wqcallback(struct work_struct *work)
3347 if((ieee->iw_mode == IW_MODE_INFRA) && (ieee->state == IEEE80211_NOLINK) && 3347 if((ieee->iw_mode == IW_MODE_INFRA) && (ieee->state == IEEE80211_NOLINK) &&
3348 (priv->eRFPowerState == eRfOn) && !ieee->is_set_key && 3348 (priv->eRFPowerState == eRfOn) && !ieee->is_set_key &&
3349 (!ieee->proto_stoppping) && !ieee->wx_set_enc){ 3349 (!ieee->proto_stoppping) && !ieee->wx_set_enc){
3350 if(ieee->PowerSaveControl.ReturnPoint == IPS_CALLBACK_NONE){ 3350 if (priv->PowerSaveControl.ReturnPoint == IPS_CALLBACK_NONE){
3351 IPSEnter(dev); 3351 IPSEnter(dev);
3352 } 3352 }
3353 } 3353 }
@@ -5046,7 +5046,7 @@ void setKey( struct net_device *dev,
5046 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); 5046 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
5047 RT_RF_POWER_STATE rtState; 5047 RT_RF_POWER_STATE rtState;
5048 rtState = priv->eRFPowerState; 5048 rtState = priv->eRFPowerState;
5049 if(priv->ieee80211->PowerSaveControl.bInactivePs){ 5049 if (priv->PowerSaveControl.bInactivePs){
5050 if(rtState == eRfOff){ 5050 if(rtState == eRfOff){
5051 if(priv->RfOffReason > RF_CHANGE_BY_IPS) 5051 if(priv->RfOffReason > RF_CHANGE_BY_IPS)
5052 { 5052 {
@@ -5110,7 +5110,7 @@ bool NicIFEnableNIC(struct net_device* dev)
5110{ 5110{
5111 RT_STATUS init_status = RT_STATUS_SUCCESS; 5111 RT_STATUS init_status = RT_STATUS_SUCCESS;
5112 struct r8192_priv* priv = ieee80211_priv(dev); 5112 struct r8192_priv* priv = ieee80211_priv(dev);
5113 PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl)); 5113 PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;
5114 5114
5115 //YJ,add,091109 5115 //YJ,add,091109
5116 if (priv->up == 0){ 5116 if (priv->up == 0){
diff --git a/drivers/staging/rtl8192e/r8192E_wx.c b/drivers/staging/rtl8192e/r8192E_wx.c
index cf6e231d560..7ce9f6e7830 100644
--- a/drivers/staging/rtl8192e/r8192E_wx.c
+++ b/drivers/staging/rtl8192e/r8192E_wx.c
@@ -220,7 +220,7 @@ static int r8192_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
220#ifdef ENABLE_IPS 220#ifdef ENABLE_IPS
221 if(wrqu->mode == IW_MODE_ADHOC){ 221 if(wrqu->mode == IW_MODE_ADHOC){
222 222
223 if(priv->ieee80211->PowerSaveControl.bInactivePs){ 223 if (priv->PowerSaveControl.bInactivePs) {
224 if(rtState == eRfOff){ 224 if(rtState == eRfOff){
225 if(priv->RfOffReason > RF_CHANGE_BY_IPS) 225 if(priv->RfOffReason > RF_CHANGE_BY_IPS)
226 { 226 {
@@ -406,7 +406,7 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
406#ifdef ENABLE_IPS 406#ifdef ENABLE_IPS
407 priv->ieee80211->actscanning = true; 407 priv->ieee80211->actscanning = true;
408 if(priv->ieee80211->state != IEEE80211_LINKED){ 408 if(priv->ieee80211->state != IEEE80211_LINKED){
409 if(priv->ieee80211->PowerSaveControl.bInactivePs){ 409 if (priv->PowerSaveControl.bInactivePs) {
410 if(rtState == eRfOff){ 410 if(rtState == eRfOff){
411 if(priv->RfOffReason > RF_CHANGE_BY_IPS) 411 if(priv->RfOffReason > RF_CHANGE_BY_IPS)
412 { 412 {
@@ -1017,7 +1017,7 @@ static int r8192_wx_adapter_power_status(struct net_device *dev,
1017{ 1017{
1018 struct r8192_priv *priv = ieee80211_priv(dev); 1018 struct r8192_priv *priv = ieee80211_priv(dev);
1019#ifdef ENABLE_LPS 1019#ifdef ENABLE_LPS
1020 PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl)); 1020 PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;
1021 struct ieee80211_device* ieee = priv->ieee80211; 1021 struct ieee80211_device* ieee = priv->ieee80211;
1022#endif 1022#endif
1023 down(&priv->wx_sem); 1023 down(&priv->wx_sem);