1
0
Fork 0
Commit Graph

1705 Commits (5766e9d25f41d79a0bb99e44a4408d00236dc3c7)

Author SHA1 Message Date
Chris Park ccff7f8176 staging: wilc1000: linux_mon.c: removes unnecessary log message
This patch removes unnecessary log message and relate variables.

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-22 11:47:00 -08:00
Chris Park 8fb90a5e8e staging: wilc1000: host_interface.c: removes unnecessary log message
This patch removes unnecessary log message and relate variables.

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-22 11:47:00 -08:00
Leo Kim 396fa30e4b staging: wilc1000: removes potential null dereference
This patch removes the error reported by smatch.
 - wilc_wfi_cfgoperations.c:674 scan() error:
   potential null dereference 'strHiddenNetwork.net_info'.  (kmalloc returns null)

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:47:00 -08:00
Leo Kim 2eaf35c141 staging: wilc1000: linux_mon.c: add to check routine
This patch adds the return value which needs the check and
prints the error message when it fails.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:47:00 -08:00
Leo Kim d892c97c88 staging: wilc1000: linux_mon.c: replaces PRINT_ER with netdev_err
This patches replaces PRINT_ER with netdev_err.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:47:00 -08:00
Leo Kim 60959e53f8 staging: wilc1000: linux_mon.c: removes debug logs
This patches removes unnecessary debug logs.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:47:00 -08:00
Leo Kim 8a84397ef3 staging: wilc1000: wilc_wlan.c: removes PRINT_ER
This patches removes PRINT_ER that is unnecessary debug logs.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:47:00 -08:00
Bhumika Goyal 6a707a9eb9 Staging: wilc1000: Remove and rename struct typedefs from .c files
Using typedef for a structure type is not suggested in Linux kernel coding
style guidelines. So remove typedefs from structures wilc_sdio_t,
wilc_spi_t and wilc_mac_cfg_t.
Also remove '_t' suffix from the struct names by hand.

The following semantic patch detects cases:

@tn1@
type td;
@@

typedef struct { ... } td;

@script:python tf@
td << tn1.td;
tdres;
@@
coccinelle.tdres = td;

@@ type tn1.td;
identifier tf.tdres;
@@
-typedef
 struct
+ tdres
  { ... }
-td
  ;
@@ type tn1.td;
identifier tf.tdres;
@@
-td
+ struct tdres

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 14:43:48 -08:00
Bhumika Goyal 5bc32160c5 Staging: wilc1000: Remove unused function WILC_WFI_update_stats
This patch removes the function WILC_WFI_update_stats as it is not used
anywhere in the kernel. Also remove its declaration from the header
file. Grepped to find the occurences.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 14:43:48 -08:00
Bhumika Goyal 837f9989c6 Staging: wilc1000: Remove and rename struct typedefs
This patch gets rid of struct typedefs wilc_cfg_byte_t, wilc_cfg_hword_t,
wilc_cfg_word_t and wilc_cfg_str_t as as linux kernel coding style
guidelines suggest not using typdefs for structure types.
Also drop '_t' from the names.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 17:09:44 -08:00
Amitoj Kaur Chawla fe747f0f34 staging: wilc1000: Return correct error codes
This change has been made with the goal that kernel functions should
return something more descriptive than -1 on failure.

The return value on an alloc_etherdev failure should be -ENOMEM,
and not -1.

This was found using Coccinelle. A simplified version of the semantic
patch used is:

//<smpl>
@@
expression *e;
identifier l1;
@@

e = alloc_etherdev(...);
if (e == NULL) {
...
return
- -1
+ -ENOMEM
;
}
//</smpl

Furthermore, introduced `ret` variable to store and return the
corresponding error code returned by register_netdev on failure.

The two call sites store the return value in a variable which only
checks that the value is non-zero, hence no change is required at
the call sites.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 17:00:07 -08:00
Janani Ravichandran 8459af6acf staging: wilc1000: Rearrange statement to respect 80 char limit
Split statement across multiple lines as the line modified is over 80
chars in length.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 17:00:07 -08:00
Janani Ravichandran 3e758b2788 staging: wilc1000: Use kmalloc_array instead of kmalloc
Use kmalloc_array instead of kmalloc for arrays to prevent integer
overflows.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 17:00:07 -08:00
Janani Ravichandran aae9620151 staging: wilc1000: Modify tcp_process to return void rather than int
tcp_process() returns int, which is not used anywhere. So, change
function header to return void intead of int and remove all uses of
the local variable ret, which is used as a return variable in the
function.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 16:58:06 -08:00
Amitoj Kaur Chawla 792f4b1c4e staging: wilc1000: Remove unused function
Remove wilc_wlan_global_reset function since it is not used anywhere
in this driver.

This also silences the following sparse warning:
drivers/staging/wilc1000/wilc_wlan.c:1120:6: warning: symbol
'wilc_wlan_global_reset' was not declared. Should it be static?

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 16:58:06 -08:00
Roger H. Newell e0a30008be staging: wilc1000: Removed braces from single block statements
This patch corrects warnings generated by checkpatch.pl by
removing braces from single block statements.

Signed-off-by: Roger H. Newell <newell.roger@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 16:56:26 -08:00
Roger H. Newell 5142a14eba staging: wilc1000: Whitespaces removed from function call
This patch corrects errors generated by checkpatch.pl by
removing whitespace between parameters passed to dev_err()

Signed-off-by: Roger H. Newell <newell.roger@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 16:56:26 -08:00
Chaehyun Lim 9eab9a8f93 staging: wilc1000: handle_set_mac_address: use netdev_err
This patch uses netdev_err instead of PRINT_ER that is a custom debug
print.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 16:55:33 -08:00
Chaehyun Lim 47b89ad645 staging: wilc1000: handle_set_mac_address: rename result
This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. It will be changed until all handle_*() function
has same variable name as ret.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 16:55:33 -08:00
Chaehyun Lim 9470edcded staging: wilc1000: handle_set_mac_address: change data type of result
result variable gets value from wilc_send_config_pkt that has return
value of int. This patch changes data type of result variable to int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 16:55:33 -08:00
Chaehyun Lim 157edcca33 staging: wilc1000: handle_set_mac_address: change return type to void
When handle_set_mac_address is called in hostIFthread that is a kernel
thread, it is not checked return type of this function. This patch
changes return type to void and removes a brace of if statement due to
have a single statement.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 16:55:33 -08:00
Chaehyun Lim 31cc9885e7 staging: wilc1000: handle_set_mac_address: use kmemdup
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-19 16:55:33 -08:00
Chaehyun Lim 2b489e0e26 staging: wilc1000: handle_set_mac_address: fix kmalloc return error code
This patch fix return error code of kmalloc as -ENOMEM instead of
-EFAULT.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 16:55:33 -08:00
Chaehyun Lim b713ce0e49 staging: wilc1000: handle_set_mac_address: 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 brace of if statement is remove as well due to have a single
statement.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 16:55:33 -08:00
Alison Schofield 23411f37ca staging: wilc1000: host_interface: remove unused semaphores
Remove unused semaphore declarations, initializations, and unlocks.

The functions that locked these semaphores were previously removed,
so this cleans up the remains.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 16:53:56 -08:00
Eva Rachel Retuya 6c2ab2398b staging: wilc1000: remove spaces around '->'
Delete the space around '->' as it is prohibited and breaks the code.
Checkpatch found this issue.

ERROR: spaces prohibited around that '->'

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 16:53:56 -08:00
Eva Rachel Retuya c22177dbab staging: wilc1000: remove trailing whitespace
Remove unnecessary whitespaces as pointed out by checkpatch:

ERROR: trailing whitespace

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 16:53:56 -08:00
Eva Rachel Retuya 8a7b2b1815 staging: wilc1000: declare 'fops' as const
Change the declaration of the file_operations structure 'fops' into
const as suggested by checkpatch.

WARNING: struct file_operations should normally be const

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-15 18:24:07 -08:00
Eva Rachel Retuya d38f5ba482 staging: wilc1000: Remove initialization of static variables
Address the following checkpatch errors:
* ERROR: do not initialise statics to false
* ERROR: do not initialise statics to 0x00

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-15 18:24:07 -08:00
Janani Ravichandran c611d48e65 staging: wilc1000: linux_mon.c: Remove unneeded braces
Remove braces around single statement blocks in if conditions as they
are not required.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:31:50 -08:00
Janani Ravichandran 24c6c29d85 staging: wilc1000: Simplify code by eliminating else block
Remove else block here as it is not useful after the return statement in the corresponding if block. This simplifies code. This issue was identified by checkpatch.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:31:44 -08:00
Janani Ravichandran 04b2172a6a staging: wilc1000: Remove useless return statement in a void function
Remove the return statement at the end of the void function as it has
no purpose.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:31:44 -08:00
Janani Ravichandran 6f5b8d2ace staging: wilc1000: Remove useless macros
Remove the macros FN_IN and FN_OUT as they haven't been used anywhere.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:31:44 -08:00
Janani Ravichandran 17a0c29935 staging: wilc1000: Eliminate spaces between function names and open parentheses
Remove spaces between function names and open parentheses as they are
unnecessary.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:31:44 -08:00
Janani Ravichandran 01fe818cc3 staging: wilc1000: Eliminate extraneous braces
Get rid of extraneous braces enclosing single statement blocks.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:31:44 -08:00
Janani Ravichandran f7b7f87de7 staging: wilc1000: Include KERN_ facility level for printk()
This patch includes KERN_ facility level for printk(). KERN_INFO is
justified here as the messages here are informational.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:31:44 -08:00
Alison Schofield 4375cad941 staging: wilc1000: wilc_wfi_cfgoperations: remove cast on void pointers
Remove cast on void pointers. C programming language guarantees
the conversion from void pointer to any other pointer type.

Coccinelle patch:
@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:31:44 -08:00
Alison Schofield d5c89442d4 staging: wilc1000: linux_wlan: remove cast on void pointers
Remove casts on void pointers. C programming language guarantees
the conversion from void pointer to any other pointer type.

Coccinelle patch:
@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:31:44 -08:00
Alison Schofield 6bcc1e1e70 staging: wilc1000: linux_mon: remove cast on void pointer
Remove cast on void pointer. C programming language guarantees
the conversion from void pointer to any other pointer type.

Coccinelle patch:
@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:31:44 -08:00
Alison Schofield 59b97b365e staging: wilc1000: host_interface: remove cast on void pointers
Remove cast on void pointers. C programming language guarantees
the conversion from void pointer to any other pointer type.

Coccinelle patch:
@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:31:44 -08:00
Chaehyun Lim ecdd5c745e staging: wilc1000: use netdev_err instead of PRINT_ER
This patch uses netdev_err instead of PRINT_ER that is a custom debug
print.

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
Chaehyun Lim 5349f6daa3 staging: wilc1000: rename result in handle_set_channel
This patch renames result to ret that is used to get return value from
wilc_send_config_pkt.
Some handle_*() function are used as result, others are used as ret.
It will start to rename as ret in all handle_*() function to sync up
with this variable name.

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
Chaehyun Lim 987ab5eb5f staging: wilc1000: change data type of result variable to int.
result variable gets value from wilc_send_config_pkt that has
return value of int. This patch changes data type of result variable to
int.

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
Chaehyun Lim c43f5f9dc4 staging: wilc1000: change handle_set_channel's return type to void
When handle_set_channel is called in hostIFthread that is a kernel
thread, it is not checked return type of this function. This patch
changes return type to void and removes braces if statement due
to have a single statement.

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
Chaehyun Lim b41dfdb18e staging: wilc1000: define a new local variable in wilc_scan
struct scan_info is defined as a new local variable in wilc_scan
function. It makes some assignment short as well as improve more
readability.

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
Chaehyun Lim a0942c5799 staging: wilc1000: rename u8security in user_conn_req
This patch renames u8security to security to remove u8 prefix in struct
user_conn_req. 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
Chaehyun Lim 72216411b0 staging: wilc1000: rename pu8ssid in struct user_conn_req
This patch renames pu8ssid to ssid to remove pu8 prefix in struct
user_conn_req. 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
Chaehyun Lim 788f6fc081 staging: wilc1000: rename pu8bssid in struct user_conn_req
This patch renames pu8bssid to bssid to remove pu8 prefix in struct
user_conn_req. 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
Chaehyun Lim 5cfbbf1401 staging: wilc1000: rename s8rssi in struct found_net_info
This patch renames s8rssi to rssi to remove s8 prefix in struct
found_net_info. 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
Chaehyun Lim 69dc533ecc staging: wilc1000: rename au8bssid in struct found_net_info
This patch renames au8bssid to bssid to remove au8 prefix. 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
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