[arch-commits] Commit in ndiswrapper/trunk (3 files)

Tobias Powalowski tpowa at archlinux.org
Wed Aug 4 15:23:47 EDT 2010


    Date: Wednesday, August 4, 2010 @ 15:23:47
  Author: tpowa
Revision: 86798

upgpkg: ndiswrapper 1.56-4
bump to new major kernel

Added:
  ndiswrapper/trunk/kernel-2.6.35.patch
Modified:
  ndiswrapper/trunk/PKGBUILD
  ndiswrapper/trunk/ndiswrapper.install

---------------------+
 PKGBUILD            |   20 +++++-----
 kernel-2.6.35.patch |   98 ++++++++++++++++++++++++++++++++++++++++++++++++++
 ndiswrapper.install |    6 +--
 3 files changed, 112 insertions(+), 12 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-08-04 16:10:55 UTC (rev 86797)
+++ PKGBUILD	2010-08-04 19:23:47 UTC (rev 86798)
@@ -2,24 +2,24 @@
 #Maintainer: Tobias Powalowski <tpowa at archlinux.org>
 
 pkgname=ndiswrapper
-_kernver=2.6.34-ARCH
+_kernver=2.6.35-ARCH
 pkgver=1.56
-pkgrel=3
+pkgrel=4
 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.34' 'kernel26<2.6.35')
-makedepends=('kernel26-headers>=2.6.34' 'kernel26-headers<2.6.35')
-source=(http://downloads.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-$pkgver.tar.gz)
-md5sums=('1431f7ed5f8e92e752d330bbb3aed333')
-
+depends=("ndiswrapper-utils=$pkgver" 'kernel26>=2.6.35' 'kernel26<2.6.36')
+makedepends=('kernel26-headers>=2.6.35' 'kernel26-headers<2.6.36')
+source=(http://downloads.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-$pkgver.tar.gz
+        kernel-2.6.35.patch)
 build()
 {
   cd $srcdir/ndiswrapper-$pkgver/driver
-  make KVERS=$_kernver || return 1
-  make DESTDIR=$pkgdir KVERS=$_kernver install || return 1
+  patch -Np2 -i $startdir/kernel-2.6.35.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
@@ -29,3 +29,5 @@
   rm -r $pkgdir/lib/modules/$_kernver/misc/
 }
 
+md5sums=('1431f7ed5f8e92e752d330bbb3aed333'
+         '0a03d613b1fd545a75c5dd1a7c2aaec4')

Added: kernel-2.6.35.patch
===================================================================
--- kernel-2.6.35.patch	                        (rev 0)
+++ kernel-2.6.35.patch	2010-08-04 19:23:47 UTC (rev 86798)
@@ -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;

Modified: ndiswrapper.install
===================================================================
--- ndiswrapper.install	2010-08-04 16:10:55 UTC (rev 86797)
+++ ndiswrapper.install	2010-08-04 19:23:47 UTC (rev 86798)
@@ -2,7 +2,7 @@
 post_install()
 {
   ndiswrapper -m
-  KERNEL_VERSION='2.6.34-ARCH'
+  KERNEL_VERSION='2.6.35-ARCH'
   depmod -ae $KERNEL_VERSION > /dev/null 2>&1 
 }
 
@@ -11,13 +11,13 @@
 post_upgrade()
 {
   ndiswrapper -m
-  KERNEL_VERSION='2.6.34-ARCH'
+  KERNEL_VERSION='2.6.35-ARCH'
   depmod -ae $KERNEL_VERSION > /dev/null 2>&1 
 }
 
 # arg 1:  the old package version
 post_remove()
 {
-  KERNEL_VERSION='2.6.34-ARCH'
+  KERNEL_VERSION='2.6.35-ARCH'
   depmod -ae $KERNEL_VERSION > /dev/null 2>&1
 }



More information about the arch-commits mailing list