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.
Chaehyun Lim [Sun, 3 Jan 2016 08:35:44 +0000 (17:35 +0900)]
staging: wilc1000: fix return type of wilc_edit_station
This patch changes return type of wilc_edit_station 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 [Sun, 3 Jan 2016 08:35:40 +0000 (17:35 +0900)]
staging: wilc1000: fix return type of wilc_del_all_rx_ba_session
This patch changes return type of wilc_del_all_rx_ba_session from s32 to
int. The result variable gets return value from wilc_mq_send that has
return type of int. It should be changed return type of this function as
well as data type of result variable.
Chaehyun Lim [Sun, 3 Jan 2016 08:35:34 +0000 (17:35 +0900)]
staging: wilc1000: fix return type of wilc_remain_on_channel
This patch changes return type of wilc_remain_on_channel 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 [Sun, 3 Jan 2016 08:35:33 +0000 (17:35 +0900)]
staging: wilc1000: rename u32duration in struct remain_ch
The patch renames u32duration to duration that is a member of struct
remain_ch. The prefix u32 shows data type of its member, but there is no
need to use u32 prefix to represent data type.
Chaehyun Lim [Wed, 30 Dec 2015 12:15:42 +0000 (21:15 +0900)]
staging: wilc1000: remove argument hif_drv in host_int_get_ipaddress
This patch removes hif_drv argument of host_int_get_ipaddress.
There is no need to pass hif_drv in this function because hif_drv is a
member of vif. It is removed struct host_if_drv and use hif_drv of vif.
Chaehyun Lim [Wed, 30 Dec 2015 12:15:41 +0000 (21:15 +0900)]
staging: wilc1000: fix return type of host_int_get_ipaddress
This patch changes return type of host_int_get_ipaddress 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.