From bd673e29e9d4b4024d1efb21e954277534ac0f8e Mon Sep 17 00:00:00 2001 From: Andreas Voegele Date: Tue, 9 May 2017 23:18:52 +0100 Subject: network/broadcom-sta: Support Linux kernel 4.9+. Signed-off-by: David Spencer --- network/broadcom-sta/broadcom-sta.SlackBuild | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'network/broadcom-sta/broadcom-sta.SlackBuild') 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 +# Copyright 2015-2017 Andreas Voegele # # 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) -- cgit v1.2.3