summaryrefslogtreecommitdiff
path: root/network/broadcom-sta/broadcom-sta.SlackBuild
diff options
context:
space:
mode:
authorAndreas Voegele <andreas@andreasvoegele.com>2017-05-09 23:18:52 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-05-13 06:58:50 +0700
commitbd673e29e9d4b4024d1efb21e954277534ac0f8e (patch)
tree159a4231a56470fa0289db21f293c4ed3f596c92 /network/broadcom-sta/broadcom-sta.SlackBuild
parente196e8f941a3ea123f73ba3778f755a4faa0d9b0 (diff)
downloadslackbuilds-bd673e29e9d4b4024d1efb21e954277534ac0f8e.tar.gz
network/broadcom-sta: Support Linux kernel 4.9+.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'network/broadcom-sta/broadcom-sta.SlackBuild')
-rw-r--r--network/broadcom-sta/broadcom-sta.SlackBuild12
1 files changed, 11 insertions, 1 deletions
diff --git a/network/broadcom-sta/broadcom-sta.SlackBuild b/network/broadcom-sta/broadcom-sta.SlackBuild
index 1deb7f6cd0..0716e2473c 100644
--- a/network/broadcom-sta/broadcom-sta.SlackBuild
+++ b/network/broadcom-sta/broadcom-sta.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for broadcom-sta
-# Copyright 2015 Andreas Voegele <andreas@andreasvoegele.com>
+# Copyright 2015-2017 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
@@ -22,6 +22,7 @@ BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
KERNEL=${KERNEL:-$( uname -r )}
+IFNAME=${IFNAME:-eth}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -65,8 +66,17 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+if [ "$IFNAME" != "eth" ]; then
+ sed -i "/BRCM_WLAN_IFNAME/s/eth/$IFNAME/" src/wl/sys/wl_linux.c
+fi
+
patch -p1 < $CWD/001-null-pointer-fix.patch
patch -p1 < $CWD/002-rdtscl.patch
+if [ -n "${KERNEL##[23].*}" -a -n "${KERNEL##4.[0-6].*}" ]; then
+ sed -i.orig 's/IEEE80211_BAND_\([25]\)GHZ/NL80211_BAND_\1GHZ/g' \
+ src/wl/sys/wl_cfg80211_hybrid.c
+fi
+patch -p1 < $CWD/linux48.patch
make -C /lib/modules/$KERNEL/build M=$(pwd) clean
make -C /lib/modules/$KERNEL/build M=$(pwd)