summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Ramsay <lack@gentoo.org>2008-02-11 15:45:21 +0000
committerJim Ramsay <lack@gentoo.org>2008-02-11 15:45:21 +0000
commitec21fbde374126efe5368a111a5e12218ddfcdf0 (patch)
treef6bb7756651edf8db33398d5ebc8995e5fe38ad3 /net-wireless/ipw3945
parentAdding new ipw3945 with 2.6.24 patch to p.mask until I can get a bit of testi... (diff)
downloadgentoo-2-ec21fbde374126efe5368a111a5e12218ddfcdf0.tar.gz
gentoo-2-ec21fbde374126efe5368a111a5e12218ddfcdf0.tar.bz2
gentoo-2-ec21fbde374126efe5368a111a5e12218ddfcdf0.zip
Adding upstream patch for kernel 2.6.24 compatibility
(Portage version: 2.1.4.1)
Diffstat (limited to 'net-wireless/ipw3945')
-rw-r--r--net-wireless/ipw3945/ChangeLog10
-rw-r--r--net-wireless/ipw3945/files/ipw3945-1.2.2-kernel-2.6.24.patch21
-rw-r--r--net-wireless/ipw3945/ipw3945-1.2.2-r1.ebuild101
3 files changed, 130 insertions, 2 deletions
diff --git a/net-wireless/ipw3945/ChangeLog b/net-wireless/ipw3945/ChangeLog
index 20367bba39af..2160af8e34ef 100644
--- a/net-wireless/ipw3945/ChangeLog
+++ b/net-wireless/ipw3945/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-wireless/ipw3945
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/ipw3945/ChangeLog,v 1.37 2007/12/06 23:58:20 opfer Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/ipw3945/ChangeLog,v 1.38 2008/02/11 15:45:20 lack Exp $
+
+*ipw3945-1.2.2-r1 (11 Feb 2008)
+
+ 11 Feb 2008; Jim Ramsay <lack@gentoo.org>
+ +files/ipw3945-1.2.2-kernel-2.6.24.patch, +ipw3945-1.2.2-r1.ebuild:
+ Added upstream patch for building with linux kernel 2.6.24
06 Dec 2007; Christian Faulhammer <opfer@gentoo.org> ipw3945-1.2.2.ebuild:
stable x86, bug 197806
diff --git a/net-wireless/ipw3945/files/ipw3945-1.2.2-kernel-2.6.24.patch b/net-wireless/ipw3945/files/ipw3945-1.2.2-kernel-2.6.24.patch
new file mode 100644
index 000000000000..27f7304d7f01
--- /dev/null
+++ b/net-wireless/ipw3945/files/ipw3945-1.2.2-kernel-2.6.24.patch
@@ -0,0 +1,21 @@
+--- ipw3945.h.orig 2007-07-31 09:53:39.000000000 +0300
++++ ipw3945.h 2007-12-23 04:09:59.000000000 +0200
+@@ -2414,6 +2414,18 @@ enum {
+ #define IPW_ORD_TABLE_7_MASK 0x0000F700
+
+ /*
++ * For backword Kernel compatibility (after 2.6.24)
++ */
++#if !defined(MAC_ARG)
++#define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]
++#endif
++
++#if !defined(SET_MODULE_OWNER)
++#define SET_MODULE_OWNER(dev) do { } while (0)
++#endif
++
++
++/*
+ * Table 0 Entries (all entries are 32 bits)
+ */
+ enum {
diff --git a/net-wireless/ipw3945/ipw3945-1.2.2-r1.ebuild b/net-wireless/ipw3945/ipw3945-1.2.2-r1.ebuild
new file mode 100644
index 000000000000..1f809a62eb5b
--- /dev/null
+++ b/net-wireless/ipw3945/ipw3945-1.2.2-r1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/ipw3945/ipw3945-1.2.2-r1.ebuild,v 1.1 2008/02/11 15:45:20 lack Exp $
+
+inherit linux-mod eutils
+
+S=${WORKDIR}/${P/_pre/-pre}
+
+UCODE_VERSION="1.14.2"
+DAEMON_VERSION="1.7.22"
+
+DESCRIPTION="Driver for the Intel PRO/Wireless 3945ABG miniPCI express adapter"
+HOMEPAGE="http://ipw3945.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P/_pre/-pre}.tgz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="debug"
+RDEPEND=">=net-wireless/ipw3945-ucode-${UCODE_VERSION}
+ >=net-wireless/ipw3945d-${DAEMON_VERSION}"
+
+BUILD_TARGETS="all"
+MODULE_NAMES="ipw3945(net/wireless:)"
+MODULESD_IPW3945_DOCS="README.ipw3945"
+KV_OBJ="ko"
+
+CONFIG_CHECK="WIRELESS_EXT FW_LOADER IEEE80211 IEEE80211_CRYPT_CCMP IEEE80211_CRYPT_TKIP"
+ERROR_FW_LOADER="${P} requires Hotplug firmware loading support (CONFIG_FW_LOADER)."
+ERROR_IEEE80211="${P} requires support for Generic IEEE 802.11 Networking Stack (CONFIG_IEEE80211)."
+
+pkg_setup() {
+ if kernel_is 2 4; then
+ die "${P} does not support building against kernel 2.4.x"
+ fi
+
+ if kernel_is lt 2 6 18; then
+ die "${P} needs a kernel >=2.6.18! Please set your KERNEL_DIR or /usr/src/linux suitably"
+ fi
+
+ linux-mod_pkg_setup
+
+ BUILD_PARAMS="KSRC=${KV_DIR} KSRC_OUTPUT=${KV_OUT_DIR} SHELL=/bin/bash"
+ BUILD_PARAMS="${BUILD_PARAMS} T=${T}"
+ BUILD_PARAMS="${BUILD_PARAMS} CONFIG_IPW3945_MONITOR=y CONFIG_IEEE80211_RADIOTAP=y CONFIG_IPW3945_PROMISCUOUS=y"
+ if use debug; then
+ BUILD_PARAMS="${BUILD_PARAMS} CONFIG_IPW3945_DEBUG=y"
+ else
+ BUILD_PARAMS="${BUILD_PARAMS} CONFIG_IPW3945_DEBUG=n"
+ fi
+
+ # users don't read the ChangeLog and wonder why the kernel check fails
+ # (1) check if the kernel dir (/usr/src/linux) is missing ieee80211
+
+ if [[ -f ${KV_DIR}/include/net/ieee80211.h ]] && \
+ [[ -f ${KV_OUT_DIR}/include/config/ieee80211.h ]] && \
+ egrep -q "^#(un)?def.*(CONFIG_IEEE80211.*)" ${KV_OUT_DIR}/include/linux/autoconf.h; then
+ return 0
+ else
+ echo
+ ewarn "${CATEGORY}/${PF} does NOT use net-wireless/ieee80211 any more."
+ ewarn "We are now relying on the in-kernel ieee80211 instead."
+ echo
+ eerror "Please remove net-wireless/ieee80211 using emerge, and remerge"
+ eerror "your current kernel (${KV_FULL}), as it has been altered"
+ eerror "by net-wireless/ieee80211."
+ die "Incompatible ieee80211 subsystem detected in ${KV_FULL}"
+ fi
+}
+
+src_unpack() {
+ unpack ${P/_pre/-pre}.tgz
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-build.patch"
+ epatch "${FILESDIR}/${P}-kernel-2.6.24.patch"
+}
+
+src_install() {
+ linux-mod_src_install
+ dodoc CHANGES ISSUES
+}
+
+pkg_postinst() {
+ ewarn "The ipw3945 driver is deprecated since the fully open iwl3945 driver"
+ ewarn "is present in the 2.6.24 linux kernel. Please try using the new"
+ ewarn "driver first, and help improve it by reporting any problems you may"
+ ewarn "have."
+ echo
+ elog "If you want your wireless device started up by udev, please make sure"
+ elog "you add something like this to your /etc/conf.d/net:"
+ elog "preup() {"
+ elog " if [[ \${IFACE} = \"wlan0\" ]]; then"
+ elog " sleep 3"
+ elog " fi"
+ elog " return 0"
+ elog "}"
+ elog "Otherwise, you're going to hit bug #177869 since the driver needs some"
+ elog "time to initialize and thus, baselayout is going to start it even if"
+ elog "the device isn't useable yet."
+}