Update rtw_pwrctrl.c

This commit is contained in:
Christian B 2017-12-17 11:49:39 +01:00 committed by GitHub
parent e0d0135581
commit f1ef700e29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;