Commit graph

1705 commits

Author SHA1 Message Date
Chaehyun Lim f176429307 staging: wilc1000: rename au8bssid in struct join_bss_param
This patch renames au8bssid to bssid to remove au8 prefix in struct
join_bss_param. There is no need to use prefix to show data type of this
variable.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:25:38 -08:00
Roger H. Newell bb6b03de3f staging: wilc1000: spelling corrections
This patch fixes spelling warnings generated by checkpatch.pl

Signed-off-by: Roger H. Newell <newell.roger@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:31:50 -08:00
Janani Ravichandran 5343c7bb0a staging: wilc1000: Remove unneeded parentheses in assignment
Remove parentheses around the right hand side of assignments. They are
unnecessary.
Semantic patch:

@@
expression a, b, c;
@@

(
  a = (b == c)
|
  a =
- (
  b
- )
)

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:31:50 -08:00
Alison Schofield e682e91b61 staging: wilc1000: remove parentheses on right hand side of assignment
Remove the unnecessary parens on right hand side of assignment.

Found using Coccinelle:
@@
identifier x;
expression e1, e2;
@@
- x = (e1 << e2)
+ x = e1 << e2

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:31:50 -08:00
Chaehyun Lim b3306362b8 staging: wilc1000: rename counter in wilc_send_config_pkt
This patch renames the name of counter variable to i.
This change makes more readability because wilc_send_config_pkt has a
similar argument name as count.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:31:50 -08:00
Chaehyun Lim f752fa468a staging: wilc1000: remove initialization code of counter variable
There is no need to set to 0 for counter variable before entering next
for-loop statement because counter is initialized again in for-loop
statement, so just remove it.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:31:50 -08:00
Chaehyun Lim 67ba5d6d6e staging: wilc1000: use int type for counter variable
counter is used as for-loop control variable and indicating index of
struct wid array so that it is better to use int type.
There is no need to set to 0 when it is declared at the top of this
function. It is initialized as 0 in for-loop statement.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:31:50 -08:00
Chaehyun Lim 6e944459aa staging: wilc1000: fix return type of wilc_send_config_pkt
wilc_send_config_pkt is returned 0 or -ETIMEDOUT according to return
value of wilc_wlan_cfg_set or wilc_wlan_cfg_set.
It is better to use int type to represent linux standard error code.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:31:50 -08:00
Dan Carpenter d99ee289b4 staging: wilc1000: fix mgmt_tx()
There was a missing curly brace so this function returns failure instead
of succeeding.

Fixes: 06fb9336ac ('staging: wilc1000: wilc_wfi_cfgoperations.c: replaces PRINT_ER with netdev_err')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:31:50 -08:00
Chaehyun Lim 8eb62f3f6d staging: wilc1000: fix return error code of wilc_deinit
It should be returned error code as -EFAULT instead of 0 when hif_drv is
NULL.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Chaehyun Lim 127a27c3fb staging: wilc1000: fix return type of wilc_deinit
This patch changes return type of wilc_deinit 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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Chaehyun Lim 483ab2aa00 staging: wilc1000: rename pstrCfgParamVal in wilc_hif_set_cfg
This patch renames pstrCfgParamVal to cfg_param to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Chaehyun Lim 4168da7187 staging: wilc1000: fix return type of wilc_hif_set_cfg
This patch changes return type of wilc_hif_set_cfg 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>
2016-02-07 17:34:58 -08:00
Leo Kim e0990c159f staging: wilc1000: remove warnings line over 80 characters
This patch removes the warnings reported by checkpatch.pl
for line over 80 characters.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Chris Park e3f16965c9 staging: wilc1000: remove unnecessary log message using GENERIC_DBG tag
This patch remove unnecessary log message using GENERIC_DBG tag.
Needed log messages has changed netdev_dbg from PRINT_D.
And removes variables that were used to log message.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Chris Park c9f75c3071 staging: wilc1000: remove unused debug tag
This patch remove unused debug tag INT_DBG, LOCK_DBG, BUS_DBG,
MEM_DBG and FIRM_DBG

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Chris Park eef2679b09 staging: wilc1000: remove unused log message using the RX_DBG tag
This patch remove unused log message using the RX_DBG tag

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Chris Park 5b3b744a4c staging: wilc1000: remove unnecessary wilc_rx_complete function
This patch remove unnecessary wilc_rx_complete function
because this function only print unused log message.
remove unused has_packet variable nomore.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 17d2f2b36f staging: wilc1000: renames u64Tsf of connect_resp_info structure
This patch renames u64Tsf variable to tsf_hi.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim f2050a1896 staging: wilc1000: renames strRssi of connect_resp_info structure
This patch renames strRssi variable to str_rssi.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim cb64de7c36 staging: wilc1000: renames pJoinParams of connect_resp_info structure
This patch renames pJoinParams variable to join_params.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 390b6db00d staging: wilc1000: renames struct connect_resp_info variables
This patch renames to avoid camelcase changes follow are:
 - pu8IEs to ies
 - u16IEsLen to ies_len

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim afb706539b staging: wilc1000: renames u32Tsf of connect_resp_info structure
This patch renames u32Tsf variable to tsf_lo.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim a35d6e2ded staging: wilc1000: renames u8Found of connect_resp_info structure
This patch renames u8Found variable to found.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim d40207637a staging: wilc1000: renames bNewNetwork of connect_resp_info structure
This patch renames bNewNetwork variable to new_network.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 264d70f4de staging: wilc1000: renames struct connect_resp_info variables
This patch renames to avoid camelcase changes follow are:
 - u32TimeRcvdInScanCached to time_scan_cached
 - u32TimeRcvdInScan to time_scan

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 405a8c7864 staging: wilc1000: renames u8channel of connect_resp_info structure
This patch renames u8channel variable to ch.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim df340fdf01 staging: wilc1000: renames u8DtimPeriod of connect_resp_info structure
This patch renames u8DtimPeriod variable to dtim_period.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 4b313e915b staging: wilc1000: renames u16BeaconPeriod of connect_resp_info structure
This patch renames u16BeaconPeriod variable to beacon_period.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 38d3bb7878 staging: wilc1000: renames au8bssid of connect_resp_info structure
This patch renames au8bssid variable to bssid.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim a36e89e9bb staging: wilc1000: renames u8SsidLen of connect_resp_info structure
This patch renames u8SsidLen variable to ssid_len.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 2a3ff58a8a staging: wilc1000: renames au8ssid of connect_resp_info structure
This patch renames au8ssid variable to ssid.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim fa5e2d159f staging: wilc1000: renames u16CapInfo of connect_resp_info structure
This patch renames u16CapInfo variable to cap_info.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 5c23a29145 staging: wilc1000: renames s8rssi of connect_resp_info structure
This patch renames s8rssi variable to rssi.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 6b5180a084 staging: wilc1000: remove typedef from pstrNetworkInfo
This patch removes typedef from the struct pstrNetworkInfo and
renames it to network_info.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim ba7b6ff52a staging: wilc1000: renames struct connect_resp_info variables
This patch renames to avoid camelcase and remove prefix names,
changes follow are:
 - u16capability to capability
 - u16ConnectStatus to status
 - u16AssocID to assoc_id
 - pu8RespIEs to ies
 - u16RespIEsLen to ies_len

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 40d96e1d76 staging: wilc1000: remove typedef from tstrConnectRespInfo
This patch removes typedef from the struct tstrConnectRespInfo and
renames it to connect_resp_info.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 5f79c2aebf staging: wilc1000: removes function 'wilc_dealloc_assoc_resp_info()'
This patch removes function wilc_dealloc_assoc_resp_info()'.
Does not need this function which only free memory.
Therefore, this function is removed and changed directly with kfree.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim d9fb23d72f staging: wilc1000: removes function 'wilc_dealloc_network_info()'
This patch removes function 'wilc_dealloc_network_info()'.
Does not need this function which only free memory.
Therefore, this function is removed and changed directly with kfree.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Chris Park a41047962a staging: wilc1000: remove unused log message using the TX_DBG tag
This patch remove unused log message using the TX_DBG tag

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Chris Park c4f97526a0 staging: wilc1000: remove unused log message using the HOSTINF_DBG tag
This patch remove unused log message using the HOSTINF_DBG tag

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Chris Park 368949a7c0 staging: wilc1000: remove unused log message using the CORECONFIG_DBG tag
This patch remove unused log messages using the CORECONFIG_DBG tag

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim e078ed7366 staging: wilc1000: wilc_msgqueue.c: removes debug print log
This patches removes unnecessary debug print logs.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 06fb9336ac staging: wilc1000: wilc_wfi_cfgoperations.c: replaces PRINT_ER with netdev_err
This patches replaces PRINT_ER with netdev_err.
Removes unnecessary debug logs as well.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Chris Park 65c3f00013 staging: wilc1000: Optimize code of wilc_get_chipid function
This patch optimize code of wilc_get_chipid function.
u8 type changed to boolean type and removed unnecessary if statement.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Chris Park 20f4e712d1 staging: wilc1000: remove warnings missing a blank line after declarations
This patch remove warnings reported by checkpatch.pl
for missing a blank line after declarations

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Chris Park f06b9baf87 staging: wilc1000: remove unnecessary braces
This patch remove warnings reported by checkpatch.pl
for unnecessary braces

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Chris Park b2a45eae9f staging: wilc1000: remove useless function
This patch remove useless function remove_TCP_related
in wilc_wlan.c file

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Chris Park 133b22d694 staging: wilc1000: remove useless log message
This patch remove useless log message in wilc_wlan.c file

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Chris Park 4d38a56b3c staging: wilc1000: fix warnings for line over 80 characters
This patch fixes warnings reported by checkpatch.pl
for line over 80 characters

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim c1725aab7c staging: wilc1000: wilc_dealloc_network_info(): renames function variables
This patch renames to avoid camelcase, changes follow are:
 - pstrNetworkInfo to network_info

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 9f4970edc5 staging: wilc1000: wilc_dealloc_assoc_resp_info(): renames function variables
This patch renames to avoid camelcase, changes follow are:
 - pstrConnectRespInfo to connect_resp_info

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim ebd7a9b037 staging: wilc1000: wilc_parse_assoc_resp_info(): renames local variables
This patch renames to avoid camelcase, changes follow are:
 - pstrConnectRespInfo to connect_resp_info
 - u16AssocRespLen to assoc_resp_len
 - pu8IEs to ies
 - u16IEsLen to ies_len

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 946a9ddb43 staging: wilc1000: wilc_parse_assoc_resp_info(): renames function variables
This patch renames to avoid camelcase, changes follow are:
 - pu8Buffer to buffer
 - u32BufferLen to buffer_len
 - ppstrConnectRespInfo to ret_connect_resp_info

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 66d77cb5bb staging: wilc1000: rename variable s32Error
This patch renames variable s32Error to result
to avoid CamelCase naming convention.
Also, remove the unused variable s32Error and replace with direct return.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim e509681d19 staging: wilc1000: wilc_parse_network_info(): renames local inner variables
This patch renames to avoid camelcase, changes follow are:
 - pu8TimElm to tim_elm
 - pu8IEs to ies
 - u16IEsLen to ies_len
 - u32Tsf_Lo to tsf_lo
 - u32Tsf_Hi to tsf_hi

And, remove the prefix variable defined name, below are:
 - u8index to index
 - pu8msa to msa

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 5fd5e1e15c staging: wilc1000: wilc_parse_network_info(): renames local variables
This patch renames to avoid camelcase, changes follow are:
 - pstrNetworkInfo to network_info
 - u8MsgType to msg_type
 - u8MsgID to msg_id
 - u16MsgLen to msg_len
 - u16WidID to wid_id
 - u16WidLen to wid_len
 - pu8WidVal to wid_val

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim cdd610644b staging: wilc1000: wilc_parse_network_info(): renames function variables
This patch renames to avoid camelcase, changes follow are:
 - pu8MsgBuffer to msg_buffer
 - ppstrNetworkInfo to ret_network_info

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim bc4b5b3cf7 staging: wilc1000: fixes variable dereferenced before check
This patch fixes the warning reported by smatch.
 - wilc_wlan_get_firmware() warn: variable dereferenced before check 'vif'
 - wilc_set_multicast_list() warn: variable dereferenced before check 'dev'

Just delete them and no need add null check since they are net_device from
ndo_set_rx_mode of net_device_ops and vif of netdev_priv.

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>
2016-02-07 17:34:58 -08:00
Leo Kim 6750140dfc staging: wilc1000: renames u8IfIdx of wilc_vif structure
This patch renames u8IfIdx variable of wilc_vif structure to idx
to avoid camelcase.

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>
2016-02-07 17:34:58 -08:00
Leo Kim b6ba7e899f staging: wilc1000: removes void function return
This patch removes the warning reported by checkpatch.pl
for void function return statements are not generally useful.

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>
2016-02-07 17:34:58 -08:00
Leo Kim 5ac2442732 staging: wilc1000: replaces PRINT_XXX with netdev_xxx
This patches replaces PRINT_XXX with netdev_xxx.

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>
2016-02-07 17:34:58 -08:00
Leo Kim 1408603c95 staging: wilc1000: removes unnecessary debug logs
This patch removes unnecessary debug logs.

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>
2016-02-07 17:34:58 -08:00
Leo Kim 885cabccf9 staging: wilc1000: remove warnings line over 80 characters
This patch removes the warnings reported by checkpatch.pl
for line over 80 characters.

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>
2016-02-07 17:34:58 -08:00
Leo Kim 5b9f526e79 staging: wilc1000: rename pBssid of tx_complete_data structure
This patch renames pBssid variable of tx_complete_data structure to bssid
to avoid camelcase.

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>
2016-02-07 17:34:58 -08:00
Leo Kim fa8b23c6f2 staging: wilc1000: fixes missing a blank line after declarations
This patch fixes the warnings reported by checkpatch.pl
for Missing a blank line after declarations.

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>
2016-02-07 17:34:58 -08:00
Leo Kim 48b28df99c staging: wilc1000: rename hWILCWFIDrv of wilc_priv structure
This patch renames hWILCWFIDrv pointer variable of wilc_priv structure
to hif_drv to avoid camelcase.

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>
2016-02-07 17:34:58 -08:00
Glen Lee 79df6a490b staging: wilc1000: pass vif to wilc_send_config_pkt
This patch passes vif instead of wilc to wilc_send_config_pkt and it's related
functions as well, because we need vif which is currently being used and
vif has wilc as well.
Change custom print with netdev_xxx format if there are custom print inside
the functions we have changed.

Function parameter of following functions are modified to vif.
wilc_send_config_pkt
wilc_wlan_cfg_set
wilc_wlan_cfg_get
wilc_wlan_cfg_commit
wilc_wlan_txq_add_cfg_pkt
wilc_wlan_txq_add_to_head

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Glen Lee ef7e012fdc staging: wilc1000: move wilc_send_config_pkt to wilc_wlan.c
This patch moves the function wilc_send_config_pkt to wilc_wlan.c which
handles transport since the purpose of the function is sending/getting of
config information. coreconfiguator.[ch] will be rename with frame.[ch] later.
The print codes of the function is removed also and they will be implemented
with netdev_xx print format later.
struct wid need to be moved to wilc_wlan_if.h which defines configure
informations.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Glen Lee 32cee9993c staging: wilc1000: get mac address after setting drv handler
This patch moves wilc_get_mac_address and address memcpy function after
calling wilc_set_wif_drv_handler to get selected mac address.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Glen Lee ec45048326 staging: wilc1000: fix WEP security bug
Station cannot connect to soft AP mode wilc when it is configured for WEP
security. This patch fixes it by setting the key index within the key value and
change the last else condition with DEFAULTKEY action case, and also do not use
WILC_WFI_wep_default index to set wep key id.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Glen Lee 7041879043 staging: wilc1000: add ops tx power in cfg80211
This patch implements set_tx_power and get_tx_power of cfg80211_ops.
In addition, Id of HOST_IF_MSG_DEL_ALL_RX_BA_SESSIONS is changed with 37.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Glen Lee 783d07c1bf staging: wilc1000: fix bug on p2p connection
In case of action frame, size -7 is correct, but in this case, size should be
used as it is.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Glen Lee cba352a4c1 staging: wilc1000: disable power save when AP mode
This patch disables power save mode in case of AP mode.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Glen Lee 4fd6229147 staging: wilc1000: increase link speed
This patch increases throughput by enabling tcp ack filter base on checking
statistics and also handling tcp session.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Glen Lee e9576e96cc staging: wilc1000: remove define TCP_ACK_FILTER
This patch removes define TCP_ACK_FILTER and use it's feature codes.
Add argument wilc to wilc_wlan_txq_remove because compile error happens.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Glen Lee c6866cc4be staging: wilc1000: tcp_process: fix a build warning
This patch fixes build warning "flags is used uninitialized" when
TCP_ACK_FILTER is defined.

Fixes: 562ed3f1f7 ("staging/wilc1000: pass struct wilc to most linux_wlan.c functions")
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Glen Lee 430e640d6d staging: wilc1000: handle connecting error
If connection fails, wilc1000_connecting needs to be set false also and return
immediately because goto lable 'done' doesn't do anything. Remove lable 'done'
as well.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Glen Lee ff9d65abc8 staging: wilc1000: ignore power save
If two interfaces are connected and it is required to enable power save then
ignore the request.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Glen Lee ef54719cab staging: wilc1000: remove unused functions
This patch removes unused following functions.
wilc_del_all_rx_ba_session
wilc_flush_join_req
wilc_wait_msg_queue_idle
wilc_set_mac_address

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Glen Lee b330686595 staging: wilc1000: wilc_set_wfi_drv_handler: add mac index
Firmware supports sta/ap concurrency so mac index will be passed to wilc.
Remove wilc_set_wfi_drv_handler in scan and connect functions, and call
the function in ndo_open which is wilc_mac_open.
WID_SET_DRV_HANDLER value has been changed as well.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Sudip Mukherjee abb4f8addf 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.

Fixes: 73584a40d7 ("staging: wilc1000: add ops resuem/suspend/wakeup in cfg80211")
Cc: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-06 22:03:18 -08:00
Chaehyun Lim e5349952de 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>
2016-02-03 15:34:29 -08:00
Chaehyun Lim b026f6e8d6 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>
2016-02-03 15:34:29 -08:00
Chaehyun Lim fa611271b4 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>
2016-02-03 15:34:29 -08:00
Chaehyun Lim b4a53a6212 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>
2016-02-03 15:34:29 -08:00
Chaehyun Lim 964d8936dd 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>
2016-02-03 15:34:29 -08:00
Chaehyun Lim 382af7f2fd 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>
2016-02-03 15:34:29 -08:00
Chaehyun Lim a143657949 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>
2016-02-03 15:34:29 -08:00
Chaehyun Lim 24e33bd5d4 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>
2016-02-03 15:34:29 -08:00
Chaehyun Lim c7843469a7 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>
2016-02-03 15:34:29 -08:00
Chaehyun Lim 570549141a 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>
2016-02-03 15:34:29 -08:00
Chaehyun Lim d8c7d2b35d 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>
2016-02-03 15:34:29 -08:00
Chaehyun Lim 8231dfc087 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>
2016-02-03 15:33:09 -08:00
Chaehyun Lim e9670aba93 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>
2016-02-03 15:33:09 -08:00
Leo Kim c8a0638150 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>
2016-02-03 15:29:56 -08:00
Leo Kim 6c25d7cbab 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>
2016-02-03 15:29:56 -08:00
Leo Kim e1a9db87a6 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>
2016-02-03 15:29:56 -08:00
Leo Kim 43b36e42a5 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>
2016-02-03 15:29:56 -08:00
Leo Kim 40095ad9ec 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>
2016-02-03 15:28:21 -08:00
Leo Kim f05ab24945 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>
2016-02-03 15:28:21 -08:00
Leo Kim 0953a2e33b 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>
2016-02-03 15:28:21 -08:00
Chaehyun Lim 4cf93d706f 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>
2016-02-03 15:27:05 -08:00
Glen Lee ee63230920 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>
2016-02-03 15:25:40 -08:00
Glen Lee 86bff01b94 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>
2016-02-03 15:25:40 -08:00
Glen Lee ff35567923 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>
2016-02-03 15:25:40 -08:00
Glen Lee ba615f1ef9 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>
2016-02-03 15:25:40 -08:00
Glen Lee e32737e9da 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>
2016-02-03 15:25:40 -08:00
Glen Lee 14823bf2ea 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>
2016-02-03 15:25:40 -08:00
Glen Lee b8f6ca0b16 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>
2016-02-03 15:25:40 -08:00
Glen Lee 08037941d6 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>
2016-02-03 15:25:40 -08:00
Glen Lee 73584a40d7 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>
2016-02-03 15:25:40 -08:00
Glen Lee 5397cbc231 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>
2016-02-03 15:25:40 -08:00
Glen Lee 76855ba75f 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>
2016-02-03 15:25:40 -08:00
Glen Lee fdc2ac1aaf 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>
2016-02-03 15:25:40 -08:00
Glen Lee 33c64975e3 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>
2016-02-03 15:25:40 -08:00
Glen Lee 0c94df0236 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 : 67e2a07ed8 ("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>
2016-02-03 15:25:40 -08:00
Chaehyun Lim 734fadce60 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim 2c8e2dcb88 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim 7adf4f312b 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim 5b8e7ba9fd 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim 62082cbe72 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim e8f2d1f19c 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim f034b01ea6 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim 24752783ba 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim dee1bf76d9 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim bd07b0076b 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim 669fd5077f 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim 81e886e0b7 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim 832f4fa5f1 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim 5eb359756f 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim fca978b718 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim d742f67ee1 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim 2cc08b4f26 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim f9d26e21a8 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim ec815ec5fd 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim c700cab301 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim 3c09bb2e1e 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim 9b849fd9ad 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim 5ba8955404 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim 3356116124 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim d3ff0580b9 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim 78d50f94f0 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim d16791bfd5 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>
2016-02-03 15:21:18 -08:00
Chaehyun Lim eec826439d 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>
2016-02-03 15:20:15 -08:00
Arnd Bergmann ce7b516f3f 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>
2016-02-03 15:20:15 -08:00
Chaehyun Lim 1e995c1079 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>
2016-02-03 15:17:27 -08:00
Chaehyun Lim 3bff53a880 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>
2016-02-03 15:16:57 -08:00
Chaehyun Lim 1a271d9960 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>
2016-02-03 15:16:26 -08:00
Chaehyun Lim d317818bf4 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>
2016-02-03 15:16:26 -08:00
Chaehyun Lim 2c97f2d4ed 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>
2016-02-03 15:15:43 -08:00
Chaehyun Lim c8fb0bf931 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>
2016-02-03 15:15:39 -08:00
Chaehyun Lim 6ca31901d9 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>
2016-02-03 15:15:33 -08:00
Chaehyun Lim ce2d023ff5 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>
2016-02-03 15:15:24 -08:00
Chaehyun Lim 86163ec990 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>
2016-02-03 15:15:16 -08:00
Chaehyun Lim 5eb037e6d3 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>
2016-02-03 15:15:05 -08:00
Chaehyun Lim c0734df9b3 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>
2016-02-03 15:14:39 -08:00
Chaehyun Lim 3c2be65f28 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>
2016-02-03 15:14:39 -08:00
Chaehyun Lim 03a5d8c085 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>
2016-02-03 15:14:39 -08:00
Chaehyun Lim 40e05e86d5 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>
2016-02-03 15:14:05 -08:00
Chaehyun Lim 245a18654f 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>
2016-02-03 15:14:05 -08:00
Chaehyun Lim a2d4969bc9 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>
2016-02-03 15:14:05 -08:00
Chaehyun Lim 8c6492aa90 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>
2016-02-03 15:14:05 -08:00
Hugo Camboulive d27afda304 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>
2016-02-03 15:11:00 -08:00
Hugo Camboulive 1870394394 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>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 75bf22c14c 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>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 733d10312c staging: wilc1000: rename pu8Tail in wilc_add_beacon
This patch renames pu8Tail to tail to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 2df3585b12 staging: wilc1000: rename u32TailLen in wilc_add_beacon
This patch renames u32TailLen to tail_len to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 55a76be054 staging: wilc1000: rename pu8Head in wilc_add_beacon
This patch renames pu8Head to head to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 418990415f staging: wilc1000: rename u32HeadLen in wilc_add_beacon
This patch renames u32HeadLen to head_len to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 916935f5c8 staging: wilc1000: rename u32DTIMPeriod in wilc_add_beacon
This patch renames u32DTIMPeriod to dtim_period to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 8b1844bb20 staging: wilc1000: rename u32Interval in wilc_add_beacon
This patch renames u32Interval to interval to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 4d84dbed22 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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 9d6cec9f46 staging: wilc1000: rename u8AssocNumb in wilc_del_allstation
This patch renames u8AssocNumb to assoc_sta to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim cc971eec56 staging: wilc1000: use int instead of u32
The variable i is used as array index so that it is better to use data
type of int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 06e682b06e staging: wilc1000: rename au8Zero_Buff in wilc_del_allstation
This patch renames au8Zero_Buff to zero_addr to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 55d44a621d staging: wilc1000: rename pstrDelAllStationMsg in wilc_del_allstation
This patch renames pstrDelAllStationMsg to del_all_sta_info to avoid
camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 2092374d7e staging: wilc1000: rename pu8MacAddr in wilc_del_allstation
This patch renames pu8MacAddr to mac_addr to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 253eb92e40 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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim e38d850f70 staging: wilc1000: remove rates variable in wilc_edit_station
Instead of using rates variable, it is used as add_sta_info->rates
directly.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 1ae82d1ab0 staging: wilc1000: use kmemdup in wilc_edit_station
This patch replaces kmalloc followed by memcpy with kmemdup.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 785c071204 staging: wilc1000: rename pstrAddStationMsg in wilc_edit_station
This patch renames pstrAddStationMsg to add_sta_info to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 4c7abe1919 staging: wilc1000: rename pstrStaParams in wilc_edit_station
This patch renames pstrStaParams to sta_param to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 4208e66321 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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim b91e6f3377 staging: wilc1000: rename pBASessionInfo in wilc_del_all_rx_ba_session
This patch renames pBASessionInfo to ba_session_info to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim d7954748de staging: wilc1000: rename TID in wilc_del_all_rx_ba_session
This patch renames TID to tid to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 73d41cce77 staging: wilc1000: rename pBSSID in wilc_del_all_rx_ba_session
This patch renames pBSSID to bssid to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 2c2e461b1d 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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 482c43301d staging: wilc1000: rename pvUserArg in wilc_remain_on_channel
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>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 1aae9398e5 staging: wilc1000: rename RemainOnChanReady in wilc_remain_on_channel
This patch renames RemainOnChanReady to ready to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 95bfdd58c0 staging: wilc1000: rename RemainOnChanExpired in wilc_remain_on_channel
This patch renames RemainOnChanExpired to expired to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim d44cd45ee1 staging: wilc1000: rename u32duration in wilc_remain_on_channel
This patch renames u32duration to duration to remove u32 prefix.
There is no need u32 prefix to show data type of this variable.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 6f7584be30 staging: wilc1000: rename u32SessionID in wilc_remain_on_channel
This patch renames u32SessionID to session_id to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 6d6bc4003b 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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim fb6e06806b 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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:11:00 -08:00
Chaehyun Lim 4ad878bee1 staging: wilc1000: move static declaration of host_int_get_ipaddress
This patch moves static function declaration to front part of
host_interface.c file.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:09:44 -08:00
Chaehyun Lim 3b4276d92f staging: wilc1000: rename u16ipadd in host_int_get_ipaddress
This patch renames u16ipadd to ip_addr to remove u16 prefix.
There is no need to use this prefix to show data type of this argument.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:09:44 -08:00
Chaehyun Lim f8813d3aa2 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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:09:44 -08:00
Chaehyun Lim cb8f4e0e6d 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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:09:44 -08:00
Chaehyun Lim 0fd6fa3298 staging: wilc1000: remove return statement
This patch removes return statement that is always returned 0.
wilc_setup_ipaddress can not run to the end due to return statement.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:09:44 -08:00
Chaehyun Lim 6964f086e5 staging: wilc1000: rename u16ipadd in wilc_setup_ipaddress
This patch renames u16ipadd to ip_addr to remove u16 prefix.
There is no need to use prefix to show data type of this argument.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:09:44 -08:00
Chaehyun Lim 3d2a0bf719 staging: wilc1000: fix return type of wilc_setup_ipaddress
This patch changes return type of wilc_setup_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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:09:44 -08:00
Chaehyun Lim 40ecd38a6e staging: wilc1000: rename pstrMulticastFilterParam in wilc_setup_multicast_filter
This patch renames pstrMulticastFilterParam to multicast_filter_param to
avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:09:44 -08:00
Chaehyun Lim 2dff2d4228 staging: wilc1000: rename u32count in wilc_setup_multicast_filter
This patch renames u32count to count to remove u32 prefix.
There is no need to use this prefix to show data type of this argument.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:09:44 -08:00
Chaehyun Lim b80c094302 staging: wilc1000: rename bIsEnabled in wilc_setup_multicast_filter
This patch renames bIsEnabled to enabled to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:09:44 -08:00
Chaehyun Lim 14d9526f69 staging: wilc1000: fix return type of wilc_setup_multicast_filter
This patch changes return type of wilc_setup_multicast_filter 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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:09:44 -08:00
Chaehyun Lim 568640e4f1 staging: wilc1000: rename pstrPowerMgmtParam in wilc_set_power_mgmt
This patch renames pstrPowerMgmtParam to pwr_mgmt_info to avoid
camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:09:44 -08:00
Chaehyun Lim ecd275000a staging: wilc1000: rename u32Timeout in wilc_set_power_mgmt
This patch renames u32Timeout to timeout to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:09:44 -08:00
Chaehyun Lim dbaa524e23 staging: wilc1000: rename bIsEnabled in wilc_set_power_mgmt
This patch renames bIsEnabled to enabled to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:09:44 -08:00
Chaehyun Lim 5d48f12c4c staging: wilc1000: fix return type of wilc_set_power_mgmt
This patch changes return type of wilc_set_power_mgmt 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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:09:44 -08:00
Chaehyun Lim 6b0f7cdd89 staging: wilc1000: rename u32SessionID in wilc_listen_state_expired
This patch renames u32SessionID to session_id to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:09:44 -08:00
Chaehyun Lim 5ca581ef48 staging: wilc1000: fix return type of wilc_listen_state_expired
This patch changes return type of wilc_listen_state_expired 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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:09:44 -08:00
Chaehyun Lim 8859fc2898 staging: wilc1000: rename bReg in wilc_frame_register
This patch renames bReg to reg to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:09:44 -08:00
Chaehyun Lim 2a8432ff39 staging: wilc1000: rename u16FrameType in wilc_frame_register
This patch renames u16FrameType to frame_type to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:09:44 -08:00
Chaehyun Lim de61db9e07 staging: wilc1000: fix return type of wilc_frame_register
This patch changes return type of wilc_frame_register 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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:09:44 -08:00
Chaehyun Lim f70b25ff32 staging: wilc1000: rename pstrStatistics in wilc_get_statistics
This patch renames pstrStatistics to stats to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:08:06 -08:00
Chaehyun Lim cd163d32d1 staging: wilc1000: fix return type of wilc_get_statistics
This patch changes return type of wilc_get_statistics 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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:08:06 -08:00
Chaehyun Lim 652bb5e888 staging: wilc1000: rename ps8Rssi in wilc_get_rssi
This patch renames ps8Rssi to rssi_level to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:08:06 -08:00
Chaehyun Lim e16aed64cf staging: wilc1000: fix return type of wilc_get_rssi
This patch changes return type of wilc_get_rssi 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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:08:06 -08:00
Chaehyun Lim a5f9943cc0 staging: wilc1000: remove wilc_free_join_params
wilc_free_join_params call kfree. There is no need to use
wrapper function, so use kfree directly.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:08:06 -08:00
Chaehyun Lim 9f723fdeb8 staging: wilc1000: rename u16ReasonCode in wilc_disconnect
This patch renames u16ReasonCode to reason_code to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:08:06 -08:00
Chaehyun Lim 5350251a9b staging: wilc1000: fix return type of wilc_disconnect
This patch changes return type of wilc_disconnect from s32 to int.
The result variable gets return value from wilc_disconnect that has
return 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>
2016-02-03 15:08:06 -08:00
Chaehyun Lim 11623136ef staging: wilc1000: use kmemdup instead of kmalloc and memcpy
This patch changes kmalloc/memcpy to kmemdup.
It is also added error checking to return -ENOMEM if kmemdup is failed.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:08:06 -08:00
Chaehyun Lim f382b37606 staging: wilc1000: rename pJoinParams in wilc_set_join_req
This patch renames pJoinParams to join_params to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:08:06 -08:00
Chaehyun Lim 0ea1ece02d staging: wilc1000: rename u8channel in wilc_set_join_req
This patch renames u8channel to channel to remove u8 prefix.
There is no need to add prefix in order to show data type of this
variable.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:08:06 -08:00
Chaehyun Lim 12a3b8bc26 staging: wilc1000: rename tenuAuth_type in wilc_set_join_req
This patch renames tenuAuth_type to auth_type to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:08:06 -08:00
Chaehyun Lim e0c54a883f staging: wilc1000: rename u8security in wilc_set_join_req
This patch renames u8security to security to remove u8 prefix.
There is no need to add prefix in order to show data type of this
variable.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:08:06 -08:00
Chaehyun Lim 2ef29833e1 staging: wilc1000: rename pvUserArg in wilc_set_join_req
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>
2016-02-03 15:08:06 -08:00
Chaehyun Lim 81c23a7ebc staging: wilc1000: rename pfConnectResult in wilc_set_join_req
This patch renames pfConnectResult to connect_result to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:08:06 -08:00
Chaehyun Lim 8c38d960a4 staging: wilc1000: rename IEsLen in wilc_set_join_req
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>
2016-02-03 15:08:06 -08:00
Chaehyun Lim 88c9421ad2 staging: wilc1000: rename pu8IEs in wilc_set_join_req
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>
2016-02-03 15:08:06 -08:00
Chaehyun Lim dee39b1b1b staging: wilc1000: rename ssidLen in wilc_set_join_req
This patch renames ssidLen to ssid_len to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:08:06 -08:00
Chaehyun Lim f2cb5f3f1b staging: wilc1000: rename pu8ssid in wilc_set_join_req
This patch renames pu8ssid to ssid to remove pu8 prefix.
There is no need to add this prefix in order to show data type of this
variable.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:08:06 -08:00
Chaehyun Lim 16a537ca78 staging: wilc1000: rename pu8bssid in wilc_set_join_req
This patch renames pu8bssid to bssid to remove pu8 prefix.
There is no need to add this prefix in order to show data type of this
variable.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:08:06 -08:00
Chaehyun Lim 0a285b2770 staging: wilc1000: fix return type of wilc_set_join_req
This patch changes return type of wilc_set_join_req 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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:08:06 -08:00
Chaehyun Lim 30205892ec staging: wilc1000: fix return type of wilc_flush_join_req
This patch changes return type of wilc_flush_join_req 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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:08:06 -08:00
Hari Prasath Gujulan Elango a045618e01 staging: wilc1000: replace numerical constant with predefined MACRO
Replace the pre-defined macro signifying the ethernet protocol type
defined in the kernel headers instead of the numerical constant

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:05:35 -08:00
Glen Lee 43d1ca5284 staging: wilc1000: remove wilc_sdio_init
wilc_sdio_init return always 1, which is needless. Remove it and it's related
codes also.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:05:35 -08:00
Glen Lee e663900aed staging: wilc1000: fix always return 0 error
This patch fixes a bug that return always 0 so it fails every time.

Fixes: c1af9db78950 ("staging: wilc1000: call linux_sdio_init instead of io_init")
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:05:35 -08:00
Chaehyun Lim f95f480c51 staging: wilc1000: rename pu8MacAddress in wilc_set_mac_address
This patch changes pu8MacAddress to mac_addr to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:05:35 -08:00
Chaehyun Lim 0b47762490 staging: wilc1000: fix return type of wilc_set_mac_address
This patch changes return type of wilc_set_mac_address 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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:05:35 -08:00
Chaehyun Lim 1eabfe3fe7 staging: wilc1000: rename pu8MacAddress in wilc_get_mac_address
This patch changes pu8MacAddress to mac_addr to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:05:35 -08:00
Chaehyun Lim dcb15a0810 staging: wilc1000: fix return type of wilc_get_mac_address
This patch changes return type of wilc_get_mac_address 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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:05:35 -08:00
Chaehyun Lim 16c0cba773 staging: wilc1000: rename pu8PmkidInfoArray in wilc_set_pmkid_info
This patch changes pu8PmkidInfoArray to pmkid to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:05:35 -08:00
Chaehyun Lim 89dec13951 staging: wilc1000: replace u32 with int
The data type of variable i changes u32 to int.
It is used as array index to copy some data with memcpy function
so that it is better to use data type of int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:05:35 -08:00
Chaehyun Lim 1ab587052b staging: wilc1000: fix return type of wilc_set_pmkid_info
This patch changes return type of wilc_set_pmkid_info 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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:05:35 -08:00
Chaehyun Lim 000b562530 staging: wilc1000: remove wilc_set_start_scan_req declaration
This patch deletes wilc_set_start_scan_req declaration. It is not find
wilc_set_start_scan_req definition in this driver.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:05:35 -08:00
Chaehyun Lim ad510dac48 staging: wilc1000: remove wilc_add_tx_gtk declaration
This patch deletes wilc_add_tx_gtk declaration. It is not find
wilc_add_tx_gtk definition in this driver.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:05:35 -08:00
Chaehyun Lim 9676108e92 staging: wilc1000: match argument name of wilc_add_rx_gtk declaration
Some argument name of wilc_add_rx_gtk declaration is different to those
of this function definition. It is changed as same name of this function
declaration and definition.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:05:35 -08:00
Chaehyun Lim a11486e48b staging: wilc1000: fix return type of wilc_add_rx_gtk declaration
This patch changes return type of wilc_add_rx_gtk declaration from s32
to int. The return type of this function declaration and definition
should be same as data type of int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:05:35 -08:00
Chaehyun Lim 961875ed9e staging: wilc1000: match argument name of wilc_add_ptk declaration
Some arguments name of wilc_add_pkt declaration is different to those of
this function definition. It is changed as same name of this function
declaration and definition.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:05:35 -08:00
Chaehyun Lim 1dd44dda6e staging: wilc1000: fix return type of wilc_add_pkt declaration
This patch changes return type of wilc_add_pkt declaration from s32 to
int. The return type of this function declaration and definition should
be same as data type of int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:05:35 -08:00
Glen Lee 608b0515b7 staging: wilc1000: bug fix on memory free
Set tx_buffer to NULL not to free again the memory that is already freed,
which could cause system crash when device is failed.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:21:09 -08:00
Glen Lee 03efae328d staging: wilc1000: set hif_drv before it is used
We are using hif_drv of vif, so it needs to be set before it is used.
Set hif_drv to vif->hifdrv soon after it is allocated.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:21:09 -08:00
Glen Lee cd2920a50c staging: wilc1000: remove wilc of struct host_if_drv
vif has wilc in it's members so no need to have wilc in host_if_drv.
It is redundant so just remove it and use wilc of vif.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:21:09 -08:00
Glen Lee b13584a899 staging: wilc1000: remove drv of struct host_if_msg
This patch remove drv of struct host_if msg and it's related codes.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:21:09 -08:00
Glen Lee e79dcf7eaa staging: wilc1000: remove used functions
This patch remove unused functions add_handler_in_list and
remove_handler_in_list, and it's related global variable wfidrv_list and codes.
label fail_timer_2 and it's codes are removed since label is not used anymore.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:21:09 -08:00
Glen Lee 7036c6244d staging: wilc1000: change join_req_drv type and it's name
To use wilc_get_vif_idx instead of the last get_id_from_handler, join_req_drv
needs to be changed it's type with wilc_vif and name as well.
As a result, get_id_from_handler is not used anymore, so remove it.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:21:09 -08:00
Glen Lee 31f0f697dd staging: wilc1000: wilc_set_wfi_drv_handler: pass vif index
Pass index of vif instead of hif_drv. wilc_get_vif_idx is used to get correct
index of vif.
In the handler function handle_set_wfi_drv_handler, use vif instead of hif_drv,
and use hif_drv_handler->handler instead of hif_drv when deinitialize wilc
device.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:21:09 -08:00
Glen Lee eb9939b760 staging: wilc1000: use vif index to communicate with wilc device
We now have vif index in all functions related with host interface thread.
wilc_get_vif_idx and wilc_get_vif_from_idx are added to get id and vif
respectively.
Relace get_id_from_handler with wilc_get_vif_idx and get_handler_from_id with
wilc_get_vif_from_idx. Remove unused function get_handler_from_id as well.
We get vif where wilc_get_vif_from_idx is called, so pass vif to msg.vif.

There are two get_id_from_handler left. 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>
2015-12-21 13:21:09 -08:00
Glen Lee cd04d221dd staging: wilc1000: pass struct wilc
Pass struct wilc to the following functions. The functions need wilc to
get proper vif using id from wilc device.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:21:09 -08:00
Glen Lee 71130e812a staging: wilc1000: take vif instead of drv in hostIFthread
In the first patch, we sent vif to hostIFthread. we can use vif instead of
drv in the all functions which handle the commands from cfg operations.
Change first argument host_if_drv with wilc_vif and use hif_drv of wilc_vif.
Pass vif to the functions as well.
In case of timer callback functions, set vif to the data and use vif instead
of hif_drv.
Lastly, initialize u32RcvdAssocRespInfoLen since changing hif_drv with vif
causes one uninitialied build warning.
Now we have vif that currently being used so we can use interface index of
wilc_vif to send to wilc device.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:21:09 -08:00
Glen Lee fbf5379bfc staging: wilc1000: remove argument hif_drv
In previous patch we add new argument vif which has hif_drv in it's member.
Therefore, no need to pass hif_drv in those functions. Remove argument
struct host_if_drv and use hif_drv of vif.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:21:09 -08:00
Glen Lee cf60106bfc staging: wilc1000: pass vif to hostIFthread
We will pass vif, which is currently being used as net_device, instead of
hif_dev. This is the first step to use index of vif to pass to the driver.
Add new argument vif to all the functions that send message to hostIFthread and
set vif to msg.vif. As a result, hostIfthread will get vif.
In later patch, we will remove drv of host_if_msg and use vif instead of it.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:21:09 -08:00
Glen Lee 1006b5c71c staging: wilc1000: remove duplicate netdev
There are two net_device pointer which is the same because two structures
are merged into wilc_vif in previous patch. Remove wilc_netdev and change
with ndev.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:21:09 -08:00
Glen Lee 1f435d2ef4 staging: wilc1000: change vif to pointer to refence real private data
vif of struct has it's own memory which is not necessary because we have
allocated vif from netdev_priv.
Change vif to pointer type and assign vif which is netdev private data.
Change it's operator on related codes as well.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:21:09 -08:00
Glen Lee a4cac48101 staging: wilc1000: move perInterface_wlan_t to wilc_vif
perInterface_wlan_t and wilc_vif are all about interface control informations.
We will combine those two structures and maintain as one network interface
control information.
Move all the members of perInterface_wlan_t to wilc_vif and remove the
structure. Rename perInterace_wlan_t to wilc_vif and rename variable name nic
to vif which is proper name for it.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:21:09 -08:00
Glen Lee 320edd03fb staging: wilc1000: remove unneeded extern variable
This patch removes unnedded extern variable WILC_WFI_devs[] which is not used.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:21:09 -08:00
Glen Lee 523fc23f11 staging: wilc1000: remove unused files
This patch removes linux_wlan_spi.[ch] which are not used anymore.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:21:09 -08:00
Glen Lee 43a7622935 staging: wilc1000: linux_wlan_spi.c: move all the codes to wilc_spi.c
This patch moves all the codes in linux_wlan_spi.c to wilc_spi.c to make
one spi module. Make wilc_spi_tx, wilc_spi_rx and wilc_spi_tx_rx static
functions. Remove function declaration in linux_wlan_spi.h, which is unnedded
now. No modification has been made inside the codes.
linux_wlan_spi.[ch] will be remove in the next patch.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:21:09 -08:00
Glen Lee 2769d9422e staging: wilc1000: remove unneeded function
wilc_spi_init in linux_wlan_spi.c is unneeded. It just return true. Rename
_wilc_spi_init in wlan_spi.c to wilc_spi_init.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee d4312b6fc8 staging: wilc1000: rename spi function names
There are several similar function names, such as wilc_spi_write and
_wilc_spi_write. It is likely to be confused after merging linux_wlan_spi.c and
wilc_spi.c, so rename following functions properly.
Rename wilc_spi_write to wilc_spi_tx, wilc_spi_read to wilc_spi_rx,
wilc_spi_write_read to wilc_spi_tx_rx, _wilc_spi_write to wilc_spi_write,
_wilc_spi_read to wilc_spi_read.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee 895e5eafad staging: wilc1000: remove unused files
This patch removes linux_wlan_sdio.[ch] which is not used anymore.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee 35a4569e72 staging: wilc1000: linux_wlan_sdio.c: move all the codes to wilc_sdio.c
To Combine linux_wlan_sdio.c and wilc_sdio.c as one file, move all the codes
in linux_wlan_sdio.c to wilc_sdio.c, and make functions static only.
No Modification has not been made except static, just moved them.
Function declaration in linux_wlan_sdio.h is needless, so just remove them.
linux_wlan_sdio.[ch] will be deleted in the next patch.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee 51d002931b staging: wilc1000: linux_sdio_probe: use return value
Return ret from wilc_netdev_init instead of -1 for proper error handling.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee 0f34e924f6 staging: wilc1000: linux_wlan_spi.c: return linux error value
return linux error value instead of 0 or 1 and use -EINVAL. Related codes
also changed together.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Leo Kim 6d04d7a0d9 staging: wilc1000: wilc_deinit(): fixes inconsistent returns
This patch fixes the warning reported by smatch.
 - wilc_deinit() warn: inconsistent returns 'sem:&hif_drv->sem_cfg_values'

This semaphore protect a cfg_values variable but cfg_values variables was not
used here. So, just remove this line.

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>
2015-12-21 13:20:04 -08:00
Leo Kim cb3b05c384 staging: wilc1000: wilc_init(): fixes inconsistent returns
This patch fixes the warning reported by smatch.
 - wilc_init() warn: inconsistent returns 'sem:&hif_drv->sem_cfg_values'

No need to up the sema here since down was not called before get here.

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>
2015-12-21 13:20:04 -08:00
Leo Kim 653bb46301 staging: wilc1000: fixes potential null dereference 'wid.val'
This patch fixes the error reported by smatch.
 - Handle_ListenStateExpired() error: potential null dereference 'wid.val'
If kmalloc failed, referenced to a NULL pointer.

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>
2015-12-21 13:20:04 -08:00
Leo Kim 369a1d3bd3 staging: wilc1000: replace explicit NULL comparisons with !
This patch replace explicit NULL comparison with ! operator to simplify code.
Reported by checkpatch.pl for Comparison to NULL could be written !XXX" or "XXX".

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>
2015-12-21 13:20:04 -08:00
Glen Lee 3bac1c51dc staging: wilc1000: linux_wlan_spi.c: fix NULL comparison style
This patch fixes checkpatch CHECK:comparison to NULL could be written "b".

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee d850659800 staging: wilc1000: linux_wlan_spi.c: add a blank
This patch fixes checkpatch warning: missing a blank like after declarations.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee 5b46e16702 staging: wilc1000: linux_wlan_spi.c: remove braces for single statement
This patches fixes checkpatch warning: braces {} are not necessary for single
statement blocks. Remove some comments also.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee 28e9ad2aca staging: wilc1000: wilc_sdio_cmd52: return linux error value
This patch changes return value with linux error value, not 1 or 0.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee 6f8bded288 staging: wilc1000: wilc_sdio_cmd53: return linux error value
This patch changes return value with linux error value, not 1 or 0.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee 58ed46f795 staging: wilc1000: linux_wlan_sdio.c: remove braces
This patch fixes checkpatch warning braces{} are not necessary for single
statment blocks.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee 3cf9c9a7ff staging: wilc1000: linux_wlan_sdio.c: fix checkpatch warning line over 80
This patch fixes checkpatch warning line over 80 characters.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee 491a2ed74d staging: wilc1000: remove unused functions
This patch removes unused function pointer hif_sync and hif_clear_int, and
removes it's related functions sdio_clear_int, sdio_sync, wilc_spi_clear_int
and wilc_spi_sync.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee 28b01ff594 staging: wilc1000: remove wilc_debug_func of hif_init
This patch removes wilc_debug_func of hif_init and remove it's related
functions as well because it is not used anymore.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee ac1da162e4 staging: wilc1000: sdio/spi: use device print api instead of custom one
This patch use device print api instead of driver defined print. Remove
varialbe dPrint as well. String "[wilc sdio]" and "[wilc spi]" are also removed
from all the print statment if exist because it shows which device the message
is related to.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee 67e2a07ed8 staging: wilc1000: move all of wilc_wlan_dev_t to struct wilc
linux_wlan.c and wilc_wlan.c was separated into two part at the beginning
to support various platforms. They are in charge of send/receive control and
packet data, so they will be merged into one file wlan.c later.
First of all, wilc_wlan_dev_t which is used as global variable of wilc_wlan.c
will be moved into struct wilc.
This patch moves all members of wilc_wlan_dev_t to struct wilc and use wilc
instead of g_wlan. Finally remove wilc_wlan_dev_t and g_wlan.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee 21ee5092ca staging: wilc1000: remove unused varialbe tx_buffer_offset
This patch removes unused variable tx_buffer_offset of wilc_wlan_dev_t.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee a3629a9ee3 staging: wilc1000: remove io_type of wilc_wlan_dev_t
io_type of wilc_wlan_dev_t is unneeded, we can use io_type of struct wilc.
Remove io_type of wilc_wlan_dev_t and use io_type of wilc.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee af9ae09ae0 staging: wilc1000: wilc_wlan.c: remove hif_func of wilc_wlan_dev_t
hif_func of wilc_wlan_dev_t is duplicate because we have same struct
wilc_hif_func ops of struct wilc which is available in wilc_wlan.c.
Rename ops of struct wilc with hif_func and remove hif_func of wilc_wlan_dev_t,
and use wilc->hif_func instead of g_wlan.hif_func in all functions.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee 9e6627ac72 staging: wilc1000: use kernel define byte order macros
This patch removes define BIG_ENDIAN and use kernel define byte order macros
instead of swap itself. Remove unused BYTE_SWAP macro and __CHECK_ENDIAN__
in Makefile also.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee b719302da6 staging: wilc1000: rename index to tcp_pending_ack_idx
This patch renames "index" of struct txq_entry_t to tcp_pending_ack_idx
since this name could be confused index of txq_entry_t. It is index of
tcp pending ack.

It fixes 8e55639d06 ("staging: wilc1000: rename tcp_PendingAck_index
of struct txq_entry_t")

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee a5038d56f8 staging: wilc1000: remove wilc memory allocation config
This patch remove memory allocation options in Kconfig. It was used a long time
ago to aquire memory, which we will not use this config anymore.
Remove it's config, related define and codes as well. We will take
PREALLOCATE_AT_LOADING_DRIVER as it is default.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee c6e3a5b3ef staging: wilc1000: remove define COMPLEMENT_BOOT
This patch removes define COMPLEMENT_BOOT in Makefile. The feature was removed
by commit b46d68825c ('staging: wilc1000: remove COMPLEMENT_BOOT') but
the define was not removed. So remove completely.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Mario J. Rugiero 7cf8e59e54 staging: wilc1000: replace 'ptr > 0' check by 'ptr' check.
This silences a sparse warning about incompatible comparisons, while making the
intent of the check a bit clearer.

Signed-off-by: Mario J. Rugiero <mrugiero@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:49:10 -08:00
Masanari Iida 6b05fcc9c6 staging: wilc1000: Fix typo in wilc_msgqueue.h
This patch fix some spelling typo in wilc_msgqueue.h

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:48:26 -08:00