008-linux415.patch 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --- a/src/wl/sys/wl_linux.c 2017-07-17 00:11:24.000000000 +0100
  2. +++ b/src/wl/sys/wl_linux.c 2018-01-27 09:49:47.057799596 +0000
  3. @@ -93,7 +93,11 @@
  4. #include <wlc_wowl.h>
  5. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
  6. +static void wl_timer(struct timer_list *tl);
  7. +#else
  8. static void wl_timer(ulong data);
  9. +#endif
  10. static void _wl_timer(wl_timer_t *t);
  11. static struct net_device *wl_alloc_linux_if(wl_if_t *wlif);
  12. @@ -2297,10 +2301,17 @@
  13. atomic_dec(&t->wl->callbacks);
  14. }
  15. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
  16. +static void
  17. +wl_timer(struct timer_list *tl)
  18. +{
  19. + wl_timer_t *t = (wl_timer_t *)tl;
  20. +#else
  21. static void
  22. wl_timer(ulong data)
  23. {
  24. wl_timer_t *t = (wl_timer_t *)data;
  25. +#endif
  26. if (!WL_ALL_PASSIVE_ENAB(t->wl))
  27. _wl_timer(t);
  28. @@ -2352,9 +2363,13 @@
  29. bzero(t, sizeof(wl_timer_t));
  30. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
  31. + timer_setup(&t->timer, wl_timer, 0);
  32. +#else
  33. init_timer(&t->timer);
  34. t->timer.data = (ulong) t;
  35. t->timer.function = wl_timer;
  36. +#endif
  37. t->wl = wl;
  38. t->fn = fn;
  39. t->arg = arg;