Commit graph

233802 commits

Author SHA1 Message Date
K. Y. Srinivasan
0c3b7b2f75 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>
2011-02-18 13:11:03 -08:00
K. Y. Srinivasan
df3493e0b3 Staging: hv: Use native page allocation/free functions
In preperation for getting rid of the osd.[ch] files;
change all page allocation/free functions to use native interfaces.

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>
2011-02-18 13:11:03 -08:00
Roland Vossen
7249e6a17b 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>
2011-02-18 13:04:55 -08:00
Roland Vossen
490e00f685 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>
2011-02-18 13:04:55 -08:00
Roland Vossen
59909c7c29 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>
2011-02-18 13:04:54 -08:00
Stanislav Fomichev
02160695a4 staging: brcm80211: replace bcopy with memcpy
Use native linux memcpy instead of legacy bcopy

Signed-off-by: Stanislav Fomichev <kernel@fomichev.me>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:03:27 -08:00
Stanislav Fomichev
70de655cac staging: brcm80211: use %zu instead of %d for size_t
Signed-off-by: Stanislav Fomichev <kernel@fomichev.me>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:00:23 -08:00
Roland Vossen
02aed8f3d6 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>
2011-02-18 12:58:52 -08:00
Roland Vossen
3746507af6 staging: brcm80211: removed obsolete comments
Code cleanup. Only mac core revisions 22 and higher are supported, therefore
comment related to older mac revisions was removed.

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>
2011-02-18 12:58:51 -08:00
Roland Vossen
7234592364 staging: brcm80211: removal of inactive d11 code
Code cleanup. Removed code that was never invoked because the mac core
revision supported is always higher than 22.

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>
2011-02-18 12:58:51 -08:00
Arend van Spriel
aba0586c8a staging: brcm80211: remove declaration of unused string array
The constant array declaration aci_names is not referenced
anywhere in the code so it has been removed.

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>
2011-02-18 12:55:24 -08:00
Arend van Spriel
bc042b6726 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>
2011-02-18 12:55:24 -08:00
Arend van Spriel
77919fd72e 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>
2011-02-18 12:55:24 -08:00
Arend van Spriel
cf60191a2d staging: brcm80211: remove unnecessary cast in wlc_d11hdrs_mac80211
memset prototype specifies a void pointer as buffer. Conversion from
any pointer type to void pointer does not require an explicit cast.

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>
2011-02-18 12:52:50 -08:00
Arend van Spriel
6677eaa335 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>
2011-02-18 12:52:50 -08:00
Arend van Spriel
c234656fa3 staging: brcm80211: set beacon interval as provided by mac80211
Driver now follows beacon interval as set by mac80211 callback.

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>
2011-02-18 12:52:50 -08:00
Arend van Spriel
e0caf15007 staging: brcm80211: store HT operation mode settings from mac80211
The HT operation mode is provided by mac80211 and they are now
stored in the driver.

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>
2011-02-18 12:52:49 -08:00
Arend van Spriel
d8a1fb44ab staging: brcm80211: handle change in association state from mac80211
The driver has flags for association state which are now being set
according to notification from mac80211.

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>
2011-02-18 12:52:36 -08:00
Arend van Spriel
4191e2d564 staging: brcm80211: cleanup mac80211 callback bss_info_changed
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>
2011-02-18 12:48:57 -08:00
Arend van Spriel
e4cf544edb staging: brcm80211: enable driver counter functionality
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>
2011-02-18 12:48:57 -08:00
Arend van Spriel
8746e2baae staging: brcm80211: fix potential null pointer access handling ucode buffer
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>
2011-02-18 12:48:03 -08:00
Arend van Spriel
0bef7748e1 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>
2011-02-18 12:47:41 -08:00
Arend van Spriel
9d2c415612 staging: brcm80211: return error code to mac80211 for 40MHz channels
When mac80211 attempts to configure the driver for 40MHz channel it
will return an error code -EIO as this is not yet supported.

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>
2011-02-18 12:45:58 -08:00
Arend van Spriel
4a07915056 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>
2011-02-18 12:45:35 -08:00
Arend van Spriel
3646dd971b staging: brcm80211: use consistent naming for mac80211 callbacks
Most mac80211 callbacks were named using prefix 'wl_ops' except
for a few. These have been aligned to use the prefix as well.

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>
2011-02-18 12:43:37 -08:00
Tomas Winkler
073f482526 staging/easycap: use %p for printing pointers
use %p instead of %X
drop casting of pointer to long long int

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:42:12 -08:00
Tomas Winkler
7ee7142186 staging/easycap: drop EASYCAP_NEEDS_USBVIDEO_H
remove pointless compilation flag

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:42:12 -08:00
Tomas Winkler
30516058e2 staging/easycap: kill EASYCAP_NEEDS_V4L2_DEVICE_H and EASYCAP_NEEDS_V4L2_FOPS
EASYCAP_NEEDS_V4L2_DEVICE_H and EASYCAP_NEEDS_V4L2_FOPS are required in
in-tree driver

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:42:12 -08:00
Tomas Winkler
3e17e39e11 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>
2011-02-18 12:40:01 -08:00
Tomas Winkler
ccb6d2e5dc 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>
2011-02-18 12:40:00 -08:00
Tomas Winkler
72075789ea staging/easycap: add first level indetnation for easycap_low.c
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>
2011-02-18 12:40:00 -08:00
Aaro Koskinen
1b3909e5c5 staging: xgifb: eliminate a global variable
Move the XGIfb_mmio_size global variable into the video_info struct.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:38:19 -08:00
Aaro Koskinen
45dcfaf150 staging: xgifb: clean up xgifb_remove()
Delete redudant comments, blank lines and a redundant semicolon.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:38:18 -08:00
Aaro Koskinen
5c0ef2ac36 staging: xgifb: release and unmap I/O memory
Release and unmap memory on probe error paths and when the module
is removed.

The patch enables unloading and reloading the xgifb module.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:38:18 -08:00
Aaro Koskinen
d80aaa01ae 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>
2011-02-18 12:38:18 -08:00
Aaro Koskinen
0f07d945f4 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>
2011-02-18 12:38:17 -08:00
Aaro Koskinen
6af8172043 staging: xgifb: fix some memory leaks
Some xgifb_probe() error paths are missing proper vfree()s. Move them
all into a single place.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:38:17 -08:00
Aaro Koskinen
bb29223453 staging: xgifb: xgifb_probe() error paths missing framebuffer_release()
framebuffer_release() is missing from error paths.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:38:17 -08:00
Krzysztof Hałasa
decebabf24 staging: Solo6x10: Changed solo6010* -> solo*, solo6x10* etc.
Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:37:04 -08:00
Krzysztof Hałasa
ae69b22c6c staging: Solo6x10: Stripped "solo6010-" from file names.
This driver supports both Solo-6010 and Solo-6110 chips anyway.
Renamed solo6010.h -> solo6x10.h.

Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:37:04 -08:00
Krzysztof Hałasa
43d1136d2c staging: Solo6x10: remove unneeded __solo parameter from SOLO_*_EXT_ADDR macros.
Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:37:04 -08:00
Krzysztof Hałasa
908113d8eb staging: Solo6x10: Add support for SOLO6110 chip.
Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:37:03 -08:00
Krzysztof Hałasa
856e22d3cd staging: Solo6x10: Align MPEG video on 8-byte boundary instead of 32-byte.
Solo-6110 only supports 8-byte alignment anyway.

Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:37:03 -08:00
Krzysztof Hałasa
c55564fdf7 staging: Solo6x10: Build MPEG4 headers on the fly.
This will make them maintainable. Also, it now works on big-endian systems.

This is the slow path (done every 1+ second, per channel) so I guess
there is no need to cache the results.

I have removed CBR-related bits from the MPEG4 VOL header since we can't
do CBR (at least yet).

Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:37:02 -08:00
Krzysztof Hałasa
98ab1c9978 staging: Solo6x10: accept WxH >= screen dimentions.
This makes it possible to request full resolution (704x576 or 704x480)
independently of the color system used (PAL or NTSC).

Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:37:02 -08:00
Mike McCormack
97a6688aa2 staging: rtl8192e: Remove unused CONFIG_RTL8180_IO_MAP
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:35:35 -08:00
Mike McCormack
0cfc618531 staging: rtl8192e: Don't disable interrupts in mgmt_tx_lock
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:35:34 -08:00
Mike McCormack
4573d1459c staging: rtl8192e: Refactor rtl8192_ioctl into two functions
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:35:34 -08:00
Mike McCormack
48f0210695 staging: rtl8192e: rf_ps_lock doesn't need to be IRQ safe
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:35:34 -08:00
Mike McCormack
18c53dfe03 staging: rtl8192e: Remove useless TxCheckStuck function
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:35:33 -08:00