Reference

ath(4)

Atheros IEEE 802.11a/b/g wireless network device with GPIO

NAME

ath – Atheros IEEE 802.11a/b/g wireless network device with GPIO

SYNOPSIS

ath* at pci? dev ? function ? ath* at cardbus? dev ? function ? gpio* at ath?

DESCRIPTION

The ath driver provides support for wireless network devices based on the Atheros AR5210, AR5211, and AR5212 chips.

All host/device interaction is via DMA. The ath driver encapsulates all IP and ARP traffic as 802.11 frames, though it can receive either 802.11 or 802.3 frames. Transmit speed and operating mode is selectable and depends on the specific chipset.

Support for the various devices is as follows:

AR5210

These devices support 802.11a operation with transmit speeds of 6 Mbps, 9 Mbps, 12 Mbps, 18 Mbps, 24 Mbps, 36 Mbps, 48 Mbps, and 54 Mbps.

AR5211

These devices support 802.11a and 802.11b operation with transmit speeds as above for 802.11a and 1Mbps, 2Mbps, 5.5 Mbps, and 11Mbps for 802.11b operation.

AR5212

These devices support 802.11a, 802.11b, and 802.11g operation with transmit speeds as above for 802.11a, 802.11b, and 802.11g operation (802.11g speeds are the same as for 802.11a speeds).

The actual transmit speed used is dependent on signal quality and the “rate control” algorithm employed by the driver.

These are the modes the ath driver can operate in:

BSS mode

Also known as infrastructure mode, this is used when associating with an access point, through which all traffic passes. This mode is the default.

IBSS mode

Also known as IEEE ad-hoc mode or peer-to-peer mode. This is the standardized method of operating without an access point. Stations associate with a service set. However, actual connections between stations are peer-to-peer.

Host AP

In this mode the adapter acts as an access point (base station) for other cards.

monitor mode

In this mode the driver is able to receive packets without associating with an access point. This disables the internal receive filter and enables the card to capture packets from networks which it wouldn't normally have access to, or to scan for access points.

The ath driver can be configured to use Wired Equivalent Privacy (WEP) or Wi-Fi Protected Access (WPA1 and WPA2). WPA2 is currently the most secure encryption standard for wireless networks supported by OpenBSD. It is strongly recommended that neither WEP nor WPA1 are used as the sole mechanism to secure wireless communication, due to serious weaknesses. WPA1 is disabled by default and may be enabled using the option "wpaprotos wpa1,wpa2". For standard WPA networks which use pre-shared keys (PSK), keys are configured using the "wpakey" option. WPA-Enterprise networks require use of the wpa_supplicant package.

AR5211 and AR5212 support the AES, TKIP, and Michael cryptographic operations required for WPA in hardware but at this time the driver does not support them.

The ath driver can be configured at runtime with ifconfig(8) or on boot with hostname.if(5).

HARDWARE

Devices supported by the ath driver come in either CardBus or Mini PCI packages. Wireless cards in CardBus slots may be inserted and ejected on the fly.

The following cards are among those supported by the ath driver:

CardChipBusStandard
3Com 3CRPAG175AR5212CardBusa/b/g
Cisco AIR-CB21AGAR5212CardBusa/b/g
D-Link DWL-A650AR5210CardBusa
D-Link DWL-AB650AR5211CardBusa/b
D-Link DWL-A520AR5210PCIa
Elecom LD-WL54AR5211CardBusa
IBM 11ABG WL LANAR5212Mini PCIa/b/g
Linksys WPC51ABAR5211CardBusa/b
Netgear WAB501AR5211CardBusa/b
Planet WL-3560AR5211CardBusa/b/g
Proxim Skyline 4030AR5210CardBusa
Proxim Skyline 4032AR5210PCIa
Senao NL-5354MPAR5212Mini PCIa/b/g
SMC SMC2735WAR5210CardBusa
Sony PCWA-C500AR5210CardBusa
Wistron CM9AR5212Mini PCIa/b/g

EXAMPLES

The following example scans for available networks:

# ifconfig ath0 scan

The following hostname.if(5) example configures ath0 to join network “mynwid”, using WPA key “mywpakey”, obtaining an IP address using DHCP:

nwid mynwid wpakey mywpakey
inet autoconf

The following hostname.if(5) example creates a host-based access point on boot:

mediaopt hostap
nwid mynwid wpakey mywpakey
inet 192.168.1.1 255.255.255.0

DIAGNOSTICS

ath0: unable to attach hardware; HAL status N

The Hardware Access Layer was unable to configure the hardware as requested. The status code is explained in the HAL include file sys/dev/ic/ar5xxx.h.

ath0: failed to allocate descriptors: N

The driver was unable to allocate contiguous memory for the transmit and receive descriptors. This usually indicates system memory is scarce and/or fragmented.

ath0: unable to setup a data xmit queue!

The request to the HAL to set up the transmit queue for normal data frames failed. This should not happen.

ath0: unable to setup a beacon xmit queue!

The request to the HAL to set up the transmit queue for 802.11 beacon frames failed. This should not happen.

ath0: hardware error; resetting

An unrecoverable error in the hardware occurred. Errors of this sort include unrecoverable DMA errors. The driver will reset the hardware and continue.

ath0: rx FIFO overrun; resetting

The receive FIFO in the hardware overflowed before the data could be transferred to the host. This typically occurs because the hardware ran short of receive descriptors and had no place to transfer received data. The driver will reset the hardware and continue.

ath0: unable to reset hardware; hal status N

The Hardware Access Layer was unable to reset the hardware as requested. The status code is explained in the HAL include file /sys/dev/ic/ar5xxx.h. This should not happen.

ath0: unable to initialize the key cache

The driver was unable to initialize the hardware key cache. This should not happen.

ath0: unable to start recv logic

The driver was unable to restart frame reception. This should not happen.

ath0: device timeout

A frame dispatched to the hardware for transmission did not complete in time. The driver will reset the hardware and continue. This should not happen.

ath0: bogus xmit rate 0xNNNN

An invalid transmit rate was specified for an outgoing frame. The frame is discarded. This should not happen.

ath0: ath_chan_set: unable to reset channel N (X MHz)

The Hardware Access Layer was unable to reset the hardware when switching channels during scanning. This should not happen.

ath0: unable to allocate channel table

The driver was unable to allocate memory for the table used to hold the set of available channels.

ath0: unable to collect channel list from hal

A problem occurred while querying the HAL to find the set of available channels for the device. This should not happen.

ath0: failed to enable memory mapping

The driver was unable to enable memory-mapped I/O to the PCI device registers. This should not happen.

ath0: failed to enable bus mastering

The driver was unable to enable the device as a PCI bus master for doing DMA. This should not happen.

ath0: cannot map register space

The driver was unable to map the device registers into the host address space. This should not happen.

ath0: could not map interrupt

The driver was unable to allocate an IRQ for the device interrupt. This should not happen.

ath0: could not establish interrupt

The driver was unable to install the device interrupt handler. This should not happen.

SEE ALSO

arp(4), cardbus(4), gpio(4), ifmedia(4), intro(4), netintro(4), pci(4), hostname.if(5), gpioctl(8), hostapd(8), ifconfig(8)

HISTORY

The ath device driver first appeared in FreeBSD 5.2 using a binary-only HAL module which was ported to NetBSD 2.0. The driver using a free HAL-replacement first appeared in OpenBSD 3.7.

AUTHORS

The ath driver was written by Sam Leffler, and was ported to OpenBSD by Reyk Floeter ⟨[email protected]⟩ who also wrote a free replacement of the binary-only HAL.

CAVEATS

Different regulatory domains may not be able to communicate with each other with 802.11a as different regulatory domains do not necessarily have overlapping channels.

Host AP mode doesn't support power saving. Clients attempting to use power saving mode may experience significant packet loss (disabling power saving on the client will fix this).

BUGS

Performance in lossy environments is suboptimal. The algorithm used to select the rate for transmitted packets is very simplistic. There is no software retransmit; only hardware retransmit is used. Contributors are encouraged to replace the existing rate control algorithm with a better one.

The driver does not fully enable power-save operation of the chip; consequently power use is suboptimal.

Operation in the 2GHz band is restricted to 11b mode because the driver does not support running the hardware in 11g mode.

History