From e6c4bcf8fb1f6f58a1fd98149895fbcda8c4eca8 Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Mon, 6 Feb 2012 19:06:47 +0000 Subject: 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 --- pkgs/os-specific/linux/broadcom-sta/default.nix | 2 +- pkgs/os-specific/linux/broadcom-sta/linux-2.6.39.patch | 11 +++++++++++ pkgs/os-specific/linux/broadcom-sta/linux-3.2.patch | 13 +++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 pkgs/os-specific/linux/broadcom-sta/linux-2.6.39.patch create mode 100644 pkgs/os-specific/linux/broadcom-sta/linux-3.2.patch (limited to 'pkgs/os-specific/linux') 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 + }; + -- cgit 1.4.1