linux-4.15.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. Fix for 4.15
  2. ---
  3. src/wl/sys/wl_linux.c | 15 +++++++++++++++
  4. 1 file changed, 15 insertions(+)
  5. diff -Nurp broadcom-wl-6.30.223.271.orig/src/wl/sys/wl_linux.c broadcom-wl-6.30.223.271/src/wl/sys/wl_linux.c
  6. --- broadcom-wl-6.30.223.271.orig/src/wl/sys/wl_linux.c 2020-01-11 01:25:39.086492699 +0200
  7. +++ broadcom-wl-6.30.223.271/src/wl/sys/wl_linux.c 2020-01-11 01:41:15.885238901 +0200
  8. @@ -93,7 +93,11 @@ struct iw_statistics *wl_get_wireless_st
  9. #include <wlc_wowl.h>
  10. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
  11. +static void wl_timer(struct timer_list *tl);
  12. +#else
  13. static void wl_timer(ulong data);
  14. +#endif
  15. static void _wl_timer(wl_timer_t *t);
  16. static struct net_device *wl_alloc_linux_if(wl_if_t *wlif);
  17. @@ -2297,10 +2301,17 @@ wl_timer_task(wl_task_t *task)
  18. atomic_dec(&t->wl->callbacks);
  19. }
  20. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
  21. +static void
  22. +wl_timer(struct timer_list *tl)
  23. +{
  24. + wl_timer_t *t = (wl_timer_t *)tl;
  25. +#else
  26. static void
  27. wl_timer(ulong data)
  28. {
  29. wl_timer_t *t = (wl_timer_t *)data;
  30. +#endif
  31. if (!WL_ALL_PASSIVE_ENAB(t->wl))
  32. _wl_timer(t);
  33. @@ -2352,9 +2363,13 @@ wl_init_timer(wl_info_t *wl, void (*fn)(
  34. bzero(t, sizeof(wl_timer_t));
  35. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
  36. + timer_setup(&t->timer, wl_timer, 0);
  37. +#else
  38. init_timer(&t->timer);
  39. t->timer.data = (ulong) t;
  40. t->timer.function = wl_timer;
  41. +#endif
  42. t->wl = wl;
  43. t->fn = fn;
  44. t->arg = arg;