From: Mike McCormack Date: Thu, 3 Mar 2011 13:44:47 +0000 (+0900) Subject: staging: rtl8192e: Move PowerSaveControl to r8192e_priv X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=31d664e56bb508aaa00de3952f0746dcd9d18a01;p=linux-beck.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211.h b/drivers/staging/rtl8192e/ieee80211/ieee80211.h index 2c5750bfe98e..1998a0b4af92 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211.h @@ -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; diff --git a/drivers/staging/rtl8192e/r8190_rtl8256.c b/drivers/staging/rtl8192e/r8190_rtl8256.c index ed45bcdb8367..b4d45d6fd92e 100644 --- a/drivers/staging/rtl8192e/r8190_rtl8256.c +++ b/drivers/staging/rtl8192e/r8190_rtl8256.c @@ -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 && diff --git a/drivers/staging/rtl8192e/r8192E.h b/drivers/staging/rtl8192e/r8192E.h index 6a6d09578d4b..6862bf22a9b1 100644 --- a/drivers/staging/rtl8192e/r8192E.h +++ b/drivers/staging/rtl8192e/r8192E.h @@ -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]; diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c index fbdb5c1a8df6..fbbede29b030 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) { 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){ diff --git a/drivers/staging/rtl8192e/r8192E_wx.c b/drivers/staging/rtl8192e/r8192E_wx.c index cf6e231d5600..7ce9f6e78307 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, #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);