Unverified Commit d4854eb6 authored by Philip Taron's avatar Philip Taron
Browse files

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.
parent 9080e906
Loading
Loading
Loading
Loading
+24 −7
Original line number Diff line number Diff line
--- a/Makefile	2014-06-26 10:42:08.000000000 +0000
+++ b/Makefile	2014-07-17 22:44:01.662297228 +0000
@@ -126,6 +126,8 @@
From 3e28c2a24c3b3b011506bcaa4fee7e8da347c5ff Mon Sep 17 00:00:00 2001
From: Charles Strahan <charles.c.strahan@gmail.com>
Date: Tue, 5 May 2015 15:09:51 -0400
Subject: [PATCH 01/16] linuxPackages.broadcom_sta: since GCC respects
 SOURCE_DATE_EPOCH, set in the stdenv, set -Wno-date-time

---
 Makefile | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/Makefile b/Makefile
index a323a0d..15e85c8 100644
--- a/Makefile
+++ b/Makefile
@@ -140,10 +140,7 @@ wl-objs            += src/wl/sys/wl_cfg80211_hybrid.o
 EXTRA_CFLAGS       += -I$(src)/src/include -I$(src)/src/common/include
 EXTRA_CFLAGS       += -I$(src)/src/wl/sys -I$(src)/src/wl/phy -I$(src)/src/wl/ppr/include
 EXTRA_CFLAGS       += -I$(src)/src/shared/bcmwifi/include
 #EXTRA_CFLAGS       += -DBCMDBG_ASSERT -DBCMDBG_ERR
-#EXTRA_CFLAGS       += -DBCMDBG_ASSERT -DBCMDBG_ERR
-ifeq "$(GE_49)" "1"
 EXTRA_CFLAGS       += -Wno-date-time
-endif
 
+EXTRA_CFLAGS       += -Wno-date-time
+
 EXTRA_LDFLAGS      := $(src)/lib/wlc_hybrid.o_shipped
 
 KBASE              ?= /lib/modules/`uname -r`
-- 
2.45.1
+17 −4
Original line number Diff line number Diff line
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
--- hybrid-portsrc-x86_32-v5_10_91_9.orig/src/wl/sys/wl_linux.c	2009-04-23 02:48:59.000000000 +0900
+++ hybrid-portsrc-x86_32-v5_10_91_9/src/wl/sys/wl_linux.c	2009-05-08 00:48:20.000000000 +0900
@@ -171,6 +171,8 @@
From 5a964e14474e4482a4d24c015371856560dacabc Mon Sep 17 00:00:00 2001
From: Shea Levy <shea@shealevy.com>
Date: Sat, 4 Jan 2014 20:57:21 -0500
Subject: [PATCH 02/16] linuxPackages.broadcom_sta: apply MIXED/Proprietary
 license

---
 src/wl/sys/wl_linux.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
index 0d05100..14922c0 100644
--- a/src/wl/sys/wl_linux.c
+++ b/src/wl/sys/wl_linux.c
@@ -148,6 +148,8 @@ static struct wl_if *wl_alloc_if(wl_info_t *wl, int iftype, uint unit, struct wl
 static void wl_free_if(wl_info_t *wl, wl_if_t *wlif);
 static void wl_get_driver_info(struct net_device *dev, struct ethtool_drvinfo *info);
 
@@ -10,4 +21,6 @@ diff -Naur hybrid-portsrc-x86_32-v5_10_91_9.orig/src/wl/sys/wl_linux.c hybrid-po
 #if defined(WL_CONFIG_RFKILL)
 #include <linux/rfkill.h>
 static int wl_init_rfkill(wl_info_t *wl);
-- 
2.45.1
+17 −4
Original line number Diff line number Diff line
From 5a0301c2d9c65dbb3c5b8990e635d37f071d26c4 Mon Sep 17 00:00:00 2001
From: georgewhewell <georgerw@gmail.com>
Date: Fri, 2 Jun 2017 14:19:04 +0100
Subject: [PATCH 06/16] linuxPackages.broadcom_sta: fix build for kernel 4.11+

---
 src/wl/sys/wl_cfg80211_hybrid.c |  3 +++
 src/wl/sys/wl_linux.c           | 12 ++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
index a9671e2..da36405 100644
index 84f0068..9fd8ed1 100644
--- a/src/wl/sys/wl_cfg80211_hybrid.c
+++ b/src/wl/sys/wl_cfg80211_hybrid.c
@@ -30,6 +30,9 @@
@@ -13,7 +23,7 @@ index a9671e2..da36405 100644
 #include <linux/nl80211.h>
 #include <net/rtnetlink.h>
diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
index 489c9f5..f8278ad 100644
index 65d7a22..18841d9 100644
--- a/src/wl/sys/wl_linux.c
+++ b/src/wl/sys/wl_linux.c
@@ -117,6 +117,9 @@ int wl_found = 0;
@@ -26,7 +36,7 @@ index 489c9f5..f8278ad 100644
 } priv_link_t;
 
 #define WL_DEV_IF(dev)          ((wl_if_t*)((priv_link_t*)DEV_PRIV(dev))->wlif)
@@ -2450,6 +2453,9 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p)
@@ -2451,6 +2454,9 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p)
 {
 	struct sk_buff *oskb = (struct sk_buff *)p;
 	struct sk_buff *skb;
@@ -36,7 +46,7 @@ index 489c9f5..f8278ad 100644
 	uchar *pdata;
 	uint len;
 
@@ -2916,7 +2922,13 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p)
@@ -2917,7 +2923,13 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p)
 	if (skb == NULL) return;
 
 	skb->dev = wl->monitor_dev;
@@ -50,3 +60,6 @@ index 489c9f5..f8278ad 100644
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
 	skb_reset_mac_header(skb);
 #else
-- 
2.45.1
+25 −1
Original line number Diff line number Diff line
From 2e9c7bd146fbc3b4a62940140eafb47df16b6cb4 Mon Sep 17 00:00:00 2001
From: aszlig <aszlig@redmoonstudios.org>
Date: Tue, 18 Jul 2017 21:32:13 +0200
Subject: [PATCH 07/16] linuxPackages.broadcom_sta: fix build for kernel 4.12+

The patch is from Arch Linux at:

https://aur.archlinux.org/cgit/aur.git/tree/linux412.patch?h=broadcom-wl

Tested this by building against the following attributes:

  * linuxPackages.broadcom_sta
  * linuxPackages_latest.broadcom_sta
  * pkgsI686Linux.linuxPackages.broadcom_sta
  * pkgsI686Linux.linuxPackages_latest.broadcom_sta

I have not tested whether this works at runtime, because I do not possess the hardware.
---
 src/wl/sys/wl_cfg80211_hybrid.c | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
index da36405..d3741eb 100644
index 9fd8ed1..1893a53 100644
--- a/src/wl/sys/wl_cfg80211_hybrid.c
+++ b/src/wl/sys/wl_cfg80211_hybrid.c
@@ -53,7 +53,11 @@ u32 wl_dbg_level = WL_DBG_ERR;
@@ -66,3 +87,6 @@ index da36405..d3741eb 100644
 	WL_DBG(("Report roaming result\n"));
 
 	set_bit(WL_STATUS_CONNECTED, &wl->status);
-- 
2.45.1
+26 −14
Original line number Diff line number Diff line
From ae88c3c0c91d26ca5e4dc1e498a370747d2c3b03 Mon Sep 17 00:00:00 2001
From: Yegor Timoshenko <yegortimoshenko@riseup.net>
Date: Wed, 31 Jan 2018 22:59:09 +0000
Subject: [PATCH 08/16] linuxPackages.broadcom_sta: fix build for kernel 4.15+

See: https://lkml.org/lkml/2017/11/25/90
---
 src/wl/sys/wl_linux.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff -urNZ a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
--- a/src/wl/sys/wl_linux.c	2015-09-18 22:47:30.000000000 +0000
+++ b/src/wl/sys/wl_linux.c	2018-01-31 22:52:10.859856221 +0000
@@ -93,7 +93,11 @@
diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
index 18841d9..83b8859 100644
--- a/src/wl/sys/wl_linux.c
+++ b/src/wl/sys/wl_linux.c
@@ -93,7 +93,11 @@ struct iw_statistics *wl_get_wireless_stats(struct net_device *dev);
 
 #include <wlc_wowl.h>
 
@@ -15,7 +24,7 @@ diff -urNZ a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
 static void _wl_timer(wl_timer_t *t);
 static struct net_device *wl_alloc_linux_if(wl_if_t *wlif);
 
@@ -2298,9 +2302,15 @@
@@ -2303,9 +2307,15 @@ wl_timer_task(wl_task_t *task)
 }
 
 static void
@@ -31,7 +40,7 @@ diff -urNZ a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
 
 	if (!WL_ALL_PASSIVE_ENAB(t->wl))
 		_wl_timer(t);
@@ -2352,9 +2362,13 @@
@@ -2357,9 +2367,13 @@ wl_init_timer(wl_info_t *wl, void (*fn)(void *arg), void *arg, const char *tname
 
 	bzero(t, sizeof(wl_timer_t));
 
@@ -45,3 +54,6 @@ diff -urNZ a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
 	t->wl = wl;
 	t->fn = fn;
 	t->arg = arg;
-- 
2.45.1
Loading