1.\" $OpenBSD: ath.4,v 1.66 2019/03/29 07:07:05 jmc Exp $ 2.\" $NetBSD: ath.4,v 1.5 2004/07/03 16:58:18 mycroft Exp $ 3.\" 4.\" Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting 5.\" All rights reserved. 6.\"" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 1. Redistributions of source code must retain the above copyright 11.\" notice, this list of conditions and the following disclaimer, 12.\" without modification. 13.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer 14.\" similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any 15.\" redistribution must be conditioned upon including a substantially 16.\" similar Disclaimer requirement for further binary redistribution. 17.\" 3. Neither the names of the above-listed copyright holders nor the names 18.\" of any contributors may be used to endorse or promote products derived 19.\" from this software without specific prior written permission. 20.\" 21.\" NO WARRANTY 22.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24.\" LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY 25.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 26.\" THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, 27.\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 30.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32.\" THE POSSIBILITY OF SUCH DAMAGES. 33.\" 34.\" 35.\" Note: This man page was taken by Perry Metzger almost entirely 36.\" from the "ath" and "ath_hal" man pages in FreeBSD. I claim no 37.\" copyright because there was nearly no original work performed in 38.\" doing so. Maintainers should check the FreeBSD originals for 39.\" updates against the following two revisions and incorporate them 40.\" if needed: 41.\" 42.\" $FreeBSD: /repoman/r/ncvs/src/share/man/man4/ath.4,v 1.16 2004/02/18 08:30:08 maxim Exp $ 43.\" parts from $FreeBSD: /repoman/r/ncvs/src/share/man/man4/ath_hal.4,v 1.7 2004/01/07 20:49:51 blackend Exp $ 44.\" 45.Dd $Mdocdate: March 29 2019 $ 46.Dt ATH 4 47.Os 48.Sh NAME 49.Nm ath 50.Nd Atheros IEEE 802.11a/b/g wireless network device with GPIO 51.Sh SYNOPSIS 52.Cd "ath* at pci? dev ? function ?" 53.Cd "ath* at cardbus? dev ? function ?" 54.Cd "gpio* at ath?" 55.Sh DESCRIPTION 56The 57.Nm 58driver provides support for wireless network devices based on 59the Atheros AR5210, AR5211, and AR5212 chips. 60.Pp 61All host/device interaction is via DMA. 62The 63.Nm 64driver encapsulates all IP and ARP traffic as 802.11 frames, though 65it can receive either 802.11 or 802.3 frames. 66Transmit speed and operating mode is selectable and 67depends on the specific chipset. 68.Pp 69Support for the various devices is as follows: 70.Bl -tag -width "ARxxxx" 71.It AR5210 72These devices support 802.11a operation with transmit speeds 73of 6 Mbps, 9 Mbps, 12 Mbps, 18 Mbps, 24 Mbps, 36 Mbps, 48 Mbps, and 54 Mbps. 74.It AR5211 75These devices support 802.11a and 802.11b operation with 76transmit speeds as above for 802.11a and 771Mbps, 2Mbps, 5.5 Mbps, and 11Mbps for 802.11b operation. 78.It AR5212 79These devices support 802.11a, 802.11b, and 802.11g operation with 80transmit speeds as above for 802.11a, 802.11b, and 802.11g operation 81(802.11g speeds are the same as for 802.11a speeds). 82.El 83.Pp 84The actual transmit speed used is dependent on signal quality and the 85.Dq rate control 86algorithm employed by the driver. 87.Pp 88These are the modes the 89.Nm 90driver can operate in: 91.Bl -tag -width "IBSS-masterXX" 92.It BSS mode 93Also known as 94.Em infrastructure 95mode, this is used when associating with an access point, through 96which all traffic passes. 97This mode is the default. 98.It IBSS mode 99Also known as 100.Em IEEE ad-hoc 101mode or 102.Em peer-to-peer 103mode. 104This is the standardized method of operating without an access point. 105Stations associate with a service set. 106However, actual connections between stations are peer-to-peer. 107.It Host AP 108In this mode the adapter acts as an access point (base station) 109for other cards. 110.It monitor mode 111In this mode the driver is able to receive packets without 112associating with an access point. 113This disables the internal receive filter and enables the card to 114capture packets from networks which it wouldn't normally have access to, 115or to scan for access points. 116.El 117.Pp 118The 119.Nm 120driver can be configured to use 121Wired Equivalent Privacy (WEP) or 122Wi-Fi Protected Access (WPA-PSK and WPA2-PSK). 123WPA is the current encryption standard for wireless networks. 124It is strongly recommended that WEP 125not be used as the sole mechanism 126to secure wireless communication, 127due to serious weaknesses in it. 128.Pp 129AR5211 and AR5212 support the AES, TKIP, and Michael cryptographic 130operations required for WPA in hardware but at this time the driver 131does not support them. 132.Pp 133In BSS mode, 134the driver supports powersave mode, 135which can be enabled via 136.Xr ifconfig 8 . 137.Pp 138The 139.Nm 140driver can be configured at runtime with 141.Xr ifconfig 8 142or on boot with 143.Xr hostname.if 5 . 144.Sh HARDWARE 145Devices supported by the 146.Nm 147driver come in either CardBus or Mini PCI packages. 148Wireless cards in CardBus slots may be inserted and ejected on the fly. 149.Pp 150The following cards are among those supported by the 151.Nm 152driver: 153.Bl -column "Proxim Skyline 4030" "AR5212" "Mini PCI" "Standard" -offset 6n 154.It Em Card Ta Em Chip Ta Em Bus Ta Em Standard 155.It "3Com 3CRPAG175" Ta AR5212 Ta CardBus Ta a/b/g 156.\"It "Aztech WL830PC" Ta AR5212 Ta CardBus Ta b/g 157.It "Cisco AIR-CB21AG" Ta AR5212 Ta CardBus Ta a/b/g 158.It "D-Link DWL-A650" Ta AR5210 Ta CardBus Ta a 159.It "D-Link DWL-AB650" Ta AR5211 Ta CardBus Ta a/b 160.It "D-Link DWL-A520" Ta AR5210 Ta PCI Ta a 161.\"It "D-Link DWL-AG520" Ta AR5212 Ta PCI Ta a/b/g 162.\"It "D-Link DWL-AG650" Ta AR5212 Ta CardBus Ta a/b/g 163.\"It "D-Link DWL-G520" Ta AR5212 Ta PCI Ta b/g 164.\"It "D-Link DWL-G650B" Ta AR5212 Ta CardBus Ta b/g 165.\"It "Elecom LD-WL54AG" Ta AR5212 Ta CardBus Ta a/b/g 166.It "Elecom LD-WL54" Ta AR5211 Ta CardBus Ta a 167.\"It "Fujitsu E5454" Ta AR5212 Ta CardBus Ta a/b/g 168.\"It "Fujitsu FMV-JW481" Ta AR5212 Ta CardBus Ta a/b/g 169.\"It "Fujitsu E5454" Ta AR5212 Ta CardBus Ta a/b/g 170.\"It "HP NC4000" Ta AR5212 Ta PCI Ta a/b/g 171.It "IBM 11ABG WL LAN" Ta AR5212 Ta Mini PCI Ta a/b/g 172.\"It "I/O Data WN-AB" Ta AR5212 Ta CardBus Ta a/b 173.\"It "I/O Data WN-AG" Ta AR5212 Ta CardBus Ta a/b/g 174.\"It "I/O Data WN-A54" Ta AR5212 Ta CardBus Ta a 175.\"It "Linksys WMP55AG" Ta AR5212 Ta PCI Ta a/b/g 176.It "Linksys WPC51AB" Ta AR5211 Ta CardBus Ta a/b 177.\"It "Linksys WPC55AG" Ta AR5212 Ta CardBus Ta a/b/g 178.\"It "NEC PA-WL/54AG" Ta AR5212 Ta CardBus Ta a/b/g 179.\"It "Netgear WAG311" Ta AR5212 Ta PCI Ta a/b/g 180.It "Netgear WAB501" Ta AR5211 Ta CardBus Ta a/b 181.\"It "Netgear WAG511" Ta AR5212 Ta CardBus Ta a/b/g 182.\"It "Netgear WG311 rev1" Ta AR5212 Ta PCI Ta b/g 183.\"It "Netgear WG511T" Ta AR5212 Ta CardBus Ta b/g 184.\"It "Orinoco 8480" Ta AR5212 Ta CardBus Ta a/b/g 185.\"It "Orinoco 8470WD" Ta AR5212 Ta CardBus Ta a/b/g 186.It "Planet WL-3560" Ta AR5211 Ta CardBus Ta a/b/g 187.It "Proxim Skyline 4030" Ta AR5210 Ta CardBus Ta a 188.It "Proxim Skyline 4032" Ta AR5210 Ta PCI Ta a 189.\"It "Samsung SWL-5200N" Ta AR5212 Ta CardBus Ta a/b/g 190.It "Senao NL-5354MP" Ta AR5212 Ta Mini PCI Ta a/b/g 191.It "SMC SMC2735W" Ta AR5210 Ta CardBus Ta a 192.\"It "Sony PCWA-C700" Ta AR5212 Ta CardBus Ta a/b 193.\"It "Sony PCWA-C300S" Ta AR5212 Ta CardBus Ta b/g 194.It "Sony PCWA-C500" Ta AR5210 Ta CardBus Ta a 195.It "Wistron CM9" Ta AR5212 Ta Mini PCI Ta a/b/g 196.El 197.Sh EXAMPLES 198The following example scans for available networks: 199.Pp 200.Dl # ifconfig ath0 scan 201.Pp 202The following 203.Xr hostname.if 5 204example configures ath0 to join network 205.Dq mynwid , 206using WPA key 207.Dq mywpakey , 208obtaining an IP address using DHCP: 209.Bd -literal -offset indent 210nwid mynwid wpakey mywpakey 211dhcp 212.Ed 213.Pp 214The following 215.Xr hostname.if 5 216example creates a host-based access point on boot: 217.Bd -literal -offset indent 218mediaopt hostap 219nwid mynwid wpakey mywpakey 220inet 192.168.1.1 255.255.255.0 221.Ed 222.Sh DIAGNOSTICS 223.Bl -diag 224.It "ath0: unable to attach hardware; HAL status N" 225The Hardware Access Layer was unable to configure the hardware 226as requested. 227The status code is explained in the HAL include file 228.Pa sys/dev/ic/ar5xxx.h . 229.It "ath0: failed to allocate descriptors: N" 230The driver was unable to allocate contiguous memory for the transmit 231and receive descriptors. 232This usually indicates system memory is scarce and/or fragmented. 233.It "ath0: unable to setup a data xmit queue!" 234The request to the HAL to set up the transmit queue for normal 235data frames failed. 236This should not happen. 237.It "ath0: unable to setup a beacon xmit queue!" 238The request to the HAL to set up the transmit queue for 802.11 beacon frames 239failed. 240This should not happen. 241.It "ath0: hardware error; resetting" 242An unrecoverable error in the hardware occurred. 243Errors of this sort include unrecoverable DMA errors. 244The driver will reset the hardware and continue. 245.It "ath0: rx FIFO overrun; resetting" 246The receive FIFO in the hardware overflowed before the data could be 247transferred to the host. 248This typically occurs because the hardware ran short of receive 249descriptors and had no place to transfer received data. 250The driver will reset the hardware and continue. 251.It "ath0: unable to reset hardware; hal status N" 252The Hardware Access Layer was unable to reset the hardware 253as requested. 254The status code is explained in the HAL include file 255.Pa /sys/dev/ic/ar5xxx.h . 256This should not happen. 257.It "ath0: unable to initialize the key cache" 258The driver was unable to initialize the hardware key cache. 259This should not happen. 260.It "ath0: unable to start recv logic" 261The driver was unable to restart frame reception. 262This should not happen. 263.It "ath0: device timeout" 264A frame dispatched to the hardware for transmission did not complete in time. 265The driver will reset the hardware and continue. 266This should not happen. 267.It "ath0: bogus xmit rate 0xNNNN" 268An invalid transmit rate was specified for an outgoing frame. 269The frame is discarded. 270This should not happen. 271.It "ath0: ath_chan_set: unable to reset channel N (X MHz)" 272The Hardware Access Layer was unable to reset the hardware 273when switching channels during scanning. 274This should not happen. 275.It "ath0: unable to allocate channel table" 276The driver was unable to allocate memory for the table used to hold 277the set of available channels. 278.It "ath0: unable to collect channel list from hal" 279A problem occurred while querying the HAL to find the set of available 280channels for the device. 281This should not happen. 282.It "ath0: failed to enable memory mapping" 283The driver was unable to enable memory-mapped I/O to the PCI device registers. 284This should not happen. 285.It "ath0: failed to enable bus mastering" 286The driver was unable to enable the device as a PCI bus master for doing DMA. 287This should not happen. 288.It "ath0: cannot map register space" 289The driver was unable to map the device registers into the host address space. 290This should not happen. 291.It "ath0: could not map interrupt" 292The driver was unable to allocate an IRQ for the device interrupt. 293This should not happen. 294.It "ath0: could not establish interrupt" 295The driver was unable to install the device interrupt handler. 296This should not happen. 297.El 298.Sh SEE ALSO 299.Xr arp 4 , 300.Xr cardbus 4 , 301.Xr gpio 4 , 302.Xr ifmedia 4 , 303.Xr intro 4 , 304.Xr netintro 4 , 305.Xr pci 4 , 306.Xr hostname.if 5 , 307.Xr gpioctl 8 , 308.Xr hostapd 8 , 309.Xr ifconfig 8 310.Sh HISTORY 311The 312.Nm 313device driver first appeared in 314.Fx 5.2 315using a binary-only HAL module which was ported to 316.Nx 2.0 . 317The driver using a free HAL-replacement first appeared in 318.Ox 3.7 . 319.Sh AUTHORS 320.An -nosplit 321The 322.Nm 323driver was written by 324.An Sam Leffler , 325and was ported to 326.Ox 327by 328.An Reyk Floeter Aq Mt reyk@openbsd.org 329who also wrote a free replacement of the binary-only HAL. 330.Sh CAVEATS 331Different regulatory domains may not be able to communicate with each 332other with 802.11a as different regulatory domains do not necessarily 333have overlapping channels. 334.Pp 335Host AP mode doesn't support power saving. 336Clients attempting to use power saving mode may experience significant 337packet loss (disabling power saving on the client will fix this). 338.Sh BUGS 339Performance in lossy environments is suboptimal. 340The algorithm used to select the rate for transmitted packets is 341very simplistic. 342There is no software retransmit; only hardware retransmit is used. 343Contributors are encouraged to replace the existing rate control algorithm 344with a better one. 345.Pp 346The driver does not fully enable power-save operation of the chip; 347consequently power use is suboptimal. 348.Pp 349Operation in the 2GHz band is restricted to 11b mode because the driver 350does not support running the hardware in 11g mode. 351