mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-10 15:39:38 +00:00
rtl8188eu: Remove CONFIG_RESUME_IN_WORKQUEUE
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
d82a27dfb2
commit
109963133b
4 changed files with 0 additions and 76 deletions
|
@ -661,10 +661,6 @@ void LeaveAllPowerSaveMode(IN struct adapter *Adapter)
|
|||
;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RESUME_IN_WORKQUEUE
|
||||
static void resume_workitem_callback(struct work_struct *work);
|
||||
#endif /* CONFIG_RESUME_IN_WORKQUEUE */
|
||||
|
||||
void rtw_init_pwrctrl_priv(struct adapter *padapter)
|
||||
{
|
||||
struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(padapter);
|
||||
|
@ -710,11 +706,6 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter)
|
|||
|
||||
_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 */
|
||||
|
||||
#if defined(CONFIG_HAS_EARLYSUSPEND) || defined(CONFIG_ANDROID_POWER)
|
||||
pwrctrlpriv->early_suspend.suspend = NULL;
|
||||
rtw_register_early_suspend(pwrctrlpriv);
|
||||
|
@ -730,14 +721,6 @@ void rtw_free_pwrctrl_priv(struct adapter *adapter)
|
|||
{
|
||||
struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(adapter);
|
||||
|
||||
#ifdef CONFIG_RESUME_IN_WORKQUEUE
|
||||
if (pwrctrlpriv->rtw_workqueue) {
|
||||
flush_workqueue(pwrctrlpriv->rtw_workqueue);
|
||||
destroy_workqueue(pwrctrlpriv->rtw_workqueue);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(CONFIG_HAS_EARLYSUSPEND) || defined(CONFIG_ANDROID_POWER)
|
||||
rtw_unregister_early_suspend(pwrctrlpriv);
|
||||
#endif /* CONFIG_HAS_EARLYSUSPEND || CONFIG_ANDROID_POWER */
|
||||
|
@ -745,28 +728,6 @@ void rtw_free_pwrctrl_priv(struct adapter *adapter)
|
|||
_free_pwrlock(&pwrctrlpriv->lock);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RESUME_IN_WORKQUEUE
|
||||
extern int rtw_resume_process(struct adapter *padapter);
|
||||
static void resume_workitem_callback(struct work_struct *work)
|
||||
{
|
||||
struct pwrctrl_priv *pwrpriv = container_of(work, struct pwrctrl_priv, resume_work);
|
||||
struct dvobj_priv *dvobj = pwrctl_to_dvobj(pwrpriv);
|
||||
struct adapter *adapter = dvobj->if1;
|
||||
|
||||
DBG_871X("%s\n",__FUNCTION__);
|
||||
|
||||
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();
|
||||
|
||||
queue_work(pwrpriv->rtw_workqueue, &pwrpriv->resume_work);
|
||||
}
|
||||
#endif /* CONFIG_RESUME_IN_WORKQUEUE */
|
||||
|
||||
#if defined(CONFIG_HAS_EARLYSUSPEND) || defined(CONFIG_ANDROID_POWER)
|
||||
inline bool rtw_is_earlysuspend_registered(struct pwrctrl_priv *pwrpriv)
|
||||
{
|
||||
|
|
|
@ -21,21 +21,4 @@
|
|||
#define __DRV_CONF_H__
|
||||
#include "autoconf.h"
|
||||
|
||||
#if defined(CONFIG_HAS_EARLYSUSPEND) && defined (CONFIG_RESUME_IN_WORKQUEUE)
|
||||
#warning "You have CONFIG_HAS_EARLYSUSPEND enabled in your system, we disable CONFIG_RESUME_IN_WORKQUEUE automatically"
|
||||
#undef CONFIG_RESUME_IN_WORKQUEUE
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ANDROID_POWER) && defined (CONFIG_RESUME_IN_WORKQUEUE)
|
||||
#warning "You have CONFIG_ANDROID_POWER enabled in your system, we disable CONFIG_RESUME_IN_WORKQUEUE automatically"
|
||||
#undef CONFIG_RESUME_IN_WORKQUEUE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RESUME_IN_WORKQUEUE //this can be removed, because there is no case for this...
|
||||
#if !defined( CONFIG_WAKELOCK) && !defined(CONFIG_ANDROID_POWER)
|
||||
#error "enable CONFIG_RESUME_IN_WORKQUEUE without CONFIG_WAKELOCK or CONFIG_ANDROID_POWER 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
|
||||
|
||||
#endif // __DRV_CONF_H__
|
||||
|
|
|
@ -249,11 +249,6 @@ struct pwrctrl_priv
|
|||
u8 brfoffbyhw;
|
||||
unsigned long PS_BBRegBackup[PSBBREG_TOTALCNT];
|
||||
|
||||
#ifdef CONFIG_RESUME_IN_WORKQUEUE
|
||||
struct workqueue_struct *rtw_workqueue;
|
||||
_workitem resume_work;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HAS_EARLYSUSPEND
|
||||
struct early_suspend early_suspend;
|
||||
u8 do_late_resume;
|
||||
|
@ -308,10 +303,6 @@ s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms);
|
|||
void LPS_Enter(struct adapter *padapter);
|
||||
void LPS_Leave(struct adapter *padapter);
|
||||
|
||||
#ifdef CONFIG_RESUME_IN_WORKQUEUE
|
||||
void rtw_resume_in_workqueue(struct pwrctrl_priv *pwrpriv);
|
||||
#endif //CONFIG_RESUME_IN_WORKQUEUE
|
||||
|
||||
#if defined(CONFIG_HAS_EARLYSUSPEND ) || defined(CONFIG_ANDROID_POWER)
|
||||
bool rtw_is_earlysuspend_registered(struct pwrctrl_priv *pwrpriv);
|
||||
bool rtw_is_do_late_resume(struct pwrctrl_priv *pwrpriv);
|
||||
|
|
|
@ -682,20 +682,15 @@ static int rtw_resume(struct usb_interface *pusb_intf)
|
|||
if(pwrpriv->bInternalAutoSuspend ){
|
||||
ret = rtw_resume_process(padapter);
|
||||
} else {
|
||||
#ifdef CONFIG_RESUME_IN_WORKQUEUE
|
||||
rtw_resume_in_workqueue(pwrpriv);
|
||||
#else
|
||||
if (rtw_is_earlysuspend_registered(pwrpriv)) {
|
||||
/* jeff: bypass resume here, do in late_resume */
|
||||
rtw_set_do_late_resume(pwrpriv, true);
|
||||
} else {
|
||||
ret = rtw_resume_process(padapter);
|
||||
}
|
||||
#endif /* CONFIG_RESUME_IN_WORKQUEUE */
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
int rtw_resume_process(struct adapter *padapter)
|
||||
|
@ -780,16 +775,10 @@ int rtw_resume_process(struct adapter *padapter)
|
|||
|
||||
ret = 0;
|
||||
exit:
|
||||
#ifdef CONFIG_RESUME_IN_WORKQUEUE
|
||||
rtw_unlock_suspend();
|
||||
#endif /* CONFIG_RESUME_IN_WORKQUEUE */
|
||||
|
||||
pwrpriv->bInSuspend = false;
|
||||
DBG_871X("<=== %s return %d.............. in %dms\n", __FUNCTION__
|
||||
, ret, rtw_get_passing_time_ms(start_time));
|
||||
|
||||
;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue