From 91e47841e28a8f91559815cc8134fc165f24aeb3 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Sat, 20 Jul 2013 14:19:58 -0500 Subject: [PATCH] rtl8188eu: Remove CONFIG_RESUME_IN_WORKQUEUE - not selected Signed-off-by: Larry Finger --- core/rtw_pwrctrl.c | 44 ------------------------------------------- include/drv_conf.h | 7 ------- include/rtw_pwrctrl.h | 9 --------- os_dep/usb_intf.c | 13 ++----------- 4 files changed, 2 insertions(+), 71 deletions(-) diff --git a/core/rtw_pwrctrl.c b/core/rtw_pwrctrl.c index a0cb3ac..3467fa4 100644 --- a/core/rtw_pwrctrl.c +++ b/core/rtw_pwrctrl.c @@ -626,10 +626,6 @@ _func_enter_; _func_exit_; } -#ifdef CONFIG_RESUME_IN_WORKQUEUE -static void resume_workitem_callback(struct work_struct *work); -#endif /* CONFIG_RESUME_IN_WORKQUEUE */ - void rtw_init_pwrctrl_priv(PADAPTER padapter) { struct pwrctrl_priv *pwrctrlpriv = &padapter->pwrctrlpriv; @@ -677,11 +673,6 @@ _func_enter_; _init_timer(&(pwrctrlpriv->pwr_state_check_timer), padapter->pnetdev, pwr_state_check_handler, (u8 *)padapter); - #ifdef CONFIG_RESUME_IN_WORKQUEUE - _init_workitem(&pwrctrlpriv->resume_work, resume_workitem_callback, NULL); - pwrctrlpriv->rtw_workqueue = create_singlethread_workqueue("rtw_workqueue"); - #endif /* CONFIG_RESUME_IN_WORKQUEUE */ - _func_exit_; } @@ -691,46 +682,11 @@ void rtw_free_pwrctrl_priv(PADAPTER adapter) _func_enter_; - /* _rtw_memset((unsigned char *)pwrctrlpriv, 0, sizeof(struct pwrctrl_priv)); */ - - - #ifdef CONFIG_RESUME_IN_WORKQUEUE - if (pwrctrlpriv->rtw_workqueue) { - flush_workqueue(pwrctrlpriv->rtw_workqueue); - destroy_workqueue(pwrctrlpriv->rtw_workqueue); - } - #endif - _free_pwrlock(&pwrctrlpriv->lock); _func_exit_; } -#ifdef CONFIG_RESUME_IN_WORKQUEUE -extern int rtw_resume_process(_adapter *padapter); -static void resume_workitem_callback(struct work_struct *work) -{ - struct pwrctrl_priv *pwrpriv = container_of(work, struct pwrctrl_priv, resume_work); - _adapter *adapter = container_of(pwrpriv, _adapter, pwrctrlpriv); - - DBG_88E("%s\n",__func__); - - rtw_resume_process(adapter); -} - -void rtw_resume_in_workqueue(struct pwrctrl_priv *pwrpriv) -{ - /* accquire system's suspend lock preventing from falliing asleep while resume in workqueue */ - rtw_lock_suspend(); - - #if 1 - queue_work(pwrpriv->rtw_workqueue, &pwrpriv->resume_work); - #else - _set_workitem(&pwrpriv->resume_work); - #endif -} -#endif /* CONFIG_RESUME_IN_WORKQUEUE */ - u8 rtw_interface_ps_func(_adapter *padapter,HAL_INTF_PS_FUNC efunc_id,u8* val) { u8 bResult = true; diff --git a/include/drv_conf.h b/include/drv_conf.h index 8c3dc52..f3dfee2 100644 --- a/include/drv_conf.h +++ b/include/drv_conf.h @@ -21,13 +21,6 @@ #define __DRV_CONF_H__ #include "autoconf.h" -#ifdef CONFIG_RESUME_IN_WORKQUEUE //this can be removed, because there is no case for this... - #if !defined( CONFIG_WAKELOCK) - #error "enable CONFIG_RESUME_IN_WORKQUEUE without CONFIG_WAKELOCK will suffer from the danger of wifi's unfunctionality..." - #error "If you still want to enable CONFIG_RESUME_IN_WORKQUEUE in this case, mask this preprossor checking and GOOD LUCK..." - #endif -#endif - //About USB VENDOR REQ #if defined(CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC) && !defined(CONFIG_USB_VENDOR_REQ_MUTEX) #warning "define CONFIG_USB_VENDOR_REQ_MUTEX for CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC automatically" diff --git a/include/rtw_pwrctrl.h b/include/rtw_pwrctrl.h index 1b67f59..1dc9b8d 100644 --- a/include/rtw_pwrctrl.h +++ b/include/rtw_pwrctrl.h @@ -252,11 +252,6 @@ struct pwrctrl_priv u8 bkeepfwalive; u8 brfoffbyhw; unsigned long PS_BBRegBackup[PSBBREG_TOTALCNT]; - - #ifdef CONFIG_RESUME_IN_WORKQUEUE - struct workqueue_struct *rtw_workqueue; - _workitem resume_work; - #endif }; #define rtw_get_ips_mode_req(pwrctrlpriv) \ @@ -296,10 +291,6 @@ s32 LPS_RF_ON_check(PADAPTER padapter, u32 delay_ms); void LPS_Enter(PADAPTER padapter); void LPS_Leave(PADAPTER padapter); -#ifdef CONFIG_RESUME_IN_WORKQUEUE -void rtw_resume_in_workqueue(struct pwrctrl_priv *pwrpriv); -#endif //CONFIG_RESUME_IN_WORKQUEUE - u8 rtw_interface_ps_func(_adapter *padapter,HAL_INTF_PS_FUNC efunc_id,u8* val); void rtw_set_ips_deny(_adapter *padapter, u32 ms); int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller); diff --git a/os_dep/usb_intf.c b/os_dep/usb_intf.c index c898e4c..abfe93d 100644 --- a/os_dep/usb_intf.c +++ b/os_dep/usb_intf.c @@ -739,15 +739,10 @@ static int rtw_resume(struct usb_interface *pusb_intf) struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; int ret = 0; - if (pwrpriv->bInternalAutoSuspend ){ + if (pwrpriv->bInternalAutoSuspend) ret = rtw_resume_process(padapter); - } else { -#ifdef CONFIG_RESUME_IN_WORKQUEUE - rtw_resume_in_workqueue(pwrpriv); -#else // Normal resume process + else ret = rtw_resume_process(padapter); -#endif //CONFIG_RESUME_IN_WORKQUEUE - } return ret; } @@ -856,10 +851,6 @@ int rtw_resume_process(_adapter *padapter) ret = 0; exit: - #ifdef CONFIG_RESUME_IN_WORKQUEUE - rtw_unlock_suspend(); - #endif //CONFIG_RESUME_IN_WORKQUEUE - pwrpriv->bInSuspend = false; DBG_88E("<=== %s return %d.............. in %dms\n", __func__ , ret, rtw_get_passing_time_ms(start_time));