summary refs log tree commit diff
path: root/pkgs/os-specific/linux/broadcom-sta
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2017-04-20 07:03:17 +0200
committerJörg Thalheim <joerg@thalheim.io>2017-04-20 07:05:50 +0200
commitf0f9cad9f2ae06018188b39f3947bbbe5f68881e (patch)
treeb5daeb49400fe18a4ee7b950b4ac5288afab3633 /pkgs/os-specific/linux/broadcom-sta
parente662e035f9ed4d125c7534bc65e01fc73a0b0f62 (diff)
downloadnixpkgs-f0f9cad9f2ae06018188b39f3947bbbe5f68881e.tar
nixpkgs-f0f9cad9f2ae06018188b39f3947bbbe5f68881e.tar.gz
nixpkgs-f0f9cad9f2ae06018188b39f3947bbbe5f68881e.tar.bz2
nixpkgs-f0f9cad9f2ae06018188b39f3947bbbe5f68881e.tar.lz
nixpkgs-f0f9cad9f2ae06018188b39f3947bbbe5f68881e.tar.xz
nixpkgs-f0f9cad9f2ae06018188b39f3947bbbe5f68881e.tar.zst
nixpkgs-f0f9cad9f2ae06018188b39f3947bbbe5f68881e.zip
linuxPackages.broadcom-sta: add patch to repo
fetchPatch was unreliable and the checksum kept breaking all the time
Diffstat (limited to 'pkgs/os-specific/linux/broadcom-sta')
-rw-r--r--pkgs/os-specific/linux/broadcom-sta/default.nix7
-rw-r--r--pkgs/os-specific/linux/broadcom-sta/linux48.patch64
2 files changed, 66 insertions, 5 deletions
diff --git a/pkgs/os-specific/linux/broadcom-sta/default.nix b/pkgs/os-specific/linux/broadcom-sta/default.nix
index cb65b9d8403..8b2bac38438 100644
--- a/pkgs/os-specific/linux/broadcom-sta/default.nix
+++ b/pkgs/os-specific/linux/broadcom-sta/default.nix
@@ -25,13 +25,10 @@ stdenv.mkDerivation {
     ./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
+    ./linux-4.8.patch
     ./null-pointer-fix.patch
     ./gcc.patch
-    (fetchpatch {
-      name = "linux-4.8.patch";
-      url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/004-linux48.patch?h=packages/broadcom-wl-dkms&id=8c6d80fc77eb20cbb4fd0eca71fa8a03b9447c3f";
-      sha256 = "0b963540gaj06q6ynfg47z8k5y3k2503yahbwawclfq4cxhl472a";
-    })
   ];
 
   makeFlags = "KBASE=${kernel.dev}/lib/modules/${kernel.modDirVersion}";
diff --git a/pkgs/os-specific/linux/broadcom-sta/linux48.patch b/pkgs/os-specific/linux/broadcom-sta/linux48.patch
new file mode 100644
index 00000000000..20e8a9ae49d
--- /dev/null
+++ b/pkgs/os-specific/linux/broadcom-sta/linux48.patch
@@ -0,0 +1,64 @@
+From d3f93542326a06d920c6eb89b703384290d37b8b Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Fri, 2 Sep 2016 17:35:34 +0200
+Subject: [PATCH 1/1] Add support for Linux 4.8
+
+Orginal author: Krzysztof Kolasa
+---
+ src/wl/sys/wl_cfg80211_hybrid.c | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index 2fc71fe..ec5e472 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -2388,8 +2388,16 @@ 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, &info);
++#else
+ 		WL_DBG(("%s: Aborting scan\n", __FUNCTION__));
+ 		cfg80211_scan_done(wl->scan_request, true);     
++#endif
+ 		wl->scan_request = NULL;
+ 	}
+ 
+@@ -2490,7 +2498,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();
+@@ -2909,7 +2924,14 @@ s32 wl_cfg80211_down(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,
++		};
++		cfg80211_scan_done(wl->scan_request, &info);
++#else
+ 		cfg80211_scan_done(wl->scan_request, true);	
++#endif
+ 		wl->scan_request = NULL;
+ 	}
+ 
+-- 
+2.7.4
+