diff options
Diffstat (limited to 'abs/not_built/core/ndiswrapper')
-rw-r--r-- | abs/not_built/core/ndiswrapper/PKGBUILD | 42 | ||||
-rw-r--r-- | abs/not_built/core/ndiswrapper/kernel-2.6.35.patch | 98 | ||||
-rw-r--r-- | abs/not_built/core/ndiswrapper/kernel-2.6.36.patch | 27 | ||||
-rw-r--r-- | abs/not_built/core/ndiswrapper/ndiswrapper.install | 23 | ||||
-rw-r--r-- | abs/not_built/core/ndiswrapper/ndiswrapper_kernel-2.6.38.patch | 24 |
5 files changed, 214 insertions, 0 deletions
diff --git a/abs/not_built/core/ndiswrapper/PKGBUILD b/abs/not_built/core/ndiswrapper/PKGBUILD new file mode 100644 index 0000000..9bc90fd --- /dev/null +++ b/abs/not_built/core/ndiswrapper/PKGBUILD @@ -0,0 +1,42 @@ +#$Id: PKGBUILD 105330 2011-01-07 20:49:19Z tpowa $ +#Maintainer: Tobias Powalowski <tpowa@archlinux.org> + +pkgname=ndiswrapper +_kernver=2.6.39-LinHES +pkgver=1.56 +pkgrel=8 +pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by vendors. For stock arch 2.6 kernel." +license=('GPL') +arch=(i686 x86_64) +url="http://ndiswrapper.sourceforge.net" +install="ndiswrapper.install" +depends=("ndiswrapper-utils=$pkgver" 'kernel26>=2.6.39' 'kernel26<2.6.40') +makedepends=('kernel26-headers>=2.6.39' 'kernel26-headers<2.6.40') +source=(http://downloads.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-$pkgver.tar.gz + kernel-2.6.35.patch + kernel-2.6.36.patch + ndiswrapper_kernel-2.6.38.patch) +build() +{ + cd $srcdir/ndiswrapper-$pkgver/driver + patch -Np2 -i $startdir/kernel-2.6.35.patch + patch -Np2 -i $startdir/kernel-2.6.36.patch + patch -Np2 -i $startdir/ndiswrapper_kernel-2.6.38.patch + make KVERS=$_kernver + make DESTDIR=$pkgdir KVERS=$_kernver install + rm $pkgdir/lib/modules/$_kernver/modules.* #wtf? + + sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/*.install + # move it to correct kernel directory + mkdir -p $pkgdir/lib/modules/$_kernver/kernel/drivers/net/wireless/ndiswrapper + mv $pkgdir/lib/modules/$_kernver/misc/* $pkgdir/lib/modules/$_kernver/kernel/drivers/net/wireless/ndiswrapper/ + rm -r $pkgdir/lib/modules/$_kernver/misc/ +} + +md5sums=('1431f7ed5f8e92e752d330bbb3aed333' + '0a03d613b1fd545a75c5dd1a7c2aaec4' + 'cc16ed13449f17e90865df688b180b2c') +md5sums=('1431f7ed5f8e92e752d330bbb3aed333' + '0a03d613b1fd545a75c5dd1a7c2aaec4' + 'cc16ed13449f17e90865df688b180b2c' + '2499a87276ae0c8ce39bea6ef942d926') diff --git a/abs/not_built/core/ndiswrapper/kernel-2.6.35.patch b/abs/not_built/core/ndiswrapper/kernel-2.6.35.patch new file mode 100644 index 0000000..1cfdab2 --- /dev/null +++ b/abs/not_built/core/ndiswrapper/kernel-2.6.35.patch @@ -0,0 +1,98 @@ +diff -uNr ndiswrapper-1.56.old/driver/usb.c ndiswrapper-1.56/driver/usb.c +--- ndiswrapper-1.56.old/driver/usb.c 2010-02-10 18:09:32.000000000 -0800 ++++ ndiswrapper-1.56/driver/usb.c 2010-07-25 02:29:25.442145846 -0700 +@@ -191,9 +191,15 @@ + if (wrap_urb->flags & WRAP_URB_COPY_BUFFER) { + USBTRACE("freeing DMA buffer for URB: %p %p", + urb, urb->transfer_buffer); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) + usb_buffer_free(IRP_WRAP_DEVICE(irp)->usb.udev, ++ urb->transfer_buffer_length, ++ urb->transfer_buffer, urb->transfer_dma); ++#else ++ usb_free_coherent(IRP_WRAP_DEVICE(irp)->usb.udev, + urb->transfer_buffer_length, + urb->transfer_buffer, urb->transfer_dma); ++#endif + } + if (urb->setup_packet) + kfree(urb->setup_packet); +@@ -303,9 +309,16 @@ + || PageHighMem(virt_to_page(buf)) + #endif + )) { ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) + urb->transfer_buffer = +- usb_buffer_alloc(wd->usb.udev, buf_len, alloc_flags, ++ usb_buffer_alloc(wd->usb.udev, buf_len, alloc_flags, ++ &urb->transfer_dma); ++#else ++ urb->transfer_buffer = ++ usb_alloc_coherent(wd->usb.udev, buf_len, alloc_flags, + &urb->transfer_dma); ++#endif + if (!urb->transfer_buffer) { + WARNING("couldn't allocate dma buf"); + IoAcquireCancelSpinLock(&irp->cancel_irql); +diff -uNr ndiswrapper-1.56.old/driver/wrapndis.c ndiswrapper-1.56/driver/wrapndis.c +--- ndiswrapper-1.56.old/driver/wrapndis.c 2010-02-10 18:09:32.000000000 -0800 ++++ ndiswrapper-1.56/driver/wrapndis.c 2010-07-25 02:06:13.184631757 -0700 +@@ -936,6 +936,10 @@ + EXIT2(return); + } + ++#ifndef netdev_mc_count ++#define netdev_mc_count(net_dev) net_dev->mc_count ++#endif ++ + static void set_multicast_list(struct ndis_device *wnd) + { + struct net_device *net_dev; +@@ -950,20 +954,26 @@ + packet_filter |= NDIS_PACKET_TYPE_PROMISCUOUS | + NDIS_PACKET_TYPE_ALL_LOCAL; + } else if (net_dev->flags & IFF_ALLMULTI || +- net_dev->mc_count > wnd->multicast_size) { ++ netdev_mc_count(net_dev) > wnd->multicast_size) { + packet_filter |= NDIS_PACKET_TYPE_ALL_MULTICAST; + TRACE2("0x%08x", packet_filter); +- } else if (net_dev->mc_count > 0) { ++ } else if (netdev_mc_count(net_dev) > 0) { + int i, size; + char *buf; ++#ifndef netdev_for_each_mc_addr + struct dev_mc_list *mclist; +- size = min(wnd->multicast_size, net_dev->mc_count); +- TRACE2("%d, %d", wnd->multicast_size, net_dev->mc_count); ++#else ++ struct netdev_hw_addr *mclist; ++#endif ++ ++ size = min(wnd->multicast_size, netdev_mc_count(net_dev)); ++ TRACE2("%d, %d", wnd->multicast_size, netdev_mc_count(net_dev)); + buf = kmalloc(size * ETH_ALEN, GFP_KERNEL); + if (!buf) { + WARNING("couldn't allocate memory"); + EXIT2(return); + } ++#ifndef netdev_for_each_mc_addr + mclist = net_dev->mc_list; + for (i = 0; i < size && mclist; mclist = mclist->next) { + if (mclist->dmi_addrlen != ETH_ALEN) +@@ -972,6 +982,15 @@ + TRACE2(MACSTRSEP, MAC2STR(mclist->dmi_addr)); + i++; + } ++#else ++ i = 0; ++ netdev_for_each_mc_addr(mclist, net_dev){ ++ memcpy(buf + i++ * ETH_ALEN, ++ mclist->addr, ETH_ALEN); ++ TRACE2(MACSTRSEP, MAC2STR(mclist->addr)); ++ ++ } ++#endif + res = mp_set(wnd, OID_802_3_MULTICAST_LIST, buf, i * ETH_ALEN); + if (res == NDIS_STATUS_SUCCESS && i > 0) + packet_filter |= NDIS_PACKET_TYPE_MULTICAST; diff --git a/abs/not_built/core/ndiswrapper/kernel-2.6.36.patch b/abs/not_built/core/ndiswrapper/kernel-2.6.36.patch new file mode 100644 index 0000000..63de303 --- /dev/null +++ b/abs/not_built/core/ndiswrapper/kernel-2.6.36.patch @@ -0,0 +1,27 @@ +--- ndiswrapper-1.56.orig/driver/loader.c 2010-02-11 03:09:32.000000000 +0100 ++++ ndiswrapper-1.56/driver/loader.c 2010-10-24 01:38:13.000000000 +0200 +@@ -750,13 +750,13 @@ + } + + /* called with loader_mutex is down */ +-static int wrapper_ioctl(struct inode *inode, struct file *file, ++static long wrapper_unlocked_ioctl(struct file *file, + unsigned int cmd, unsigned long arg) + { + struct load_driver *load_driver; + struct load_device load_device; + struct load_driver_file load_bin_file; +- int ret; ++ long ret; + void __user *addr = (void __user *)arg; + + ENTER1("cmd: %u", cmd); +@@ -831,7 +831,7 @@ + + static struct file_operations wrapper_fops = { + .owner = THIS_MODULE, +- .ioctl = wrapper_ioctl, ++ .unlocked_ioctl = wrapper_unlocked_ioctl, + .release = wrapper_ioctl_release, + }; + diff --git a/abs/not_built/core/ndiswrapper/ndiswrapper.install b/abs/not_built/core/ndiswrapper/ndiswrapper.install new file mode 100644 index 0000000..a45a459 --- /dev/null +++ b/abs/not_built/core/ndiswrapper/ndiswrapper.install @@ -0,0 +1,23 @@ +# arg 1: the new package version +post_install() +{ + ndiswrapper -m + KERNEL_VERSION='2.6.39-LinHES' + depmod -ae $KERNEL_VERSION > /dev/null 2>&1 +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() +{ + ndiswrapper -m + KERNEL_VERSION='2.6.39-LinHES' + depmod -ae $KERNEL_VERSION > /dev/null 2>&1 +} + +# arg 1: the old package version +post_remove() +{ + KERNEL_VERSION='2.6.39-LinHES' + depmod -ae $KERNEL_VERSION > /dev/null 2>&1 +} diff --git a/abs/not_built/core/ndiswrapper/ndiswrapper_kernel-2.6.38.patch b/abs/not_built/core/ndiswrapper/ndiswrapper_kernel-2.6.38.patch new file mode 100644 index 0000000..15c4f42 --- /dev/null +++ b/abs/not_built/core/ndiswrapper/ndiswrapper_kernel-2.6.38.patch @@ -0,0 +1,24 @@ +--- ndiswrapper-1.56.old/driver/wrapndis.c (revision 2728) ++++ ndiswrapper-1.56/driver/wrapndis.c (revision 2729) +@@ -13,16 +13,16 @@ + * + */ + ++#include <linux/inetdevice.h> ++#include <linux/ip.h> ++#include <linux/tcp.h> ++#include <linux/udp.h> ++#include <linux/in.h> + #include "ndis.h" + #include "iw_ndis.h" + #include "pnp.h" + #include "loader.h" + #include "wrapndis.h" +-#include <linux/inetdevice.h> +-#include <linux/ip.h> +-#include <linux/tcp.h> +-#include <linux/udp.h> +-#include <linux/in.h> + #include "wrapper.h" + + /* Functions callable from the NDIS driver */ |