Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=kernel39.git;a=commitdiff;h=ddaa1215b0672d7486910283726256de6db96c9a

commit ddaa1215b0672d7486910283726256de6db96c9a
Author: James Buren <r...@frugalware.org>
Date:   Fri May 20 12:35:15 2011 -0500

ndiswrapper-1.56-23-x86_64
* rebuild with kernel 2.6.39
* fix kernel patches

diff --git a/source/network/ndiswrapper/FrugalBuild 
b/source/network/ndiswrapper/FrugalBuild
index 89898ef..2df1fa8 100644
--- a/source/network/ndiswrapper/FrugalBuild
+++ b/source/network/ndiswrapper/FrugalBuild
@@ -4,7 +4,7 @@

pkgname=ndiswrapper
pkgver=1.56
-pkgrel=22
+pkgrel=23
pkgdesc="Wrapper for using Windows drivers for some wireless cards"
_F_kernelmod_scriptlet=$pkgname.install
Finclude kernel-module sourceforge
@@ -12,13 +12,12 @@ depends=(${depends[@]} 'pciutils' 'wireless_tools')
groups=('network')
archs=('i686' 'x86_64')
source=("${source[@]}" README.Frugalware ndiswrapper-detect-fix-x86_64.patch \
-       kernel-2.6.3{5,6}.patch \
-       
http://gitorious.org/chakra-packages/core/blobs/raw/testing/ndiswrapper/kernel-2.6.38.patch)
+       
http://gitorious.org/chakra-packages/core/blobs/raw/testing/ndiswrapper/kernel-2.6.{35,36,38}.patch)
sha1sums=('c461cf8e2c1f9e1f87e2a5c5e717f13d2fef5364' \
'c3f24143cb9814326a2c0c3cbc8d58d953bac268' \
'7e46cc4bb72520d911f256748e8c3936498f001b' \
'57d2cd99b8a2dc96ec8b136787f947c0426ad992' \
-          '41e486d736b9423c73efd35d604a4e6a83eed7bd' \
+          'cb737ccbfe6620b2cbec78838e63e77a5cda2b71' \
'6cc91a537cf5a7d9989ba2e1dd73fc6f0724927b')

build()
diff --git a/source/network/ndiswrapper/kernel-2.6.35.patch 
b/source/network/ndiswrapper/kernel-2.6.35.patch
deleted file mode 100644
index 1cfdab2..0000000
--- a/source/network/ndiswrapper/kernel-2.6.35.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-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/source/network/ndiswrapper/kernel-2.6.36.patch 
b/source/network/ndiswrapper/kernel-2.6.36.patch
deleted file mode 100644
index 80d4723..0000000
--- a/source/network/ndiswrapper/kernel-2.6.36.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-
-BKL is going away...
-
-Push the locking down to the driver.
-
-Signed-off-by: Thomas Backlund <t...@mandriva.org>
-
-diff -Nurp ndiswrapper-1.56.orig/driver/loader.c 
ndiswrapper-1.56/driver/loader.c
---- ndiswrapper-1.56.orig/driver/loader.c      2010-02-11 04:09:32.000000000 
+0200
-+++ ndiswrapper-1.56/driver/loader.c   2010-10-02 18:57:56.971689617 +0300
-@@ -21,6 +21,9 @@
- #include <linux/module.h>
- #include <linux/kmod.h>
- #include <linux/miscdevice.h>
-+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35)
-+#include <linux/smp_lock.h>
-+#endif
- #include <asm/uaccess.h>
-
- /*
-@@ -750,7 +753,11 @@ struct wrap_device *get_wrap_device(void
- }
-
- /* called with loader_mutex is down */
-+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35)
-+static long wrapper_ioctl(struct file *file,
-+#else
- static int wrapper_ioctl(struct inode *inode, struct file *file,
-+#endif
-                        unsigned int cmd, unsigned long arg)
- {
-       struct load_driver *load_driver;
-@@ -759,6 +766,9 @@ static int wrapper_ioctl(struct inode *i
-       int ret;
-       void __user *addr = (void __user *)arg;
-
-+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35)
-+      lock_kernel();
-+#endif
-       ENTER1("cmd: %u", cmd);
-
-       ret = 0;
-@@ -820,6 +830,9 @@ static int wrapper_ioctl(struct inode *i
-               break;
-       }
-       complete(&loader_complete);
-+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35)
-+      unlock_kernel();
-+#endif
-       EXIT1(return ret);
- }
-
-@@ -831,7 +844,11 @@ static int wrapper_ioctl_release(struct
-
- static struct file_operations wrapper_fops = {
-       .owner          = THIS_MODULE,
-+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35)
-+      .unlocked_ioctl = wrapper_ioctl,
-+#else
-       .ioctl          = wrapper_ioctl,
-+#endif
-       .release        = wrapper_ioctl_release,
- };
-
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to