Skip to content

Commit

Permalink
staging: add ath6kl driver for AR6003 chip
Browse files Browse the repository at this point in the history
AR6003 is a single stream, SDIO based 802.11 chipset from
Atheros optimized for mobile and embedded devices. ath6kl is a
cfg80211 driver for AR6003 and supports both the station and
AP mode of operation.

Station mode supports 802.11 a/b/g/n with HT20 on 2.4/5GHz and
HT40 only on 5GHz. Some of the other features include WPA/WPA2,
WPS, WMM, WMM-PS, and BT coexistence. AP mode can be operated
only in b/g mode with support for a subset of features mentioned
above.

The driver supports cfg80211 but comes with its own set of
wext ioctls which have historically supported some of our
customers with features like BT 3.0 and AP mode of operation.

For further details, please refer to:

http://wireless.kernel.org/en/users/Drivers/ath6kl

The driver requires firmware that runs on the chip's network
processor. The majority of it is stored in ROM. The binaries
that are downloaded and executed from RAM are as follows:

1) Patch against the code in ROM for bug fixes and feature
   enhancements.
2) Code to copy the data from the OTP region of the memory
   into RAM.
3) Calibration file carrying board specific data.

The above files need to be present in the directory
'/lib/firmware/ath6k/AR6003/hw2.0/' for the driver to initialize
the chip upon enumeration. The files can be downloaded from the
link specified at the following location:

http://wireless.kernel.org/en/users/Drivers/ath6kl#Download

This driver is only provided in the interim while we work on
the mac80211 replacement, ath6k. Once the mac80211 driver
achieves feature parity with the ath6kl driver, the ath6kl will
be deprecated and removed from staging.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Vipin Mehta authored and Greg Kroah-Hartman committed Sep 2, 2010
1 parent 9b9913d commit 30295c8
Show file tree
Hide file tree
Showing 162 changed files with 92,419 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 @@ -157,5 +157,7 @@ source "drivers/staging/westbridge/Kconfig"

source "drivers/staging/sbe-2t3e3/Kconfig"

source "drivers/staging/ath6kl/Kconfig"

endif # !STAGING_EXCLUDE_BUILD
endif # STAGING
1 change: 1 addition & 0 deletions drivers/staging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ obj-$(CONFIG_TIDSPBRIDGE) += tidspbridge/
obj-$(CONFIG_ACPI_QUICKSTART) += quickstart/
obj-$(CONFIG_WESTBRIDGE_ASTORIA) += westbridge/astoria/
obj-$(CONFIG_SBE_2T3E3) += sbe-2t3e3/
obj-$(CONFIG_ATH6K_LEGACY) += ath6kl/
163 changes: 163 additions & 0 deletions drivers/staging/ath6kl/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
config ATH6K_LEGACY
tristate "Atheros AR6003 support (non mac80211)"
depends on MMC && WLAN
select WIRELESS_EXT
select WEXT_PRIV
help
This module adds support for wireless adapters based on Atheros AR6003 chipset running over SDIO. If you choose to build it as a module, it will be called ath6kl. Pls note that AR6002 and AR6001 are not supported by this driver.

choice
prompt "AR6003 Board Data Configuration"
depends on ATH6K_LEGACY
default AR600x_SD31_XXX
help
Select the appropriate board data template from the list below that matches your AR6003 based reference design.

config AR600x_SD31_XXX
bool "SD31-xxx"
help
Board Data file for a standard SD31 reference design (File: bdata.SD31.bin)

config AR600x_WB31_XXX
bool "WB31-xxx"
help
Board Data file for a standard WB31 (BT/WiFi) reference design (File: bdata.WB31.bin)

config AR600x_SD32_XXX
bool "SD32-xxx"
help
Board Data file for a standard SD32 (5GHz) reference design (File: bdata.SD32.bin)

config AR600x_CUSTOM_XXX
bool "CUSTOM-xxx"
help
Board Data file for a custom reference design (File: should be named as bdata.CUSTOM.bin)
endchoice

config ATH6KL_ENABLE_COEXISTENCE
bool "BT Coexistence support"
depends on ATH6K_LEGACY
help
Enables WLAN/BT coexistence support. Select the apprpriate configuration from below.

choice
prompt "Front-End Antenna Configuration"
depends on ATH6KL_ENABLE_COEXISTENCE
default AR600x_DUAL_ANTENNA
help
Indicates the number of antennas being used by BT and WLAN. Select the appropriate configuration from the list below that matches your AR6003 based reference design.

config AR600x_DUAL_ANTENNA
bool "Dual Antenna"
help
Dual Antenna Design

config AR600x_SINGLE_ANTENNA
bool "Single Antenna"
help
Single Antenna Design
endchoice

choice
prompt "Collocated Bluetooth Type"
depends on ATH6KL_ENABLE_COEXISTENCE
default AR600x_BT_AR3001
help
Select the appropriate configuration from the list below that matches your AR6003 based reference design.

config AR600x_BT_QCOM
bool "Qualcomm BTS4020X"
help
Qualcomm BT (3 Wire PTA)

config AR600x_BT_CSR
bool "CSR BC06"
help
CSR BT (3 Wire PTA)

config AR600x_BT_AR3001
bool "Atheros AR3001"
help
Atheros BT (3 Wire PTA)
endchoice

config ATH6KL_HCI_BRIDGE
bool "HCI over SDIO support"
depends on ATH6K_LEGACY
help
Enables BT over SDIO. Applicable only for combo designs (eg: WB31)

config ATH6KL_CONFIG_GPIO_BT_RESET
bool "Configure BT Reset GPIO"
depends on ATH6KL_HCI_BRIDGE
help
Configure a WLAN GPIO for use with BT.

config AR600x_BT_RESET_PIN
int "GPIO"
depends on ATH6KL_CONFIG_GPIO_BT_RESET
default 22
help
WLAN GPIO to be used for resetting BT

config ATH6KL_CFG80211
bool "CFG80211 support"
depends on ATH6K_LEGACY
help
Enables support for CFG80211 APIs. The default option is to use WEXT. Even with this option enabled, WEXT is not explicitly disabled and the onus of not exercising WEXT lies on the application(s) running in the user space.

config ATH6KL_HTC_RAW_INTERFACE
bool "RAW HTC support"
depends on ATH6K_LEGACY
help
Enables raw HTC interface. Allows application to directly talk to the HTC interface via the ioctl interface

config ATH6KL_VIRTUAL_SCATTER_GATHER
bool "Virtual Scatter-Gather support"
depends on ATH6K_LEGACY
help
Enables virtual scatter gather support for the hardware that does not support it natively.

config ATH6KL_SKIP_ABI_VERSION_CHECK
bool "Skip ABI version check support"
depends on ATH6K_LEGACY
help
Forces the driver to disable ABI version check. Caution: Incompatilbity between the host driver and target firmware may lead to unknown side effects.

config ATH6KL_BT_UART_FC_POLARITY
int "UART Flow Control Polarity"
depends on ATH6KL_LEGACY
default 0
help
Configures the polarity of UART Flow Control. A value of 0 implies active low and is the default setting. Set it to 1 for active high.

config ATH6KL_DEBUG
bool "Debug support"
depends on ATH6K_LEGACY
help
Enables debug support

config ATH6KL_ENABLE_HOST_DEBUG
bool "Host Debug support"
depends on ATH6KL_DEBUG
help
Enables debug support in the driver

config ATH6KL_ENABLE_TARGET_DEBUG_PRINTS
bool "Target Debug support - Enable UART prints"
depends on ATH6KL_DEBUG
help
Enables uart prints

config AR600x_DEBUG_UART_TX_PIN
int "GPIO"
depends on ATH6KL_ENABLE_TARGET_DEBUG_PRINTS
default 8
help
WLAN GPIO to be used for Debug UART (Tx)

config ATH6KL_DISABLE_TARGET_DBGLOGS
bool "Target Debug support - Disable Debug logs"
depends on ATH6KL_DEBUG
help
Enables debug logs
159 changes: 159 additions & 0 deletions drivers/staging/ath6kl/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
#------------------------------------------------------------------------------
# Copyright (c) 2004-2010 Atheros Communications Inc.
# All rights reserved.
#
#
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
#
#
# Author(s): ="Atheros"
#------------------------------------------------------------------------------

ccflags-y += -I$(obj)/include
ccflags-y += -I$(obj)/include/common
ccflags-y += -I$(obj)/wlan/include
ccflags-y += -I$(obj)/os/linux/include
ccflags-y += -I$(obj)/os
ccflags-y += -I$(obj)/bmi/include
ccflags-y += -I$(obj)/include/common/AR6002/hw4.0

ifeq ($(CONFIG_AR600x_SD31_XXX),y)
ccflags-y += -DAR600x_SD31_XXX
endif

ifeq ($(CONFIG_AR600x_WB31_XXX),y)
ccflags-y += -DAR600x_WB31_XXX
endif

ifeq ($(CONFIG_AR600x_SD32_XXX),y)
ccflags-y += -DAR600x_SD32_XXX
endif

ifeq ($(CONFIG_AR600x_CUSTOM_XXX),y)
ccflags-y += -DAR600x_CUSTOM_XXX
endif

ifeq ($(CONFIG_ATH6KL_ENABLE_COEXISTENCE),y)
ccflags-y += -DENABLE_COEXISTENCE
endif

ifeq ($(CONFIG_AR600x_DUAL_ANTENNA),y)
ccflags-y += -DAR600x_DUAL_ANTENNA
endif

ifeq ($(CONFIG_AR600x_SINGLE_ANTENNA),y)
ccflags-y += -DAR600x_SINGLE_ANTENNA
endif

ifeq ($(CONFIG_AR600x_BT_QCOM),y)
ccflags-y += -DAR600x_BT_QCOM
endif

ifeq ($(CONFIG_AR600x_BT_CSR),y)
ccflags-y += -DAR600x_BT_CSR
endif

ifeq ($(CONFIG_AR600x_BT_AR3001),y)
ccflags-y += -DAR600x_BT_AR3001
endif

ifeq ($(CONFIG_ATH6KL_HCI_BRIDGE),y)
ccflags-y += -DATH_AR6K_ENABLE_GMBOX
ccflags-y += -DHCI_TRANSPORT_SDIO
ccflags-y += -DSETUPHCI_ENABLED
ccflags-y += -DSETUPBTDEV_ENABLED
ath6kl-y += htc2/AR6000/ar6k_gmbox.o
ath6kl-y += htc2/AR6000/ar6k_gmbox_hciuart.o
ath6kl-y += miscdrv/ar3kconfig.o
ath6kl-y += miscdrv/ar3kps/ar3kpsconfig.o
ath6kl-y += miscdrv/ar3kps/ar3kpsparser.o
endif

ifeq ($(CONFIG_ATH6KL_CONFIG_GPIO_BT_RESET),y)
ccflags-y += -DATH6KL_CONFIG_GPIO_BT_RESET
endif

ifeq ($(CONFIG_ATH6KL_CFG80211),y)
ccflags-y += -DATH6K_CONFIG_CFG80211
ath6kl-y += os/linux/cfg80211.o
endif

ifeq ($(CONFIG_ATH6KL_HTC_RAW_INTERFACE),y)
ccflags-y += -DHTC_RAW_INTERFACE
endif

ifeq ($(CONFIG_ATH6KL_ENABLE_HOST_DEBUG),y)
ccflags-y += -DDEBUG
ccflags-y += -DATH_DEBUG_MODULE
endif

ifeq ($(CONFIG_ATH6KL_ENABLE_TARGET_DEBUG_PRINTS),y)
ccflags-y += -DENABLEUARTPRINT_SET
endif

ifeq ($(CONFIG_ATH6KL_DISABLE_TARGET_DBGLOGS),y)
ccflags-y += -DATH6KL_DISABLE_TARGET_DBGLOGS
endif

ifeq ($(CONFIG_ATH6KL_VIRTUAL_SCATTER_GATHER),y)
ccflags-y += -DATH6KL_CONFIG_HIF_VIRTUAL_SCATTER
endif

ifeq ($(CONFIG_ATH6KL_SKIP_ABI_VERSION_CHECK),y)
ccflags-y += -DATH6KL_SKIP_ABI_VERSION_CHECK
endif

ccflags-y += -DLINUX -DKERNEL_2_6
ccflags-y += -DTCMD
ccflags-y += -DSEND_EVENT_TO_APP
ccflags-y += -DUSER_KEYS
ccflags-y += -DNO_SYNC_FLUSH
ccflags-y += -DHTC_EP_STAT_PROFILING
ccflags-y += -DATH_AR6K_11N_SUPPORT
ccflags-y += -DWAPI_ENABLE
ccflags-y += -DCHECKSUM_OFFLOAD
ccflags-y += -DWLAN_HEADERS
ccflags-y += -DINIT_MODE_DRV_ENABLED
ccflags-y += -DBMIENABLE_SET

obj-$(CONFIG_ATH6K_LEGACY) := ath6kl.o
ath6kl-y += htc2/AR6000/ar6k.o
ath6kl-y += htc2/AR6000/ar6k_events.o
ath6kl-y += htc2/htc_send.o
ath6kl-y += htc2/htc_recv.o
ath6kl-y += htc2/htc_services.o
ath6kl-y += htc2/htc.o
ath6kl-y += bmi/src/bmi.o
ath6kl-y += os/linux/ar6000_drv.o
ath6kl-y += os/linux/ar6000_raw_if.o
ath6kl-y += os/linux/ar6000_pm.o
ath6kl-y += os/linux/netbuf.o
ath6kl-y += os/linux/wireless_ext.o
ath6kl-y += os/linux/ioctl.o
ath6kl-y += os/linux/hci_bridge.o
ath6kl-y += os/linux/ar6k_pal.o
ath6kl-y += miscdrv/common_drv.o
ath6kl-y += miscdrv/credit_dist.o
ath6kl-y += wmi/wmi.o
ath6kl-y += reorder/rcv_aggr.o
ath6kl-y += wlan/src/wlan_node.o
ath6kl-y += wlan/src/wlan_recv_beacon.o
ath6kl-y += wlan/src/wlan_utils.o

# ATH_HIF_TYPE := sdio
ccflags-y += -I$(obj)/hif/sdio/linux_sdio/include
ccflags-y += -DSDIO
ath6kl-y += hif/sdio/linux_sdio/src/hif.o
ath6kl-y += hif/sdio/linux_sdio/src/hif_scatter.o
8 changes: 8 additions & 0 deletions drivers/staging/ath6kl/TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- The driver is a stop-gap measure until a proper mac80211 driver is available.
- The driver does not conform to the Linux coding style.
- The driver has been tested on a wide variety of embedded platforms running different versions of the Linux kernel but may still have bringup/performance issues with a new platform.
- Pls use the following link to get information about the driver's architecture, exposed APIs, supported features, limitations, testing, hardware availability and other details.
http://wireless.kernel.org/en/users/Drivers/ath6kl
- Pls send any patches to
- Greg Kroah-Hartman <greg@kroah.com>
- Vipin Mehta <vmehta@atheros.com>
Loading

0 comments on commit 30295c8

Please sign in to comment.