Skip to content

Commit c5c77ba

Browse files
JohnnyKim78gregkh
authored andcommitted
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>
1 parent 7d98c63 commit c5c77ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+33704
-0
lines changed

drivers/staging/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,6 @@ source "drivers/staging/fbtft/Kconfig"
110110

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

113+
source "drivers/staging/wilc1000/Kconfig"
114+
113115
endif # STAGING

drivers/staging/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ obj-$(CONFIG_UNISYSSPAR) += unisys/
4747
obj-$(CONFIG_COMMON_CLK_XLNX_CLKWZRD) += clocking-wizard/
4848
obj-$(CONFIG_FB_TFT) += fbtft/
4949
obj-$(CONFIG_FSL_MC_BUS) += fsl-mc/
50+
obj-$(CONFIG_WILC1000) += wilc1000/

drivers/staging/wilc1000/Kconfig

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
config WILC1000
2+
tristate "WILC1000 support (WiFi only)"
3+
---help---
4+
This module only support IEEE 802.11n WiFi.
5+
6+
choice
7+
prompt "Memory Allocation"
8+
depends on WILC1000
9+
default WILC1000_PREALLOCATE_AT_LOADING_DRIVER
10+
11+
config WILC1000_PREALLOCATE_AT_LOADING_DRIVER
12+
bool "Preallocate memory at loading driver"
13+
---help---
14+
This choice supports static allocation of the memory
15+
for the receive buffer. The driver will allocate the RX buffer
16+
during initial time. The driver will also free the buffer
17+
by calling network device stop.
18+
19+
config WILC1000_DYNAMICALLY_ALLOCATE_MEMROY
20+
bool "Dynamically allocate memory in real time"
21+
---help---
22+
This choice supports dynamic allocation of the memory
23+
for the receive buffer. The driver will allocate the RX buffer
24+
when it is required.
25+
endchoice
26+
27+
28+
choice
29+
prompt "Bus Type"
30+
depends on WILC1000
31+
default WILC1000_SDIO
32+
33+
config WILC1000_SDIO
34+
bool "SDIO support"
35+
depends on MMC
36+
---help---
37+
This module adds support for the SDIO interface of adapters using
38+
WILC chipset. Select this if your platform is using the SDIO bus.
39+
40+
config WILC1000_SPI
41+
bool "SPI support"
42+
---help---
43+
This module adds support for the SPI interface of adapters using
44+
WILC chipset. Select this if your platform is using the SPI bus.
45+
endchoice
46+
47+
48+
config WILC1000_HW_OOB_INTR
49+
bool "Use out of band interrupt"
50+
depends on WILC1000 && WILC1000_SDIO
51+
default n
52+
---help---
53+
If your platform don't recognize SDIO IRQ, connect chipset external IRQ pin
54+
and check this option. Or, Use this to get all interrupts including SDIO interrupts.
55+

drivers/staging/wilc1000/Makefile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
obj-$(CONFIG_WILC1000) += wilc1000.o
2+
obj-$(CONFIG_WILC1000_PREALLOCATE_DURING_SYSTEM_BOOT) += wilc_exported_buf.o
3+
4+
5+
ccflags-$(CONFIG_WILC1000_SDIO) += -DWILC_SDIO -DCOMPLEMENT_BOOT
6+
ccflags-$(CONFIG_WILC1000_HW_OOB_INTR) += -DWILC_SDIO_IRQ_GPIO
7+
ccflags-$(CONFIG_WILC1000_SPI) += -DWILC_SPI
8+
9+
ccflags-y += -DSTA_FIRMWARE=\"atmel/wilc1000_fw.bin\" \
10+
-DAP_FIRMWARE=\"atmel/wilc1000_ap_fw.bin\" \
11+
-DP2P_CONCURRENCY_FIRMWARE=\"atmel/wilc1000_p2p_fw.bin\"
12+
13+
ccflags-y += -I$(src)/ -DEXPORT_SYMTAB -D__CHECK_ENDIAN__ -DWILC_ASIC_A0 \
14+
-DPLL_WORKAROUND -DCONNECT_DIRECT -DAGING_ALG \
15+
-DWILC_PARSE_SCAN_IN_HOST -DDISABLE_PWRSAVE_AND_SCAN_DURING_IP \
16+
-DWILC_PLATFORM=WILC_LINUXKERNEL -Wno-unused-function -DUSE_WIRELESS \
17+
-DWILC_DEBUGFS
18+
#ccflags-y += -DTCP_ACK_FILTER
19+
20+
ccflags-$(CONFIG_WILC1000_PREALLOCATE_DURING_SYSTEM_BOOT) += -DMEMORY_STATIC \
21+
-DWILC_PREALLOC_AT_BOOT
22+
23+
ccflags-$(CONFIG_WILC1000_PREALLOCATE_AT_LOADING_DRIVER) += -DMEMORY_STATIC \
24+
-DWILC_PREALLOC_AT_INSMOD
25+
26+
ccflags-$(CONFIG_WILC1000_DYNAMICALLY_ALLOCATE_MEMROY) += -DWILC_NORMAL_ALLOC
27+
28+
29+
wilc1000-objs := wilc_wfi_netdevice.o wilc_wfi_cfgoperations.o linux_wlan.o linux_mon.o \
30+
wilc_memory.o wilc_msgqueue.o wilc_semaphore.o wilc_sleep.o wilc_strutils.o \
31+
wilc_thread.o wilc_time.o wilc_timer.o coreconfigurator.o host_interface.o \
32+
fifo_buffer.o wilc_sdio.o wilc_spi.o wilc_wlan_cfg.o wilc_debugfs.o
33+
34+
wilc1000-$(CONFIG_WILC1000_SDIO) += linux_wlan_sdio.o
35+
wilc1000-$(CONFIG_WILC1000_SPI) += linux_wlan_spi.o
36+
37+
WILC1000_SRC_VERSION = 10.0
38+
PATCHLEVEL = 2
39+
WILC1000_FW_VERSION = 0
40+
41+
ccflags-y += -D__DRIVER_VERSION__=\"$(WILC1000_SRC_VERSION).$(PATCHLEVEL)\"

drivers/staging/wilc1000/TODO

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
TODO:
2+
- remove the defined feature as kernel versions
3+
- remove OS wrapper functions
4+
- remove custom debug and tracing functions
5+
- rework comments and function headers(also coding style)
6+
- remove build warnings
7+
- support soft-ap and p2p mode
8+
- support resume/suspend function
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
/*!
3+
* @file coreconfigsimulator.h
4+
* @brief
5+
* @author
6+
* @sa coreconfigsimulator.c
7+
* @date 1 Mar 2012
8+
* @version 1.0
9+
*/
10+
11+
12+
#ifndef CORECONFIGSIMULATOR_H
13+
#define CORECONFIGSIMULATOR_H
14+
15+
16+
extern WILC_Sint32 CoreConfigSimulatorInit (void);
17+
extern WILC_Sint32 CoreConfigSimulatorDeInit (void);
18+
19+
20+
#endif

0 commit comments

Comments
 (0)