diff --git a/core/rtw_pwrctrl.c b/core/rtw_pwrctrl.c index f61a5b3..d8b45f4 100644 --- a/core/rtw_pwrctrl.c +++ b/core/rtw_pwrctrl.c @@ -393,17 +393,10 @@ exit: return; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) -void pwr_state_check_handler(struct timer_list *t) -#else +void pwr_state_check_handler(RTW_TIMER_HDL_ARGS); void pwr_state_check_handler(RTW_TIMER_HDL_ARGS) -#endif { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) - _adapter *padapter = from_timer(padapter, t, pwrctrlpriv.pwr_state_check_timer); -#else _adapter *padapter = (_adapter *)FunctionContext; -#endif rtw_ps_cmd(padapter); } @@ -1975,11 +1968,7 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter) #endif /* CONFIG_LPS_RPWM_TIMER */ #endif /* CONFIG_LPS_LCLK */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) - timer_setup(&pwrctrlpriv->pwr_state_check_timer, pwr_state_check_handler, 0); -#else rtw_init_timer(&pwrctrlpriv->pwr_state_check_timer, padapter, pwr_state_check_handler); -#endif pwrctrlpriv->wowlan_mode = _FALSE; pwrctrlpriv->wowlan_ap_mode = _FALSE;