1
0
mirror of https://github.com/abperiasamy/rtl8812AU_8821AU_linux.git synced 2025-10-20 09:31:11 +02:00

Fix timers (#244)

This commit adds support for kernel 4.15, which changed the timer
interface.

Additionally this reverts commit ee9ad6c348
This commit is contained in:
xyzz
2018-02-12 21:33:26 -05:00
committed by Harshavardhana
parent ee9ad6c348
commit bed205c14a
3 changed files with 44 additions and 9 deletions

View File

@@ -319,8 +319,12 @@ extern void rtw_init_timer(_timer *ptimer, void *padapter, void *pfunc);
__inline static unsigned char _cancel_timer_ex(_timer *ptimer)
{
#ifdef PLATFORM_LINUX
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
return del_timer_sync(&ptimer->t);
#else
return del_timer_sync(ptimer);
#endif
#endif
#ifdef PLATFORM_FREEBSD
_cancel_timer(ptimer,0);
return 0;