[packages/wl] - added patches from Debian to fix old crash and new one on linux 4.8 - rel 3

baggins baggins at pld-linux.org
Mon Oct 10 22:13:25 CEST 2016


commit 0e2168f7355d36404e261166eb196b3d5fff0569
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Oct 10 22:12:26 2016 +0200

    - added patches from Debian to fix old crash and new one on linux 4.8
    - rel 3

 ....30.223.248-linux-3.18-null-pointer-crash.patch | 19 +++++++
 linux-4.8.patch                                    | 61 ++++++++++++++++++++++
 wl.spec                                            |  6 ++-
 3 files changed, 85 insertions(+), 1 deletion(-)
---
diff --git a/wl.spec b/wl.spec
index 988c911..fb265bc 100644
--- a/wl.spec
+++ b/wl.spec
@@ -18,7 +18,7 @@ exit 1
 
 %define		_duplicate_files_terminate_build	0
 
-%define		rel	2
+%define		rel	3
 %define		pname	wl
 %define		file_ver	%(echo %{version} | tr . _)
 Summary:	Broadcom 802.11 a/b/g/n hybrid Linux networking device driver
@@ -35,9 +35,11 @@ Source2:	http://www.broadcom.com/docs/linux_sta/README.txt
 # Source2-md5:	8a6e8708a5e00ab6d841cde51d70eb1b
 Source3:	dkms.conf
 Source4:	modprobe.conf
+Patch0:		13-broadcom-sta-6.30.223.248-linux-3.18-null-pointer-crash.patch
 Patch1:		gcc-4.9.patch
 Patch2:		no-dead-code.patch
 Patch3:		linux-4.7.patch
+Patch4:		linux-4.8.patch
 URL:		http://www.broadcom.com/support/802.11/linux_sta.php
 BuildRequires:	rpmbuild(macros) >= 1.701
 %{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
@@ -118,9 +120,11 @@ EOF\
 %define src 0
 %endif
 %setup -c -T -q -n %{pname}-%{version} -b%{src}
+%patch0 -p1
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 mkdir wl
 mv lib src Makefile wl/
diff --git a/13-broadcom-sta-6.30.223.248-linux-3.18-null-pointer-crash.patch b/13-broadcom-sta-6.30.223.248-linux-3.18-null-pointer-crash.patch
new file mode 100644
index 0000000..2025b05
--- /dev/null
+++ b/13-broadcom-sta-6.30.223.248-linux-3.18-null-pointer-crash.patch
@@ -0,0 +1,19 @@
+From: Hugo Osvaldo Barrera <hugo at 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/src/wl/sys/wl_linux.c
++++ broadcom-sta/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/linux-4.8.patch b/linux-4.8.patch
new file mode 100644
index 0000000..6f8c7fd
--- /dev/null
+++ b/linux-4.8.patch
@@ -0,0 +1,61 @@
+
+Package: broadcom-sta-source
+Version:  6.30.223.271-3
+
+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
+
+
+--- broadcom-sta.orig/src/wl/sys/wl_cfg80211_hybrid.c.orig	2016-10-03 10:53:55.588036464 +0200
++++ broadcom-sta.orig/src/wl/sys/wl_cfg80211_hybrid.c	2016-10-03 10:54:11.911695944 +0200
+@@ -2386,8 +2386,15 @@
+ 	s32 err = 0;
+ 
+ 	if (wl->scan_request) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++		struct cfg80211_scan_info info = {
++			.aborted = true
++		};
+ 		WL_DBG(("%s: Aborting scan\n", __FUNCTION__));
+-		cfg80211_scan_done(wl->scan_request, true);     
++		cfg80211_scan_done(wl->scan_request, &info);
++#else
++		cfg80211_scan_done(wl->scan_request, true);
++#endif
+ 		wl->scan_request = NULL;
+ 	}
+ 
+@@ -2488,7 +2495,14 @@
+ 
+ scan_done_out:
+ 	if (wl->scan_request) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++		struct cfg80211_scan_info info = {
++			.aborted = false
++		};
++		cfg80211_scan_done(wl->scan_request, &info);
++#else
+ 		cfg80211_scan_done(wl->scan_request, false);
++#endif
+ 		wl->scan_request = NULL;
+ 	}
+ 	rtnl_unlock();
+@@ -2913,7 +2927,14 @@
+ 	s32 err = 0;
+ 
+ 	if (wl->scan_request) {
+-		cfg80211_scan_done(wl->scan_request, true);	
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++		struct cfg80211_scan_info info = {
++			.aborted = true
++		};
++		cfg80211_scan_done(wl->scan_request, &info);
++#else
++		cfg80211_scan_done(wl->scan_request, true);
++#endif
+ 		wl->scan_request = NULL;
+ 	}
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/wl.git/commitdiff/0e2168f7355d36404e261166eb196b3d5fff0569



More information about the pld-cvs-commit mailing list