summary refs log tree commit diff
path: root/pkgs/os-specific/linux/broadcom-sta
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2014-12-14 10:47:43 +0100
committerVladimír Čunát <vcunat@gmail.com>2014-12-14 10:51:31 +0100
commit274a9419c16c45cd392a6fb09b77d3f5b714915c (patch)
treee02d893eb229c27801090edb75087dbc8aaef37a /pkgs/os-specific/linux/broadcom-sta
parentba5fad6dfaeea257ed06a0f30ad6dcd39654e6f9 (diff)
downloadnixlib-274a9419c16c45cd392a6fb09b77d3f5b714915c.tar
nixlib-274a9419c16c45cd392a6fb09b77d3f5b714915c.tar.gz
nixlib-274a9419c16c45cd392a6fb09b77d3f5b714915c.tar.bz2
nixlib-274a9419c16c45cd392a6fb09b77d3f5b714915c.tar.lz
nixlib-274a9419c16c45cd392a6fb09b77d3f5b714915c.tar.xz
nixlib-274a9419c16c45cd392a6fb09b77d3f5b714915c.tar.zst
nixlib-274a9419c16c45cd392a6fb09b77d3f5b714915c.zip
broadcom_sta: fix build with kernel 3.18 (close #5315)
I couldn't find any source that looked reliable, but I guess it's better
than nothing: it's fairly simple patch that fixes the build.
Diffstat (limited to 'pkgs/os-specific/linux/broadcom-sta')
-rw-r--r--pkgs/os-specific/linux/broadcom-sta/cfg80211_inform_bss-3.18.patch21
-rw-r--r--pkgs/os-specific/linux/broadcom-sta/default.nix1
2 files changed, 22 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/broadcom-sta/cfg80211_inform_bss-3.18.patch b/pkgs/os-specific/linux/broadcom-sta/cfg80211_inform_bss-3.18.patch
new file mode 100644
index 000000000000..100ac9161a6f
--- /dev/null
+++ b/pkgs/os-specific/linux/broadcom-sta/cfg80211_inform_bss-3.18.patch
@@ -0,0 +1,21 @@
+Found on a random place http://web.archiveorange.com/archive/v/CcRuxYExfvTxfKcBFLah
+Nicolas Viéville, Oct 27 2014
+diff -Naur hybrid-v35_64-nodebug-pcoem-6_30_223_248.orig/src/wl/sys/wl_cfg80211_hybrid.c hybrid-v35_64-nodebug-pcoem-6_30_223_248/src/wl/sys/wl_cfg80211_hybrid.c
+--- hybrid-v35_64-nodebug-pcoem-6_30_223_248.orig/src/wl/sys/wl_cfg80211_hybrid.c	2014-09-10 19:27:13.301316000 +0200
++++ hybrid-v35_64-nodebug-pcoem-6_30_223_248/src/wl/sys/wl_cfg80211_hybrid.c	2014-10-27 11:21:58.213536239 +0100
+@@ -2025,7 +2025,15 @@
+ 	notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);
+ 	notify_ielen = le32_to_cpu(bi->ie_length);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)
++	cbss = cfg80211_inform_bss(wiphy, channel,
++		(mgmt_type == IEEE80211_STYPE_PROBE_RESP) ? CFG80211_BSS_FTYPE_PRESP : CFG80211_BSS_FTYPE_BEACON,
++		(const u8 *)(bi->BSSID.octet),
++		0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
++		(const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
++#else
+ 	cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet),
+ 		0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
+ 		(const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
++#endif
+ 	if (unlikely(!cbss))
+ 		return -ENOMEM;
diff --git a/pkgs/os-specific/linux/broadcom-sta/default.nix b/pkgs/os-specific/linux/broadcom-sta/default.nix
index e88b41a36ae7..94f519112952 100644
--- a/pkgs/os-specific/linux/broadcom-sta/default.nix
+++ b/pkgs/os-specific/linux/broadcom-sta/default.nix
@@ -20,6 +20,7 @@ stdenv.mkDerivation {
     ./license.patch
     ./cfg80211_ibss_joined-channel-parameter.patch
     ./netdev-3.17.patch
+    ./cfg80211_inform_bss-3.18.patch
   ];
 
   makeFlags = "KBASE=${kernel.dev}/lib/modules/${kernel.modDirVersion}";