Commit Graph

341 Commits

Author SHA1 Message Date
Tony Cho 8259a53e1c staging: wilc1000: rename strInterfaceInfo in the sturct wilc
This patch renames strInterfaceInfo in the struct wilc to the vif. In
addition, unnecessary print statements around it are removed in this patch.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 18:14:35 -07:00
Tony Cho 080f11bb37 staging: wilc1000: change the type of wilc1000_initialized
This patch changes the type of wilc1000_initialized in the struc wilc from int
to bool and also renames it to the initialized. In addition, unnecessary
wilc1000_initialized codes are removed in this patch.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 18:14:35 -07:00
Luis de Bethencourt 7e4e87d328 staging: wilc1000: Remove boolean comparisons
Boolean tests do not need explicit comparison to true or false.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 22:01:59 -07:00
Amitoj Kaur Chawla baba7c743a staging: wilc1000: wilc_wfi_cfgoperations: Remove useless initialisation
Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 21:57:25 -07:00
Tony Cho f61c5aff3b staging: wilc1000: remove typedef from the linux_wlan_t
This patch removes typedef from the struct linux_wlan_t and renames it
to the wilc. In addition, all of linux_wlan_t is replaced with struct wilc
and memory allocation style is changed with preferred form as well like the
following:
	p = kmalloc(sizeof(*p), ...) where "struct wilc" is used

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 21:34:12 -07:00
Tony Cho 9b7ecb0188 staging: wilc1000: remove extern declarations of g_linux_wlan
This patch removes extern declaration of g_linux_wlan from the
followings because it is declared as extern in the wilc_wfi_netdevice.h
file.

- linux_mon.c
- linux_wlan_sdio.c
- wilc_wfi_cfgoperations.c

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 21:31:25 -07:00
Shivani Bhardwaj 6bd7e56686 Staging: wilc1000: wilc_wfi_cfgoperations: Remove unused code
Remove the declaration, initialization and statement having a
variable that is not used anywhere in the code.
Semantic patch used:

@@
type T;
identifier i;
constant C;
position p != e.p;
@@

- T i@p;
  <+... when != i
- i = C;
  ...+>

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13 10:07:06 -07:00
Alison Schofield 3604af50a2 staging: wilc1000: move open brace in line with control flow statement
Move open braces to be in line with "if" control flow statements.
Addresses checkpatch.pl:
	ERROR: that open brace { should be on the previous line

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 21:02:25 -07:00
Shraddha Barke cccfc39e5c Staging: wilc1000: wilc_wfi_cfgoperations: Remove NULL check before kfree
kfree on NULL pointer is a no-op.

The semantic patch used-

// <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-10-12 21:02:25 -07:00
Tony Cho 87c05b2863 staging: wilc1000: rename u32SetCfgFlag of struct cfg_param_val
This patch renames u32SetCfgFlag of struct cfg_param_val to flag to
avoid CamelCase naming convention.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:58:01 -07:00
Tony Cho 60bd1003e1 staging: wilc1000: remove wilc_wlan.c included in wilc_wfi_cfgoperations.c
This patch removes "wilc_wlan.c" from the wilc_wfi_cfgoperation.c file and
adds wilc_wlan.o into Makefile to compile it because there is few benefits.
This patch also adds "wilc_wfi_netdevice.h" in the wilc_wlan.c file to avoid
the compile errors.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:58:01 -07:00
Leo Kim ed3f0379a2 staging: wilc1000: remove typedef from tenuConnDisconnEvent
This patch removes typedef from the enum tenuConnDisconnEvent and
renames it to conn_event.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:58:01 -07:00
Leo Kim 1ec3815f38 staging: wilc1000: remove typedef from tenuScanEvent
This patch removes typedef from the enum tenuScanEvent and
rename it to scan_event.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:58:01 -07:00
Leo Kim 03e7b9c428 staging: wilc1000: remove typedef from tstrStatistics
This patch removes typedef from the struct tstrStatistics and
rename it to rf_info.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:58:01 -07:00
Leo Kim aaed3290f9 staging: wilc1000: wilc_wfi_cfgoperations.c : removes unused local variables
This patch removes useless local variable, s32Error and returns directly
zero from wilc_wfi_cfgoperations.c and also removes incorrect break in
switch-case statement. The break is not useless which is being called right
after return statement.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:58:01 -07:00
Leo Kim 441dc609da staging: wilc1000: remove typedef from tstrWILC_WFIDrv
This patch removes typedef from the struct tstrWILC_WFIDrv and
rename it to host_if_drv.
This patch includes the removal of the comment for tstrWILC_WFIDrv as well.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:58:01 -07:00
Shraddha Barke bcf0265384 Staging: wilc1000: wilc_wfi_cfgoperations: 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 patch used -

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

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

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:59:17 +01:00
Leo Kim e4bc3d677e staging: wilc1000: wilc_wfi_cfgoperations.c : remove unused functions
This patch removes unused functions from the wilc_wfi_cfgoperations.c.
 - WILC_WFI_dump_survey
 - WILC_WFI_auth
 - WILC_WFI_assoc
 - WILC_WFI_deauth
 - WILC_WFI_disassoc
 - WILC_WFI_set_bitrate_mask

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:56:03 +01:00
Leo Kim 9529650a55 staging: wilc1000: remove typedef from tstrCfgParamVal
This patch removes typedef from the struct tstrCfgParamVal.
And rename it to cfg_param_val.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:56:03 +01:00
Leo Kim cd1e6cb4c9 staging: wilc1000: remove typedef from tstrHostIFpmkid
This patch removes typedef from the struct tstrHostIFpmkid.
And rename it to host_if_pmkid.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:56:03 +01:00
Leo Kim a949f9095d staging: wilc1000: remove typedef from tstrHostIFpmkidAttr
This patch removes typedef from the struct tstrHostIFpmkidAttr.
And rename it to host_if_pmkid_attr.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:56:03 +01:00
Leo Kim 841dfc428d staging: wilc1000: remove typedef from AUTHTYPE_T
This patch removes typedef from the enum AUTHTYPE_T.
And, rename it to AUTHTYPE.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:56:03 +01:00
Leo Kim 607db44794 staging: wilc1000: remove typedef from tstrHiddenNetwork
This patch removes typedef from the struct tstrHiddenNetwork.
And, rename it to hidden_network.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:56:03 +01:00
Chaehyun Lim 866a2c247f staging: wilc1000: rename u8CurrChannel
This patch replaces u8CurrChannel with curr_channel to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:05:53 +02:00
Chaehyun Lim dd739ea517 staging: wilc1000: set_channel: rename s32Error
This patch replaces s32Error with result to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:05:53 +02:00
Chaehyun Lim 7584019e57 staging: wilc1000: set_channel: fix data type of s32Error
This patch changes data type of s32Error variable from s32 to int
because return type of this function is int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:05:53 +02:00
Chaehyun Lim 9a4598316e staging: wilc1000: set_channel: remove blank line after open brace
This patch removes blank line after open brace '{' found by
checkpatch.pl

CHECK: Blank lines aren't necessary after an open brace '{'
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:664:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:05:53 +02:00
Chaehyun Lim a74cc6b8d8 staging: wilc1000: use int instead of int8_t
This patch replaces int8_t with int.
The int8_t should be int. It's used as an index into an array
or -1 for not found.

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:05:53 +02:00
Chaehyun Lim 0981ce2bba staging: wilc1000: remove #if 1 and #endif
This patch removes #if 1 and #endif, which is encapsulated
some codes.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:04:52 +02:00
Glen Lee c9d4834d94 staging: wilc1000: remove function pointer wlan_add_mgmt_to_tx_que
This patch removes function pointer wlan_add_mgmt_to_tx_que and just call
the function wilc_wlan_txq_add_mgmt_pkt.
Remove structure wilc_wlan_oup_t also because no members in it. Since
wilc_wlan_oup_t is deleted, it's variable, function parameters and related
codes are also deleted.
- deleted variables
gpstrWlanOps
oup
- modified functions
wilc1000_prepare_11b_core
wilc_wlan_init

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:59:52 +02:00
Glen Lee 70f52debbe staging: wilc1000: remove define DISABLE_PWRSAVE_AND_SCAN_DURING_IP
The driver will use define DISABLE_PWRSAVE_AND_SCAN_DURING_IP always. So remove
the ifdef line and define in Makefile.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 02:33:45 +02:00
Chaehyun Lim 37316e8167 staging: wilc1000: make add_virtual_intf static
This patch makes add_virtual_intf static. This function is used only at
wilc_wfi_cfgoperation.c file.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 02:29:50 +02:00
Chaehyun Lim c156032daf staging: wilc1000: make mgmt_tx static
This patch makes mgmt_tx static. This function is used only at
wilc_wfi_cfgoperation.c file.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 02:29:50 +02:00
Chaehyun Lim 85c587a548 staging: wilc1000: make mgmt_tx_cancel_wait static
This patch makes mgmt_tx_cancel_wait static. This function is used only
at wilc_wfi_cfgoperation.c file.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 02:29:50 +02:00
Chaehyun Lim 956d721197 staging: wilc1000: make del_virtual_intf static
This patch makes del_virtual_intf static. This function is used only at
wilc_wfi_cfgoperation.c file.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 02:29:50 +02:00
Chaehyun Lim a8047e26c7 staging: wilc1000: rename WILC_WFI_set_cqm_rssi_config
This patch replaces WILC_WFI_set_cqm_rssi_config with
set_cqm_rssi_config to avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 02:29:50 +02:00
Chaehyun Lim cdc9cba5ff staging: wilc1000: remove useless comment
This patch removes useless comment.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 02:29:50 +02:00
Chaehyun Lim 4653067955 staging: wilc1000: rename WILC_WFI_set_power_mgmt
This patch replaces WILC_WFI_set_power_mgmt with set_power_mgmt.
then makes set_power_mgmt static.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 02:29:50 +02:00
Chaehyun Lim 8e0735c5e0 staging: wilc1000: rename WILC_WFI_frame_register
This patch replaces WILC_WFI_frame_register with
wilc_mgmt_frame_register to avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-20 23:52:43 -07:00
Tony Cho 6a89ba9cee staging: wilc1000: remove typedef from the struct tstrWILC_AddStaParam
This patch removes typedef from the struct tstrWILC_AddStaParam and
renames it to add_sta_param in oder to comply with the Linux coding
style.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-20 22:59:38 -07:00
Chaehyun Lim dd4b6a832e staging: wilc1000: rename WILC_WFI_InitHostInt
This patch replaces WILC_WFI_InitHostInt with wilc_init_host_int to
avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-20 19:05:09 -07:00
Chaehyun Lim a9a1682344 staging: wilc1000: rename WILC_WFI_DeInitHostInt
This patch replaces WILC_WFI_DeInitHostInt with wilc_deinit_host_int to
avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-20 19:05:09 -07:00
Chaehyun Lim 1a8ccd8585 staging: wilc1000: replace s32 with int
This patch changes date type of s32Error as int.
The return type of WILC_WFI_InitHostInt and WILC_WFI_DeInitHostInt is int
so that data type of this variable is changed by int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-20 19:05:09 -07:00
Chaehyun Lim f1fe9c435d staging: wilc1000: remove braces for single statement blocks
This patch removes braces for single if statement blocks 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-09-20 19:04:14 -07:00
Chaehyun Lim 244d31b572 staging: wilc1000: remove useless #if 1
This patch removes #if 1, which is encapsulated some codes.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-20 19:04:14 -07:00
Chaehyun Lim c3ca63728a staging: wilc1000: remove useless comment
This patch removes useless comment that is containing "BugXXXX"

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-20 19:02:11 -07:00
Chaehyun Lim 1058cc32d1 staging: wilc1000: remove blank line before a close brace '{'
This patch removes blank line 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>
2015-09-20 19:02:11 -07:00
Chaehyun Lim 855a771d59 staging: wilc1000: remove blank line after an open brace '{'
This patch removes blank line after an 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>
2015-09-20 19:02:10 -07:00
Chaehyun Lim 619837aea8 staging: wilc1000: fix NULL comparison style
This patch fixes NULL comparison style found by checkpatch.pl.

CHECK: Comparison to NULL could be written "!net"
CHECK: Comparison to NULL could be written "!net->ieee80211_ptr"
CHECK: Comparison to NULL could be written "!net->ieee80211_ptr->wiphy"

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-20 19:02:10 -07:00
Chaehyun Lim 8459fd54aa staging: wilc1000: rename WILC_WFI_WiphyRegister
This patch replaces WILC_WFI_WiphyRegister with wilc_create_wiphy to
avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-20 19:02:10 -07:00
Chaehyun Lim 96da20a9a3 staging: wilc1000: rename WILC_WFI_WiphyFree
This patch replaces WILC_WFI_WiphyFree with wilc_free_wiphy to avoid
CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-20 18:57:41 -07:00
Chaehyun Lim 5af6b85b9e staging: wilc1000: remove useless comment
This patch removes useless comment that is included "BugID_xxxx"

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-18 19:46:42 -07:00
Glen Lee 25a84832bb staging: wilc1000: remove define TCP_ENHANCEMENTS and it's related code
TCP_ENHANCEMENTS is always in use. Remove define TCP_ENHANCEMENTS, ifdef line,
ifndef line and codes inside ifndef.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-16 21:43:06 -07:00
Glen Lee fcc6ef9230 staging: wilc1000: remove define WILC_P2P and ifdef line
WILC_P2P is always used in the driver. So delete define WILC_P2P and ifdef line.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-16 21:43:06 -07:00
Glen Lee 108b3439b7 staging: wilc1000: remove define WILC_AP_EXTERNAL_MLME and ifdef line
This driver use WILC_AP_EXTERNAL_MLME define always. Delete define
WILC_AP_EXTERNAL_MLME and ifdef line.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-16 21:43:05 -07:00
Leo Kim e6e12661d8 staging: wilc1000: replace wilc error types with the generic error types
This patch replaces the error types defined by wilc driver with the
generic error types provided by the Linux kernel.
- WILC_SUCCESS			0
- WILC_FAIL				-EFAULT
- WILC_BUSY				-EBUSY
- WILC_INVALID_ARGUMENT		-EINVAL
- WILC_INVALID_STATE		-EINVAL
- WILC_BUFFER_OVERFLOW		-EOVERFLOW
- WILC_NULL_PTR			-EFAULT
- WILC_TIMEOUT			-ETIMEDOUT
- WILC_NOT_FOUND			-ENOENT
- WILC_NO_MEM			-ENOMEM

After then removes all wilc definitions.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-16 21:40:13 -07:00
Leo Kim 24db713fe5 staging: wilc1000: remove the macro WILC_ERRORREPORT
This patch removes the macro WILC_ERRORREPORT which is not used
anymore by replacing it with the plain statements.

The compiler complains the build warnings in some functions for WILC_CATCH and
ERRORHANDLER as unused definitions. So, this patch also removes WILC_CATCH and
ERRORHANDLER from some of functions.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-16 21:39:06 -07:00
Leo Kim 7dc1d0cc1f staging: wilc1000: remove the macro WILC_ERRORCHECK
This patch removes the macro WILC_ERRORCHECK which is not used
anymore by replacing it with the plain statements.

This patch also removes the WILC_CATCH macros from some of functions not
to make the build warnings.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-16 21:38:17 -07:00
Leo Kim 7ae433631e staging: wilc1000: remove a macro WILC_NULLCHECK
This patch replaces WILC_NULLCHECK with the plain statements and then removes
the macro WILC_NULLCHECK in wilc_errorsupport.h which is not used anymore.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-16 21:38:17 -07:00
Glen Lee c116299cff staging: wilc1000: remove unused variable g_flushing_in_progress
g_flushing_in_progress is never used so just delete it.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-16 21:34:45 -07:00
Chaehyun Lim 72d9af2a15 staging: wilc1000: remove if defined codes of FORCE_P2P_CLIENT
This patch removes if defined codes of FORCE_P2P_CLIENT.
This macro is deleted because it it commented out.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-15 06:52:49 -07:00
Chaehyun Lim 9cb8671553 staging: wilc1000: remove if defined codes of USE_SUPPLICANT_GO_INTENT
This patch removes if defined codes of USE_SUPPLICANT_GO_INTENT.
This macro is deleted because it is commented out.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-15 06:52:49 -07:00
Chaehyun Lim fbc2fe16af staging: wilc1000: use u32 instead of uint32_t
This patch replaces uint32_t with u32 that is a preferred kernel type.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-15 06:51:03 -07:00
Chaehyun Lim 51e825f70b staging: wilc1000: use u8 instead of uint8_t
This patch replaces uint8_t with u8 that is a preferred kernel type.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-15 06:51:02 -07:00
Chaehyun Lim 2726887c56 staging: wilc1000: rename WILC_WFI_priv
This patch replaces WILC_WFI_priv with wilc_priv to avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-15 06:50:38 -07:00
Chaehyun Lim 08241924d4 staging: wilc1000: rename WILC_WFI_cfg80211_ops
This patch replaces WILC_WFI_cfg80211_ops with wilc_cfg80211_ops to
avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-15 06:48:57 -07:00
Chaehyun Lim 12a26a33fe staging: wilc1000: rename WILC_WFI_mgmt_tx
This patch replaces WILC_WFI_mgmt_tx with mgmt_tx to avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:43 -07:00
Chaehyun Lim 4a2f9b38a5 staging: wilc1000: rename WILC_WFI_mgmt_tx_cancel_wait
This patch replaces WILC_WFI_mgmt_tx_cancel_wait with
mgmt_tx_cancel_wait to avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:43 -07:00
Chaehyun Lim 1dd5440b60 staging: wilc1000: rename WILC_WFI_cancel_remain_on_channel
This patch replaces WILC_WFI_cancel_remain_on_channel with
cancel_remain_on_channel to avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:43 -07:00
Chaehyun Lim 6d19d695e0 staging: wilc1000: rename WILC_WFI_remain_on_channel
This patch replaces WILC_WFI_remain_on_channel with remain_on_channel
to avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:43 -07:00
Chaehyun Lim b33c39b1f3 staging: wilc1000: rename WILC_WFI_flush_pmksa
This patch replaces WILC_WFI_flush_pmksa with flush_pmksa to avoid
CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:43 -07:00
Chaehyun Lim 1ff86d9605 staging: wilc1000: rename WILC_WFI_del_pmksa
This patch replaces WILC_WFI_del_pmksa with del_pmksa to avoid
CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:43 -07:00
Chaehyun Lim 4d46657a23 staging: wilc1000: rename WILC_WFI_set_pmksa
This patch replaces WILC_WFI_set_pmksa with set_pmksa to avoid
CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:43 -07:00
Chaehyun Lim a76b63ef57 staging: wilc1000: rename WILC_WFI_set_wiphy_params
This patch replaces WILC_WFI_set_wiphy_params with set_wiphy_params to
avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:43 -07:00
Chaehyun Lim a5f7db6aaa staging: wilc1000: rename WILC_WFI_change_bss
This patch replaces WILC_WFI_change_bss with change_bss to avoid
CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:42 -07:00
Chaehyun Lim bdb6338f6f staging: wilc1000: rename WILC_WFI_dump_station
This patch replaces WILC_WFI_dump_station with dump_station to avoid
CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:42 -07:00
Chaehyun Lim f06f562dd1 staging: wilc1000: rename WILC_WFI_get_station
This patch replaces WILC_WFI_get_station with get_station to avoid
CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:42 -07:00
Chaehyun Lim 14b420849b staging: wilc1000: rename WILC_WFI_change_station
This patch replaces WILC_WFI_change_station with change_station to avoid
CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:42 -07:00
Chaehyun Lim a0a8be95cc staging: wilc1000: rename WILC_WFI_del_station
This patch replaces WILC_WFI_del_station with del_station to avoid
CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:42 -07:00
Chaehyun Lim ed26955ca0 staging: wilc1000: rename WILC_WFI_add_station
This patch replaces WILC_WFI_add_station with add_station to avoid
CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:42 -07:00
Chaehyun Lim c8cddd7917 staging: wilc1000: rename WILC_WFI_stop_ap
This patch replaces WILC_WFI_stop_ap with stop_ap to avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:42 -07:00
Chaehyun Lim 2a4c84d7a0 staging: wilc1000: rename WILC_WFI_change_beacon
This patch replaces WILC_WFI_change_beacon with change_beacon to avoid
CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:42 -07:00
Chaehyun Lim a13168d75b staging: wilc1000: rename WILC_WFI_start_ap
This patch replaces WILC_WFI_start_ap with start_ap to avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:42 -07:00
Chaehyun Lim 3615e9a367 staging: wilc1000: rename WILC_WFI_change_virt_intf
This patch replaces WILC_WFI_change_virt_intf with change_virtual_intf
to avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:41 -07:00
Chaehyun Lim b4a7335584 staging: wilc1000: rename WILC_WFI_del_virt_intf
This patch replaces WILC_WFI_del_virt_intf with del_virtual_intf to
avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:41 -07:00
Chaehyun Lim 69deb4c2a1 staging: wilc1000: rename WILC_WFI_add_virt_intf
This patch replaces WILC_WFI_add_virt_intf with add_virtual_intf to
avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:41 -07:00
Chaehyun Lim 0f5b8ca323 staging: wilc1000: rename WILC_WFI_set_default_key
This patch replaces WILC_WFI_set_default_key with set_default_key to
avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:41 -07:00
Chaehyun Lim f4893dfc31 staging: wilc1000: rename WILC_WFI_get_key
This patch replaces WILC_WFI_get_key with get_key to avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:41 -07:00
Chaehyun Lim 3044ba7e6f staging: wilc1000: rename WILC_WFI_del_key
This patch replaces WILC_WFI_del_key with del_key to avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:41 -07:00
Chaehyun Lim 953d417a0d staging: wilc1000: rename WILC_WFI_add_key
This patch replaces WILC_WFI_add_key with add_key to avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:41 -07:00
Chaehyun Lim b027cde950 staging: wilc1000: rename WILC_WFI_disconnect
This patch replaces WILC_WFI_disconnect with disconnect to avoid
CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:41 -07:00
Chaehyun Lim 4ffbcdb6de staging: wilc1000: rename WILC_WFI_CfgConnect
This patch replaces WILC_WFI_CfgConnect with connect to avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:41 -07:00
Chaehyun Lim 0e30d06d9b staging: wilc1000: rename WILC_WFI_CfgScan
This patch replaces WILC_WFI_CfgScan with scan to avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:40 -07:00
Chaehyun Lim 80785a9a82 staging: wilc1000: rename WILC_WFI_CfgSetChannel
This patch replaces WILC_WFI_CfgSetChannel with set_channel to avoid
CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:40 -07:00
Glen Lee f3052587e3 staging: wilc1000: remove kmalloc wrapper
This patch calls kmalloc() directly. No need to wrap kmalloc().
All is not holding a spin lock or in interrupt context. So use GFP_KERNEL
flag for kmalloc.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:54 -07:00
Tony Cho f638dd3918 staging: wilc1000: fix potential memory leak
This patch adds kfree(mgmt_tx) when memory allocation of mgmt_tx->buff
fails in the second calls of kmalloc() to avoid the memory leak from mgmt_tx
first allocated before the second calls of kmalloc().

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Chris Park <chirs.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:45 -07:00
Tony Cho 1f39e10872 staging: wilc1000: remove dead codes
This patch removes the preprocessor definition from the codes, as shown in the
following, which is not used anymore.
- WILC_FULLY_HOSTING_AP

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:44 -07:00
Greg Kroah-Hartman 8990d856f5 staging: wilc1000: remove wrappers around semaphore usage
Just call up/down directly, no need for a wrapper function that hides
what is really happening.  Fix up some variable types to be the correct
structure pointers, not void *.

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-09-12 18:24:41 -07:00
Chaehyun Lim 8dfaafd639 staging: wilc1000: add a blank line after declaration
This patch adds a blank line after declaration 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-09-12 18:24:28 -07:00
Chaehyun Lim dc0ad74bc4 staging: wilc1000: remove unnecessary void pointer cast
This patch removes unnecessary void pointer cast of WILC_MALLOC.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-17 12:50:02 -07:00
Greg Kroah-Hartman 9eb066438b staging: wilc1000: remove WILC_TimerStart()
It was a wrapper around mod_timer() so replace it with the real timer
call and remove wilc_timer.c as it's now empty.

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-08-17 11:10:55 -07:00
Greg Kroah-Hartman 93dee8eea0 staging: wilc1000: remove WILC_TimerCreate()
It was just a wrapper around setup_timer() and could never fail, so just
call the real function, and fix up the function arguments of the
callbacks to be proper timer callback functions.

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-08-14 20:36:00 -07:00
Greg Kroah-Hartman 4183e9794c staging: wilc1000: remove WILC_TimerDestroy()
It was just a wrapper around del_timer_sync() so call that instead.

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-08-14 20:35:53 -07:00
Greg Kroah-Hartman 8972d0fe41 staging: wilc1000: remove WILC_TimerStop()
It was just a wrapper around del_timer() so call that instead.

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-08-14 20:35:45 -07:00
Greg Kroah-Hartman 334e1a5777 staging: wilc1000: remove tstrWILC_TimerAttrs typedef
It was not used for anything, so remove it, and the variables in
wilc_timer.c that were being passed of its type.

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-08-14 20:35:38 -07:00
Greg Kroah-Hartman da711eb68e staging: wilc1000: remove WILC_TimerHandle typedef
Use the proper structure (struct timer_list) instead, which makes things
much more readable.

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-08-14 20:35:29 -07:00
Johnny Kim 218dc407d4 staging: wilc1000: replace WILC_WFIDrvHandle by tstrWILC_WFIDrv
The structure, WILC_WFIDrvHandle is used to save the pointer address
for the driver handler which is used throughout the driver but it's
not easy to understand what it means. In addition, it doesn't support
the 64 bit machine and also causes the warnings for the 64 bit build.

This patch replaces the WILC_WFIDrvHandle by the tstrWILC_WFIDrv
because the tstrWILC_WFIDrv is real structure to represent the driver
handler and reduces the 64 bit compile warnings. Also, typecasting to
WILC_WFIDrvHandle is not needed by using tstrWILC_WFIDrv as is.

Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 19:00:49 -07:00
Chaehyun Lim 49188af272 staging: wilc1000: use kfree instead of WILC_FREE
Use kfree instead of WILC_FREE.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:59:47 -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 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
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 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 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
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
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
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
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
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
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
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 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 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
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
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
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
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 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
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