Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5c77ba1 authored by Johnny Kim's avatar Johnny Kim Committed by Greg Kroah-Hartman
Browse files

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: default avatarJohnny Kim <johnny.kim@atmel.com>
Signed-off-by: default avatarRachel Kim <rachel.kim@atmel.com>
Signed-off-by: default avatarDean Lee <dean.lee@atmel.com>
Signed-off-by: default avatarChris Park <chris.park@atmel.com>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7d98c63e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -110,4 +110,6 @@ source "drivers/staging/fbtft/Kconfig"

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

source "drivers/staging/wilc1000/Kconfig"

endif # STAGING
+1 −0
Original line number Diff line number Diff line
@@ -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 −0
Original line number Diff line number Diff line
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 −0
Original line number Diff line number Diff line
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 −0
Original line number Diff line number Diff line
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
Loading