Unverified Commit 917e91f3 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #321134 from philiptaron/issue-177798/broadcom-sta

parents a9a4e171 5d78a892
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ stdenv.mkDerivation {
  nativeBuildInputs = kernel.moduleBuildDependencies;

  patches = [
    ./i686-build-failure.patch
    ./license.patch
    ./linux-4.7.patch
    # source: https://git.archlinux.org/svntogit/community.git/tree/trunk/004-linux48.patch?h=packages/broadcom-wl-dkms
+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
+0 −18
Original line number Diff line number Diff line
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=fe47ae6e1a5005b2e82f7eab57b5c3820453293a
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=4ea1636b04dbd66536fa387bae2eea463efc705b

diff -ru a/src/shared/linux_osl.c b/src/shared/linux_osl.c
--- a/src/shared/linux_osl.c	2015-09-19 01:47:15.000000000 +0300
+++ b/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 
+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
Loading