firefly-linux-kernel-4.4.55.git
13 years agoStaging: bcm: Remove assignment in if condition reported by checkpatch.pl
Kevin McKinney [Fri, 7 Oct 2011 22:50:11 +0000 (18:50 -0400)]
Staging: bcm: Remove assignment in if condition reported by checkpatch.pl

There is a case where an assignment was being done
in an if condition. This patch removes the assignment
from the if condition and places the assignment above
the if statement; thereby improving the readability of
the code.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: bcm: Replace dated variable __FUNCTION__ reported by checkpatch.pl
Kevin McKinney [Fri, 7 Oct 2011 22:50:10 +0000 (18:50 -0400)]
Staging: bcm: Replace dated variable __FUNCTION__ reported by checkpatch.pl

This patch replaces the obsolete variable, __FUNCTION__, that
holds the name of the current function with variable, __func__.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: bcm: Fix coding style issues reported by checkpatch.pl
Kevin McKinney [Fri, 7 Oct 2011 22:50:09 +0000 (18:50 -0400)]
Staging: bcm: Fix coding style issues reported by checkpatch.pl

This patch cleans up several hundred code style issues found
in Misc.c reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Update TODO list
Mark Einon [Mon, 10 Oct 2011 15:22:32 +0000 (16:22 +0100)]
staging: et131x: Update TODO list

Added some more tasks to the TODO list, as highlighted by Francois
Romieu <romieu@fr.zoreil.com>.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Remove unused mac defines
Mark Einon [Mon, 10 Oct 2011 15:22:09 +0000 (16:22 +0100)]
staging: et131x: Remove unused mac defines

Remove some unused defines from et1310_mac.c.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Fix et131x smatch issues
Mark Einon [Mon, 10 Oct 2011 15:21:12 +0000 (16:21 +0100)]
staging: et131x: Fix et131x smatch issues

This fixes the following issues:

et131x_initpci.c +488 et131x_adjust_link(45) error: we previously assumed 'phydev' could be null.
et131x_initpci.c +504 et131x_adjust_link(61) warn: variable dereferenced before check 'phydev'

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Fix et131x sparse warnings
Mark Einon [Mon, 10 Oct 2011 15:21:11 +0000 (16:21 +0100)]
staging: et131x: Fix et131x sparse warnings

This fixes the following warnings:

et1310_mac.c:375:44: warning: incorrect type in initializer (different address spaces)
et1310_mac.c:382:28: warning: incorrect type in argument 2 (different address spaces)
et1310_mac.c:384:31: warning: incorrect type in argument 2 (different address spaces)
et131x_initpci.c:555:5: warning: symbol 'et131x_mii_probe' was not declared. Should it be static?
et131x_netdev.c:267:5: warning: symbol 'et131x_ioctl' was not declared. Should it be static?
et131x_netdev.c:285:5: warning: symbol 'et131x_set_packet_filter' was not declared. Should it be static?
et131x_netdev.c:347:6: warning: symbol 'et131x_multicast' was not declared. Should it be static?
et131x_netdev.c:420:5: warning: symbol 'et131x_tx' was not declared. Should it be static?
et131x_netdev.c:453:6: warning: symbol 'et131x_tx_timeout' was not declared. Should it be static?
et131x_netdev.c:511:5: warning: symbol 'et131x_change_mtu' was not declared. Should it be static?
et131x_netdev.c:564:5: warning: symbol 'et131x_set_mac_addr' was not declared. Should it be static?

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Remove file et131x_version.h
Mark Einon [Fri, 7 Oct 2011 21:53:56 +0000 (22:53 +0100)]
staging: et131x: Remove file et131x_version.h

Removed defines in et131x_version.h and replaced them by actual
strings where convinient, or moved them to et131x.h

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Move pm calls from pci device to driver device
Mark Einon [Fri, 7 Oct 2011 21:52:51 +0000 (22:52 +0100)]
staging: et131x: Move pm calls from pci device to driver device

Move the pci driver suspend/resume calls up to the driver.pm ops
structure, as they are not pci device specific.

Thanks to Francois Romieu <romieu@fr.zoreil.com> for pointing this out.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Remove error path from suspend/resume code
Mark Einon [Fri, 7 Oct 2011 21:52:50 +0000 (22:52 +0100)]
staging: et131x: Remove error path from suspend/resume code

Removing an error path from et131x suspend/resume functions.

Also added a call to phy_stop() to complement the phy_start() call
during device start/stop routine.

Thanks to Francois Romieu <romieu@fr.zoreil.com> for pointing this out.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Removing Olaf Hartmann's email as it bounces
Mark Einon [Fri, 7 Oct 2011 21:51:27 +0000 (22:51 +0100)]
staging: et131x: Removing Olaf Hartmann's email as it bounces

On 3 October 2011 18:51, Uwe Ranft <uwe.ranft@telozo.com> wrote:
> Hello,
> olaf is not more longer owner of this e-mailadress. he has left our
> company.
> Please remove olaf fron the mailing list!
> Best Regards
> Uwe

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Fix possible out-of-bounds index with TKIP and AES keys
Larry Finger [Sat, 8 Oct 2011 19:01:06 +0000 (14:01 -0500)]
staging: r8712u: Fix possible out-of-bounds index with TKIP and AES keys

Array XGrpKey has only 2 elements and uses (keyid - 1) as the index, which
allows the possibility of memory corruption from an out-of-bounds index.

This problem was reported by a new version of smatch.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: zcache: fix crash on cpu remove
Seth Jennings [Thu, 6 Oct 2011 19:28:26 +0000 (14:28 -0500)]
staging: zcache: fix crash on cpu remove

In the case that a cpu is taken offline before zcache_do_preload() is
ever called on the cpu, the per-cpu zcache_preloads structure will
be uninitialized.  In the CPU_DEAD case for zcache_cpu_notifier(),
kp->obj is not checked before calling kmem_cache_free() on it.
If it is NULL, a crash results.

This patch ensures that both kp->obj and kp->page are not NULL before
calling the respective free functions. In practice, just checking
one or the other should be sufficient since they are assigned together
in zcache_do_preload(), but I check both for safety.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Dave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: dt3155v4l: silence a compiler warning
Dan Carpenter [Thu, 6 Oct 2011 06:17:38 +0000 (09:17 +0300)]
Staging: dt3155v4l: silence a compiler warning

The '!' is dead code that was left over from a previous version.
It causes a compiler warning:
drivers/staging/dt3155v4l/dt3155v4l.c:335:3: warning: value computed
is not used

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoeasycap: fix ntsc module parameter description
Thomas Petazzoni [Thu, 6 Oct 2011 12:04:14 +0000 (14:04 +0200)]
easycap: fix ntsc module parameter description

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:dac:ad5638: Fix channel address
Lars-Peter Clausen [Fri, 7 Oct 2011 08:31:42 +0000 (10:31 +0200)]
staging:iio:dac:ad5638: Fix channel address

Commit c6fc806247 ("staging:iio: ABI rework - add in_ or out_ prefix to
channnels") added the AD5868_CHANNEL macro to simplify channel initialization.
Unfortunately the macro hardcodes the channel's address to AD5686_ADDR_DAC0. As
a result writing to any of the channels will change the value of the first
channel.

This patch fixes the issue by calculating the channel address based on the
channel number.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:dac/dds/impedance dev_info to indio_dev for consistency
Jonathan Cameron [Thu, 6 Oct 2011 16:14:38 +0000 (17:14 +0100)]
staging:iio:dac/dds/impedance dev_info to indio_dev for consistency

We had a random missmatch of these two.  Lets pick the most common
and get rid of the other.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
For adxxxx parts
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:naming: dev_info to indio_dev for consistency
Jonathan Cameron [Thu, 6 Oct 2011 16:14:37 +0000 (17:14 +0100)]
staging:iio:adc:naming: dev_info to indio_dev for consistency

We had a random missmatch of these two.  Lets pick the most common
and get rid of the other.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:accel:sca3000 dev_info to indio_dev renaming.
Jonathan Cameron [Thu, 6 Oct 2011 16:14:36 +0000 (17:14 +0100)]
staging:iio:accel:sca3000 dev_info to indio_dev renaming.

Again, there is a mix of the two names for the struct iio_dev.
Lets pick one and run with it.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:core:naming: dev_info to indio_dev for consistency
Jonathan Cameron [Thu, 6 Oct 2011 16:14:35 +0000 (17:14 +0100)]
staging:iio:core:naming: dev_info to indio_dev for consistency

We had a random missmatch of these two.  Lets pick the most common
and get rid of the other.  This patch covers the core.  Others
will clean up the drivers.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: iio/adc/ad7150: release lock on error
Dan Carpenter [Thu, 6 Oct 2011 06:17:00 +0000 (09:17 +0300)]
Staging: iio/adc/ad7150: release lock on error

The error_ret label should have been before the mutex_unlock().  It's
a typo.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: iio/light/tsl2563: fix compile warning
Dan Carpenter [Thu, 6 Oct 2011 06:15:36 +0000 (09:15 +0300)]
Staging: iio/light/tsl2563: fix compile warning

This fixes a compile warning:
drivers/staging/iio/light/tsl2563.c:696:2:
warning: initialization from incompatible pointer type [enabled by default]
drivers/staging/iio/light/tsl2563.c:696:2:
warning: (near initialization for ‘tsl2563_info.write_event_value’) [enabled by default]

The tsl2563_write_thresh() function returns zero on success and error
codes on failure, so nothing is lost by making the return type int
instead of ssize_t.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: iio/light/tsl2563: unlock on an error path
Dan Carpenter [Thu, 6 Oct 2011 06:15:03 +0000 (09:15 +0300)]
Staging: iio/light/tsl2563: unlock on an error path

We need to unlock here before returning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agohv: remove struct hv_device_info from hyperv.h
Greg Kroah-Hartman [Tue, 11 Oct 2011 15:43:14 +0000 (09:43 -0600)]
hv: remove struct hv_device_info from hyperv.h

This is only used/needed by the vmbus core code, so move it out of the
hyperv.h file and into the .c file that uses it.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agohv: remove free_channel() from hyperv.h
Greg Kroah-Hartman [Tue, 11 Oct 2011 15:40:01 +0000 (09:40 -0600)]
hv: remove free_channel() from hyperv.h

This function is only used in the file it is declared in
(channel_mgmt.c) so make it static and remove it from the hyperv.h file.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agohv: hyperv.h: remove unneeded forward declarations of structures
Greg Kroah-Hartman [Tue, 11 Oct 2011 15:37:27 +0000 (09:37 -0600)]
hv: hyperv.h: remove unneeded forward declarations of structures

This file was created by mushing different .h files together and it
shows.  This change removes some unneeded forward declarations.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agohv: hyperv.h: remove unused module macros
Greg Kroah-Hartman [Tue, 11 Oct 2011 15:33:29 +0000 (09:33 -0600)]
hv: hyperv.h: remove unused module macros

I have no idea what these were ever for, but they aren't used, so delete
them.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agohv: remove unused LOWORD and HIWORD macros from hyperv.h
Greg Kroah-Hartman [Tue, 11 Oct 2011 15:30:22 +0000 (09:30 -0600)]
hv: remove unused LOWORD and HIWORD macros from hyperv.h

They aren't used anywhere anymore now that the debugging macros are
gone, so remove it from hyperv.h as well.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: remove vmbus_loglevel as it is not used at all anymore
Greg Kroah-Hartman [Tue, 11 Oct 2011 15:27:48 +0000 (09:27 -0600)]
Staging: hv: remove vmbus_loglevel as it is not used at all anymore

As there is no user of this variable, it's time to delete it.  For
dynamic debugging of the hyperv code, use the standard dynamic debug
kernel interface.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: remove last user of DPRINT() macro
Greg Kroah-Hartman [Tue, 11 Oct 2011 15:25:14 +0000 (09:25 -0600)]
Staging: hv: remove last user of DPRINT() macro

This also removed the unused function hv_dump_ring_info().

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: storvsc: remove last usage of DPRINT_WARN
Greg Kroah-Hartman [Tue, 11 Oct 2011 15:20:31 +0000 (09:20 -0600)]
Staging: hv: storvsc: remove last usage of DPRINT_WARN

Used the correct dev_warn() call instead.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agohv: remove a bunch of unused debug macros from hyperv.h
Greg Kroah-Hartman [Tue, 11 Oct 2011 14:47:32 +0000 (08:47 -0600)]
hv: remove a bunch of unused debug macros from hyperv.h

These aren't used by anyone anymore, so remove them before someone tries
to use them again.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agohv: rename prep_negotiate_resp() to vmbus_prep_negotiate_resp()
Greg Kroah-Hartman [Tue, 11 Oct 2011 14:42:28 +0000 (08:42 -0600)]
hv: rename prep_negotiate_resp() to vmbus_prep_negotiate_resp()

It's a global symbol, so properly prefix it and use the proper EXPORT
value as well.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: remove unneeded asm include file in hyperv.h
Greg Kroah-Hartman [Tue, 11 Oct 2011 14:36:44 +0000 (08:36 -0600)]
Staging: hv: remove unneeded asm include file in hyperv.h

No one outside of the hyperv core needs to include the asm/hyperv.h
file, so don't put it in the "global" include/linux/hyperv.h file.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: move hyperv code out of staging directory
Greg Kroah-Hartman [Tue, 4 Oct 2011 19:29:52 +0000 (12:29 -0700)]
Staging: hv: move hyperv code out of staging directory

After many years wandering the desert, it is finally time for the
Microsoft HyperV code to move out of the staging directory.  Or at least
the core hyperv bus code, and the utility driver, the rest still have
some review to get through by the various subsystem maintainers.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
13 years agoStaging: hv: netvsc: Fix a dereferencing issue
K. Y. Srinivasan [Thu, 6 Oct 2011 17:10:56 +0000 (10:10 -0700)]
Staging: hv: netvsc: Fix a dereferencing issue

net_dev is being de-referenced without proper checking; fix it.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: hv: storvsc: ignore SET_WINDOW scsi command
Olaf Hering [Mon, 10 Oct 2011 07:37:39 +0000 (09:37 +0200)]
staging: hv: storvsc: ignore SET_WINDOW scsi command

Some commands sent by smartd will offline the device.
With this change applied, smartd sill not monitor the device anymore.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: util: Invoke cn_netlink_send() in a work context
K. Y. Srinivasan [Mon, 10 Oct 2011 02:42:28 +0000 (19:42 -0700)]
Staging: hv: util: Invoke cn_netlink_send() in a work context

Invoke cn_netlink_send() in a work context as opposed being called
in the context of  channel callback. On entry into the channel callback
code the channel inbound spin lock is held and deferring to a work
context avoids having to invoke cn_netlink_send() while holding
the inbound lock. As part of this adjustment, also increase the
timeout value for waiting for the user level component of KVP.

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: util: Fix a bug in kvp implementation
K. Y. Srinivasan [Tue, 4 Oct 2011 21:00:02 +0000 (14:00 -0700)]
Staging: hv: util: Fix a bug in kvp implementation

The host gurantees that there can be only one kvp transaction active
against the guest. So, the transaction active state is needed only to
protect against spurious user level calls. The current code had a race
condition where the guest could prematurely return because the previous
transaction state was not cleared - this state was being cleared after
sending the response to the host and there was a window where the host
could notify the guest of a new transaction before the transaction active
state was properly set.
Also deal with the case when the user mode component
does not respond in a timely fashion correctly.
I would like to thank Long Li <longli@microsoft.com>
for identifying the problem.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Diagnosed-by: Long Li <longli@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:resolver:ad2s1210 cleanup gpio handling.
Jonathan Cameron [Wed, 5 Oct 2011 14:28:06 +0000 (15:28 +0100)]
staging:iio:resolver:ad2s1210 cleanup gpio handling.

Basically make use of the gpio array functions.
Technically the free doesn't need as much info
as given here, but this keeps it clean and easy
to follow.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:resolver:ad2s1210 drop raw config register access
Jonathan Cameron [Wed, 5 Oct 2011 14:28:05 +0000 (15:28 +0100)]
staging:iio:resolver:ad2s1210 drop raw config register access

This should never have been exposed to userspace

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:resolver:ad2s1210 minimal chan spec conversion.
Jonathan Cameron [Wed, 5 Oct 2011 14:28:04 +0000 (15:28 +0100)]
staging:iio:resolver:ad2s1210 minimal chan spec conversion.

Just convert the raw reads in this patch.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:resolver:ad2s1210 ensure iio_dev->name is set
Jonathan Cameron [Wed, 5 Oct 2011 14:28:03 +0000 (15:28 +0100)]
staging:iio:resolver:ad2s1210 ensure iio_dev->name is set

This is needed to ensure the required name attribute is
created. Using an id table is the route most consistent
with other drivers.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:resolver rename ad2s120x ->ad2s1200
Jonathan Cameron [Wed, 5 Oct 2011 14:28:02 +0000 (15:28 +0100)]
staging:iio:resolver rename ad2s120x ->ad2s1200

There are far too many possible part numbers that are
not covered in here to have such a generic name.
So move to naming after one of the supported parts.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:resolver:ad2s120x chan spec conversion
Jonathan Cameron [Wed, 5 Oct 2011 14:28:01 +0000 (15:28 +0100)]
staging:iio:resolver:ad2s120x chan spec conversion

Straight forward conversion.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:Documentation gyro -> anglvel updates in attribute names
Jonathan Cameron [Wed, 5 Oct 2011 14:28:00 +0000 (15:28 +0100)]
staging:iio:Documentation gyro -> anglvel updates in attribute names

Follows directly from change made in previous patch.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio: rename gyro channels to anglvel
Jonathan Cameron [Wed, 5 Oct 2011 14:27:59 +0000 (15:27 +0100)]
staging:iio: rename gyro channels to anglvel

Ensure naming reflects what is measured, not how it is done.
Resolvers can measure the same thing for starters.
IIO_GYRO->IIO_ANGL_VEL to ensure consistent naming.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:resolver:ad2s90 chan spec conversion
Jonathan Cameron [Wed, 5 Oct 2011 14:27:58 +0000 (15:27 +0100)]
staging:iio:resolver:ad2s90 chan spec conversion

Trivial conversion.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:resolver:ad2s90 ensure name is passed to iio_core.
Jonathan Cameron [Wed, 5 Oct 2011 14:27:57 +0000 (15:27 +0100)]
staging:iio:resolver:ad2s90 ensure name is passed to iio_core.

Scraps the pointless name define and adds an id table.
It's not technically required in drivers with only one supported
part but it does make the probe code more consistent.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:resolver:ad2s90 fix registration of null pointer
Jonathan Cameron [Wed, 5 Oct 2011 14:27:56 +0000 (15:27 +0100)]
staging:iio:resolver:ad2s90 fix registration of null pointer

When the new allocation code was introduced a stray pointer
to iio_dev structure was left in the chip state structure.
This was never set but was then registered with the core.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:lisght:isl29018 use IIO_PROCESSED enum value.
Jonathan Cameron [Wed, 5 Oct 2011 14:27:55 +0000 (15:27 +0100)]
staging:iio:lisght:isl29018 use IIO_PROCESSED enum value.

No functional change, just a trivial tidy up so all drivers
do the same thing.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7314 removal. Supported via hwmon.
Jonathan Cameron [Wed, 5 Oct 2011 14:27:54 +0000 (15:27 +0100)]
staging:iio:adc:ad7314 removal. Supported via hwmon.

Driver ported over to hwmon where it fits much better.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove brcmf_op_if from fullmac
Franky Lin [Wed, 5 Oct 2011 13:20:14 +0000 (15:20 +0200)]
staging: brcm80211: remove brcmf_op_if from fullmac

Absorb related code into brcmf_add_if/brcmf_del_if. This is part
of the net device interface clean up.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: clean up struct brcmf_if in fullmac
Franky Lin [Wed, 5 Oct 2011 13:20:13 +0000 (15:20 +0200)]
staging: brcm80211: clean up struct brcmf_if in fullmac

Some elements in structure brcmf_if are unused at all or
redundant. This patch cleans it up.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleanup driver variable references
Arend van Spriel [Wed, 5 Oct 2011 13:20:12 +0000 (15:20 +0200)]
staging: brcm80211: cleanup driver variable references

Throughout the data structures within the driver several references
to the driver variables were stored. As the storage and access
functions are now consolidated into srom.c those references are
no longer needed and have been removed.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove parameter 'off' from _initvars_srom_pci()
Arend van Spriel [Wed, 5 Oct 2011 13:20:11 +0000 (15:20 +0200)]
staging: brcm80211: remove parameter 'off' from _initvars_srom_pci()

The function is called once with parameter 'off' fixed to zero. This
parameter has been removed.

Reviewed-by: Alwin Beukers <alwin@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>
13 years agostaging: brcm80211: replace string based variable storage by linked list
Arend van Spriel [Wed, 5 Oct 2011 13:20:10 +0000 (15:20 +0200)]
staging: brcm80211: replace string based variable storage by linked list

The storage of variables obtained from srom are now stored in a linked
list and lookup is done based on the enumerated identifier.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: use enum identifiers in srom variable tables
Arend van Spriel [Wed, 5 Oct 2011 13:20:09 +0000 (15:20 +0200)]
staging: brcm80211: use enum identifiers in srom variable tables

In the srom variable tables fields were identified using string
identifiers. This has been replaced by enumeration identifiers.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: use identifiers instead of string for srom lookup
Arend van Spriel [Wed, 5 Oct 2011 13:20:08 +0000 (15:20 +0200)]
staging: brcm80211: use identifiers instead of string for srom lookup

The driver variables from srom are stored in memory with string
identifiers and the caller needed to use this string identifier
to retrieve a driver variable. The commit changes the calling
code replacing strings with enumerated identifiers.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove invalid variable lookup from srom
Arend van Spriel [Wed, 5 Oct 2011 13:20:07 +0000 (15:20 +0200)]
staging: brcm80211: remove invalid variable lookup from srom

In the driver several driver variables were looked up that are
not supported by the srom code. These have been removed.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: fix thread blocking issue in brcmf_sdbrcm_bus_stop()
Arend van Spriel [Wed, 5 Oct 2011 13:20:06 +0000 (15:20 +0200)]
staging: brcm80211: fix thread blocking issue in brcmf_sdbrcm_bus_stop()

The function brcmf_sdbrcm_bus_stop() terminates the watchdog and dpc
thread, but this function can be called from the dpc thread itself.
Stopping the dpc thread is only done when it is not the 'current'
thread.

Reviewed-by: Franky (Zhenhui) Lin <frankyl@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>
13 years agostaging: brcm80211: remove locking macro definitions
Arend van Spriel [Wed, 5 Oct 2011 13:20:05 +0000 (15:20 +0200)]
staging: brcm80211: remove locking macro definitions

The driver contained locking macros which map directly to the
lock function provided by the kernel. It does not provide any
additional value so these have been removed.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: change parameter in driver variable lookup
Arend van Spriel [Wed, 5 Oct 2011 13:20:04 +0000 (15:20 +0200)]
staging: brcm80211: change parameter in driver variable lookup

The functions getvar() and getintvar() had to pass the buffer
containing the driver variables. Now they pass the structure
containing this buffer hiding what type of buffer/container
is used for storing the driver variables.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove code duplication for driver variable lookup
Arend van Spriel [Wed, 5 Oct 2011 13:20:03 +0000 (15:20 +0200)]
staging: brcm80211: remove code duplication for driver variable lookup

The phy code used its own driver variable lookup functions which were
duplicates of those in the brcmsmac driver (in srom.c). The phy code
now uses the functions in srom.c through the phy_shim interface.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@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>
13 years agostaging: brcm80211: remove redundant bus register layer from fullmac
Franky Lin [Wed, 5 Oct 2011 13:20:02 +0000 (15:20 +0200)]
staging: brcm80211: remove redundant bus register layer from fullmac

Remove some single line functions for bus register/unregister interface

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove threads_only code from fullmac
Franky Lin [Wed, 5 Oct 2011 13:20:01 +0000 (15:20 +0200)]
staging: brcm80211: remove threads_only code from fullmac

threads_only is always true as we never use the tasklet implementation.
So related code is removed.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: move driver variable functions to srom.c
Arend van Spriel [Wed, 5 Oct 2011 13:30:44 +0000 (15:30 +0200)]
staging: brcm80211: move driver variable functions to srom.c

The driver uses variables which are stored in string format. Using
strings as variable identifiers is disliked by the community. The
driver has been cleaned up and the only module providing these
variables is srom.c. The variable retrieval functions have been
moved to srom.c in preparation of a more likable way to store and
lookup these driver variables.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@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>
13 years agostaging: brcm80211: smac: fix for 64 bit systems
Roland Vossen [Tue, 4 Oct 2011 21:19:12 +0000 (23:19 +0200)]
staging: brcm80211: smac: fix for 64 bit systems

A bug was introduced by the following commit (Sep 13):

    staging: brcm80211: use endian annotated structures in brcmsmac

Result was that 64 bits systems will not be able to acquire an IP address.
Also the rmmod crashed. This has been fixed and retested on a Sparc64.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: softmac: added event tracing
Roland Vossen [Tue, 4 Oct 2011 21:19:11 +0000 (23:19 +0200)]
staging: brcm80211: softmac: added event tracing

Dpc and timer events can now be traced. Combined with Mac80211
driver callback tracing, all entry points into the driver can now
be traced.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove N mode validation function
Alwin Beukers [Tue, 4 Oct 2011 21:19:10 +0000 (23:19 +0200)]
staging: brcm80211: remove N mode validation function

Removed the brcms_c_nmode_validate function as it only checks N-mode
capability, which should always be true.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: combined if statements
Alwin Beukers [Tue, 4 Oct 2011 21:19:09 +0000 (23:19 +0200)]
staging: brcm80211: combined if statements

Combined if statements in brcms_c_edcf_setparams and brcms_c_wme_setparams functions.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove brcms_b_dotxstatus wrapper function
Alwin Beukers [Tue, 4 Oct 2011 21:19:08 +0000 (23:19 +0200)]
staging: brcm80211: remove brcms_b_dotxstatus wrapper function

- removed brcms_b_dotxstatus
- changed 'fatal' argument of brcms_b_txstatus from INOUT to OUT.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: removed synchronisation of wlc->machwcap field
Alwin Beukers [Tue, 4 Oct 2011 21:19:07 +0000 (23:19 +0200)]
staging: brcm80211: removed synchronisation of wlc->machwcap field

- removed copying field wlc->machwcap from brcms_hardware to brcms_c_info
  during module attach.
- field wlc->machwcap was written but never read. Therefore it was removed.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: removed unneeded call to brcms_b_tx_fifo_suspended
Alwin Beukers [Tue, 4 Oct 2011 21:19:06 +0000 (23:19 +0200)]
staging: brcm80211: removed unneeded call to brcms_b_tx_fifo_suspended

- removed call to brcms_b_tx_fifo_suspended on receipt of TX FIFO suspend/flush
  completion signal.
- removed brcms_b_tx_fifo_suspended function as it is not being used elsewhere.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleanup of several wrapper functions
Alwin Beukers [Tue, 4 Oct 2011 21:19:05 +0000 (23:19 +0200)]
staging: brcm80211: cleanup of several wrapper functions

- removed brcms_c_write_template_ram function.
- removed brcms_c_mctrl function.
- removed brcms_c_pllreq function.
- removed brcms_c_mhf function.
- removed brcms_c_rate_shm_offset function.
- removed brcms_c_write_hw_bcntemplates function.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleanup of transmit buffer size related wrapper function
Alwin Beukers [Tue, 4 Oct 2011 21:19:04 +0000 (23:19 +0200)]
staging: brcm80211: cleanup of transmit buffer size related wrapper function

Removed brcms_c_xmtfifo_sz_get function.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@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>
13 years agostaging: brcm80211: cleanup of shared memory related wrapper functions
Alwin Beukers [Tue, 4 Oct 2011 21:19:03 +0000 (23:19 +0200)]
staging: brcm80211: cleanup of shared memory related wrapper functions

- removed brcms_c_read_shm and brcms_c_write_shm functions.
- removed redundant argument check from brcms_c_copyto_shm function.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@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>
13 years agostaging: brcm80211: removed redundant code from brcms_c_set_gmode
Alwin Beukers [Tue, 4 Oct 2011 21:19:02 +0000 (23:19 +0200)]
staging: brcm80211: removed redundant code from brcms_c_set_gmode

The comment says the rateset is being cleared when switching to GMODE_LEGACY_B,
but the code that follows it does not do so. Besides, the rateset is already
valid at this point.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: decreased indentation level of brcms_c_wme_setparams function
Alwin Beukers [Tue, 4 Oct 2011 21:19:01 +0000 (23:19 +0200)]
staging: brcm80211: decreased indentation level of brcms_c_wme_setparams function

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: removed empty brcms_c_reset_bmac_done callback function
Alwin Beukers [Tue, 4 Oct 2011 21:19:00 +0000 (23:19 +0200)]
staging: brcm80211: removed empty brcms_c_reset_bmac_done callback function

Empty functions are good candidates for removal.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: made NULL ethernet address const
Alwin Beukers [Tue, 4 Oct 2011 21:18:59 +0000 (23:18 +0200)]
staging: brcm80211: made NULL ethernet address const

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: fixed function returns
Alwin Beukers [Tue, 4 Oct 2011 21:18:58 +0000 (23:18 +0200)]
staging: brcm80211: fixed function returns

- removed unneeded return statements at end of functions.
- changed return value of brcms_c_radio_monitor_start to void.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: removed accessor functions for band type and etheraddress.
Alwin Beukers [Tue, 4 Oct 2011 21:18:57 +0000 (23:18 +0200)]
staging: brcm80211: removed accessor functions for band type and etheraddress.

Functions were trivial so not really adding value.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: fixed checkpatch warnings
Alwin Beukers [Tue, 4 Oct 2011 21:18:56 +0000 (23:18 +0200)]
staging: brcm80211: fixed checkpatch warnings

Reviewed-by: Pieter-Paul Giesberts <pieterpg@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>
13 years agostaging: brcm80211: stop using assigned thread priority in fullmac
Franky Lin [Tue, 4 Oct 2011 21:18:55 +0000 (23:18 +0200)]
staging: brcm80211: stop using assigned thread priority in fullmac

Stop assigning priority to watchdog and dpc threads. Remove related
code.

Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove fullmac module_param for intr/poll mode
Franky Lin [Tue, 4 Oct 2011 21:18:54 +0000 (23:18 +0200)]
staging: brcm80211: remove fullmac module_param for intr/poll mode

Use constant for interrupt/polling mode configuration.

Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: clean up rtnl_lock in fullmac
Franky Lin [Tue, 4 Oct 2011 21:18:53 +0000 (23:18 +0200)]
staging: brcm80211: clean up rtnl_lock in fullmac

rtnl lock is used improperly in fullmac. This patch intends to clean
them up.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Sukesh Srikakula <sukeshs@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: fullmac: fixed double #include
Roland Vossen [Tue, 4 Oct 2011 21:18:52 +0000 (23:18 +0200)]
staging: brcm80211: fullmac: fixed double #include

Fix double include as detected by checkincludes script.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: replace brcmu_bitcount with hweight8
Arend van Spriel [Tue, 4 Oct 2011 21:18:51 +0000 (23:18 +0200)]
staging: brcm80211: replace brcmu_bitcount with hweight8

The kernel provides bit operations to replace brcmu_bitcount so
using those instead.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@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>
13 years agostaging: brcm80211: remove brcmu_bprintf and related functions
Arend van Spriel [Tue, 4 Oct 2011 21:18:50 +0000 (23:18 +0200)]
staging: brcm80211: remove brcmu_bprintf and related functions

The functions brcmu_bprintf and brcmu_binit could be replaced by
snprintf kernel function. These are no longer used in both brcm80211
drivers so they have been removed.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@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>
13 years agostaging: brcm80211: remove filtering of received frames
Arend van Spriel [Tue, 4 Oct 2011 21:18:49 +0000 (23:18 +0200)]
staging: brcm80211: remove filtering of received frames

In the receive path of the brcmsmac driver probe request frames and
frames with invalid mac address fields are dropped. This is only
fine for STA mode. Anticipating coming AP and monitor mode functionality
this is unwanted behavior.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@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>
13 years agostaging: brcm80211: remove setting ssn to zero upon AMPDU_TX_START
Arend van Spriel [Tue, 4 Oct 2011 21:18:48 +0000 (23:18 +0200)]
staging: brcm80211: remove setting ssn to zero upon AMPDU_TX_START

The ssn should be given a valid value by the driver or it should not
override the value. Removed override to zero from the driver.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@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>
13 years agostaging: brcm80211: cleaned up struct brcms_bss_cfg
Roland Vossen [Tue, 4 Oct 2011 21:18:47 +0000 (23:18 +0200)]
staging: brcm80211: cleaned up struct brcms_bss_cfg

Several fields were unused or were only set once. They have been
removed. Uncalled functions that relied on these constants have been
removed as well.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Fix indefinite low power sleep
Mark Einon [Sat, 1 Oct 2011 10:14:17 +0000 (11:14 +0100)]
staging: et131x: Fix indefinite low power sleep

The mechanism by which the device is put into low power sleep is broken
in that the device can never come back out of low power mode afterwards.
Temorary fix to bring the device back out of sleep almost immediately,
until a suitable wake trigger can be found.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Updating copyright statements and module authors
Mark Einon [Sat, 1 Oct 2011 10:14:16 +0000 (11:14 +0100)]
staging: et131x: Updating copyright statements and module authors

Adding copyright notices and adding myself as a module author.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Update TODO file for kernel parameters
Mark Einon [Sat, 1 Oct 2011 10:14:15 +0000 (11:14 +0100)]
staging: et131x: Update TODO file for kernel parameters

set_mac is implemented, and there have been lots of new ethtool_ops added, so
removing the TODO to add more kernel parameters.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Fix add_timer() from et131x_open
Mark Einon [Sat, 1 Oct 2011 10:14:14 +0000 (11:14 +0100)]
staging: et131x: Fix add_timer() from et131x_open

The error_timer was only getting initialised and an initial jiffies value set following a probe.
This could result in the timer needlessly expiring immediately after et131x_open is called.
Now this is all done from the open call instead.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Add pci suspend & resume functions
Mark Einon [Sat, 1 Oct 2011 10:14:13 +0000 (11:14 +0100)]
staging: et131x: Add pci suspend & resume functions

Added basic suspend & resume functionality.
Tested on an et1310 device, and putting Fedora15 host in and out of
hibernation successfully.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Remove adapter->bmsr, replace with phydev equivalents
Mark Einon [Sat, 1 Oct 2011 10:14:12 +0000 (11:14 +0100)]
staging: et131x: Remove adapter->bmsr, replace with phydev equivalents

adapter->bmsr is no longer being updated, but is also used to check the link state in places.

Remove bmsr from adapter, and replace link state checks with phydev->link check.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Introduce et1310_in_phy_coma() call
Mark Einon [Sat, 1 Oct 2011 10:14:11 +0000 (11:14 +0100)]
staging: et131x: Introduce et1310_in_phy_coma() call

In several places in the code, the pm_csr register is read and the PHY_SW_COMA bit checked.

Move this check into its own small function to make the code more readable.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>