1 |
commit: b0df1f11504b32265e665ba0a69fcdb6194e8c3c |
2 |
Author: Matthew Brewer <tomboy64 <AT> sina <DOT> cn> |
3 |
AuthorDate: Mon Nov 16 12:31:14 2015 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Nov 17 08:25:38 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0df1f11 |
7 |
|
8 |
net-wireless/broadcom-sta: patch for compatibility with kernel-4.3 |
9 |
|
10 |
.../broadcom-sta-6.30.223.271-r2.ebuild | 76 ++++++++++++++++++++++ |
11 |
.../broadcom-sta-6.30.223.271-linux-4.3.patch | 11 ++++ |
12 |
2 files changed, 87 insertions(+) |
13 |
|
14 |
diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r2.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r2.ebuild |
15 |
new file mode 100644 |
16 |
index 0000000..4859053 |
17 |
--- /dev/null |
18 |
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r2.ebuild |
19 |
@@ -0,0 +1,76 @@ |
20 |
+# Copyright 1999-2015 Gentoo Foundation |
21 |
+# Distributed under the terms of the GNU General Public License v2 |
22 |
+# $Id$ |
23 |
+ |
24 |
+EAPI=5 |
25 |
+inherit eutils linux-info linux-mod |
26 |
+ |
27 |
+DESCRIPTION="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver" |
28 |
+HOMEPAGE="http://www.broadcom.com/support/802.11/linux_sta.php" |
29 |
+SRC_BASE="http://www.broadcom.com/docs/linux_sta/hybrid-v35" |
30 |
+SRC_URI="x86? ( ${SRC_BASE}-nodebug-pcoem-${PV//\./_}.tar.gz ) |
31 |
+ amd64? ( ${SRC_BASE}_64-nodebug-pcoem-${PV//\./_}.tar.gz ) |
32 |
+ http://www.broadcom.com/docs/linux_sta/README_${PV}.txt -> README-${P}.txt" |
33 |
+ |
34 |
+LICENSE="Broadcom" |
35 |
+KEYWORDS="-* ~amd64 ~x86" |
36 |
+ |
37 |
+RESTRICT="mirror" |
38 |
+ |
39 |
+DEPEND="virtual/linux-sources" |
40 |
+RDEPEND="" |
41 |
+ |
42 |
+S="${WORKDIR}" |
43 |
+ |
44 |
+MODULE_NAMES="wl(net/wireless)" |
45 |
+MODULESD_WL_ALIASES=("wlan0 wl") |
46 |
+ |
47 |
+pkg_setup() { |
48 |
+ # bug #300570 |
49 |
+ # NOTE<lxnay>: module builds correctly anyway with b43 and SSB enabled |
50 |
+ # make checks non-fatal. The correct fix is blackisting ssb and, perhaps |
51 |
+ # b43 via udev rules. Moreover, previous fix broke binpkgs support. |
52 |
+ CONFIG_CHECK="~!B43 ~!BCMA ~!SSB" |
53 |
+ CONFIG_CHECK2="LIB80211 ~!MAC80211 ~LIB80211_CRYPT_TKIP" |
54 |
+ ERROR_B43="B43: If you insist on building this, you must blacklist it!" |
55 |
+ ERROR_BCMA="BCMA: If you insist on building this, you must blacklist it!" |
56 |
+ ERROR_SSB="SSB: If you insist on building this, you must blacklist it!" |
57 |
+ ERROR_LIB80211="LIB80211: Please enable it. If you can't find it: enabling the driver for \"Intel PRO/Wireless 2100\" or \"Intel PRO/Wireless 2200BG\" (IPW2100 or IPW2200) should suffice." |
58 |
+ ERROR_MAC80211="MAC80211: If you insist on building this, you must blacklist it!" |
59 |
+ ERROR_PREEMPT_RCU="PREEMPT_RCU: Please do not set the Preemption Model to \"Preemptible Kernel\"; choose something else." |
60 |
+ ERROR_LIB80211_CRYPT_TKIP="LIB80211_CRYPT_TKIP: You will need this for WPA." |
61 |
+ if kernel_is ge 3 8 8; then |
62 |
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211 ~!PREEMPT_RCU ~!PREEMPT" |
63 |
+ elif kernel_is ge 2 6 32; then |
64 |
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211" |
65 |
+ elif kernel_is ge 2 6 31; then |
66 |
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT ~!MAC80211" |
67 |
+ elif kernel_is ge 2 6 29; then |
68 |
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT COMPAT_NET_DEV_OPS" |
69 |
+ else |
70 |
+ CONFIG_CHECK="${CONFIG_CHECK} IEEE80211 IEEE80211_CRYPT_TKIP" |
71 |
+ fi |
72 |
+ |
73 |
+ linux-mod_pkg_setup |
74 |
+ |
75 |
+ BUILD_PARAMS="-C ${KV_DIR} M=${S}" |
76 |
+ BUILD_TARGETS="wl.ko" |
77 |
+} |
78 |
+ |
79 |
+src_prepare() { |
80 |
+ epatch \ |
81 |
+ "${FILESDIR}/${PN}-6.30.223.141-makefile.patch" \ |
82 |
+ "${FILESDIR}/${PN}-6.30.223.141-eth-to-wlan.patch" \ |
83 |
+ "${FILESDIR}/${PN}-6.30.223.141-gcc.patch" \ |
84 |
+ "${FILESDIR}/${PN}-6.30.223.248-r3-Wno-date-time.patch" \ |
85 |
+ "${FILESDIR}/${PN}-6.30.223.271-r1-linux-3.18.patch" \ |
86 |
+ "${FILESDIR}/${PN}-6.30.223.271-r2-linux-4.3.patch" |
87 |
+ |
88 |
+ epatch_user |
89 |
+} |
90 |
+ |
91 |
+src_install() { |
92 |
+ linux-mod_src_install |
93 |
+ |
94 |
+ dodoc "${DISTDIR}/README-${P}.txt" |
95 |
+} |
96 |
|
97 |
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-linux-4.3.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-linux-4.3.patch |
98 |
new file mode 100644 |
99 |
index 0000000..ae0dc56 |
100 |
--- /dev/null |
101 |
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-linux-4.3.patch |
102 |
@@ -0,0 +1,11 @@ |
103 |
+--- a/src/shared/linux_osl.c 2015-09-19 00:47:15.000000000 +0200 |
104 |
++++ b/src/shared/linux_osl.c 2015-11-09 17:02:22.000000000 +0100 |
105 |
+@@ -932,7 +932,7 @@ |
106 |
+ uint cycles; |
107 |
+ |
108 |
+ #if defined(__i386__) |
109 |
+- rdtscl(cycles); |
110 |
++ cycles = (u32)native_read_tsc(); |
111 |
+ #else |
112 |
+ cycles = 0; |
113 |
+ #endif |