Vipin Mehta [Fri, 18 Feb 2011 21:13:05 +0000 (13:13 -0800)]
staging: ath6kl: Fixing target crash due to mismatch connect/disconnect
Firmware design requires a WMI_DISCONNECT_CMD for every WMI_CONNECT_CMD to
clear the firmware previous profile state. There is one case in linux host
driver where two WMI_CONNECT_CMD are given without a WMI_DISCONNECT_CMD.
This causes firmware state to mismatch causing an ASSERT. Use the driver
state variable arConnectPending to track whether a WMI_CONNECT_CMD is
issued to firmware.
Vipin Mehta [Fri, 18 Feb 2011 21:13:03 +0000 (13:13 -0800)]
staging: ath6kl: Fixing key settings for WPA/WPA2
A bug was observed during the reconnection phase in the WPA/WPA2-PSK scenario
where the EAPOL frames were going encrypted during an auto reconnection
attempt. The initial 4-way handshake would go fine but then the driver
was getting a command to set default keys sometime later. Setting of an
incorrect flag (TX_USAGE) in the hadrware was causing the EAPOL frames during
the subsequent 4-way handshake attempts to go encrypted causing the AP to
reject the station.
Vipin Mehta [Fri, 18 Feb 2011 21:13:02 +0000 (13:13 -0800)]
staging: ath6kl: Fixing a NULL pointer exception
The driver was dereferencing a NULL pointer because of the device instance
being registered via the set_wiphy_dev() function. The function
ar6000_avail_ev() was passing the argument as NULL instead of using the one
returned by the MMC stack through the probe callback.
Jerome Marchand [Thu, 17 Feb 2011 16:11:49 +0000 (17:11 +0100)]
Staging: zram: initialize device on first read
Currently the device is initialized when first write is done to the
device. Any read attempt before the first write would fail, including
"hidden" read the user may not know about (as for example if he tries
to write a partial block).
This patch initializes the device on first request, whether read or
write.
Jonathan Cameron [Fri, 11 Feb 2011 14:20:00 +0000 (14:20 +0000)]
staging:iio:gyro:adis16060 cleanup and dead code removal
Removed stubs related to buffering and triggering. Put them back
when they are actually needed.
Fixed line length issues.
Made a number of functions static as no longer in header.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 11 Feb 2011 18:00:12 +0000 (10:00 -0800)]
Staging: hv: Remove osd layer
The OSD layer was a wrapper around native interfaces
adding little value and was infact buggy -
refer to the osd_wait.patch for details.
This patch gets rid of the OSD abstraction.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 11 Feb 2011 17:59:43 +0000 (09:59 -0800)]
Staging: hv: Use native wait primitives
In preperation for getting rid of the osd layer; change
the code to use native wait interfaces. As part of this,
fixed the buggy implementation in the osd_wait_primitive
where the condition was cleared potentially after the
condition was signalled.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Tue, 15 Feb 2011 11:35:40 +0000 (12:35 +0100)]
staging: brcm80211: improved checks on incompatible firmware
The return status of wl_ucode_init_buf() is now being used. Also a bug in
firmware validation, which could lead to incompatible firmware not being
rejected by the driver, has been fixed. Comment from Dan Carpenter on using
negative error values has been incorporated in this commit.
Signed-off-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Tue, 15 Feb 2011 10:13:51 +0000 (11:13 +0100)]
staging: brcm80211: bugfix for stack dump on firmware load problems
If there is a problem with the firmware load (eg, firmware not present in
/lib/firmware/brcm), then the driver would dump its stack instead of bailing
out gracefully. Root cause was an uninitialized variable (wl->pub) being
dereferenced in the rfkill portion of a cleanup routine (wl_remove). Fix was
to move the rfkill calls into the correct spot in wl_remove().
Signed-off-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Tue, 15 Feb 2011 10:13:50 +0000 (11:13 +0100)]
staging: brcm80211: bugfix for oops on firmware load problems
Upon firmware load failure, wl_release_fw() was called multiple
times. This caused the driver to oops. Solution was to remove redundant
wl_release_fw() calls.
Signed-off-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Mon, 14 Feb 2011 11:16:47 +0000 (12:16 +0100)]
staging: brcm80211: removed unused code because of mac rev cleanup
Code cleanup. Removed more defines, data structures and functions that were
unused because this driver supports mac core rev 22 and up. Got rid of redundant
brackets in wlc_bmac_txstatus() by moving locally defined variables above {}
scope.
Signed-off-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Brett Rudley <brudley@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Thu, 10 Feb 2011 14:27:45 +0000 (15:27 +0100)]
staging: brcm80211: remove #ifdef BCMDBG from regular functions
Under error condition debug functions are being called which
only have implementation when BCMDBG is defined. This result
in #ifdef BCMDBG blocks in functions. This patch fixes this by
mapping the debug functions to empty macro when BCMDBG is not
defined. This makes the calling function easier to read.
Reviewed-by: Brett Rudley <brudley@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Thu, 10 Feb 2011 14:27:44 +0000 (15:27 +0100)]
staging: brcm80211: remove warning introduced by rfkill implementation
During rfkill implementation the content of wlc_radio_upd function
was removed for testing purposes only. This ended up in the patch
sent out. This commit restores the function content, which was the
only function calling static function wlc_radio_enable. This removes
the compilation warning observed.
Reviewed-by: Brett Rudley <brudley@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Thu, 10 Feb 2011 11:03:51 +0000 (12:03 +0100)]
staging: brcm80211: store BSSID in driver config information
When mac80211 informs about new BSSID this was configured toward
the hardware device, but the information is also needed inside
the driver itself. This patch takes care of that.
Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Brett Rudley <brudley@broadcom.com> Reviewed-by: Henry Ptasinski <henryp@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The implementation for bss_info_changed was not handling all
changes as provided by mac80211 module. These have been added
and will log message with changed parameters.
Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Brett Rudley <brudley@broadcom.com> Reviewed-by: Henry Ptasinski <henryp@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The 802.11 core in the chipsets provides counters that are now
used to provide counter values to mac80211 through get_stats
callback. Counters related to ampdu and wmm (aka. wme) are not
yet incorporated.
Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Brett Rudley <brudley@broadcom.com> Reviewed-by: Henry Ptasinski <henryp@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Allocation of buffer in function wl_ucode_init_buf can fail. This was
signalled by an error message, but code continued to access the null
pointer. This is now avoided by jumping to failure label.
Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Brett Rudley <brudley@broadcom.com> Reviewed-by: Henry Ptasinski <henryp@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Thu, 10 Feb 2011 11:03:44 +0000 (12:03 +0100)]
staging: brcm80211: remove usage of printf (macro) from driver
The driver contained several calls to printf which was mapped
to printk using a macro. These have been changed to explicit
call to printk or use an appropropriate macro.
Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Brett Rudley <brudley@broadcom.com> Reviewed-by: Henry Ptasinski <henryp@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Thu, 10 Feb 2011 11:03:42 +0000 (12:03 +0100)]
staging: brcm80211: decrease level of non-error messages
Non-error messages which were printed using WL_ERROR macro
were decreased to WL_NONE (which is a no_printk) or WL_TRACE
level macros. mac80211 callbacks that are not handled by the
driver are printed with WL_ERROR.
Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Brett Rudley <brudley@broadcom.com> Reviewed-by: Henry Ptasinski <henryp@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Tomas Winkler [Thu, 10 Feb 2011 12:55:24 +0000 (14:55 +0200)]
staging/easycap: style changes in easycap_low.c
remove uneedet brackets in ifs and switches
drop pointless castings
other small fixes
Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Tomas Winkler [Thu, 10 Feb 2011 12:55:23 +0000 (14:55 +0200)]
staging/easycap: don't mask return value of usb_control_msg() by 0xFF
masking return value of usb_control_msg() will mask negative
error values into positive.
Cc: Mike Thomas <rmthomas@sciolus.org> Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Thu, 17 Feb 2011 21:29:14 +0000 (23:29 +0200)]
staging: xgifb: replace XGINew_LCD_Wait_Time() with mdelay()
XGINew_LCD_Wait_Time() is implemented using the I/O port 0x61, which is
X86-specific and will fail on other platforms. The code did not make any
sense, but I guess the intention has been to provide a function where
the unit for the delay is milliseconds.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Thu, 17 Feb 2011 21:29:13 +0000 (23:29 +0200)]
staging: xgifb: copy PCI ROM properly
Use proper helper functions to copy the PCI ROM. Also use dynamic memory
allocation. The original code mapped incorrect amount of memory and will
crash on some platforms.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Andres Salomon [Fri, 11 Feb 2011 01:56:27 +0000 (17:56 -0800)]
staging: olpc_dcon: clean up backlight handling
- Move bl_val and bl_dev into dcon_priv struct....
- The only time we ever read the backlight val from the dcon is
at probe time. Rather than calling dcon_get_backlight for that, just
read from the register.
- Drop dcon_get_backlight; it's just returning dcon->bl_val.
- Rename dcon_set_backlight_hw to dcon_set_backlight, and drop the
old dcon_set_backlight function. Move contents of old dcon_set_backlight
function into dconbl_set.
- Shuffle backlight_ops callbacks around to be closer to struct, and
rename them.
- Make use of new backlight_properties arg to backlight_device_register,
drop old code that set this manually.
Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Andres Salomon [Fri, 11 Feb 2011 01:54:58 +0000 (17:54 -0800)]
staging: olpc_dcon: move more global variables into dcon_priv
Global variables dcon_switched, dcon_irq_time, and dcon_load_time can all be moved
into the dcon_priv struct now that dcon_interrupt has access to dcon_priv.
Andres Salomon [Fri, 11 Feb 2011 01:54:24 +0000 (17:54 -0800)]
staging: olpc_dcon: move more variables into dcon_priv
This moves dcon_source and dcon_pending into the dcon_priv struct.
Because these variables are used by the IRQ handler (which is
registered in the model-specific callbacks), we end up needing
to move dcon_priv into olpc_dcon.h. This also changes the IRQ
registration to use the dcon_priv pointer as dev_id, instead of
dcon_driver.
Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Andres Salomon [Fri, 11 Feb 2011 01:53:24 +0000 (17:53 -0800)]
staging: olpc_dcon: add config options for XO_1 and XO_1_5, drop hardcoded XO-1 stuff
This adds CONFIG_FB_OLPC_DCON_1 and CONFIG_FB_OLPC_DCON_1_5 options for
allowing selection of XO-1 and/or XO-1.5 DCON support. In the process,
it also forces the xo_1.c and xo_1_5.c files to build as separate units,
correctly selects between XO-1 and XO-1.5 at runtime, and adds some
hacks to allow xo_1_5.c to build.
This isn't the cleanest patch, but it'll get better as more global
variables are dropped.
Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marek Belisko [Fri, 11 Feb 2011 01:49:24 +0000 (17:49 -0800)]
staging: olpc_dcon: Remove _strtoul() function.
olpc_dcon driver use self invented _strtoul function
which make similar check like strict_strtoul just extend
for space checking at last string place. Normally access
to sys file looks echo 1024 > /sys/... so space could be considered
as error character and we could simplify code using just strict_strtoul
function instead self invented.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Andres Salomon [Fri, 11 Feb 2011 01:48:38 +0000 (17:48 -0800)]
staging: olpc_dcon: move fb stuff info dcon_priv, and clean up fb handling
- move fbinfo and ignore_fb_events into dcon_priv
- add calls to {un,}lock_fb_info before calling fb_blank
- fail to load the driver if there are no registered framebuffers
That last one fixes a potential oops, where if the dcon driver loads
without a framebuffer registered, fb_blank will end up being passed a
NULL (and will attempt to dereference it).
Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>