Update for kernel 4.15

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

Fetch from 8c3acf9275
This commit is contained in:
Carlos Garces
2018-01-04 00:49:20 +01:00
parent 49a0fb5020
commit 80a0cb2c1a
4 changed files with 47 additions and 7 deletions

View File

@@ -318,15 +318,17 @@ extern void rtw_udelay_os(int us);
extern void rtw_yield_os(void);
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;