summaryrefslogtreecommitdiff
path: root/net-wireless/broadcom-sta
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
commit40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch)
tree758c221bad35c9288d0bd6df9c7dfc226728e52c /net-wireless/broadcom-sta
parent8d5dbd847cbc704a6a06405856e94b461011afe3 (diff)
gentoo resync : 28.04.2021
Diffstat (limited to 'net-wireless/broadcom-sta')
-rw-r--r--net-wireless/broadcom-sta/Manifest3
-rw-r--r--net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r6.ebuild3
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r6-linux-5.9.patch211
3 files changed, 215 insertions, 2 deletions
diff --git a/net-wireless/broadcom-sta/Manifest b/net-wireless/broadcom-sta/Manifest
index ffda12708403..1155d931ee9c 100644
--- a/net-wireless/broadcom-sta/Manifest
+++ b/net-wireless/broadcom-sta/Manifest
@@ -11,8 +11,9 @@ AUX broadcom-sta-6.30.223.271-r4-linux-4.7.patch 3897 BLAKE2B ecf3eb75f8eb3331b0
AUX broadcom-sta-6.30.223.271-r4-linux-4.8.patch 1835 BLAKE2B 7e091ac44616ea4cfa80b3a5563f4c6a235d2431b911f6bc52074a76b2c1d609dc546430f048abf042f862907f573c6b1dfa24c8c424aeefe73ff13ae3f34900 SHA512 e5959921b6f0cd5d61d7ed568f549b0920f394458c28257c05064b89d7067ce11c8e44ed0e5a48a65bd041c6193d9ae2d02fca2f5efbfb787d3f9001786a4578
AUX broadcom-sta-6.30.223.271-r5-linux-5.1.patch 829 BLAKE2B 7bb59009307d423e72832d14114b7e6bd016717ace260174b2b9dbc909ec7eb962aec88d930f34ee6c09165e937a2cc271eac7e6b214fe8161a8f76af1aaa83c SHA512 e8780fbff3ed0640b30b44ca777d56bdcf8b23702d4fa827c843919658f022090ca3e2533541f577e7b49133cb2bb3d6ec85bcc9c023a82bea892e231f01a550
AUX broadcom-sta-6.30.223.271-r5-linux-5.6.patch 3056 BLAKE2B 3842420d177c7faf6ac86e00acd5365cb6499ad82071cf7e37f2b765463c945f9634e73126520934011ee63aefee51937d8ff0baa3b206fc5902f2b15fe151e0 SHA512 9edd068851acf534efa424e9b3b3157e75d029f799c1f3a383eb0a9678fee56d6c01817a055e2fa405bba0c25fa2db89b4665a30a9fd35d4e58056bf85cadabc
+AUX broadcom-sta-6.30.223.271-r6-linux-5.9.patch 5933 BLAKE2B c1f522f6554a7bfe0f7b789b042ada14316ecc87bc196c83bec95f684152f323a4c31f60ff26843e36338b8c7949bf36719a5c8afa439ff71f7c74dae4c755b6 SHA512 b9a0193ab604da92c99051e2a4fd91e43c3b6aeea7dbda15635b43eabd35b414e197bf5f25ac0d4ec905a1cb75abc15f165428470bc788dbefd73f178d165099
DIST README-broadcom-sta-6.30.223.271.txt 17216 BLAKE2B af6db6e129911d1589d7d6cb7166bee32ce1ca98a4e5c9b3515a44e48681d8a7a7a6b697419b2bcd9c46f0f4ca1f7ece632b63531b4a4ecd91df4f9dddf043c9 SHA512 672ecc5afcd8535a9f8beb4baea5a40c584b7682844e9ff0e4f66b7406b42118a99dce1fcd580118187fdc506781334b8243082def2b78dce916d90c55ab3663
DIST hybrid-v35-nodebug-pcoem-6_30_223_271.tar.gz 2869247 BLAKE2B 2e3189c468cec50b1a980452a4b2bd0f9657d9adf6fae2a95a8b1c2d1df2f5f6beb4cb903f72f444eddf823fe4375299864cd62191c9d59c4f77598b5d3aa246 SHA512 0361ba30d97bcb1dedf46c11ef1b9a16f09cde3faa6be87b3ccc28679f34183c2fdf511e7c3b5c26b304f6961da454ccf71844b92bbb2f25aa876249496a2f1b
DIST hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz 2928541 BLAKE2B e9d01c1a1a63c07f720e3ee53ee3ef634ab12694135300cb0ce47ade0e9e0084967a0b6df64d983e8184240eb3defb128f650bddb7727e901d50315307f3398a SHA512 6855781f7c69a9aecb9461932423688964879d5a4df571f01ae7adaa7bf21a410bef839605d555afb6c8f4eec92fe8510af6cb120930095617ff6cdcccedaf17
-EBUILD broadcom-sta-6.30.223.271-r6.ebuild 3786 BLAKE2B 7627c32318bdabab52afc7fc0f8f95b1b51987472e174a3a946a47c8f7b2163d6652ab9db37d3081daaced6c7788e0e0bacd1c4ef369407a988bfc7b762f5eef SHA512 e42332ca7445a32cc93553a3c50c172e234fbea03813c84589ff35ad8a202d873781b7d656c5370ea8fefa1a758d775030d4d6f1721a0ceaf07c7fd9406c410a
+EBUILD broadcom-sta-6.30.223.271-r6.ebuild 3840 BLAKE2B 3ca49f93f4fbbc69d6dc0011421cf973cd46b326c57b0cc354b698469d109866738922c415a4a0ddc842770048d6a88311bdf3c6fdd828640619eabb0361c1fd SHA512 d74782cffa4e2ec401ac2049124d99ea431749bd8a12f352b1a1b4e08825774545ffb1512d857b1f4d47106246714f35eda0626d78d80c6f4b44bf1d7427b7dd
MISC metadata.xml 249 BLAKE2B 4a3b51bf90b3ec35dd72dca3b3c73fb89d3e3d08c0989cd7939205ae9d655200886882c2de26146caac3f42ff06ab4a898b85325bd80e69f39491bf4c34ae89e SHA512 4211cb5a85b6a437c0d1727891123af70f296e685c9d59ead2032abbe19d3828fb83d59e559056455ad8b9aadd6136141ab7f9edaff2d55ce2d86b1d698722ce
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 a75c785b2671..118df993b314 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)"
@@ -59,7 +60,7 @@ pkg_setup() {
# 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 ~!X86_INTEL_LPSS"
- CONFIG_CHECK2="LIB80211 ~!MAC80211 ~LIB80211_CRYPT_TKIP"
+ 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!"
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 000000000000..6ef476464c0c
--- /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