Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Sukneet Basuta (8abcbc31fe04f01018f0e2d455ce4e2645216e5d)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Sukneet Basuta <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Sukneet Basuta (8abcbc31fe04f01018f0e2d455ce4e2645216e5d)
  • Date: Fri, 18 Nov 2011 01:00:55 -0600

GIT changes to master grimoire by Sukneet Basuta <sukneet AT sourcemage.org>:

kernels/ndiswrapper/DETAILS | 6 -
kernels/ndiswrapper/HISTORY | 11 ++
kernels/ndiswrapper/PRE_BUILD | 15 +++
kernels/ndiswrapper/kernel-2.6.35.patch | 98
++++++++++++++++++++++++
kernels/ndiswrapper/kernel-2.6.36.patch | 27 ++++++
kernels/ndiswrapper/kernel-2.6.38.patch | 24 +++++
kernels/ndiswrapper/kernel-3.1.patch | 13 +++
kernels/ndiswrapper/ndiswrapper-1.56.tar.gz.sig |binary
8 files changed, 189 insertions(+), 5 deletions(-)

New commits:
commit 8abcbc31fe04f01018f0e2d455ce4e2645216e5d
Author: Sukneet Basuta <sukneet AT sourcemage.org>
Commit: Sukneet Basuta <sukneet AT sourcemage.org>

ndiswrapper: => 1.56
switched to gpg signing
PRE_BUILD: patch to fix for kernel versions, see below
fix regex to accecpt kernel >=3.0
fix module dir
kernel-2.6.35.patch: added, fix for kernels >=2.6.35
kernel-2.6.36.patch: added, fix for kernels >=2.6.36
kernel-2.6.38.patch: added, fix for kernels >=2.6.36
kernel-3.1.patch: added, fix for kernels >= 3.1

diff --git a/kernels/ndiswrapper/DETAILS b/kernels/ndiswrapper/DETAILS
index ac6e74b..84b0553 100755
--- a/kernels/ndiswrapper/DETAILS
+++ b/kernels/ndiswrapper/DETAILS
@@ -11,17 +11,15 @@ SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-svn/$SPELL

SOURCE_URL[0]=svn://ndiswrapper.svn.sourceforge.net/svnroot/ndiswrapper/trunk:ndiswrapper
SOURCE_IGNORE=volatile
else
- VERSION=1.54
+ VERSION=1.56
SOURCE=$SPELL-$VERSION.tar.gz
SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
SOURCE_URL[0]=$SOURCEFORGE_URL/$SPELL/$SOURCE
-
SOURCE_HASH=sha512:cab670df160b4ad89ad7a21a56d552a43868c8a87f44fbd97a1524d60dd2736342371dcdd6fffbf9043043b644c3a5df4602f1f60074e2c6f97342a13db40b6a
-# SOURCE_GPG="gurus.gpg:$SOURCE.sig:WORKS_FOR_ME"
+ SOURCE_GPG="gurus.gpg:$SOURCE.sig:WORKS_FOR_ME"
fi
WEB_SITE=http://$SPELL.sf.net/
KEYWORDS="ndis driver"
ENTERED=20040417
- PATCHLEVEL=1
SHORT='Kernel module to load NDIS (W%nd&ws network driver API)
drivers'
cat << EOF
Some vendors refuse to release specs or even a binary linux-driver for their
diff --git a/kernels/ndiswrapper/HISTORY b/kernels/ndiswrapper/HISTORY
index 7c18419..54dbedc 100644
--- a/kernels/ndiswrapper/HISTORY
+++ b/kernels/ndiswrapper/HISTORY
@@ -1,3 +1,14 @@
+2011-11-18 Sukneet Basuta <sukneet AT sourcemage.org>
+ * DETAILS: updated spell to 1.56
+ switched to gpg signing
+ * PRE_BUILD: patch to fix for kernel versions, see below
+ fix regex to accecpt kernel >=3.0
+ fix module dir
+ * kernel-2.6.35.patch: added, fix for kernels >=2.6.35
+ * kernel-2.6.36.patch: added, fix for kernels >=2.6.36
+ * kernel-2.6.38.patch: added, fix for kernels >=2.6.36
+ * kernel-3.1.patch: added, fix for kernels >= 3.1
+
2011-10-14 Bor Kraljič <pyrobor AT ver.si>
* DETAILS: fixed long description wrap (scripted)

diff --git a/kernels/ndiswrapper/PRE_BUILD b/kernels/ndiswrapper/PRE_BUILD
index 1ec2ffd..52d4d1f 100755
--- a/kernels/ndiswrapper/PRE_BUILD
+++ b/kernels/ndiswrapper/PRE_BUILD
@@ -1,2 +1,15 @@
[[ "$$NDIS_SVN" == "y" ]] && mkdir $BUILD_DIRECTORY/ndiswrapper-svn
-default_pre_build
+default_pre_build &&
+cd $SOURCE_DIRECTORY &&
+
+# following is taken from ArchLinux
+patch -p1 < $SPELL_DIRECTORY/kernel-2.6.35.patch &&
+patch -p1 < $SPELL_DIRECTORY/kernel-2.6.36.patch &&
+patch -p2 < $SPELL_DIRECTORY/kernel-2.6.38.patch &&
+patch -p1 < $SPELL_DIRECTORY/kernel-3.1.patch &&
+
+# fix regex to accept kernel version 3.x
+sed -i "/uname/s/\/.*\//\/(\\\d+)\\\.(\\\d+)\//" utils/ndiswrapper &&
+
+# fix module dir
+sed -i "s|misc|kernel/drivers/net/wireless/$pkgname|" driver/Makefile
diff --git a/kernels/ndiswrapper/kernel-2.6.35.patch
b/kernels/ndiswrapper/kernel-2.6.35.patch
new file mode 100644
index 0000000..1cfdab2
--- /dev/null
+++ b/kernels/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/kernels/ndiswrapper/kernel-2.6.36.patch
b/kernels/ndiswrapper/kernel-2.6.36.patch
new file mode 100644
index 0000000..63de303
--- /dev/null
+++ b/kernels/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/kernels/ndiswrapper/kernel-2.6.38.patch
b/kernels/ndiswrapper/kernel-2.6.38.patch
new file mode 100644
index 0000000..6fdb1e8
--- /dev/null
+++ b/kernels/ndiswrapper/kernel-2.6.38.patch
@@ -0,0 +1,24 @@
+--- trunk/ndiswrapper/driver/wrapndis.c 2010/09/13 09:36:56 2728
++++ trunk/ndiswrapper/driver/wrapndis.c 2011/02/14 17:00:00 2729
+@@ -13,16 +13,16 @@
+ *
+ */
+
+-#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 "ndis.h"
++#include "iw_ndis.h"
++#include "pnp.h"
++#include "loader.h"
++#include "wrapndis.h"
+ #include "wrapper.h"
+
+ /* Functions callable from the NDIS driver */
diff --git a/kernels/ndiswrapper/kernel-3.1.patch
b/kernels/ndiswrapper/kernel-3.1.patch
new file mode 100644
index 0000000..e23d586
--- /dev/null
+++ b/kernels/ndiswrapper/kernel-3.1.patch
@@ -0,0 +1,13 @@
+--- ndiswrapper-1.56/driver/ntoskernel.h 2010-02-11 02:09:32.000000000
+0000
++++ ndiswrapper-1.56/driver/ntoskernel.h 2011-11-09 15:39:14.640555480
+0000
+@@ -275,10 +275,6 @@
+ #define PM_EVENT_SUSPEND 2
+ #endif
+
+-#if !defined(HAVE_NETDEV_PRIV)
+-#define netdev_priv(dev) ((dev)->priv)
+-#endif
+-
+ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18)
+ #define ISR_PT_REGS_PARAM_DECL
+ #define ISR_PT_REGS_ARG
diff --git a/kernels/ndiswrapper/ndiswrapper-1.56.tar.gz.sig
b/kernels/ndiswrapper/ndiswrapper-1.56.tar.gz.sig
new file mode 100644
index 0000000..d4ac23a
Binary files /dev/null and b/kernels/ndiswrapper/ndiswrapper-1.56.tar.gz.sig
differ



  • [SM-Commit] GIT changes to master grimoire by Sukneet Basuta (8abcbc31fe04f01018f0e2d455ce4e2645216e5d), Sukneet Basuta, 11/18/2011

Archive powered by MHonArc 2.6.24.

Top of Page