From: Mike McCormack <mikem@xxxxxxxxxx> Signed-off-by: Mike McCormack <mikem@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx> --- drivers/staging/rtl8192e/ieee80211/ieee80211.h | 1 - .../staging/rtl8192e/ieee80211/ieee80211_softmac.c | 11 ----------- drivers/staging/rtl8192e/r8190_rtl8256.c | 10 +++++----- drivers/staging/rtl8192e/r8192E.h | 2 ++ drivers/staging/rtl8192e/r8192E_core.c | 18 +++++++++--------- drivers/staging/rtl8192e/r8192E_wx.c | 6 +++--- drivers/staging/rtl8192e/r819xE_phy.c | 4 ++-- 7 files changed, 21 insertions(+), 31 deletions(-) diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211.h b/drivers/staging/rtl8192e/ieee80211/ieee80211.h index 8501c4a..8d2b575 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211.h @@ -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 diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c index 2640a4f..012256c 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c @@ -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); diff --git a/drivers/staging/rtl8192e/r8190_rtl8256.c b/drivers/staging/rtl8192e/r8190_rtl8256.c index 0838bec..14d62bf 100644 --- a/drivers/staging/rtl8192e/r8190_rtl8256.c +++ b/drivers/staging/rtl8192e/r8190_rtl8256.c @@ -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) { diff --git a/drivers/staging/rtl8192e/r8192E.h b/drivers/staging/rtl8192e/r8192E.h index 9b93ed9..59cdfc7 100644 --- a/drivers/staging/rtl8192e/r8192E.h +++ b/drivers/staging/rtl8192e/r8192E.h @@ -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]; diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c index 2897ac2..5e25353 100644 --- a/drivers/staging/rtl8192e/r8192E_core.c +++ b/drivers/staging/rtl8192e/r8192E_core.c @@ -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) diff --git a/drivers/staging/rtl8192e/r8192E_wx.c b/drivers/staging/rtl8192e/r8192E_wx.c index bd89bb0..280a1b7 100644 --- a/drivers/staging/rtl8192e/r8192E_wx.c +++ b/drivers/staging/rtl8192e/r8192E_wx.c @@ -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 diff --git a/drivers/staging/rtl8192e/r819xE_phy.c b/drivers/staging/rtl8192e/r819xE_phy.c index f4d220a..44e1123 100644 --- a/drivers/staging/rtl8192e/r819xE_phy.c +++ b/drivers/staging/rtl8192e/r819xE_phy.c @@ -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) -- 1.7.4.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel