cascardo/linux.git
8 years agoiio:ad5064: List support LTC devices in Kconfig
Lars-Peter Clausen [Mon, 8 Feb 2016 17:01:48 +0000 (18:01 +0100)]
iio:ad5064: List support LTC devices in Kconfig

List the newly support LTC devices in the Kconfig entry for the AD5064
driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio:ad5064: Add support for ltc2617 and similar devices
Marc Andre [Mon, 8 Feb 2016 17:01:47 +0000 (18:01 +0100)]
iio:ad5064: Add support for ltc2617 and similar devices

The Linear Technology LTC2606, LTC2607, LTC2609, LTC2616, LTC2617,
LTC2619, LTC2626, LTC2627 and LTC2629 devices are very similar
to the AD5064 device.

This patch adds support for those devices.

Datasheet for LTC devices:
LTC2606, LTC2616, LTC2626: http://www.linear.com/docs/6398
LTC2607, LTC2617, LTC2627: http://www.linear.com/docs/8977
LTC2709, LTC2619, LTC2629: http://www.linear.com/docs/8477

Signed-off-by: Marc Andre <marc.andre@netline.ch>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio:ad5064: Structural changes to support LTC2617
Marc Andre [Mon, 8 Feb 2016 17:01:46 +0000 (18:01 +0100)]
iio:ad5064: Structural changes to support LTC2617

This patch makes minor structural changes to support specifics
for LTC2617 DAC. This DAC requires different handling of the
power down modes. The configuration to actually support the
DAC will be submitted in a secondary patch.

Adjust the DECLARE_AD5064_CHANNELS() macro to accept a new
ext_info parameter. This allows to use different power down
modes per DAC. (e.g. DAC only support 90kohm to ground)

Add the chip_info parameter "powerdown_ltc". This parameter is
used in the ad5064_sync_powerdown_mode() function to handle the
power down command for LTC diffently. For those devices the
power down command must be addressed to the channel.

Signed-off-by: Marc Andre <marc.andre@netline.ch>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: Fix documentation for iio_dev mlock
Daniel Baluta [Mon, 8 Feb 2016 15:03:15 +0000 (17:03 +0200)]
iio: Fix documentation for iio_dev mlock

mlock *must* be used by core and drivers to protect access
to devices state changes.

Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agostaging:iio:ad7606: Consolidate PM ops
Lars-Peter Clausen [Mon, 8 Feb 2016 10:13:29 +0000 (11:13 +0100)]
staging:iio:ad7606: Consolidate PM ops

Both the SPI and platform device driver for the ad7606 use the same set of
PM ops. Consolidate them in the common part of the driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: health: Add driver for the TI AFE4403 heart monitor
Andrew F. Davis [Sat, 6 Feb 2016 19:35:21 +0000 (13:35 -0600)]
iio: health: Add driver for the TI AFE4403 heart monitor

Add driver for the TI AFE4403 heart rate monitor and pulse oximeter.
This device detects reflected LED light fluctuations and presents an ADC
value to the user space for further signal processing.

Data sheet located here:
http://www.ti.com/product/AFE4403/datasheet

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoDocumentation: afe4403: Add DT bindings for the AFE4403 heart monitor
Andrew F. Davis [Tue, 2 Feb 2016 17:50:45 +0000 (11:50 -0600)]
Documentation: afe4403: Add DT bindings for the AFE4403 heart monitor

Add the TI AFE4403 heart monitor DT bindings documentation.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: health: Add driver for the TI AFE4404 heart monitor
Andrew F. Davis [Tue, 2 Feb 2016 17:50:44 +0000 (11:50 -0600)]
iio: health: Add driver for the TI AFE4404 heart monitor

Add driver for the TI AFE4404 heart rate monitor and pulse oximeter.
This device detects reflected LED light fluctuations and presents an ADC
value to the user space for further signal processing.

Datasheet: http://www.ti.com/product/AFE4404/datasheet

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoDocumentation: afe4404: Add DT bindings for the AFE4404 heart monitor
Andrew F. Davis [Tue, 2 Feb 2016 17:50:43 +0000 (11:50 -0600)]
Documentation: afe4404: Add DT bindings for the AFE4404 heart monitor

Add the TI afe4404 heart monitor DT bindings documentation.
Create health directory created under iio.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agostaging: iio: replace clk_get() with devm_clk_get()
Gujulan Elango, Hari Prasath (H.) [Tue, 2 Feb 2016 12:56:32 +0000 (12:56 +0000)]
staging: iio: replace clk_get() with devm_clk_get()

This patch replaces the clk_get() with devm_clk_get().Accordingly,modified
the error paths,rename error labels and removed clk_put() in probe() &
remove functions.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: chemical: select IRQ_WORK for ATLAS ph sensor
Arnd Bergmann [Tue, 2 Feb 2016 14:36:39 +0000 (15:36 +0100)]
iio: chemical: select IRQ_WORK for ATLAS ph sensor

The newly added atlas-ph-sensor driver uses irq_work_queue, which
may not always be enabled:

ERROR: "irq_work_queue" [drivers/iio/chemical/atlas-ph-sensor.ko] undefined!

This adds a 'select' statement to Kconfig to ensure it's there
when we need it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 27dec00ecf2d ("iio: chemical: add Atlas pH-SM sensor support")
Reviewed-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: Add helper function for calculating scan index storage size
Lars-Peter Clausen [Tue, 2 Feb 2016 15:27:24 +0000 (16:27 +0100)]
iio: Add helper function for calculating scan index storage size

We have the same code for computing the scan index storage size in bytes
all over the place. Factor this out into helper functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: pressure: ms5611: Add triggered buffer support
Daniel Baluta [Wed, 3 Feb 2016 16:50:38 +0000 (18:50 +0200)]
iio: pressure: ms5611: Add triggered buffer support

This will be used together with an external trigger (e.g hrtimer
based software trigger).

Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: pressure: ms5611: Add IIO_CHAN_INFO_SCALE to mask
Daniel Baluta [Wed, 3 Feb 2016 16:50:37 +0000 (18:50 +0200)]
iio: pressure: ms5611: Add IIO_CHAN_INFO_SCALE to mask

This allows data exported via buffer interface to be converted
to standard units in userspace.

Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoStaging:iio:Remove exceptional & on function name
Bhumika Goyal [Fri, 5 Feb 2016 03:53:32 +0000 (09:23 +0530)]
Staging:iio:Remove exceptional & on function name

In this file,function names are otherwise used as pointers without &.
Found using coccinelle.
// <smpl>
@r@
identifier f;
@@

f(...) { ... }
@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agostaging:iio:ad7606: Consolidate channel specs
Lars-Peter Clausen [Fri, 5 Feb 2016 10:32:34 +0000 (11:32 +0100)]
staging:iio:ad7606: Consolidate channel specs

By slightly reordering the channels in the channel spec array we can reuse
the same array for all variant of the chip.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agostaging: wilc1000: linux_mon: remove debug message of kmalloc failure
Chaehyun Lim [Mon, 1 Feb 2016 12:26:47 +0000 (21:26 +0900)]
staging: wilc1000: linux_mon: remove debug message of kmalloc failure

There is no need to print debug message when kmalloc is failed.
This message is redundant. The code already show us that kmalloc is
failed. The braces of first if statement is remove as well because if
statement has a single statement.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: linux_mon: fix error code of kmalloc
Chaehyun Lim [Mon, 1 Feb 2016 12:26:46 +0000 (21:26 +0900)]
staging: wilc1000: linux_mon: fix error code of kmalloc

This patch fixes error codes as -ENOMEM instead of using -EFAULT if
kmalloc is failed.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: linux_mon: fix coding style of kmalloc usage
Chaehyun Lim [Mon, 1 Feb 2016 12:26:45 +0000 (21:26 +0900)]
staging: wilc1000: linux_mon: fix coding style of kmalloc usage

This patch fixes coding style of kmalloc usage found by checkpatch.pl
CHECK: Prefer kmalloc(sizeof(*mgmt_tx)...) over kmalloc(sizeof(struct
tx_complete_mon_data)...)

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: linux_mon: add braces on all arms of if statement
Chaehyun Lim [Mon, 1 Feb 2016 12:26:44 +0000 (21:26 +0900)]
staging: wilc1000: linux_mon: add braces on all arms of if statement

This patch adds braces on all arms of if statement found by
checkpatch.pl
CHECK: braces {} should be used on all arms of this statement

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: linux_mon: insert blank line after a function
Chaehyun Lim [Mon, 1 Feb 2016 12:26:43 +0000 (21:26 +0900)]
staging: wilc1000: linux_mon: insert blank line after a function

This patch inserts a blank line afer function found by checkpatch.pl
CHECK: Please use a blank line after function/struct/union/enum
declarations

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: linux_mon: remove space after a cast
Chaehyun Lim [Mon, 1 Feb 2016 12:26:42 +0000 (21:26 +0900)]
staging: wilc1000: linux_mon: remove space after a cast

This patch removes space after a type cast found by checkpatch.pl
CHECK: No space is necessary after a cast

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: linux_mon: fix NULL comparison style
Chaehyun Lim [Mon, 1 Feb 2016 12:26:41 +0000 (21:26 +0900)]
staging: wilc1000: linux_mon: fix NULL comparison style

This patch fixes NULL comparsion style found by checkpatch.pl

CHECK: Comparison to NULL could be written "!wilc_wfi_mon"
CHECK: Comparison to NULL could be written "!skb"
CHECK: Comparison to NULL could be written "!skb"
CHECK: Comparison to NULL could be written "!dev"
CHECK: Comparison to NULL could be written "!mgmt_tx"
CHECK: Comparison to NULL could be written "!mgmt_tx->buff"
CHECK: Comparison to NULL could be written "!wilc_wfi_mon"
CHECK: Comparison to NULL could be written "!mon_priv"
CHECK: Comparison to NULL could be written "!priv"
CHECK: Comparison to NULL could be written "wilc_wfi_mon"

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: linux_mon: remove multiple blank lines
Chaehyun Lim [Mon, 1 Feb 2016 12:26:40 +0000 (21:26 +0900)]
staging: wilc1000: linux_mon: remove multiple blank lines

This patch removes multiple blank lines found by checkpatch.pl
CHECK: Please don't use multiple blank lines

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: linux_mon: remove blank line before a close brace '}'
Chaehyun Lim [Mon, 1 Feb 2016 12:26:39 +0000 (21:26 +0900)]
staging: wilc1000: linux_mon: remove blank line before a close brace '}'

This patch removes blank lines before a close brace found by
checkpatch.pl
CHECK: Blank lines aren't necessary before a close brace '}'

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: linux_mon: remove blank lines after open brace '{'
Chaehyun Lim [Mon, 1 Feb 2016 12:26:38 +0000 (21:26 +0900)]
staging: wilc1000: linux_mon: remove blank lines after open brace '{'

This patch remove blank lines after open brace found by checkpatch.pl
CHECK: Blank lines aren't necessary after an open brace '{'

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: linux_mon: use __packed instead of __attribute__((packed))
Chaehyun Lim [Mon, 1 Feb 2016 12:26:37 +0000 (21:26 +0900)]
staging: wilc1000: linux_mon: use __packed instead of __attribute__((packed))

This patch fixes the following checkpatch warning:
WARNING: __packed is preferred over __attribute__((packed))

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: wilc_msgqueue: release semaphore in error path
Chaehyun Lim [Fri, 29 Jan 2016 14:51:33 +0000 (23:51 +0900)]
staging: wilc1000: wilc_msgqueue: release semaphore in error path

It should be called up(&mq->sem) to release semaphore before returning
error codes as -EFAULT when list is empty.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: wilc_msgqueue: use standard struct list_head
Chaehyun Lim [Fri, 29 Jan 2016 14:51:32 +0000 (23:51 +0900)]
staging: wilc1000: wilc_msgqueue: use standard struct list_head

This patch uses standard struct list_head in struct message and
message_queue instead of custom linked list.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: renames u16index variable
Leo Kim [Thu, 28 Jan 2016 07:13:38 +0000 (16:13 +0900)]
staging: wilc1000: renames u16index variable

This patch renames u16index variable to index
to remove the prefix variable defined name.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: renames u16TagParamOffset variable
Leo Kim [Thu, 28 Jan 2016 07:13:37 +0000 (16:13 +0900)]
staging: wilc1000: renames u16TagParamOffset variable

This patch renames u16TagParamOffset variable to tag_param_offset
to avoid camelcase.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: renames u16RxLen variable
Leo Kim [Thu, 28 Jan 2016 07:13:36 +0000 (16:13 +0900)]
staging: wilc1000: renames u16RxLen variable

This patch renames u16RxLen variable to rx_len to avoid camelcase.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: coreconfigurator.c : remove over-commenting
Leo Kim [Thu, 28 Jan 2016 07:13:35 +0000 (16:13 +0900)]
staging: wilc1000: coreconfigurator.c : remove over-commenting

There are over-commenting in the coreconfigurator.c file and most of them
are not helpful to explain what the code does and generate 80 ending
line over warnings. So, all of comments are removed in this patch and the
comments will later be added if necessary with the preferred Linux style.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: fixes add spaces required around
Leo Kim [Wed, 27 Jan 2016 02:50:27 +0000 (11:50 +0900)]
staging: wilc1000: fixes add spaces required around

This patch fixes the checks reported by checkpatch.pl
for spaces required around that '=' or '||' or '('.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: fixes no space is necessary after a cast
Leo Kim [Wed, 27 Jan 2016 02:50:26 +0000 (11:50 +0900)]
staging: wilc1000: fixes no space is necessary after a cast

This patch fixes the check reported by checkpatch.pl
for 'no space is necessary after a cast'.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: wilc_frmw_to_linux(): fixes null check
Leo Kim [Wed, 27 Jan 2016 02:50:25 +0000 (11:50 +0900)]
staging: wilc1000: wilc_frmw_to_linux(): fixes null check

Null checking wilc_netdev and skb->dev are already done in the begining of the
function and they are just print printing error log, so delete them.
Null checking wilc is needed before is used so add null ckeck before it is
used.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: fix alignment for open parenthesis
Chaehyun Lim [Tue, 26 Jan 2016 09:50:00 +0000 (18:50 +0900)]
staging: wilc1000: fix alignment for open parenthesis

This patch fixes the check found by checkpatch.pl
CHECK: Alignment should match open parenthesis

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: call power save after changing mode
Glen Lee [Mon, 25 Jan 2016 07:35:18 +0000 (16:35 +0900)]
staging: wilc1000: call power save after changing mode

host_int_set_power_mgmt should be called after changing operation mode to
work properly. Move the function below host_int_set_operation_mode.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change_virtual_intf: change codes for unified firmware
Glen Lee [Mon, 25 Jan 2016 07:35:17 +0000 (16:35 +0900)]
staging: wilc1000: change_virtual_intf: change codes for unified firmware

In previous patch, we use unified firmware on wilc, which means we do not need
to download firmware again to change virtual interfaces.
There are a lot of codes to change interface and they are needless now, so
remove them except wilc_set_operation_mode function which change the mode and
wilc_set_power_mgmt which control power save.
There will be unused functions and they will be removed in later patch.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: set proper bssid address
Glen Lee [Mon, 25 Jan 2016 07:35:16 +0000 (16:35 +0900)]
staging: wilc1000: set proper bssid address

This patch changes index 0 to index of vif which is currently beging used
because AP mode can run on any interface.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: set bssid with mode
Glen Lee [Mon, 25 Jan 2016 07:35:15 +0000 (16:35 +0900)]
staging: wilc1000: set bssid with mode

This patch add new argument mode to wilc_wlan_set_bssid and define mode in
struct wilc_vif also. The mode is used by get_if_handler function to get proper
netdevice for each mode.
The get_if_handler is changed together. Remove invalid handle codes and
add mode condition to get netdevice for the mode.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove wilc_set_machw_change_vir_if
Glen Lee [Mon, 25 Jan 2016 07:35:14 +0000 (16:35 +0900)]
staging: wilc1000: remove wilc_set_machw_change_vir_if

wilc_set_machw_change_vir_if is not used anymore since we use one unified
firmware. Instead, wilc_set_operation_mode is called when wilc_mac_open to
let the wilc use the proper firmware. Remove wilc_set_machw_change_vir_if
and it's functions calls.
In the later patch, mac index will be passed to wilc device.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: use unified firmware
Glen Lee [Mon, 25 Jan 2016 07:35:13 +0000 (16:35 +0900)]
staging: wilc1000: use unified firmware

Use a unified firmware for all mode of operations which are station, ap and
p2p. Two firmware are introduced for 1002 and 1003 chipset.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: get address from wilc
Glen Lee [Mon, 25 Jan 2016 07:35:12 +0000 (16:35 +0900)]
staging: wilc1000: get address from wilc

Get mac address from wilc device instead of using random mac address.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove sleep and reduce close timeout
Glen Lee [Mon, 25 Jan 2016 07:35:11 +0000 (16:35 +0900)]
staging: wilc1000: remove sleep and reduce close timeout

sleep is not necessary during handling tx queue so remove it and also reduce
close time to 5 sec since it is enough time to close.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: add ops resuem/suspend/wakeup in cfg80211
Glen Lee [Mon, 25 Jan 2016 07:35:10 +0000 (16:35 +0900)]
staging: wilc1000: add ops resuem/suspend/wakeup in cfg80211

This patch adds ops resume, suspend and set_wakeup in cfg80211. Together with
previous patches, driver will support suspend/resume functionality.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: sdio_init: add resume argument
Glen Lee [Mon, 25 Jan 2016 07:35:09 +0000 (16:35 +0900)]
staging: wilc1000: sdio_init: add resume argument

Part of sdio init codes should not run when sdio init function is called on
sdio resume so skip them.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: add sdio resume/suspend
Glen Lee [Mon, 25 Jan 2016 07:35:08 +0000 (16:35 +0900)]
staging: wilc1000: add sdio resume/suspend

This patch introduces sdio device suspend and resume functionality. sdio_reset
function is added to reset sdio. Remove static inline keyword from
chip_allow_sleep and chip_wakeup, and export symbols.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: support suspend/resume functionality
Glen Lee [Mon, 25 Jan 2016 07:35:07 +0000 (16:35 +0900)]
staging: wilc1000: support suspend/resume functionality

wilc supports suspend/resume functionality. Introduce new sleep and wakeup
functions and remove old codes since that will be handled in the new functions.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove define WILC_OPTIMIZE_SLEEP_INT
Glen Lee [Mon, 25 Jan 2016 07:35:06 +0000 (16:35 +0900)]
staging: wilc1000: remove define WILC_OPTIMIZE_SLEEP_INT

Take the codes of WILC_OPTIMIZE_SLEEP_INT and remove codes inside ifndef.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: fix bug when changing virtual interface
Glen Lee [Mon, 25 Jan 2016 07:35:05 +0000 (16:35 +0900)]
staging: wilc1000: fix bug when changing virtual interface

This patch fixes a bug connection error when changing virtual interface to p2p.
Variable quit needs to be set 0 when wilc is reinitialized again.

Fixes : 67e2a07ed800 ("staging: wilc1000: move all of wilc_wlan_dev_t to struct wilc")
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove over-commenting
Chaehyun Lim [Thu, 21 Jan 2016 11:30:57 +0000 (20:30 +0900)]
staging: wilc1000: remove over-commenting

There are over-commenting in wilc_msgqueue.h file. This comment is not
explain exactly what codes do and make checkpatch warning about "line
over 80 charcters". If necessary, comment will be added later with
preferred coding style.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: fix logical continuations
Chaehyun Lim [Thu, 21 Jan 2016 11:30:56 +0000 (20:30 +0900)]
staging: wilc1000: fix logical continuations

This patch fixes logical continuations found by checkpatch
CHECK: Logical continuations should be on the previous line

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: fix coding style of kmalloc usage
Chaehyun Lim [Thu, 21 Jan 2016 11:30:55 +0000 (20:30 +0900)]
staging: wilc1000: fix coding style of kmalloc usage

This patch fixes coding style of kmalloc usage found by checkpatch.
CHECK: Prefer kmalloc(sizeof(*new_msg)...) over kmalloc(sizeof(struct message)...)

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pstrMessage in wilc_mq_recv
Chaehyun Lim [Thu, 21 Jan 2016 11:30:54 +0000 (20:30 +0900)]
staging: wilc1000: rename pstrMessage in wilc_mq_recv

This patch renames pstrMessage to msg to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pu32ReceivedLength in wilc_mq_recv
Chaehyun Lim [Thu, 21 Jan 2016 11:30:53 +0000 (20:30 +0900)]
staging: wilc1000: rename pu32ReceivedLength in wilc_mq_recv

This patch renames pu32ReceivedLength to recv_len to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename u32RecvBufferSize in wilc_mq_recv
Chaehyun Lim [Thu, 21 Jan 2016 11:30:52 +0000 (20:30 +0900)]
staging: wilc1000: rename u32RecvBufferSize in wilc_mq_recv

This patch renames u32RecvBufferSize to recv_buf_size to avoid
camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pvRecvBuffer in wilc_mq_recv
Chaehyun Lim [Thu, 21 Jan 2016 11:30:51 +0000 (20:30 +0900)]
staging: wilc1000: rename pvRecvBuffer in wilc_mq_recv

This patch renames pvRecvBuffer to recv_buf to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pHandle in wilc_mq_recv
Chaehyun Lim [Thu, 21 Jan 2016 11:30:50 +0000 (20:30 +0900)]
staging: wilc1000: rename pHandle in wilc_mq_recv

This patch renames pHandle to mq to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: fix return error code
Chaehyun Lim [Thu, 21 Jan 2016 11:30:49 +0000 (20:30 +0900)]
staging: wilc1000: fix return error code

Three argument are checked at the beginning of wilc_mq_send whether
they are valid arguments or not. It is correct to use return error code
as -EINVAL, not -EFAULT.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pstrTailMsg in wilc_mq_send
Chaehyun Lim [Thu, 21 Jan 2016 11:30:48 +0000 (20:30 +0900)]
staging: wilc1000: rename pstrTailMsg in wilc_mq_send

This patch renames pstrTailMsg to tail_msg to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pstrMessage in wilc_mq_send
Chaehyun Lim [Thu, 21 Jan 2016 11:30:47 +0000 (20:30 +0900)]
staging: wilc1000: rename pstrMessage in wilc_mq_send

This patch renames pstrMessage to new_msg to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename u32SendBufferSize in wilc_mq_send
Chaehyun Lim [Thu, 21 Jan 2016 11:30:46 +0000 (20:30 +0900)]
staging: wilc1000: rename u32SendBufferSize in wilc_mq_send

This patch renames u32SendBufferSize to send_buf_size to avoid
camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pvSendBuffer in wilc_mq_send
Chaehyun Lim [Thu, 21 Jan 2016 11:30:45 +0000 (20:30 +0900)]
staging: wilc1000: rename pvSendBuffer in wilc_mq_send

This patch renames pvSendBuffer to send_buf to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pHandle in wilc_mq_send
Chaehyun Lim [Thu, 21 Jan 2016 11:30:44 +0000 (20:30 +0900)]
staging: wilc1000: rename pHandle in wilc_mq_send

This patch renames pHandle to mq to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pstrMessge in wilc_mq_destroy
Chaehyun Lim [Thu, 21 Jan 2016 11:30:43 +0000 (20:30 +0900)]
staging: wilc1000: rename pstrMessge in wilc_mq_destroy

This patch renames pstrMessge to msg to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pHandle in wilc_mq_destroy
Chaehyun Lim [Thu, 21 Jan 2016 11:30:42 +0000 (20:30 +0900)]
staging: wilc1000: rename pHandle in wilc_mq_destroy

This patch renames pHandle to mq to avoid camelcase

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pHandle in wilc_mq_create
Chaehyun Lim [Thu, 21 Jan 2016 11:30:41 +0000 (20:30 +0900)]
staging: wilc1000: rename pHandle in wilc_mq_create

This patch renames pHandle to mq to avoid camelcase

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pstrMessageList in struct message_queue
Chaehyun Lim [Thu, 21 Jan 2016 11:30:40 +0000 (20:30 +0900)]
staging: wilc1000: rename pstrMessageList in struct message_queue

This patch renames pstrMessageList to msg_list to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename u32ReceiversCount in struct message_queue
Chaehyun Lim [Thu, 21 Jan 2016 11:30:39 +0000 (20:30 +0900)]
staging: wilc1000: rename u32ReceiversCount in struct message_queue

This patch renames u32ReceiversCount to recv_count to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename bExiting in struct message_queue
Chaehyun Lim [Thu, 21 Jan 2016 11:30:38 +0000 (20:30 +0900)]
staging: wilc1000: rename bExiting in struct message_queue

This patch renames bExiting to exiting to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename strCriticalSection in struct message_queue
Chaehyun Lim [Thu, 21 Jan 2016 11:30:37 +0000 (20:30 +0900)]
staging: wilc1000: rename strCriticalSection in struct message_queue

This patch renames strCriticalSection to lock to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename hSem in struct message_queue
Chaehyun Lim [Thu, 21 Jan 2016 11:30:36 +0000 (20:30 +0900)]
staging: wilc1000: rename hSem in struct message_queue

This patch renames hSem to sem to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename struct WILC_MsgQueueHandle
Chaehyun Lim [Thu, 21 Jan 2016 11:30:35 +0000 (20:30 +0900)]
staging: wilc1000: rename struct WILC_MsgQueueHandle

This patch removes typedef from struct WILC_MsgQueueHandle and renames
it to struct message_queue.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pstrNext in struct message
Chaehyun Lim [Thu, 21 Jan 2016 11:30:34 +0000 (20:30 +0900)]
staging: wilc1000: rename pstrNext in struct message

This patch renames pstrNext to next to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename u32Length in struct message
Chaehyun Lim [Thu, 21 Jan 2016 11:30:33 +0000 (20:30 +0900)]
staging: wilc1000: rename u32Length in struct message

This patch renames u32Length to len to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pvBuffer in struct message
Chaehyun Lim [Thu, 21 Jan 2016 11:30:32 +0000 (20:30 +0900)]
staging: wilc1000: rename pvBuffer in struct message

This patch renames pvBuffer to buf to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename struct __Message_struct
Chaehyun Lim [Thu, 21 Jan 2016 11:30:31 +0000 (20:30 +0900)]
staging: wilc1000: rename struct __Message_struct

This patch renames typedef from struct __Message_struct and renames it
to struct message.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove redundant check in wilc_mq_recv
Chaehyun Lim [Wed, 20 Jan 2016 07:44:57 +0000 (16:44 +0900)]
staging: wilc1000: remove redundant check in wilc_mq_recv

At the beginning of wilc_mq_recv, it is checked if pHandle->bExiting is
false or true. There is no need to check it again at the middle of this
function. So just remove it.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove extraneous variable
Arnd Bergmann [Wed, 13 Jan 2016 14:36:17 +0000 (15:36 +0100)]
staging: wilc1000: remove extraneous variable

Building wilc1000 with clang currently fails in the staging-next branch:

drivers/staging/wilc1000/wilc_spi.c:123:34: warning: tentative definition of variable with internal linkage has incomplete non-array type 'const struct wilc1000_ops' [-Wtentative-definition-incomplete-type]
static const struct wilc1000_ops wilc1000_spi_ops;

The reason is that wilc1000_ops was left behind after a recent cleanup,
and is completely unused and also uninitialized and const and has an
incomplete type.

Removing the variable is obviously correct, and gets rid of the warning.
No idea why gcc does not complain about it though.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: fix return type of wilc_init
Chaehyun Lim [Tue, 5 Jan 2016 14:06:57 +0000 (23:06 +0900)]
staging: wilc1000: fix return type of wilc_init

This patch changes return type of wilc_init from s32 to int.
The error code as -ENOMEM or -EFAULT is returned in the wilc_init.
It is better to use return type of int in this function, not s32.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename phWFIDrv in wilc_init declaration
Chaehyun Lim [Tue, 5 Jan 2016 14:06:56 +0000 (23:06 +0900)]
staging: wilc1000: rename phWFIDrv in wilc_init declaration

The second argument name is different between wilc_init declaration and
definition. This patch renames phWFIDrv to hif_drv_handler to match
argument name.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: use kmemdup instead of kmalloc/memcpy
Chaehyun Lim [Tue, 5 Jan 2016 14:06:55 +0000 (23:06 +0900)]
staging: wilc1000: use kmemdup instead of kmalloc/memcpy

This patch replaces kmalloc followed by memcpy with kmemdup.
It is also added error checking to return -ENOMEM when kmemdup is
failed.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pstrHiddenNetwork in wilc_scan
Chaehyun Lim [Tue, 5 Jan 2016 14:06:54 +0000 (23:06 +0900)]
staging: wilc1000: rename pstrHiddenNetwork in wilc_scan

This patch renames pstrHiddenNetwork to hidden_network to avoid
camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pvUserArg in wilc_scan
Chaehyun Lim [Tue, 5 Jan 2016 14:06:53 +0000 (23:06 +0900)]
staging: wilc1000: rename pvUserArg in wilc_scan

This patch renames pvUserArg to user_arg to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename ScanResult in wilc_scan
Chaehyun Lim [Tue, 5 Jan 2016 14:06:52 +0000 (23:06 +0900)]
staging: wilc1000: rename ScanResult in wilc_scan

This patch renames ScanResult to scan_result to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename IEsLen in wilc_scan
Chaehyun Lim [Tue, 5 Jan 2016 14:06:51 +0000 (23:06 +0900)]
staging: wilc1000: rename IEsLen in wilc_scan

This patch renames IEsLen to ies_len to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pu8IEs in wilc_scan
Chaehyun Lim [Tue, 5 Jan 2016 14:06:50 +0000 (23:06 +0900)]
staging: wilc1000: rename pu8IEs in wilc_scan

This patch renames pu8IEs to ies to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename u8ChnlListLen in wilc_scan
Chaehyun Lim [Tue, 5 Jan 2016 14:06:49 +0000 (23:06 +0900)]
staging: wilc1000: rename u8ChnlListLen in wilc_scan

This patch renames u8ChnlListLen to ch_list_len to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pu8ChnlFreqList in wilc_scan
Chaehyun Lim [Tue, 5 Jan 2016 14:06:48 +0000 (23:06 +0900)]
staging: wilc1000: rename pu8ChnlFreqList in wilc_scan

This patch renames pu8ChnlFreqList to ch_freq_list to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename u8ScanType in wilc_scan
Chaehyun Lim [Tue, 5 Jan 2016 14:06:47 +0000 (23:06 +0900)]
staging: wilc1000: rename u8ScanType in wilc_scan

This patch renames u8ScanType to scan_type to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename u8ScanSource in wilc_scan
Chaehyun Lim [Tue, 5 Jan 2016 14:06:46 +0000 (23:06 +0900)]
staging: wilc1000: rename u8ScanSource in wilc_scan

This patch renames u8ScanSource to scan_source to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: fix return type of wilc_scan
Chaehyun Lim [Tue, 5 Jan 2016 14:06:45 +0000 (23:06 +0900)]
staging: wilc1000: fix return type of wilc_scan

This patch changes return type of wilc_scan from s32 to int.
The result variable gets return value from wilc_mq_send that has data
type of int. It should be changed return type of this function as well
as data type of result variable.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename u8ssidnum in struct hidden_network
Chaehyun Lim [Tue, 5 Jan 2016 04:26:33 +0000 (13:26 +0900)]
staging: wilc1000: rename u8ssidnum in struct hidden_network

This patch renames u8ssidnum to n_ssids that is a member of struct
hidden_network. There is no need to use u8 prefix to show data type so
just rename it.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pstrHiddenNetworkInfo in struct hidden_network
Chaehyun Lim [Tue, 5 Jan 2016 04:26:32 +0000 (13:26 +0900)]
staging: wilc1000: rename pstrHiddenNetworkInfo in struct hidden_network

This patch renames pstrHiddenNetworkInfo to net_info to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename u8ssidlen in struct hidden_net_info
Chaehyun Lim [Tue, 5 Jan 2016 04:26:31 +0000 (13:26 +0900)]
staging: wilc1000: rename u8ssidlen in struct hidden_net_info

This patch renames u8ssidlen to ssid_len that is a member of
hidden_net_info. There is no need to use u8 prefix to show data type so
just rename it.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pu8ssid in struct hidden_net_info
Chaehyun Lim [Tue, 5 Jan 2016 04:26:30 +0000 (13:26 +0900)]
staging: wilc1000: rename pu8ssid in struct hidden_net_info

This patch renames pu8ssid to ssid that is a member of struct
hidden_net_info. There is no need to use pu8 prefix to show data type so
just remove it.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: make some variables static
Hugo Camboulive [Mon, 4 Jan 2016 22:02:23 +0000 (22:02 +0000)]
staging: wilc1000: make some variables static

terminated_handle is used only in host_interface.c
wilc1000_spi_driver is exported by module_spi_driver()

This fixes a few Sparse warnings.

Signed-off-by: Hugo Camboulive <hugo.camboulive@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: add missing __user attribute
Hugo Camboulive [Mon, 4 Jan 2016 20:33:50 +0000 (20:33 +0000)]
staging: wilc1000: add missing __user attribute

This removes a Sparse warning.

Signed-off-by: Hugo Camboulive <hugo.camboulive@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pstrSetBeaconParam in wilc_add_beacon
Chaehyun Lim [Sun, 3 Jan 2016 08:36:02 +0000 (17:36 +0900)]
staging: wilc1000: rename pstrSetBeaconParam in wilc_add_beacon

This patch renames pstrSetBeaconParam to beacon_info to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>