From 32dfcb1bf22a04251de857adc70666266c08731c Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Sun, 25 May 2014 22:43:20 +0200 Subject: [PATCH] staging: rtl8723au: bInternalAutoSuspend is always false Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/core/rtw_pwrctrl.c | 13 ++----------- drivers/staging/rtl8723au/include/rtw_pwrctrl.h | 1 - drivers/staging/rtl8723au/os_dep/os_intfs.c | 4 ---- drivers/staging/rtl8723au/os_dep/usb_intf.c | 11 +++-------- 4 files changed, 5 insertions(+), 24 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_pwrctrl.c b/drivers/staging/rtl8723au/core/rtw_pwrctrl.c index 90359d1a0923..86ce51f849e9 100644 --- a/drivers/staging/rtl8723au/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8723au/core/rtw_pwrctrl.c @@ -481,7 +481,6 @@ void rtw_init_pwrctrl_priv23a(struct rtw_adapter *padapter) pwrctrlpriv->pwr_state_check_interval = RTW_PWR_STATE_CHK_INTERVAL; pwrctrlpriv->pwr_state_check_cnts = 0; - pwrctrlpriv->bInternalAutoSuspend = false; pwrctrlpriv->bInSuspend = false; pwrctrlpriv->bkeepfwalive = false; @@ -562,7 +561,7 @@ int _rtw_pwr_wakeup23a(struct rtw_adapter *padapter, u32 ips_deffer_ms, const ch DBG_8723A("%s wait sreset_inprogress done\n", __func__); } - if (pwrpriv->bInternalAutoSuspend == false && pwrpriv->bInSuspend) { + if (pwrpriv->bInSuspend) { DBG_8723A("%s wait bInSuspend...\n", __func__); while (pwrpriv->bInSuspend && (jiffies_to_msecs(jiffies - start) <= 3000)) { @@ -575,15 +574,7 @@ int _rtw_pwr_wakeup23a(struct rtw_adapter *padapter, u32 ips_deffer_ms, const ch } /* System suspend is not allowed to wakeup */ - if (pwrpriv->bInternalAutoSuspend == false && - pwrpriv->bInSuspend == true) { - ret = _FAIL; - goto exit; - } - - /* block??? */ - if (pwrpriv->bInternalAutoSuspend == true && - padapter->net_closed == true) { + if (pwrpriv->bInSuspend) { ret = _FAIL; goto exit; } diff --git a/drivers/staging/rtl8723au/include/rtw_pwrctrl.h b/drivers/staging/rtl8723au/include/rtw_pwrctrl.h index 44a7d4f97e09..a458af978145 100644 --- a/drivers/staging/rtl8723au/include/rtw_pwrctrl.h +++ b/drivers/staging/rtl8723au/include/rtw_pwrctrl.h @@ -191,7 +191,6 @@ struct pwrctrl_priv { s32 pnp_current_pwr_state; u8 pnp_bstop_trx; - u8 bInternalAutoSuspend; u8 bInSuspend; #ifdef CONFIG_8723AU_BT_COEXIST u8 bAutoResume; diff --git a/drivers/staging/rtl8723au/os_dep/os_intfs.c b/drivers/staging/rtl8723au/os_dep/os_intfs.c index d572f643ba59..5b27eb4474ba 100644 --- a/drivers/staging/rtl8723au/os_dep/os_intfs.c +++ b/drivers/staging/rtl8723au/os_dep/os_intfs.c @@ -835,10 +835,6 @@ static int netdev_close(struct net_device *pnetdev) RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+871x_drv - drv_close\n")); - if (padapter->pwrctrlpriv.bInternalAutoSuspend) { - if (padapter->pwrctrlpriv.rf_pwrstate == rf_off) - padapter->pwrctrlpriv.ps_flag = true; - } padapter->net_closed = true; if (padapter->pwrctrlpriv.rf_pwrstate == rf_on) { diff --git a/drivers/staging/rtl8723au/os_dep/usb_intf.c b/drivers/staging/rtl8723au/os_dep/usb_intf.c index f78be19aa333..8b25c1aa2025 100644 --- a/drivers/staging/rtl8723au/os_dep/usb_intf.c +++ b/drivers/staging/rtl8723au/os_dep/usb_intf.c @@ -314,8 +314,7 @@ static void rtw_dev_unload(struct rtw_adapter *padapter) rtl8723a_usb_intf_stop(padapter); /* s4. */ - if (!padapter->pwrctrlpriv.bInternalAutoSuspend) - flush_workqueue(padapter->cmdpriv.wq); + flush_workqueue(padapter->cmdpriv.wq); /* s5. */ if (!padapter->bSurpriseRemoved) { @@ -505,13 +504,9 @@ static int rtw_resume(struct usb_interface *pusb_intf) { struct dvobj_priv *dvobj = usb_get_intfdata(pusb_intf); struct rtw_adapter *padapter = dvobj->if1; - struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; - int ret = 0; + int ret; - if (pwrpriv->bInternalAutoSuspend) - ret = rtw_resume_process23a(padapter); - else - ret = rtw_resume_process23a(padapter); + ret = rtw_resume_process23a(padapter); return ret; } -- 2.39.5