Commit graph

1705 commits

Author SHA1 Message Date
Chaehyun Lim 9b45891aef staging: wilc1000: remove unused memory functions
This patch remove unused memory functions because some macros with this
memory function are deleted.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:59:10 -07:00
Chaehyun Lim 96ac283d64 staging: wilc1000: wilc_memory.h: remove unused define
Remove unused define macro that is never used.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:59:09 -07:00
Joe Perches b3ff291009 staging: wilc1000: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes.

Miscellanea:

o Reflow alignments

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:51:56 -07:00
Shraddha Barke 642ac6c0dc Staging: wilc1000: Remove null check before kfree
kfree on NULL pointer is a no-op.

This patch uses the following semantic patch to find such an instance
where NULL check is present before kfree.

// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>smpl>

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:44:45 -07:00
Chaehyun Lim 071c19e73b staging: wilc1000: remove wilc_strutils.c and wilc_strutils.h
Remove wilc_strutils.c and wilc_strutils.h that are not needed.
wilc_strutils.o is also removed in Makefile.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:42:08 -07:00
Chaehyun Lim 9504f96492 staging: wilc1000: remove WILC_memcpy_INTERNAL
Remove WILC_memcpy_INTERNAL that is used in the WILC_memcpy
because WILC_memcpy is replaced by memcpy.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:42:08 -07:00
Chaehyun Lim f78d5f809e staging: wilc1000: remove WILC_memcpy function
Remove WILC_memcpy function that is changed to memcpy.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:42:08 -07:00
Chaehyun Lim d00d2ba333 staging: wilc1000: use memcpy instead of WILC_memcpy
Use memcpy instead of WILC_memcpy that is a custom function.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:42:08 -07:00
Chaehyun Lim 31126a478f staging: wilc1000: remove WILC_strncmp function
Remove WILC_strncmp function that is changed to strncmp.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:39:52 -07:00
Chaehyun Lim 3f882895c7 staging: wilc1000: use strncmp instead of WILC_strncmp
Use strncmp instead of WILC_strncmp.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:39:52 -07:00
Chaehyun Lim 24e326ea29 staging: wilc1000: remove WILC_strncpy function
Remove WILC_strncpy function that is changed to strncpy.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:39:52 -07:00
Chaehyun Lim 85b509f18a staging: wilc1000: Use strncpy instead of WILC_strncpy
Use strncpy instead of WILC_strncpy that is a custom function

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:39:52 -07:00
Chaehyun Lim 1799cb6188 staging: wilc1000: remove WILC_strlen function
Remove WILC_strlen function that is changed to strlen.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:39:52 -07:00
Chaehyun Lim ff96dfb5b1 staging: wilc1000: use strlen instead of WILC_strlen
Use strlen instead of WILC_strlen that is a custom function.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:39:52 -07:00
Chaehyun Lim 7d2b212f88 staging: wilc1000: remove commented code
Remove commented code that is not used.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:39:52 -07:00
Daniel Machon c915aadb5d Staging: wilc1000: wilc_platform.h: Fixed include guard spelling error
Fixed spelling error

Signed-off-by: Daniel Machon <dmachon.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-08 15:22:58 -07:00
Chandra S Gorentla 78174adaf5 staging: wilc1000: Remove braces for single statement 'if' and 'else'
Fixes the checkpatch.pl warning - braces {} are not necessary for any arm
of this statement

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-08 15:22:12 -07:00
Chandra S Gorentla 17aacd43c8 staging: wilc1000: Remove ' ' before quoted '\n'
Fixes the checkpatch.pl warning -
'unnecessary whitespace before a quoted newline'.

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-08 15:22:12 -07:00
Chandra S Gorentla 1bff1fe8c9 staging: wilc1000: Remove unused extern declarations
'extern' declarations which are not referenced within the file are
removed.

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-08 15:22:12 -07:00
Chandra S Gorentla a2b4041ab6 staging: wilc1000: Add space between the braces
Inserted space between nested braces.  This fixes the checkpatch.pl
error - space required after that close brace '}'.

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-08 15:22:11 -07:00
Chaehyun Lim f6356a9617 staging: wilc1000: remove WILC_memcmp function
Remove WILC_memcmp function because it is changed to memcmp.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:16:58 -07:00
Chaehyun Lim 1a646e7e9e staging: wilc1000: use memcmp instead of WILC_memcmp
Use memcmp instead of WILC_memcmp.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:16:58 -07:00
Chaehyun Lim 70b801cb53 staging: wilc1000: remove WILC_memset function
Remove WILC_memset function because it is changed to memset.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:16:58 -07:00
Chaehyun Lim 2cc468378a staging: wilc1000: use memset instead of WILC_memset
Use memset instead of WILC_memset.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:16:58 -07:00
Daniel Machon 7fc80964e8 wilc1000: wilc_wfi_cfgoperations.c: Fixed initialization of global boolean.
Globals are initialized to zero or NULL by GCC. No need to explicitly initialize them.

Signed-off-by: Daniel Machon <dmachon.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-05 17:28:14 -07:00
Chandra S Gorentla 6212990a87 drivers: staging: wilc1000: remove space after '('
The character ' ' is removed after the character '('.  This fixes the
checkpatch.pl error - "space prohibited after that open
parenthesis '('".

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-05 12:15:48 -07:00
Chandra S Gorentla a96c47e197 drivers: staging: wilc1000: use 'void' for no arguments functions
Added 'void' keyword in the paranthesis of function definitions, when
there are no arguments to the functions.  This fixes the checkpatch.pl
error - "Bad function definition 'function()' should probably be
function(void)".

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-05 12:15:38 -07:00
Daniel Machon 1913221c0e staging: wilc1000: wilc_cfgoperations.c: Fixed coding styles issues.
Fixed coding styles issues with braces.

Signed-off-by: Daniel Machon <dmachon.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-05 12:14:48 -07:00
Shraddha Barke eeb1c06295 Staging: wilc1000: Remove typedefs for struct
The Linux kernel coding style guidelines suggest not using typedefs for
structure and enum types. This patch gets rid of the typedefs for
Ack_session_info_t.

The following Coccinelle semantic patch detects the cases for struct type:

@tn@
identifier i;
type td;
@@

-typedef
 struct i { ... }
-td
 ;

@@
type tn.td;
identifier tn.i;
@@

-td
+ struct i

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-05 12:14:48 -07:00
Shraddha Barke 29edbe5e29 Staging : wilc1000: Remove braces for single statement blocks
This patch fixes the following checkpatch.pl warning:

WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 14:13:03 -07:00
Kim, Leo 3369463284 staging: wilc1000: remove unnecessary spcae
This patch removes the warnings reported by checkpatch.pl on
space prohibited between function name and open parenthesis '('

Signed-off-by: Kim, Leo <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:58:28 -07:00
Kim, Leo 4423f3b0d9 staging: wilc1000: remove warnings on the multiple blank lines uses
This patch removes the warnings reported by checkpatch.pl for using
multiple blank lines.

Signed-off-by: Kim, Leo <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:58:27 -07:00
Kim, Leo fc4b95d69c staging: wilc1000: remove braces {} for single statement blocks
This patch removes the warnings reported by checkpatch.pl on
braces {} not necessary for the single statement blocks.

Signed-off-by: Kim, Leo <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:58:27 -07:00
Tony Cho 202f66a816 staging: wilc1000: remove unnecessary inner braces
This patch removes unnecessary inner braces.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:57:24 -07:00
Tony Cho a0261e0b13 staging: wilc1000: remove warnings on unnecessary braces
This patch removes the warnings reported by checkpatch.pl on the braces
{} not necessary for any arm of this statement.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:57:20 -07:00
Jude.Lee 1e553d542b staging: wilc1000: alignment should match open parenthesis
This patch fixes the checks reported by checkpatch.pl
alignment should match open parenthesis

Signed-off-by: Jude.Lee <jude.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:57:14 -07:00
Jude.Lee 232ced3d8f staging: wilc1000: remove multiple blank lines
This patch removes the warnings reported by checkpatch.pl for using
multiple blank lines.

Signed-off-by: Jude.Lee <jude.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:56:04 -07:00
Tony Cho 51a5fcaf71 staging: wilc1000: remove a dead preprocessor conditionals
This patch removes the preprocessor conditionals which are related to
the WILC1000_SINGLE_TRANSFER definition becasue this is not used.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:55:11 -07:00
Tony Cho 229d7402bd staging: wilc1000: remove preprocessor conditionals unused
This patch removes unused preprocessor conditionals for the
PLAT_AML8726_M3_BACKUP and PLAT_AML8726_M3 which are not used and so
dead codes. They are also platform-dependent codes.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:51:42 -07:00
Tony Cho 4aa85772e3 staging: wilc1000: remove the warnings on unnecessary braces
This patch removes the warnings reported by checkpatch.pl on {} not
necessary for the single statement blocks.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:51:42 -07:00
Tony Cho 9c844693ea staging: wilc1000: remove the warnings on missing blank line
This patch removes the warnings reported by checkpatch.pl on missing a blank
line after declaration.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:51:42 -07:00
Tony Cho 0dff54785f staging: wilc1000: remove warnings on the multiple line uses
This patch removes the warnings reported by checkpatch.pl for using
multiple blank lines.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:51:41 -07:00
Tony Cho 9690df3f9d staging: wilc1000: remove dead codes related to SIMULATION
This patch removes preprocessor conditionals (#ifdef or #ifndef) related
to SIMULATION definition from the codes becasue that SIMULATION feature is not
used anymore.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:51:41 -07:00
Tony Cho 5f8966d91e staging: wilc1000: describe the config symbol fully
This patch removes the warnings reported by checkpatch.pl on the short
description for the config symbol in the Kconfig by adding more comments
to describe the config symbol in more detail.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:48:53 -07:00
Tony Cho 1625d2166c staging: wilc1000: remove unnecessary files
This patch removes the following files which are not used anymore.
	- fifo_buffer.c
	- fifo_buffer.h
	- coreconfigsimulator.h
	- wilc_wfi_netdevice.c

Signed-off-by: Robin Hwang <robin.hwang@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:45:57 -07:00
Daniel Machon 6fdb302c1d wilc1000: host_interface.c: global variables do not need to be explicitly initialized to 0 or NULL.
Fixed explicit initialization of global pointer variable.

GCC takes care of this implicitly.

Signed-off-by: Daniel Machon <dmachon.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:33:51 -07:00
Prasanna Karthik 137b993884 staging:wilc1000: code cleanup Fix reported by coccinelle
Removed {} for single statement if block

Signed-off-by: Prasanna Karthik <mkarthi3@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:33:33 -07:00
Luis de Bethencourt b3a02832e4 staging: wilc1000: switch printks to vsprintf IPv4 extension
Switch printks with IP addresses to use vsprintf extension %pI4.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:32:56 -07:00
Luis de Bethencourt 83cc9be5eb staging: wilc1000: fix typos in PRINT_ERR()
Fix typo "packe" to "packet".

Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:32:56 -07:00
Luis de Bethencourt 03b2d5e750 staging: wilc1000: remove whitespaces before quoted newlines
Fix all checkpatch.pl warnings:
WARNING: unnecessary whitespace before a quoted newline

Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:32:56 -07:00
Luis de Bethencourt 78c87591d4 staging: wilc1000: add blank lines after declarations
Fix all checkpatch.pl warnings:
WARNING: Missing a blank line after declarations

Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:32:56 -07:00
Luis de Bethencourt 2b9d5b4837 staging: wilc1000: remove unnecessary braces
Removing all checkpatch.pl warnings:
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:32:56 -07:00
Sunghoon Cho 70e59d9225 staging: wilc1000: remove the warnings on the line over 80 characters
This patch removes the warnings reported by checkpatch.pl on the line
over 80 characters.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:28:44 -07:00
Sunghoon Cho 36901b690d staging: wilc1000: add a blank line after struct declaration
This patch adds a blank line right after a struct declaration.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:28:44 -07:00
Sunghoon Cho 69176e1cbd staging: wilc1000: remove the warnings on the prohibited spaces
This patch removes the warnings reported by checkpatch.pl regarding
prohibited spaces between function name and open parenthesis.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:28:44 -07:00
Chaehyun Lim 9295e2d734 staging: wilc1000: wilc_wfi_netdevice.c: remove blank lines
Remove multiple blank lines.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:28:44 -07:00
Chaehyun Lim 70fb5aa8a5 staging: wilc1000: wilc_wfi_netdevice.c: remove unused variable
Remove variable that is defined but never used.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:28:44 -07:00
Chaehyun Lim 5927139ab5 staging: wilc1000: wilc_wfi_netdevice.c: remove unused codes
Remove if statement that has no any codes.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:28:44 -07:00
Chaehyun Lim 66f1a77ec1 staging: wilc1000: wilc_wfi_netdevice.c: remove commented codes
Remove commented codes.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:27:47 -07:00
Sunil Shahu bf903c1e07 staging: wilc1000: host_interface: add spaces around '='
Fix coding style error by placing spaces around '=' as suggested by
checkpatch.pl script.

Signed-off-by: Sunil Shahu <shshahu@gmail.com>
Reviewed-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:27:46 -07:00
Hari Prasath Gujulan Elango 2d33ff126b staging: wilc1000: use BIT macro
This patch addresses the checkpatch warning advising the usage of the
BIT macro for Bit shift operation.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:26:44 -07:00
Hari Prasath Gujulan Elango ba8f5e6642 staging: wilc1000: remove unused variable msg_len
This patch removes a ununsed variable msg_len and its associated code.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:26:44 -07:00
Hari Prasath Gujulan Elango 690910c0cf staging: wilc1000: remove ununsed variable & associated code
This patch removes the ununsed variable 'priv' at multiple instances and
all its associated code where its assigned a value.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:26:44 -07:00
Hari Prasath Gujulan Elango 810532227a staging: wilc1000: remove ununsed variable
This patch removes ununsed variable 'len'

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:25:39 -07:00
Hari Prasath Gujulan Elango 369f190a70 staging: wilc1000: remove redundant assignment of variable
This patch the removes the redundant assignement of the variable ret as
its being overwritren before being used anywhere.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:25:06 -07:00
Hari Prasath Gujulan Elango 773116ea0b staging: wilc1000: remove unused variable
This patch removes a unused variable timeout and the associated code.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:25:05 -07:00
Hari Prasath Gujulan Elango 53e1096fea staging: wilc1000: remove ununsed variable & corresponding lines
This patch removes a couple of ununsed variable.The lines in which these
variables are assigned are also removed as they are not necessary.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:25:05 -07:00
Hari Prasath Gujulan Elango 04f2a50d41 staging: wilc1000: remove ununsed if..else.. code blocks
This patch removes ununsed if..else... code blocks. Its actually some
dead code.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:25:05 -07:00
Hari Prasath Gujulan Elango ab6ebe3a4b staging: wilc1000: remove redundant initialization of variable
This patch removes the redundant initialization of the variable 'st' as
it is reassigned a new value before its being used anywhere else.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:25:05 -07:00
Hari Prasath Gujulan Elango 6608a38c66 staging: wilc1000: remove ununsed variable and associated line
This patch removes a unused variable 'u16RespLen' that is assigned a
value that is never used. The line that does the assignment is also
removed.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:25:05 -07:00
Chaehyun Lim decc286c7d staging: wilc1000: wilc_wfi_netdevice.c: move statement after declarations
Fix checkpatch warning found by checkpatch.pl
WARNING: Missing a blank line after declarations

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:23:37 -07:00
Chaehyun Lim df493fe8fa staging: wilc1000: wilc_wfi_netdevice.c: Insert blank line after declarations
Fix checkpatch warning found by checkpatch.pl
WARNING: Missing a blank line after declarations

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:23:37 -07:00
Chaehyun Lim 55229a56bb staging: wilc1000: wilc_wfi_netdevice.c: remove braces for single statement block
Fix checkpatch warning found by checkpatch.pl
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:23:36 -07:00
Chaehyun Lim e8b369ea2b staging: wilc1000: wilc_wfi_netdevice.c: remove prohibited space
Fix checkpatch warning found by checkpatch.pl
WARNING: space prohibited between function name and open parenthesis '('

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:23:36 -07:00
Chaehyun Lim a241a78952 staging: wilc1000: wilc_wfi_netdevice.c: remove prohibited space before semicolon
Fix checkpatch warning found by checkpatch.pl
WARNING: space prohibited before semicolon

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:23:35 -07:00
Vaishali Thakkar 8ca1b55a49 Staging: wilc1000: Replace memset with eth_zero_addr
Use eth_zero_addr to assign the zero address to the given address
array instead of memset when second argument is address of zero.

The Coccinelle semantic patch that makes this change is as follows:

// <smpl>
@eth_zero_addr@
expression e;
@@

-memset(e,0x00,ETH_ALEN);
+eth_zero_addr(e);
// </smpl>

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:23:35 -07:00
Sudip Mukherjee e26bb71da9 staging: wilc1000: fix build failure
commit 80279fb7ba ("cfg80211: properly send
NL80211_ATTR_DISCONNECTED_BY_AP in disconnect") has changed the api of
cfg80211_disconnected() and caused a build failure.
Add the extra argument as false since it appears from the code that the
disconnection is not locally generated.
And incase of doubt we can use false as that is the default behaviour.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:18:17 -07:00
Greg Kroah-Hartman 53a20e9e37 staging: wilc1000: disable driver due to build warnings
The wilc1000 has just too many build warnings to be able to enable it
for the 4.2 release.  Given that there have not been any patches
submitted to properly fix these obvious errors, I'm going to disable it
for now.  I will enable it back when the build warning fixes are
submitted, or, if that never happens, I will remove it from the tree.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-26 12:04:47 -07:00
Chaehyun Lim 60cb1e20c4 staging: wilc1000: fix checkpatch warning
Fix warning founded by checkpatch.pl.
WARNING: __func__ should be used instead of gcc specific __FUNCTION__

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 20:20:58 -07:00
Chaehyun Lim 9eac3a1589 staging: wilc1000: remove unnecessary typecast in #define macro
Remove unnecessary typecast in #define macro.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 20:20:57 -07:00
Chaehyun Lim e54d5b75c8 staging: wilc1000: align #define macro
Align #define macro.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 20:20:57 -07:00
Abdul Hussain 0256b5406e Staging: wilc1000: NULL check before some freeing functions is not needed
This patch removes check before freeing the memory
since kfree(NULL) is safe

Signed-off-by: Abdul Hussain <habdul@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 20:20:57 -07:00
Chaehyun Lim 61500fbd77 staging: wilc1000: remove commented code
Remove the commented codes using #if 0.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 20:20:57 -07:00
Sunghoon Cho 1d1c5b24f9 staging: wilc1000: add a blank line
This adds a blank line after struct declaration, WILC_WFI_mon_priv.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:17:06 -07:00
Sunghoon Cho 9f5e9a2bdf staging: wilc1000: remove unnecessary blank line.
This patch removes blank line which is not necesssary after an open
brace.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:17:06 -07:00
Sunghoon Cho 93f822bbe8 staging: wilc1000: remove the warnings on the multiple blank lines.
This patch removes the warnings reported by checkpatch.pl regarding on
the multiple blank line uses.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:17:06 -07:00
Abdul Hussain 25fe2274de Staging: wilc1000: Remove casting the values returned by kmalloc()
This patch removes casting the values returned by memory allocation functions.

Signed-off-by: Abdul Hussain <habdul@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:17:06 -07:00
Hari Prasath Gujulan Elango f0feeaff9c staging: wilc1000: remove unwanted code
This patch removes SIOCDEVPRIVATE + 1 ioctl.  It currently is just a
stub which does some useless printks and returns.  In the original code,
if the user passes priv_cmd.total_len == 0 then it will Oops.  Also it
leaks memory every time it's called.  In the future, we will implement
this functionality using generic API functions

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-16 19:23:25 -07:00
Abdul Hussain 5a66bf20b8 Staging: wilc1000: Boolean tests don't need comparisons
This patch removes unwanted true and false from boolean tests.

Signed-off-by: Abdul Hussain <habdul@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-16 19:23:25 -07:00
Abdul Hussain f717c0ebb3 Staging: wilc1000: Assign proper boolean value
This patch assign proper boolean value to boolean variable.

Signed-off-by: Abdul Hussain <habdul@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-16 19:23:25 -07:00
Chaehyun Lim 3f4d1c09ae staging: wilc1000: align defines
Align some defines in linux_wlan_common.h

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-16 19:23:25 -07:00
Dean Lee c3ea8a7200 staging: wilc1000: rework include wilc_oswrapper.h
rework line '#include "wilc_oswrapper.h"'
it does not used anywhere after change own data type to common data type.

Signed-off-by: Dean Lee <dean.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-16 19:18:15 -07:00
ChengYi He 30ef5c8b97 staging: wilc1000: remove unnecessary cast
kmalloc() returns void pointer.

Signed-off-by: ChengYi He <chengyihetaipei@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-15 21:52:00 -07:00
Sunghoon Cho 3f5309725e staging: wilc1000: remove the warnings on prohibited spaces.
Remove space prohibited between function name and open parenthesis.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-15 21:50:23 -07:00
Sunghoon Cho c4263e319e staging: wilc1000: remove multiple blank lines.
Remove the warnings for multiple blank lines reported by checkpatch.pl.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-15 21:50:22 -07:00
Chaehyun Lim 635c931d6d staging: wilc1000: align defines
Align the lines of some defines in wilc_errorsupport.h

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-15 21:50:22 -07:00
Dean Lee 576917ad24 staging: wilc1000: change WILC_Char to char
change own data type(WILC_Char) to common data type(char)

Signed-off-by: Dean Lee <dean.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-15 21:50:22 -07:00
Chaehyun Lim c5b72378a2 staging: wilc1000: remove itypes.h
Remove itypes.h that is not needed.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-13 14:45:51 -07:00
Chaehyun Lim 0be1eb7429 staging: wilc1000: remove BOOL_T typedef
Remove BOOL_T typedef.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-13 14:45:51 -07:00
Dean Lee 72ed4dc73d staging: wilc1000: change WILC_BOOL to bool
change own data type(WILC_BOOL) to common data type(bool)
but that's contain true/false value. so change with them.

Signed-off-by: Dean Lee <dean.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 22:37:18 -07:00
Chaehyun Lim ab6a167f19 staging: wilc1000: remove unused typedef
Remove unused typedef for custom data types.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 22:37:18 -07:00
Hari Prasath Gujulan Elango 4a01f1c3ab staging: wilc1000: use memdup_user
This patch replaces the kmalloc followed by copy_from_user by the
wrapper routine memdup_user.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:11:32 -07:00
Dean Lee 2235fb69ef staging: wilc1000: modify odd print message
This driver has odd message in print string.
So this patch removes the data type.

Signed-off-by: Dean Lee <dean.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:09:39 -07:00
Chris Park 1b612a127e staging: wilc1000: fix warning while printing
size_t should print using %zu, but here it was use %lu.
we were getting warning while printing.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:09:38 -07:00
Chaehyun Lim 8a69ebc277 staging: wilc1000: remove WILC_Sint64
remove unused WILC_Sint64.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:08:59 -07:00
Chaehyun Lim fb4ec9caa4 staging: wilc1000: remove WILC_Sint32
Use s32 instead of WILC_Sint32.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:08:59 -07:00
Chaehyun Lim 4320f6febc staging: wilc1000: remove WILC_Sint16
Use s16 instead of WILC_Sint16.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:08:59 -07:00
Chaehyun Lim ca356ada7c staging: wilc1000: remove WILC_Sint8
Use s8 instead of WILC_Sint8.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:08:59 -07:00
Chaehyun Lim 57b298f54e staging: wilc1000: remove WILC_Uint64
Use u64 instead of WILC_Uint64.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:08:59 -07:00
Chaehyun Lim 4e4467fdd6 staging: wilc1000: remove WILC_Uint32
Use u32 instead of WILC_Uint32.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:08:59 -07:00
Chaehyun Lim d85f5326e4 staging: wilc1000: remove WILC_Uint16
Use u16 instead of WILC_Uint16.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:07:59 -07:00
Chaehyun Lim 8a54d91719 staging: wilc1000: remove UWORD32
Use u32 instead of UWORD32.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:07:59 -07:00
Chaehyun Lim 3703480b02 staging: wilc1000: remove UWORD8
Use u8 instead of UWORD8.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:07:19 -07:00
Stanislav Kholmanskikh 13994d1e05 staging: wilc1000: coreconfigurator: Align enums and defines
Aligned enum members and defines to follow a common style
per enum/(group of defines).

Signed-off-by: Stanislav Kholmanskikh <kholmanskikh.s.s@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:46:32 -07:00
Stanislav Kholmanskikh cea3b20212 staging: wilc1000: coreconfigurator: Change return(X) to return X
Changed 'return(X)' to 'return X' in coreconfigurator.c
to satisfy checkpatch.pl warning:

ERROR: return is not a function, parentheses are not required

Signed-off-by: Stanislav Kholmanskikh <kholmanskikh.s.s@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:46:32 -07:00
Stanislav Kholmanskikh 1fad279db5 staging: wilc1000: coreconfigurator: Remove spaces before "\n"
In accordance to checkpatch.pl, a space before a quoted
newline ("\n") is unnecessary, therefore substituted " \n"
with "\n" in coreconfigurator.c

Signed-off-by: Stanislav Kholmanskikh <kholmanskikh.s.s@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:46:32 -07:00
Johnny Kim 842f1d71f6 staging: wilc1000: remove uninitialized warnings
This patch is for the initialization of the local variables.

Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:45:34 -07:00
Johnny Kim 8a14330f6d staging: wilc1000: modify printk format
This remove compile warnings about printk format.

Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:45:16 -07:00
Hari Prasath Gujulan Elango 96baf5a61b staging: wilc1000: fix build warning related to time_after_eq macro
This patch fixes a build warning related to the use of the time_after_eq
macro.Adding a typecast to the second argument suppresses the
warning.This warning was created by one my previous patch.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:43:38 -07:00
Madhusudhanan Ravindran 21175ef7e0 staging: wilc1000: remove unused variables
removed few variables which are assigned but
never used.

Signed-off-by: Madhusudhanan Ravindran <mravindr@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-09 10:43:11 -07:00
Dan Carpenter 9ee81443b9 staging: wilc1000: prevent some overflows in debugfs
Add some limits here so we don't corrupt memory.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:09:41 -07:00
Abhishek Sharma d35ebe8025 staging: wilc1000: Remove commented code lines
Removing the commented code lines.

Signed-off-by: Abhishek Sharma <asharm14@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:08:43 -07:00
Abhishek Sharma 542a6bc5cf staging: wilc1000: Remove commented variable declerations
Removing the commented static variable declerations.

Signed-off-by: Abhishek Sharma <asharm14@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:08:43 -07:00
Hari Prasath Gujulan Elango 0dcbea196b staging: wilc1000: remove commented code
Remove commented code from this file.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:08:42 -07:00
Hari Prasath Gujulan Elango aa02a9392e staging: wilc1000: remove ununsed function
The function WILC_WFI_InitPriv() is not used anywhere in the
driver.Hence remove it.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:08:42 -07:00
Hari Prasath Gujulan yyElango 1a093b5fcd staging: wilc1000: use time_after_eq
use the time_after_eq macro for the comparison operation

Signed-off-by: Hari Prasath Gujulan yyElango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:43:07 -07:00
Hari Prasath Gujulan Elango 4d77c6ccfb staging: wilc1000: remove dead code
Remove dead code or commented code

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:43:07 -07:00
Hari Prasath Gujulan Elango 37bc15d8dd staging: wilc1000: remove unnecessary typecast
Remove ununecessary typecast for kzalloc.This patch was generated by
coccinelle tool

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:43:06 -07:00
Chaitanya Dhere 0feae20091 staging: wilc1000: Modification in code to use ARRAY_SIZE macro
In this patch, ARRAY_SIZE() macro is used to determine the
size. This change was detected with the help of coccinelle
tool.

Signed-off-by: Chaitanya Dhere <cvijaydh@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:41:51 -07:00
Sudip Mukherjee 52db752077 staging: wilc1000: fix warning while printing
size_t should print using %zu and unsigned long int should use %lu
but here it was using %d and hence we were getting warning while
printing.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:41:51 -07:00
Greg Kroah-Hartman 63d03e4773 staging: wilc1000: remove WILC_Uint8
Just use u8, as that's what you really want in a kernel driver.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 14:17:47 +09:00
Greg Kroah-Hartman b1413b6084 staging: wilc100: remove WILC_NULL usage
Use the "real" NULL value, don't try to be cute and define your own
value for something that the compiler obviously supports.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 14:17:47 +09:00
Greg Kroah-Hartman 8e1d4e5cf2 staging: wilc1000: remove unused data types
There's some "custom" data types defined that are never used in the
driver, so remove them before we work on converting the rest to be
"standard" data types.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 14:17:47 +09:00
Arnd Bergmann 0b85618f3a staging: wilc1000: update TODO list
I have crossed off one item on the list, but found a few others that should
not get lost, so here is an update of the wilc1000 list

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:55:40 +09:00
Arnd Bergmann 7a8fd84175 staging: wilc1000: fix compiler warnings
This avoids the remaining warnings that one gets on a normal
build: unused variables, unused labels, and invalid printk
format strings.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:46:05 +09:00
Arnd Bergmann 057d1e9793 staging: wilc1000: fix const cast warnings
The wilc1000 driver produces a lot of warnings about invalid
casts between const and non-const variables. This reworks
the code to avoid all those warnings, by marking variables
and function arguments const.

A lot of the types use WILC_Uint8, I change them to const u8
for style reasons, as I'm touching them anyway.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:46:05 +09:00
Arnd Bergmann 83383ea33c staging: wilc1000: remove semaphore wrapper
The various semaphore functions all directly translate into
sema_init(), down() and up(), so we can just remove the API.

This is a mostly automated conversion using simple sed scripts,
plus some manual changes to account for down() returning no
error.

As a positive side-effect, down() no longer hangs after
receiving a signal, as the original code did by looping around
down_interruptible.

The semaphores still need to be turned into mutexes as a
follow-up step.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:46:05 +09:00
Arnd Bergmann e14af67d8f staging: wilc1000: remove EXPORT_SYMTAB
The EXPORT_SYMTAB symbol has not been used in Linux for a very
long time, the driver does not need to set it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:46:05 +09:00
Arnd Bergmann d074f29390 staging: wilc1000: remove unused OS abstraction features
All the remaining features from the OS abstraction layer
are not used at all in the driver, so we can just remove
the remaining references to them.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:46:05 +09:00
Arnd Bergmann 042f19c935 staging: wilc1000: clean up timer feature
The driver has a simple wrapper around timer_list, and an
optional but unused feature to make the timer periodic.

This removes support for the periodic timer and simplifies
the code around timers.

A follow-up should replace the remaining wrapper with
open-coded timers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:22 +09:00
Arnd Bergmann b96ff76a07 staging: wilc1000: clean up sleep wrapper
The driver has a simple wrapper around msleep, as well as
a more advanced sleep function that is unused. This removes
the unused code and the options to turn the feature on or
off.

A follow-up should rework the code to use msleep directly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:22 +09:00
Arnd Bergmann 5f928b9567 staging: wilc1000: simplify semaphore wrapper
The driver has its own API for semaphores. This should
be replaced with mutexes and completions, but for the moment
we can start by removing the obviously unused parts.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:22 +09:00
Arnd Bergmann 71b13e5990 staging: wilc1000: remove unused memory handling code
The driver contains its own abstraction for memory allocation,
most of it unused. This removes the unused parts, but the
rest should also be removed later.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:21 +09:00
Arnd Bergmann 2ed3dc1d3c staging: wilc1000: simplify msgqueue code
The driver contains an abstraction for message queues, with
optional unused features, while the driver requires the main
feature.

This makes the msgqueue code unconditional as it's required
but removes the unused parts.

A later cleanup should remove the entire msgqueue code
and replace it with some normal kernel API.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:21 +09:00
Arnd Bergmann 4ec5d4a4f6 staging: wilc1000: remove unused string functions
The driver provides wrappers for a lot of string operations.
Some of them are unused, while others should be replaced
with normal kernel functions.

This replaces the unused ones for now, and leaves the other
ones for a later cleanup.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:21 +09:00
Arnd Bergmann f155bcf8de staging: wilc1000: remove time wrapper
The abstraction for time in this driver is completely
unused, so remove it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:21 +09:00
Sasha Levin adf1b358a9 staging: wilc1000: off by one in wilc_wfi_cfg80211_mgmt_types
NL80211_IFTYPE_MAX represents the largest interface type number defined,
so declaring the array with that size will actually leave out the last
interface.

This causes invalid memory access whenever this array is used, which starts
happening at boot.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:00:15 +09:00
Arnd Bergmann 691f1a2f03 staging: wilc1000: remove __DRIVER_VERSION__ macro
The driver version is meaningless, and in particular does not
have to be passed from the Makefile. This removes the macros,
but leaves the behavior of printing the 10.2 version untouched
for the moment.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 08:56:57 +09:00
Arnd Bergmann 1999bd5251 staging: wilc1000: remove thread wrapper
The wilc_thread code is a very thin wrapper around kthread,
so just remove it and use kthread directly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 08:56:57 +09:00
Arnd Bergmann 544c69dc83 staging: wilc1000: remove platform version checks
For code that is integrated into mainline Linux, checks for
the OS platform make no sense, because we know that we
are on Linux.

This removes all checks and the associated dead code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 08:56:56 +09:00
Arnd Bergmann e5af056149 staging: wilc1000: remove linux version checks
For code that is integrated into mainline Linux, checks for
the kernel version make no sense, because we know which version
we are compiling against.

This removes all checks and the associated dead code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 08:56:56 +09:00
Arnd Bergmann 9535ebc5e9 staging/wilc1000: fix Kconfig dependencies
The newly added wilc1000 driver lacks several Kconfig dependencies,
resulting in a multitude of randconfig build errors, e.g.:

drivers/built-in.o: In function `WILC_WFI_mgmt_tx_cancel_wait':
binder.c:(.text+0x12bd28): undefined reference to `cfg80211_remain_on_channel_expired'
drivers/built-in.o: In function `WILC_WFI_CfgSetChannel':
binder.c:(.text+0x12c9d8): undefined reference to `ieee80211_frequency_to_channel'
drivers/built-in.o: In function `WILC_WFI_CfgAlloc':
binder.c:(.text+0x132530): undefined reference to `wiphy_new_nm'
drivers/built-in.o: In function `wilc_netdev_init':
binder.c:(.text+0x1356d0): undefined reference to `register_inetaddr_notifier'
drivers/built-in.o: In function `linux_spi_init':
binder.c:(.text+0x210a68): undefined reference to `spi_register_driver'

This change ensures that we always have at least one of SPI or MMC
enabled, and are only able to pick an interface that works. It also
adds all the missing dependencies for networking infrastructure
(cfg80211, wext, and ipv4).

In order to make it readable, I also took the liberty of re-indenting
the Kconfig file to the normal conventions.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-28 09:06:45 -07:00
Guenter Roeck e3cb742c32 staging: wilc1000: Disable for S390
The wilc1000 driver uses definitions such as DEBUG_LEVEL, DEBUG,
and PRINT_INFO. This causes compile errors on S390 which has similar
definitions in its core code. Disable the driver for S390 instead
of giving the non-standard messaging code credit by trying to fix it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-27 21:47:16 -07:00
Guenter Roeck f1a9983002 staging: wilc1000: Include linux/gpio.h instead of asm/gpio.h
Fix:

drivers/staging/wilc1000/linux_wlan.c:18:22: fatal error:
	asm/gpio.h: No such file or directory

Not every architecture has asm/gpio.h. Include linux/gpio.h instead.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-27 16:23:38 -07:00
Johnny Kim c5c77ba18e staging: wilc1000: Add SDIO/SPI 802.11 driver
This driver is for the wilc1000 which is a single chip IEEE 802.11
b/g/n device.
The driver works together with cfg80211, which is the kernel side of
configuration management for wireless devices because the wilc1000
chipset is fullmac where the MLME is managed in hardware.

The driver worked from kernel version 2.6.38 and being now ported
to several others since then.
A TODO file is included as well in this commit.

Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Rachel Kim <rachel.kim@atmel.com>
Signed-off-by: Dean Lee <dean.lee@atmel.com>
Signed-off-by: Chris Park <chris.park@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:36:53 -07:00