1 |
commit: 512c492ad7da750b2d9e1c794b2dee8c774eb3aa |
2 |
Author: Nick Sarnie <commendsarnex <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Mar 13 19:17:30 2018 +0000 |
4 |
Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 25 22:07:42 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=512c492a |
7 |
|
8 |
net-wireless/broadcom-sta: Fix build on 4.15 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/646106 |
11 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
12 |
Closes: https://github.com/gentoo/gentoo/pull/7449 |
13 |
|
14 |
.../broadcom-sta-6.30.223.271-r4.ebuild | 5 +- |
15 |
.../broadcom-sta-6.30.223.271-r4-linux-4.15.patch | 63 ++++++++++++++++++++++ |
16 |
2 files changed, 66 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r4.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r4.ebuild |
19 |
index 34b37eceeaf..b5e03a3184f 100644 |
20 |
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r4.ebuild |
21 |
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r4.ebuild |
22 |
@@ -1,4 +1,4 @@ |
23 |
-# Copyright 1999-2017 Gentoo Foundation |
24 |
+# Copyright 1999-2018 Gentoo Foundation |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
|
27 |
EAPI=5 |
28 |
@@ -81,7 +81,8 @@ src_prepare() { |
29 |
"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.7.patch" \ |
30 |
"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.8.patch" \ |
31 |
"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.11.patch" \ |
32 |
- "${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.12.patch" |
33 |
+ "${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.12.patch" \ |
34 |
+ "${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.15.patch" |
35 |
|
36 |
epatch_user |
37 |
} |
38 |
|
39 |
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.15.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.15.patch |
40 |
new file mode 100644 |
41 |
index 00000000000..91c4d89519c |
42 |
--- /dev/null |
43 |
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.15.patch |
44 |
@@ -0,0 +1,63 @@ |
45 |
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c |
46 |
+index 489c9f5..f8278ad 100644 |
47 |
+--- a/src/wl/sys/wl_linux.c |
48 |
++++ b/src/wl/sys/wl_linux.c |
49 |
+@@ -93,7 +93,11 @@ |
50 |
+ |
51 |
+ #include <wlc_wowl.h> |
52 |
+ |
53 |
++#ifdef HAVE_TIMER_SETUP |
54 |
++static void wl_timer(struct timer_list *list); |
55 |
++#else |
56 |
+ static void wl_timer(ulong data); |
57 |
++#endif |
58 |
+ static void _wl_timer(wl_timer_t *t); |
59 |
+ static struct net_device *wl_alloc_linux_if(wl_if_t *wlif); |
60 |
+ |
61 |
+@@ -2296,12 +2300,17 @@ |
62 |
+ |
63 |
+ atomic_dec(&t->wl->callbacks); |
64 |
+ } |
65 |
+- |
66 |
++#ifdef HAVE_TIMER_SETUP |
67 |
++static void |
68 |
++wl_timer(struct timer_list *list) |
69 |
++{ |
70 |
++ wl_timer_t *t = from_timer(t,list,timer); |
71 |
++#else |
72 |
+ static void |
73 |
+ wl_timer(ulong data) |
74 |
+ { |
75 |
+ wl_timer_t *t = (wl_timer_t *)data; |
76 |
+- |
77 |
++#endif |
78 |
+ if (!WL_ALL_PASSIVE_ENAB(t->wl)) |
79 |
+ _wl_timer(t); |
80 |
+ else |
81 |
+@@ -2351,10 +2360,13 @@ |
82 |
+ } |
83 |
+ |
84 |
+ bzero(t, sizeof(wl_timer_t)); |
85 |
+- |
86 |
++#ifdef HAVE_TIMER_SETUP |
87 |
++ timer_setup(&t->timer, wl_timer,0); |
88 |
++#else |
89 |
+ init_timer(&t->timer); |
90 |
+ t->timer.data = (ulong) t; |
91 |
+ t->timer.function = wl_timer; |
92 |
++#endif |
93 |
+ t->wl = wl; |
94 |
+ t->fn = fn; |
95 |
+ t->arg = arg; |
96 |
+diff --git a/src/wl/sys/wl_linux.h b/src/wl/sys/wl_linux.h |
97 |
+index 489c9f5..f8278ad 100644 |
98 |
+--- a/src/wl/sys/wl_linux.h |
99 |
++++ b/src/wl/sys/wl_linux.h |
100 |
+@@ -190,3 +190,7 @@ |
101 |
+ extern struct net_device * wl_netdev_get(wl_info_t *wl); |
102 |
+ |
103 |
+ #endif |
104 |
++ |
105 |
++#if defined(timer_setup) && defined(from_timer) |
106 |
++#define HAVE_TIMER_SETUP |
107 |
++#endif |