1 --- a/driver/wl_linux.c
2 +++ b/driver/wl_linux.c
3 @@ -235,7 +235,11 @@ struct wl_info {
7 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
8 +static void wl_timer(struct timer_list *tl);
10 static void wl_timer(ulong data);
12 static void _wl_timer(wl_timer_t *t);
15 @@ -2512,6 +2516,18 @@ wl_timer_task(wl_task_t *task)
17 #endif /* WLC_HIGH_ONLY */
19 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
21 +wl_timer(struct timer_list *tl)
23 + wl_timer_t *t = from_timer(t, tl, timer);
24 +#ifndef WLC_HIGH_ONLY
27 + wl_schedule_task(t->wl, wl_timer_task, t);
28 +#endif /* WLC_HIGH_ONLY */
34 @@ -2522,6 +2538,7 @@ wl_timer(ulong data)
35 wl_schedule_task(t->wl, wl_timer_task, t);
36 #endif /* WLC_HIGH_ONLY */
38 +#endif /* linux >= 4.15.0 */
41 _wl_timer(wl_timer_t *t)
42 @@ -2573,9 +2590,13 @@ wl_init_timer(wl_info_t *wl, void (*fn)(
44 bzero(t, sizeof(wl_timer_t));
46 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
47 + timer_setup(&t->timer, wl_timer, 0);
49 init_timer(&t->timer);
50 t->timer.data = (ulong) t;
51 t->timer.function = wl_timer;