Commit 31d664e5 authored by Mike McCormack's avatar Mike McCormack Committed by Greg Kroah-Hartman

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