diff options
author | Robby Workman <rworkman@slackbuilds.org> | 2021-04-21 22:08:29 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2021-04-21 22:08:29 -0500 |
commit | 362cebb57503f5c8cc292dacd0c23309a20b543f (patch) | |
tree | 37ff2b8a5bd2a78220558514b16a1347fb80d0a7 | |
parent | a43754522ddd74220fc08350bee8d9309293332a (diff) |
network/broadcom-sta: Removed (no maintainer)
19 files changed, 0 insertions, 1203 deletions
diff --git a/network/broadcom-sta/README b/network/broadcom-sta/README deleted file mode 100644 index c14eef70a7483..0000000000000 --- a/network/broadcom-sta/README +++ /dev/null @@ -1,35 +0,0 @@ -The broadcom-sta package includes the kernel module 'wl', which contains -a Broadcom-provided proprietary kernel driver known to support the -listed chipsets. - -BCM4311 (PCI ID 14e4:4311, 14e4:4312, 14e4:4313) -BCM4312 (PCI ID 14e4:4315) -BCM4313 (PCI ID 14e4:4727) -BCM4321 (PCI ID 14e4:4328, 14e4:4329, 14e4:432a) -BCM4322 (PCI ID 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) - -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. - -To build the module for a kernel that isn't currently running on the -system, pass that kernel's "uname -r" output such as: - - KERNEL=4.4.67 ./broadcom-sta.SlackBuild - -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: - - IFNAME=wlan ./broadcom-sta.SlackBuild diff --git a/network/broadcom-sta/b43_blacklist.conf.new b/network/broadcom-sta/b43_blacklist.conf.new deleted file mode 100644 index 76c457bc43b88..0000000000000 --- a/network/broadcom-sta/b43_blacklist.conf.new +++ /dev/null @@ -1,9 +0,0 @@ -# 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 deleted file mode 100644 index e1258bdbad6f5..0000000000000 --- a/network/broadcom-sta/broadcom-sta.SlackBuild +++ /dev/null @@ -1,134 +0,0 @@ -#!/bin/sh - -# Slackware build script for broadcom-sta - -# Copyright 2015-2019 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=${VERSION:-6.30.223.271} -BUILD=${BUILD:-3} -TAG=${TAG:-_SBo} - -KERNEL=${KERNEL:-$( uname -r )} -IFNAME=${IFNAME:-eth} - -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i586 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - esac -fi - -CWD=$(pwd) -TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} - -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 $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 {} \; - -if [ "$IFNAME" != "eth" ]; then - sed -i "/BRCM_WLAN_IFNAME/s/eth/$IFNAME/" src/wl/sys/wl_linux.c -fi - -patch -p2 < $CWD/patches/04-user_ioctl.patch -patch -p2 < $CWD/patches/05-remove-time-and-date-macros.patch -patch -p2 < $CWD/patches/13-broadcom-sta-6.30.223.248-linux-3.18-null-pointer-crash.patch -patch -p2 < $CWD/patches/14-rdtscl.patch -#patch -p2 < $CWD/patches/15-linux47.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 -p2 < $CWD/patches/16-linux48.patch -patch -p2 < $CWD/patches/17-fix-kernel-warnings.patch -patch -p2 < $CWD/patches/18-linux411.patch -patch -p2 < $CWD/patches/19-linux412.patch -patch -p2 < $CWD/patches/20-linux414.patch -patch -p2 < $CWD/patches/21-linux415.patch -patch -p2 < $CWD/patches/22-linux56.patch -patch -p1 < $CWD/patches/009-fix_mac_profile_discrepancy.patch -patch -p2 < $CWD/patches/23-get-rid-of-get_fs-set_fs-calls.patch - -# See https://lkml.org/lkml/2019/3/1/643 -sed -i 's/get_ds()/KERNEL_DS/g' src/wl/sys/wl_iw.c -sed -i 's/get_ds()/KERNEL_DS/g' src/wl/sys/wl_cfg80211_hybrid.c - -env -u ARCH make -C /lib/modules/$KERNEL/build M=$(pwd) clean -env -u ARCH make -C /lib/modules/$KERNEL/build M=$(pwd) - -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 - -mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc -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 -/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 deleted file mode 100644 index bb46a80e45004..0000000000000 --- a/network/broadcom-sta/broadcom-sta.info +++ /dev/null @@ -1,14 +0,0 @@ -PRGNAM="broadcom-sta" -VERSION="6.30.223.271" -HOMEPAGE="https://www.broadcom.com/support/802.11" -DOWNLOAD="https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/README_6.30.223.271.txt \ - https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35-nodebug-pcoem-6_30_223_271.tar.gz" -MD5SUM="e3dab6d9dea12b6487ccf24d012e0350 \ - 4e75f4cb7d87f690f9659ffc478495f0" -DOWNLOAD_x86_64="https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/README_6.30.223.271.txt \ - https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz" -MD5SUM_x86_64="e3dab6d9dea12b6487ccf24d012e0350 \ - 115903050c41d466161784d4c843f4f9" -REQUIRES="" -MAINTAINER="orphaned - no maintainer" -EMAIL="nobody@nowhere" diff --git a/network/broadcom-sta/patches/009-fix_mac_profile_discrepancy.patch b/network/broadcom-sta/patches/009-fix_mac_profile_discrepancy.patch deleted file mode 100644 index 835bfb7bb6238..0000000000000 --- a/network/broadcom-sta/patches/009-fix_mac_profile_discrepancy.patch +++ /dev/null @@ -1,14 +0,0 @@ -Don't disconnect from certain roamable networks broadcasting multiple -SSIDs. See https://bugs.archlinux.org/task/61090 for more information. - -diff -ur a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c ---- a/src/wl/sys/wl_cfg80211_hybrid.c 2015-09-19 00:47:15.000000000 +0200 -+++ b/src/wl/sys/wl_cfg80211_hybrid.c 2019-05-30 11:41:12.168748142 +0200 -@@ -1446,7 +1446,6 @@ - - if (memcmp(mac, wl->profile->bssid, ETHER_ADDR_LEN)) { - WL_ERR(("Wrong Mac address, mac = %pM profile =%pM\n", mac, wl->profile->bssid)); -- return -ENOENT; - } - - err = wl_dev_ioctl(dev, WLC_GET_RATE, &rate, sizeof(rate)); diff --git a/network/broadcom-sta/patches/04-user_ioctl.patch b/network/broadcom-sta/patches/04-user_ioctl.patch deleted file mode 100644 index 902a7d9f7dc6a..0000000000000 --- a/network/broadcom-sta/patches/04-user_ioctl.patch +++ /dev/null @@ -1,22 +0,0 @@ -Description: Allow normal users to send ioctl requests -Author: Cyril Lacoux <clacoux@easter-eggs.com> -Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=672677 -Last-Update: 2012-11-19 - -Index: broadcom-sta/amd64/src/wl/sys/wl_linux.c -=================================================================== ---- broadcom-sta.orig/amd64/src/wl/sys/wl_linux.c -+++ broadcom-sta/amd64/src/wl/sys/wl_linux.c -@@ -1661,11 +1661,7 @@ wl_ioctl(struct net_device *dev, struct - } - - WL_LOCK(wl); -- if (!capable(CAP_NET_ADMIN)) { -- bcmerror = BCME_EPERM; -- } else { -- bcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif); -- } -+ bcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif); - WL_UNLOCK(wl); - - done1: diff --git a/network/broadcom-sta/patches/05-remove-time-and-date-macros.patch b/network/broadcom-sta/patches/05-remove-time-and-date-macros.patch deleted file mode 100644 index 3cd3fc845b35d..0000000000000 --- a/network/broadcom-sta/patches/05-remove-time-and-date-macros.patch +++ /dev/null @@ -1,29 +0,0 @@ -Description: Remove __TIME__ and __DATE__ macros from code -Author: Cyril Lacoux <clacoux@easter-eggs.com> -Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752864 -Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=754434 -Last-Update: 2014-08-13 - -Index: broadcom-sta/amd64/src/wl/sys/wl_linux.c -=================================================================== ---- broadcom-sta.orig/amd64/src/wl/sys/wl_linux.c -+++ broadcom-sta/amd64/src/wl/sys/wl_linux.c -@@ -726,7 +726,7 @@ wl_attach(uint16 vendor, uint16 device, - WL_ALL_PASSIVE_ENAB(wl) ? ", Passive Mode" : "", EPI_VERSION_STR); - - #ifdef BCMDBG -- printf(" (Compiled in " SRCBASE " at " __TIME__ " on " __DATE__ ")"); -+ printf(" (Compiled in " SRCBASE); - #endif - printf("\n"); - -@@ -2051,8 +2051,7 @@ wl_osl_pcie_rc(struct wl_info *wl, uint - void - wl_dump_ver(wl_info_t *wl, struct bcmstrbuf *b) - { -- bcm_bprintf(b, "wl%d: %s %s version %s\n", wl->pub->unit, -- __DATE__, __TIME__, EPI_VERSION_STR); -+ bcm_bprintf(b, "wl%d: version %s\n", wl->pub->unit, EPI_VERSION_STR); - } - - #if defined(BCMDBG) diff --git a/network/broadcom-sta/patches/13-broadcom-sta-6.30.223.248-linux-3.18-null-pointer-crash.patch b/network/broadcom-sta/patches/13-broadcom-sta-6.30.223.248-linux-3.18-null-pointer-crash.patch deleted file mode 100644 index 9e7e8113081a9..0000000000000 --- a/network/broadcom-sta/patches/13-broadcom-sta-6.30.223.248-linux-3.18-null-pointer-crash.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Hugo Osvaldo Barrera <hugo@barrera.io> - -Downloaded from https://gist.github.com/hobarrera/ac0e6225210ac5bb13f6#file-broadcom-sta-6-30-223-248-linux-3-18-null-pointer-crash-patch - --- -Index: broadcom-sta/amd64/src/wl/sys/wl_linux.c -=================================================================== ---- broadcom-sta.orig/amd64/src/wl/sys/wl_linux.c -+++ broadcom-sta/amd64/src/wl/sys/wl_linux.c -@@ -2162,8 +2162,8 @@ wl_start(struct sk_buff *skb, struct net - 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); - diff --git a/network/broadcom-sta/patches/14-rdtscl.patch b/network/broadcom-sta/patches/14-rdtscl.patch deleted file mode 100644 index 0558e9840279b..0000000000000 --- a/network/broadcom-sta/patches/14-rdtscl.patch +++ /dev/null @@ -1,22 +0,0 @@ -Since Linux 4.3, rdtscl() is no longer available and native_read_tsc() -is renamed to rdtsc(). Move the macro contents in-line and call the -new function. References: - -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/amd64/src/shared/linux_osl.c 2015-09-19 01:47:15.000000000 +0300 -+++ b/amd64/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/patches/15-linux47.patch b/network/broadcom-sta/patches/15-linux47.patch deleted file mode 100644 index af0d04eb13820..0000000000000 --- a/network/broadcom-sta/patches/15-linux47.patch +++ /dev/null @@ -1,122 +0,0 @@ -From: Felix Yan <felixonmars@archlinux.org> -Date: Mon, 20 Jun 2016 11:18:00 +0800 -Subject: linux47 -Origin: https://github.com/archlinuxcn/repo/tree/f4d6cff1cacf8dad13006fade5f96bc2cf020a9b/broadcom-wl-dkms - -Since Linux 4.7, the enum ieee80211_band is no longer used - -This shall cause no problem's since both enums ieee80211_band -and nl80211_band were added in the same commit: -https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=13ae75b103e07304a34ab40c9136e9f53e06475c - -This patch refactors the references of IEEE80211_BAND_* to NL80211_BAND_* - -Reference: -https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=57fbcce37be7c1d2622b56587c10ade00e96afa3 - -This patch is based on -https://github.com/archlinuxcn/repo/tree/f4d6cff1cacf8dad13006fade5f96bc2cf020a9b/broadcom-wl-dkms . ---- - amd64/src/wl/sys/wl_cfg80211_hybrid.c | 24 ++++++++++++------------ - 1 file changed, 12 insertions(+), 12 deletions(-) - -diff --git a/amd64/src/wl/sys/wl_cfg80211_hybrid.c b/amd64/src/wl/sys/wl_cfg80211_hybrid.c -index 7b606e0..cc5422d 100644 ---- a/amd64/src/wl/sys/wl_cfg80211_hybrid.c -+++ b/amd64/src/wl/sys/wl_cfg80211_hybrid.c -@@ -236,7 +236,7 @@ static s8 wl_dbg_estr[][WL_DBG_ESTR_MAX] = { - #endif - - #define CHAN2G(_channel, _freq, _flags) { \ -- .band = IEEE80211_BAND_2GHZ, \ -+ .band = NL80211_BAND_2GHZ, \ - .center_freq = (_freq), \ - .hw_value = (_channel), \ - .flags = (_flags), \ -@@ -245,7 +245,7 @@ static s8 wl_dbg_estr[][WL_DBG_ESTR_MAX] = { - } - - #define CHAN5G(_channel, _flags) { \ -- .band = IEEE80211_BAND_5GHZ, \ -+ .band = NL80211_BAND_5GHZ, \ - .center_freq = 5000 + (5 * (_channel)), \ - .hw_value = (_channel), \ - .flags = (_flags), \ -@@ -379,7 +379,7 @@ static struct ieee80211_channel __wl_5ghz_n_channels[] = { - }; - - static struct ieee80211_supported_band __wl_band_2ghz = { -- .band = IEEE80211_BAND_2GHZ, -+ .band = NL80211_BAND_2GHZ, - .channels = __wl_2ghz_channels, - .n_channels = ARRAY_SIZE(__wl_2ghz_channels), - .bitrates = wl_g_rates, -@@ -387,7 +387,7 @@ static struct ieee80211_supported_band __wl_band_2ghz = { - }; - - static struct ieee80211_supported_band __wl_band_5ghz_a = { -- .band = IEEE80211_BAND_5GHZ, -+ .band = NL80211_BAND_5GHZ, - .channels = __wl_5ghz_a_channels, - .n_channels = ARRAY_SIZE(__wl_5ghz_a_channels), - .bitrates = wl_a_rates, -@@ -395,7 +395,7 @@ static struct ieee80211_supported_band __wl_band_5ghz_a = { - }; - - static struct ieee80211_supported_band __wl_band_5ghz_n = { -- .band = IEEE80211_BAND_5GHZ, -+ .band = NL80211_BAND_5GHZ, - .channels = __wl_5ghz_n_channels, - .n_channels = ARRAY_SIZE(__wl_5ghz_n_channels), - .bitrates = wl_a_rates, -@@ -1876,8 +1876,8 @@ static s32 wl_alloc_wdev(struct device *dev, struct wireless_dev **rwdev) - wdev->wiphy->max_num_pmkids = WL_NUM_PMKIDS_MAX; - #endif - wdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC); -- wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &__wl_band_2ghz; -- wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_a; -+ wdev->wiphy->bands[NL80211_BAND_2GHZ] = &__wl_band_2ghz; -+ wdev->wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_a; - wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; - wdev->wiphy->cipher_suites = __wl_cipher_suites; - wdev->wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites); -@@ -2000,7 +2000,7 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39) - freq = ieee80211_channel_to_frequency(notif_bss_info->channel, - (notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ? -- IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ); -+ NL80211_BAND_2GHZ : NL80211_BAND_5GHZ); - #else - freq = ieee80211_channel_to_frequency(notif_bss_info->channel); - #endif -@@ -2116,7 +2116,7 @@ wl_notify_connect_status(struct wl_cfg80211_priv *wl, struct net_device *ndev, - return err; - } - chan = wf_chspec_ctlchan(chanspec); -- band = (chan <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; -+ band = (chan <= CH_MAX_2G_CHANNEL) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ; - freq = ieee80211_channel_to_frequency(chan, band); - channel = ieee80211_get_channel(wiphy, freq); - cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL); -@@ -2250,10 +2250,10 @@ static void wl_ch_to_chanspec(struct ieee80211_channel *chan, struct wl_join_par - join_params->params.chanspec_list[0] = - ieee80211_frequency_to_channel(chan->center_freq); - -- if (chan->band == IEEE80211_BAND_2GHZ) { -+ if ( (int) chan->band == (int) NL80211_BAND_2GHZ) { - chanspec |= WL_CHANSPEC_BAND_2G; - } -- else if (chan->band == IEEE80211_BAND_5GHZ) { -+ else if ( (int) chan->band == (int) NL80211_BAND_5GHZ) { - chanspec |= WL_CHANSPEC_BAND_5G; - } - else { -@@ -2885,7 +2885,7 @@ static s32 wl_update_wiphybands(struct wl_cfg80211_priv *wl) - - if (phy == 'n' || phy == 'a' || phy == 'v') { - wiphy = wl_to_wiphy(wl); -- wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_n; -+ wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_n; - } - - return err; diff --git a/network/broadcom-sta/patches/16-linux48.patch b/network/broadcom-sta/patches/16-linux48.patch deleted file mode 100644 index 63bdc56e3ec0c..0000000000000 --- a/network/broadcom-sta/patches/16-linux48.patch +++ /dev/null @@ -1,66 +0,0 @@ -From: koos vriezen <koos.vriezen@gmail.com> -Date: Mon, 3 Oct 2016 10:54:11 +0200 -Subject: linux48 -Origin: https://bugs.debian.org/ - -Looking at the patch for kernel 4.8, I came up with the attached patch -(and I send this mail while running it :) - -Thanks, -Koos Vriezen ---- - amd64/src/wl/sys/wl_cfg80211_hybrid.c | 25 +++++++++++++++++++++++-- - 1 file changed, 23 insertions(+), 2 deletions(-) - -diff --git a/amd64/src/wl/sys/wl_cfg80211_hybrid.c b/amd64/src/wl/sys/wl_cfg80211_hybrid.c -index cc5422d..05b9fd3 100644 ---- a/amd64/src/wl/sys/wl_cfg80211_hybrid.c -+++ b/amd64/src/wl/sys/wl_cfg80211_hybrid.c -@@ -2386,8 +2386,15 @@ wl_bss_connect_done(struct wl_cfg80211_priv *wl, struct net_device *ndev, - 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 @@ wl_notify_scan_status(struct wl_cfg80211_priv *wl, struct net_device *ndev, - - 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 wl_cfg80211_down(struct net_device *ndev) - 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; - } - diff --git a/network/broadcom-sta/patches/17-fix-kernel-warnings.patch b/network/broadcom-sta/patches/17-fix-kernel-warnings.patch deleted file mode 100644 index c8a2ae8199d96..0000000000000 --- a/network/broadcom-sta/patches/17-fix-kernel-warnings.patch +++ /dev/null @@ -1,172 +0,0 @@ -From: Luis Ortega <luiorpe1@gmail.com> -Date: Sun, 6 Nov 2016 12:15:10 +0100 -Subject: fix-kernel-warnings -Origin: https://bugs.debian.org/843387 - ---- - amd64/src/wl/sys/wl_cfg80211_hybrid.c | 87 ++++++++++++++++++++++++----------- - 1 file changed, 60 insertions(+), 27 deletions(-) - -diff --git a/amd64/src/wl/sys/wl_cfg80211_hybrid.c b/amd64/src/wl/sys/wl_cfg80211_hybrid.c -index 05b9fd3..551fe1f 100644 ---- a/amd64/src/wl/sys/wl_cfg80211_hybrid.c -+++ b/amd64/src/wl/sys/wl_cfg80211_hybrid.c -@@ -1968,7 +1968,7 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info - - if (dtoh32(bi->length) > WL_BSS_INFO_MAX) { - WL_DBG(("Beacon is larger than buffer. Discarding\n")); -- return err; -+ return -E2BIG; - } - notif_bss_info = kzalloc(sizeof(*notif_bss_info) + sizeof(*mgmt) - sizeof(u8) + - WL_BSS_INFO_MAX, GFP_KERNEL); -@@ -1992,9 +1992,15 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info - beacon_proberesp->capab_info = cpu_to_le16(bi->capability); - wl_rst_ie(wl); - -- wl_mrg_ie(wl, ((u8 *) bi) + bi->ie_offset, bi->ie_length); -- wl_cp_ie(wl, beacon_proberesp->variable, WL_BSS_INFO_MAX - -+ err = wl_mrg_ie(wl, ((u8 *) bi) + bi->ie_offset, bi->ie_length); -+ if (err) -+ goto inform_single_bss_out; -+ -+ err = wl_cp_ie(wl, beacon_proberesp->variable, WL_BSS_INFO_MAX - - offsetof(struct wl_cfg80211_bss_info, frame_buf)); -+ if (err) -+ goto inform_single_bss_out; -+ - notif_bss_info->frame_len = offsetof(struct ieee80211_mgmt, u.beacon.variable) + - wl_get_ielen(wl); - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39) -@@ -2006,14 +2012,14 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info - #endif - if (freq == 0) { - WL_ERR(("Invalid channel, fail to chcnage channel to freq\n")); -- kfree(notif_bss_info); -- return -EINVAL; -+ err = -EINVAL; -+ goto inform_single_bss_out; - } - channel = ieee80211_get_channel(wiphy, freq); - if (unlikely(!channel)) { - WL_ERR(("ieee80211_get_channel error\n")); -- kfree(notif_bss_info); -- return -EINVAL; -+ err = -EINVAL; -+ goto inform_single_bss_out; - } - - WL_DBG(("SSID : \"%s\", rssi %d, channel %d, capability : 0x04%x, bssid %pM\n", -@@ -2021,28 +2027,37 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info - mgmt->u.beacon.capab_info, &bi->BSSID)); - - signal = notif_bss_info->rssi * 100; -- cbss = cfg80211_inform_bss_frame(wiphy, channel, mgmt, -- le16_to_cpu(notif_bss_info->frame_len), signal, GFP_KERNEL); -- if (unlikely(!cbss)) { -- WL_ERR(("cfg80211_inform_bss_frame error\n")); -- kfree(notif_bss_info); -- return -EINVAL; -- } - -- notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset); -- notify_ielen = le32_to_cpu(bi->ie_length); -+ if (!wl->scan_request) { -+ cbss = cfg80211_inform_bss_frame(wiphy, channel, mgmt, -+ le16_to_cpu(notif_bss_info->frame_len), signal, GFP_KERNEL); -+ if (unlikely(!cbss)) { -+ WL_ERR(("cfg80211_inform_bss_frame error\n")); -+ err = -ENOMEM; -+ goto inform_single_bss_out; -+ } -+ } else { -+ notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset); -+ notify_ielen = le32_to_cpu(bi->ie_length); - #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) -- cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet), -- 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int, -- (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL); -+ cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet), -+ 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int, -+ (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL); - #else -- cbss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, (const u8 *)(bi->BSSID.octet), -- 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int, -- (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL); -+ cbss = cfg80211_inform_bss(wiphy, channel, -+ wl->active_scan ? -+ CFG80211_BSS_FTYPE_PRESP : CFG80211_BSS_FTYPE_BEACON, -+ (const u8 *)(bi->BSSID.octet), 0, -+ beacon_proberesp->capab_info, -+ beacon_proberesp->beacon_int, -+ (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL); - #endif -- -- if (unlikely(!cbss)) -- return -ENOMEM; -+ if (unlikely(!cbss)) { -+ WL_ERR(("cfg80211_inform_bss error\n")); -+ err = -ENOMEM; -+ goto inform_single_bss_out; -+ } -+ } - - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) - cfg80211_put_bss(wiphy, cbss); -@@ -2050,6 +2065,7 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info - cfg80211_put_bss(cbss); - #endif - -+inform_single_bss_out: - kfree(notif_bss_info); - - return err; -@@ -2316,6 +2332,9 @@ static s32 wl_update_bss_info(struct wl_cfg80211_priv *wl) - if (err) - goto update_bss_info_out; - -+ bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid, -+ ssid->SSID, ssid->SSID_len, WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS); -+ - ie = ((u8 *)bi) + bi->ie_offset; - ie_len = bi->ie_length; - } else { -@@ -2328,11 +2347,18 @@ static s32 wl_update_bss_info(struct wl_cfg80211_priv *wl) - ie_len = bss->len_information_elements; - #endif - wl->conf->channel = *bss->channel; -+ } -+ -+ if (bss) { - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) - cfg80211_put_bss(wiphy, bss); - #else - cfg80211_put_bss(bss); - #endif -+ } else { -+ WL_DBG(("Could not update BSS\n")); -+ err = -EINVAL; -+ goto update_bss_info_out; - } - - tim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM); -@@ -2360,10 +2386,17 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev, - struct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl); - s32 err = 0; - -- wl_get_assoc_ies(wl); -+ err = wl_get_assoc_ies(wl); -+ if (err) -+ return err; -+ - memcpy(wl->profile->bssid, &e->addr, ETHER_ADDR_LEN); - memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN); -- wl_update_bss_info(wl); -+ -+ err = wl_update_bss_info(wl); -+ if (err) -+ return err; -+ - cfg80211_roamed(ndev, - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) - &wl->conf->channel, diff --git a/network/broadcom-sta/patches/18-linux411.patch b/network/broadcom-sta/patches/18-linux411.patch deleted file mode 100644 index bc9a9508beb19..0000000000000 --- a/network/broadcom-sta/patches/18-linux411.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: koos vriezen <koos.vriezen@gmail.com> -Date: Mon, 1 May 2017 18:28:01 +0200 -Subject: Compile fix with kernel 4.11 -Origin: http://bugs.debian.org/861807 -Forwarded: no -Reviewed-By: Eduard Bloch <blade@debian.org> -Last-Update: 2017-05-04 - - I use the attached patch to get this module compiled with 4.11. Works - for me since last sunday. - Apparently https://aur.archlinux.org/cgit/aur.git/tree/linux411.patch?h=broadcom-wl - has come with a different patch for the removed last_rx field in - netdevice. But judging the commit log - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/include/linux/netdevice.h?id=4a7c972644c1151f6dd34ff4b5f7eacb239e22ee - and the fact that last_rx isn't used elsewhere I came up with just - ifdef it out. ---- - amd64/src/wl/sys/wl_cfg80211_hybrid.c | 3 +++ - amd64/src/wl/sys/wl_linux.c | 2 ++ - 2 files changed, 5 insertions(+) - -diff --git a/amd64/src/wl/sys/wl_cfg80211_hybrid.c b/amd64/src/wl/sys/wl_cfg80211_hybrid.c -index 551fe1f..83930ec 100644 ---- a/amd64/src/wl/sys/wl_cfg80211_hybrid.c -+++ b/amd64/src/wl/sys/wl_cfg80211_hybrid.c -@@ -30,6 +30,9 @@ - #include <linux/kthread.h> - #include <linux/netdevice.h> - #include <linux/ieee80211.h> -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) -+#include <linux/sched/signal.h> -+#endif - #include <net/cfg80211.h> - #include <linux/nl80211.h> - #include <net/rtnetlink.h> -diff --git a/amd64/src/wl/sys/wl_linux.c b/amd64/src/wl/sys/wl_linux.c -index b7fbe28..77dc327 100644 ---- a/amd64/src/wl/sys/wl_linux.c -+++ b/amd64/src/wl/sys/wl_linux.c -@@ -2912,7 +2912,9 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p) - if (skb == NULL) return; - - skb->dev = wl->monitor_dev; -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0) - skb->dev->last_rx = jiffies; -+#endif - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) - skb_reset_mac_header(skb); - #else diff --git a/network/broadcom-sta/patches/19-linux412.patch b/network/broadcom-sta/patches/19-linux412.patch deleted file mode 100644 index c88b9e1023b8f..0000000000000 --- a/network/broadcom-sta/patches/19-linux412.patch +++ /dev/null @@ -1,75 +0,0 @@ -From: koos vriezen <koos.vriezen@gmail.com> -Date: Mon, 3 Jul 2017 09:57:21 +0200 -Subject: linux412 -Origin: https://bugs.debian.org/867258 - ---- - amd64/src/wl/sys/wl_cfg80211_hybrid.c | 29 +++++++++++++++++++++++++---- - 1 file changed, 25 insertions(+), 4 deletions(-) - -diff --git a/amd64/src/wl/sys/wl_cfg80211_hybrid.c b/amd64/src/wl/sys/wl_cfg80211_hybrid.c -index 83930ec..1ec2ef3 100644 ---- a/amd64/src/wl/sys/wl_cfg80211_hybrid.c -+++ b/amd64/src/wl/sys/wl_cfg80211_hybrid.c -@@ -53,7 +53,11 @@ u32 wl_dbg_level = WL_DBG_ERR; - #endif - - static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev, -- enum nl80211_iftype type, u32 *flags, struct vif_params *params); -+ enum nl80211_iftype type, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0) -+ u32 *flags, -+#endif -+ struct vif_params *params); - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) - static s32 - wl_cfg80211_scan(struct wiphy *wiphy, -@@ -466,8 +470,11 @@ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len) - - static s32 - wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev, -- enum nl80211_iftype type, u32 *flags, -- struct vif_params *params) -+ enum nl80211_iftype type, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0) -+ u32 *flags, -+#endif -+ struct vif_params *params) - { - struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy); - struct wireless_dev *wdev; -@@ -2387,6 +2394,15 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev, - const wl_event_msg_t *e, void *data) - { - struct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) -+ struct cfg80211_roam_info roam_info = { -+ .bssid = wl->profile->bssid, -+ .req_ie = conn_info->req_ie, -+ .req_ie_len = conn_info->req_ie_len, -+ .resp_ie = conn_info->resp_ie, -+ .resp_ie_len = conn_info->resp_ie_len, -+ }; -+#endif - s32 err = 0; - - err = wl_get_assoc_ies(wl); -@@ -2401,12 +2417,17 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev, - return err; - - cfg80211_roamed(ndev, -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) -+ &roam_info, -+#else - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) - &wl->conf->channel, - #endif - (u8 *)&wl->bssid, - conn_info->req_ie, conn_info->req_ie_len, -- conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL); -+ conn_info->resp_ie, conn_info->resp_ie_len, -+#endif -+ GFP_KERNEL); - WL_DBG(("Report roaming result\n")); - - set_bit(WL_STATUS_CONNECTED, &wl->status); diff --git a/network/broadcom-sta/patches/20-linux414.patch b/network/broadcom-sta/patches/20-linux414.patch deleted file mode 100644 index f785a99edb025..0000000000000 --- a/network/broadcom-sta/patches/20-linux414.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: Gerardo Esteban Malazdrewicz <gerardo@malazdrewicz.com.ar> -Date: Fri, 29 Dec 2017 23:44:24 -0400 -Subject: linux414 -Origin: https://bugs.debian.org/885885 - -linux 4.14 changed the kernel_read function prototype. - ---- - amd64/src/shared/linux_osl.c | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/amd64/src/shared/linux_osl.c b/amd64/src/shared/linux_osl.c -index 9adc392..3aa48bf 100644 ---- a/amd64/src/shared/linux_osl.c -+++ b/amd64/src/shared/linux_osl.c -@@ -1076,11 +1076,21 @@ osl_os_get_image_block(char *buf, int len, void *image) - { - struct file *fp = (struct file *)image; - int rdlen; -+ loff_t pos; - - if (!image) - return 0; - -- rdlen = kernel_read(fp, fp->f_pos, buf, len); -+ pos = fp->f_pos; -+ rdlen = kernel_read(fp, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) -+ pos, -+#endif -+ buf, len -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) -+ ,&pos -+#endif -+ ); - if (rdlen > 0) - fp->f_pos += rdlen; - diff --git a/network/broadcom-sta/patches/21-linux415.patch b/network/broadcom-sta/patches/21-linux415.patch deleted file mode 100644 index 2cd8c2532e481..0000000000000 --- a/network/broadcom-sta/patches/21-linux415.patch +++ /dev/null @@ -1,67 +0,0 @@ -From: Gerardo Esteban Malazdrewicz <gerardo@malazdrewicz.com.ar> -Date: Sat, 30 Dec 2017 12:32:29 -0400 -Subject: linux415 -Origin: https://bugs.debian.org/885885 - -linux 4.15 deprecated the init_timer function. - ---- - amd64/src/wl/sys/wl_linux.c | 28 ++++++++++++++++++++++++---- - 1 file changed, 24 insertions(+), 4 deletions(-) - -diff --git a/amd64/src/wl/sys/wl_linux.c b/amd64/src/wl/sys/wl_linux.c -index 77dc327..ab7b883 100644 ---- a/amd64/src/wl/sys/wl_linux.c -+++ b/amd64/src/wl/sys/wl_linux.c -@@ -93,7 +93,13 @@ struct iw_statistics *wl_get_wireless_stats(struct net_device *dev); - - #include <wlc_wowl.h> - --static void wl_timer(ulong data); -+static void wl_timer( -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) -+ struct timer_list *tl -+#else -+ ulong data -+#endif -+ ); - static void _wl_timer(wl_timer_t *t); - static struct net_device *wl_alloc_linux_if(wl_if_t *wlif); - -@@ -2295,9 +2301,19 @@ wl_timer_task(wl_task_t *task) - } - - static void --wl_timer(ulong data) --{ -- wl_timer_t *t = (wl_timer_t *)data; -+wl_timer( -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) -+ struct timer_list *tl -+#else -+ ulong data -+#endif -+) { -+ wl_timer_t *t = -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) -+ from_timer(t, tl, timer); -+#else -+ (wl_timer_t *)data; -+#endif - - if (!WL_ALL_PASSIVE_ENAB(t->wl)) - _wl_timer(t); -@@ -2349,9 +2365,13 @@ wl_init_timer(wl_info_t *wl, void (*fn)(void *arg), void *arg, const char *tname - - bzero(t, sizeof(wl_timer_t)); - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) -+ timer_setup(&t->timer, wl_timer, 0); -+#else - init_timer(&t->timer); - t->timer.data = (ulong) t; - t->timer.function = wl_timer; -+#endif - t->wl = wl; - t->fn = fn; - t->arg = arg; diff --git a/network/broadcom-sta/patches/22-linux56.patch b/network/broadcom-sta/patches/22-linux56.patch deleted file mode 100644 index 2a2bcad8371f9..0000000000000 --- a/network/broadcom-sta/patches/22-linux56.patch +++ /dev/null @@ -1,90 +0,0 @@ -From dd057e40a167f4febb1a7c77dd32b7d36056952c Mon Sep 17 00:00:00 2001 -From: Herman van Hazendonk <github.com@herrie.org> -Date: Tue, 31 Mar 2020 17:09:55 +0200 -Subject: [PATCH] Add fixes for 5.6 kernel - -Use ioremap instead of ioremap_nocache and proc_ops instead of file_operations on Linux kernel 5.6 and above. - -Signed-off-by: Herman van Hazendonk <github.com@herrie.org> ---- - amd64/src/shared/linux_osl.c | 6 +++++- - amd64/src/wl/sys/wl_linux.c | 21 ++++++++++++++++++++- - 2 files changed, 25 insertions(+), 2 deletions(-) - -diff --git a/amd64/src/shared/linux_osl.c b/amd64/src/shared/linux_osl.c -index 6157d18..dcfc075 100644 ---- a/amd64/src/shared/linux_osl.c -+++ b/amd64/src/shared/linux_osl.c -@@ -942,7 +942,11 @@ osl_getcycles(void) - void * - osl_reg_map(uint32 pa, uint size) - { -- return (ioremap_nocache((unsigned long)pa, (unsigned long)size)); -+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) -+ return (ioremap((unsigned long)pa, (unsigned long)size)); -+ #else -+ return (ioremap_nocache((unsigned long)pa, (unsigned long)size)); -+ #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */ - } - - void -diff --git a/amd64/src/wl/sys/wl_linux.c b/amd64/src/wl/sys/wl_linux.c -index 0d05100..6d9dd0d 100644 ---- a/amd64/src/wl/sys/wl_linux.c -+++ b/amd64/src/wl/sys/wl_linux.c -@@ -582,10 +582,17 @@ wl_attach(uint16 vendor, uint16 device, ulong regs, - } - wl->bcm_bustype = bustype; - -+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) -+ if ((wl->regsva = ioremap(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) { -+ WL_ERROR(("wl%d: ioremap() failed\n", unit)); -+ goto fail; -+ } -+ #else - if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) { - WL_ERROR(("wl%d: ioremap() failed\n", unit)); - goto fail; - } -+ #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */ - - wl->bar1_addr = bar1_addr; - wl->bar1_size = bar1_size; -@@ -772,8 +779,13 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) - if ((val & 0x0000ff00) != 0) - pci_write_config_dword(pdev, 0x40, val & 0xffff00ff); - bar1_size = pci_resource_len(pdev, 2); -+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) -+ bar1_addr = (uchar *)ioremap(pci_resource_start(pdev, 2), -+ bar1_size); -+ #else - bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2), - bar1_size); -+ #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */ - wl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0), PCI_BUS, pdev, - pdev->irq, bar1_addr, bar1_size); - -@@ -3335,12 +3347,19 @@ wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t - } - - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) -+static const struct proc_ops wl_fops = { -+ .proc_read = wl_proc_read, -+ .proc_write = wl_proc_write, -+}; -+#else - static const struct file_operations wl_fops = { - .owner = THIS_MODULE, - .read = wl_proc_read, - .write = wl_proc_write, - }; --#endif -+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */ -+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) */ - - static int - wl_reg_proc_entry(wl_info_t *wl) --- -2.17.1.windows.1 - diff --git a/network/broadcom-sta/patches/23-get-rid-of-get_fs-set_fs-calls.patch b/network/broadcom-sta/patches/23-get-rid-of-get_fs-set_fs-calls.patch deleted file mode 100644 index b7ba8cdbf5ddd..0000000000000 --- a/network/broadcom-sta/patches/23-get-rid-of-get_fs-set_fs-calls.patch +++ /dev/null @@ -1,207 +0,0 @@ -From: Joan Bruguera <joanbrugueram@gmail.com> -Date: Sun, 13 Sep 2020 07:33:32 +0200 -Subject: Get rid of get_fs/set_fs calls in Broadcom WL driver. -Origin: https://gist.github.com/joanbm/5c640ac074d27fd1d82c74a5b67a1290 - -Fixes linux-next where get_fs/set_fs is already removed for some architectures. - -NB: Some checks in wlc_ioctl_internal are likely superfluous, - but I'm not familiar enough with the driver to remove them with confidence. - -See also: https://lwn.net/Articles/722267/ - https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/x86/include/asm/uaccess.h?h=next-20200911&id=47058bb54b57962b3958a936ddbc59355e4c5504 - https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/include/linux/uaccess.h?h=next-20200911&id=5e6e9852d6f76e01b2e6803c74258afa5b432bc5 - -Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com> ---- - amd64/src/wl/sys/wl_cfg80211_hybrid.c | 29 ++----------------------- - amd64/src/wl/sys/wl_iw.c | 25 ++-------------------- - amd64/src/wl/sys/wl_linux.c | 40 ++++++++++++++++++++++++++++++----- - amd64/src/wl/sys/wl_linux.h | 2 ++ - amd64/src/wl/sys/wlc_pub.h | 1 + - 5 files changed, 42 insertions(+), 55 deletions(-) - -diff --git a/amd64/src/wl/sys/wl_cfg80211_hybrid.c b/amd64/src/wl/sys/wl_cfg80211_hybrid.c -index 8e01841..111ec5a 100644 ---- a/amd64/src/wl/sys/wl_cfg80211_hybrid.c -+++ b/amd64/src/wl/sys/wl_cfg80211_hybrid.c -@@ -41,6 +41,7 @@ - #include <wlioctl.h> - #include <proto/802.11.h> - #include <wl_cfg80211_hybrid.h> -+#include <wl_linux.h> - - #define EVENT_TYPE(e) dtoh32((e)->event_type) - #define EVENT_FLAGS(e) dtoh16((e)->flags) -@@ -442,30 +443,8 @@ - static s32 - wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len) - { -- struct ifreq ifr; -- struct wl_ioctl ioc; -- mm_segment_t fs; -- s32 err = 0; -- - BUG_ON(len < sizeof(int)); -- -- memset(&ioc, 0, sizeof(ioc)); -- ioc.cmd = cmd; -- ioc.buf = arg; -- ioc.len = len; -- strcpy(ifr.ifr_name, dev->name); -- ifr.ifr_data = (caddr_t)&ioc; -- -- fs = get_fs(); -- set_fs(get_ds()); --#if defined(WL_USE_NETDEV_OPS) -- err = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE); --#else -- err = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE); --#endif -- set_fs(fs); -- -- return err; -+ return wlc_ioctl_internal(dev, cmd, arg, len); - } - - static s32 -diff --git a/amd64/src/wl/sys/wl_iw.c b/amd64/src/wl/sys/wl_iw.c -index c4c610b..e346b15 100644 ---- a/amd64/src/wl/sys/wl_iw.c -+++ b/amd64/src/wl/sys/wl_iw.c -@@ -37,6 +37,7 @@ typedef const struct si_pub si_t; - - #include <wl_dbg.h> - #include <wl_iw.h> -+#include <wl_linux.h> - - extern bool wl_iw_conn_status_str(uint32 event_type, uint32 status, - uint32 reason, char* stringBuf, uint buflen); -@@ -103,29 +104,7 @@ dev_wlc_ioctl( - int len - ) - { -- struct ifreq ifr; -- wl_ioctl_t ioc; -- mm_segment_t fs; -- int ret; -- -- memset(&ioc, 0, sizeof(ioc)); -- ioc.cmd = cmd; -- ioc.buf = arg; -- ioc.len = len; -- -- strcpy(ifr.ifr_name, dev->name); -- ifr.ifr_data = (caddr_t) &ioc; -- -- fs = get_fs(); -- set_fs(get_ds()); --#if defined(WL_USE_NETDEV_OPS) -- ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE); --#else -- ret = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE); --#endif -- set_fs(fs); -- -- return ret; -+ return wlc_ioctl_internal(dev, cmd, arg, len); - } - - static int -diff --git a/amd64/src/wl/sys/wl_linux.c b/amd64/src/wl/sys/wl_linux.c -index 66069d4..cc01d2b 100644 ---- a/amd64/src/wl/sys/wl_linux.c -+++ b/amd64/src/wl/sys/wl_linux.c -@@ -1661,10 +1661,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) - goto done2; - } - -- if (segment_eq(get_fs(), KERNEL_DS)) -- buf = ioc.buf; -- -- else if (ioc.buf) { -+ if (ioc.buf) { - if (!(buf = (void *) MALLOC(wl->osh, MAX(ioc.len, WLC_IOCTL_MAXLEN)))) { - bcmerror = BCME_NORESOURCE; - goto done2; -@@ -1681,7 +1678,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) - WL_UNLOCK(wl); - - done1: -- if (ioc.buf && (ioc.buf != buf)) { -+ if (ioc.buf) { - if (copy_to_user(ioc.buf, buf, ioc.len)) - bcmerror = BCME_BADADDR; - MFREE(wl->osh, buf, MAX(ioc.len, WLC_IOCTL_MAXLEN)); -@@ -1694,6 +1691,39 @@ done2: - return (OSL_ERROR(bcmerror)); - } - -+int -+wlc_ioctl_internal(struct net_device *dev, int cmd, void *buf, int len) -+{ -+ wl_info_t *wl; -+ wl_if_t *wlif; -+ int bcmerror; -+ -+ if (!dev) -+ return -ENETDOWN; -+ -+ wl = WL_INFO(dev); -+ wlif = WL_DEV_IF(dev); -+ if (wlif == NULL || wl == NULL || wl->dev == NULL) -+ return -ENETDOWN; -+ -+ bcmerror = 0; -+ -+ WL_TRACE(("wl%d: wlc_ioctl_internal: cmd 0x%x\n", wl->pub->unit, cmd)); -+ -+ WL_LOCK(wl); -+ if (!capable(CAP_NET_ADMIN)) { -+ bcmerror = BCME_EPERM; -+ } else { -+ bcmerror = wlc_ioctl(wl->wlc, cmd, buf, len, wlif->wlcif); -+ } -+ WL_UNLOCK(wl); -+ -+ ASSERT(VALID_BCMERROR(bcmerror)); -+ if (bcmerror != 0) -+ wl->pub->bcmerror = bcmerror; -+ return (OSL_ERROR(bcmerror)); -+} -+ - static struct net_device_stats* - wl_get_stats(struct net_device *dev) - { -diff --git a/amd64/src/wl/sys/wl_linux.h b/amd64/src/wl/sys/wl_linux.h -index 5b1048e..c8c1f41 100644 ---- a/amd64/src/wl/sys/wl_linux.h -+++ b/amd64/src/wl/sys/wl_linux.h -@@ -22,6 +22,7 @@ - #define _wl_linux_h_ - - #include <wlc_types.h> -+#include <wlc_pub.h> - - typedef struct wl_timer { - struct timer_list timer; -@@ -187,6 +188,7 @@ extern irqreturn_t wl_isr(int irq, void *dev_id, struct pt_regs *ptregs); - extern int __devinit wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent); - extern void wl_free(wl_info_t *wl); - extern int wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); -+extern int wlc_ioctl_internal(struct net_device *dev, int cmd, void *buf, int len); - extern struct net_device * wl_netdev_get(wl_info_t *wl); - - #endif -diff --git a/amd64/src/wl/sys/wlc_pub.h b/amd64/src/wl/sys/wlc_pub.h -index 53a98b8..2b5a029 100644 ---- a/amd64/src/wl/sys/wlc_pub.h -+++ b/amd64/src/wl/sys/wlc_pub.h -@@ -24,6 +24,7 @@ - - #include <wlc_types.h> - #include <wlc_utils.h> -+#include <siutils.h> - #include "proto/802.11.h" - #include "proto/bcmevent.h" - diff --git a/network/broadcom-sta/slack-desc b/network/broadcom-sta/slack-desc deleted file mode 100644 index 02000f4c1435a..0000000000000 --- a/network/broadcom-sta/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. -# Line up the first '|' above the ':' following the base package name, and -# the '|' on the right side marks the last column you can put a character in. -# You must make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':' except on otherwise blank lines. - - |-----handy-ruler------------------------------------------------------| -broadcom-sta: broadcom-sta (Broadcom wireless drivers) -broadcom-sta: -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: https://www.broadcom.com/support/802.11 -broadcom-sta: -broadcom-sta: |