From f888b880c8fe578677b0e6b541e7441feb11615c Mon Sep 17 00:00:00 2001 From: Stefan Briesenick Date: Sun, 10 Dec 2006 23:36:55 +0000 Subject: [PATCH] patches for kernel 2.6.19 + SMP fixes + support for newer sticks. Package-Manager: portage-2.1.2_rc2-r5 --- net-wireless/fwlanusb/ChangeLog | 9 +- net-wireless/fwlanusb/Manifest | 19 +- .../files/digest-fwlanusb-0.09.00_beta-r2 | 3 + .../fwlanusb-0.09.00_beta-kernel_2.6.19.diff | 184 ++++++++++++++++++ .../fwlanusb/fwlanusb-0.09.00_beta-r2.ebuild | 62 ++++++ 5 files changed, 272 insertions(+), 5 deletions(-) create mode 100644 net-wireless/fwlanusb/files/digest-fwlanusb-0.09.00_beta-r2 create mode 100644 net-wireless/fwlanusb/files/fwlanusb-0.09.00_beta-kernel_2.6.19.diff create mode 100644 net-wireless/fwlanusb/fwlanusb-0.09.00_beta-r2.ebuild 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 + +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/Manifest b/net-wireless/fwlanusb/Manifest index 7e38f5a264b3..a8c971a5c455 100644 --- a/net-wireless/fwlanusb/Manifest +++ b/net-wireless/fwlanusb/Manifest @@ -2,19 +2,27 @@ AUX fwlanusb-0.09.00_beta-kernel_2.6.17.diff 1555 RMD160 83a9eb83a2970fdf3795779 MD5 98dd9ae7325e85bf024fdce64c42a71f files/fwlanusb-0.09.00_beta-kernel_2.6.17.diff 1555 RMD160 83a9eb83a2970fdf3795779dfd2f8d666956b55a files/fwlanusb-0.09.00_beta-kernel_2.6.17.diff 1555 SHA256 9759831295ad7cd8db72df8f7b1833cf32bfeb4d40fac03118c7167748773a79 files/fwlanusb-0.09.00_beta-kernel_2.6.17.diff 1555 +AUX fwlanusb-0.09.00_beta-kernel_2.6.19.diff 6269 RMD160 9779e7a9177d8ecc8b5f90566ebee48cd0766f1b SHA1 fc6bb2d766b7d13872be247b73c65794b1d85e01 SHA256 0b5d0a3a9614266d938ea57fa4554146f05b1f60fc634abc6fb336ff818b6d29 +MD5 0728ef8a3de85c14697d029740444914 files/fwlanusb-0.09.00_beta-kernel_2.6.19.diff 6269 +RMD160 9779e7a9177d8ecc8b5f90566ebee48cd0766f1b files/fwlanusb-0.09.00_beta-kernel_2.6.19.diff 6269 +SHA256 0b5d0a3a9614266d938ea57fa4554146f05b1f60fc634abc6fb336ff818b6d29 files/fwlanusb-0.09.00_beta-kernel_2.6.19.diff 6269 DIST fwlanusb-suse10.0-0.09.00-beta.tar.gz 310892 RMD160 4e9a7df157ba6c56512fcc3b25929f776782a3ef SHA1 6f238765c51682be9154d74ee0b3d9921bcd203f SHA256 9992d44e3fbc9931bd847349c99221db1b79f6187cbf12cb7859b34fa488e038 EBUILD fwlanusb-0.09.00_beta-r1.ebuild 1601 RMD160 f74fb5e3cbc2d731d61e02eec808625137ae3fd9 SHA1 7a5f0dd718c01c638dc4179d50ff8f1406db3fea SHA256 0b440647ddec29feeea5a0ec7a50070fc2e77ac8a9eb8e71dc58f7b80205671a MD5 72e2743c1be6a094c804a3fe3651b3c5 fwlanusb-0.09.00_beta-r1.ebuild 1601 RMD160 f74fb5e3cbc2d731d61e02eec808625137ae3fd9 fwlanusb-0.09.00_beta-r1.ebuild 1601 SHA256 0b440647ddec29feeea5a0ec7a50070fc2e77ac8a9eb8e71dc58f7b80205671a fwlanusb-0.09.00_beta-r1.ebuild 1601 +EBUILD fwlanusb-0.09.00_beta-r2.ebuild 1488 RMD160 4866b1ddc466d556b6d254bf0bff729771d94f64 SHA1 0bd1cadd856d3f51c87d1fc1f8eae5e135ca29cd SHA256 d14000c024a91a8f0fba055ec287764b3701a66da4982e58309033b2d895572e +MD5 74a2a27857931550d8b1775535280e48 fwlanusb-0.09.00_beta-r2.ebuild 1488 +RMD160 4866b1ddc466d556b6d254bf0bff729771d94f64 fwlanusb-0.09.00_beta-r2.ebuild 1488 +SHA256 d14000c024a91a8f0fba055ec287764b3701a66da4982e58309033b2d895572e fwlanusb-0.09.00_beta-r2.ebuild 1488 EBUILD fwlanusb-0.09.00_beta.ebuild 1627 RMD160 8ea360363408513ce24dd091889c121f4c246f75 SHA1 c2ab63379671847173f50eaf170fdb25c38e6c9b SHA256 d0008b8ec32283fffb4c51b58284ecec4fd4fcf723ea06a63dd59f756bf5ce4e MD5 71d981f08178df2fad6205c95ed75ff1 fwlanusb-0.09.00_beta.ebuild 1627 RMD160 8ea360363408513ce24dd091889c121f4c246f75 fwlanusb-0.09.00_beta.ebuild 1627 SHA256 d0008b8ec32283fffb4c51b58284ecec4fd4fcf723ea06a63dd59f756bf5ce4e fwlanusb-0.09.00_beta.ebuild 1627 -MISC ChangeLog 858 RMD160 d4687a2ae7b9ee5bde3eab1bc8f428a2be29c1cd SHA1 cba07a9ff427e4ea48d7fbf0dc9f039211fa960f SHA256 623b0638dcdc202510fabab3d2e12593a14c24316a09176739c75ecab240a29c -MD5 5c74f1671da55f0fb7a5a5ed3cc5aa61 ChangeLog 858 -RMD160 d4687a2ae7b9ee5bde3eab1bc8f428a2be29c1cd ChangeLog 858 -SHA256 623b0638dcdc202510fabab3d2e12593a14c24316a09176739c75ecab240a29c ChangeLog 858 +MISC ChangeLog 1110 RMD160 9809870ac21537c3196cee61de4e871036a6d45c SHA1 eaa7053ac0b407c1b46f8cc34bedd54672ffc166 SHA256 8be80a7cf6e0033a05bc78b52b50f1bba8b99d25cef3d62850306389e7e5e223 +MD5 b25ae749769dec798f056c57970fd0b9 ChangeLog 1110 +RMD160 9809870ac21537c3196cee61de4e871036a6d45c ChangeLog 1110 +SHA256 8be80a7cf6e0033a05bc78b52b50f1bba8b99d25cef3d62850306389e7e5e223 ChangeLog 1110 MISC metadata.xml 355 RMD160 04be52e18954bd08fee631e86230ca8cf3a02edd SHA1 dda94cfbcee59760c3fc77d244e2361dca61f7a9 SHA256 ada38d9fb962bf9f7e4800aa0737d07304384ec646004ca1835d12d531a6e469 MD5 8a901bb85365cd55103767ce2d39ed22 metadata.xml 355 RMD160 04be52e18954bd08fee631e86230ca8cf3a02edd metadata.xml 355 @@ -25,3 +33,6 @@ SHA256 2aa9b3c2308c3b8e3e5a1d1aa4f5708610f4d12ab492d0f29f11baeeed3f8faf files/di MD5 ee84699c4b84788d0ba805885d4327a0 files/digest-fwlanusb-0.09.00_beta-r1 292 RMD160 9085a3f95d32d29d1185a87f6c537c9bc48ed665 files/digest-fwlanusb-0.09.00_beta-r1 292 SHA256 2aa9b3c2308c3b8e3e5a1d1aa4f5708610f4d12ab492d0f29f11baeeed3f8faf files/digest-fwlanusb-0.09.00_beta-r1 292 +MD5 ee84699c4b84788d0ba805885d4327a0 files/digest-fwlanusb-0.09.00_beta-r2 292 +RMD160 9085a3f95d32d29d1185a87f6c537c9bc48ed665 files/digest-fwlanusb-0.09.00_beta-r2 292 +SHA256 2aa9b3c2308c3b8e3e5a1d1aa4f5708610f4d12ab492d0f29f11baeeed3f8faf files/digest-fwlanusb-0.09.00_beta-r2 292 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 + #include + #include + #include +@@ -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 + #include ++#include + #include + #include + #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 +} -- 2.26.2