openwrt/staging/blogic.git
13 years agoStaging: hv: vmbus: Rename vmbus_child_device_unregister
K. Y. Srinivasan [Thu, 8 Sep 2011 14:24:14 +0000 (07:24 -0700)]
Staging: hv: vmbus: Rename vmbus_child_device_unregister

The vmbus devices are NOT child devices; rename vmbus_child_device_unregister
to reflect this.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: vmbus: Rename vmbus_child_device_register
K. Y. Srinivasan [Thu, 8 Sep 2011 14:24:13 +0000 (07:24 -0700)]
Staging: hv: vmbus: Rename vmbus_child_device_register

The vmbus devices are NOT child devices; rename vmbus_child_device_register
to reflect this.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: vmbus: Rename vmbus_child_device_create
K. Y. Srinivasan [Thu, 8 Sep 2011 14:24:12 +0000 (07:24 -0700)]
Staging: hv: vmbus: Rename vmbus_child_device_create

The vmbus devices are NOT child devices; rename vmbus_child_device_create
to reflect this.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: dt3155v4l: remove irq_handler from struct dt3155_priv
H Hartley Sweeten [Wed, 7 Sep 2011 21:37:59 +0000 (14:37 -0700)]
staging: dt3155v4l: remove irq_handler from struct dt3155_priv

There is no reason to cache the irq_handler in struct dt3155_priv.  Just pass
the function directly in request_irq.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: dt3155v4l: pci_iomap returns a void __iomem * not a void *
H Hartley Sweeten [Wed, 7 Sep 2011 21:46:05 +0000 (14:46 -0700)]
staging: dt3155v4l: pci_iomap returns a void __iomem * not a void *

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: dt3155v4l: Remove printk noise
H Hartley Sweeten [Wed, 7 Sep 2011 17:20:48 +0000 (10:20 -0700)]
staging: dt3155v4l: Remove printk noise

Most of the printk's in this driver are just noise. Proper error codes
are being returned so just remove the noise and clean up the whitespace
in the code due to the removal.

The two messages left in the probe are useful. Convert them to dev_info
messages.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: mei: adding watchdog core dependency to kconfig
Oren Weil [Wed, 17 Aug 2011 10:22:12 +0000 (13:22 +0300)]
staging: mei: adding watchdog core dependency to kconfig

Signed-off-by: Oren Weil <oren.jer.weil@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: mei: adding mei_wd_stop function comment
Oren Weil [Wed, 7 Sep 2011 06:03:17 +0000 (09:03 +0300)]
staging: mei: adding mei_wd_stop function comment

Signed-off-by: Oren Weil <oren.jer.weil@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: mei: removing wd module parameters
Oren Weil [Wed, 7 Sep 2011 06:03:16 +0000 (09:03 +0300)]
staging: mei: removing wd module parameters

wd module parameter is not needed now that driver is using watchdog core.

Signed-off-by: Oren Weil <oren.jer.weil@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: mei: client init code cleanup
Oren Weil [Wed, 7 Sep 2011 06:03:15 +0000 (09:03 +0300)]
staging: mei: client init code cleanup

starting removing the dependency from the module parameters.
setting the default timeout on init so don't need to check if it is bigger
then zero.

Signed-off-by: Oren Weil <oren.jer.weil@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: mei: resuming timer regardless of the watchdog timeout value.
Oren Weil [Wed, 7 Sep 2011 06:03:14 +0000 (09:03 +0300)]
staging: mei: resuming timer regardless of the watchdog timeout value.

the timer_work does not only handle watchdog but also handles mei timeouts.

Signed-off-by: Oren Weil <oren.jer.weil@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: mei: renaming delayed work field and function to a meaningful name.
Oren Weil [Wed, 7 Sep 2011 06:03:13 +0000 (09:03 +0300)]
staging: mei: renaming delayed work field and function to a meaningful name.

the wd_work and mei_wd_timer() function was not just for watchdog.
mei managing the AMT watchdog going to be replace by the kernel watchdog
interface.

the mei_timer() will still manage the mei driver timeouts.

Signed-off-by: Oren Weil <oren.jer.weil@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: mei: adding set_timeout watchdog function
Oren Weil [Wed, 7 Sep 2011 06:03:12 +0000 (09:03 +0300)]
staging: mei: adding set_timeout watchdog function

add the ability to let the watchdog core set
the AMT watchdog timeout value.

the default value will be only set in the start function.

Signed-off-by: Oren Weil <oren.jer.weil@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: mei: adding watchdog ping
Oren Weil [Wed, 7 Sep 2011 06:03:11 +0000 (09:03 +0300)]
staging: mei: adding watchdog ping

adding watchdog ping to send ping/heartbeat to the the AMT watchdog client.
in addition removing the heartbeat sending from the driver timers function.

Signed-off-by: Oren Weil <oren.jer.weil@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: mei: adding watchdog ops
Oren Weil [Wed, 7 Sep 2011 06:03:10 +0000 (09:03 +0300)]
staging: mei: adding watchdog ops

adding start and stop function.
start - check if AMT wd client is connected, which is been connected on driver
load.
stop - send stop command to AMT wd.

Signed-off-by: Oren Weil <oren.jer.weil@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: mei: registering the MEI driver with the kernel watchdog core interface
Oren Weil [Wed, 7 Sep 2011 06:03:09 +0000 (09:03 +0300)]
staging: mei: registering the MEI driver with the kernel watchdog core interface

Adding kernel watchdog interface (/dev/watchdog) to the MEI Driver to support AMT Watchdog feature.
This patch and the following one will replace MEI Driver self management of the AMT watchdog
with the standard kernel watchdog interface.

Signed-off-by: Oren Weil <oren.jer.weil@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: mei: fix register access function comments
Oren Weil [Wed, 7 Sep 2011 06:03:08 +0000 (09:03 +0300)]
staging: mei: fix register access function comments

Signed-off-by: Oren Weil <oren.jer.weil@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: mei: removing dependency between WD and AMTHI init function.
Oren Weil [Wed, 7 Sep 2011 06:03:07 +0000 (09:03 +0300)]
staging: mei: removing dependency between WD and AMTHI init function.

AMTHI need to be initialized after WD Client was initialized, moving the AMTHI outside
of the WD initialization function.
in order to remove the coupling between the initialization of those clients.

AMTHI is getting initialized (getting connected to the FW feature/client) in two ways:
 1) if mei driver fails to send connect message to watchdog client (WD initialization), then
    immediately the AMTHI client getting initialized right after the watchdog initialization function.
 2) if Watchdog client success to send connect message to watchdog client, then only after
    the driver is getting the connect response message the AMTHI client is getting initialized

Signed-off-by: Oren Weil <oren.jer.weil@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme: change static device array to pointers
Manohar Vanga [Thu, 1 Sep 2011 09:15:24 +0000 (11:15 +0200)]
staging: vme: change static device array to pointers

Change the static array of 'struct device''s in struct vme_bridge
to instead use an array of pointers. This is in accordance with the
requirement that all kobjects be dynamically allocated (see
Documentation/kobject.txt) and never be statically allocated.

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Most return-values changed from -1 to proper errno macros.
Ali Bahar [Sat, 3 Sep 2011 19:14:24 +0000 (03:14 +0800)]
staging: r8712u: Most return-values changed from -1 to proper errno macros.

The ioctl handlers were frequently returning -1 upon failure. Most of
these have now been changed to proper errno macros.
The few remaining ones have been left untouched because either the
handler is not called (and so cannot be tested), or the function never
fails (and so cannot be system-tested), or requires new code to
distinguish its failures.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Tracking kmemleak false positives.
Larry Finger [Sat, 3 Sep 2011 19:14:23 +0000 (03:14 +0800)]
staging: r8712u: Tracking kmemleak false positives.

The frame buffers allocated in _r8712_init_recv_priv() are not tracked
by kmemleak, but they are freed when the driver is unloaded. To help
find any real leaks, these false positives are annotated for kmemleak.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Merging Realtek's latest (v2.6.6). Tx aggregation.
Ali Bahar [Sat, 3 Sep 2011 19:14:22 +0000 (03:14 +0800)]
staging: r8712u: Merging Realtek's latest (v2.6.6). Tx aggregation.

Tx Aggregation (CONFIG_R8712_TX_AGGR, known as CONFIG_USB_TX_AGGR in the
Realtek tarball) is now added.

However, its tests have not been successful! The default in the Realtek
tarball is to not build it -- and the Release Notes does not seem to list this
as a feature. I have tested the driver with and without this feature; the
former does not successfully associate when WPA2 is used.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Merging Realtek's latest (v2.6.6). Various fixes.
Ali Bahar [Sat, 3 Sep 2011 19:14:21 +0000 (03:14 +0800)]
staging: r8712u: Merging Realtek's latest (v2.6.6). Various fixes.

In r8712_generate_ie(), HT check is no longer done.
Removed r8712_add_ht_addt_info().
Changes to defragmentation handling, and queue selection.
Get TSSI command.
Added an Ad-Hoc check to is_desired_network()
r8712_ind_disconnect() now checks for Linked state.
r8712_xmit_bh() now schedules an xmit tasklet.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Merging Realtek's latest (v2.6.6). Various fixes.
Ali Bahar [Sat, 3 Sep 2011 19:14:20 +0000 (03:14 +0800)]
staging: r8712u: Merging Realtek's latest (v2.6.6). Various fixes.

passive_mode added to private ioctls.
New private ioctls added for RSSI, link speed, mac address, scan type,
and DCE-D.
In r8711_wx_get_scan(), we now sleep only 100 times, instead of 1000.
In r8711_wx_set_essid(), added a check for Ad-Hoc state.
In r8711_wx_get_rate(), added a check for RTL8712_RF_2T2R RF type.
Added Set chplan.
In r871x_get_wireless_stats(), updated the mechanism for displaying
link quality.
Added SetDIG and SetRA commands.
r8712_joinbss_cmd() no longer checks for Ad-Hoc mode.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Merging Realtek's latest (v2.6.6). New decl's and defines.
Ali Bahar [Sat, 3 Sep 2011 19:14:19 +0000 (03:14 +0800)]
staging: r8712u: Merging Realtek's latest (v2.6.6). New decl's and defines.

Removed unnecessary casts in kfree calls.
A few new types, defines and prototypes.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Merging Realtek's latest (v2.6.6). tx: NULL _in_ spin lock.
Ali Bahar [Sat, 3 Sep 2011 19:14:18 +0000 (03:14 +0800)]
staging: r8712u: Merging Realtek's latest (v2.6.6). tx: NULL _in_ spin lock.

In transmit path, r8712_free_xmitframe(), the pkt pointer is now
NULLed _within_ the spin lock.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Merging Realtek's latest (v2.6.6). Rework efuse data handling.
Ali Bahar [Sat, 3 Sep 2011 19:14:17 +0000 (03:14 +0800)]
staging: r8712u: Merging Realtek's latest (v2.6.6). Rework efuse data handling.

Rework efuse data handling.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Merging Realtek's latest (v2.6.6). Tx-code refactoring.
Ali Bahar [Sat, 3 Sep 2011 19:14:16 +0000 (03:14 +0800)]
staging: r8712u: Merging Realtek's latest (v2.6.6). Tx-code refactoring.

Refactor the TX code to prepare for aggregation.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Merging Realtek's latest (v2.6.6). Use stack, not malloc.
Ali Bahar [Sat, 3 Sep 2011 19:14:15 +0000 (03:14 +0800)]
staging: r8712u: Merging Realtek's latest (v2.6.6). Use stack, not malloc.

translate_scan() now uses the stack for some variables, instead of mallocing.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Merging Realtek's latest (v2.6.6). stop_drv_timers moved.
Ali Bahar [Sat, 3 Sep 2011 19:14:14 +0000 (03:14 +0800)]
staging: r8712u: Merging Realtek's latest (v2.6.6). stop_drv_timers moved.

stop_drv_timers() is now done in r871xu_dev_remove(), not netdev_close().

Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Merging Realtek's latest (v2.6.6). No power tracking OID.
Ali Bahar [Sat, 3 Sep 2011 19:14:13 +0000 (03:14 +0800)]
staging: r8712u: Merging Realtek's latest (v2.6.6). No power tracking OID.

The call to oid_rt_pro_set_power_tracking_hdl() is no longer available.
The function's definition remains, though it is currently unused.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Merging Realtek's latest (v2.6.6). Removed redundant .mem.
Ali Bahar [Sat, 3 Sep 2011 19:14:12 +0000 (03:14 +0800)]
staging: r8712u: Merging Realtek's latest (v2.6.6). Removed redundant .mem.

recv_frame.mem
mp_xmit_frame.mem
mp_xmit_packet.mem were not used, and so are now removed.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Merging Realtek's latest (v2.6.6). Updated include directives.
Ali Bahar [Sat, 3 Sep 2011 19:14:11 +0000 (03:14 +0800)]
staging: r8712u: Merging Realtek's latest (v2.6.6). Updated include directives.

These are the new include directives for header files.
The following were (somehow!) not explicity in Realtek's, but proved necessary:
"linux/usb.h" is needed for usb_alloc_urb();
"linux/interrupt.h" is needed for tasklet_struct. It was often a nested
include.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Merging Realtek's latest (v2.6.6). Redundant NULL check.
Ali Bahar [Sat, 3 Sep 2011 19:14:10 +0000 (03:14 +0800)]
staging: r8712u: Merging Realtek's latest (v2.6.6). Redundant NULL check.

Removed the redundant NULL check in LedControl871x.
As noted by Dan Carpenter, the address of a stack variable is never NULL.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Merging Realtek's latest (v2.6.6). Removed unused MSECS.
Ali Bahar [Sat, 3 Sep 2011 19:14:09 +0000 (03:14 +0800)]
staging: r8712u: Merging Realtek's latest (v2.6.6). Removed unused MSECS.

MSECS was never used in this driver. So removed.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Merging Realtek's latest (v2.6.6). Removed _usb_submit_urb.
Ali Bahar [Sat, 3 Sep 2011 19:14:08 +0000 (03:14 +0800)]
staging: r8712u: Merging Realtek's latest (v2.6.6). Removed _usb_submit_urb.

Replaced (Realtek's) _usb_submit_urb by (linux's own) usb_submit_urb.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Merging Realtek's latest (v2.6.6). Removed _usb_alloc_urb.
Ali Bahar [Sat, 3 Sep 2011 19:14:07 +0000 (03:14 +0800)]
staging: r8712u: Merging Realtek's latest (v2.6.6). Removed _usb_alloc_urb.

Replaced (Realtek's) _usb_alloc_urb by (linux's own) usb_alloc_urb.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Merging Realtek's latest (v2.6.6). Removed os_free_netdev.
Ali Bahar [Sat, 3 Sep 2011 19:14:06 +0000 (03:14 +0800)]
staging: r8712u: Merging Realtek's latest (v2.6.6). Removed os_free_netdev.

Replaced (Realtek's)  os_free_netdev by (linux's own) free_netdev.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Merging Realtek's latest (v2.6.6). Renamed _netdev_priv.
Ali Bahar [Sat, 3 Sep 2011 19:14:05 +0000 (03:14 +0800)]
staging: r8712u: Merging Realtek's latest (v2.6.6). Renamed _netdev_priv.

Renamed _netdev_priv to netdev_priv.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Merging Realtek's latest (v2.6.6). Copyright banners.
Ali Bahar [Sat, 3 Sep 2011 19:14:04 +0000 (03:14 +0800)]
staging: r8712u: Merging Realtek's latest (v2.6.6). Copyright banners.

Only copyright banners have been added to these files. No functional changes.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: zram: prevent accessing an unallocated table when init fails early
Jerome Marchand [Tue, 6 Sep 2011 13:02:12 +0000 (15:02 +0200)]
staging: zram: prevent accessing an unallocated table when init fails early

When the allocation of zram->table fails, we set zram->disksize to zero
to prevent accessing the unallocated table entries during cleanup.
However, we currently don't take this precaution when the initialization
fails earlier.

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: zram: fix zram locking
Jerome Marchand [Tue, 6 Sep 2011 13:02:11 +0000 (15:02 +0200)]
staging: zram: fix zram locking

Currently init_lock only prevents concurrent execution of zram_init_device()
and zram_reset_device() but not zram_make_request() nor sysfs store functions.

This patch changes init_lock into a rw_semaphore. A write lock is taken by
init, reset and store functions, a read lock is taken by zram_make_request().
Also, avoids to release the lock before calling __zram_reset_device() for
cleaning after a failed init, thus preventing any concurrent task to see an
inconsistent state of zram.

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Update README file
Mark Einon [Sun, 4 Sep 2011 10:24:43 +0000 (11:24 +0100)]
staging: et131x: Update README file

I believe that the driver is up to date with the latest network driver changes, so removing this line from the TODO to see if anyone else disagrees.

Also all useless typecasts are now dead.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Remove ai_force_[duplex|speed] from et131x_adapter
Mark Einon [Sun, 4 Sep 2011 10:24:42 +0000 (11:24 +0100)]
staging: et131x: Remove ai_force_[duplex|speed] from et131x_adapter

The ai_force settings were used to set the ethernet speed and duplex manually.
This is now being done by the phy_device, so remove.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Remove struct mi_regs from et1310_phy.h
Mark Einon [Sun, 4 Sep 2011 10:24:41 +0000 (11:24 +0100)]
staging: et131x: Remove struct mi_regs from et1310_phy.h

This structure is no longer used, and references registers defined in mii.h and other parts of et1310_phy.h

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Replace magic numbers in et1310_phy.c with defines
Mark Einon [Sun, 4 Sep 2011 10:24:40 +0000 (11:24 +0100)]
staging: et131x: Replace magic numbers in et1310_phy.c with defines

Replaced et131x_phy.c magic numbers specifying registers and their values with defines, defined in et131x_phy.h

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Remove duplicated register defines from et1310_phy.h
Mark Einon [Sun, 4 Sep 2011 10:24:39 +0000 (11:24 +0100)]
staging: et131x: Remove duplicated register defines from et1310_phy.h

The VMI_* set of register defines are not used, and duplicate the set of PHY_* registers from the same file, which are used - hence removing.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Remove cached_mask_value from et131x_adapter
Mark Einon [Sun, 4 Sep 2011 10:24:38 +0000 (11:24 +0100)]
staging: et131x: Remove cached_mask_value from et131x_adapter

cached_mask_value is only ever assigned, never read. Remove it.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Remove registry_rx_mem_end from struct et131x_adapter
Mark Einon [Sun, 4 Sep 2011 10:24:37 +0000 (11:24 +0100)]
staging: et131x: Remove registry_rx_mem_end from struct et131x_adapter

registry_rx_mem_end is not referenced anywhere in the driver.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: remove calls to netif_carrier_[on|off] from et131x_mii_check
Mark Einon [Sun, 4 Sep 2011 10:24:36 +0000 (11:24 +0100)]
staging: et131x: remove calls to netif_carrier_[on|off] from et131x_mii_check

As et131x_adjust_link is called from the phydev in response to a netif_carrier_[on|off], and is the only caller of et131x_mii_check, we don't need to call netif_carrier_[on|off] again.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Remove PHY interrupt handling code from driver isr handler
Mark Einon [Sun, 4 Sep 2011 10:24:35 +0000 (11:24 +0100)]
staging: et131x: Remove PHY interrupt handling code from driver isr handler

The PHY interrupt is now handled by the phy_device, and the equivalent code is present in et131x_adjust_link, called from the phy_device when needed.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Remove redundant struct adapter members
Mark Einon [Sun, 4 Sep 2011 10:24:34 +0000 (11:24 +0100)]
staging: et131x: Remove redundant struct adapter members

adapter->speed_duplex was never referenced.
adapter->registry_phy_coma was always set to zero, even in the vendor driver.

Removing all member references and associated dead code.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Remove private adapter->duplex_mode and use phydev->duplex instead
Mark Einon [Sun, 4 Sep 2011 10:24:33 +0000 (11:24 +0100)]
staging: et131x: Remove private adapter->duplex_mode and use phydev->duplex instead

The phy device keeps a note of the duplex mode, so use that value instead of duplex mode.

Also use the phydev defines for duplex modes, and remove the driver private ones.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Remove private adapter->linkspeed and use phydev->speed instead
Mark Einon [Sun, 4 Sep 2011 10:24:32 +0000 (11:24 +0100)]
staging: et131x: Remove private adapter->linkspeed and use phydev->speed instead

The phy device keeps a note of the link speed, so use that value instead of the driver private one.

Also use the phydev defines for link speeds, and remove the driver private ones.

adapter->hw_errs was never used, even in the vendor driver, so remove that too.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Amend README file
Mark Einon [Sat, 3 Sep 2011 11:49:07 +0000 (12:49 +0100)]
staging: et131x: Amend README file

I think the kernel style cleanups are done now.
Adding myself as a recipient of patches.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Fix checkpatch whitespace warnings
Mark Einon [Sat, 3 Sep 2011 11:49:06 +0000 (12:49 +0100)]
staging: et131x: Fix checkpatch whitespace warnings

Some of my previous hacking attempts have not been following the rules.
All fixes either lines > 80 chars or whitespace corrections (spaces->tabs etc).

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: rtl8192e: Fix format warning
Larry Finger [Thu, 1 Sep 2011 17:32:28 +0000 (12:32 -0500)]
staging: rtl8192e: Fix format warning

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Use MII register defines from mii.h
Mark Einon [Wed, 31 Aug 2011 16:46:41 +0000 (17:46 +0100)]
staging: et131x: Use MII register defines from mii.h

Use defines from include/linux/mii.h instead of et131x_phy.h and delete the latter defines.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging/cxt1e1: Header cleanup
Michal Marek [Wed, 31 Aug 2011 13:31:01 +0000 (15:31 +0200)]
staging/cxt1e1: Header cleanup

Remove dead and unused code in sbecom_inline_linux.h. This also fixes a
build failure under Turkish locale, where include/config/modversions.h
is incorrectly named as modversIons.h (an unrelated kbuild bug) and the
driver tries to needlessly include the empty file.

Reported-by: Serdar KÖYLÜ <s.koylux@gmail.com>
Cc: Bob Beers <bob.beers@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: sep: call to sep_ioctl() may leave driver in unusable state
Alexey Khoroshilov [Tue, 30 Aug 2011 21:57:10 +0000 (01:57 +0400)]
staging: sep: call to sep_ioctl() may leave driver in unusable state

If sep_ioctl() is called from a process that does not own
current transaction, it unlocks unheld sep->ioctl_mutex and
returns -EACCES leaving sep->sep_mutex acquired.

The patch fixes the mutex lock-unlock mismatch.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: panel: Fixed checkpatch warning about simple_strtoul()
Pelle Windestam [Tue, 30 Aug 2011 18:29:24 +0000 (20:29 +0200)]
staging: panel: Fixed checkpatch warning about simple_strtoul()

Fixed the checkpatch warning about sing simple_strtoul instead of
kstrtoul() in panel.c.

Signed-off-by: Pelle Windestam <iceaway@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Remove redundant phy code
Mark Einon [Tue, 30 Aug 2011 11:47:24 +0000 (12:47 +0100)]
staging: et131x: Remove redundant phy code

Now we are using a phy_device, remove driver functionality that is now handled by the phydev.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Remove xcvr_addr and et131x_xcvr_find
Mark Einon [Tue, 30 Aug 2011 11:47:23 +0000 (12:47 +0100)]
staging: et131x: Remove xcvr_addr and et131x_xcvr_find

Use the phy_device equivalents instead.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: converting et131x_ioctl to use phy_mii_ioctl
Mark Einon [Tue, 30 Aug 2011 11:47:22 +0000 (12:47 +0100)]
staging: et131x: converting et131x_ioctl to use phy_mii_ioctl

Handing over ioctls handled by the driver to the phydev.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: mei: unlock dev->device_lock mutex on error path in mei_open()
Alexey Khoroshilov [Tue, 30 Aug 2011 20:41:14 +0000 (00:41 +0400)]
staging: mei: unlock dev->device_lock mutex on error path in mei_open()

mei_open() acquires dev->device_lock mutex and try to allocate mei_cl,
but if the allocation fails it goes to return statement. As a result
dev->device_lock left locked.

The patch fixes goto to unlock dev->device_lock mutex on this path.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleaned up softmac srom macro
Roland Vossen [Mon, 5 Sep 2011 08:47:35 +0000 (10:47 +0200)]
staging: brcm80211: cleaned up softmac srom macro

Substituted macro.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reported-by: Joe Perches <joe@perches.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleaned up softmac scb.h macro's
Roland Vossen [Fri, 2 Sep 2011 14:00:38 +0000 (16:00 +0200)]
staging: brcm80211: cleaned up softmac scb.h macro's

Substituted/removed macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleaned up softmac pub.h macro's
Roland Vossen [Fri, 2 Sep 2011 14:00:37 +0000 (16:00 +0200)]
staging: brcm80211: cleaned up softmac pub.h macro's

Substituted/removed macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove AP related code from softmac
Roland Vossen [Fri, 2 Sep 2011 14:00:36 +0000 (16:00 +0200)]
staging: brcm80211: remove AP related code from softmac

AP support was only partially implemented and never invoked.
AP related code sections removed.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleaned up more softmac macro's
Roland Vossen [Fri, 2 Sep 2011 14:00:35 +0000 (16:00 +0200)]
staging: brcm80211: cleaned up more softmac macro's

Substituted/removed macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleaned up softmac nicpci.c/nicpci.h macro's
Roland Vossen [Fri, 2 Sep 2011 14:00:34 +0000 (16:00 +0200)]
staging: brcm80211: cleaned up softmac nicpci.c/nicpci.h macro's

Substituted macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleaned up softmac phy macro's affecting code flow
Roland Vossen [Fri, 2 Sep 2011 14:00:33 +0000 (16:00 +0200)]
staging: brcm80211: cleaned up softmac phy macro's affecting code flow

Substituted macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove 'default n' from Kconfig
Arend van Spriel [Fri, 2 Sep 2011 14:00:32 +0000 (16:00 +0200)]
staging: brcm80211: remove 'default n' from Kconfig

Kconfig options are by default not selected so adding the
statement 'default n' to the option is not needed.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove sparse warning from main.c
Arend van Spriel [Fri, 2 Sep 2011 14:00:31 +0000 (16:00 +0200)]
staging: brcm80211: remove sparse warning from main.c

The source file main.c contained several sparse warnings which
have been cleaned up.

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: use address space qualifier in brcmfmac
Arend van Spriel [Fri, 2 Sep 2011 14:00:30 +0000 (16:00 +0200)]
staging: brcm80211: use address space qualifier in brcmfmac

Several sparse warning were issued due to missing __user qualifier
for brcmfmac variables. This patch adds those.

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: replace 0 integer with NULL pointer
Arend van Spriel [Fri, 2 Sep 2011 14:00:29 +0000 (16:00 +0200)]
staging: brcm80211: replace 0 integer with NULL pointer

Running sparse showed following warning: Using plain integer as NULL
pointer. This has been fixed.

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove extern keyword from function definition
Arend van Spriel [Fri, 2 Sep 2011 14:00:28 +0000 (16:00 +0200)]
staging: brcm80211: remove extern keyword from function definition

Sparse warning was given when using the extern keyword in the function
definition. This patch removes those instances.

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleaned up several main.h/main.c related macro's
Roland Vossen [Thu, 1 Sep 2011 09:17:20 +0000 (11:17 +0200)]
staging: brcm80211: cleaned up several main.h/main.c related macro's

Moved, deleted or substituted macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleaned up several softmac macro's
Roland Vossen [Thu, 1 Sep 2011 09:17:19 +0000 (11:17 +0200)]
staging: brcm80211: cleaned up several softmac macro's

Moved, deleted or substituted macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleaned up softmac channel related macro's
Roland Vossen [Thu, 1 Sep 2011 09:17:18 +0000 (11:17 +0200)]
staging: brcm80211: cleaned up softmac channel related macro's

Moved, deleted or substituted macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: macro cleanup in softmac ampdu.c
Roland Vossen [Thu, 1 Sep 2011 09:17:17 +0000 (11:17 +0200)]
staging: brcm80211: macro cleanup in softmac ampdu.c

Moved, deleted or substituted macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: macro cleanup in softmac aiutils.h
Roland Vossen [Thu, 1 Sep 2011 09:17:16 +0000 (11:17 +0200)]
staging: brcm80211: macro cleanup in softmac aiutils.h

Moved, deleted or substituted macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: removed redundant SI_INFO() macro from softmac
Roland Vossen [Thu, 1 Sep 2011 09:17:15 +0000 (11:17 +0200)]
staging: brcm80211: removed redundant SI_INFO() macro from softmac

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: removed redundant macro's in softmac
Roland Vossen [Thu, 1 Sep 2011 09:17:14 +0000 (11:17 +0200)]
staging: brcm80211: removed redundant macro's in softmac

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: use static qualifier for local symbols in brcmsmac
Arend van Spriel [Thu, 1 Sep 2011 09:17:13 +0000 (11:17 +0200)]
staging: brcm80211: use static qualifier for local symbols in brcmsmac

Cleanup resulted in merging several files and made several symbols
local to a source file. These were found by running sparse as it
gave the warning: symbol 'foo' was not declared. Should it be static?

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove sparse warnings from mac80211_if.c
Arend van Spriel [Thu, 1 Sep 2011 09:17:12 +0000 (11:17 +0200)]
staging: brcm80211: remove sparse warnings from mac80211_if.c

Some changes have been made to get rid of sparse warnings in the
source file mac80211_if.c.

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: reduce sparse messages on brcmsmac sources
Arend van Spriel [Thu, 1 Sep 2011 09:17:11 +0000 (11:17 +0200)]
staging: brcm80211: reduce sparse messages on brcmsmac sources

Running sparse over the driver sources showed 1356 sparse messages
and quite a number are due to missing __iomem attribute in some
places. This patch reduces the number significantly.

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: use static qualifier for local symbols in brcmfmac
Arend van Spriel [Thu, 1 Sep 2011 09:17:10 +0000 (11:17 +0200)]
staging: brcm80211: use static qualifier for local symbols in brcmfmac

Cleanup resulted in merging several files and made several symbols
local to a source file. These were found by running sparse as it
gave the warning: symbol 'foo' was not declared. Should it be static?

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove static function declaration in dhd_linux
Franky Lin [Thu, 1 Sep 2011 09:17:09 +0000 (11:17 +0200)]
staging: brcm80211: remove static function declaration in dhd_linux

Reshuffle function order in dhd_linux of fullmac to get rid of
static function declaration

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove static function declaration in bcmsdh_sdmmc
Franky Lin [Thu, 1 Sep 2011 09:17:08 +0000 (11:17 +0200)]
staging: brcm80211: remove static function declaration in bcmsdh_sdmmc

Reshuffle function order in bcmsdh_sdmmc of fullmac to get rid of
static function declaration

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove unused sdioh command type code in fullmac
Franky Lin [Thu, 1 Sep 2011 09:17:07 +0000 (11:17 +0200)]
staging: brcm80211: remove unused sdioh command type code in fullmac

sdioh command type is not used in brcmf_sdioh_request_word. This patch
removes the related code.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove unused sdioh data mode code in fullmac
Franky Lin [Thu, 1 Sep 2011 09:17:06 +0000 (11:17 +0200)]
staging: brcm80211: remove unused sdioh data mode code in fullmac

sdioh data mode is not used in brcmf_sdioh_request_buffer. The patch
removes the related code.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove function wrapper of getting sb window address
Franky Lin [Thu, 1 Sep 2011 09:17:05 +0000 (11:17 +0200)]
staging: brcm80211: remove function wrapper of getting sb window address

The address stored in sdiodev can be used directly instead of using
the wrapper function brcmf_sdcard_cur_sbwad.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove duplicate set sb window address function
Franky Lin [Thu, 1 Sep 2011 09:17:04 +0000 (11:17 +0200)]
staging: brcm80211: remove duplicate set sb window address function

In fullmac, brcmf_sdbrcm_set_siaddr_window and brcmf_sdcard_set_sbaddr_window
have identical fucntionality. Remove the one in dhd_sdio.c

Reported-by: Rafal Milecki <zajec5@gmail.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: consolidate SHOW_EVENTS code under BCMDBG in fullmac
Franky Lin [Thu, 1 Sep 2011 09:17:03 +0000 (11:17 +0200)]
staging: brcm80211: consolidate SHOW_EVENTS code under BCMDBG in fullmac

Use unify config marco for debug info. Related event debug print out can be
enabled/disabled by the dedicated event message level.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: replaced fullmac BRCMF_PM_RESUME_WAIT macro with function
Roland Vossen [Thu, 1 Sep 2011 09:17:02 +0000 (11:17 +0200)]
staging: brcm80211: replaced fullmac BRCMF_PM_RESUME_WAIT macro with function

Code cleanup. Advantage is more readable code and better type checking.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleaned up fullmac macro BRCMF_PM_RESUME_RETURN_ERROR
Roland Vossen [Thu, 1 Sep 2011 09:17:01 +0000 (11:17 +0200)]
staging: brcm80211: cleaned up fullmac macro BRCMF_PM_RESUME_RETURN_ERROR

Macros impacting the code flow are sort of frowned upon. No other macro's
in the source code impact the code flow. Replaced macro by function.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove static function prototypes from main.c
Arend van Spriel [Thu, 1 Sep 2011 09:17:00 +0000 (11:17 +0200)]
staging: brcm80211: remove static function prototypes from main.c

Function prototypes for static functions are not strictly needed and
considered unwanted by linux community. This patch reorders the
functions in brcmsmac/main.c and gets rid of the prototypes.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: use min_t() instead of min()
Henry Ptasinski [Thu, 1 Sep 2011 09:16:59 +0000 (11:16 +0200)]
staging: brcm80211: use min_t() instead of min()

Also eliminate a cast to int that could cause issues with very large values
of di->rxbufsize (as suggested by Dan Carpenter).

Signed-off-by: Henry Ptasinski <henryp@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: removed static function declarations in 3 files
Roland Vossen [Thu, 1 Sep 2011 09:16:58 +0000 (11:16 +0200)]
staging: brcm80211: removed static function declarations in 3 files

nicpci.c, srom.c and stf.c

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>