public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/
@ 2015-08-22 19:19 Matt Turner
  0 siblings, 0 replies; 6+ messages in thread
From: Matt Turner @ 2015-08-22 19:19 UTC (permalink / raw
  To: gentoo-commits

commit:     f64619dcd60422663f465644a6f2171b78ec181d
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 22 19:23:11 2015 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Aug 22 19:23:27 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f64619dc

net-wireless/broadcom-sta: Add patch for Linux 4.2.

Package-Manager: portage-2.2.20.1
Bug: https://bugs.gentoo.org/557338

 .../broadcom-sta-6.30.223.248-r4.ebuild            | 78 ++++++++++++++++++++++
 .../broadcom-sta-6.30.223.248-r4-linux-4.2.patch   | 16 +++++
 2 files changed, 94 insertions(+)

diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r4.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r4.ebuild
new file mode 100644
index 0000000..350bef9
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r4.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils linux-info linux-mod
+
+DESCRIPTION="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver"
+HOMEPAGE="http://www.broadcom.com/support/802.11/linux_sta.php"
+SRC_BASE="http://www.broadcom.com/docs/linux_sta/hybrid-v35"
+SRC_URI="x86? ( ${SRC_BASE}-nodebug-pcoem-${PV//\./_}.tar.gz )
+	amd64? ( ${SRC_BASE}_64-nodebug-pcoem-${PV//\./_}.tar.gz )
+	http://www.broadcom.com/docs/linux_sta/README_${PV}.txt -> README-${P}.txt"
+
+LICENSE="Broadcom"
+KEYWORDS="-* ~amd64 ~x86"
+
+RESTRICT="mirror"
+
+DEPEND="virtual/linux-sources"
+RDEPEND=""
+
+S="${WORKDIR}"
+
+MODULE_NAMES="wl(net/wireless)"
+MODULESD_WL_ALIASES=("wlan0 wl")
+
+pkg_setup() {
+	# bug #300570
+	# NOTE<lxnay>: module builds correctly anyway with b43 and SSB enabled
+	# make checks non-fatal. The correct fix is blackisting ssb and, perhaps
+	# b43 via udev rules. Moreover, previous fix broke binpkgs support.
+	CONFIG_CHECK="~!B43 ~!BCMA ~!SSB"
+	CONFIG_CHECK2="LIB80211 ~!MAC80211 ~LIB80211_CRYPT_TKIP"
+	ERROR_B43="B43: If you insist on building this, you must blacklist it!"
+	ERROR_BCMA="BCMA: If you insist on building this, you must blacklist it!"
+	ERROR_SSB="SSB: If you insist on building this, you must blacklist it!"
+	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."
+	ERROR_MAC80211="MAC80211: If you insist on building this, you must blacklist it!"
+	ERROR_PREEMPT_RCU="PREEMPT_RCU: Please do not set the Preemption Model to \"Preemptible Kernel\"; choose something else."
+	ERROR_LIB80211_CRYPT_TKIP="LIB80211_CRYPT_TKIP: You will need this for WPA."
+	if kernel_is ge 3 8 8; then
+		CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211 ~!PREEMPT_RCU ~!PREEMPT"
+	elif kernel_is ge 2 6 32; then
+		CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211"
+	elif kernel_is ge 2 6 31; then
+		CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT ~!MAC80211"
+	elif kernel_is ge 2 6 29; then
+		CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT COMPAT_NET_DEV_OPS"
+	else
+		CONFIG_CHECK="${CONFIG_CHECK} IEEE80211 IEEE80211_CRYPT_TKIP"
+	fi
+
+	linux-mod_pkg_setup
+
+	BUILD_PARAMS="-C ${KV_DIR} M=${S}"
+	BUILD_TARGETS="wl.ko"
+}
+
+src_prepare() {
+	epatch \
+		"${FILESDIR}/${PN}-6.30.223.141-license.patch" \
+		"${FILESDIR}/${PN}-6.30.223.141-makefile.patch" \
+		"${FILESDIR}/${PN}-6.30.223.141-eth-to-wlan.patch" \
+		"${FILESDIR}/${PN}-6.30.223.141-gcc.patch" \
+		"${FILESDIR}/${PN}-6.30.223.248-r3-Wno-date-time.patch" \
+		"${FILESDIR}/${PN}-6.30.223.248-r3-linux-3.15-3.18.patch" \
+		"${FILESDIR}/${PN}-6.30.223.248-r3-linux-4.0.patch"
+		"${FILESDIR}/${PN}-6.30.223.248-r4-linux-4.2.patch"
+
+	epatch_user
+}
+
+src_install() {
+	linux-mod_src_install
+
+	dodoc "${DISTDIR}/README-${P}.txt"
+}

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r4-linux-4.2.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r4-linux-4.2.patch
new file mode 100644
index 0000000..9e9f8a1
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r4-linux-4.2.patch
@@ -0,0 +1,16 @@
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index ea0726f..1541dad 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -2047,7 +2047,11 @@ wl_notify_connect_status(struct wl_cfg80211_priv *wl, struct net_device *ndev,
+ 		}
+ 		else if ((event == WLC_E_LINK && ~(flags & WLC_EVENT_MSG_LINK)) ||
+ 			event == WLC_E_DEAUTH_IND || event == WLC_E_DISASSOC_IND) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
++			cfg80211_disconnected(ndev, 0, NULL, 0, false, GFP_KERNEL);
++#else
+ 			cfg80211_disconnected(ndev, 0, NULL, 0, GFP_KERNEL);
++#endif
+ 			clear_bit(WL_STATUS_CONNECTED, &wl->status);
+ 			wl_link_down(wl);
+ 			wl_init_prof(wl->profile);


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/
@ 2015-11-02 17:31 Matt Turner
  0 siblings, 0 replies; 6+ messages in thread
From: Matt Turner @ 2015-11-02 17:31 UTC (permalink / raw
  To: gentoo-commits

commit:     156b8869e520a9ba53e0e02bafd9831c4a78b2c9
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  2 17:30:44 2015 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Nov  2 17:31:59 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=156b8869

net-wireless/broadcom-sta: Readd necessary patch hunk.

Necessary to prevent a hang.

Bug: https://bugs.gentoo.org/562620

 ...30.223.271.ebuild => broadcom-sta-6.30.223.271-r1.ebuild} |  1 +
 .../files/broadcom-sta-6.30.223.271-r1-linux-3.18.patch      | 12 ++++++++++++
 2 files changed, 13 insertions(+)

diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r1.ebuild
similarity index 97%
rename from net-wireless/broadcom-sta/broadcom-sta-6.30.223.271.ebuild
rename to net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r1.ebuild
index bf18fda..0d61639 100644
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271.ebuild
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r1.ebuild
@@ -63,6 +63,7 @@ src_prepare() {
 		"${FILESDIR}/${PN}-6.30.223.141-makefile.patch" \
 		"${FILESDIR}/${PN}-6.30.223.141-eth-to-wlan.patch" \
 		"${FILESDIR}/${PN}-6.30.223.141-gcc.patch" \
+		"${FILESDIR}/${PN}-6.30.223.271-r1-linux-3.18.patch" \
 		"${FILESDIR}/${PN}-6.30.223.248-r3-Wno-date-time.patch"
 
 	epatch_user

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r1-linux-3.18.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r1-linux-3.18.patch
new file mode 100644
index 0000000..9a0e713
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r1-linux-3.18.patch
@@ -0,0 +1,12 @@
+--- a/src/wl/sys/wl_linux.c	2014-06-26 12:42:08.000000000 +0200
++++ b/src/wl/sys/wl_linux.c	2015-01-22 01:44:58.580453805 +0100
+@@ -2157,8 +2159,8 @@
+ 	wlif = WL_DEV_IF(dev);
+ 	wl = WL_INFO(dev);
+ 
++	skb->prev = NULL;
+ 	if (WL_ALL_PASSIVE_ENAB(wl) || (WL_RTR() && WL_CONFIG_SMP())) {
+-		skb->prev = NULL;
+ 
+ 		TXQ_LOCK(wl);
+ 


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/
@ 2018-03-25 22:07 Gilles Dartiguelongue
  0 siblings, 0 replies; 6+ messages in thread
From: Gilles Dartiguelongue @ 2018-03-25 22:07 UTC (permalink / raw
  To: gentoo-commits

commit:     512c492ad7da750b2d9e1c794b2dee8c774eb3aa
Author:     Nick Sarnie <commendsarnex <AT> gmail <DOT> com>
AuthorDate: Tue Mar 13 19:17:30 2018 +0000
Commit:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
CommitDate: Sun Mar 25 22:07:42 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=512c492a

net-wireless/broadcom-sta: Fix build on 4.15

Bug: https://bugs.gentoo.org/646106
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Closes: https://github.com/gentoo/gentoo/pull/7449

 .../broadcom-sta-6.30.223.271-r4.ebuild            |  5 +-
 .../broadcom-sta-6.30.223.271-r4-linux-4.15.patch  | 63 ++++++++++++++++++++++
 2 files changed, 66 insertions(+), 2 deletions(-)

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
index 34b37eceeaf..b5e03a3184f 100644
--- 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
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -81,7 +81,8 @@ src_prepare() {
 		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.7.patch" \
 		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.8.patch" \
 		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.11.patch" \
-		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.12.patch"
+		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.12.patch" \
+		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.15.patch"
 
 	epatch_user
 }

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
new file mode 100644
index 00000000000..91c4d89519c
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.15.patch
@@ -0,0 +1,63 @@
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index 489c9f5..f8278ad 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -93,7 +93,11 @@
+ 
+ #include <wlc_wowl.h>
+ 
++#ifdef HAVE_TIMER_SETUP
++static void wl_timer(struct timer_list *list);
++#else
+ static void wl_timer(ulong data);
++#endif
+ static void _wl_timer(wl_timer_t *t);
+ static struct net_device *wl_alloc_linux_if(wl_if_t *wlif);
+ 
+@@ -2296,12 +2300,17 @@
+ 
+ 	atomic_dec(&t->wl->callbacks);
+ }
+-
++#ifdef HAVE_TIMER_SETUP
++static void
++wl_timer(struct timer_list *list)
++{
++	wl_timer_t *t = from_timer(t,list,timer);
++#else
+ static void
+ wl_timer(ulong data)
+ {
+ 	wl_timer_t *t = (wl_timer_t *)data;
+-
++#endif
+ 	if (!WL_ALL_PASSIVE_ENAB(t->wl))
+ 		_wl_timer(t);
+ 	else
+@@ -2351,10 +2360,13 @@
+ 	}
+ 
+ 	bzero(t, sizeof(wl_timer_t));
+-
++#ifdef HAVE_TIMER_SETUP
++	timer_setup(&t->timer, wl_timer,0);
++#else
+ 	init_timer(&t->timer);
+ 	t->timer.data = (ulong) t;
+ 	t->timer.function = wl_timer;
++#endif
+ 	t->wl = wl;
+ 	t->fn = fn;
+ 	t->arg = arg;
+diff --git a/src/wl/sys/wl_linux.h b/src/wl/sys/wl_linux.h
+index 489c9f5..f8278ad 100644
+--- a/src/wl/sys/wl_linux.h
++++ b/src/wl/sys/wl_linux.h
+@@ -190,3 +190,7 @@
+ extern struct net_device * wl_netdev_get(wl_info_t *wl);
+ 
+ #endif 
++
++#if defined(timer_setup) && defined(from_timer)
++#define HAVE_TIMER_SETUP
++#endif


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/
@ 2019-08-20 11:47 Louis Sautier
  0 siblings, 0 replies; 6+ messages in thread
From: Louis Sautier @ 2019-08-20 11:47 UTC (permalink / raw
  To: gentoo-commits

commit:     50d614cc8c602bbc5ced0bab0c5de1ca3a91567d
Author:     Louis Sautier <sbraz <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 21 19:16:54 2019 +0000
Commit:     Louis Sautier <sbraz <AT> gentoo <DOT> org>
CommitDate: Tue Aug 20 11:47:03 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50d614cc

net-wireless/broadcom-sta: fix build for kernel 5.1, EAPI=7

* Apply Ubuntu's patch for the 5.1 kernel, taken from
  http://launchpadlibrarian.net/429676743/bcmwl_6.30.223.271+bdcom-0ubuntu4_6.30.223.271+bdcom-0ubuntu5.diff.gz.
* Bump to EAPI 7 and use an array for PATCHES, fix one patch that didn't
  apply with -p1.

Closes: https://bugs.gentoo.org/685214
Closes: https://github.com/gentoo/gentoo/pull/12500
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>

 ....ebuild => broadcom-sta-6.30.223.271-r5.ebuild} | 32 ++++++++++------------
 .../files/broadcom-sta-6.30.223.141-makefile.patch |  4 +--
 .../broadcom-sta-6.30.223.271-r5-linux-5.1.patch   | 29 ++++++++++++++++++++
 3 files changed, 46 insertions(+), 19 deletions(-)

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-r5.ebuild
similarity index 82%
rename from net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r4.ebuild
rename to net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r5.ebuild
index 95eeba5c483..91581b52a4e 100644
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r4.ebuild
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r5.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=7
 inherit eutils linux-info linux-mod
 
 DESCRIPTION="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver"
@@ -71,22 +71,20 @@ pkg_setup() {
 	BUILD_TARGETS="wl.ko"
 }
 
-src_prepare() {
-	epatch \
-		"${FILESDIR}/${PN}-6.30.223.141-makefile.patch" \
-		"${FILESDIR}/${PN}-6.30.223.141-eth-to-wlan.patch" \
-		"${FILESDIR}/${PN}-6.30.223.141-gcc.patch" \
-		"${FILESDIR}/${PN}-6.30.223.248-r3-Wno-date-time.patch" \
-		"${FILESDIR}/${PN}-6.30.223.271-r1-linux-3.18.patch" \
-		"${FILESDIR}/${PN}-6.30.223.271-r2-linux-4.3-v2.patch" \
-		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.7.patch" \
-		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.8.patch" \
-		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.11.patch" \
-		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.12.patch" \
+PATCHES=(
+		"${FILESDIR}/${PN}-6.30.223.141-makefile.patch"
+		"${FILESDIR}/${PN}-6.30.223.141-eth-to-wlan.patch"
+		"${FILESDIR}/${PN}-6.30.223.141-gcc.patch"
+		"${FILESDIR}/${PN}-6.30.223.248-r3-Wno-date-time.patch"
+		"${FILESDIR}/${PN}-6.30.223.271-r1-linux-3.18.patch"
+		"${FILESDIR}/${PN}-6.30.223.271-r2-linux-4.3-v2.patch"
+		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.7.patch"
+		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.8.patch"
+		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.11.patch"
+		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.12.patch"
 		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.15.patch"
-
-	epatch_user
-}
+		"${FILESDIR}/${PN}-6.30.223.271-r5-linux-5.1.patch"
+)
 
 src_install() {
 	linux-mod_src_install

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-makefile.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-makefile.patch
index 09c495d2a10..d5b97fe87eb 100644
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-makefile.patch
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-makefile.patch
@@ -1,5 +1,5 @@
---- Makefile.old	2013-04-28 22:42:59.000000000 +0200
-+++ Makefile	2013-04-28 22:45:53.000000000 +0200
+--- a/Makefile	2013-04-28 22:42:59.000000000 +0200
++++ b/Makefile	2013-04-28 22:45:53.000000000 +0200
 @@ -128,9 +128,9 @@
  
  EXTRA_LDFLAGS      := $(src)/lib/wlc_hybrid.o_shipped

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r5-linux-5.1.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r5-linux-5.1.patch
new file mode 100644
index 00000000000..fcee46ea3d0
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r5-linux-5.1.patch
@@ -0,0 +1,29 @@
+From 20bb1a6da26c496572ee63d310cdf69a2f1553f8 Mon Sep 17 00:00:00 2001
+From: Seth Forshee <seth.forshee@canonical.com>
+Date: Fri, 17 May 2019 20:32:20 +0000
+Subject: [PATCH] add support for linux 5.1
+
+get_ds() was removed and replaced universally with KERNEL_DS.
+Provide a version of get_ds() to do likewise for 5.1 and later.
+
+Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
+---
+ src/include/linuxver.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/include/linuxver.h b/src/include/linuxver.h
+index b05bc32..2b88b30 100644
+--- a/src/include/linuxver.h
++++ b/src/include/linuxver.h
+@@ -591,4 +591,9 @@ do {									\
+ #define netdev_priv(dev) dev->priv
+ #endif 
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0))
++#include <linux/uaccess.h>
++#define get_ds() (KERNEL_DS)
++#endif
++
+ #endif 
+-- 
+2.20.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/
@ 2020-06-01 22:02 Stefan Strogin
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Strogin @ 2020-06-01 22:02 UTC (permalink / raw
  To: gentoo-commits

commit:     3742de12e9abd41eebaa87c724b49dc39f7d4ce5
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Mon Jun  1 16:09:39 2020 +0000
Commit:     Stefan Strogin <steils <AT> gentoo <DOT> org>
CommitDate: Mon Jun  1 22:01:23 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3742de12

net-wireless/broadcom-sta: linux 5.6 support

Add patch that resolves compilation error described in #717320.

Closes: https://bugs.gentoo.org/717320
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/16043
Signed-off-by: Stefan Strogin <steils <AT> gentoo.org>

 .../broadcom-sta-6.30.223.271-r5.ebuild            |  3 +-
 .../broadcom-sta-6.30.223.271-r5-linux-5.6.patch   | 88 ++++++++++++++++++++++
 2 files changed, 90 insertions(+), 1 deletion(-)

diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r5.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r5.ebuild
index 91581b52a4e..b84669a9969 100644
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r5.ebuild
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -84,6 +84,7 @@ PATCHES=(
 		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.12.patch"
 		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.15.patch"
 		"${FILESDIR}/${PN}-6.30.223.271-r5-linux-5.1.patch"
+		"${FILESDIR}/${PN}-6.30.223.271-r5-linux-5.6.patch"
 )
 
 src_install() {

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r5-linux-5.6.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r5-linux-5.6.patch
new file mode 100644
index 00000000000..71264346f86
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r5-linux-5.6.patch
@@ -0,0 +1,88 @@
+From: Herman van Hazendonk <github.com@herrie.org>
+Date: Tue, 31 Mar 2020 17:09:55 +0200
+Subject: [PATCH] Add fixes for 5.6 kernel
+Origin: https://salsa.debian.org/Herrie82-guest/broadcom-sta/-/merge_requests/1
+
+Use ioremap instead of ioremap_nocache and proc_ops instead of
+file_operations on Linux kernel 5.6 and above.
+
+<rosh> Patch amended to adapt i386 arch.
+---
+ src/shared/linux_osl.c |  6 +++++-
+ src/wl/sys/wl_linux.c  | 21 ++++++++++++++++++++-
+ 2 files changed, 25 insertions(+), 2 deletions(-)
+
+diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c
+index b24a973..9bce9b1 100644
+--- a/src/shared/linux_osl.c
++++ b/src/shared/linux_osl.c
+@@ -946,7 +946,11 @@ osl_getcycles(void)
+ void *
+ osl_reg_map(uint32 pa, uint size)
+ {
+-	return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
++	#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
++		return (ioremap((unsigned long)pa, (unsigned long)size));
++	#else
++		return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
++	#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */
+ }
+ 
+ void
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index ab7b883..10621c2 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -590,10 +590,17 @@ wl_attach(uint16 vendor, uint16 device, ulong regs,
+ 	}
+ 	wl->bcm_bustype = bustype;
+ 
++	#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
++	if ((wl->regsva = ioremap(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
++		WL_ERROR(("wl%d: ioremap() failed\n", unit));
++		goto fail;
++	}
++	#else
+ 	if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
+ 		WL_ERROR(("wl%d: ioremap() failed\n", unit));
+ 		goto fail;
+ 	}
++	#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */
+ 
+ 	wl->bar1_addr = bar1_addr;
+ 	wl->bar1_size = bar1_size;
+@@ -780,8 +787,13 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ 	if ((val & 0x0000ff00) != 0)
+ 		pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
+ 		bar1_size = pci_resource_len(pdev, 2);
++		#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
++		bar1_addr = (uchar *)ioremap(pci_resource_start(pdev, 2),
++			bar1_size);
++		#else
+ 		bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),
+ 			bar1_size);
++		#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */
+ 	wl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0), PCI_BUS, pdev,
+ 		pdev->irq, bar1_addr, bar1_size);
+ 
+@@ -3354,12 +3366,19 @@ wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t
+ }
+ 
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
++static const struct proc_ops wl_fops = {
++	.proc_read	= wl_proc_read,
++	.proc_write	= wl_proc_write,
++};
++#else
+ static const struct file_operations wl_fops = {
+ 	.owner	= THIS_MODULE,
+ 	.read	= wl_proc_read,
+ 	.write	= wl_proc_write,
+ };
+-#endif
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) */
+ 
+ static int
+ wl_reg_proc_entry(wl_info_t *wl)


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/
@ 2021-04-11  8:09 Joonas Niilola
  0 siblings, 0 replies; 6+ messages in thread
From: Joonas Niilola @ 2021-04-11  8:09 UTC (permalink / raw
  To: gentoo-commits

commit:     1460a7472a1a86edb1bb089bb321b4f5562ddc9d
Author:     Marco Genasci <fedeliallalinea <AT> gmail <DOT> com>
AuthorDate: Sat Apr  3 16:23:35 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sun Apr 11 08:06:27 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1460a747

net-wireless/broadcom-sta: linux >=5.9 support

Closes: https://bugs.gentoo.org/761286
Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Marco Genasci <fedeliallalinea <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/20246
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../broadcom-sta-6.30.223.271-r6.ebuild            |   1 +
 .../broadcom-sta-6.30.223.271-r6-linux-5.9.patch   | 211 +++++++++++++++++++++
 2 files changed, 212 insertions(+)

diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r6.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r6.ebuild
index a75c785b267..57a5de8d0d2 100644
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r6.ebuild
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r6.ebuild
@@ -34,6 +34,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.15.patch"
 	"${FILESDIR}/${PN}-6.30.223.271-r5-linux-5.1.patch"
 	"${FILESDIR}/${PN}-6.30.223.271-r5-linux-5.6.patch"
+	"${FILESDIR}/${PN}-6.30.223.271-r6-linux-5.9.patch"
 )
 
 MODULE_NAMES="wl(net/wireless)"

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r6-linux-5.9.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r6-linux-5.9.patch
new file mode 100644
index 00000000000..6ef476464c0
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r6-linux-5.9.patch
@@ -0,0 +1,211 @@
+From f3d652840f8dd959395065a1cf67ca40b04ec69b Mon Sep 17 00:00:00 2001
+From: Joan Bruguera <joanbrugueram@gmail.com>
+Date: Tue, 13 Oct 2020 19:35:55 +0200
+Subject: [PATCH] Get rid of get_fs/set_fs calls in Broadcom WL driver.
+
+Tentative patch for broadcom-wl 6.30.223.271 driver for Linux 5.10 (tested -rc1 up to 5.10.1)
+
+Applies on top of all the patches applied to broadcom-wl-dkms 6.30.223.271-23 on Arch Linux.
+
+NB: Some checks in wlc_ioctl_internal are likely superfluous,
+    but I'm not familiar enough with the driver to remove them with confidence.
+
+See also: https://lwn.net/Articles/722267/
+          https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=47058bb54b57962b3958a936ddbc59355e4c5504
+          https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5e6e9852d6f76e01b2e6803c74258afa5b432bc5
+
+Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
+---
+ src/wl/sys/wl_cfg80211_hybrid.c | 25 ++-------------------
+ src/wl/sys/wl_iw.c              | 25 ++-------------------
+ src/wl/sys/wl_linux.c           | 40 ++++++++++++++++++++++++++++-----
+ src/wl/sys/wl_linux.h           |  2 ++
+ src/wl/sys/wlc_pub.h            |  1 +
+ 5 files changed, 42 insertions(+), 51 deletions(-)
+
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index 7b606e0..1e0adb7 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -38,6 +38,7 @@
+ #include <wlioctl.h>
+ #include <proto/802.11.h>
+ #include <wl_cfg80211_hybrid.h>
++#include <wl_linux.h>
+ 
+ #define EVENT_TYPE(e) dtoh32((e)->event_type)
+ #define EVENT_FLAGS(e) dtoh16((e)->flags)
+@@ -435,30 +436,7 @@ static void key_endian_to_host(struct wl_wsec_key *key)
+ static s32
+ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)
+ {
+-	struct ifreq ifr;
+-	struct wl_ioctl ioc;
+-	mm_segment_t fs;
+-	s32 err = 0;
+-
+-	BUG_ON(len < sizeof(int));
+-
+-	memset(&ioc, 0, sizeof(ioc));
+-	ioc.cmd = cmd;
+-	ioc.buf = arg;
+-	ioc.len = len;
+-	strcpy(ifr.ifr_name, dev->name);
+-	ifr.ifr_data = (caddr_t)&ioc;
+-
+-	fs = get_fs();
+-	set_fs(get_ds());
+-#if defined(WL_USE_NETDEV_OPS)
+-	err = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
+-#else
+-	err = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
+-#endif
+-	set_fs(fs);
+-
+-	return err;
++	return wlc_ioctl_internal(dev, cmd, arg, len);
+ }
+ 
+ static s32
+diff --git a/src/wl/sys/wl_iw.c b/src/wl/sys/wl_iw.c
+index c4c610b..e346b15 100644
+--- a/src/wl/sys/wl_iw.c
++++ b/src/wl/sys/wl_iw.c
+@@ -37,6 +37,7 @@ typedef const struct si_pub	si_t;
+ 
+ #include <wl_dbg.h>
+ #include <wl_iw.h>
++#include <wl_linux.h>
+ 
+ extern bool wl_iw_conn_status_str(uint32 event_type, uint32 status,
+ 	uint32 reason, char* stringBuf, uint buflen);
+@@ -103,29 +104,7 @@ dev_wlc_ioctl(
+ 	int len
+ )
+ {
+-	struct ifreq ifr;
+-	wl_ioctl_t ioc;
+-	mm_segment_t fs;
+-	int ret;
+-
+-	memset(&ioc, 0, sizeof(ioc));
+-	ioc.cmd = cmd;
+-	ioc.buf = arg;
+-	ioc.len = len;
+-
+-	strcpy(ifr.ifr_name, dev->name);
+-	ifr.ifr_data = (caddr_t) &ioc;
+-
+-	fs = get_fs();
+-	set_fs(get_ds());
+-#if defined(WL_USE_NETDEV_OPS)
+-	ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
+-#else
+-	ret = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
+-#endif
+-	set_fs(fs);
+-
+-	return ret;
++	return wlc_ioctl_internal(dev, cmd, arg, len);
+ }
+ 
+ static int
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index 947cef3..f04c148 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -1643,10 +1643,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+ 		goto done2;
+ 	}
+ 
+-	if (segment_eq(get_fs(), KERNEL_DS))
+-		buf = ioc.buf;
+-
+-	else if (ioc.buf) {
++	if (ioc.buf) {
+ 		if (!(buf = (void *) MALLOC(wl->osh, MAX(ioc.len, WLC_IOCTL_MAXLEN)))) {
+ 			bcmerror = BCME_NORESOURCE;
+ 			goto done2;
+@@ -1667,7 +1664,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+ 	WL_UNLOCK(wl);
+ 
+ done1:
+-	if (ioc.buf && (ioc.buf != buf)) {
++	if (ioc.buf) {
+ 		if (copy_to_user(ioc.buf, buf, ioc.len))
+ 			bcmerror = BCME_BADADDR;
+ 		MFREE(wl->osh, buf, MAX(ioc.len, WLC_IOCTL_MAXLEN));
+@@ -1680,6 +1677,39 @@ done2:
+ 	return (OSL_ERROR(bcmerror));
+ }
+ 
++int
++wlc_ioctl_internal(struct net_device *dev, int cmd, void *buf, int len)
++{
++	wl_info_t *wl;
++	wl_if_t *wlif;
++	int bcmerror;
++
++	if (!dev)
++		return -ENETDOWN;
++
++	wl = WL_INFO(dev);
++	wlif = WL_DEV_IF(dev);
++	if (wlif == NULL || wl == NULL || wl->dev == NULL)
++		return -ENETDOWN;
++
++	bcmerror = 0;
++
++	WL_TRACE(("wl%d: wlc_ioctl_internal: cmd 0x%x\n", wl->pub->unit, cmd));
++
++	WL_LOCK(wl);
++	if (!capable(CAP_NET_ADMIN)) {
++		bcmerror = BCME_EPERM;
++	} else {
++		bcmerror = wlc_ioctl(wl->wlc, cmd, buf, len, wlif->wlcif);
++	}
++	WL_UNLOCK(wl);
++
++	ASSERT(VALID_BCMERROR(bcmerror));
++	if (bcmerror != 0)
++		wl->pub->bcmerror = bcmerror;
++	return (OSL_ERROR(bcmerror));
++}
++
+ static struct net_device_stats*
+ wl_get_stats(struct net_device *dev)
+ {
+diff --git a/src/wl/sys/wl_linux.h b/src/wl/sys/wl_linux.h
+index 5b1048e..c8c1f41 100644
+--- a/src/wl/sys/wl_linux.h
++++ b/src/wl/sys/wl_linux.h
+@@ -22,6 +22,7 @@
+ #define _wl_linux_h_
+ 
+ #include <wlc_types.h>
++#include <wlc_pub.h>
+ 
+ typedef struct wl_timer {
+ 	struct timer_list 	timer;
+@@ -187,6 +188,7 @@ extern irqreturn_t wl_isr(int irq, void *dev_id, struct pt_regs *ptregs);
+ extern int __devinit wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
+ extern void wl_free(wl_info_t *wl);
+ extern int  wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
++extern int wlc_ioctl_internal(struct net_device *dev, int cmd, void *buf, int len);
+ extern struct net_device * wl_netdev_get(wl_info_t *wl);
+ 
+ #endif 
+diff --git a/src/wl/sys/wlc_pub.h b/src/wl/sys/wlc_pub.h
+index 53a98b8..2b5a029 100644
+--- a/src/wl/sys/wlc_pub.h
++++ b/src/wl/sys/wlc_pub.h
+@@ -24,6 +24,7 @@
+ 
+ #include <wlc_types.h>
+ #include <wlc_utils.h>
++#include <siutils.h>
+ #include "proto/802.11.h"
+ #include "proto/bcmevent.h"
+ 
+--
+2.28.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-04-11  8:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-22 19:19 [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/ Matt Turner
  -- strict thread matches above, loose matches on Subject: below --
2015-11-02 17:31 Matt Turner
2018-03-25 22:07 Gilles Dartiguelongue
2019-08-20 11:47 Louis Sautier
2020-06-01 22:02 Stefan Strogin
2021-04-11  8:09 Joonas Niilola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox