summaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
Diffstat (limited to 'network')
-rw-r--r--network/broadcom-sta/001-null-pointer-fix.patch27
-rw-r--r--network/broadcom-sta/002-rdtscl.patch18
-rw-r--r--network/broadcom-sta/README29
-rw-r--r--network/broadcom-sta/b43_blacklist.conf.new9
-rw-r--r--network/broadcom-sta/broadcom-sta.SlackBuild120
-rw-r--r--network/broadcom-sta/broadcom-sta.info20
-rw-r--r--network/broadcom-sta/linux-recent.patch102
-rw-r--r--network/broadcom-sta/slack-desc10
8 files changed, 174 insertions, 161 deletions
diff --git a/network/broadcom-sta/001-null-pointer-fix.patch b/network/broadcom-sta/001-null-pointer-fix.patch
new file mode 100644
index 0000000000..adef19f30a
--- /dev/null
+++ b/network/broadcom-sta/001-null-pointer-fix.patch
@@ -0,0 +1,27 @@
+Description: Fixing null pointer crash
+
+Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773713
+Bug-Ubuntu: https://launchpad.net/bugs/1415880
+Last-Update: 2015-08-18
+
+---
+ src/wl/sys/wl_linux.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index 860b935..295156f 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -2157,8 +2157,8 @@ wl_start(struct sk_buff *skb, struct net_device *dev)
+ 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);
+
+--
+1.9.1
+
diff --git a/network/broadcom-sta/002-rdtscl.patch b/network/broadcom-sta/002-rdtscl.patch
new file mode 100644
index 0000000000..cfa1607540
--- /dev/null
+++ b/network/broadcom-sta/002-rdtscl.patch
@@ -0,0 +1,18 @@
+https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=fe47ae6e1a5005b2e82f7eab57b5c3820453293a
+https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=4ea1636b04dbd66536fa387bae2eea463efc705b
+
+diff -ru a/src/shared/linux_osl.c b/src/shared/linux_osl.c
+--- a/src/shared/linux_osl.c 2015-09-19 01:47:15.000000000 +0300
++++ b/src/shared/linux_osl.c 2015-11-21 15:20:30.585902518 +0200
+@@ -932,7 +932,11 @@
+ uint cycles;
+
+ #if defined(__i386__)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
++ cycles = (u32)rdtsc();
++#else
+ rdtscl(cycles);
++#endif
+ #else
+ cycles = 0;
+ #endif
diff --git a/network/broadcom-sta/README b/network/broadcom-sta/README
index b22315d640..d3331e0d8f 100644
--- a/network/broadcom-sta/README
+++ b/network/broadcom-sta/README
@@ -1,13 +1,24 @@
The broadcom-sta package includes the kernel module 'wl', which contains
the Broadcom-provided proprietary kernel driver that supports a number of
-their cards. Known supported model numbers include the BCM4311, BCM4312,
-BCM4321, and BCM4322 chipsets.
+their cards. Known supported model numbers include the listed chipsets.
-Read the included LICENSE.txt file (placed in /usr/doc) before using this.
+BCM4311 (PCI IDs 14e4:4311, 14e4:4312, 14e4:4313)
+BCM4312 (PCI ID 14e4:4315)
+BCM4313 (PCI ID 14e4:4727)
+BCM4321 (PCI IDs 14e4:4328, 14e4:4329, 14e4:432a)
+BCM4322 (PCI IDs 14e4:432b, 14e4:432c, 14e4:432d)
+BCM43142 (PCI ID 14e4:4365)
+BCM43224 (PCI ID 14e4:4353)
+BCM43225 (PCI ID 14e4:4357)
+BCM43227 (PCI ID 14e4:4358)
+BCM43228 (PCI ID 14e4:4359)
+BCM4331 (PCI ID 14e4:4331)
+BCM4360 (PCI ID 14e4:43a0)
+BCM4352 (PCI ID 14e4:43b1)
-You may also want to create /etc/modprobe.d/b43_blacklist.conf and add the
-following lines to it:
- blacklist b43
- blacklist b43legacy
- blacklist bcma
- blacklist ssb
+Some of these devices are also supported by the free b43 and brcm80211
+drivers. In order to avoid conflicts /etc/modprobe.d/b43_blacklist.conf
+disables these drivers.
+
+Read the included LICENSE.txt file (placed in /usr/doc) before using the
+proprietary driver.
diff --git a/network/broadcom-sta/b43_blacklist.conf.new b/network/broadcom-sta/b43_blacklist.conf.new
new file mode 100644
index 0000000000..76c457bc43
--- /dev/null
+++ b/network/broadcom-sta/b43_blacklist.conf.new
@@ -0,0 +1,9 @@
+# wl module from Broadcom conflicts with the following modules:
+blacklist b43
+blacklist b43legacy
+blacklist b44
+blacklist bcma
+blacklist brcm80211
+blacklist brcmfmac
+blacklist brcmsmac
+blacklist ssb
diff --git a/network/broadcom-sta/broadcom-sta.SlackBuild b/network/broadcom-sta/broadcom-sta.SlackBuild
index d3f43734eb..dc571eff7e 100644
--- a/network/broadcom-sta/broadcom-sta.SlackBuild
+++ b/network/broadcom-sta/broadcom-sta.SlackBuild
@@ -1,65 +1,111 @@
#!/bin/sh
-# Slackware build script for broadcom-sta proprietary wireless driver
-# Written by David Matthew Jerry Koenig <koenigdavidmj@gmail.com>
-# Public domain.
+
+# Slackware build script for broadcom-sta
+
+# Copyright 2015 Andreas Voegele <andreas@andreasvoegele.com>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
PRGNAM=broadcom-sta
-VERSION=6.30.223.141
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-6.30.223.271}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-KERNEL=${KERNEL:-$(uname -r)}
-PKG_VERSION=${VERSION}_$(echo $KERNEL | tr - _)
+KERNEL=${KERNEL:-$( uname -r )}
-case "$( uname -m )" in
- i?86) ARCH=i486 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
-esac
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-WORKDIR=$TMP/build-$PRGNAM
-
-# Skipped the usual set of variables since they don't apply here
-# (libdir isn't needed, and custom CFLAGS aren't wanted).
-if [ "$ARCH" = "i486" ]; then
- MY_ARCH=""
-elif [ "$ARCH" = "x86_64" ]; then
- MY_ARCH="_64"
-else
- printf "\n\n$ARCH is not supported...\n"
- exit 1
-fi
+case "$ARCH" in
+ i?86)
+ SRCNAM=hybrid-v35-nodebug-pcoem
+ ;;
+ x86_64)
+ SRCNAM=hybrid-v35_64-nodebug-pcoem
+ ;;
+ *)
+ echo "$ARCH is not supported..."
+ exit 1
+ ;;
+esac
set -e
-rm -rf $WORKDIR $PKG
-mkdir -p $TMP $WORKDIR $PKG $OUTPUT
-cd $WORKDIR
-tar xvf $CWD/hybrid-v35${MY_ARCH}-nodebug-pcoem-$(printf $VERSION|tr . _).tar.gz
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+mkdir $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$( echo $VERSION | tr . _ ).tar.gz
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-patch -p2 < $CWD/linux-recent.patch
+patch -p1 < $CWD/001-null-pointer-fix.patch
+patch -p1 < $CWD/002-rdtscl.patch
-# Build the module
-make -C /lib/modules/$KERNEL/build M=$WORKDIR clean
-make -C /lib/modules/$KERNEL/build M=$WORKDIR
+make -C /lib/modules/$KERNEL/build M=$(pwd) clean
+make -C /lib/modules/$KERNEL/build M=$(pwd)
-# Install the module
mkdir -p $PKG/lib/modules/$KERNEL/kernel/extra
cp wl.ko $PKG/lib/modules/$KERNEL/kernel/extra
+mkdir -p $PKG/etc/modprobe.d
+cat $CWD/b43_blacklist.conf.new > $PKG/etc/modprobe.d/b43_blacklist.conf.new
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ lib/LICENSE.txt $CWD/README_$VERSION.txt \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-cat $WORKDIR/lib/LICENSE.txt > $PKG/usr/doc/$PRGNAM-$VERSION/LICENSE.txt
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
+cat << EOF > $PKG/install/doinst.sh
+config() {
+ NEW="\$1"
+ OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r \$OLD ]; then
+ mv \$NEW \$OLD
+ elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm \$NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/modprobe.d/b43_blacklist.conf.new
+
+# A good idea whenever kernel modules are added or changed:
+if [ -x sbin/depmod ]; then
+ chroot . /sbin/depmod -a $KERNEL 1> /dev/null 2> /dev/null
+fi
+EOF
cd $PKG
-chown -R root:root .
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$PKG_VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-${VERSION}_$( echo $KERNEL | tr - _ )-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/network/broadcom-sta/broadcom-sta.info b/network/broadcom-sta/broadcom-sta.info
index 31be73cb73..8120752d28 100644
--- a/network/broadcom-sta/broadcom-sta.info
+++ b/network/broadcom-sta/broadcom-sta.info
@@ -1,10 +1,14 @@
PRGNAM="broadcom-sta"
-VERSION="6.30.223.141"
-HOMEPAGE="http://www.broadcom.com/support/802.11/linux_sta.php"
-DOWNLOAD="http://www.broadcom.com/docs/linux_sta/hybrid-v35-nodebug-pcoem-6_30_223_141.tar.gz"
-MD5SUM="f4809d9149e8e60ef95021ae93a4bf21"
-DOWNLOAD_x86_64="http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_141.tar.gz"
-MD5SUM_x86_64="039f33d2a3ff2890e42717092d1eb0c4"
+VERSION="6.30.223.271"
+HOMEPAGE="https://www.broadcom.com/support/802.11"
+DOWNLOAD="https://www.broadcom.com/docs/linux_sta/hybrid-v35-nodebug-pcoem-6_30_223_271.tar.gz \
+ https://www.broadcom.com/docs/linux_sta/README_6.30.223.271.txt"
+MD5SUM="4e75f4cb7d87f690f9659ffc478495f0 \
+ 458ea8d99c83769d4acf98137f0d46bb"
+DOWNLOAD_x86_64="https://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz \
+ https://www.broadcom.com/docs/linux_sta/README_6.30.223.271.txt"
+MD5SUM_x86_64="115903050c41d466161784d4c843f4f9 \
+ 458ea8d99c83769d4acf98137f0d46bb"
REQUIRES=""
-MAINTAINER="David Matthew Jerry Koenig"
-EMAIL="koenigdavidmj@gmail.com"
+MAINTAINER="Andreas Voegele"
+EMAIL="andreas@andreasvoegele.com"
diff --git a/network/broadcom-sta/linux-recent.patch b/network/broadcom-sta/linux-recent.patch
deleted file mode 100644
index c575f289a2..0000000000
--- a/network/broadcom-sta/linux-recent.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-diff -Naur bcmwl-6.30.223.30+bdcom.orig/src/src/wl/sys/wl_linux.c bcmwl-6.30.223.30+bdcom/src/src/wl/sys/wl_linux.c
---- bcmwl-6.30.223.30+bdcom.orig/src/src/wl/sys/wl_linux.c 2013-04-23 12:31:31.011588881 +0200
-+++ bcmwl-6.30.223.30+bdcom/src/src/wl/sys/wl_linux.c 2013-05-20 18:27:18.830187333 +0200
-@@ -3229,7 +3229,12 @@
- wl_tkip_printstats(wl_info_t *wl, bool group_key)
- {
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
-+ struct seq_file sfile;
-+ struct seq_file *debug_buf = &sfile;
-+#else
- char debug_buf[512];
-+#endif
- int idx;
- if (wl->tkipmodops) {
- if (group_key) {
-@@ -3242,7 +3247,11 @@
- wl->tkipmodops->print_stats(debug_buf, wl->tkip_ucast_data);
- else
- return;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
-+ printk("%s: TKIP stats from module: %s\n", debug_buf->buf, group_key?"Bcast":"Ucast");
-+#else
- printk("%s: TKIP stats from module: %s\n", debug_buf, group_key?"Bcast":"Ucast");
-+#endif
- }
- #endif
- }
-@@ -3401,17 +3410,24 @@
- return 0;
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
- static int
- wl_proc_read(char *buffer, char **start, off_t offset, int length, int *eof, void *data)
-+#else
-+static ssize_t
-+wl_proc_read (struct file *filp, char __user *buffer, size_t length, loff_t *data)
-+#endif
- {
- wl_info_t * wl = (wl_info_t *)data;
- int bcmerror, to_user;
- int len;
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
- if (offset > 0) {
- *eof = 1;
- return 0;
- }
-+#endif
-
- if (!length) {
- WL_ERROR(("%s: Not enough return buf space\n", __FUNCTION__));
-@@ -3424,8 +3440,13 @@
- return len;
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
- static int
- wl_proc_write(struct file *filp, const char *buff, unsigned long length, void *data)
-+#else
-+static ssize_t
-+wl_proc_write (struct file *filp, const char __user *buff, size_t length, loff_t *data)
-+#endif
- {
- wl_info_t * wl = (wl_info_t *)data;
- int from_user = 0;
-@@ -3455,19 +3476,34 @@
- return length;
- }
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
-+static const struct file_operations wl_fops = {
-+ .owner = THIS_MODULE,
-+ .read = wl_proc_read,
-+ .write = wl_proc_write,
-+};
-+#endif
-+
- static int
- wl_reg_proc_entry(wl_info_t *wl)
- {
- char tmp[32];
- sprintf(tmp, "%s%d", HYBRID_PROC, wl->pub->unit);
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
- if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {
- WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp));
-+#else
-+ if ((wl->proc_entry = proc_create(tmp, 0644, NULL, &wl_fops)) == NULL) {
-+ WL_ERROR(("%s: proc_create %s failed\n", __FUNCTION__, tmp));
-+#endif
- ASSERT(0);
- return -1;
- }
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
- wl->proc_entry->read_proc = wl_proc_read;
- wl->proc_entry->write_proc = wl_proc_write;
- wl->proc_entry->data = wl;
-+#endif
- return 0;
- }
- #ifdef WLOFFLD
diff --git a/network/broadcom-sta/slack-desc b/network/broadcom-sta/slack-desc
index abf660e3a4..02000f4c14 100644
--- a/network/broadcom-sta/slack-desc
+++ b/network/broadcom-sta/slack-desc
@@ -8,12 +8,12 @@
|-----handy-ruler------------------------------------------------------|
broadcom-sta: broadcom-sta (Broadcom wireless drivers)
broadcom-sta:
-broadcom-sta: Proprietary drivers for a number of Broadcom cards. Includes a
-broadcom-sta: kernel module named 'wl'.
+broadcom-sta: Proprietary driver for Broadcom's BCM4311, BCM4312, BCM4313, BCM4321,
+broadcom-sta: BCM4322, BCM43142, BCM43224, BCM43225, BCM43227, BCM43228, BCM4331,
+broadcom-sta: BCM4360 and BCM4352 wireless network cards. Includes a kernel module
+broadcom-sta: named 'wl'.
broadcom-sta:
broadcom-sta: For more information, see:
-broadcom-sta: http://www.broadcom.com/support/802.11/linux_sta.php
-broadcom-sta:
-broadcom-sta:
+broadcom-sta: https://www.broadcom.com/support/802.11
broadcom-sta:
broadcom-sta: