1.\"- 2.\" Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 3.\" All rights reserved. 4.\"" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer, 10.\" without modification. 11.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer 12.\" similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any 13.\" redistribution must be conditioned upon including a substantially 14.\" similar Disclaimer requirement for further binary redistribution. 15.\" 16.\" NO WARRANTY 17.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19.\" LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY 20.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 21.\" THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, 22.\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27.\" THE POSSIBILITY OF SUCH DAMAGES. 28.\" 29.\" $FreeBSD$ 30.\"/ 31.Dd January 13, 2009 32.Dt ATH 4 33.Os 34.Sh NAME 35.Nm ath 36.Nd "Atheros IEEE 802.11 wireless network driver" 37.Sh SYNOPSIS 38To compile this driver into the kernel, 39place the following lines in your 40kernel configuration file: 41.Bd -ragged -offset indent 42.Cd "device ath" 43.Cd "device ath_hal" 44.Cd "options AH_SUPPORT_AR5416" 45.Cd "device ath_rate_sample" 46.Cd "device wlan" 47.Ed 48.Pp 49Alternatively, to load the driver as a 50module at boot time, place the following line in 51.Xr loader.conf 5 : 52.Bd -literal -offset indent 53if_ath_load="YES" 54.Ed 55.Sh DESCRIPTION 56The 57.Nm 58driver provides support for wireless network adapters based on 59the Atheros AR5210, AR5211, AR5212, and AR5416 programming APIs. 60These APIs are used by a wide variety of chips; most all chips with 61a PCI and/or CardBus interface are supported. 62Chip-specific support is provided by the Atheros Hardware Access Layer 63(HAL). 64.Pp 65Supported features include 802.11 and 802.3 frames, power management, BSS, 66IBSS, TDMA, and host-based access point operation modes. 67All host/device interaction is via DMA. 68.Pp 69The 70.Nm 71driver encapsulates all IP and ARP traffic as 802.11 frames, however 72it can receive either 802.11 or 802.3 frames. 73Transmit speed and operating mode is selectable 74and depends on the specific chipset. 75AR5210-based devices support 802.11a operation with transmit speeds 76of 6 Mbps, 9 Mbps, 12 Mbps, 18 Mbps, 24 Mbps, 36 Mbps, 48 Mbps, and 54 Mbps. 77AR5211-based devices support 802.11a and 802.11b operation with transmit 78speeds as above for 802.11a operation and 791Mbps, 2Mbps, 5.5 Mbps and 11Mbps for 802.11b operation. 80AR5212-based devices support 802.11a, 802.11b, and 802.11g operation 81with transmit speeds appropriate to each. 82AR5416-class devices are capable of 802.11n operation 83but are supported only in legacy modes (802.11a, 11b, 11g). 84Most chips also support an Atheros Turbo Mode (TM) that operates in 85the 5Ghz frequency range with 2x the transmit speeds. 86Some chips also support Turbo mode in the 2.4Ghz range with 802.11g 87though this support is not presently available due to regulatory requirements. 88(Note that Turbo modes are, however, 89only interoperable with other Atheros-based devices.) 90AR5212-based devices also support half- (10MHz) and quarter-width (5MHz) channels. 91The actual transmit speed used is dependent on signal quality and the 92.Dq "rate control" 93algorithm employed by the driver. 94All chips support WEP encryption. 95AR5212 and AR5416 parts have hardware support for the 96AES-CCM, TKIP, and Michael cryptographic 97operations required for WPA. 98To enable encryption, use 99.Xr ifconfig 8 100as shown below. 101.Pp 102The driver supports 103.Cm station , 104.Cm adhoc , 105.Cm adhoc-demo , 106.Cm hostap , 107.Cm wds , 108and 109.Cm monitor 110mode operation. 111Multiple 112.Cm hostap 113virtual interfaces may be configured for simultaneous 114use on cards that use a 5212 part. 115When multiple interfaces are configured each may have a separate 116mac address that is formed by setting the U/L bits in the mac 117address assigned to the underlying device. 118Any number of 119.Cm wds 120virtual interfaces may be configured together with 121.Cm hostap 122interfaces. 123Multiple 124.Cm station 125interfaces may be operated together with 126.Cm hostap 127interfaces to construct a wireless repeater device. 128The driver also support 129.Cm tdma 130operation when compiled with 131.Cd "options AH_SUPPORT_TDMA" 132(and the wlan module is build with 133.Cd "options IEEE80211_SUPPORT_TDMA" 134to enable the associated 802.11 support). 135For more information on configuring this device, see 136.Xr ifconfig 8 . 137.Pp 138Devices supported by the 139.Nm 140driver come in either Cardbus or mini-PCI packages. 141Wireless cards in Cardbus slots may be inserted and ejected on the fly. 142.Sh HARDWARE 143The 144.Nm 145driver supports most Atheros Cardbus or PCI cards, 146except those that are based on the AR5005VL chipset. 147More recent parts may require a hal that is not part of 148.Fb . 149.Pp 150A list of cards that are supported can be found at 151.Pa http://customerproducts.atheros.com/customerproducts/default.asp . 152.Sh EXAMPLES 153Join an existing BSS network (ie: connect to an access point): 154.Pp 155.Dl "ifconfig ath0 inet 192.168.0.20 netmask 0xffffff00" 156.Pp 157Join a specific BSS network with network name 158.Dq Li my_net : 159.Pp 160.Dl "ifconfig ath0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net" 161.Pp 162Join a specific BSS network with WEP encryption: 163.Bd -literal -offset indent 164ifconfig wlan0 create wlandev ath0 165ifconfig wlan0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net \e 166 wepmode on wepkey 0x8736639624 167.Ed 168.Pp 169Join/create an 802.11b IBSS network with network name 170.Dq Li my_net : 171.Bd -literal -offset indent 172ifconfig wlan0 create wlandev ath0 wlanmode adhoc 173ifconfig wlan0 inet 192.168.0.22 netmask 0xffffff00 ssid my_net \e 174 mode 11b 175.Ed 176.Pp 177Create an 802.11g host-based access point: 178.Bd -literal -offset indent 179ifconfig wlan0 create wlandev ath0 wlanmode hostap 180ifconfig wlan0 inet 192.168.0.10 netmask 0xffffff00 ssid my_ap \e 181 mode 11g 182.Ed 183.Pp 184Create two virtual 802.11a host-based access points, one with 185with WEP enabled and one with no security, and bridge them to 186the fxp0 (wired) device: 187.Bd -literal -offset indent 188ifconfig wlan0 create wlandev ath0 wlanmode hostap \e 189 ssid paying-customers wepmode on wepkey 0x1234567890 \e 190 mode 11a up 191ifconfig wlan1 create wlandev ath0 wlanmode hostap bssid \e 192 ssid freeloaders up 193ifconfig bridge0 create addm wlan0 addm wlan1 addm fxp0 up 194.Ed 195.Pp 196Create a master node in a two slot TDMA BSS configured to use 1972.5 millisecond slots. 198.Bd -literal -offset indent 199ifconfig wlan0 create wlandev ath0 wlanmode tdma \e 200 ssid tdma-test tmdaslot 0 tdmaslotlen 2500 \e 201 channel 36 up 202.Ed 203.Sh DIAGNOSTICS 204.Bl -diag 205.It "ath%d: unable to attach hardware; HAL status %u" 206The Atheros Hardware Access Layer was unable to configure the hardware 207as requested. 208The status code is explained in the HAL include file 209.Pa sys/contrib/dev/ath/ah.h . 210.It "ath%d: failed to allocate descriptors: %d" 211The driver was unable to allocate contiguous memory for the transmit 212and receive descriptors. 213This usually indicates system memory is scarce and/or fragmented. 214.It "ath%d: unable to setup a data xmit queue!" 215The request to the HAL to set up the transmit queue for normal 216data frames failed. 217This should not happen. 218.It "ath%d: unable to setup a beacon xmit queue!" 219The request to the HAL to set up the transmit queue for 802.11 beacon frames 220frames failed. 221This should not happen. 222.It "ath%d: 802.11 address: %s" 223The MAC address programmed in the EEPROM is displayed. 224.It "ath%d: hardware error; resetting" 225An unrecoverable error in the hardware occurred. 226Errors of this sort include unrecoverable DMA errors. 227The driver will reset the hardware and continue. 228.It "ath%d: rx FIFO overrun; resetting" 229The receive FIFO in the hardware overflowed before the data could be 230transferred to the host. 231This typically occurs because the hardware ran short of receive 232descriptors and had no place to transfer received data. 233The driver will reset the hardware and continue. 234.It "ath%d: unable to reset hardware; hal status %u" 235The Atheros Hardware Access Layer was unable to reset the hardware 236as requested. 237The status code is explained in the HAL include file 238.Pa sys/contrib/dev/ath/ah.h . 239This should not happen. 240.It "ath%d: unable to start recv logic" 241The driver was unable to restart frame reception. 242This should not happen. 243.It "ath%d: device timeout" 244A frame dispatched to the hardware for transmission did not complete in time. 245The driver will reset the hardware and continue. 246This should not happen. 247.It "ath%d: bogus xmit rate 0x%x" 248An invalid transmit rate was specified for an outgoing frame. 249The frame is discarded. 250This should not happen. 251.It "ath%d: ath_chan_set: unable to reset channel %u (%u Mhz)" 252The Atheros Hardware Access Layer was unable to reset the hardware 253when switching channels during scanning. 254This should not happen. 255.It "ath%d: unable to allocate channel table" 256The driver was unable to allocate memory for the table used to hold 257the set of available channels. 258.It "ath%d: unable to collect channel list from hal" 259A problem occurred while querying the HAL to find the set of available 260channels for the device. 261This should not happen. 262.It "ath%d: failed to enable memory mapping" 263The driver was unable to enable memory-mapped I/O to the PCI device registers. 264This should not happen. 265.It "ath%d: failed to enable bus mastering" 266The driver was unable to enable the device as a PCI bus master for doing DMA. 267This should not happen. 268.It "ath%d: cannot map register space" 269The driver was unable to map the device registers into the host address space. 270This should not happen. 271.It "ath%d: could not map interrupt" 272The driver was unable to allocate an IRQ for the device interrupt. 273This should not happen. 274.It "ath%d: could not establish interrupt" 275The driver was unable to install the device interrupt handler. 276This should not happen. 277.El 278.Sh SEE ALSO 279.Xr ath_hal 4 , 280.Xr intro 4 , 281.Xr cardbus 4 , 282.Xr pcic 4 , 283.Xr wlan 4 , 284.Xr wlan_ccmp 4 , 285.Xr wlan_tkip 4 , 286.Xr wlan_wep 4 , 287.Xr wlan_xauth 4 , 288.Xr hostapd 8 , 289.Xr ifconfig 8 , 290.Xr wpa_supplicant 8 . 291.Sh HISTORY 292The 293.Nm 294device driver first appeared in 295.Fx 5.2 . 296.Sh CAVEATS 297Different regulatory domains have different default channels for adhoc 298mode. 299See 300.Xr ifconfig 8 301for information on how to change the channel. 302Different regulatory domains may not be able to communicate with each 303other with 802.11a as different regulatory domains do not necessarily 304have overlapping channels. 305.Pp 306Revision A1 of the D-LINK DWL-G520 and DWL-G650 are based on an 307Intersil PrismGT chip and are not supported by this driver. 308.Sh BUGS 309There is no software retransmit; only hardware retransmit is used. 310.Pp 311The driver does not fully enable power-save operation of the chip 312in station mode; consequently power use is suboptimal (e.g. on a laptop). 313.Pp 314WPA is not supported for 5210 parts. 315