Sudip Mukherjee [Fri, 5 Feb 2016 09:56:54 +0000 (15:26 +0530)]
staging: wilc1000: fix build failure
allmodconfig build of alpha, m68k, m32r, tilepro has failed with the
error:
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c: In function 'wilc_create_wiphy':
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2632:13:
error: 'struct wiphy' has no member named 'wowlan'
Looking at other drivers wowlan can be only used when CONFIG_PM is
defined.
Kevin Wern [Sat, 16 Jan 2016 21:44:41 +0000 (13:44 -0800)]
staging/slicoss: Use ethtool_ops instead of module_param.
ethtool_ops has attributes in sub struct ethtool_coalesce that
correspond to the parameters intagg_delay and dynamic_intagg. It is
preferable to set these properties with ethtool rather than
module_param, so create these attributes in adapter and set them using
ethtool_coalesce's rx_coalesce_usecs and rx_use_adaptive_coalesce.
(Outlined in TODO file)
Signed-off-by: Kevin Wern <kevin.m.wern@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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.
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)...)
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"
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>
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>
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>
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>
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>
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>
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>
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>
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.
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.
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.
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.
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.
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.
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.
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.
Chaehyun Lim [Sun, 3 Jan 2016 08:35:55 +0000 (17:35 +0900)]
staging: wilc1000: fix return type of wilc_add_beacon
This patch changes return type of wilc_add_beacon 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 result variable.
Chaehyun Lim [Sun, 3 Jan 2016 08:35:49 +0000 (17:35 +0900)]
staging: wilc1000: fix return type of wilc_del_allstation
This patch changes return type of wilc_del_allstation 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.