Author: kwizart
Update of /cvs/free/rpms/ndiswrapper-kmod/F-14
In directory se02.es.rpmfusion.net:/tmp/cvs-serv18023/F-14
Modified Files:
.cvsignore ndiswrapper-kmod.spec sources
Added Files:
ndiswrapper-1.56-IW_AUTH_MFP.patch
ndiswrapper-1.56-driver-Makefile.patch
ndiswrapper-1.56-kernel-2.6.35-api-update-1.patch
ndiswrapper-1.56-kernel-2.6.35-api-update-2.patch
ndiswrapper-1.56-kernel-2.6.35-api-update-3.patch
ndiswrapper-1.56-loader-fix-ioctl.patch
ndiswrapper-1.56-pe_linker.patch
ndiswrapper-1.56-utils-Makefile.patch
ndiswrapper-1.56-win2lin_stubs.patch
Removed Files:
ndiswrapper-1.53-we_update.patch
ndiswrapper-poll_controller.patch
Log Message:
update to 1.56
Reviewed-by me
ndiswrapper-1.56-IW_AUTH_MFP.patch:
iw_ndis.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- NEW FILE ndiswrapper-1.56-IW_AUTH_MFP.patch ---
--- ndiswrapper-1.56/driver/iw_ndis.c 2010/02/11 01:58:44 2720
+++ ndiswrapper-1.56/driver/iw_ndis.c 2010/02/11 04:30:29 2721
@@ -1591,6 +1591,14 @@
if (wrqu->param.value)
deauthenticate(wnd);
break;
+#ifdef IW_AUTH_MFP
+ case IW_AUTH_MFP:
+ if (wrqu->param.value == IW_AUTH_MFP_DISABLED ||
+ wrqu->param.value == IW_AUTH_MFP_OPTIONAL)
+ break;
+ WARNING("MFP not implemented");
+ return -EOPNOTSUPP;
+#endif
case IW_AUTH_TKIP_COUNTERMEASURES:
case IW_AUTH_DROP_UNENCRYPTED:
case IW_AUTH_RX_UNENCRYPTED_EAPOL:
ndiswrapper-1.56-driver-Makefile.patch:
Makefile | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- NEW FILE ndiswrapper-1.56-driver-Makefile.patch ---
--- ndiswrapper-1.56/driver/Makefile 2010/02/17 11:37:06 2723
+++ ndiswrapper-1.56/driver/Makefile 2010/09/13 08:29:32 2724
@@ -25,8 +25,10 @@
# Kernel Makefile doesn't always know the exact kernel version, so we
# get it from the kernel headers instead and pass it to make.
-
+VERSION_H := $(KBUILD)/include/generated/utsrelease.h
+ifeq (,$(wildcard $(VERSION_H)))
VERSION_H := $(KBUILD)/include/linux/utsrelease.h
+endif
ifeq (,$(wildcard $(VERSION_H)))
VERSION_H := $(KBUILD)/include/linux/version.h
endif
@@ -36,6 +38,10 @@
KVERS := $(shell sed -ne 's/"//g;s/^\#define UTS_RELEASE //p' $(VERSION_H))
+ifeq (,$(KVERS))
+$(error Cannot find UTS_RELEASE in $(VERSION_H), has 'make modules_prepare' been
called?)
+endif
+
ifdef DIST_DESTDIR
DESTDIR = $(DIST_DESTDIR)
else
ndiswrapper-1.56-kernel-2.6.35-api-update-1.patch:
ntoskernel.h | 6 ++++++
1 file changed, 6 insertions(+)
--- NEW FILE ndiswrapper-1.56-kernel-2.6.35-api-update-1.patch ---
--- ndiswrapper-1.56/driver/ntoskernel.h 2010/09/13 08:43:15 2726
+++ ndiswrapper-1.56/driver/ntoskernel.h 2010/09/13 08:51:07 2727
@@ -324,6 +324,12 @@
kmem_cache_create(name, size, align, flags, NULL)
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34)
+#define netdev_mc_count(dev) ((dev)->mc_count)
+#define usb_alloc_coherent(dev, size, mem_flags, dma) (usb_buffer_alloc((dev), (size),
(mem_flags), (dma)))
+#define usb_free_coherent(dev, size, addr, dma) (usb_buffer_free((dev), (size), (addr),
(dma)))
+#endif
+
#include "winnt_types.h"
#include "ndiswrapper.h"
#include "pe_linker.h"
ndiswrapper-1.56-kernel-2.6.35-api-update-2.patch:
usb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- NEW FILE ndiswrapper-1.56-kernel-2.6.35-api-update-2.patch ---
--- ndiswrapper-1.56/driver/usb.c 2010/09/13 08:43:15 2726
+++ ndiswrapper-1.56/driver/usb.c 2010/09/13 08:51:07 2727
@@ -191,7 +191,7 @@
if (wrap_urb->flags & WRAP_URB_COPY_BUFFER) {
USBTRACE("freeing DMA buffer for URB: %p %p",
urb, urb->transfer_buffer);
- usb_buffer_free(IRP_WRAP_DEVICE(irp)->usb.udev,
+ usb_free_coherent(IRP_WRAP_DEVICE(irp)->usb.udev,
urb->transfer_buffer_length,
urb->transfer_buffer, urb->transfer_dma);
}
@@ -304,7 +304,7 @@
#endif
)) {
urb->transfer_buffer =
- usb_buffer_alloc(wd->usb.udev, buf_len, alloc_flags,
+ usb_alloc_coherent(wd->usb.udev, buf_len, alloc_flags,
&urb->transfer_dma);
if (!urb->transfer_buffer) {
WARNING("couldn't allocate dma buf");
ndiswrapper-1.56-kernel-2.6.35-api-update-3.patch:
wrapndis.c | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
--- NEW FILE ndiswrapper-1.56-kernel-2.6.35-api-update-3.patch ---
--- ndiswrapper-1.56/driver/wrapndis.c 2010/09/13 08:43:15 2726
+++ ndiswrapper-1.56/driver/wrapndis.c 2010/09/13 08:51:07 2727
@@ -950,20 +950,34 @@
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;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)
+ struct netdev_hw_addr *ha;
+#else
struct dev_mc_list *mclist;
- size = min(wnd->multicast_size, net_dev->mc_count);
- TRACE2("%d, %d", wnd->multicast_size, net_dev->mc_count);
+#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);
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)
+ i = 0;
+ netdev_for_each_mc_addr(ha, net_dev) {
+ if (i >= size)
+ break;
+ memcpy(buf + i * ETH_ALEN, ha->addr, ETH_ALEN);
+ TRACE2(MACSTRSEP, MAC2STR(ha->addr));
+ i++;
+ }
+#else
mclist = net_dev->mc_list;
for (i = 0; i < size && mclist; mclist = mclist->next) {
if (mclist->dmi_addrlen != ETH_ALEN)
@@ -972,6 +986,7 @@
TRACE2(MACSTRSEP, MAC2STR(mclist->dmi_addr));
i++;
}
+#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;
ndiswrapper-1.56-loader-fix-ioctl.patch:
loader.c | 10 ++++++++++
1 file changed, 10 insertions(+)
--- NEW FILE ndiswrapper-1.56-loader-fix-ioctl.patch ---
--- ndiswrapper-1.56/driver/loader.c 2010/09/13 08:35:26 2725
+++ ndiswrapper-1.56/driver/loader.c 2010/09/13 08:43:15 2726
@@ -750,8 +750,13 @@
}
/* called with loader_mutex is down */
+#ifdef HAVE_UNLOCKED_IOCTL
+static long wrapper_ioctl(struct file *file,
+ unsigned int cmd, unsigned long arg)
+#else
static int wrapper_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
+#endif
{
struct load_driver *load_driver;
struct load_device load_device;
@@ -831,7 +836,12 @@
static struct file_operations wrapper_fops = {
.owner = THIS_MODULE,
+
+#ifdef HAVE_UNLOCKED_IOCTL
+ .unlocked_ioctl = wrapper_ioctl,
+#else
.ioctl = wrapper_ioctl,
+#endif
.release = wrapper_ioctl_release,
};
ndiswrapper-1.56-pe_linker.patch:
pe_linker.c | 1 +
1 file changed, 1 insertion(+)
--- NEW FILE ndiswrapper-1.56-pe_linker.patch ---
--- ndiswrapper-1.56/driver/pe_linker.c 2010/02/17 11:34:05 2722
+++ ndiswrapper-1.56/driver/pe_linker.c 2010/02/17 11:37:06 2723
@@ -440,6 +440,7 @@
" %d bytes", image_size);
return -ENOMEM;
}
+ memset(image, 0, image_size);
/* Copy all the headers, ie everything before the first section. */
ndiswrapper-1.56-utils-Makefile.patch:
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE ndiswrapper-1.56-utils-Makefile.patch ---
--- ndiswrapper-1.56/utils/Makefile 2010/09/13 08:29:32 2724
+++ ndiswrapper-1.56/utils/Makefile 2010/09/13 08:35:26 2725
@@ -12,7 +12,7 @@
all: loadndisdriver
loadndisdriver: loadndisdriver.c
- $(CC) $(CFLAGS) -o $@ $<
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
clean:
rm -f *~ *.o loadndisdriver
ndiswrapper-1.56-win2lin_stubs.patch:
win2lin_stubs.S | 98 ++++++++++++++++++++++++++++++++++++++------------------
1 file changed, 68 insertions(+), 30 deletions(-)
--- NEW FILE ndiswrapper-1.56-win2lin_stubs.patch ---
--- ndiswrapper-1.56/driver/win2lin_stubs.S 2010/02/11 04:30:29 2721
+++ ndiswrapper-1.56/driver/win2lin_stubs.S 2010/02/17 11:34:05 2722
@@ -98,19 +98,33 @@
call *%r10
.endm
-# before prolog, 0(%rsp) is return address, 8(%rsp) would be arg1
-# (but it is in register) and so on, so n'th arg would be at n*8(%rsp)
-# for n > 4. But in prolog, we push 2 registers that are non-volaile in
-# Windows, but volatile in Linux. So after prolog, args are at (n+2)*8(%rsp)
+# Determine the address of the n'th windows argument after an extra linux stack
+# frame has been created to hold m arguments (i.e. rsp has been decremented).
+# If less then six arguments are used, then no extra stack frame is created
+# and m=6 must be used to obtain the correct address (see win2lin_arg5 and
+# win2lin_arg6).
+# explanation:
+# When using this macro, %rsp points to the last argument of the extra linux
+# stack frame (or to the pushed %rdi from the prolog, if less than 6 arguments
+# are used).
+# With respect to the two entries from the prolog, the return address of the
+# windows stack frame is at (2+m-6)*8(%rsp)
+# So the n'th argument (or its shadow/spill space)
+# is at (n+2 + (m-6))*8(%rsp)
-#define win2lin_win_arg(n) (n+2)*8(%rsp)
+#define win2lin_win_arg(n,m) (n+2 + (m-6))*8(%rsp)
#define win2lin_arg1 mov %rcx, %rdi
#define win2lin_arg2 mov %rdx, %rsi
#define win2lin_arg3 mov %r8, %rdx
#define win2lin_arg4 mov %r9, %rcx
-#define win2lin_arg5 mov win2lin_win_arg(5), %r8
-#define win2lin_arg6 mov win2lin_win_arg(6), %r9
+
+# Attention: win2lin_arg5 and win2lin_arg6 require %rsp to point to the last
+# entry of the prolog. So they must be used before reserving extra stack space
+# with reserve_stack!
+
+#define win2lin_arg5 mov win2lin_win_arg(5,6), %r8
+#define win2lin_arg6 mov win2lin_win_arg(6,6), %r9
.type win2lin0, @function
win2lin0:
@@ -189,23 +203,25 @@
ret
.size win2lin6, .-win2lin6
-# Allocate stack frame for Linux arguments before calling function.
+# Allocate stack frame for Linux arguments.
# First 6 args are passed through registers, so we need space for 7 and above.
-# The arguments should have been copied onto stack already.
+# The arguments should be copied onto stack after the space has been reserved.
-.macro call_lin_func_args n
+.macro reserve_stack n
sub $(\n-6)*8, %rsp
- call_lin_func
+ .endm
+
+.macro free_stack n
add $(\n-6)*8, %rsp
.endm
-# m is index of Linux arg required, n is total number of args to function
-# After stack frame is allocated, Linux arg 7 should be at 0(%rsp),
-# arg 8 should be at 1*8(%rsp) and so on. So Linux arg m should be at (m-7)*8
-# Stack frame starts at -(n-6)*8(%rsp), so before stack frame is allocated
-# Linux arg m should be at (6-n+m-7)*8(%rsp)
-#define win2lin_lin_arg(m,n) (m-1-n)*8(%rsp)
+# Determine the address of the n'th linux argument of the extra linux stackframe
+# When an extra linux stack frame is used (more than 6 arguments), then %rsp
+# points to the 7th argument. The m'th argument is at (m-7)*8(%rsp)
+
+#define win2lin_lin_arg(m) (m-7)*8(%rsp)
+
.type win2lin7, @function
win2lin7:
@@ -218,11 +234,16 @@
win2lin_arg5
win2lin_arg6
+ reserve_stack(7)
+
# copy windows argument 7 onto stack for Linux function
- mov win2lin_win_arg(7), %r11
- mov %r11, win2lin_lin_arg(7,7)
+ mov win2lin_win_arg(7,7), %r11
+ mov %r11, win2lin_lin_arg(7)
+
+ call_lin_func
+
+ free_stack(7)
- call_lin_func_args(7)
win2lin_epilog
ret
.size win2lin7, .-win2lin7
@@ -238,13 +259,18 @@
win2lin_arg5
win2lin_arg6
+ reserve_stack(8)
+
# copy windows arguments 7 and 8 onto stack for Linux function
- mov win2lin_win_arg(7), %r11
- mov %r11, win2lin_lin_arg(7,8)
- mov win2lin_win_arg(8), %r11
- mov %r11, win2lin_lin_arg(8,8)
+ mov win2lin_win_arg(7,8), %r11
+ mov %r11, win2lin_lin_arg(7)
+ mov win2lin_win_arg(8,8), %r11
+ mov %r11, win2lin_lin_arg(8)
+
+ call_lin_func
+
+ free_stack(8)
- call_lin_func_args(8)
win2lin_epilog
ret
.size win2lin8, .-win2lin8
@@ -256,24 +282,36 @@
win2lin12:
win2lin_prolog
+ # arg5 and arg6 must be transferred before reserving stack space,
+ # because the macros rely on %rsp pointing to the last argument from
+ # the prolog
+ # args 1 to 4 are transferred after the movsq as we destroy rsi and
+ # rdi (=lin args 1 and 2) there
+ win2lin_arg5
+ win2lin_arg6
+
+ reserve_stack(12)
+
# since we destroy rsi and rdi here, first copy windows
# arguments 7 through 12 onto stack for Linux function
mov %rcx, %r11 # save rcx
- lea win2lin_win_arg(7), %rsi # source (windows arg 7 and up)
- lea win2lin_lin_arg(7,12), %rdi # = destination
+ lea win2lin_win_arg(7,12), %rsi # source (windows arg 7 and up)
+ lea win2lin_lin_arg(7), %rdi # = destination
mov $6, %rcx # 6 arguments
rep
movsq
mov %r11, %rcx # restore rcx
+ # transfer args 1 - 4
win2lin_arg1
win2lin_arg2
win2lin_arg3
win2lin_arg4
- win2lin_arg5
- win2lin_arg6
+
+ call_lin_func
+
+ free_stack(12)
- call_lin_func_args(12)
win2lin_epilog
ret
.size win2lin9, .-win2lin9
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/ndiswrapper-kmod/F-14/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- .cvsignore 21 Feb 2009 22:37:45 -0000 1.3
+++ .cvsignore 13 Feb 2011 21:00:09 -0000 1.4
@@ -1 +1 @@
-ndiswrapper-1.54.tar.gz
+ndiswrapper-1.56.tar.gz
Index: ndiswrapper-kmod.spec
===================================================================
RCS file: /cvs/free/rpms/ndiswrapper-kmod/F-14/ndiswrapper-kmod.spec,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- ndiswrapper-kmod.spec 12 Feb 2011 11:11:24 -0000 1.48
+++ ndiswrapper-kmod.spec 13 Feb 2011 21:00:09 -0000 1.49
@@ -3,19 +3,26 @@
# "buildforkernels newest" macro for just that build; immediately after
# queuing that build enable the macro again for subsequent builds; that way
# a new akmod package will only get build when a new one is actually needed
-%define buildforkernels newest
+#define buildforkernels newest
Summary: Ndiswrapper kernel module
Name: ndiswrapper-kmod
-Version: 1.54
-Release: 4%{?dist}.23
+Version: 1.56
+Release: 1%{?dist}.1
License: GPLv2
Group: System Environment/Kernel
URL:
http://ndiswrapper.sourceforge.net
Source0:
http://downloads.sf.net/ndiswrapper/ndiswrapper-%{version}.tar.gz
Source11: ndiswrapper-kmodtool-excludekernel-filterfile
-Patch0: ndiswrapper-1.53-we_update.patch
-Patch1: ndiswrapper-poll_controller.patch
+Patch0: ndiswrapper-1.56-IW_AUTH_MFP.patch
+Patch1: ndiswrapper-1.56-loader-fix-ioctl.patch
+Patch2: ndiswrapper-1.56-pe_linker.patch
+Patch3: ndiswrapper-1.56-driver-Makefile.patch
+Patch4: ndiswrapper-1.56-win2lin_stubs.patch
+Patch5: ndiswrapper-1.56-utils-Makefile.patch
+Patch6: ndiswrapper-1.56-kernel-2.6.35-api-update-1.patch
+Patch7: ndiswrapper-1.56-kernel-2.6.35-api-update-2.patch
+Patch8: ndiswrapper-1.56-kernel-2.6.35-api-update-3.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# needed for plague to make sure it builds for i586 and i686
@@ -46,8 +53,17 @@
# go
%setup -q -c -T -a 0
(cd ndiswrapper-%{version} ;
+%patch0 -p1 -b .IW_AUTH_MFP
+%patch1 -p1 -b .loader-fix-ioctl
+%patch2 -p1 -b .pe_linker
+%patch3 -p1 -b .driver-Makefile
+%patch4 -p1 -b .win2lin_stubs
+%patch5 -p1 -b .utils-Makefile
+%patch6 -p1 -b .kernel-2.6.35-api-update-1
+%patch7 -p1 -b .kernel-2.6.35-api-update-2
+%patch8 -p1 -b .kernel-2.6.35-api-update-3
#%patch0 -p2 -b .we_update
-%patch1 -p1 -b .poll_controller
+#%patch1 -p1 -b .poll_controller
)
sed -i 's|/sbin/depmod -a|/bin/true|' ndiswrapper-%{version}/driver/Makefile
for kernel_version in %{?kernel_versions} ; do
@@ -75,29 +91,8 @@
%changelog
-* Sat Feb 12 2011 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 1.54-4.23
-- rebuild for updated kernel
-
-* Fri Dec 24 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 1.54-4.22
-- rebuild for updated kernel
-
-* Wed Dec 22 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 1.54-4.21
-- rebuild for updated kernel
-
-* Mon Dec 20 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 1.54-4.20
-- rebuild for updated kernel
-
-* Fri Dec 17 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 1.54-4.19
-- rebuild for updated kernel
-
-* Sun Dec 05 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 1.54-4.18
-- rebuild for F-14 kernel
-
-* Mon Nov 01 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 1.54-4.17
-- rebuild for F-14 kernel
-
-* Fri Oct 29 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 1.54-4.16
-- rebuild for F-14 kernel
+* Wed Dec 01 2010 Tristan Moody <tmoody [AT] ku [DOT] edu> - 1.56-1
+- update for new kernel-2.6.35 api that breaks 1.54 build
* Sun Nov 22 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 1.54-4.15
- rebuild for new kernel, disable i586 builds
Index: sources
===================================================================
RCS file: /cvs/free/rpms/ndiswrapper-kmod/F-14/sources,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sources 21 Feb 2009 22:37:45 -0000 1.3
+++ sources 13 Feb 2011 21:00:09 -0000 1.4
@@ -1 +1 @@
-fc9ebd3985967727da494ec298ad4487 ndiswrapper-1.54.tar.gz
+1431f7ed5f8e92e752d330bbb3aed333 ndiswrapper-1.56.tar.gz
--- ndiswrapper-1.53-we_update.patch DELETED ---
--- ndiswrapper-poll_controller.patch DELETED ---