broadcom-wl: fix compilation with kernel >= 4.15
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Thu, 2 Apr 2020 17:52:00 +0000 (19:52 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sun, 12 Apr 2020 10:35:37 +0000 (12:35 +0200)
commitd761b9f21114478f9cc09f5c358a05be0870cc5d
treeaa6d2926602aae231cb426e0b9c45aa29242ea02
parente66becb490796d0787f8bd2448ee6f14198a904a
broadcom-wl: fix compilation with kernel >= 4.15

Since kernel 4.15, init_timer is not available anymore, and has been
replaced by timer_setup. The fixes compilation of wl_linuc.c, which
returned the following errors beforehand (line-wrapped manually):

.../broadcom-wl-5.10.56.27.3/driver/wl_linux.c: In function 'wl_init_timer':
.../broadcom-wl-5.10.56.27.3/driver/wl_linux.c:2576:2: error: implicit
declaration of function 'init_timer'; did you mean 'init_timers'?
[-Werror=implicit-function-declaration]
  init_timer(&t->timer);
  ^~~~~~~~~~
  init_timers
.../broadcom-wl-5.10.56.27.3/driver/wl_linux.c:2577:10: error:
'struct timer_list' has no member named 'data'
  t->timer.data = (ulong) t;
          ^
.../broadcom-wl-5.10.56.27.3/driver/wl_linux.c:2578:20: error: assignment
to 'void (*)(struct timer_list *)' from incompatible pointer type
'void (*)(ulong)' {aka 'void (*)(long unsigned int)'}
[-Werror=incompatible-pointer-types]
  t->timer.function = wl_timer;

This should fix build of several devices on bcm63xx with testing
kernel (4.19).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
package/kernel/broadcom-wl/patches/915-fix-wl_timer-for-4_15.patch [new file with mode: 0644]