commit ndiswrapper for openSUSE:Factory
Hello community,
here is the log from the commit of package ndiswrapper for openSUSE:Factory
checked in at Mon Aug 3 16:55:20 CEST 2009.
--------
--- ndiswrapper/ndiswrapper.changes 2009-03-11 13:21:54.000000000 +0100
+++ /mounts/work_src_done/STABLE/ndiswrapper/ndiswrapper.changes 2009-08-03 15:30:41.000000000 +0200
@@ -1,0 +2,14 @@
+Mon Aug 3 15:27:34 CEST 2009 - coolo@novell.com
+
+- update to 1.55
+ * Fixed compilation issues with recent kernels
+ * Fixed buffer overflows with nickname
+ * Compilation issues with 2.6.27 and 2.6.28 fixed
+- removing all our patches that are solved upstream
+
+-------------------------------------------------------------------
+Sun Aug 2 18:23:34 CEST 2009 - coolo@novell.com
+
+- convert net_device API to 2.6.31
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
ndiswrapper-1.53.tar.bz2
ndiswrapper-iwe_info.patch
ndiswrapper-long-essid.patch
New:
----
ndiswrapper-1.55.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ndiswrapper.spec ++++++
--- /var/tmp/diff_new_pack.PFC7Mt/_old 2009-08-03 16:55:09.000000000 +0200
+++ /var/tmp/diff_new_pack.PFC7Mt/_new 2009-08-03 16:55:09.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package ndiswrapper (Version 1.53)
+# spec file for package ndiswrapper (Version 1.55)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -23,21 +23,19 @@
Group: System/Kernel
AutoReqProv: on
Summary: Use Microsoft NDIS Network Drivers for WLAN Cards
-Version: 1.53
-Release: 13
+Version: 1.55
+Release: 1
Requires: pciutils
Requires: ndiswrapper-kmp
Source0: %name-%version.tar.bz2
Source2: README.SUSE
Source3: preamble
Patch0: ndiswrapper.diff
-Patch1: ndiswrapper-iwe_info.patch
-Patch2: ndiswrapper-long-essid.patch
Url: http://ndiswrapper.sourceforge.net
License: GPL v2 or later
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64
-%suse_kernel_module_package -p %_sourcedir/preamble kdump um debug
+#%suse_kernel_module_package -p %_sourcedir/preamble kdump um debug
%description
Some wireless LAN vendors refuse to release hardware specifications or
@@ -73,8 +71,6 @@
%prep
%setup
%patch0
-%patch1
-%patch2 -p0
cp %SOURCE2 .
mkdir obj
++++++ ndiswrapper-1.53.tar.bz2 -> ndiswrapper-1.55.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ndiswrapper-1.53/ChangeLog new/ndiswrapper-1.55/ChangeLog
--- old/ndiswrapper-1.53/ChangeLog 2008-05-28 04:54:08.000000000 +0200
+++ new/ndiswrapper-1.55/ChangeLog 2009-06-29 04:09:27.000000000 +0200
@@ -1,31 +1,40 @@
+Version 1.55 2009-06-28
+=======================
+* Fixed compilation issues with recent kernels
+
+Version 1.54 2009-01-21
+=======================
+* Fixed buffer overflows with nickname
+* Compilation issues with 2.6.27 and 2.6.28 fixed
+
Version 1.53 2008-05-17
-=======================
-* Implemented va_list conversion for x86_64, which fixes oops in
+=======================
+* Implemented va_list conversion for x86_64, which fixes oops in
vsprintf() and vsnprintf().
* Fixed oops on unload if using our workqueue implementation with SMP enabled.
* Don't change the actual thread priority, just pretend it was changed.
-* Implemented format string conversion for x86_64, so that Windows long
+* Implemented format string conversion for x86_64, so that Windows long
is mapped to Linux int.
* Fixed most sparse warnings.
-* Simplified code and build system to remove already broken support for
+* Simplified code and build system to remove already broken support for
Linux versions prior to 2.6.16.
-* Added .size and .type for all functions in win2lin_stubs.S to improve
+* Added .size and .type for all functions in win2lin_stubs.S to improve
backtrace on x86_64.
* Fixed rx key authentication sequence number conversion from Windows to
Linux so WPA authentication doesn't sometimes go into re-key auth loop.
Version 1.52 2008-02-02
-=======================
+=======================
* Fixed kernel crash when CONFIG_DEBUG_SHIRQ is enabled
* Compilation issues with current 2.6.25 kernel tree fixed
Version 1.51 2007-12-17
-=======================
+=======================
* Fixed an smp issue that may cause ndiswrapper to stop transmitting packets
after a while (noticed with Marvell Pre-N USB driver)
Version 1.50 2007-11-27
-=======================
+=======================
* Added support for 2.6.24-rcX kernels
* Fixed issue with changing mac address (with 'ifconfig <iface> hw ether
<mac>') - its broken since 1.45-rc2. Now one can also edit appropriate .conf
@@ -34,7 +43,7 @@
* Fixed kernel crash observed with mrv8335 in ad-hoc mode
Version 1.49 2007-10-27
-=======================
+=======================
* If a driver returns invalid MAC address (00:00:00:00:00) when
queried with OID_802_3_CURRENT_ADDRESS (probably because
NdisReadNetworkAddress returns NDIS_STATUS_FAILURE?), use
@@ -46,7 +55,7 @@
* Dropped support for 2.4 kernels (and very old 2.6 kernels)
Version 1.48 2007-09-19
-=======================
+=======================
* Support for 2.6.23 kernel
* Disassocation with wpa_supplicant is fixed (earlier, after disassociation,
the driver and ndiswrapper would be configured differently, requiring
@@ -57,17 +66,17 @@
to take up all the CPU in some cases
Version 1.47 2007-06-12
-=======================
+=======================
* Fixed random (occassional) crash issues with 64-bit drivers (observed with
Broadcom driver)
* Fixed compilation issues with version 1.46
Version 1.46 2007-06-03
-=======================
+=======================
* Fixed crash with large transfers (bug in version 1.45)
Version 1.45 2007-05-28
-=======================
+=======================
* Fixes 'NOHZ: local_softirq_pending: 08' warnings from tickless
kernels
* Fixed issue(s) with RT-preempt enabled kernels
@@ -86,7 +95,7 @@
* Fixed crashes when removing module with usb devices
Version 1.44 2007-05-17
-=======================
+=======================
* Fixed issues with Ubuntu kernels (where PREEMPT is not enabled)
* Issues with combination of DEBUG_PREEMPT and RT-preempt fixed
* Fixed issues with newer 64-bit Broadcom driver when more than 1GB RAM is
@@ -94,7 +103,7 @@
* Added support for upcoming 2.6.22 kernels
Version 1.43 2007-04-30
-=======================
+=======================
* Fixed long standing memory allocation issues with some
drivers, Atheros especially. With this fix, Atheros cards in Macbook
with Core 2 Duo are known to work
@@ -107,24 +116,24 @@
in-kernel sky2 driver has some issues)
Version 1.42 2007-04-16
-=======================
+=======================
* Yet another smp fix
* Bug fix related to events (no driver seems to be affected by this)
Version 1.41 2007-03-31
-=======================
+=======================
* Fixed soft-lockup issue when multiple network devices are used
* Fixed a bug when unloading driver
* Fixed issues with recent RT-preempt patch
Version 1.40 2007-03-29
-=======================
+=======================
* The workaround for large memory allocations (needed by Atheros drivers)
with 2.6.19+ kernels, introduced in version 1.33, causes soft-lockup
with smp. This is now fixed.
Version 1.39 2007-03-23
-=======================
+=======================
* An smp issue is fixed
* When initializing a card that supports 802.11a and either 802.11g or b, set
the mode to 802.11g or b, as 802.11a is far less common
@@ -132,66 +141,66 @@
* Fixed issue with initializing athfmwdl driver (for atheros USB cards)
Version 1.38 2007-02-28
-=======================
+=======================
* Fixed ndiswrapper script so it installs drivers for certain PCMCIA cards
(which have bus type 8, instead of 5)
* Fixed compilation issues with 2.4 kernels
Version 1.37 2007-02-02
-=======================
+=======================
* This time, really fixed the ndiswrapper script for sis163u driver (wrong
version was packaged with 1.36, although issue was fixed in svn a few days
ago)
Version 1.36 2007-02-01
-=======================
+=======================
* Fixed ndiswrapper script (broken since 1.23 for sis163u driver)
* Implemented full scatter/gather lists (not tested)
* Implemented support for hardware tcp/ip checksumming (through NDIS)
Version 1.35 2007-01-28
-=======================
+=======================
* Fixed a bug with scatter/gather. With this rt61 from RaLink and VT6655 from
VIA drivers transmit data. Other drivers that associated but didn't transmit
data (e.g., RT8855, Airgo's Gen3 PCI with ID 17CB:0002) may also work.
Version 1.34 2007-01-08
-=======================
+=======================
* Provide workaround for large memory allocations in interrupt context with
2.6.19+ kernels. With this, atheros (and other?) drivers don't need kernel
to be patched.
Version 1.33 2006-12-28
-=======================
+=======================
* Allow large memory allocations in older kernels; with 2.6.19 and newer
kernels, vmalloc in atomic allocations is not allowed (see 'patches' section
on project page for workaround on these newer kernels).
Version 1.32 2006-12-23
-=======================
+=======================
* Added compatability with 2.6.20-rc1 kernel
* Fixed crash when changing MAC address (with 'ifconfig hw ether')
* Fixed crash when names of other network device are changed (e.g., by udev)
Version 1.31 2006-12-05
-=======================
+=======================
* Fixed crashes with shutting down computer without unloading ndiswrapper
module.
* Added support for Davicom 9601 USB ethernet device.
* Fixed ndiswrapper script to show correct device IDs.
Version 1.30 2006-11-28
-=======================
+=======================
* Yet another fix to ndiswrapper script (to handle file names with upper case
extensions).
Version 1.29 2006-11-23
-=======================
+=======================
* Fixed ndiswrapper script to handle INF files properly.
* Added support for Atheros 5416 (802.11n) chipset.
Version 1.28 2006-10-29
-=======================
+=======================
* Windows drivers may request firmware to be loaded in either upper or lower
case (either full name or partially). Instead of using given name, use
installed name. This fixes firmware loading issue with Airgo networks
@@ -200,25 +209,25 @@
'make USE_OWN_WQ=1'. Final 2.6.19 may not need this (hopefully).
Version 1.27 2006-10-21
-=======================
+=======================
* Bug fix to drivers that load binary firmware files (broken in 1.26). This
fixes issues with Atheros and TI drivers.
* Atheros PCI driver requests more map registers for DMA than limit specified
in NDIS. Instead of failing such invalid requests, continue.
Version 1.26 2006-10-14
-=======================
+=======================
* Removed debug flag in ndiswrapper script
* When HIGHMEM is enabled, allocate and copy URB buffers only if
necessary. This prevents memory allocation failures.
Version 1.25 2006-10-04
-=======================
+=======================
* Support for WE-21
* Bug fixes
Version 1.24 2006-10-01
-=======================
+=======================
* Compilation issues with 2.4 fixed (yet again!)
* Devices are recognized when they are inserted, instead of registering when
module is loaded. With this, new Windows drivers can be installed / updated
@@ -229,20 +238,20 @@
* 64-bit RT2500 USB driver works
Version 1.23 2006-08-10
-=======================
+=======================
* Bug fixes to recent changes in 64-bit driver support.
* ZyDas ZD1211 driver uses interrupt-out URBs, so set them up properly.
* Bug fixes to Atheros USB driver support.
Version 1.22 2006-08-05
-=======================
+=======================
* Added support for Broadcom 802.11n (draft) driver
* Added support for 64-bit Marvell driver
* Optimizations for 64-bit drivers
* If network interface name changes (through udev, ifrename etc),
ndiswrapper notices it and changes entry in procfs
* Compilation issue with 2.4 issue fixed
-
+
Version 1.21 2006-07-15
=======================
* Fix to a bug (in 1.20) that locked up when used with RT2500 with SMP.
@@ -644,7 +653,7 @@
* Byte statistics for ifconfig.
* Kernel 2.4 support.
* Support for more Broadcom cards (No centrino yet).
-* Tons of bugfixes should improve stability a lot.
+* Tons of bugfixes should improve stability a lot.
Version 0.1 2003-11-17
======================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ndiswrapper-1.53/INSTALL new/ndiswrapper-1.55/INSTALL
--- old/ndiswrapper-1.53/INSTALL 2008-05-28 04:54:08.000000000 +0200
+++ new/ndiswrapper-1.55/INSTALL 2009-06-29 04:09:27.000000000 +0200
@@ -4,7 +4,7 @@
http://ndiswrapper.sourceforge.net/wiki
-Prerequisites
+Prerequisites
=============
You need a recent kernel, at least 2.6.16, with header files for the
@@ -15,7 +15,7 @@
should have at least 'include' directory and '.config' file.
-Downloading
+Downloading
===========
Download the latest version of the ndiswrapper sources from here and
@@ -32,7 +32,7 @@
Login as root and run
make install
-Install Windows driver
+Install Windows driver
======================
If this is the first time you install ndiswrapper, you need to install
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ndiswrapper-1.53/Makefile new/ndiswrapper-1.55/Makefile
--- old/ndiswrapper-1.53/Makefile 2008-05-28 04:54:08.000000000 +0200
+++ new/ndiswrapper-1.55/Makefile 2009-06-29 04:09:27.000000000 +0200
@@ -9,14 +9,14 @@
ndiswrapper.8 loadndisdriver.8
DIST_SUBDIRS=utils driver
-DESTDIR =
+DESTDIR =
mandir = $(DESTDIR)$(shell [ -d /usr/man/man8 ] && echo /usr/man || echo /usr/share/man )
KVERS ?= $(shell uname -r)
.PHONY: all
-all:
+all:
+make -C driver
+make -C utils
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ndiswrapper-1.53/README new/ndiswrapper-1.55/README
--- old/ndiswrapper-1.53/README 2008-05-28 04:54:08.000000000 +0200
+++ new/ndiswrapper-1.55/README 2009-06-29 04:09:27.000000000 +0200
@@ -17,7 +17,7 @@
============
See INSTALL for a short version of installation instructions. More
-up-to-date instructions, as well as FAQ etc., can be found at
+up-to-date instructions, as well as FAQ etc., can be found at
http://ndiswrapper.sourceforge.net/wiki/index.php?Installation.
Problems
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ndiswrapper-1.53/driver/Makefile new/ndiswrapper-1.55/driver/Makefile
--- old/ndiswrapper-1.53/driver/Makefile 2008-05-28 04:54:08.000000000 +0200
+++ new/ndiswrapper-1.55/driver/Makefile 2009-06-29 04:09:27.000000000 +0200
@@ -52,7 +52,7 @@
endif
include $(KBUILD)/.config
-# returns of structs and unions in registers when possible, like Windows
+# returns of structs and unions in registers when possible, like Windows
EXTRA_CFLAGS += -freg-struct-return
# to produce debug trace, add option "DEBUG=<n>" where <n> is 1 to 6
@@ -136,19 +136,21 @@
quiet_cmd_mkexport = MKEXPORT $@
cmd_mkexport = $(SHELL) $(obj)/mkexport.sh $< $@
+extra-y += $(EXPORTS)
%_exports.h: %.c $(obj)/mkexport.sh FORCE
$(call if_changed,mkexport)
-extra-y := $(EXPORTS)
+$(addprefix $(obj)/,$(EXPORTS:_exports.h=.o)): %.o: %_exports.h
ifeq ($(CONFIG_X86_64),y)
quiet_cmd_mkstubs = MKSTUBS $@
cmd_mkstubs = $(SHELL) $(obj)/mkstubs.sh $(addprefix $(src)/,$(STUB_SRCS)) >$@
+extra-y += win2lin_stubs.h
$(obj)/win2lin_stubs.h: $(addprefix $(src)/,$(STUB_SRCS)) FORCE
$(call if_changed,mkstubs)
-extra-y += win2lin_stubs.h
+$(obj)/win2lin_stubs.o: $(obj)/win2lin_stubs.h
OBJS += win2lin_stubs.o
else
OBJS += divdi3.o
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ndiswrapper-1.53/driver/crt.c new/ndiswrapper-1.55/driver/crt.c
--- old/ndiswrapper-1.53/driver/crt.c 2008-05-28 04:54:08.000000000 +0200
+++ new/ndiswrapper-1.55/driver/crt.c 2009-06-29 04:09:27.000000000 +0200
@@ -482,61 +482,61 @@
wstdcall s64 WIN_FUNC(_alldiv,2)
(s64 a, s64 b)
{
- return (a / b);
+ return a / b;
}
wstdcall u64 WIN_FUNC(_aulldiv,2)
(u64 a, u64 b)
{
- return (a / b);
+ return a / b;
}
wstdcall s64 WIN_FUNC(_allmul,2)
(s64 a, s64 b)
{
- return (a * b);
+ return a * b;
}
wstdcall u64 WIN_FUNC(_aullmul,2)
(u64 a, u64 b)
{
- return (a * b);
+ return a * b;
}
wstdcall s64 WIN_FUNC(_allrem,2)
(s64 a, s64 b)
{
- return (a % b);
+ return a % b;
}
wstdcall u64 WIN_FUNC(_aullrem,2)
(u64 a, u64 b)
{
- return (a % b);
+ return a % b;
}
__attribute__((regparm(3))) s64 WIN_FUNC(_allshl,2)
(s64 a, u8 b)
{
- return (a << b);
+ return a << b;
}
__attribute__((regparm(3))) u64 WIN_FUNC(_aullshl,2)
(u64 a, u8 b)
{
- return (a << b);
+ return a << b;
}
__attribute__((regparm(3))) s64 WIN_FUNC(_allshr,2)
(s64 a, u8 b)
{
- return (a >> b);
+ return a >> b;
}
__attribute__((regparm(3))) u64 WIN_FUNC(_aullshr,2)
(u64 a, u8 b)
{
- return (a >> b);
+ return a >> b;
}
int stricmp(const char *s1, const char *s2)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ndiswrapper-1.53/driver/iw_ndis.c new/ndiswrapper-1.55/driver/iw_ndis.c
--- old/ndiswrapper-1.53/driver/iw_ndis.c 2008-05-28 04:54:08.000000000 +0200
+++ new/ndiswrapper-1.55/driver/iw_ndis.c 2009-06-29 04:09:27.000000000 +0200
@@ -47,12 +47,6 @@
req.length = ssid_len;
if (ssid_len)
memcpy(&req.essid, ssid, ssid_len);
- DBG_BLOCK(2) {
- char buf[NDIS_ESSID_MAX_SIZE+1];
- memcpy(buf, ssid, ssid_len);
- buf[ssid_len] = 0;
- TRACE2("ssid = '%s'", buf);
- }
res = mp_set(wnd, OID_802_11_SSID, &req, sizeof(req));
if (res) {
@@ -125,7 +119,6 @@
EXIT2(return -EOPNOTSUPP);
}
memcpy(extra, req.essid, req.length);
- extra[req.length] = 0;
if (req.length > 0)
wrqu->essid.flags = 1;
else
@@ -998,10 +991,10 @@
{
struct ndis_device *wnd = netdev_priv(dev);
- if (wrqu->data.length > IW_ESSID_MAX_SIZE || wrqu->data.length <= 0)
+ if (wrqu->data.length >= IW_ESSID_MAX_SIZE || wrqu->data.length <= 0)
return -EINVAL;
- memset(wnd->nick, 0, sizeof(wnd->nick));
memcpy(wnd->nick, extra, wrqu->data.length);
+ wnd->nick[wrqu->data.length] = 0;
return 0;
}
@@ -1015,7 +1008,16 @@
return 0;
}
-static char *ndis_translate_scan(struct net_device *dev, char *event,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27) && !defined(IW_REQUEST_FLAG_COMPAT)
+#define iwe_stream_add_event(a, b, c, d, e) iwe_stream_add_event(b, c, d, e)
+#define iwe_stream_add_point(a, b, c, d, e) iwe_stream_add_point(b, c, d, e)
+#define iwe_stream_add_value(a, b, c, d, e, f) \
+ iwe_stream_add_value(b, c, d, e, f)
+#define iwe_stream_lcp_len(a) IW_EV_LCP_LEN
+#endif
+
+static char *ndis_translate_scan(struct net_device *dev,
+ struct iw_request_info *info, char *event,
char *end_buf, void *item)
{
struct iw_event iwe;
@@ -1034,7 +1036,8 @@
iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
iwe.len = IW_EV_ADDR_LEN;
memcpy(iwe.u.ap_addr.sa_data, bssid->mac, ETH_ALEN);
- event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_ADDR_LEN);
+ event = iwe_stream_add_event(info, event, end_buf, &iwe,
+ IW_EV_ADDR_LEN);
/* add essid */
memset(&iwe, 0, sizeof(iwe));
@@ -1044,13 +1047,15 @@
iwe.u.data.length = IW_ESSID_MAX_SIZE;
iwe.u.data.flags = 1;
iwe.len = IW_EV_POINT_LEN + iwe.u.data.length;
- event = iwe_stream_add_point(event, end_buf, &iwe, bssid->ssid.essid);
+ event = iwe_stream_add_point(info, event, end_buf, &iwe,
+ bssid->ssid.essid);
/* add protocol name */
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = SIOCGIWNAME;
strncpy(iwe.u.name, network_type_to_name(bssid->net_type), IFNAMSIZ);
- event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_CHAR_LEN);
+ event = iwe_stream_add_event(info, event, end_buf, &iwe,
+ IW_EV_CHAR_LEN);
/* add mode */
memset(&iwe, 0, sizeof(iwe));
@@ -1061,7 +1066,8 @@
iwe.u.mode = IW_MODE_INFRA;
else // if (bssid->mode == Ndis802_11AutoUnknown)
iwe.u.mode = IW_MODE_AUTO;
- event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_UINT_LEN);
+ event = iwe_stream_add_event(info, event, end_buf, &iwe,
+ IW_EV_UINT_LEN);
/* add freq */
memset(&iwe, 0, sizeof(iwe));
@@ -1076,7 +1082,8 @@
/* convert from kHz to Hz */
iwe.u.freq.e += 3;
iwe.len = IW_EV_FREQ_LEN;
- event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_FREQ_LEN);
+ event = iwe_stream_add_event(info, event, end_buf, &iwe,
+ IW_EV_FREQ_LEN);
/* add qual */
memset(&iwe, 0, sizeof(iwe));
@@ -1090,7 +1097,8 @@
iwe.u.qual.noise = WL_NOISE;
iwe.u.qual.qual = i;
iwe.len = IW_EV_QUAL_LEN;
- event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_QUAL_LEN);
+ event = iwe_stream_add_event(info, event, end_buf, &iwe,
+ IW_EV_QUAL_LEN);
/* add key info */
memset(&iwe, 0, sizeof(iwe));
@@ -1101,11 +1109,12 @@
iwe.u.data.flags = IW_ENCODE_ENABLED | IW_ENCODE_NOKEY;
iwe.u.data.length = 0;
iwe.len = IW_EV_POINT_LEN;
- event = iwe_stream_add_point(event, end_buf, &iwe, bssid->ssid.essid);
+ event = iwe_stream_add_point(info, event, end_buf, &iwe,
+ bssid->ssid.essid);
/* add rate */
memset(&iwe, 0, sizeof(iwe));
- current_val = event + IW_EV_LCP_LEN;
+ current_val = event + iwe_stream_lcp_len(info);
iwe.cmd = SIOCGIWRATE;
if (bssid->length > sizeof(*bssid))
nrates = NDIS_MAX_RATES_EX;
@@ -1115,26 +1124,27 @@
if (bssid->rates[i] & 0x7f) {
iwe.u.bitrate.value = ((bssid->rates[i] & 0x7f) *
500000);
- current_val = iwe_stream_add_value(event, current_val,
+ current_val = iwe_stream_add_value(info, event,
+ current_val,
end_buf, &iwe,
IW_EV_PARAM_LEN);
}
}
- if ((current_val - event) > IW_EV_LCP_LEN)
+ if ((current_val - event) > iwe_stream_lcp_len(info))
event = current_val;
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVCUSTOM;
sprintf(buf, "bcn_int=%d", bssid->config.beacon_period);
iwe.u.data.length = strlen(buf);
- event = iwe_stream_add_point(event, end_buf, &iwe, buf);
+ event = iwe_stream_add_point(info, event, end_buf, &iwe, buf);
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVCUSTOM;
sprintf(buf, "atim=%u", bssid->config.atim_window);
iwe.u.data.length = strlen(buf);
- event = iwe_stream_add_point(event, end_buf, &iwe, buf);
+ event = iwe_stream_add_point(info, event, end_buf, &iwe, buf);
TRACE2("%d, %u", bssid->length, (unsigned int)sizeof(*bssid));
if (bssid->length > sizeof(*bssid)) {
@@ -1155,8 +1165,9 @@
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVGENIE;
iwe.u.data.length = ielen;
- event = iwe_stream_add_point(event, end_buf,
- &iwe, iep);
+ event = iwe_stream_add_point(info, event,
+ end_buf, &iwe,
+ iep);
}
iep += ielen;
}
@@ -1236,7 +1247,7 @@
TRACE2("%d", bssid_list->num_items);
cur_item = &bssid_list->bssid[0];
for (i = 0; i < bssid_list->num_items; i++) {
- event = ndis_translate_scan(dev, event,
+ event = ndis_translate_scan(dev, info, event,
extra + IW_SCAN_MAX_DATA, cur_item);
cur_item = (struct ndis_wlan_bssid *)((char *)cur_item +
cur_item->length);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ndiswrapper-1.53/driver/ndis.c new/ndiswrapper-1.55/driver/ndis.c
--- old/ndiswrapper-1.53/driver/ndis.c 2008-05-28 04:54:08.000000000 +0200
+++ new/ndiswrapper-1.55/driver/ndis.c 2009-06-29 04:09:27.000000000 +0200
@@ -945,19 +945,19 @@
EXIT2(return NDIS_STATUS_RESOURCES);
}
if (dmasize == NDIS_DMA_24BITS) {
- if (pci_set_dma_mask(wnd->wd->pci.pdev, DMA_24BIT_MASK) ||
+ if (pci_set_dma_mask(wnd->wd->pci.pdev, DMA_BIT_MASK(24)) ||
pci_set_consistent_dma_mask(wnd->wd->pci.pdev,
- DMA_24BIT_MASK))
+ DMA_BIT_MASK(24)))
WARNING("setting dma mask failed");
} else if (dmasize == NDIS_DMA_32BITS) {
/* consistent dma is in low 32-bits by default */
- if (pci_set_dma_mask(wnd->wd->pci.pdev, DMA_32BIT_MASK))
+ if (pci_set_dma_mask(wnd->wd->pci.pdev, DMA_BIT_MASK(32)))
WARNING("setting dma mask failed");
#ifdef CONFIG_X86_64
} else if (dmasize == NDIS_DMA_64BITS) {
- if (pci_set_dma_mask(wnd->wd->pci.pdev, DMA_64BIT_MASK) ||
+ if (pci_set_dma_mask(wnd->wd->pci.pdev, DMA_BIT_MASK(64)) ||
pci_set_consistent_dma_mask(wnd->wd->pci.pdev,
- DMA_64BIT_MASK))
+ DMA_BIT_MASK(64)))
WARNING("setting dma mask failed");
else
wnd->net_dev->features |= NETIF_F_HIGHDMA;
@@ -1033,10 +1033,10 @@
TRACE3("%p, %p, %u", buf, MmGetSystemAddressForMdl(buf),
MmGetMdlByteCount(buf));
DBG_BLOCK(4) {
- dump_bytes(__FUNCTION__, MmGetSystemAddressForMdl(buf),
+ dump_bytes(__func__, MmGetSystemAddressForMdl(buf),
MmGetMdlByteCount(buf));
}
- wnd->dma_map_addr[index] =
+ wnd->dma_map_addr[index] =
PCI_DMA_MAP_SINGLE(wnd->wd->pci.pdev,
MmGetSystemAddressForMdl(buf),
MmGetMdlByteCount(buf), PCI_DMA_TODEVICE);
@@ -1893,7 +1893,7 @@
{
struct ndis_mp_interrupt *mp_interrupt = ctx;
struct ndis_device *wnd = mp_interrupt->nmb->wnd;
- BOOLEAN recognized, queue_handler;
+ BOOLEAN recognized = TRUE, queue_handler = TRUE;
TRACE6("%p", wnd);
/* kernel may call ISR when registering interrupt, in
@@ -2014,24 +2014,10 @@
ENTER2("status=0x%x len=%d", status, len);
switch (status) {
case NDIS_STATUS_MEDIA_CONNECT:
- netif_carrier_on(wnd->net_dev);
- wnd->tx_ok = 1;
- if (netif_queue_stopped(wnd->net_dev))
- netif_wake_queue(wnd->net_dev);
- if (wnd->physical_medium == NdisPhysicalMediumWirelessLan) {
- set_bit(LINK_STATUS_ON, &wnd->ndis_pending_work);
- schedule_wrapndis_work(&wnd->ndis_work);
- }
+ set_media_state(wnd, NdisMediaStateConnected);
break;
case NDIS_STATUS_MEDIA_DISCONNECT:
- netif_carrier_off(wnd->net_dev);
- netif_stop_queue(wnd->net_dev);
- wnd->tx_ok = 0;
- if (wnd->physical_medium == NdisPhysicalMediumWirelessLan) {
- memset(&wnd->essid, 0, sizeof(wnd->essid));
- set_bit(LINK_STATUS_OFF, &wnd->ndis_pending_work);
- schedule_wrapndis_work(&wnd->ndis_work);
- }
+ set_media_state(wnd, NdisMediaStateDisconnected);
break;
case NDIS_STATUS_MEDIA_SPECIFIC_INDICATION:
if (!buf)
@@ -2614,9 +2600,9 @@
#ifdef CONFIG_X86_64
if (dma_size != NDIS_DMA_64BITS) {
TRACE1("DMA size is not 64-bits");
- if (pci_set_dma_mask(wnd->wd->pci.pdev, DMA_32BIT_MASK) ||
+ if (pci_set_dma_mask(wnd->wd->pci.pdev, DMA_BIT_MASK(32)) ||
pci_set_consistent_dma_mask(wnd->wd->pci.pdev,
- DMA_32BIT_MASK))
+ DMA_BIT_MASK(32)))
WARNING("setting dma mask failed");
}
#endif
@@ -2638,7 +2624,7 @@
wstdcall CHAR WIN_FUNC(NdisSystemProcessorCount,0)
(void)
{
- return NR_CPUS;
+ return (CHAR)NR_CPUS;
}
wstdcall void WIN_FUNC(NdisGetCurrentProcessorCounts,3)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ndiswrapper-1.53/driver/ndis.h new/ndiswrapper-1.55/driver/ndis.h
--- old/ndiswrapper-1.53/driver/ndis.h 2008-05-28 04:54:08.000000000 +0200
+++ new/ndiswrapper-1.55/driver/ndis.h 2009-06-29 04:09:27.000000000 +0200
@@ -606,6 +606,11 @@
enum ndis_radio_status radio_state;
};
+enum ndis_media_state {
+ NdisMediaStateConnected,
+ NdisMediaStateDisconnected,
+};
+
enum ndis_media_stream_mode {
Ndis802_11MediaStreamOff, Ndis802_11MediaStreamOn
};
@@ -877,7 +882,7 @@
struct timer_list iw_stats_timer;
unsigned long scan_timestamp;
struct encr_info encr_info;
- char nick[IW_ESSID_MAX_SIZE];
+ char nick[IW_ESSID_MAX_SIZE + 1];
struct ndis_essid essid;
struct auth_encr_capa capa;
enum ndis_infrastructure_mode infrastructure_mode;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ndiswrapper-1.53/driver/ndiswrapper.h new/ndiswrapper-1.55/driver/ndiswrapper.h
--- old/ndiswrapper-1.53/driver/ndiswrapper.h 2008-05-28 04:54:08.000000000 +0200
+++ new/ndiswrapper-1.55/driver/ndiswrapper.h 2009-06-29 04:09:27.000000000 +0200
@@ -16,7 +16,7 @@
#ifndef _NDISWRAPPER_H_
#define _NDISWRAPPER_H_
-#define DRIVER_VERSION "1.53"
+#define DRIVER_VERSION "1.55"
#define UTILS_VERSION "1.9"
#define DRIVER_NAME "ndiswrapper"
@@ -76,7 +76,7 @@
#define MSG(level, fmt, ...) \
printk(level "ndiswrapper (%s:%d): " fmt "\n", \
- __FUNCTION__, __LINE__ , ## __VA_ARGS__)
+ __func__, __LINE__ , ## __VA_ARGS__)
#define WARNING(fmt, ...) MSG(KERN_WARNING, fmt, ## __VA_ARGS__)
#define ERROR(fmt, ...) MSG(KERN_ERR, fmt , ## __VA_ARGS__)
@@ -102,7 +102,7 @@
do { \
if (debug >= level) \
printk(KERN_INFO "%s (%s:%d): " fmt "\n", DRIVER_NAME, \
- __FUNCTION__, __LINE__ , ## __VA_ARGS__); \
+ __func__, __LINE__ , ## __VA_ARGS__); \
} while (0)
#undef DBG_BLOCK
#define DBG_BLOCK(level) if (debug >= level)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ndiswrapper-1.53/driver/ntoskernel.c new/ndiswrapper-1.55/driver/ntoskernel.c
--- old/ndiswrapper-1.53/driver/ntoskernel.c 2008-05-28 04:54:08.000000000 +0200
+++ new/ndiswrapper-1.55/driver/ntoskernel.c 2009-06-29 04:09:27.000000000 +0200
@@ -419,12 +419,12 @@
BUG_ON(wrap_timer->wrap_timer_magic != WRAP_TIMER_MAGIC);
BUG_ON(nt_timer->wrap_timer_magic != WRAP_TIMER_MAGIC);
#endif
- kdpc = nt_timer->kdpc;
- if (kdpc)
- queue_kdpc(kdpc);
KeSetEvent((struct nt_event *)nt_timer, 0, FALSE);
if (wrap_timer->repeat)
mod_timer(&wrap_timer->timer, jiffies + wrap_timer->repeat);
+ kdpc = nt_timer->kdpc;
+ if (kdpc)
+ queue_kdpc(kdpc);
TIMEREXIT(return);
}
@@ -561,11 +561,10 @@
#ifdef TIMER_DEBUG
BUG_ON(wrap_timer->wrap_timer_magic != WRAP_TIMER_MAGIC);
#endif
- TIMERTRACE("canceling timer %p(%p)", wrap_timer, nt_timer);
/* disable timer before deleting so if it is periodic timer, it
* won't be re-armed after deleting */
wrap_timer->repeat = 0;
- ret = del_timer(&wrap_timer->timer);
+ ret = del_timer_sync(&wrap_timer->timer);
/* the documentation for KeCancelTimer suggests the DPC is
* deqeued, but actually DPC is left to run */
if (ret)
@@ -1698,14 +1697,14 @@
#ifdef CONFIG_X86_64
/* GFP_DMA is really only 16MB even on x86-64, but there is no
* other zone available */
- if (highest <= DMA_31BIT_MASK)
+ if (highest <= DMA_BIT_MASK(31))
flags |= __GFP_DMA;
- else if (highest <= DMA_32BIT_MASK)
+ else if (highest <= DMA_BIT_MASK(32))
flags |= __GFP_DMA32;
#else
- if (highest <= DMA_24BIT_MASK)
+ if (highest <= DMA_BIT_MASK(24))
flags |= __GFP_DMA;
- else if (highest > DMA_30BIT_MASK)
+ else if (highest > DMA_BIT_MASK(30))
flags |= __GFP_HIGHMEM;
#endif
addr = wrap_get_free_pages(flags, size);
@@ -1760,8 +1759,8 @@
wstdcall ULONG WIN_FUNC(MmSizeOfMdl,2)
(void *base, ULONG length)
{
- return (sizeof(struct mdl) +
- (sizeof(PFN_NUMBER) * SPAN_PAGES(base, length)));
+ return sizeof(struct mdl) +
+ (sizeof(PFN_NUMBER) * SPAN_PAGES(base, length));
}
struct mdl *allocate_init_mdl(void *virt, ULONG length)
@@ -2389,12 +2388,19 @@
va_start(args, format);
vsnprintf(buf, sizeof(buf), format, args);
- printk(KERN_DEBUG "%s (%s): %s", DRIVER_NAME, __FUNCTION__, buf);
+ printk(KERN_DEBUG "%s (%s): %s", DRIVER_NAME, __func__, buf);
va_end(args);
#endif
return STATUS_SUCCESS;
}
+wstdcall void WIN_FUNC(KeBugCheck,1)
+ (ULONG code)
+{
+ TODO();
+ return;
+}
+
wstdcall void WIN_FUNC(KeBugCheckEx,5)
(ULONG code, ULONG_PTR param1, ULONG_PTR param2,
ULONG_PTR param3, ULONG_PTR param4)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ndiswrapper-1.53/driver/ntoskernel.h new/ndiswrapper-1.55/driver/ntoskernel.h
--- old/ndiswrapper-1.53/driver/ntoskernel.h 2008-05-28 04:54:08.000000000 +0200
+++ new/ndiswrapper-1.55/driver/ntoskernel.h 2009-06-29 04:09:27.000000000 +0200
@@ -53,11 +53,13 @@
/* Interrupt backwards compatibility stuff */
#include
participants (1)
-
root@Hilbert.suse.de