1193b341dSSepherosa Ziehau.\"- 228b76601SSascha Wildner.\" Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 3193b341dSSepherosa Ziehau.\" All rights reserved. 428b76601SSascha Wildner.\" 5193b341dSSepherosa Ziehau.\" Redistribution and use in source and binary forms, with or without 6193b341dSSepherosa Ziehau.\" modification, are permitted provided that the following conditions 7193b341dSSepherosa Ziehau.\" are met: 8193b341dSSepherosa Ziehau.\" 1. Redistributions of source code must retain the above copyright 9193b341dSSepherosa Ziehau.\" notice, this list of conditions and the following disclaimer, 10193b341dSSepherosa Ziehau.\" without modification. 11193b341dSSepherosa Ziehau.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer 12193b341dSSepherosa Ziehau.\" similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any 13193b341dSSepherosa Ziehau.\" redistribution must be conditioned upon including a substantially 14193b341dSSepherosa Ziehau.\" similar Disclaimer requirement for further binary redistribution. 15193b341dSSepherosa Ziehau.\" 16193b341dSSepherosa Ziehau.\" NO WARRANTY 17193b341dSSepherosa Ziehau.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18193b341dSSepherosa Ziehau.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19*df052c2aSSascha Wildner.\" LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY 20193b341dSSepherosa Ziehau.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 21193b341dSSepherosa Ziehau.\" THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, 22193b341dSSepherosa Ziehau.\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23193b341dSSepherosa Ziehau.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24193b341dSSepherosa Ziehau.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25193b341dSSepherosa Ziehau.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26193b341dSSepherosa Ziehau.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27193b341dSSepherosa Ziehau.\" THE POSSIBILITY OF SUCH DAMAGES. 28193b341dSSepherosa Ziehau.\" 296307bddbSSascha Wildner.\" $FreeBSD: head/share/man/man4/ath.4 264484 2014-04-15 00:45:38Z adrian $ 30193b341dSSepherosa Ziehau.\" 316307bddbSSascha Wildner.Dd May 26, 2016 32193b341dSSepherosa Ziehau.Dt ATH 4 33193b341dSSepherosa Ziehau.Os 34193b341dSSepherosa Ziehau.Sh NAME 35193b341dSSepherosa Ziehau.Nm ath 36193b341dSSepherosa Ziehau.Nd "Atheros IEEE 802.11 wireless network driver" 37193b341dSSepherosa Ziehau.Sh SYNOPSIS 3854170488SSascha WildnerTo compile this driver into the kernel, 3954170488SSascha Wildnerplace the following lines in your 4054170488SSascha Wildnerkernel configuration file: 4154170488SSascha Wildner.Bd -ragged -offset indent 4254170488SSascha Wildner.Cd "device ath" 4354170488SSascha Wildner.Cd "device ath_hal" 4428b76601SSascha Wildner.Cd "options AH_SUPPORT_AR5416" 4554170488SSascha Wildner.Cd "device ath_rate_sample" 4654170488SSascha Wildner.Cd "device wlan" 4754170488SSascha Wildner.Ed 4854170488SSascha Wildner.Pp 4954170488SSascha WildnerAlternatively, to load the driver as a 50193b341dSSepherosa Ziehaumodule at boot time, place the following line in 51193b341dSSepherosa Ziehau.Xr loader.conf 5 : 52193b341dSSepherosa Ziehau.Bd -literal -offset indent 53193b341dSSepherosa Ziehauif_ath_load="YES" 54193b341dSSepherosa Ziehau.Ed 55193b341dSSepherosa Ziehau.Sh DESCRIPTION 56193b341dSSepherosa ZiehauThe 57193b341dSSepherosa Ziehau.Nm 58193b341dSSepherosa Ziehaudriver provides support for wireless network adapters based on 596307bddbSSascha Wildnerthe Atheros AR5210, AR5211, AR5212, AR5416 and AR9300 programming APIs. 6028b76601SSascha WildnerThese APIs are used by a wide variety of chips; most all chips with 61193b341dSSepherosa Ziehaua PCI and/or CardBus interface are supported. 62193b341dSSepherosa Ziehau.Pp 63193b341dSSepherosa ZiehauSupported features include 802.11 and 802.3 frames, power management, BSS, 6428b76601SSascha WildnerIBSS, MBSS, TDMA, and host-based access point operation modes. 65193b341dSSepherosa ZiehauAll host/device interaction is via DMA. 66646ad10fSSascha Wildner.\".Pp 67646ad10fSSascha Wildner.\"Please note that from FreeBSD-9.0, the 68646ad10fSSascha Wildner.\".Nm 69646ad10fSSascha Wildner.\"driver does not include the PCI/PCIe bus glue. 70646ad10fSSascha Wildner.\"The same driver supports multiple underlying bus types, including PCI/PCIe, 71646ad10fSSascha Wildner.\"but also embedded (AHB) and USB in the future. 72646ad10fSSascha Wildner.\".Pp 73646ad10fSSascha Wildner.\"To enable use for PCI/PCIe systems, see the 74646ad10fSSascha Wildner.\".Xr ath_pci 4 75646ad10fSSascha Wildner.\"driver. 76646ad10fSSascha Wildner.\"For embedded systems which use the AHB to connect the wireless MAC, see the 77646ad10fSSascha Wildner.\".Xr ath_ahb 4 78646ad10fSSascha Wildner.\"driver. 79193b341dSSepherosa Ziehau.Pp 80193b341dSSepherosa ZiehauThe 81193b341dSSepherosa Ziehau.Nm 82193b341dSSepherosa Ziehaudriver encapsulates all IP and ARP traffic as 802.11 frames, however 83193b341dSSepherosa Ziehauit can receive either 802.11 or 802.3 frames. 84193b341dSSepherosa ZiehauTransmit speed and operating mode is selectable 85193b341dSSepherosa Ziehauand depends on the specific chipset. 86193b341dSSepherosa ZiehauAR5210-based devices support 802.11a operation with transmit speeds 87193b341dSSepherosa Ziehauof 6 Mbps, 9 Mbps, 12 Mbps, 18 Mbps, 24 Mbps, 36 Mbps, 48 Mbps, and 54 Mbps. 88193b341dSSepherosa ZiehauAR5211-based devices support 802.11a and 802.11b operation with transmit 89193b341dSSepherosa Ziehauspeeds as above for 802.11a operation and 90193b341dSSepherosa Ziehau1Mbps, 2Mbps, 5.5 Mbps and 11Mbps for 802.11b operation. 91193b341dSSepherosa ZiehauAR5212-based devices support 802.11a, 802.11b, and 802.11g operation 92193b341dSSepherosa Ziehauwith transmit speeds appropriate to each. 936307bddbSSascha WildnerAR5416 and later class devices are capable of 802.11n operation. 94193b341dSSepherosa ZiehauMost chips also support an Atheros Turbo Mode (TM) that operates in 95646ad10fSSascha Wildnerthe 5GHz frequency range with 2x the transmit speeds. 96646ad10fSSascha WildnerSome chips also support Turbo mode in the 2.4GHz range with 802.11g 97193b341dSSepherosa Ziehauthough this support is not presently available due to regulatory requirements. 98193b341dSSepherosa Ziehau(Note that Turbo modes are, however, 99193b341dSSepherosa Ziehauonly interoperable with other Atheros-based devices.) 1006307bddbSSascha WildnerAR5212-based and AR5416-based devices also support half- (10MHz) and quarter-width (5MHz) channels. 101193b341dSSepherosa ZiehauThe actual transmit speed used is dependent on signal quality and the 102193b341dSSepherosa Ziehau.Dq "rate control" 103193b341dSSepherosa Ziehaualgorithm employed by the driver. 104193b341dSSepherosa ZiehauAll chips support WEP encryption. 1056307bddbSSascha WildnerAR5212, AR5416 and later parts have hardware support for the 10628b76601SSascha WildnerAES-CCM, TKIP, and Michael cryptographic 107193b341dSSepherosa Ziehauoperations required for WPA. 108193b341dSSepherosa ZiehauTo enable encryption, use 109193b341dSSepherosa Ziehau.Xr ifconfig 8 110193b341dSSepherosa Ziehauas shown below. 111193b341dSSepherosa Ziehau.Pp 11228b76601SSascha WildnerThe driver supports 11328b76601SSascha Wildner.Cm station , 11428b76601SSascha Wildner.Cm adhoc , 11528b76601SSascha Wildner.Cm adhoc-demo , 11628b76601SSascha Wildner.Cm hostap , 11728b76601SSascha Wildner.Cm mesh , 11828b76601SSascha Wildner.Cm wds , 11928b76601SSascha Wildnerand 12028b76601SSascha Wildner.Cm monitor 12128b76601SSascha Wildnermode operation. 12228b76601SSascha WildnerMultiple 12328b76601SSascha Wildner.Cm hostap 12428b76601SSascha Wildnervirtual interfaces may be configured for simultaneous 1256307bddbSSascha Wildneruse on cards that use a 5212 or later part. 12628b76601SSascha WildnerWhen multiple interfaces are configured each may have a separate 12728b76601SSascha Wildnermac address that is formed by setting the U/L bits in the mac 12828b76601SSascha Wildneraddress assigned to the underlying device. 12928b76601SSascha WildnerAny number of 13028b76601SSascha Wildner.Cm wds 13128b76601SSascha Wildnervirtual interfaces may be configured together with 13228b76601SSascha Wildner.Cm hostap 13328b76601SSascha Wildnerinterfaces. 13428b76601SSascha WildnerMultiple 13528b76601SSascha Wildner.Cm station 13628b76601SSascha Wildnerinterfaces may be operated together with 13728b76601SSascha Wildner.Cm hostap 13828b76601SSascha Wildnerinterfaces to construct a wireless repeater device. 13928b76601SSascha WildnerThe driver also support 14028b76601SSascha Wildner.Cm tdma 14128b76601SSascha Wildneroperation when compiled with 14228b76601SSascha Wildner.Cd "options IEEE80211_SUPPORT_TDMA" 14328b76601SSascha Wildner(which also enables the required 802.11 support). 144193b341dSSepherosa ZiehauFor more information on configuring this device, see 145193b341dSSepherosa Ziehau.Xr ifconfig 8 . 146193b341dSSepherosa Ziehau.Pp 147193b341dSSepherosa ZiehauDevices supported by the 148193b341dSSepherosa Ziehau.Nm 149193b341dSSepherosa Ziehaudriver come in either Cardbus or mini-PCI packages. 150193b341dSSepherosa ZiehauWireless cards in Cardbus slots may be inserted and ejected on the fly. 151193b341dSSepherosa Ziehau.Sh HARDWARE 152193b341dSSepherosa ZiehauThe 153193b341dSSepherosa Ziehau.Nm 15428b76601SSascha Wildnerdriver supports all Atheros Cardbus and PCI cards, 155193b341dSSepherosa Ziehauexcept those that are based on the AR5005VL chipset. 156193b341dSSepherosa Ziehau.Sh EXAMPLES 15728b76601SSascha WildnerJoin a specific BSS network with WEP encryption: 15828b76601SSascha Wildner.Bd -literal -offset indent 15928b76601SSascha Wildnerifconfig wlan0 create wlandev ath0 16028b76601SSascha Wildnerifconfig wlan0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net \e 16128b76601SSascha Wildner wepmode on wepkey 0x8736639624 16228b76601SSascha Wildner.Ed 16328b76601SSascha Wildner.Pp 16428b76601SSascha WildnerJoin/create an 802.11b IBSS network with network name 16528b76601SSascha Wildner.Dq Li my_net : 16628b76601SSascha Wildner.Bd -literal -offset indent 16728b76601SSascha Wildnerifconfig wlan0 create wlandev ath0 wlanmode adhoc 16828b76601SSascha Wildnerifconfig wlan0 inet 192.168.0.22 netmask 0xffffff00 ssid my_net \e 16928b76601SSascha Wildner mode 11b 17028b76601SSascha Wildner.Ed 17128b76601SSascha Wildner.Pp 17228b76601SSascha WildnerCreate an 802.11g host-based access point: 17328b76601SSascha Wildner.Bd -literal -offset indent 17428b76601SSascha Wildnerifconfig wlan0 create wlandev ath0 wlanmode hostap 17528b76601SSascha Wildnerifconfig wlan0 inet 192.168.0.10 netmask 0xffffff00 ssid my_ap \e 17628b76601SSascha Wildner mode 11g 17728b76601SSascha Wildner.Ed 17828b76601SSascha Wildner.Pp 17928b76601SSascha WildnerCreate an 802.11a mesh station: 18028b76601SSascha Wildner.Bd -literal -offset indent 18128b76601SSascha Wildnerifconfig wlan0 create wlandev ath0 wlanmode mesh 18228b76601SSascha Wildnerifconfig wlan0 meshid my_mesh mode 11a inet 192.168.0.10/24 18328b76601SSascha Wildner.Ed 18428b76601SSascha Wildner.Pp 18528b76601SSascha WildnerCreate two virtual 802.11a host-based access points, one with 186b575ab8aSSascha WildnerWEP enabled and one with no security, and bridge them to 18728b76601SSascha Wildnerthe fxp0 (wired) device: 18828b76601SSascha Wildner.Bd -literal -offset indent 18928b76601SSascha Wildnerifconfig wlan0 create wlandev ath0 wlanmode hostap \e 19028b76601SSascha Wildner ssid paying-customers wepmode on wepkey 0x1234567890 \e 19128b76601SSascha Wildner mode 11a up 19228b76601SSascha Wildnerifconfig wlan1 create wlandev ath0 wlanmode hostap bssid \e 19328b76601SSascha Wildner ssid freeloaders up 19428b76601SSascha Wildnerifconfig bridge0 create addm wlan0 addm wlan1 addm fxp0 up 19528b76601SSascha Wildner.Ed 19628b76601SSascha Wildner.Pp 19728b76601SSascha WildnerCreate a master node in a two slot TDMA BSS configured to use 19828b76601SSascha Wildner2.5 millisecond slots. 19928b76601SSascha Wildner.Bd -literal -offset indent 20028b76601SSascha Wildnerifconfig wlan0 create wlandev ath0 wlanmode tdma \e 20128b76601SSascha Wildner ssid tdma-test tmdaslot 0 tdmaslotlen 2500 \e 20228b76601SSascha Wildner channel 36 up 20328b76601SSascha Wildner.Ed 204193b341dSSepherosa Ziehau.Sh DIAGNOSTICS 205193b341dSSepherosa Ziehau.Bl -diag 206193b341dSSepherosa Ziehau.It "ath%d: unable to attach hardware; HAL status %u" 207193b341dSSepherosa ZiehauThe Atheros Hardware Access Layer was unable to configure the hardware 208193b341dSSepherosa Ziehauas requested. 209193b341dSSepherosa ZiehauThe status code is explained in the HAL include file 210646ad10fSSascha Wildner.Pa sys/dev/netif/ath/ath_hal/ah.h . 211193b341dSSepherosa Ziehau.It "ath%d: failed to allocate descriptors: %d" 212193b341dSSepherosa ZiehauThe driver was unable to allocate contiguous memory for the transmit 213193b341dSSepherosa Ziehauand receive descriptors. 214193b341dSSepherosa ZiehauThis usually indicates system memory is scarce and/or fragmented. 215193b341dSSepherosa Ziehau.It "ath%d: unable to setup a data xmit queue!" 216193b341dSSepherosa ZiehauThe request to the HAL to set up the transmit queue for normal 217193b341dSSepherosa Ziehaudata frames failed. 218193b341dSSepherosa ZiehauThis should not happen. 219193b341dSSepherosa Ziehau.It "ath%d: unable to setup a beacon xmit queue!" 220646ad10fSSascha WildnerThe request to the HAL to set up the transmit queue for 802.11 beacon frames 221646ad10fSSascha Wildnerfailed. 222193b341dSSepherosa ZiehauThis should not happen. 223193b341dSSepherosa Ziehau.It "ath%d: 802.11 address: %s" 224193b341dSSepherosa ZiehauThe MAC address programmed in the EEPROM is displayed. 225193b341dSSepherosa Ziehau.It "ath%d: hardware error; resetting" 226193b341dSSepherosa ZiehauAn unrecoverable error in the hardware occurred. 227193b341dSSepherosa ZiehauErrors of this sort include unrecoverable DMA errors. 228193b341dSSepherosa ZiehauThe driver will reset the hardware and continue. 229193b341dSSepherosa Ziehau.It "ath%d: rx FIFO overrun; resetting" 230193b341dSSepherosa ZiehauThe receive FIFO in the hardware overflowed before the data could be 231193b341dSSepherosa Ziehautransferred to the host. 232193b341dSSepherosa ZiehauThis typically occurs because the hardware ran short of receive 233193b341dSSepherosa Ziehaudescriptors and had no place to transfer received data. 234193b341dSSepherosa ZiehauThe driver will reset the hardware and continue. 235193b341dSSepherosa Ziehau.It "ath%d: unable to reset hardware; hal status %u" 236193b341dSSepherosa ZiehauThe Atheros Hardware Access Layer was unable to reset the hardware 237193b341dSSepherosa Ziehauas requested. 238193b341dSSepherosa ZiehauThe status code is explained in the HAL include file 239646ad10fSSascha Wildner.Pa sys/dev/netif/ath/ath_hal/ah.h . 240193b341dSSepherosa ZiehauThis should not happen. 241193b341dSSepherosa Ziehau.It "ath%d: unable to start recv logic" 242193b341dSSepherosa ZiehauThe driver was unable to restart frame reception. 243193b341dSSepherosa ZiehauThis should not happen. 244193b341dSSepherosa Ziehau.It "ath%d: device timeout" 245193b341dSSepherosa ZiehauA frame dispatched to the hardware for transmission did not complete in time. 246193b341dSSepherosa ZiehauThe driver will reset the hardware and continue. 247193b341dSSepherosa ZiehauThis should not happen. 248193b341dSSepherosa Ziehau.It "ath%d: bogus xmit rate 0x%x" 249193b341dSSepherosa ZiehauAn invalid transmit rate was specified for an outgoing frame. 250193b341dSSepherosa ZiehauThe frame is discarded. 251193b341dSSepherosa ZiehauThis should not happen. 25228b76601SSascha Wildner.It "ath%d: ath_chan_set: unable to reset channel %u (%u MHz)" 253193b341dSSepherosa ZiehauThe Atheros Hardware Access Layer was unable to reset the hardware 254193b341dSSepherosa Ziehauwhen switching channels during scanning. 255193b341dSSepherosa ZiehauThis should not happen. 256193b341dSSepherosa Ziehau.It "ath%d: failed to enable memory mapping" 257193b341dSSepherosa ZiehauThe driver was unable to enable memory-mapped I/O to the PCI device registers. 258193b341dSSepherosa ZiehauThis should not happen. 259193b341dSSepherosa Ziehau.It "ath%d: failed to enable bus mastering" 260193b341dSSepherosa ZiehauThe driver was unable to enable the device as a PCI bus master for doing DMA. 261193b341dSSepherosa ZiehauThis should not happen. 262193b341dSSepherosa Ziehau.It "ath%d: cannot map register space" 263193b341dSSepherosa ZiehauThe driver was unable to map the device registers into the host address space. 264193b341dSSepherosa ZiehauThis should not happen. 265193b341dSSepherosa Ziehau.It "ath%d: could not map interrupt" 266193b341dSSepherosa ZiehauThe driver was unable to allocate an IRQ for the device interrupt. 267193b341dSSepherosa ZiehauThis should not happen. 268193b341dSSepherosa Ziehau.It "ath%d: could not establish interrupt" 269193b341dSSepherosa ZiehauThe driver was unable to install the device interrupt handler. 270193b341dSSepherosa ZiehauThis should not happen. 271193b341dSSepherosa Ziehau.El 272193b341dSSepherosa Ziehau.Sh SEE ALSO 273193b341dSSepherosa Ziehau.Xr ath_hal 4 , 27428b76601SSascha Wildner.Xr cardbus 4 , 2758985f72fSSascha Wildner.Xr ifmedia 4 , 27628b76601SSascha Wildner.Xr intro 4 , 277193b341dSSepherosa Ziehau.Xr wlan 4 , 27828b76601SSascha Wildner.Xr wlan_ccmp 4 , 27928b76601SSascha Wildner.Xr wlan_tkip 4 , 28028b76601SSascha Wildner.Xr wlan_wep 4 , 28128b76601SSascha Wildner.Xr wlan_xauth 4 , 2823effd507SSascha Wildner.Xr hostapd 8 , 283193b341dSSepherosa Ziehau.Xr ifconfig 8 , 284227a2aeeSSascha Wildner.Xr wpa_supplicant 8 285193b341dSSepherosa Ziehau.Sh HISTORY 286193b341dSSepherosa ZiehauThe 287193b341dSSepherosa Ziehau.Nm 288193b341dSSepherosa Ziehaudevice driver first appeared in 289193b341dSSepherosa Ziehau.Fx 5.2 290193b341dSSepherosa Ziehauand was imported into 291193b341dSSepherosa Ziehau.Dx 1.5 . 292193b341dSSepherosa Ziehau.Sh CAVEATS 293193b341dSSepherosa ZiehauRevision A1 of the D-LINK DWL-G520 and DWL-G650 are based on an 294193b341dSSepherosa ZiehauIntersil PrismGT chip and are not supported by this driver. 295193b341dSSepherosa Ziehau.Sh BUGS 29628b76601SSascha WildnerThe driver does not fully enable power-save operation of the chip 29728b76601SSascha Wildnerin station mode; consequently power use is suboptimal (e.g. on a laptop). 298193b341dSSepherosa Ziehau.Pp 2996307bddbSSascha WildnerThe AR5210 can only do WEP in hardware; consequently hardware assisted WEP 3006307bddbSSascha Wildneris disabled in order to allow software implementations of TKIP and CCMP to 3016307bddbSSascha Wildnerfunction. 3026307bddbSSascha WildnerHardware WEP can be re-enabled by modifying the driver. 303