summary refs log tree commit diff
path: root/pkgs/os-specific/linux
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/linux')
-rw-r--r--pkgs/os-specific/linux/broadcom-sta/default.nix2
-rw-r--r--pkgs/os-specific/linux/broadcom-sta/linux-2.6.39.patch11
-rw-r--r--pkgs/os-specific/linux/broadcom-sta/linux-3.2.patch13
3 files changed, 25 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/broadcom-sta/default.nix b/pkgs/os-specific/linux/broadcom-sta/default.nix
index 67ae073c6c7..48ab458d402 100644
--- a/pkgs/os-specific/linux/broadcom-sta/default.nix
+++ b/pkgs/os-specific/linux/broadcom-sta/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation {
   };
 
   buildInputs = [ kernel ];
-  patches = [ ./makefile.patch ];
+  patches = [ ./makefile.patch ./linux-2.6.39.patch ./linux-3.2.patch ];
     #++ stdenv.lib.optional
     #(! builtins.lessThan (builtins.compareVersions kernel.version "2.6.37") 0)
       #[ ./mutex-sema.patch ];
diff --git a/pkgs/os-specific/linux/broadcom-sta/linux-2.6.39.patch b/pkgs/os-specific/linux/broadcom-sta/linux-2.6.39.patch
new file mode 100644
index 00000000000..ca07c918c36
--- /dev/null
+++ b/pkgs/os-specific/linux/broadcom-sta/linux-2.6.39.patch
@@ -0,0 +1,11 @@
+--- old/src/wl/sys/wl_cfg80211.c
++++ new/src/wl/sys/wl_cfg80211.c
+@@ -1811,7 +1811,7 @@
+ 	notif_bss_info->frame_len = offsetof(struct ieee80211_mgmt, u.beacon.variable) +
+ 	                            wl_get_ielen(wl);
+ 	freq = ieee80211_channel_to_frequency(notif_bss_info->channel 
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
+ 		,(notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ
+ #endif
+ 	);
diff --git a/pkgs/os-specific/linux/broadcom-sta/linux-3.2.patch b/pkgs/os-specific/linux/broadcom-sta/linux-3.2.patch
new file mode 100644
index 00000000000..b491537cb86
--- /dev/null
+++ b/pkgs/os-specific/linux/broadcom-sta/linux-3.2.patch
@@ -0,0 +1,13 @@
+diff -Naur broadcom-sta-5.100.82.112.orig/src/wl/sys/wl_linux.c broadcom-sta-5.100.82.112/src/wl/sys/wl_linux.c
+--- broadcom-sta-5.100.82.112.orig/src/wl/sys/wl_linux.c	2011-10-23 01:56:55.000000000 +0900
++++ broadcom-sta-5.100.82.112/src/wl/sys/wl_linux.c	2011-11-22 00:56:07.021520421 +0900
+@@ -385,7 +385,9 @@
+ #endif
+ 	.ndo_get_stats = wl_get_stats,
+ 	.ndo_set_mac_address = wl_set_mac_address,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
+ 	.ndo_set_multicast_list = wl_set_multicast_list,
++#endif
+ 	.ndo_do_ioctl = wl_ioctl
+ };
+