NOTE: this page is for archival only, see the note at the end of the page.

Go back –> Atheros Linux wireless drivers

Introduction

'ath6kl' is the wireless driver for Atheros AR600x family of chips. It has been tested to work with the latest in the family, AR6003.

Architecture

AR600x software is partitioned into host-side and target-side software. The host side software or the driver is provided as a reference implementation for selected platforms/OSes including Linux. The current avatar of Linux driver is referred to as 'ath6kl' or the Legacy driver for AR600x family of chips. The target-side software or the firmware runs on the cbhip's network processor and is stored in the target memory. It is a maintained by Atheros and is released as binary only.

The 'ath6kl' driver is organized into the following layers which collectively define the host software stack. In general, functions in the highest layer may call other functions at the same layer or one layer down. Functions do not make direct calls to higher layers, though upper layers may register callbacks with lower layers. A brief summary of the driver components is given below.

driver-arch.PNG

Wireless Device Driver

Bridges the control and data paths between the kernel and the HTC/WMI layers. On the control path, it handles both the vendor specific proprietary ioctls and the standard ones defined under wireless extensions. The layer also implements the CFG80211 APIs and therefore provides support for nl80211 based applications. On the data path it handles the data between the HTC layer and IP stack. The relevant sources are present in the ath6kl/os/linux/ directory.

Wireless Module Interface (WMI)

If the wireless application must send control messages to the AR600x chipset, it calls into the WMI to create the messages. This layer understands the host/target messaging protocol (WMI Protocol) and its source is in the ath6kl/wmi/ directory. The header files ath6kl/include/wmi.h and ath6kl/include/wmix.h list all messages from host to target (commands) and from target to host (requests and events).

Host/Target Communication (HTC)

The wireless device driver calls into HTC to handle message transport. HTC does not understand the contents of messages it transports (only WMI understands the contents of control messages), but it does understand the mechanics of messaging with the AR600x chipset. It handles flow control and knows which chipset addresses must be read and written to relay messages. This layer source is in the ath6kl/htc2/ directory.

Host Interconnect Framework (HIF)

HTC calls into the HIF layer when it needs to access the chipset address space. An HIF implementation exists for each combination of platform and interconnect API (e.g., HIF for Linux standard SDIO/MMC stack). This layer abstracts away register and memory access details and provides an interconnect-independent and platform-independent API for use (mainly) by HTC. This layer source is in the ath6kl/hif/ directory.

Physical Interconnect

The HIF layer relies on underlying interconnect-specific and platform-specific software to drive a hardware controller of some sort. The interconnect layer plays a role in device discovery, setting up an appropriate address space mapping and performing reads/writes through that address space, and deals with error management over the physical connection. For most serial buses, the HIF layers interfaces with a bus driver that provides an abstracted view of the underlying host bus adapter. These bus drivers may be provided by partners, OS vendors, or Atheros.

API Description

Wireless Extensions

Standard IOCTLs

Linux Wireless Extension IOCTLs

IOCTL

Description

SIOCGIWENCODE

Retrieves the WEP key for the AR600x

SIOCSIWENCODE

Sets the WEP key for the AR600x

SIOCGIWESSID

Retrieves the SSID of the network

SIOCSIWESSID

Sets the SSID of the network

SIOCGIWFREQ

Retrieves the frequency of the wireless device

SIOCSIWFREQ

Sets the frequency for the wireless device operate on

SIOCGIWMODE

Retrieves the mode of operation

SIOCSIWMODE

Sets the mode of operation

SIOCGIWNAME

Retrieves the name of the network device

SIOCGIWRANGE

Retrieves network device wireless information

SIOCGIWRETRY

Retrieves max retry value from failure frames (in software version 1.2 or higher.)

SIOCSIWRETRY

Sets max retry value from failure frames (in software version 1.2 or higher).

SIOCGIWAP

Retrieves the desired BSSID

SIOCSIWAP

Sets the desired BSSID for the CONNECT command

SIOCGIWRATE

Retrieves the transmission rate of the AR600x

SIOCSIWRATE

Fixes the transmission rate of the AR6001

SIOCGIWSCAN

Retrieves the list of APs from the SCAN operation

SIOCSIWSCAN

Executes the SCAN command in the AR600x

SIOCGIWTXPOW

Retrieves the transmission rate of the AR600x

SIOCSIWTXPOW

Sets the transmission rate of the AR600x

Name

SIOCGIWNAME

Description

Retrieves the name of the network device

Commands

iwconfig eth1

iwgetid

Argument Type

char *

Arguments

Name of the wireless device

IOCTL Type

get

Class

Wireless extension

Name

SIOCSIWFREQ

Description

Sets the frequency on which the wireless device should operate

Commands

iwlist eth1

freq <freq|channel>

iwconfig eth1

channel <freq|channel>

Argument Type

struct iw_freq *

Arguments

Defined in linux/wireless.h

IOCTL Type

set

Class

Wireless extension

Name

SIOCGIWFREQ

Description

Retrieves the frequency on which the wireless device is operating if the device is connected. If the device is not connected, this command retrieves the range of frequencies in which the device can operate.

Commands

iwlist eth1

freq

iwconfig eth1

channel

Argument Type

struct iw_freq *

Arguments

Defined in linux/wireless.h

IOCTL Type

get

Class

Wireless extension

Name

SIOCSIWMODE

Description

Sets the mode of operation

Commands

iwconfig eth1

mode {ad-hoc | managed | 1 | 2}

Argument Type

unsigned int *

Arguments

n 1 = Ad hoc mode n 2 = Infrastructure mode

IOCTL Type

set

Class

Wireless extension

Name

SIOCGIWMODE

Description

Retrieves the mode of operation

Commands

iwconfig eth1

Argument Type

unsigned int *

Arguments

n 1 = Ad hoc mode

n 2 = Infrastructure mode

IOCTL Type

get

Class

Wireless extension

Name

SIOCGIWRANGE

Description

Retrieves the various wireless information related to the network device

Commands

iwconfig eth1

iwlist eth1

freq

iwlist eth1

channel

Argument Type

struct iw_point *, struct iw_range *

Arguments

1. struct iw_point

Defined in linux/wireless.h

Length = size of argument 2

2. struct iw_range

Defined in linux/wireless.h

Various device information

IOCTL Type

get

Class

Wireless extension

Name

SIOCSIWAP

Description

Sets the desired BSSID for the CONNECT command

Commands

iwconfig eth1

ap {<BSSID>|any|off}

Argument Type

struct sockaddr *

Arguments

MAC address of the BSSID

IOCTL Type

get

Class

Wireless extension

Name

SIOCGIWAP

Description

Retrieves the desired BSSID for the CONNECT command

Commands

iwconfig eth1

Argument Type

struct sockaddr *

Arguments

MAC address of the BSSID

IOCTL Type

get

Class

Wireless extension

Name

SIOCSIWSCAN

Description

Executes the SCAN command in the AR6001

Commands

iwlist eth1

scan

Argument Type

None

Arguments

None

IOCTL Type

set

Class

Wireless extension

Name

SIOCGIWSCAN

Description

Retrieves the list of APs from the SCAN operation

Commands

iwlist eth1

scan

Argument Type

struct ar_giwscan_param {

char

*current_ev;

char

*end_buf;

A_BOOL

*firstpass;

Arguments

current_ev

Beginning of the buffer for the scan data

end_buf

End of the buffer for the scan data

IOCTL Type

get

Class

Wireless extension

Name

SIOCSIWESSID

Description

Sets the SSID of the network the AR6001 should connect to. Usually, the WMI_CONNECT_CMD is called. However, when the STA is already associated to an AP and the SSID to be used is the same as the AP’s (i.e., the same as the previous setting), then the WMI_RECONNECT_CMD is called.

Commands

iwconfig eth1 essid {<ESSID>|any|off} Where ESSID is the ESSID of the AP the STA wants to connect to

Argument Type

struct iw_point *, char *

Arguments

1. struct iw_point

Defines the SSID length

Length = size of argument 2

2. String representation of the SSID

IOCTL Type

set

Class

Wireless extension

Name

SIOCGIWESSID

Description

Retrieves the ESSID of the network the AR6001 is connected to or wants to connect to

Commands

iwconfig eth1

Argument Type

struct iw_point *, char *

Arguments

1. struct iw_point

Defines the ESSID length

Length = size of argument 2

2. String representation of the ESSID

IOCTL Type

get

Class

Wireless extension

Name

SIOCSIWRATE

Description

Fixes the transmission rate of the AR6001

Commands

iwconfig eth1

rate <rate>

Argument Type

struct iw_param *

Arguments

Defined in linux/wireless.h

value

Transmit (Tx) rate in bps

fixed

n TRUE = Software fixes this rate n FALSE = Allow hardware to auto-select the rate

IOCTL Type

set

Class

Wireless extension

Name

SIOCGIWRATE

Description

Retrieves the current transmission rate of the AR6001

Commands

iwconfig eth1

rate

iwlist eth1

rate

Argument Type

struct iw_param *

Arguments

Defined in linux/wireless.h

value

Transmit (Tx) rate in bps

fixed

n TRUE = Software fixes this rate n FALSE = Allow hardware to auto-select the rate

IOCTL Type

get

Class

Wireless extension

Name

SIOCSIWTXPOW

Description

Sets the power of transmitted packets in AR6001

Commands

iwconfig eth1

txpower {txpower in dbM | txpower in mW | auto} {[fixed | auto]}

Argument Type

iw_param *

Arguments

Defined in linux/wireless.h

value

Transmit (Tx) rate in dBm

disabled

n TRUE = Featured not enabled n FALSE = The AR6001 wishes to fix the Tx power

fixed

n TRUE = Software fixes this rate n FALSE = Allow hardware to auto-select the rate

flags

Units of Tx power value n IW_TXPOW_DBM = In dBm n IW_TXPOW_MWATT = Not supported

IOCTL Type

set

Class

Wireless extension

Name

CGIWTXPOW

Description

Retrieves the power of transmitted packet in the AR6001

Commands

iwlist eth1

txpower

Argument Type

struct iw_param *

Arguments

Defined in linux/wireless.h

value

Transmit (Tx) rate in dBm

disabled

n TRUE = Featured not enabled n FALSE = The AR6001 wishes to fix the Tx power

fixed

n TRUE = Software fixes this rate n FALSE = Allow hardware to auto-select the rate

flags

Units of Tx power value n IW_TXPOW_DBM = In dBm

IOCTL Type

get

Class

Wireless extension

Name

SIOCSIWENCODE

Description

Sets the WEP key for the AR6001

Commands

iwconfig eth1

key [key index] <k>

Argument Type

struct iw_point *, char *

Arguments

struct iw_point defines the WEP encryption method and key length

1. flags

IW_ENCODE_DISABLED

No encryption

IW_ENCODE_ENABLED

Encryption enabled

IW_ENCODE_OPEN

Accept non-encoded packets

IW_ENCODE_RESTRICTED

Refuse non-encode packets

IW_ENCODE_INDEX

Key index

IW_ENCODE_NOKEY/IW_ENCODE_TEMP

Not supported

length

5, 13, or 16

Length of valid ASCII WEP key

2. String representation of the WEP key (ASCII)

IOCTL Type

set

Class

Wireless extension

Name

SIOCGIWENCODE

Description

Retrieves the WEP key for the AR6001

Commands

iwlist eth1

key

Argument Type

struct iw_point *, char *

Arguments

struct iw_point defines the WEP encryption method and key length

1. flags

IW_ENCODE_DISABLED

No encryption

IW_ENCODE_ENABLED

Encryption enabled

IW_ENCODE_OPEN

Accept non-encoded packets

IW_ENCODE_RESTRICTED

Refuse non-encode packets

IW_ENCODE_INDEX

Key index

length

5, 13, or 16

Length of valid ASCII WEP key

2. String representation of the WEP key (ASCII)

IOCTL Type

get

Class

Wireless extension

Name

SIOCSIWRETRY

Description

Sets the maximum retry value from the failure frames. Supported in software version 1.2 or higher.

Commands

iwconfig eth1

retry <R>

Argument Type

struct iw_param *, char *

Arguments

struct iw_param

Defines the value of retry number

value

Retry limit

disabled

n TRUE = Featured not enabled n FALSE = The AR6001 wishes to fix the retry limit

flags

IW_RETRY_LIMIT

Maximum number of retries

IW_RETRY_LIFETIME

Maximum duration of retries in ms

IW_RETRY_MIN

The value is a minimum

IW_RETRY_MAX

The value is a maximum

IOCTL Type

set

Class

Wireless extension

Name

SIOCGIWRETRY

Description

Retrieves the maximum retry value from the failure frames. Supported in software version 1.2 or higher.

Commands

iwlist eth1

retry

Argument Type

struct iw_param *, char *

Arguments

struct iw_param

Defines the value of retry number

value

Retry limit

disabled

n TRUE = Featured not enabled n FALSE = The AR6001 wishes to fix the retry limit

flags

IW_RETRY_LIMIT

Maximum number of retries

IW_RETRY_LIFETIME

Maximum duration of retries in ms

IW_RETRY_MIN

The value is a minimum

IW_RETRY_MAX

The value is a maximum

IOCTL Type

get

Class

Wireless extension

Modes of operation

  • Station Mode

  • AP Mode (WEXT mode)

  • IBSS Mode

Features

  • 802.11abg
  • 802.11n
    • HT20
    • HT40
    • AMPDU
    • Short GI (40 MHz only)
  • 802.11i
    • WEP 64 / 127
    • WPA1 / WPA2
  • 802.11d
  • 802.11h
  • WMM
  • RFKILL
  • BT co-existence

Supported chipsets

  • AR6003: It is the third-generation Wi-Fi chip from Atheros optimized for the throughput, size, and energy efficiency needs of mobile and embedded devices. With its tiny footprint and energy-saving qualities, the AR6003 rounds out Atheros’ comprehensive Align® ecosystem of 1-stream 11n solutions, targeting smartphones, mobile gaming and portable CE devices.

Todo

  • Multi architecture support (64 bit)
  • Bi-endian support (big endian)
  • Upgrade CFG80211 support to work with the recent changes in the kernel.
  • AP Mode support using CFG80211.
  • WiFi Direct.

Limitations

  • Known defects (To be updated)

Download

We are in the process of upstreaming the driver.

This driver is upstream as part of the Linux 2.6.37 release under the staging area. It is also available for older kernels through the stable compat-wireless-2.6.37 releases. The goal is to eventually replace this driver with a proper mac80211 driver.

Firmware:

http://bombadil.infradead.org/~mcgrof/firmware/ath6kl/AR6K_FW.3.0_RC.233.tar.bz2

sha1sum: 2d871524faa9c4b60715cacf49ab20b4a89b4adc

Subscribe to this page!

You should subscribe to this page so you can get e-mail updates on changes and news for ath6kl automatically. You'll get an e-mail as soon as this page gets updated.


This is a static dump of the old wiki, taken after locking it in January 2015. The new wiki is at https://wireless.wiki.kernel.org/.
versions of this page: last, v34, v33, v32, v31, v30, v29, v28, v27, v26, v25, v24, v23, v22, v21, v20, v19, v18, v17, v16, v15, v14, v13, v12, v11, v10, v9, v8, v7, v6, v5, v4, v3, v2, v1