Skip to content

Commit

Permalink
staging: wilc1000: Add SDIO/SPI 802.11 driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
JohnnyKim78 authored and gregkh committed May 24, 2015
1 parent 7d98c63 commit c5c77ba
Show file tree
Hide file tree
Showing 56 changed files with 33,704 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/staging/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,6 @@ source "drivers/staging/fbtft/Kconfig"

source "drivers/staging/fsl-mc/Kconfig"

source "drivers/staging/wilc1000/Kconfig"

endif # STAGING
1 change: 1 addition & 0 deletions drivers/staging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ obj-$(CONFIG_UNISYSSPAR) += unisys/
obj-$(CONFIG_COMMON_CLK_XLNX_CLKWZRD) += clocking-wizard/
obj-$(CONFIG_FB_TFT) += fbtft/
obj-$(CONFIG_FSL_MC_BUS) += fsl-mc/
obj-$(CONFIG_WILC1000) += wilc1000/
55 changes: 55 additions & 0 deletions drivers/staging/wilc1000/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
config WILC1000
tristate "WILC1000 support (WiFi only)"
---help---
This module only support IEEE 802.11n WiFi.

choice
prompt "Memory Allocation"
depends on WILC1000
default WILC1000_PREALLOCATE_AT_LOADING_DRIVER

config WILC1000_PREALLOCATE_AT_LOADING_DRIVER
bool "Preallocate memory at loading driver"
---help---
This choice supports static allocation of the memory
for the receive buffer. The driver will allocate the RX buffer
during initial time. The driver will also free the buffer
by calling network device stop.

config WILC1000_DYNAMICALLY_ALLOCATE_MEMROY
bool "Dynamically allocate memory in real time"
---help---
This choice supports dynamic allocation of the memory
for the receive buffer. The driver will allocate the RX buffer
when it is required.
endchoice


choice
prompt "Bus Type"
depends on WILC1000
default WILC1000_SDIO

config WILC1000_SDIO
bool "SDIO support"
depends on MMC
---help---
This module adds support for the SDIO interface of adapters using
WILC chipset. Select this if your platform is using the SDIO bus.

config WILC1000_SPI
bool "SPI support"
---help---
This module adds support for the SPI interface of adapters using
WILC chipset. Select this if your platform is using the SPI bus.
endchoice


config WILC1000_HW_OOB_INTR
bool "Use out of band interrupt"
depends on WILC1000 && WILC1000_SDIO
default n
---help---
If your platform don't recognize SDIO IRQ, connect chipset external IRQ pin
and check this option. Or, Use this to get all interrupts including SDIO interrupts.

41 changes: 41 additions & 0 deletions drivers/staging/wilc1000/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
obj-$(CONFIG_WILC1000) += wilc1000.o
obj-$(CONFIG_WILC1000_PREALLOCATE_DURING_SYSTEM_BOOT) += wilc_exported_buf.o


ccflags-$(CONFIG_WILC1000_SDIO) += -DWILC_SDIO -DCOMPLEMENT_BOOT
ccflags-$(CONFIG_WILC1000_HW_OOB_INTR) += -DWILC_SDIO_IRQ_GPIO
ccflags-$(CONFIG_WILC1000_SPI) += -DWILC_SPI

ccflags-y += -DSTA_FIRMWARE=\"atmel/wilc1000_fw.bin\" \
-DAP_FIRMWARE=\"atmel/wilc1000_ap_fw.bin\" \
-DP2P_CONCURRENCY_FIRMWARE=\"atmel/wilc1000_p2p_fw.bin\"

ccflags-y += -I$(src)/ -DEXPORT_SYMTAB -D__CHECK_ENDIAN__ -DWILC_ASIC_A0 \
-DPLL_WORKAROUND -DCONNECT_DIRECT -DAGING_ALG \
-DWILC_PARSE_SCAN_IN_HOST -DDISABLE_PWRSAVE_AND_SCAN_DURING_IP \
-DWILC_PLATFORM=WILC_LINUXKERNEL -Wno-unused-function -DUSE_WIRELESS \
-DWILC_DEBUGFS
#ccflags-y += -DTCP_ACK_FILTER

ccflags-$(CONFIG_WILC1000_PREALLOCATE_DURING_SYSTEM_BOOT) += -DMEMORY_STATIC \
-DWILC_PREALLOC_AT_BOOT

ccflags-$(CONFIG_WILC1000_PREALLOCATE_AT_LOADING_DRIVER) += -DMEMORY_STATIC \
-DWILC_PREALLOC_AT_INSMOD

ccflags-$(CONFIG_WILC1000_DYNAMICALLY_ALLOCATE_MEMROY) += -DWILC_NORMAL_ALLOC


wilc1000-objs := wilc_wfi_netdevice.o wilc_wfi_cfgoperations.o linux_wlan.o linux_mon.o \
wilc_memory.o wilc_msgqueue.o wilc_semaphore.o wilc_sleep.o wilc_strutils.o \
wilc_thread.o wilc_time.o wilc_timer.o coreconfigurator.o host_interface.o \
fifo_buffer.o wilc_sdio.o wilc_spi.o wilc_wlan_cfg.o wilc_debugfs.o

wilc1000-$(CONFIG_WILC1000_SDIO) += linux_wlan_sdio.o
wilc1000-$(CONFIG_WILC1000_SPI) += linux_wlan_spi.o

WILC1000_SRC_VERSION = 10.0
PATCHLEVEL = 2
WILC1000_FW_VERSION = 0

ccflags-y += -D__DRIVER_VERSION__=\"$(WILC1000_SRC_VERSION).$(PATCHLEVEL)\"
8 changes: 8 additions & 0 deletions drivers/staging/wilc1000/TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
TODO:
- remove the defined feature as kernel versions
- remove OS wrapper functions
- remove custom debug and tracing functions
- rework comments and function headers(also coding style)
- remove build warnings
- support soft-ap and p2p mode
- support resume/suspend function
20 changes: 20 additions & 0 deletions drivers/staging/wilc1000/coreconfigsimulator.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

/*!
* @file coreconfigsimulator.h
* @brief
* @author
* @sa coreconfigsimulator.c
* @date 1 Mar 2012
* @version 1.0
*/


#ifndef CORECONFIGSIMULATOR_H
#define CORECONFIGSIMULATOR_H


extern WILC_Sint32 CoreConfigSimulatorInit (void);
extern WILC_Sint32 CoreConfigSimulatorDeInit (void);


#endif
Loading

0 comments on commit c5c77ba

Please sign in to comment.