1cf8faa80SSam Leffler.\"- 2cf8faa80SSam Leffler.\" Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting 3cf8faa80SSam Leffler.\" All rights reserved. 4cf8faa80SSam Leffler.\"" 5cf8faa80SSam Leffler.\" Redistribution and use in source and binary forms, with or without 6cf8faa80SSam Leffler.\" modification, are permitted provided that the following conditions 7cf8faa80SSam Leffler.\" are met: 8cf8faa80SSam Leffler.\" 1. Redistributions of source code must retain the above copyright 9cf8faa80SSam Leffler.\" notice, this list of conditions and the following disclaimer, 10cf8faa80SSam Leffler.\" without modification. 11cf8faa80SSam Leffler.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer 12cf8faa80SSam Leffler.\" similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any 13cf8faa80SSam Leffler.\" redistribution must be conditioned upon including a substantially 14cf8faa80SSam Leffler.\" similar Disclaimer requirement for further binary redistribution. 15cf8faa80SSam Leffler.\" 3. Neither the names of the above-listed copyright holders nor the names 16cf8faa80SSam Leffler.\" of any contributors may be used to endorse or promote products derived 17cf8faa80SSam Leffler.\" from this software without specific prior written permission. 18cf8faa80SSam Leffler.\" 19cf8faa80SSam Leffler.\" NO WARRANTY 20cf8faa80SSam Leffler.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21cf8faa80SSam Leffler.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22cf8faa80SSam Leffler.\" LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY 23cf8faa80SSam Leffler.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 24cf8faa80SSam Leffler.\" THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, 25cf8faa80SSam Leffler.\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26cf8faa80SSam Leffler.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27cf8faa80SSam Leffler.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 28cf8faa80SSam Leffler.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29cf8faa80SSam Leffler.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30cf8faa80SSam Leffler.\" THE POSSIBILITY OF SUCH DAMAGES. 31cf8faa80SSam Leffler.\" 32cf8faa80SSam Leffler.\" $FreeBSD$ 33cf8faa80SSam Leffler.\"/ 34e2596b53SSam Leffler.Dd September 18, 2003 35cf8faa80SSam Leffler.Dt ATH 4 36cf8faa80SSam Leffler.Os 37cf8faa80SSam Leffler.Sh NAME 38cf8faa80SSam Leffler.Nm ath 39cf8faa80SSam Leffler.Nd "Atheros IEEE 802.11 driver" 40cf8faa80SSam Leffler.Sh SYNOPSIS 41cf8faa80SSam Leffler.Cd "device ath" 4210626faeSHiten Pandya.Cd "device ath_hal" 4310626faeSHiten Pandya.Cd "device wlan" 44cf8faa80SSam Leffler.Sh DESCRIPTION 45cf8faa80SSam LefflerThe 46cf8faa80SSam Leffler.Nm 47cf8faa80SSam Lefflerdriver provides support for wireless network adapters based on 48cf8faa80SSam Lefflerthe Atheros AR5210, AR5211, and AR5212 chips. 49cf8faa80SSam LefflerChip-specific support is provided by the Atheros Hardware Access Layer 50cf8faa80SSam Leffler(HAL), that is packaged separately. 51cf8faa80SSam Leffler.Pp 52cf8faa80SSam LefflerSupported features include 802.11 and 802.3 frames, power management, BSS, 53cf8faa80SSam LefflerIBSS, and host-based access point operation modes. 54cf8faa80SSam LefflerAll host/device interaction is via DMA. 55cf8faa80SSam Leffler.Pp 56cf8faa80SSam LefflerThe 57cf8faa80SSam Leffler.Nm 58cf8faa80SSam Lefflerdriver encapsulates all IP and ARP traffic as 802.11 frames, however 59cf8faa80SSam Lefflerit can receive either 802.11 or 802.3 frames. 60cf8faa80SSam LefflerTransmit speed and operating mode is selectable 61cf8faa80SSam Lefflerdepending on your hardware. 6259ddccc6SChristian BruefferAR5210-based devices support 802.11a operation with transmit speeds 63cf8faa80SSam Lefflerof 6 Mbps, 9 Mbps, 12 Mbps, 18 Mbps, 24 Mbps, 36 Mbps, 48 Mbps, and 54 Mbps. 64cf8faa80SSam LefflerAR5211-based devices support 802.11a and 802.11b operation with transmit 65cf8faa80SSam Lefflerspeeds as above for 802.11a operation and 66cf8faa80SSam Leffler1Mbps, 2Mbps, 5.5 Mbps and 11Mbps for 802.11b operation. 67cf8faa80SSam LefflerAR5212-based devices support 802.11a, 802.11b, and 802.11g operation 68cf8faa80SSam Lefflerwith transmit speeds appropriate to each. 69cf8faa80SSam LefflerAll chips also support an Atheros Turbo Mode (TM) that operates in the 802.11a frequency range with 2x the transmit speeds. 70cf8faa80SSam Leffler(This mode is, however, only interoperable with other Atheros-based devices.) 71cf8faa80SSam LefflerThe actual transmit speed used is dependent on signal quality and the 72cf8faa80SSam Leffler``rate control'' algorithm employed by the driver. 73cf8faa80SSam LefflerAll chips support WEP encryption. 74cf8faa80SSam LefflerAR5211 and AR5212 support the AES, TKIP, and Michael cryptographic 75087f17b8SSam Leffleroperations required for WPA but at this time the driver does not support them. 76cf8faa80SSam LefflerTo enable encryption, use 77cf8faa80SSam Leffler.Xr ifconfig 8 78cf8faa80SSam Leffleras shown below. 79cf8faa80SSam Leffler.Pp 80cf8faa80SSam LefflerBy default, the 81cf8faa80SSam Leffler.Nm 82cf8faa80SSam Lefflerdriver configures the card for BSS operation (aka infrastructure 83cf8faa80SSam Lefflermode). 84cf8faa80SSam LefflerThis mode requires the use of an access point (base station). 85cf8faa80SSam Leffler.Pp 86cf8faa80SSam LefflerThe 87cf8faa80SSam Leffler.Nm 88cf8faa80SSam Lefflerdriver also supports the standard IBSS point-to-point mode 89cf8faa80SSam Lefflerwhere stations can communicate amongst themselves without the 90cf8faa80SSam Leffleraid of an access point. 91cf8faa80SSam Leffler.Pp 92cf8faa80SSam LefflerThe driver may also be configured to operate in hostap mode. 93cf8faa80SSam LefflerIn this mode a host may function as an access point (base station). 94cf8faa80SSam LefflerAccess points are different than operating in IBSS mode. 95cf8faa80SSam LefflerThey operate in BSS mode. 96cf8faa80SSam LefflerThey allow for easier roaming and bridge all ethernet traffic such 97cf8faa80SSam Lefflerthat machines connected via an access point appear to be on the local 98cf8faa80SSam Lefflerethernet segment. 99cf8faa80SSam Leffler.Pp 100cf8faa80SSam LefflerFor more information on configuring this device, see 101cf8faa80SSam Leffler.Xr ifconfig 8 . 102cf8faa80SSam Leffler.Pp 103cf8faa80SSam LefflerDevices supported by the 104cf8faa80SSam Leffler.Nm 105cf8faa80SSam Lefflerdriver come in either Cardbus or mini-PCI packages. 106cf8faa80SSam LefflerWireless cards in Cardbus slots may be inserted and ejected on the fly. 107cf8faa80SSam Leffler.Pp 108cf8faa80SSam LefflerThe following cards are among those supported by the 109cf8faa80SSam Leffler.Nm 110cf8faa80SSam Lefflerdriver: 111cf8faa80SSam Leffler.Pp 112c6316a61SStefan Eßer.Bl -column -compact "D-Link DWL-AG650" "AR5212" "Cardbus" "a/b/g" 113c6316a61SStefan Eßer.Em "Card Chip Bus Standard" 114c6316a61SStefan EßerD-Link DWL-AB650 AR5211 CardBus a/b 115c6316a61SStefan EßerD-Link DWL-AG520 AR5212 PCI a/b/g 116c6316a61SStefan EßerD-Link DWL-AG650 AR5212 CardBus a/b/g 117c6316a61SStefan EßerD-Link DWL-G520B AR5212 PCI b/g 118c6316a61SStefan EßerD-Link DWL-G650B AR5212 CardBus b/g 119c6316a61SStefan EßerI/O Data WN-AG/CB AR5212 CardBus a/b/g 120c6316a61SStefan EßerLinksys WMP55AG AR5212 PCI a/b/g 121c6316a61SStefan EßerLinksys WPC51AB AR5211 CardBus a/b 122c6316a61SStefan EßerLinksys WPC55AG AR5212 CardBus a/b/g 123c6316a61SStefan EßerNEC PA-WL/54AG AR5212 CardBus a/b/g 124c6316a61SStefan EßerNetgear WAG311 AR5212 PCI a/b/g 125c6316a61SStefan EßerNetgear WAB501 AR5211 CardBus a/b 126c6316a61SStefan EßerNetgear WAG511 AR5212 CardBus a/b/g 127c6316a61SStefan EßerNetgear WG311 AR5212 PCI b/g 128c6316a61SStefan EßerNetgear WG511T AR5212 PCI b/g 129c6316a61SStefan EßerNortel 2201 AR5212 CardBus a/b 130c6316a61SStefan EßerOrinoco 8480 AR5212 CardBus a/b/g 131c6316a61SStefan EßerProxim Skyline 4030 AR5210 CardBus a 132c6316a61SStefan EßerProxim Skyline 4032 AR5210 PCI a 133cf8faa80SSam Leffler.El 134cf8faa80SSam Leffler.Sh EXAMPLES 135cf8faa80SSam LefflerJoin an existing BSS network (ie: connect to an access point): 136cf8faa80SSam Leffler.Pp 137cf8faa80SSam Leffler.Dl "ifconfig ath0 inet 192.168.0.20 netmask 0xffffff00" 138cf8faa80SSam Leffler.Pp 139cf8faa80SSam LefflerJoin a specific BSS network with network name 140cf8faa80SSam Leffler.Dq Li my_net : 141cf8faa80SSam Leffler.Pp 142cf8faa80SSam Leffler.Dl "ifconfig ath0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net" 143cf8faa80SSam Leffler.Pp 144cf8faa80SSam LefflerJoin a specific BSS network with WEP encryption: 145cf8faa80SSam Leffler.Bd -literal -offset indent 146cf8faa80SSam Lefflerifconfig ath0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net \e 147cf8faa80SSam Leffler wepmode on wepkey 0x8736639624 148cf8faa80SSam Leffler.Ed 149cf8faa80SSam Leffler.Pp 150cf8faa80SSam LefflerJoin/create an 802.11b IBSS network with network name 151cf8faa80SSam Leffler.Dq Li my_net : 152cf8faa80SSam Leffler.Bd -literal -offset indent 153cf8faa80SSam Lefflerifconfig ath0 inet 192.168.0.22 netmask 0xffffff00 ssid my_net \e 154cf8faa80SSam Leffler mode 11b mediaopt adhoc 155cf8faa80SSam Leffler.Ed 156cf8faa80SSam Leffler.Pp 157cf8faa80SSam LefflerCreate an 802.11g host-based access point: 158cf8faa80SSam Leffler.Bd -literal -offset indent 159cf8faa80SSam Lefflerifconfig ath0 inet 192.168.0.10 netmask 0xffffff00 ssid my_ap \e 160cf8faa80SSam Leffler mode 11g mediaopt hostap 161cf8faa80SSam Leffler.Ed 162cf8faa80SSam Leffler.Pp 163cf8faa80SSam LefflerCreate an 802.11a host-based access point with WEP enabled: 164cf8faa80SSam Leffler.Bd -literal -offset indent 165cf8faa80SSam Lefflerifconfig ath0 inet 192.168.0.10 netmask 0xffffff00 ssid my_ap \e 166cf8faa80SSam Leffler wepmode on wepkey 0x1234567890 mode 11a mediaopt hostap 167cf8faa80SSam Leffler.Ed 168cf8faa80SSam Leffler.Pp 169cf8faa80SSam LefflerCreate a host-based wireless bridge to fxp0: 170cf8faa80SSam Leffler.Bd -literal -offset indent 171cf8faa80SSam LefflerAdd BRIDGE to the kernel config. 172cf8faa80SSam Lefflerifconfig ath0 inet up ssid my_ap media DS/11Mbps mediaopt hostap 173cf8faa80SSam Lefflersysctl net.link.ether.bridge=1 174cf8faa80SSam Lefflersysctl net.link.ether.bridge_cfg="ath0 fxp0" 175cf8faa80SSam Lefflersysctl net.inet.ip.forwarding=1 176cf8faa80SSam Leffler.Ed 177cf8faa80SSam Leffler.Pp 178cf8faa80SSam LefflerThis will give you the same functionality as an access point. 179cf8faa80SSam Leffler.Sh DIAGNOSTICS 180cf8faa80SSam Leffler.Bl -diag 181cf8faa80SSam Leffler.It "ath%d: unable to attach hardware; HAL status %u" 182cf8faa80SSam LefflerThe Atheros Hardware Access Layer was unable to configure the hardware 183cf8faa80SSam Leffleras requested. 184cf8faa80SSam LefflerThe status code is explained in the HAL include file 185cf8faa80SSam Leffler.Pa sys/contrib/dev/ath/ah.h . 186cf8faa80SSam Leffler.It "ath%d: failed to allocate descriptors: %d" 187cf8faa80SSam LefflerThe driver was unable to allocate contiguous memory for the transmit 18859ddccc6SChristian Bruefferand receive descriptors. 189cf8faa80SSam LefflerThis usually indicates system memory is scarce and/or fragmented. 190cf8faa80SSam Leffler.It "ath%d: unable to setup a data xmit queue!" 191cf8faa80SSam LefflerThe request to the HAL to setup the transmit queue for normal 192cf8faa80SSam Lefflerdata frames failed. 193cf8faa80SSam LefflerThis should not happen. 194cf8faa80SSam Leffler.It "ath%d: unable to setup a beacon xmit queue!" 195cf8faa80SSam LefflerThe request to the HAL to setup the transmit queue for 802.11 beacon frames 196cf8faa80SSam Lefflerframes failed. 197cf8faa80SSam LefflerThis should not happen. 198cf8faa80SSam Leffler.It "ath%d: 802.11 address: %s" 199cf8faa80SSam LefflerThe MAC address programmed in the EEPROM is displayed. 200cf8faa80SSam Leffler.It "ath%d: hardware error; resetting" 201cf8faa80SSam LefflerAn unrecoverable error in the hardware occurred. 202cf8faa80SSam LefflerErrors of this sort include unrecoverable DMA errors. 203cf8faa80SSam LefflerThe driver will reset the hardware and continue. 204cf8faa80SSam Leffler.It "ath%d: rx FIFO overrun; resetting" 205cf8faa80SSam LefflerThe receive FIFO in the hardware overflowed before the data could be 206cf8faa80SSam Lefflertransferred to the host. 207cf8faa80SSam LefflerThis typically occurs because the hardware ran short of receive 208cf8faa80SSam Lefflerdescriptors and had no place to transfer received data. 209cf8faa80SSam LefflerThe driver will reset the hardware and continue. 210cf8faa80SSam Leffler.It "ath%d: unable to reset hardware; hal status %u" 211cf8faa80SSam LefflerThe Atheros Hardware Access Layer was unable to reset the hardware 212cf8faa80SSam Leffleras requested. 213cf8faa80SSam LefflerThe status code is explained in the HAL include file 214cf8faa80SSam Leffler.Pa sys/contrib/dev/ath/ah.h . 215cf8faa80SSam LefflerThis should not happen. 216cf8faa80SSam Leffler.It "ath%d: unable to start recv logic" 217cf8faa80SSam LefflerThe driver was unable to restart frame reception. 218cf8faa80SSam LefflerThis should not happen. 219cf8faa80SSam Leffler.It "ath%d: device timeout" 220cf8faa80SSam LefflerA frame dispatched to the hardware for transmission did not complete in time. 221cf8faa80SSam LefflerThe driver will reset the hardware and continue. 222cf8faa80SSam LefflerThis should not hapen. 223cf8faa80SSam Leffler.It "ath%d: bogus xmit rate 0x%x" 224cf8faa80SSam LefflerAn invalid transmit rate was specified for an outgoing frame. 225cf8faa80SSam LefflerThe frame is discarded. 226cf8faa80SSam LefflerThis should not happen. 227cf8faa80SSam Leffler.It "ath%d: ath_chan_set: unable to reset channel %u (%u Mhz)" 228cf8faa80SSam LefflerThe Atheros Hardware Access Layer was unable to reset the hardware 229cf8faa80SSam Lefflerwhen switching channels during scanning. 230cf8faa80SSam LefflerThis should not happen. 231cf8faa80SSam Leffler.It "ath%d: unable to allocate channel table" 232cf8faa80SSam LefflerThe driver was unable to allocate memory for the table used to hold 233cf8faa80SSam Lefflerthe set of available channels. 234cf8faa80SSam Leffler.It "ath%d: unable to collect channel list from hal" 235cf8faa80SSam LefflerA problem occurred while querying the HAL to find the set of available 236cf8faa80SSam Lefflerchannels for the device. 237cf8faa80SSam LefflerThis should not happen. 238cf8faa80SSam Leffler.It "ath%d: %s: %dM -> %dM (%d ok, %d err, %d retr)" 239cf8faa80SSam LefflerThe driver's rate control algorithm changed the current rate for transmitting 240cf8faa80SSam Lefflerframes. 241cf8faa80SSam LefflerThis message is temporarily enabled for normal use to help in diagnosing 242cf8faa80SSam Lefflerand improving the rate control algorithm. 243cf8faa80SSam LefflerThe message indicates the new and old transmit rates and the statistics 244cf8faa80SSam Lefflerit used to decide on this change. 245cf8faa80SSam Leffler.It "ath%d: failed to enable memory mapping" 246cf8faa80SSam LefflerThe driver was unable to enable memory-mapped I/O to the PCI device registers. 247cf8faa80SSam LefflerThis should not happen. 248cf8faa80SSam Leffler.It "ath%d: failed to enable bus mastering" 249cf8faa80SSam LefflerThe driver was unable to enable the device as a PCI bus master for doing DMA. 250cf8faa80SSam LefflerThis should not happen. 251cf8faa80SSam Leffler.It "ath%d: cannot map register space" 252cf8faa80SSam LefflerThe driver was unable to map the device registers into the host address space. 253cf8faa80SSam LefflerThis should not happen. 254cf8faa80SSam Leffler.It "ath%d: could not map interrupt" 255cf8faa80SSam LefflerThe driver was unable to allocate an IRQ for the device interrupt. 256cf8faa80SSam LefflerThis should not happen. 257cf8faa80SSam Leffler.It "ath%d: could not establish interrupt" 258cf8faa80SSam LefflerThe driver was unable to install the device interrupt handler. 259cf8faa80SSam LefflerThis should not happen. 260cf8faa80SSam Leffler.El 261cf8faa80SSam Leffler.Sh SEE ALSO 262cf8faa80SSam Leffler.Xr an 4 , 263cf8faa80SSam Leffler.Xr arp 4 , 264cf8faa80SSam Leffler.Xr ath_hal 4 , 265cf8faa80SSam Leffler.Xr card 4 , 266cf8faa80SSam Leffler.Xr netintro 4 , 267cf8faa80SSam Leffler.Xr pcic 4 , 268cf8faa80SSam Leffler.Xr wi 4 , 269cf8faa80SSam Leffler.Xr wlan 4 , 270cf8faa80SSam Leffler.Xr ifconfig 8 , 271cf8faa80SSam Leffler.Xr wicontrol 8 272cf8faa80SSam Leffler.Re 273cf8faa80SSam Leffler.Sh HISTORY 274cf8faa80SSam LefflerThe 275cf8faa80SSam Leffler.Nm 276cf8faa80SSam Lefflerdevice driver first appeared in 277cf8faa80SSam Leffler.Fx 5.2 . 278cf8faa80SSam Leffler.Sh CAVEATS 279cf8faa80SSam LefflerDifferent regulatory domains have different default channels for adhoc 280cf8faa80SSam Lefflermode. 281cf8faa80SSam LefflerSee 282cf8faa80SSam Leffler.Xr ifconfig 8 283cf8faa80SSam Lefflerfor information on how to change the channel. 284cf8faa80SSam LefflerSee 285cf8faa80SSam Leffler.Xr wicontrol 8 286cf8faa80SSam Lefflerfor information on different regulatory domains. 2877d43c8c9SWarner LoshDifferent regulatory domains may not be able to communicate with each 2887d43c8c9SWarner Loshother with 802.11a as different regualtory domains do not necessarily 2897d43c8c9SWarner Loshhave overlapping channels. 290c6316a61SStefan Eßer.Pp 291c6316a61SStefan EßerRevision A1 of the D-LINK DWL-G520 and DWL-G650 are based on an 292c6316a61SStefan EßerIntersil PrismGT chip and are not supported by this driver. 293cf8faa80SSam Leffler.Sh BUGS 294cf8faa80SSam Leffler.Pp 295cf8faa80SSam LefflerPerformance in lossy environments is suboptimal. 296cf8faa80SSam LefflerThe algorithm used to select the rate for transmitted packets is 297cf8faa80SSam Lefflervery simplistic. 298cf8faa80SSam LefflerThere is no software retransmit; only hardware retransmit is used. 299cf8faa80SSam LefflerContributors are encouraged to replace the existing rate control algorithm 300cf8faa80SSam Lefflerwith a better one (hint: all the information needed is availble to the driver). 301cf8faa80SSam Leffler.Pp 302cf8faa80SSam LefflerGeneral performance is suboptimal. 303cf8faa80SSam LefflerThe Atheros hardware is known to be capable of transfer rates of 23-34 Mb/s 304cf8faa80SSam Leffler(or more) in 11a and 11g modes using their NDIS (aka Windows) driver. 305cf8faa80SSam LefflerResults with this driver are mixed and seem to vary significantly. 306cf8faa80SSam Leffler.Pp 307cf8faa80SSam LefflerThe driver does not fully enable power-save operation of the chip; 308cf8faa80SSam Lefflerconsequently power use is suboptimal. 309