[gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/

2021-04-11 Thread Joonas Niilola
commit: 1460a7472a1a86edb1bb089bb321b4f5562ddc9d
Author: Marco Genasci  gmail  com>
AuthorDate: Sat Apr  3 16:23:35 2021 +
Commit: Joonas Niilola  gentoo  org>
CommitDate: Sun Apr 11 08:06:27 2021 +
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  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/20246
Signed-off-by: Joonas Niilola  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 000..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 
+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 
+---
+ 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 
+ #include 
+ #include 
++#include 
+ 
+ #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(, 0, sizeof(ioc));
+-  ioc.cmd = cmd;
+-  ioc.buf = arg;
+-  ioc.len = len;
+-  strcpy(ifr.ifr_name, dev->name);
+-  ifr.ifr_data = (caddr_t)
+-
+-  fs = get_fs();
+-  set_fs(get_ds());
+-#if defined(WL_USE_NETDEV_OPS)
+-  err = dev->netdev_ops->ndo_do_ioctl(dev, , SIOCDEVPRIVATE);
+-#else
+-  err = dev->do_ioctl(dev, , 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 
+ #include 
++#include 
+ 
+ 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(, 0, sizeof(ioc));
+-  ioc.cmd = cmd;
+-  ioc.buf = arg;
+-  ioc.len = len;
+-
+-  strcpy(ifr.ifr_name, dev->name);
+-  ifr.ifr_data = (caddr_t) 
+-
+-  fs = get_fs();
+-  set_fs(get_ds());
+-#if defined(WL_USE_NETDEV_OPS)
+-  ret = dev->netdev_ops->ndo_do_ioctl(dev, , SIOCDEVPRIVATE);
+-#else
+-  ret = dev->do_ioctl(dev, , 

[gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/

2020-06-01 Thread Stefan Strogin
commit: 3742de12e9abd41eebaa87c724b49dc39f7d4ce5
Author: Azamat H. Hackimov  gmail  com>
AuthorDate: Mon Jun  1 16:09:39 2020 +
Commit: Stefan Strogin  gentoo  org>
CommitDate: Mon Jun  1 22:01:23 2020 +
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  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/16043
Signed-off-by: Stefan Strogin  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 000..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 
+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.
+
+ 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 & 0xff00) != 0)
+   pci_write_config_dword(pdev, 0x40, val & 0x00ff);
+   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 = {

[gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/

2019-08-20 Thread Louis Sautier
commit: 50d614cc8c602bbc5ced0bab0c5de1ca3a91567d
Author: Louis Sautier  gentoo  org>
AuthorDate: Sun Jul 21 19:16:54 2019 +
Commit: Louis Sautier  gentoo  org>
CommitDate: Tue Aug 20 11:47:03 2019 +
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  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.0 +0200
-+++ Makefile   2013-04-28 22:45:53.0 +0200
+--- a/Makefile 2013-04-28 22:42:59.0 +0200
 b/Makefile 2013-04-28 22:45:53.0 +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 000..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 
+Date: Fri, 17 May 2019 20:32:20 +
+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 
+---
+ src/include/linuxver.h | 5 +
+ 1 file changed, 5 insertions(+)
+
+diff --git 

[gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/

2018-03-25 Thread Gilles Dartiguelongue
commit: 512c492ad7da750b2d9e1c794b2dee8c774eb3aa
Author: Nick Sarnie  gmail  com>
AuthorDate: Tue Mar 13 19:17:30 2018 +
Commit: Gilles Dartiguelongue  gentoo  org>
CommitDate: Sun Mar 25 22:07:42 2018 +
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 000..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 
+ 
++#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(>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(>timer, wl_timer,0);
++#else
+   init_timer(>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



[gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/

2015-11-02 Thread Matt Turner
commit: 156b8869e520a9ba53e0e02bafd9831c4a78b2c9
Author: Matt Turner  gentoo  org>
AuthorDate: Mon Nov  2 17:30:44 2015 +
Commit: Matt Turner  gentoo  org>
CommitDate: Mon Nov  2 17:31:59 2015 +
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 000..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.c2014-06-26 12:42:08.0 +0200
 b/src/wl/sys/wl_linux.c2015-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);
+ 



[gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/

2015-08-22 Thread Matt Turner
commit: f64619dcd60422663f465644a6f2171b78ec181d
Author: Matt Turner mattst88 AT gentoo DOT org
AuthorDate: Sat Aug 22 19:23:11 2015 +
Commit: Matt Turner mattst88 AT gentoo DOT org
CommitDate: Sat Aug 22 19:23:27 2015 +
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 000..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
+   # NOTElxnay: 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 000..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 =