Julia Lawall [Tue, 5 May 2009 13:47:06 +0000 (15:47 +0200)]
Staging: wlan-ng: p80211wext.c: problem with IW_ENCODE_ALG_WEP
The expression !(ext->alg & IW_ENCODE_ALG_WEP) appears to be incorrect,
because there are several possible values for ext->alg that give 1 when
bit-anded with IW_ENCODE_ALG_WEP. Therefore Richard Kennedy suggested to
rewrite the code with !=
Karl Relton [Fri, 17 Apr 2009 09:15:34 +0000 (10:15 +0100)]
Staging: wlan-ng: Move firmware loading into driver
Move prism2 firmware loading from userspace into driver, using linux
request_firmware(). Firmware is now loaded (if available) on device
probing, before it is registered as a netdevice and advertised to userspace.
Signed-off-by: Karl Relton <karllinuxtest.relton@ntlworld.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Tim Gardner [Wed, 29 Apr 2009 21:01:42 +0000 (15:01 -0600)]
Staging: winbond: mac80211 - unify config_interface and bss_info_changed
The commit 'mac80211: unify config_interface and bss_info_changed' from
Johannes Berg <johannes@sipsolutions.net> removed the config_interface structure
tag from struct ieee80211_ops. The BSSID detection functionality migrated to
ieee80211_ops.bss_info_changed.
Since wbsoft_config_interface() was largely empty, there wasn't much to do
other then to remove the function itself. There is currently no support
for BSSID change detection.
Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Pekka Enberg [Wed, 8 Apr 2009 08:14:00 +0000 (11:14 +0300)]
Staging: w35und: more simplify hal_init_hardware() error handling
Impact: fix, cleanup
If initialization in hal_init_hardware() fails, we call hal_halt() to
clean up and release resource. However, hal_halt() will attempt to
call del_timer_sync() on ->LEDTimer on "stage 3" although it's not
initialized at that point. Fix that up by simplifying error handling
logic in hal_init_hardware() with gotos.
Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Pekka Enberg [Fri, 27 Mar 2009 17:46:45 +0000 (19:46 +0200)]
Staging: w35und: remove unused code from wbsoft_configure_filter()
We don't initialize hardware multicast filter in the driver nor do we know how
to do that. Therefore, remove some code that isn't actually used from
wbsoft_configure_filter().
Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Staging: remove driver_data direct access of struct device
In the near future, the driver core is going to not allow direct access
to the driver_data pointer in struct device. Instead, the functions
dev_get_drvdata() and dev_set_drvdata() should be used. These functions
have been around since the beginning, so are backwards compatible with
all older kernel versions.
Cc: Leon Woestenberg <leon@sidebranch.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Anders Kaseorg [Tue, 24 Mar 2009 20:41:55 +0000 (16:41 -0400)]
Staging: rt2870: Don't call sprintf() with overlapping input and output.
The use of sprintf() to append to a buffer, as in
sprintf(buf, "%sEntry: %d\n", buf, i)
is not valid according to C99 ("If copying takes place between objects
that overlap, the behavior is undefined."). It breaks at least in
userspace under gcc -D_FORTIFY_SOURCE. Replace this construct with
sprintf(buf + strlen(buf), "Entry: %d\n", i)
This patch was automatically generated using
perl -0pe 's/(sprintf\s*\(\s*([^,]*))(\s*,\s*")%s((?:[^"\\]|\\.)*"\s*,)\s*\2\s*,/$1 + strlen($2)$3$4/g'
perl -0pe 's/(snprintf\s*\(\s*([^,]*))(\s*,[^,]*?)(\s*,\s*")%s((?:[^"\\]|\\.)*"\s*,)\s*\2\s*,/$1 + strlen($2)$3 - strlen($2)$4$5/g'
Signed-off-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Anders Kaseorg [Tue, 24 Mar 2009 20:40:41 +0000 (16:40 -0400)]
Staging: rt2860: Don't call sprintf() with overlapping input and output.
The use of sprintf() to append to a buffer, as in
sprintf(buf, "%sEntry: %d\n", buf, i)
is not valid according to C99 ("If copying takes place between objects
that overlap, the behavior is undefined."). It breaks at least in
userspace under gcc -D_FORTIFY_SOURCE. Replace this construct with
sprintf(buf + strlen(buf), "Entry: %d\n", i)
This patch was automatically generated using
perl -0pe 's/(sprintf\s*\(\s*([^,]*))(\s*,\s*")%s((?:[^"\\]|\\.)*"\s*,)\s*\2\s*,/$1 + strlen($2)$3$4/g'
perl -0pe 's/(snprintf\s*\(\s*([^,]*))(\s*,[^,]*?)(\s*,\s*")%s((?:[^"\\]|\\.)*"\s*,)\s*\2\s*,/$1 + strlen($2)$3 - strlen($2)$4$5/g'
Signed-off-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jiri Slaby [Thu, 26 Mar 2009 08:34:10 +0000 (09:34 +0100)]
staging: agnx, fix bssid compiler warnings
conf->bssid is const. Propagate const to not get compiler warnings:
agnx/pci.c: In function ‘agnx_config_interface’:
agnx/pci.c:319: warning: passing argument 2 of ‘agnx_set_bssid’ discards qualifiers from pointer target type
agnx/pci.c:321: warning: passing argument 2 of ‘hash_write’ discards qualifiers from pointer target type
Randy Dunlap [Fri, 5 Jun 2009 18:10:42 +0000 (11:10 -0700)]
Staging: comedi: uses udelay, needs delay.h
comedi driver(s) use udelay() so they need to #include delay.h.
drivers/staging/comedi/drivers/adq12b.c: In function 'adq12b_ai_rinsn':
drivers/staging/comedi/drivers/adq12b.c:328: error: implicit declaration of function 'udelay'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
These changes guarantee that the URBs are not resubmitted in case of a
comedi buffer overflow. Otherwise this runs in the background even when
the userspace program has terminated.
Staging: comedi: comedi_test.c should include timer.h
Fix this build error:
.../comedi_test.c:82: error: field timer has incomplete type
.../comedi_test.c: In function waveform_ai_interrupt:
.../comedi_test.c:188: error: implicit declaration of function mod_timer
.../comedi_test.c:188: error: jiffies undeclared (first use in this function)
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Bill Pemberton [Sun, 26 Apr 2009 18:45:12 +0000 (14:45 -0400)]
Staging: comedi: simply read and write functions in adl_pci8164
There are several read and write functions in adl_pci8164 that are
essentially the same thing. They were created with a cut and paste.
Change them to use a common function.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
There are a number of comedi "wrappers" for some RT functions that are
about to go away. This patch removes all of the wrapper calls within
the comedi drivers and core in order to prepare for removing the RT
comedi code.
Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Manuel Gebele [Sun, 19 Apr 2009 12:46:01 +0000 (14:46 +0200)]
Staging: comedi: Makefile changes
this patch will sort the 'Comedi USB drivers' section in the
staging/comedi/drivers/Makefile in alphabetical order, and add the
vmk80xx.c driver to the build.
From: Manuel Gebele <forensixs@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Manuel Gebele [Wed, 22 Apr 2009 17:28:18 +0000 (10:28 -0700)]
Staging: comedi: add vmk80xx USB driver
The k80xx module was completely revised again. The update contains the
following new main features:
- support for digital input
- support for digital output
- support for pulse counters
- support up to 16 boards (by the way, the windows driver and the k8055
library (libk8055) has support for only 4 boards)
The driver can now manage all features what the board has to offer:
- analog input/output
- digital input/output
- pulse counters (read, reset, set debounce time)
I've also fixed some mistaken in the drivers source code/logic.
By testing all of the driver features i got no errors or something else.
The driver works fine....
From: Manuel Gebele <forensixs@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>