1
0
Fork 0
Commit Graph

104 Commits (redonkable)

Author SHA1 Message Date
Ajay Singh a76e712a5a staging: wilc1000: remove unused interrupt status handling code
Remove interrupt handling for unused interrupt status(PLL update and
Sleep). The firmware only initiates the interrupt for the data transfer
to host and rest are not used anymore.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Link: https://lore.kernel.org/r/20190910074514.3073-1-ajay.kathat@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-09-12 10:37:26 +01:00
Adham Abozaeid 0d1b57c1f0 staging: wilc1000: Don't reset WILC CPU disgracefully
Send abort request to WILC from wilc_wlan_stop instead of resetting the
CPU.
The abort request was being sent from wilc_wlan_cleanup after the CPU
was reset which wasn't the correct order. The abort request handler
in the chip will take care of resetting the CPU.

Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com>
Link: https://lore.kernel.org/r/20190809182510.22443-2-adham.abozaeid@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12 16:35:39 +02:00
Adham Abozaeid 25f12201a4 staging: wilc1000: remove manual sleep mode
manual sleep mode was used to put the wilc1000 chip in sleep while in
disconnected state. This is taken care of in the firmware

Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com>
Link: https://lore.kernel.org/r/20190725213125.2810-7-adham.abozaeid@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-30 09:56:46 +02:00
Nishka Dasgupta 4ad366015d staging: wilc1000: Replace function wilc_wlan_cfg_get_val()
Include wilc_wlan_cfg.h in wilc_netdev.c to enable it to call functions
in wilc_wlan_cfg.c.
Remove function wilc_wlan_cfg_get_val as all it does is call
wilc_wlan_cfg_get_wid_value in file wilc_wlan_cfg.c.
Rename function wilc_wlan_cfg_get_wid_value to wilc_wlan_cfg_get_val to
maintain compatibility with call sites (including in wilc_netdev.c).
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190712072009.2550-1-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-22 07:34:12 +02:00
Ajay Singh 93592a65ad staging: wilc1000: remove extra argument passing to wilc_send_config_pkt()
Cleanup patch to remove the passing of driver handler, get the 'idx'
value inside the called function.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:01:41 +02:00
Ajay Singh 9bc061e880 staging: wilc1000: added support to dynamically add/remove interfaces
Removed the use of two hardcoded interfaces and added support to
add/remove the network interfaces dynamically.
Now the driver will have single default interface with name 'wlan0' and
later other interface can be added from user space application e.g
using 'iw add' command.
Also taken care to maintain 'wilc_vif' as part of 'net_device'
private data and 'wilc' struct as 'wiphy' private data.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:01:41 +02:00
Ajay Singh 6b0b7d86e4 staging: wilc1000: move macro and function prototype from wilc_wlan_if.h file
Move data structure and function prototype from 'wilc_wlan_if.h file.
Now, this file contains constant specific to the firmware.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:34:45 +01:00
Ajay Singh f5436edeed staging: wilc1000: add 'wilc_' prefix to have proper namespace
Cleanup patch to rename data structure and function name to have 'wilc_'
prefix.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:34:45 +01:00
Ajay Singh b36b9735ae staging: wilc1000: rename timeout related macros
Rename timeout related macros to have their unit clear from their name.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-04 12:38:41 +01:00
Ajay Singh 65af887c3d staging: wilc1000: avoid the use of typedef for function pointers
Remove typedef for function pointers.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-18 10:39:16 +01:00
Ajay Singh 8ffcedd6f4 staging: wilc1000: use 'struct' to pack cfg header frame in wilc_wlan_cfg_commit()
Make use of 'struct' to pack cfg header in wilc_wlan_cfg_commit()
instead of byte by byte filling.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-18 10:39:15 +01:00
Ajay Singh acceb12a9f staging: wilc1000: refactor code to avoid static variables for config parameters
Refactor the code in wilc_wlan_cfg.c file to avoid the use of static
variables. Move the static variables as part of wilc struct and also
dynamically allocating memory for keeping those variables.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-25 20:53:57 +02:00
Ajay Singh f31e5584dc staging: wilc1000: use short names to fix over 80 issue in tcp_process()
Use short variable names to avoid line over 80 chars checkpatch warning
in tcp_process().

struct pending_acks_info     --> struct pending_ack
int tcp_pending_ack_idx      --> int ack_idx
u32 pending_ack              --> u32 pending_ack_idx

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-10 18:06:51 +02:00
Ajay Singh 95e05b4bf2 staging: wilc1000: move tcp_ack_filter algo related variables to 'wilc_vif' struct
Avoid use of static variables and move them as part of wilc_vif struct.
Move all the parameters related to tcp_ack_filter algo to wilc_vif
struct.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-10 17:17:39 +02:00
Ajay Singh 4cf1339953 staging: wilc1000: move 'wilc_enable_ps' global variable into 'wilc' struct
Instead of having 'wilc_enable_ps' as global variable moved it to 'wilc'
structure. Rename 'wilc_enable_ps' to 'enable_ps' as its already part of
'wilc' structure

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-10 17:17:37 +02:00
Ajay Singh 2345ef30ea staging: wilc1000: replace ISWILC1000() macro with inline function
Cleanup patch to avoid below checkpatch issue by replacing the macro
with inline function.

Macro argument 'id' may be better as '(id)' to avoid precedence issues.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05 16:15:32 +02:00
Ajay Singh e61c7a1caa staging: wilc1000: added Microchip copyright notice header
Cleanup the copyright notice header from the WILC1000 files.
Replace copyright header of 'Atmel' & 'NewportMedia' with 'Microchip & its
subsidiaries'. Also added the same copyright notice header for all
wilc1000 driver source and header files.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05 16:15:32 +02:00
Ajay Singh f131bbe556 staging: wilc1000: remove unnecessary comments and comments description
Cleanup patch to remove the unnecessary comments and commented code.
Also updated description for few of comments.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02 09:35:05 +02:00
Ajay Singh cf15e3dc8f staging: wilc1000: removed unused element from wilc_cfg_frame struct
Cleanup up patch to remove the unused structure elements in
'wilc_cfg_frame' struct.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:47 +02:00
Ajay Singh 6adc35d973 staging: wilc1000: use list_head to maintain 'rxq_entry_t elements in rx queue
Make use of 'list_head' data structure to maintain the rx buffer queue.
Modified wilc_wlan_rxq_add() to add the element at the tail by using
list_head API and wilc_wlan_rxq_remove() to remove the element from
head.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-17 09:05:13 +02:00
Ajay Singh 3d9241d652 staging: wilc1000: use list_head to maintain 'txq_entry_t' elements of tx queue
Use list_head data structure for the doubly linked list instead of own
implementation.
Only 'txq_head' is required, so removed the txq_tail pointer from
'wilc' structure.

Following functions are modified to provide data using list_head API's
wilc_wlan_txq_remove()
wilc_wlan_txq_remove_from_head()
wilc_wlan_txq_add_to_tail()
wilc_wlan_txq_add_to_head()
wilc_wlan_txq_get_first()
wilc_wlan_txq_get_next()

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-17 09:05:13 +02:00
Ajay Singh 2291cf92a4 staging: wilc1000: remove unsed typedef wilc_debug_func
Cleanup patch to remove the unused typedef and also removed the
unecessary comment about that typedef.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-26 09:43:04 +02:00
Luc Van Oostenryck ad8918077d staging/wilc1000: fix wilc_mac_xmit()'s return type
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, but the implementation in this
driver returns an 'int'.

Fix this by returning 'netdev_tx_t' in this driver too.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25 15:55:49 +02:00
Ajay Singh d2b1943aaa staging: wilc1000: added identifiers name in function definations
Fix identifier names required for functions definition issues reported
by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25 15:54:15 +02:00
Ajay Singh 34db1aac17 staging: wilc1000: rename WILC_WFI_p2p_rx & s32Freq to avoid camelCase
Fix 'Avoid camelCase' issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25 15:54:13 +02:00
Ajay Singh 8544b8098a staging: wilc1000: move multiple definition of same macro to common header
Move the same #define from multiple '.c' files to common header file.
Instead of having same macro in different '.c' files, now kept in
common '.h' file.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-01 17:22:28 +01:00
Greg Kroah-Hartman b24413180f License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.

By default all files without license information are under the default
license of the kernel, which is GPL version 2.

Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier.  The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.

This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.

How this work was done:

Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
 - file had no licensing information it it.
 - file was a */uapi/* one with no licensing information in it,
 - file was a */uapi/* one with existing licensing information,

Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.

The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne.  Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.

The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed.  Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.

Criteria used to select files for SPDX license identifier tagging was:
 - Files considered eligible had to be source code files.
 - Make and config files were included as candidates if they contained >5
   lines of source
 - File already had some variant of a license header in it (even if <5
   lines).

All documentation files were explicitly excluded.

The following heuristics were used to determine which SPDX license
identifiers to apply.

 - when both scanners couldn't find any license traces, file was
   considered to have no license information in it, and the top level
   COPYING file license applied.

   For non */uapi/* files that summary was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0                                              11139

   and resulted in the first patch in this series.

   If that file was a */uapi/* path one, it was "GPL-2.0 WITH
   Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0 WITH Linux-syscall-note                        930

   and resulted in the second patch in this series.

 - if a file had some form of licensing information in it, and was one
   of the */uapi/* ones, it was denoted with the Linux-syscall-note if
   any GPL family license was found in the file or had no licensing in
   it (per prior point).  Results summary:

   SPDX license identifier                            # files
   ---------------------------------------------------|------
   GPL-2.0 WITH Linux-syscall-note                       270
   GPL-2.0+ WITH Linux-syscall-note                      169
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
   LGPL-2.1+ WITH Linux-syscall-note                      15
   GPL-1.0+ WITH Linux-syscall-note                       14
   ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
   LGPL-2.0+ WITH Linux-syscall-note                       4
   LGPL-2.1 WITH Linux-syscall-note                        3
   ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
   ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1

   and that resulted in the third patch in this series.

 - when the two scanners agreed on the detected license(s), that became
   the concluded license(s).

 - when there was disagreement between the two scanners (one detected a
   license but the other didn't, or they both detected different
   licenses) a manual inspection of the file occurred.

 - In most cases a manual inspection of the information in the file
   resulted in a clear resolution of the license that should apply (and
   which scanner probably needed to revisit its heuristics).

 - When it was not immediately clear, the license identifier was
   confirmed with lawyers working with the Linux Foundation.

 - If there was any question as to the appropriate license identifier,
   the file was flagged for further research and to be revisited later
   in time.

In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.

Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights.  The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.

Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.

In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.

Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
 - a full scancode scan run, collecting the matched texts, detected
   license ids and scores
 - reviewing anything where there was a license detected (about 500+
   files) to ensure that the applied SPDX license was correct
 - reviewing anything where there was no detection but the patch license
   was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
   SPDX license was correct

This produced a worksheet with 20 files needing minor correction.  This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.

These .csv files were then reviewed by Greg.  Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected.  This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.)  Finally Greg ran the script using the .csv files to
generate the patches.

Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02 11:10:55 +01:00
Arushi Singhal 804b8ca681 staging: wilc1000: function prototype argument should have identifier name
function prototype argument should have an identifier name as reported
by checkpatch.pl.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-07 06:53:30 +01:00
Elise Lennion 68a30a6351 staging: wilc1000: Remove unnecessary extern variables.
Extern variables and functions used in only one file were removed
from .h files, and made static in the .c files they're used.

Extern variable wilc_initialized was declared and never used, so it was
removed.

Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-17 09:54:15 +02:00
Joshua Houghton eeeb5fb932 drivers: wilc1000: remove references to semaphores
* Update the comments that refer to semaphores
* Remove redundant includes to semphore.h

Signed-off-by: Joshua Houghton <josh@awful.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 17:27:16 +02:00
Chaehyun Lim c975f9dd10 staging: wilc1000: change data type of wid argument in wilc_wlan_cfg_get_val
This patch changes data type of wid argument in wilc_wlan_cfg_get_val
from u32 to u16. It is better to change data type of wid because wid has
one of enum WID_T that is data type of u16. And, there is no need to use
u16 type casting when calling wilc_wlan_cfg_get_wid_value function.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29 12:39:52 -07:00
Chaehyun Lim 7db699dbe5 staging: wilc1000: change data type of wid argument in wilc_wlan_cfg_get
This patch changes data type of wid argument in wilc_wlan_cfg_get from
u32 to u16. It is better to change data type of wid because wid has one
of enum WID_T that is data type of u16. And, there is no need to use u16
type casting when calling wilc_wlan_cfg_get_wid function.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29 12:39:52 -07:00
Chaehyun Lim 70011f5f2c staging: wilc1000: change data type of wid argument in wilc_wlan_cfg_set
This patch changes data type of wid argument in wilc_wlan_cfg_set from
u32 to u16. It is better to change data type of wid because wid has one of
enum WID_T that is data type of u16. And, there is no need to use u16
type casting when calling wilc_wlan_cfg_set_wid function.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29 12:39:52 -07:00
Chris Park 50fa2ee820 staging: wilc1000: move MODALIS and GPIO_NUM define to wilc_wlan.h file
This patch moves MODALIS and GPIO_NUM define to wilc_wlan.h file.
MODALIS and GPIO_NUM define are used to two files (wilc_sdio.c,
wilc_spi.c), these files already include wilc_wlan.h file in common.

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:48:19 -08:00
Chris Park c09632ea4a staging: wilc1000: moves LINUX_RX_SIZE, LINUX_TX_SIZE
This patch moves LINUX_RX_SIZE and LINUX_TX_SIZE to wilc_wlan.h file
because there are only used to 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-22 11:47:00 -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
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
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 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 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 491a2ed74d staging: wilc1000: remove unused functions
This patch removes unused function pointer hif_sync and hif_clear_int, and
removes it's related functions sdio_clear_int, sdio_sync, wilc_spi_clear_int
and wilc_spi_sync.

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

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

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

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

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Glen Lee d40c99c74c staging: wilc1000: wilc_wlan_cfg_get: pass struct wilc
This patch passes the struct wilc to the function and use it instead of
global variable wilc_dev.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:30:50 -08:00
Glen Lee 89758e13b8 staging: wilc1000: wilc_wlan_cfg_set: pass struct wilc
This patch pass struct wilc to the function and use it instead of global
variable wilc_dev.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:30:50 -08:00
Glen Lee 49dcd0dd0e staging: wilc1000: pass wilc to all function pointers of wilc_hif_func
This patch adds new function parameter struct wilc to all function pointers
of struct wilc_hif_func, and all functions of wilc_sdio.c and wilc_spi.c
need to be changed as it's function pointer is changed.
Pass wilc in all the functions call as well.

The wilc will be passed to functions in linux_wlan_sdio.c and linux_wlan_spi.c
to replace with global variable wilc_dev in the next patch.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:30:50 -08:00