diff options
author | Stefan Briesenick <sbriesen@gentoo.org> | 2006-12-10 23:36:55 +0000 |
---|---|---|
committer | Stefan Briesenick <sbriesen@gentoo.org> | 2006-12-10 23:36:55 +0000 |
commit | 0461c5e8d7d672a4be1311c00d03dd72757b9f8e (patch) | |
tree | ec020ff716ac6fd8a5f3a5193f52862ae5ac82c8 /net-wireless/fwlanusb | |
parent | Version Bump. (diff) | |
download | gentoo-2-0461c5e8d7d672a4be1311c00d03dd72757b9f8e.tar.gz gentoo-2-0461c5e8d7d672a4be1311c00d03dd72757b9f8e.tar.bz2 gentoo-2-0461c5e8d7d672a4be1311c00d03dd72757b9f8e.zip |
patches for kernel 2.6.19 + SMP fixes + support for newer sticks.
(Portage version: 2.1.2_rc2-r5)
Diffstat (limited to 'net-wireless/fwlanusb')
4 files changed, 257 insertions, 1 deletions
diff --git a/net-wireless/fwlanusb/ChangeLog b/net-wireless/fwlanusb/ChangeLog index 9eda09774c98..37ddeefcb09b 100644 --- a/net-wireless/fwlanusb/ChangeLog +++ b/net-wireless/fwlanusb/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-wireless/fwlanusb # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/fwlanusb/ChangeLog,v 1.4 2006/08/10 22:55:46 sbriesen Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-wireless/fwlanusb/ChangeLog,v 1.5 2006/12/10 23:36:55 sbriesen Exp $ + +*fwlanusb-0.09.00_beta-r2 (10 Dec 2006) + + 10 Dec 2006; Stefan Briesenick <sbriesen@gentoo.org> + +files/fwlanusb-0.09.00_beta-kernel_2.6.19.diff, + +fwlanusb-0.09.00_beta-r2.ebuild: + patches for kernel 2.6.19 + SMP fixes + support for newer sticks. *fwlanusb-0.09.00_beta-r1 (10 Aug 2006) diff --git a/net-wireless/fwlanusb/files/digest-fwlanusb-0.09.00_beta-r2 b/net-wireless/fwlanusb/files/digest-fwlanusb-0.09.00_beta-r2 new file mode 100644 index 000000000000..49d90feb3a19 --- /dev/null +++ b/net-wireless/fwlanusb/files/digest-fwlanusb-0.09.00_beta-r2 @@ -0,0 +1,3 @@ +MD5 17a944b5ee2fb499f97ad5e77f22915e fwlanusb-suse10.0-0.09.00-beta.tar.gz 310892 +RMD160 4e9a7df157ba6c56512fcc3b25929f776782a3ef fwlanusb-suse10.0-0.09.00-beta.tar.gz 310892 +SHA256 9992d44e3fbc9931bd847349c99221db1b79f6187cbf12cb7859b34fa488e038 fwlanusb-suse10.0-0.09.00-beta.tar.gz 310892 diff --git a/net-wireless/fwlanusb/files/fwlanusb-0.09.00_beta-kernel_2.6.19.diff b/net-wireless/fwlanusb/files/fwlanusb-0.09.00_beta-kernel_2.6.19.diff new file mode 100644 index 000000000000..76cffb1c2a15 --- /dev/null +++ b/net-wireless/fwlanusb/files/fwlanusb-0.09.00_beta-kernel_2.6.19.diff @@ -0,0 +1,184 @@ +diff -Naur src.orig/buffers.c src/buffers.c +--- src.orig/buffers.c 2005-12-23 15:12:09.000000000 +0100 ++++ src/buffers.c 2006-12-11 00:25:07.000000000 +0100 +@@ -29,8 +29,8 @@ + + /*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ +-#define lock_pool(p) spin_lock_irqsave(p->lock, flags) +-#define unlock_pool(p) spin_unlock_irqrestore(p->lock, flags) ++#define lock_pool(p) spin_lock_irqsave(&p->lock, flags) ++#define unlock_pool(p) spin_unlock_irqrestore(&p->lock, flags) + + /*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ +@@ -200,7 +200,7 @@ + if (pool->ubf[ix].flag == URB_SUBMITTED) { + num++; + if (async) { +- pool->ubf[ix].urb->transfer_flags |= URB_ASYNC_UNLINK; ++ /* pool->ubf[ix].urb->transfer_flags |= URB_ASYNC_UNLINK; */ + usb_unlink_urb (pool->ubf[ix].urb); + } else { + usb_kill_urb (pool->ubf[ix].urb); +diff -Naur src.orig/driver.c src/driver.c +--- src.orig/driver.c 2005-12-23 15:12:09.000000000 +0100 ++++ src/driver.c 2006-12-11 00:07:09.000000000 +0100 +@@ -60,9 +60,15 @@ + int net_tx (struct sk_buff *skb, struct net_device *dev); + struct net_device_stats *net_stats (struct net_device *dev); + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) + static void usb_cmd_complete (struct urb *purb, struct pt_regs *ptr); + static void usb_read_complete (struct urb *purb, struct pt_regs *ptr); + static void usb_write_complete (struct urb *purb, struct pt_regs *ptr); ++#else ++static void usb_cmd_complete (struct urb *purb); ++static void usb_read_complete (struct urb *purb); ++static void usb_write_complete (struct urb *purb); ++#endif + + //static void rx_task (unsigned long data); + //static void tx_task (unsigned long data); +@@ -473,7 +479,11 @@ + + /*--U------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) + static void usb_write_complete (struct urb *purb1, struct pt_regs *ptr) { ++#else ++static void usb_write_complete (struct urb *purb1) { ++#endif + + #ifdef LOG_USB + LOG("usb_write_complete: TX URB %p completed.\n", purb1); +@@ -516,7 +526,11 @@ + + /*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) + static void usb_read_complete (struct urb *purb1, struct pt_regs *ptr) { ++#else ++static void usb_read_complete (struct urb *purb1) { ++#endif + + #ifdef LOG_USB + LOG("usb_read_complete: RX URB %p completed.\n", purb1); +@@ -597,13 +611,17 @@ + + /*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) + static void usb_cmd_complete (struct urb *purb1, struct pt_regs *ptr) { ++#else ++static void usb_cmd_complete (struct urb *purb1) { ++#endif + + #ifdef LOG_USB + LOG ("usb_cmd_complete: USB cmd complete for URB: %p\n", purb1); + #endif + +- UNUSED_ARG (ptr); ++ /* UNUSED_ARG (ptr); */ + assert (purb1 != NULL); + + os_protect_lock (wlan_card, wlan_card->system_lock); +diff -Naur src.orig/lib.c src/lib.c +--- src.orig/lib.c 2005-12-23 15:12:09.000000000 +0100 ++++ src/lib.c 2006-12-11 00:22:28.000000000 +0100 +@@ -399,7 +399,7 @@ + } + #endif + +- spin_lock_irqsave (lock_data->lock, local_flags); ++ spin_lock_irqsave (&lock_data->lock, local_flags); + lock_data->flags = local_flags; + } + +@@ -423,7 +423,7 @@ + } + #endif + +- spin_unlock_irqrestore (lock_data->lock, lock_data->flags); ++ spin_unlock_irqrestore (&lock_data->lock, lock_data->flags); + } + + /*---------------------------------------------------------------------------*\ +diff -Naur src.orig/main.c src/main.c +--- src.orig/main.c 2005-12-23 15:12:10.000000000 +0100 ++++ src/main.c 2006-12-11 00:07:09.000000000 +0100 +@@ -20,6 +20,7 @@ + * Contact: AVM GmbH, Alt-Moabit 95, 10559 Berlin, Germany, email: info@avm.de + */ + ++#include <linux/version.h> + #include <linux/kernel.h> + #include <linux/sched.h> + #include <linux/slab.h> +@@ -38,6 +39,7 @@ + #define VENDOR_ID_AVM 0x057C + #if defined (__fwlanusb__) + # define PRODUCT_ID 0x5601 ++# define PRODUCT_ID2 0x6201 + #else + # error You have to define a card identifier! + #endif +@@ -57,16 +59,22 @@ + static struct usb_device_id usb_id_table[] = { + + { USB_DEVICE(VENDOR_ID_AVM, PRODUCT_ID) }, ++ { USB_DEVICE(VENDOR_ID_AVM, PRODUCT_ID2) }, + { /* Terminating entry */ } + } ; + + struct usb_driver usb_driver = { + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)) + .owner = THIS_MODULE, ++#endif + .name = TARGET, + .id_table = usb_id_table, + .probe = fwlanusb_probe, + .disconnect = fwlanusb_disconnect, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)) ++ .no_dynamic_id = 1, ++#endif + } ; + + MODULE_DEVICE_TABLE (usb, usb_id_table); +@@ -114,7 +122,8 @@ + + /* Device identification */ + if ((VENDOR_ID_AVM != dev->descriptor.idVendor) +- || (PRODUCT_ID != dev->descriptor.idProduct)) ++ || ( (PRODUCT_ID != dev->descriptor.idProduct) ++ && (PRODUCT_ID2 != dev->descriptor.idProduct))) + { + ERROR("Unknown device!\n"); + exit_nodev: +diff -Naur src.orig/tools.h src/tools.h +--- src.orig/tools.h 2005-12-23 15:12:10.000000000 +0100 ++++ src/tools.h 2006-12-11 00:07:09.000000000 +0100 +@@ -25,6 +25,7 @@ + + #include <asm/atomic.h> + #include <linux/types.h> ++#include <linux/version.h> + #include <linux/spinlock.h> + #include <stdarg.h> + #include "defs.h" +@@ -72,12 +73,14 @@ + + /*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)) + static inline unsigned long atomic_xchg ( + volatile atomic_t * v, + unsigned value + ) { + return __xchg (value, &v->counter, sizeof (unsigned)); + } /* atomic_xchg */ ++#endif + + /*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ diff --git a/net-wireless/fwlanusb/fwlanusb-0.09.00_beta-r2.ebuild b/net-wireless/fwlanusb/fwlanusb-0.09.00_beta-r2.ebuild new file mode 100644 index 000000000000..874fa93dc69d --- /dev/null +++ b/net-wireless/fwlanusb/fwlanusb-0.09.00_beta-r2.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/fwlanusb/fwlanusb-0.09.00_beta-r2.ebuild,v 1.1 2006/12/10 23:36:55 sbriesen Exp $ + +inherit eutils linux-mod + +SUSEVER="10.0" +MY_PV="${PV//_/-}" + +DESCRIPTION="driver for the AVM FRITZ!WLAN USB stick" +HOMEPAGE="http://www.avm.de" +SRC_URI="ftp://ftp.avm.de/cardware/fritzwlanusb.stick/linux/suse.${SUSEVER}/${PN}-suse${SUSEVER}-${MY_PV}.tar.gz" + +LICENSE="as-is" +SLOT="0" +KEYWORDS="~x86" +IUSE="" + +S="${WORKDIR}/fritz" + +DEPEND="virtual/linux-sources" + +pkg_setup() { + linux-mod_pkg_setup + if ! kernel_is 2 6; then + die "This package works only with 2.6 kernel!" + fi + if ! linux_chkconfig_present NET_WIRELESS; then + die "You need a kernel with enabled NET_WIRELESS support!" + fi + BUILD_TARGETS="all" + BUILD_PARAMS="KDIR=${KV_DIR} LIBDIR=${S}/src" + MODULE_NAMES="fwlanusb(net:${S}/src)" +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # apply patches for kernels up to 2.6.19 + epatch "${FILESDIR}/${P}-kernel_2.6.19.diff" + + convert_to_m "src/Makefile" +} + +src_install() { + linux-mod_src_install + dohtml Liesmich.html +} + +pkg_postinst() { + linux-mod_pkg_postinst + elog + elog "This is a *BETA* driver! Expect everything! ;-)" + elog + elog "Current limitations:" + elog " - no WPA/WPA2 support" + elog " - no Stick & Surf function support" + elog " - creation of an ad hoc network isn't possible," + elog " you can only join an existing one." + elog +} |