diff options
-rw-r--r-- | network/broadcom-sta/README | 12 | ||||
-rw-r--r-- | network/broadcom-sta/broadcom-sta.SlackBuild | 12 | ||||
-rw-r--r-- | network/broadcom-sta/linux48.patch | 52 |
3 files changed, 67 insertions, 9 deletions
diff --git a/network/broadcom-sta/README b/network/broadcom-sta/README index f90156866c..1658fab2a4 100644 --- a/network/broadcom-sta/README +++ b/network/broadcom-sta/README @@ -23,12 +23,8 @@ disables these drivers. Read the included LICENSE.txt file (placed in /usr/doc) before using the proprietary driver. -Kernel compile instructions (for BCM43142) -=========================== +If you would like to name your interface wlan0 instead of eth1, either +rename the device in /etc/udev/rules.d/70-persistent-net.rules or build +the package with: -1) Ensure that all the wifi drivers (b43, Intel pro, etc) in - drivers>network>wireless are compiled as modules. - -2) Either disable or compile the 'Broadcom specific AMBA' (drivers) as a - module. Otherwise this driver will be loaded by the wifi module instead - of the proper one. + IFNAME=wlan ./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 <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) diff --git a/network/broadcom-sta/linux48.patch b/network/broadcom-sta/linux48.patch new file mode 100644 index 0000000000..0f3e819062 --- /dev/null +++ b/network/broadcom-sta/linux48.patch @@ -0,0 +1,52 @@ +Reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839629 + +--- a/src/wl/sys/wl_cfg80211_hybrid.c 2016-10-03 10:53:55.588036464 +0200 ++++ b/src/wl/sys/wl_cfg80211_hybrid.c 2016-10-03 10:54:11.911695944 +0200 +@@ -2386,8 +2386,15 @@ + s32 err = 0; + + if (wl->scan_request) { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) ++ struct cfg80211_scan_info info = { ++ .aborted = true ++ }; + WL_DBG(("%s: Aborting scan\n", __FUNCTION__)); +- cfg80211_scan_done(wl->scan_request, true); ++ cfg80211_scan_done(wl->scan_request, &info); ++#else ++ cfg80211_scan_done(wl->scan_request, true); ++#endif + wl->scan_request = NULL; + } + +@@ -2488,7 +2495,14 @@ + + scan_done_out: + if (wl->scan_request) { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) ++ struct cfg80211_scan_info info = { ++ .aborted = false ++ }; ++ cfg80211_scan_done(wl->scan_request, &info); ++#else + cfg80211_scan_done(wl->scan_request, false); ++#endif + wl->scan_request = NULL; + } + rtnl_unlock(); +@@ -2913,7 +2927,14 @@ + s32 err = 0; + + if (wl->scan_request) { +- cfg80211_scan_done(wl->scan_request, true); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) ++ struct cfg80211_scan_info info = { ++ .aborted = true ++ }; ++ cfg80211_scan_done(wl->scan_request, &info); ++#else ++ cfg80211_scan_done(wl->scan_request, true); ++#endif + wl->scan_request = NULL; + } + |