Commit graph

33 commits

Author SHA1 Message Date
Binoy Jayan c6bb38a5e8 staging: wilc1000: message_queue: Move code to host interface
Move the contents of wilc_msgqueue.c and wilc_msgqueue.h into
host_interface.c, remove 'wilc_msgqueue.c' and 'wilc_msgqueue.h'.
This is done so as to restructure the implementation of the kthread
'hostIFthread' using a work queue.

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-25 14:39:53 -07: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 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 523fc23f11 staging: wilc1000: remove unused files
This patch removes linux_wlan_spi.[ch] which are not used anymore.

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

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

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

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Arnd Bergmann 750ffe9bdc staging/wilc1000: split out bus specific modules
The SPI and SDIO specific code is now separate enough that
we just need to restructure the Makefile and Kconfig logic
a bit and export a couple of symbols from the common module
to have separate bus glue drivers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:19:20 -08:00
Arnd Bergmann e28e84d293 staging/wilc1000: remove WILC_SDIO/WILC_SPI macros
The last remaining user of WILC_SDIO macro checks for the correct
time to wait in an interrupt for the PLL to settle. We can
replace this with a runtime check and remove both WILC_SDIO and
WILC_SPI, as we no longer need conditional compilation based on
the hardware type.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:19:20 -08:00
Arnd Bergmann c4d139cb8d staging/wilc1000: get rid of WILC_SDIO_IRQ_GPIO
Whether the SDIO function uses an internal or external interrupt
should not be a compiletime decision but be determined at runtime.

This changes the code to pass a GPIO number from the init code
as early as possible, and leaves just one #ifdef WILC_SDIO_IRQ_GPIO
to preserve the previous behavior.

All other locations that check for the interrupt method are turned
into runtime checks based on the gpio number (>=0) or the interrupt
number (>0).

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:19:20 -08:00
Arnd Bergmann 1608c4034e staging/wilc1000: make symbols static if possible
All symbols that are only referenced in the file that defines
them can be declared 'static' to avoid namespace pollution,
to produce better object code, and to make the source more
readable.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:19:20 -08:00
Glen Lee cdb99231c4 staging: wilc1000: separate hif_sdio and hif_spi into different module
hif_sdio and hif_spi objects are compiled all the time even though one of SPI
or SDIO is selected. This patch separates hif_sdio and hif_spi into different
modules using ifdef define.
After rework SPI and SDIO modules with only one hif interface, the define
WILC_SDIO will be removed. This is first path of this series.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08: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
Tony Cho 6011b7796e staging: wilc1000: remove AGING_ALG
This patch removes AGING_ALG from the Makefile because it is always in
use.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:55:59 +02:00
Tony Cho 50f4152030 staging: wilc1000: remove PLL_WORKAROUND
This patch removes unnecessary definition, PLL_WORKAROUND from the
Makefile. There is no use throughout the driver.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:55:59 +02:00
Glen Lee 7477929566 staging: wilc1000: remove define CONNECT_DIRECT
The driver use CONNECT_DIRECT define as always. No need to provide as feature.
This patch removes ifdef/ifndef CONNECT_DIRECT line and it's related codes
inside ifndef CONNECT_DIRECT.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-30 05:04:33 +02:00
Glen Lee 438b293ebd staging: wilc1000: remove define WILC_PARSE_SCAN_IN_HOST
The define WILC_PARSE_SCAN_IN_HOST is always used in the driver, so just
delete ifdef WILC_PARSE_SCAN_IN_HOST line, ifndef WILC_PARSE_SCAN_IN_HOST
line and it's related codes. Finally, remove define in Makefile.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-30 05:04:33 +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
Glen Lee d36340917a staging: wilc1000: delete wilc_memory.c and wilc_memory.h
The macro WILC_MALLOC is not used in the driver anymore, so just
delete files.

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
Kim, Leo 721c985947 staging: wilc1000: delete definition USE_WIRELESS
The preprocessor definition, USE_WIRELESS is always in use.
So, this patch deletes the definitions from the makefile and source codes.

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-12 18:24:46 -07:00
Greg Kroah-Hartman 927ac9d54e staging: wilc1000: remove wilc_exported_buf.c
The config option, CONFIG_WILC1000_PREALLOCATE_DURING_SYSTEM_BOOT, was
never able to be set, so this file was never being built.  Also, as
WILC_PREALLOC_AT_BOOT was never being set in the build system, remove
all code framed by that symbol.

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:39 -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 80e29c7a80 staging: wilc1000: remove WILC_Sleep()
It was just a wrapper around usleep_range() so call that directly
instead and remove the now-empty file.

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:21 -07:00
Chaehyun Lim 071c19e73b staging: wilc1000: remove wilc_strutils.c and wilc_strutils.h
Remove wilc_strutils.c and wilc_strutils.h that are not needed.
wilc_strutils.o is also removed in Makefile.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:42:08 -07:00
Tony Cho 1625d2166c staging: wilc1000: remove unnecessary files
This patch removes the following files which are not used anymore.
	- fifo_buffer.c
	- fifo_buffer.h
	- coreconfigsimulator.h
	- wilc_wfi_netdevice.c

Signed-off-by: Robin Hwang <robin.hwang@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:45:57 -07:00
Arnd Bergmann 83383ea33c staging: wilc1000: remove semaphore wrapper
The various semaphore functions all directly translate into
sema_init(), down() and up(), so we can just remove the API.

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

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

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

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

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

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:21 +09:00
Arnd Bergmann 691f1a2f03 staging: wilc1000: remove __DRIVER_VERSION__ macro
The driver version is meaningless, and in particular does not
have to be passed from the Makefile. This removes the macros,
but leaves the behavior of printing the 10.2 version untouched
for the moment.

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

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

This removes all checks and the associated dead code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 08:56:56 +09:00
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