Patched broadcom_sta with for kernels 2.6.39 and 3.2

Patches taken from Gentoo, builds OK now.

svn path=/nixpkgs/trunk/; revision=32076
This commit is contained in:
Vladimír Čunát 2012-02-06 19:06:47 +00:00
parent fd12c85a33
commit e6c4bcf8fb
3 changed files with 25 additions and 1 deletions

View file

@ -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 ];

View file

@ -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
);

View file

@ -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
};