summaryrefslogtreecommitdiff
path: root/network/broadcom-sta/broadcom-sta.SlackBuild
diff options
context:
space:
mode:
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)