Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

linuxPackages.broadcom_sta: use git format-patch to make all the patches trivially applicable

I did the research: the commit times and authors are as correct as an afternoon of internet spelunking can make them.

+297 -94
+24 -7
pkgs/os-specific/linux/broadcom-sta/gcc.patch
··· 1 - --- a/Makefile 2014-06-26 10:42:08.000000000 +0000 2 - +++ b/Makefile 2014-07-17 22:44:01.662297228 +0000 3 - @@ -126,6 +126,8 @@ 4 EXTRA_CFLAGS += -I$(src)/src/shared/bcmwifi/include 5 - #EXTRA_CFLAGS += -DBCMDBG_ASSERT -DBCMDBG_ERR 6 7 - +EXTRA_CFLAGS += -Wno-date-time 8 - + 9 EXTRA_LDFLAGS := $(src)/lib/wlc_hybrid.o_shipped 10 11 - KBASE ?= /lib/modules/`uname -r`
··· 1 + From 3e28c2a24c3b3b011506bcaa4fee7e8da347c5ff Mon Sep 17 00:00:00 2001 2 + From: Charles Strahan <charles.c.strahan@gmail.com> 3 + Date: Tue, 5 May 2015 15:09:51 -0400 4 + Subject: [PATCH 01/16] linuxPackages.broadcom_sta: since GCC respects 5 + SOURCE_DATE_EPOCH, set in the stdenv, set -Wno-date-time 6 + 7 + --- 8 + Makefile | 3 --- 9 + 1 file changed, 3 deletions(-) 10 + 11 + diff --git a/Makefile b/Makefile 12 + index a323a0d..15e85c8 100644 13 + --- a/Makefile 14 + +++ b/Makefile 15 + @@ -140,10 +140,7 @@ wl-objs += src/wl/sys/wl_cfg80211_hybrid.o 16 + EXTRA_CFLAGS += -I$(src)/src/include -I$(src)/src/common/include 17 + EXTRA_CFLAGS += -I$(src)/src/wl/sys -I$(src)/src/wl/phy -I$(src)/src/wl/ppr/include 18 EXTRA_CFLAGS += -I$(src)/src/shared/bcmwifi/include 19 + -#EXTRA_CFLAGS += -DBCMDBG_ASSERT -DBCMDBG_ERR 20 + -ifeq "$(GE_49)" "1" 21 + EXTRA_CFLAGS += -Wno-date-time 22 + -endif 23 24 EXTRA_LDFLAGS := $(src)/lib/wlc_hybrid.o_shipped 25 26 + -- 27 + 2.45.1 28 +
+17 -4
pkgs/os-specific/linux/broadcom-sta/license.patch
··· 1 - diff -Naur hybrid-portsrc-x86_32-v5_10_91_9.orig/src/wl/sys/wl_linux.c hybrid-portsrc-x86_32-v5_10_91_9/src/wl/sys/wl_linux.c 2 - --- hybrid-portsrc-x86_32-v5_10_91_9.orig/src/wl/sys/wl_linux.c 2009-04-23 02:48:59.000000000 +0900 3 - +++ hybrid-portsrc-x86_32-v5_10_91_9/src/wl/sys/wl_linux.c 2009-05-08 00:48:20.000000000 +0900 4 - @@ -171,6 +171,8 @@ 5 static void wl_free_if(wl_info_t *wl, wl_if_t *wlif); 6 static void wl_get_driver_info(struct net_device *dev, struct ethtool_drvinfo *info); 7 ··· 10 #if defined(WL_CONFIG_RFKILL) 11 #include <linux/rfkill.h> 12 static int wl_init_rfkill(wl_info_t *wl); 13
··· 1 + From 5a964e14474e4482a4d24c015371856560dacabc Mon Sep 17 00:00:00 2001 2 + From: Shea Levy <shea@shealevy.com> 3 + Date: Sat, 4 Jan 2014 20:57:21 -0500 4 + Subject: [PATCH 02/16] linuxPackages.broadcom_sta: apply MIXED/Proprietary 5 + license 6 + 7 + --- 8 + src/wl/sys/wl_linux.c | 2 ++ 9 + 1 file changed, 2 insertions(+) 10 + 11 + diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c 12 + index 0d05100..14922c0 100644 13 + --- a/src/wl/sys/wl_linux.c 14 + +++ b/src/wl/sys/wl_linux.c 15 + @@ -148,6 +148,8 @@ static struct wl_if *wl_alloc_if(wl_info_t *wl, int iftype, uint unit, struct wl 16 static void wl_free_if(wl_info_t *wl, wl_if_t *wlif); 17 static void wl_get_driver_info(struct net_device *dev, struct ethtool_drvinfo *info); 18 ··· 21 #if defined(WL_CONFIG_RFKILL) 22 #include <linux/rfkill.h> 23 static int wl_init_rfkill(wl_info_t *wl); 24 + -- 25 + 2.45.1 26
+17 -4
pkgs/os-specific/linux/broadcom-sta/linux-4.11.patch
··· 1 diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c 2 - index a9671e2..da36405 100644 3 --- a/src/wl/sys/wl_cfg80211_hybrid.c 4 +++ b/src/wl/sys/wl_cfg80211_hybrid.c 5 @@ -30,6 +30,9 @@ ··· 13 #include <linux/nl80211.h> 14 #include <net/rtnetlink.h> 15 diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c 16 - index 489c9f5..f8278ad 100644 17 --- a/src/wl/sys/wl_linux.c 18 +++ b/src/wl/sys/wl_linux.c 19 @@ -117,6 +117,9 @@ int wl_found = 0; ··· 26 } priv_link_t; 27 28 #define WL_DEV_IF(dev) ((wl_if_t*)((priv_link_t*)DEV_PRIV(dev))->wlif) 29 - @@ -2450,6 +2453,9 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p) 30 { 31 struct sk_buff *oskb = (struct sk_buff *)p; 32 struct sk_buff *skb; ··· 36 uchar *pdata; 37 uint len; 38 39 - @@ -2916,7 +2922,13 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p) 40 if (skb == NULL) return; 41 42 skb->dev = wl->monitor_dev; ··· 50 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) 51 skb_reset_mac_header(skb); 52 #else
··· 1 + From 5a0301c2d9c65dbb3c5b8990e635d37f071d26c4 Mon Sep 17 00:00:00 2001 2 + From: georgewhewell <georgerw@gmail.com> 3 + Date: Fri, 2 Jun 2017 14:19:04 +0100 4 + Subject: [PATCH 06/16] linuxPackages.broadcom_sta: fix build for kernel 4.11+ 5 + 6 + --- 7 + src/wl/sys/wl_cfg80211_hybrid.c | 3 +++ 8 + src/wl/sys/wl_linux.c | 12 ++++++++++++ 9 + 2 files changed, 15 insertions(+) 10 + 11 diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c 12 + index 84f0068..9fd8ed1 100644 13 --- a/src/wl/sys/wl_cfg80211_hybrid.c 14 +++ b/src/wl/sys/wl_cfg80211_hybrid.c 15 @@ -30,6 +30,9 @@ ··· 23 #include <linux/nl80211.h> 24 #include <net/rtnetlink.h> 25 diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c 26 + index 65d7a22..18841d9 100644 27 --- a/src/wl/sys/wl_linux.c 28 +++ b/src/wl/sys/wl_linux.c 29 @@ -117,6 +117,9 @@ int wl_found = 0; ··· 36 } priv_link_t; 37 38 #define WL_DEV_IF(dev) ((wl_if_t*)((priv_link_t*)DEV_PRIV(dev))->wlif) 39 + @@ -2451,6 +2454,9 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p) 40 { 41 struct sk_buff *oskb = (struct sk_buff *)p; 42 struct sk_buff *skb; ··· 46 uchar *pdata; 47 uint len; 48 49 + @@ -2917,7 +2923,13 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p) 50 if (skb == NULL) return; 51 52 skb->dev = wl->monitor_dev; ··· 60 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) 61 skb_reset_mac_header(skb); 62 #else 63 + -- 64 + 2.45.1 65 +
+25 -1
pkgs/os-specific/linux/broadcom-sta/linux-4.12.patch
··· 1 diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c 2 - index da36405..d3741eb 100644 3 --- a/src/wl/sys/wl_cfg80211_hybrid.c 4 +++ b/src/wl/sys/wl_cfg80211_hybrid.c 5 @@ -53,7 +53,11 @@ u32 wl_dbg_level = WL_DBG_ERR; ··· 66 WL_DBG(("Report roaming result\n")); 67 68 set_bit(WL_STATUS_CONNECTED, &wl->status);
··· 1 + From 2e9c7bd146fbc3b4a62940140eafb47df16b6cb4 Mon Sep 17 00:00:00 2001 2 + From: aszlig <aszlig@redmoonstudios.org> 3 + Date: Tue, 18 Jul 2017 21:32:13 +0200 4 + Subject: [PATCH 07/16] linuxPackages.broadcom_sta: fix build for kernel 4.12+ 5 + 6 + The patch is from Arch Linux at: 7 + 8 + https://aur.archlinux.org/cgit/aur.git/tree/linux412.patch?h=broadcom-wl 9 + 10 + Tested this by building against the following attributes: 11 + 12 + * linuxPackages.broadcom_sta 13 + * linuxPackages_latest.broadcom_sta 14 + * pkgsI686Linux.linuxPackages.broadcom_sta 15 + * pkgsI686Linux.linuxPackages_latest.broadcom_sta 16 + 17 + I have not tested whether this works at runtime, because I do not possess the hardware. 18 + --- 19 + src/wl/sys/wl_cfg80211_hybrid.c | 29 ++++++++++++++++++++++++++++- 20 + 1 file changed, 28 insertions(+), 1 deletion(-) 21 + 22 diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c 23 + index 9fd8ed1..1893a53 100644 24 --- a/src/wl/sys/wl_cfg80211_hybrid.c 25 +++ b/src/wl/sys/wl_cfg80211_hybrid.c 26 @@ -53,7 +53,11 @@ u32 wl_dbg_level = WL_DBG_ERR; ··· 87 WL_DBG(("Report roaming result\n")); 88 89 set_bit(WL_STATUS_CONNECTED, &wl->status); 90 + -- 91 + 2.45.1 92 +
+25 -13
pkgs/os-specific/linux/broadcom-sta/linux-4.15.patch
··· 1 See: https://lkml.org/lkml/2017/11/25/90 2 3 - diff -urNZ a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c 4 - --- a/src/wl/sys/wl_linux.c 2015-09-18 22:47:30.000000000 +0000 5 - +++ b/src/wl/sys/wl_linux.c 2018-01-31 22:52:10.859856221 +0000 6 - @@ -93,7 +93,11 @@ 7 - 8 #include <wlc_wowl.h> 9 - 10 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) 11 +static void wl_timer(struct timer_list *tl); 12 +#else ··· 14 +#endif 15 static void _wl_timer(wl_timer_t *t); 16 static struct net_device *wl_alloc_linux_if(wl_if_t *wlif); 17 - 18 - @@ -2298,9 +2302,15 @@ 19 } 20 - 21 static void 22 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) 23 +wl_timer(struct timer_list *tl) ··· 28 { 29 wl_timer_t *t = (wl_timer_t *)data; 30 +#endif 31 - 32 if (!WL_ALL_PASSIVE_ENAB(t->wl)) 33 _wl_timer(t); 34 - @@ -2352,9 +2362,13 @@ 35 - 36 bzero(t, sizeof(wl_timer_t)); 37 - 38 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) 39 + timer_setup(&t->timer, wl_timer, 0); 40 +#else ··· 45 t->wl = wl; 46 t->fn = fn; 47 t->arg = arg;
··· 1 + From ae88c3c0c91d26ca5e4dc1e498a370747d2c3b03 Mon Sep 17 00:00:00 2001 2 + From: Yegor Timoshenko <yegortimoshenko@riseup.net> 3 + Date: Wed, 31 Jan 2018 22:59:09 +0000 4 + Subject: [PATCH 08/16] linuxPackages.broadcom_sta: fix build for kernel 4.15+ 5 + 6 See: https://lkml.org/lkml/2017/11/25/90 7 + --- 8 + src/wl/sys/wl_linux.c | 14 ++++++++++++++ 9 + 1 file changed, 14 insertions(+) 10 11 + diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c 12 + index 18841d9..83b8859 100644 13 + --- a/src/wl/sys/wl_linux.c 14 + +++ b/src/wl/sys/wl_linux.c 15 + @@ -93,7 +93,11 @@ struct iw_statistics *wl_get_wireless_stats(struct net_device *dev); 16 + 17 #include <wlc_wowl.h> 18 + 19 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) 20 +static void wl_timer(struct timer_list *tl); 21 +#else ··· 23 +#endif 24 static void _wl_timer(wl_timer_t *t); 25 static struct net_device *wl_alloc_linux_if(wl_if_t *wlif); 26 + 27 + @@ -2303,9 +2307,15 @@ wl_timer_task(wl_task_t *task) 28 } 29 + 30 static void 31 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) 32 +wl_timer(struct timer_list *tl) ··· 37 { 38 wl_timer_t *t = (wl_timer_t *)data; 39 +#endif 40 + 41 if (!WL_ALL_PASSIVE_ENAB(t->wl)) 42 _wl_timer(t); 43 + @@ -2357,9 +2367,13 @@ wl_init_timer(wl_info_t *wl, void (*fn)(void *arg), void *arg, const char *tname 44 + 45 bzero(t, sizeof(wl_timer_t)); 46 + 47 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) 48 + timer_setup(&t->timer, wl_timer, 0); 49 +#else ··· 54 t->wl = wl; 55 t->fn = fn; 56 t->arg = arg; 57 + -- 58 + 2.45.1 59 +
+37 -15
pkgs/os-specific/linux/broadcom-sta/linux-4.7.patch
··· 1 Since Linux 4.7, the enum ieee80211_band is no longer used 2 3 This shall cause no problem's since both enums ieee80211_band 4 and nl80211_band were added in the same commit: 5 - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=13ae75b103e07304a34ab40c9136e9f53e06475c 6 7 This patch refactors the references of IEEE80211_BAND_* to NL80211_BAND_* 8 9 Reference: 10 - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=57fbcce37be7c1d2622b56587c10ade00e96afa3 11 12 - --- a/src/wl/sys/wl_cfg80211_hybrid.c 2016-06-13 11:57:36.159340297 -0500 13 - +++ b/src/wl/sys/wl_cfg80211_hybrid.c 2016-06-13 11:58:18.442323435 -0500 14 - @@ -236,7 +236,7 @@ 15 #endif 16 17 #define CHAN2G(_channel, _freq, _flags) { \ ··· 20 .center_freq = (_freq), \ 21 .hw_value = (_channel), \ 22 .flags = (_flags), \ 23 - @@ -245,7 +245,7 @@ 24 } 25 26 #define CHAN5G(_channel, _flags) { \ ··· 29 .center_freq = 5000 + (5 * (_channel)), \ 30 .hw_value = (_channel), \ 31 .flags = (_flags), \ 32 - @@ -379,7 +379,7 @@ 33 }; 34 35 static struct ieee80211_supported_band __wl_band_2ghz = { ··· 38 .channels = __wl_2ghz_channels, 39 .n_channels = ARRAY_SIZE(__wl_2ghz_channels), 40 .bitrates = wl_g_rates, 41 - @@ -387,7 +387,7 @@ 42 }; 43 44 static struct ieee80211_supported_band __wl_band_5ghz_a = { ··· 47 .channels = __wl_5ghz_a_channels, 48 .n_channels = ARRAY_SIZE(__wl_5ghz_a_channels), 49 .bitrates = wl_a_rates, 50 - @@ -395,7 +395,7 @@ 51 }; 52 53 static struct ieee80211_supported_band __wl_band_5ghz_n = { ··· 56 .channels = __wl_5ghz_n_channels, 57 .n_channels = ARRAY_SIZE(__wl_5ghz_n_channels), 58 .bitrates = wl_a_rates, 59 - @@ -1876,8 +1876,8 @@ 60 wdev->wiphy->max_num_pmkids = WL_NUM_PMKIDS_MAX; 61 #endif 62 wdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC); 63 - wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &__wl_band_2ghz; 64 - wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_a; 65 + wdev->wiphy->bands[NL80211_BAND_2GHZ] = &__wl_band_2ghz; 66 - + wdev->wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_a; 67 wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; 68 wdev->wiphy->cipher_suites = __wl_cipher_suites; 69 wdev->wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites); 70 - @@ -2000,7 +2000,7 @@ 71 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39) 72 freq = ieee80211_channel_to_frequency(notif_bss_info->channel, 73 (notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ? ··· 76 #else 77 freq = ieee80211_channel_to_frequency(notif_bss_info->channel); 78 #endif 79 - @@ -2116,7 +2116,7 @@ 80 return err; 81 } 82 chan = wf_chspec_ctlchan(chanspec); ··· 85 freq = ieee80211_channel_to_frequency(chan, band); 86 channel = ieee80211_get_channel(wiphy, freq); 87 cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL); 88 - @@ -2250,10 +2250,10 @@ 89 join_params->params.chanspec_list[0] = 90 ieee80211_frequency_to_channel(chan->center_freq); 91 ··· 98 chanspec |= WL_CHANSPEC_BAND_5G; 99 } 100 else { 101 - @@ -2885,7 +2885,7 @@ 102 103 if (phy == 'n' || phy == 'a' || phy == 'v') { 104 wiphy = wl_to_wiphy(wl); ··· 107 } 108 109 return err;
··· 1 + From bc408ef546b08443dabbe8fcdfec5e1e48494ed8 Mon Sep 17 00:00:00 2001 2 + From: aszlig <aszlig@redmoonstudios.org> 3 + Date: Mon, 1 Aug 2016 20:45:47 +0200 4 + Subject: [PATCH 04/16] linuxPackages.broadcom_sta: fix build for kernel 4.7+ 5 + 6 + Patch is from Arch Linux at: 7 + 8 + https://aur.archlinux.org/cgit/aur.git/tree/?h=broadcom-wl 9 + 10 + I've tested building against 3.18.36, 4.4.16 and 4.7.0. 11 + 12 + Signed-off-by: aszlig <aszlig@redmoonstudios.org> 13 + Cc: @phreedom, @vcunat 14 + 15 Since Linux 4.7, the enum ieee80211_band is no longer used 16 17 This shall cause no problem's since both enums ieee80211_band 18 and nl80211_band were added in the same commit: 19 + https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=13ae75b103e07304a34ab40c9136e9f53e06475c 20 21 This patch refactors the references of IEEE80211_BAND_* to NL80211_BAND_* 22 23 Reference: 24 + https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=57fbcce37be7c1d2622b56587c10ade00e96afa3 25 + --- 26 + src/wl/sys/wl_cfg80211_hybrid.c | 24 ++++++++++++------------ 27 + 1 file changed, 12 insertions(+), 12 deletions(-) 28 29 + diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c 30 + index 7b606e0..3b438ba 100644 31 + --- a/src/wl/sys/wl_cfg80211_hybrid.c 32 + +++ b/src/wl/sys/wl_cfg80211_hybrid.c 33 + @@ -236,7 +236,7 @@ static s8 wl_dbg_estr[][WL_DBG_ESTR_MAX] = { 34 #endif 35 36 #define CHAN2G(_channel, _freq, _flags) { \ ··· 39 .center_freq = (_freq), \ 40 .hw_value = (_channel), \ 41 .flags = (_flags), \ 42 + @@ -245,7 +245,7 @@ static s8 wl_dbg_estr[][WL_DBG_ESTR_MAX] = { 43 } 44 45 #define CHAN5G(_channel, _flags) { \ ··· 48 .center_freq = 5000 + (5 * (_channel)), \ 49 .hw_value = (_channel), \ 50 .flags = (_flags), \ 51 + @@ -379,7 +379,7 @@ static struct ieee80211_channel __wl_5ghz_n_channels[] = { 52 }; 53 54 static struct ieee80211_supported_band __wl_band_2ghz = { ··· 57 .channels = __wl_2ghz_channels, 58 .n_channels = ARRAY_SIZE(__wl_2ghz_channels), 59 .bitrates = wl_g_rates, 60 + @@ -387,7 +387,7 @@ static struct ieee80211_supported_band __wl_band_2ghz = { 61 }; 62 63 static struct ieee80211_supported_band __wl_band_5ghz_a = { ··· 66 .channels = __wl_5ghz_a_channels, 67 .n_channels = ARRAY_SIZE(__wl_5ghz_a_channels), 68 .bitrates = wl_a_rates, 69 + @@ -395,7 +395,7 @@ static struct ieee80211_supported_band __wl_band_5ghz_a = { 70 }; 71 72 static struct ieee80211_supported_band __wl_band_5ghz_n = { ··· 75 .channels = __wl_5ghz_n_channels, 76 .n_channels = ARRAY_SIZE(__wl_5ghz_n_channels), 77 .bitrates = wl_a_rates, 78 + @@ -1876,8 +1876,8 @@ static s32 wl_alloc_wdev(struct device *dev, struct wireless_dev **rwdev) 79 wdev->wiphy->max_num_pmkids = WL_NUM_PMKIDS_MAX; 80 #endif 81 wdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC); 82 - wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &__wl_band_2ghz; 83 - wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_a; 84 + wdev->wiphy->bands[NL80211_BAND_2GHZ] = &__wl_band_2ghz; 85 + + wdev->wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_a; 86 wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; 87 wdev->wiphy->cipher_suites = __wl_cipher_suites; 88 wdev->wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites); 89 + @@ -2000,7 +2000,7 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info 90 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39) 91 freq = ieee80211_channel_to_frequency(notif_bss_info->channel, 92 (notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ? ··· 95 #else 96 freq = ieee80211_channel_to_frequency(notif_bss_info->channel); 97 #endif 98 + @@ -2116,7 +2116,7 @@ wl_notify_connect_status(struct wl_cfg80211_priv *wl, struct net_device *ndev, 99 return err; 100 } 101 chan = wf_chspec_ctlchan(chanspec); ··· 104 freq = ieee80211_channel_to_frequency(chan, band); 105 channel = ieee80211_get_channel(wiphy, freq); 106 cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL); 107 + @@ -2250,10 +2250,10 @@ static void wl_ch_to_chanspec(struct ieee80211_channel *chan, struct wl_join_par 108 join_params->params.chanspec_list[0] = 109 ieee80211_frequency_to_channel(chan->center_freq); 110 ··· 117 chanspec |= WL_CHANSPEC_BAND_5G; 118 } 119 else { 120 + @@ -2885,7 +2885,7 @@ static s32 wl_update_wiphybands(struct wl_cfg80211_priv *wl) 121 122 if (phy == 'n' || phy == 'a' || phy == 'v') { 123 wiphy = wl_to_wiphy(wl); ··· 126 } 127 128 return err; 129 + -- 130 + 2.45.1 131 +
+10 -8
pkgs/os-specific/linux/broadcom-sta/linux-4.8.patch
··· 1 - From d3f93542326a06d920c6eb89b703384290d37b8b Mon Sep 17 00:00:00 2001 2 From: Alberto Milone <alberto.milone@canonical.com> 3 Date: Fri, 2 Sep 2016 17:35:34 +0200 4 - Subject: [PATCH 1/1] Add support for Linux 4.8 5 6 - Orginal author: Krzysztof Kolasa 7 --- 8 src/wl/sys/wl_cfg80211_hybrid.c | 22 ++++++++++++++++++++++ 9 1 file changed, 22 insertions(+) 10 11 diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c 12 - index 2fc71fe..ec5e472 100644 13 --- a/src/wl/sys/wl_cfg80211_hybrid.c 14 +++ b/src/wl/sys/wl_cfg80211_hybrid.c 15 - @@ -2388,8 +2388,16 @@ wl_bss_connect_done(struct wl_cfg80211_priv *wl, struct net_device *ndev, 16 s32 err = 0; 17 18 if (wl->scan_request) { ··· 29 wl->scan_request = NULL; 30 } 31 32 - @@ -2490,7 +2498,14 @@ wl_notify_scan_status(struct wl_cfg80211_priv *wl, struct net_device *ndev, 33 34 scan_done_out: 35 if (wl->scan_request) { ··· 44 wl->scan_request = NULL; 45 } 46 rtnl_unlock(); 47 - @@ -2909,7 +2924,14 @@ s32 wl_cfg80211_down(struct net_device *ndev) 48 s32 err = 0; 49 50 if (wl->scan_request) { ··· 60 } 61 62 -- 63 - 2.7.4 64
··· 1 + From 8c536235639010135f8dc11a8ec0968f9b200a6e Mon Sep 17 00:00:00 2001 2 From: Alberto Milone <alberto.milone@canonical.com> 3 Date: Fri, 2 Sep 2016 17:35:34 +0200 4 + Subject: [PATCH 05/16] linuxPackages.broadcom_sta: fix build for kernel 4.8+ 5 + 6 + Original author: Krzysztof Kolasa 7 8 + Source: https://git.archlinux.org/svntogit/community.git/tree/trunk/004-linux48.patch?h=packages/broadcom-wl-dkms 9 --- 10 src/wl/sys/wl_cfg80211_hybrid.c | 22 ++++++++++++++++++++++ 11 1 file changed, 22 insertions(+) 12 13 diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c 14 + index 3b438ba..84f0068 100644 15 --- a/src/wl/sys/wl_cfg80211_hybrid.c 16 +++ b/src/wl/sys/wl_cfg80211_hybrid.c 17 + @@ -2386,8 +2386,16 @@ wl_bss_connect_done(struct wl_cfg80211_priv *wl, struct net_device *ndev, 18 s32 err = 0; 19 20 if (wl->scan_request) { ··· 31 wl->scan_request = NULL; 32 } 33 34 + @@ -2488,7 +2496,14 @@ wl_notify_scan_status(struct wl_cfg80211_priv *wl, struct net_device *ndev, 35 36 scan_done_out: 37 if (wl->scan_request) { ··· 46 wl->scan_request = NULL; 47 } 48 rtnl_unlock(); 49 + @@ -2913,7 +2928,14 @@ s32 wl_cfg80211_down(struct net_device *ndev) 50 s32 err = 0; 51 52 if (wl->scan_request) { ··· 62 } 63 64 -- 65 + 2.45.1 66
+13 -6
pkgs/os-specific/linux/broadcom-sta/linux-5.1.patch
··· 1 - commit bcb06af629a36eb84f9a35ac599ec7e51e2d39fb 2 - Author: georgewhewell <georgerw@gmail.com> 3 - Date: Sat May 18 21:22:37 2019 +0100 4 5 - find src -type f -name \'*.c\' -exec sed -i "s/get_ds()/KERNEL_DS/g" {} \; 6 7 diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c 8 - index 7b606e0..51c81bc 100644 9 --- a/src/wl/sys/wl_cfg80211_hybrid.c 10 +++ b/src/wl/sys/wl_cfg80211_hybrid.c 11 - @@ -450,7 +450,7 @@ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len) 12 ifr.ifr_data = (caddr_t)&ioc; 13 14 fs = get_fs(); ··· 30 #if defined(WL_USE_NETDEV_OPS) 31 ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE); 32 #else
··· 1 + From 35c712b7ad2b20088a1a4e233f1d22d7f6dc2525 Mon Sep 17 00:00:00 2001 2 + From: georgewhewell <georgerw@gmail.com> 3 + Date: Sat, 18 May 2019 21:36:26 +0100 4 + Subject: [PATCH 09/16] linuxPackages.broadcom_sta: fix build for kernel 5.1+ 5 6 + --- 7 + src/wl/sys/wl_cfg80211_hybrid.c | 2 +- 8 + src/wl/sys/wl_iw.c | 2 +- 9 + 2 files changed, 2 insertions(+), 2 deletions(-) 10 11 diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c 12 + index 1893a53..4b3298f 100644 13 --- a/src/wl/sys/wl_cfg80211_hybrid.c 14 +++ b/src/wl/sys/wl_cfg80211_hybrid.c 15 + @@ -457,7 +457,7 @@ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len) 16 ifr.ifr_data = (caddr_t)&ioc; 17 18 fs = get_fs(); ··· 34 #if defined(WL_USE_NETDEV_OPS) 35 ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE); 36 #else 37 + -- 38 + 2.45.1 39 +
+22 -9
pkgs/os-specific/linux/broadcom-sta/linux-5.18.patch
··· 1 - diff -u -r a/src/shared/linux_osl.c b/src/shared/linux_osl.c 2 - --- a/src/shared/linux_osl.c 2022-05-24 20:51:15.662604980 +0000 3 - +++ b/src/shared/linux_osl.c 2022-05-24 21:13:38.264472425 +0000 4 - @@ -599,6 +599,8 @@ 5 va = kmalloc(size, GFP_ATOMIC | __GFP_ZERO); 6 if (va) 7 *pap = (ulong)__virt_to_phys(va); ··· 10 #else 11 va = pci_alloc_consistent(osh->pdev, size, (dma_addr_t*)pap); 12 #endif 13 - @@ -612,6 +614,8 @@ 14 15 #ifdef __ARM_ARCH_7A__ 16 kfree(va); ··· 19 #else 20 pci_free_consistent(osh->pdev, size, va, (dma_addr_t)pa); 21 #endif 22 - @@ -623,7 +627,11 @@ 23 int dir; 24 25 ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); ··· 31 32 #if defined(__ARM_ARCH_7A__) && defined(BCMDMASGLISTOSL) 33 if (dmah != NULL) { 34 - @@ -641,7 +649,11 @@ 35 ASSERT(totsegs + nsegs <= MAX_DMA_SEGS); 36 sg->page_link = 0; 37 sg_set_buf(sg, PKTDATA(osh, skb), PKTLEN(osh, skb)); ··· 43 } 44 totsegs += nsegs; 45 totlen += PKTLEN(osh, skb); 46 - @@ -656,7 +668,11 @@ 47 } 48 #endif 49 ··· 55 } 56 57 void BCMFASTPATH 58 - @@ -665,8 +681,13 @@ 59 int dir; 60 61 ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); ··· 69 } 70 71 #if defined(BCMDBG_ASSERT)
··· 1 + From 6c66b0eaaa3e6ebaa84891298715b71f7b2f0b1c Mon Sep 17 00:00:00 2001 2 + From: X9VoiD <oscar.silvestrexx@gmail.com> 3 + Date: Mon, 13 Jun 2022 17:38:18 +0800 4 + Subject: [PATCH 13/16] linuxPackages.broadcom_sta: fix build for kernel 5.18+ 5 + 6 + --- 7 + src/shared/linux_osl.c | 21 +++++++++++++++++++++ 8 + 1 file changed, 21 insertions(+) 9 + 10 + diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c 11 + index dcfc075..5a25b82 100644 12 + --- a/src/shared/linux_osl.c 13 + +++ b/src/shared/linux_osl.c 14 + @@ -599,6 +599,8 @@ osl_dma_alloc_consistent(osl_t *osh, uint size, uint16 align_bits, uint *alloced 15 va = kmalloc(size, GFP_ATOMIC | __GFP_ZERO); 16 if (va) 17 *pap = (ulong)__virt_to_phys(va); ··· 20 #else 21 va = pci_alloc_consistent(osh->pdev, size, (dma_addr_t*)pap); 22 #endif 23 + @@ -612,6 +614,8 @@ osl_dma_free_consistent(osl_t *osh, void *va, uint size, ulong pa) 24 25 #ifdef __ARM_ARCH_7A__ 26 kfree(va); ··· 29 #else 30 pci_free_consistent(osh->pdev, size, va, (dma_addr_t)pa); 31 #endif 32 + @@ -623,7 +627,11 @@ osl_dma_map(osl_t *osh, void *va, uint size, int direction, void *p, hnddma_seg_ 33 int dir; 34 35 ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); ··· 41 42 #if defined(__ARM_ARCH_7A__) && defined(BCMDMASGLISTOSL) 43 if (dmah != NULL) { 44 + @@ -641,7 +649,11 @@ osl_dma_map(osl_t *osh, void *va, uint size, int direction, void *p, hnddma_seg_ 45 ASSERT(totsegs + nsegs <= MAX_DMA_SEGS); 46 sg->page_link = 0; 47 sg_set_buf(sg, PKTDATA(osh, skb), PKTLEN(osh, skb)); ··· 53 } 54 totsegs += nsegs; 55 totlen += PKTLEN(osh, skb); 56 + @@ -656,7 +668,11 @@ osl_dma_map(osl_t *osh, void *va, uint size, int direction, void *p, hnddma_seg_ 57 } 58 #endif 59 ··· 65 } 66 67 void BCMFASTPATH 68 + @@ -665,8 +681,13 @@ osl_dma_unmap(osl_t *osh, uint pa, uint size, int direction) 69 int dir; 70 71 ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); ··· 79 } 80 81 #if defined(BCMDBG_ASSERT) 82 + -- 83 + 2.45.1 84 +
+12 -7
pkgs/os-specific/linux/broadcom-sta/linux-5.6.patch
··· 1 - From dd057e40a167f4febb1a7c77dd32b7d36056952c Mon Sep 17 00:00:00 2001 2 From: Herman van Hazendonk <github.com@herrie.org> 3 Date: Tue, 31 Mar 2020 17:09:55 +0200 4 - Subject: [PATCH] Add fixes for 5.6 kernel 5 6 Use ioremap instead of ioremap_nocache and proc_ops instead of file_operations on Linux kernel 5.6 and above. 7 8 Signed-off-by: Herman van Hazendonk <github.com@herrie.org> 9 --- 10 src/shared/linux_osl.c | 6 +++++- 11 src/wl/sys/wl_linux.c | 21 ++++++++++++++++++++- ··· 29 30 void 31 diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c 32 - index 0d05100..6d9dd0d 100644 33 --- a/src/wl/sys/wl_linux.c 34 +++ b/src/wl/sys/wl_linux.c 35 - @@ -582,10 +582,17 @@ wl_attach(uint16 vendor, uint16 device, ulong regs, 36 } 37 wl->bcm_bustype = bustype; 38 ··· 41 + WL_ERROR(("wl%d: ioremap() failed\n", unit)); 42 + goto fail; 43 + } 44 - + #else 45 if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) { 46 WL_ERROR(("wl%d: ioremap() failed\n", unit)); 47 goto fail; ··· 50 51 wl->bar1_addr = bar1_addr; 52 wl->bar1_size = bar1_size; 53 - @@ -772,8 +779,13 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 54 if ((val & 0x0000ff00) != 0) 55 pci_write_config_dword(pdev, 0x40, val & 0xffff00ff); 56 bar1_size = pci_resource_len(pdev, 2); ··· 64 wl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0), PCI_BUS, pdev, 65 pdev->irq, bar1_addr, bar1_size); 66 67 - @@ -3335,12 +3347,19 @@ wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t 68 } 69 70 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) ··· 85 86 static int 87 wl_reg_proc_entry(wl_info_t *wl)
··· 1 + From 24decccfadc0d95b973e6dd8d476ddde2f0a4b21 Mon Sep 17 00:00:00 2001 2 From: Herman van Hazendonk <github.com@herrie.org> 3 Date: Tue, 31 Mar 2020 17:09:55 +0200 4 + Subject: [PATCH 10/16] linuxPackages.broadcom_sta: fix build for kernel 5.6+ 5 6 Use ioremap instead of ioremap_nocache and proc_ops instead of file_operations on Linux kernel 5.6 and above. 7 8 Signed-off-by: Herman van Hazendonk <github.com@herrie.org> 9 + 10 + Source: https://salsa.debian.org/Herrie82-guest/broadcom-sta/-/commit/247307926e5540ad574a17c062c8da76990d056f 11 --- 12 src/shared/linux_osl.c | 6 +++++- 13 src/wl/sys/wl_linux.c | 21 ++++++++++++++++++++- ··· 31 32 void 33 diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c 34 + index 83b8859..646f1d9 100644 35 --- a/src/wl/sys/wl_linux.c 36 +++ b/src/wl/sys/wl_linux.c 37 + @@ -591,10 +591,17 @@ wl_attach(uint16 vendor, uint16 device, ulong regs, 38 } 39 wl->bcm_bustype = bustype; 40 ··· 43 + WL_ERROR(("wl%d: ioremap() failed\n", unit)); 44 + goto fail; 45 + } 46 + + #else 47 if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) { 48 WL_ERROR(("wl%d: ioremap() failed\n", unit)); 49 goto fail; ··· 52 53 wl->bar1_addr = bar1_addr; 54 wl->bar1_size = bar1_size; 55 + @@ -781,8 +788,13 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 56 if ((val & 0x0000ff00) != 0) 57 pci_write_config_dword(pdev, 0x40, val & 0xffff00ff); 58 bar1_size = pci_resource_len(pdev, 2); ··· 66 wl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0), PCI_BUS, pdev, 67 pdev->irq, bar1_addr, bar1_size); 68 69 + @@ -3363,12 +3375,19 @@ wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t 70 } 71 72 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) ··· 87 88 static int 89 wl_reg_proc_entry(wl_info_t *wl) 90 + -- 91 + 2.45.1 92 +
+31 -1
pkgs/os-specific/linux/broadcom-sta/linux-5.9.patch
··· 1 diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c 2 index 4b3298f..c45ad48 100644 3 --- a/src/wl/sys/wl_cfg80211_hybrid.c ··· 86 87 static int 88 diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c 89 - index c990c70..5bb9480 100644 90 --- a/src/wl/sys/wl_linux.c 91 +++ b/src/wl/sys/wl_linux.c 92 @@ -1664,10 +1664,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) ··· 182 #include "proto/802.11.h" 183 #include "proto/bcmevent.h" 184
··· 1 + From 34d611f2dcf7d34db2cb413cc7b4f86f3706fec6 Mon Sep 17 00:00:00 2001 2 + From: Joan Bruguera <joanbrugueram@gmail.com> 3 + Date: Tue, 13 Oct 2020 19:35:55 +0200 4 + Subject: [PATCH 11/16] linuxPackages.broadcom_sta: fix build for kernel 5.9+ 5 + 6 + Get rid of get_fs/set_fs calls in Broadcom WL driver. 7 + 8 + Tentative patch for broadcom-wl 6.30.223.271 driver for Linux 5.10 (tested -rc1 up to 5.10.1) 9 + 10 + Applies on top of all the patches applied to broadcom-wl-dkms 6.30.223.271-23 on Arch Linux. 11 + 12 + NB: Some checks in wlc_ioctl_internal are likely superfluous, 13 + but I'm not familiar enough with the driver to remove them with confidence. 14 + 15 + See also: https://lwn.net/Articles/722267/ 16 + https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=47058bb54b57962b3958a936ddbc59355e4c5504 17 + https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5e6e9852d6f76e01b2e6803c74258afa5b432bc5 18 + 19 + Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com> 20 + --- 21 + src/wl/sys/wl_cfg80211_hybrid.c | 26 ++------------------- 22 + src/wl/sys/wl_iw.c | 25 ++------------------- 23 + src/wl/sys/wl_linux.c | 40 ++++++++++++++++++++++++++++----- 24 + src/wl/sys/wl_linux.h | 2 ++ 25 + src/wl/sys/wlc_pub.h | 1 + 26 + 5 files changed, 42 insertions(+), 52 deletions(-) 27 + 28 diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c 29 index 4b3298f..c45ad48 100644 30 --- a/src/wl/sys/wl_cfg80211_hybrid.c ··· 113 114 static int 115 diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c 116 + index 646f1d9..26ba9fa 100644 117 --- a/src/wl/sys/wl_linux.c 118 +++ b/src/wl/sys/wl_linux.c 119 @@ -1664,10 +1664,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) ··· 209 #include "proto/802.11.h" 210 #include "proto/bcmevent.h" 211 212 + -- 213 + 2.45.1 214 +
+9 -5
pkgs/os-specific/linux/broadcom-sta/linux-6.0.patch
··· 1 - From dbee29df729e543a89b3f95c1436e982eb0047c1 Mon Sep 17 00:00:00 2001 2 From: Joan Bruguera <joanbrugueram@gmail.com> 3 Date: Thu, 30 Jun 2022 02:15:35 +0200 4 - Subject: [PATCH] Tentative patch for broadcom-wl 6.30.223.271 driver for Linux 6.0-rc1 5 6 Applies on top of all the patches applied to broadcom-wl-dkms 6.30.223.271-33 on Arch Linux. 7 --- 8 src/wl/sys/wl_cfg80211_hybrid.c | 5 +++++ 9 1 file changed, 5 insertions(+) 10 11 diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c 12 - index d815b33..7faa735 100644 13 --- a/src/wl/sys/wl_cfg80211_hybrid.c 14 +++ b/src/wl/sys/wl_cfg80211_hybrid.c 15 - @@ -2381,7 +2381,12 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev, 16 bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid, 17 ssid->SSID, ssid->SSID_len, WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS); 18 struct cfg80211_roam_info roam_info = { ··· 26 .req_ie_len = conn_info->req_ie_len, 27 .resp_ie = conn_info->resp_ie, 28 -- 29 - 2.37.0 30
··· 1 + From cec136ba06039aa2e4441771df855894391db298 Mon Sep 17 00:00:00 2001 2 From: Joan Bruguera <joanbrugueram@gmail.com> 3 Date: Thu, 30 Jun 2022 02:15:35 +0200 4 + Subject: [PATCH 14/16] linuxPackages.broadcom_sta: fix build for kernel 6.0+ 5 + 6 + Tentative patch for broadcom-wl 6.30.223.271 driver for Linux 6.0-rc1 7 8 Applies on top of all the patches applied to broadcom-wl-dkms 6.30.223.271-33 on Arch Linux. 9 + 10 + Source: https://gist.github.com/joanbm/207210d74637870c01ef5a3c262a597d 11 --- 12 src/wl/sys/wl_cfg80211_hybrid.c | 5 +++++ 13 1 file changed, 5 insertions(+) 14 15 diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c 16 + index c45ad48..9ae56a1 100644 17 --- a/src/wl/sys/wl_cfg80211_hybrid.c 18 +++ b/src/wl/sys/wl_cfg80211_hybrid.c 19 + @@ -2354,7 +2354,12 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev, 20 bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid, 21 ssid->SSID, ssid->SSID_len, WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS); 22 struct cfg80211_roam_info roam_info = { ··· 30 .req_ie_len = conn_info->req_ie_len, 31 .resp_ie = conn_info->resp_ie, 32 -- 33 + 2.45.1 34
+9 -5
pkgs/os-specific/linux/broadcom-sta/linux-6.1.patch
··· 1 - From a63a5f70e5cf05f6bce4cda2e0dd67462e1d76a5 Mon Sep 17 00:00:00 2001 2 From: Joan Bruguera <joanbrugueram@gmail.com> 3 Date: Mon, 29 Aug 2022 00:06:53 +0200 4 - Subject: [PATCH] Tentative patch for broadcom-wl 6.30.223.271 driver for Linux 6.1-rc1 5 6 Applies on top of all the patches applied to broadcom-wl-dkms 6.30.223.271-35 on Arch Linux 7 --- 8 src/wl/sys/wl_cfg80211_hybrid.c | 21 +++++++++++++-------- 9 1 file changed, 13 insertions(+), 8 deletions(-) 10 11 diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c 12 - index 4fef22a..50d1e34 100644 13 --- a/src/wl/sys/wl_cfg80211_hybrid.c 14 +++ b/src/wl/sys/wl_cfg80211_hybrid.c 15 - @@ -105,20 +105,25 @@ static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wd 16 static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm); 17 #endif 18 ··· 79 #else 80 static s32 81 -- 82 - 2.37.2 83
··· 1 + From febe94b43294a3155e39e844db4ac4ee81614ad1 Mon Sep 17 00:00:00 2001 2 From: Joan Bruguera <joanbrugueram@gmail.com> 3 Date: Mon, 29 Aug 2022 00:06:53 +0200 4 + Subject: [PATCH 16/16] linuxPackages.broadcom_sta: fix build for kernel 6.1+ 5 + 6 + Tentative patch for broadcom-wl 6.30.223.271 driver for Linux 6.1-rc1 7 8 Applies on top of all the patches applied to broadcom-wl-dkms 6.30.223.271-35 on Arch Linux 9 + 10 + Source: https://gist.github.com/joanbm/94323ea99eff1e1d1c51241b5b651549 11 --- 12 src/wl/sys/wl_cfg80211_hybrid.c | 21 +++++++++++++-------- 13 1 file changed, 13 insertions(+), 8 deletions(-) 14 15 diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c 16 + index a6b2ca2..333866c 100644 17 --- a/src/wl/sys/wl_cfg80211_hybrid.c 18 +++ b/src/wl/sys/wl_cfg80211_hybrid.c 19 + @@ -104,20 +104,25 @@ static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wd 20 static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm); 21 #endif 22 ··· 83 #else 84 static s32 85 -- 86 + 2.45.1 87
+25 -4
pkgs/os-specific/linux/broadcom-sta/null-pointer-fix.patch
··· 1 - diff -urN a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c 2 - --- a/src/wl/sys/wl_linux.c 2015-01-06 12:33:42.981659618 +0100 3 - +++ b/src/wl/sys/wl_linux.c 2015-01-06 12:34:05.647395418 +0100 4 - @@ -2157,8 +2157,8 @@ 5 wlif = WL_DEV_IF(dev); 6 wl = WL_INFO(dev); 7 ··· 11 12 TXQ_LOCK(wl); 13
··· 1 + From 507d93e3651d78c1df8bd185b0703872d0c2585b Mon Sep 17 00:00:00 2001 2 + From: aszlig <aszlig@redmoonstudios.org> 3 + Date: Mon, 1 Aug 2016 21:00:02 +0200 4 + Subject: [PATCH 03/16] linuxPackages.broadcom_sta: fix NULL pointer deref 5 + 6 + The patch is from the following Gentoo bug: 7 + 8 + https://bugs.gentoo.org/show_bug.cgi?id=523326#c24 9 + 10 + Built successfully against Linux 3.18.36, 4.4.16 and 4.7.0. 11 + 12 + Signed-off-by: aszlig <aszlig@redmoonstudios.org> 13 + Cc: @phreedom, @vcunat 14 + --- 15 + src/wl/sys/wl_linux.c | 2 +- 16 + 1 file changed, 1 insertion(+), 1 deletion(-) 17 + 18 + diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c 19 + index 14922c0..65d7a22 100644 20 + --- a/src/wl/sys/wl_linux.c 21 + +++ b/src/wl/sys/wl_linux.c 22 + @@ -2167,8 +2167,8 @@ wl_start(struct sk_buff *skb, struct net_device *dev) 23 wlif = WL_DEV_IF(dev); 24 wl = WL_INFO(dev); 25 ··· 29 30 TXQ_LOCK(wl); 31 32 + -- 33 + 2.45.1 34 +
+21 -5
pkgs/os-specific/linux/broadcom-sta/pedantic-fix.patch
··· 1 diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c 2 - index 711b771..5a2636a 100644 3 --- a/src/shared/linux_osl.c 4 +++ b/src/shared/linux_osl.c 5 - @@ -1105,7 +1105,7 @@ osl_os_get_image_block(char *buf, int len, void *image) 6 if (!image) 7 return 0; 8 ··· 12 fp->f_pos += rdlen; 13 14 diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c 15 - index 2b3c290..093dce6 100644 16 --- a/src/wl/sys/wl_cfg80211_hybrid.c 17 +++ b/src/wl/sys/wl_cfg80211_hybrid.c 18 @@ -790,6 +790,7 @@ wl_set_auth_type(struct net_device *dev, struct cfg80211_connect_params *sme) ··· 70 #define WL_IW_GET_RSSI (SIOCIWFIRSTPRIV+3) 71 #define WL_IW_SET_PASSIVE_SCAN (SIOCIWFIRSTPRIV+5) 72 diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c 73 - index d13fb98..97ae2a6 100644 74 --- a/src/wl/sys/wl_linux.c 75 +++ b/src/wl/sys/wl_linux.c 76 - @@ -797,14 +797,15 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 77 pci_read_config_dword(pdev, 0x40, &val); 78 if ((val & 0x0000ff00) != 0) 79 pci_write_config_dword(pdev, 0x40, val & 0xffff00ff); ··· 97 wl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0), PCI_BUS, pdev, 98 pdev->irq, bar1_addr, bar1_size); 99
··· 1 + From 99b1bbc01ea0611e93cb94c2a2532aef96676976 Mon Sep 17 00:00:00 2001 2 + From: X9VoiD <oscar.silvestrexx@gmail.com> 3 + Date: Wed, 19 Oct 2022 00:29:28 +0800 4 + Subject: [PATCH 15/16] linuxPackages.broadcom_sta: fix build issues with 5 + kernel 6.0+ 6 + 7 + --- 8 + src/shared/linux_osl.c | 2 +- 9 + src/wl/sys/wl_cfg80211_hybrid.c | 17 ++++++++--------- 10 + src/wl/sys/wl_iw.h | 1 - 11 + src/wl/sys/wl_linux.c | 17 +++++++++-------- 12 + 4 files changed, 18 insertions(+), 19 deletions(-) 13 + 14 diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c 15 + index 5a25b82..18bacb6 100644 16 --- a/src/shared/linux_osl.c 17 +++ b/src/shared/linux_osl.c 18 + @@ -1101,7 +1101,7 @@ osl_os_get_image_block(char *buf, int len, void *image) 19 if (!image) 20 return 0; 21 ··· 25 fp->f_pos += rdlen; 26 27 diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c 28 + index 9ae56a1..a6b2ca2 100644 29 --- a/src/wl/sys/wl_cfg80211_hybrid.c 30 +++ b/src/wl/sys/wl_cfg80211_hybrid.c 31 @@ -790,6 +790,7 @@ wl_set_auth_type(struct net_device *dev, struct cfg80211_connect_params *sme) ··· 83 #define WL_IW_GET_RSSI (SIOCIWFIRSTPRIV+3) 84 #define WL_IW_SET_PASSIVE_SCAN (SIOCIWFIRSTPRIV+5) 85 diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c 86 + index 25c4706..4c7e238 100644 87 --- a/src/wl/sys/wl_linux.c 88 +++ b/src/wl/sys/wl_linux.c 89 + @@ -791,14 +791,15 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 90 pci_read_config_dword(pdev, 0x40, &val); 91 if ((val & 0x0000ff00) != 0) 92 pci_write_config_dword(pdev, 0x40, val & 0xffff00ff); ··· 110 wl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0), PCI_BUS, pdev, 111 pdev->irq, bar1_addr, bar1_size); 112 113 + -- 114 + 2.45.1 115 +