wok-current view broadcom-wl64/stuff/015-linux419.patch @ rev 25687
Up expat CVE-2024-28757
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Fri Mar 15 07:23:20 2024 +0000 (5 months ago) |
parents | |
children |
line source
1 diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
2 index 489c9f5..f8278ad 100644
3 --- a/src/wl/sys/wl_linux.c
4 +++ b/src/wl/sys/wl_linux.c
5 @@ -93,7 +93,11 @@
7 #include <wlc_wowl.h>
9 +#ifdef HAVE_TIMER_SETUP
10 +static void wl_timer(struct timer_list *list);
11 +#else
12 static void wl_timer(ulong data);
13 +#endif
14 static void _wl_timer(wl_timer_t *t);
15 static struct net_device *wl_alloc_linux_if(wl_if_t *wlif);
17 @@ -2296,12 +2300,17 @@
19 atomic_dec(&t->wl->callbacks);
20 }
21 -
22 +#ifdef HAVE_TIMER_SETUP
23 +static void
24 +wl_timer(struct timer_list *list)
25 +{
26 + wl_timer_t *t = from_timer(t,list,timer);
27 +#else
28 static void
29 wl_timer(ulong data)
30 {
31 wl_timer_t *t = (wl_timer_t *)data;
32 -
33 +#endif
34 if (!WL_ALL_PASSIVE_ENAB(t->wl))
35 _wl_timer(t);
36 else
37 @@ -2351,10 +2360,13 @@
38 }
40 bzero(t, sizeof(wl_timer_t));
41 -
42 +#ifdef HAVE_TIMER_SETUP
43 + timer_setup(&t->timer, wl_timer,0);
44 +#else
45 init_timer(&t->timer);
46 t->timer.data = (ulong) t;
47 t->timer.function = wl_timer;
48 +#endif
49 t->wl = wl;
50 t->fn = fn;
51 t->arg = arg;
52 diff --git a/src/wl/sys/wl_linux.h b/src/wl/sys/wl_linux.h
53 index 489c9f5..f8278ad 100644
54 --- a/src/wl/sys/wl_linux.h
55 +++ b/src/wl/sys/wl_linux.h
56 @@ -190,3 +190,7 @@
57 extern struct net_device * wl_netdev_get(wl_info_t *wl);
59 #endif
60 +
61 +#if defined(timer_setup) && defined(from_timer)
62 +#define HAVE_TIMER_SETUP
63 +#endif