1cf8faa80SSam Leffler.\"- 2014be7fbSSam Leffler.\" Copyright (c) 2002-2004 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.\"/ 34aa2fce50SSam Leffler.Dd September 5, 2005 35cf8faa80SSam Leffler.Dt ATH 4 36cf8faa80SSam Leffler.Os 37cf8faa80SSam Leffler.Sh NAME 38cf8faa80SSam Leffler.Nm ath 393c9bf41dSChristian Brueffer.Nd "Atheros IEEE 802.11 wireless network driver" 40cf8faa80SSam Leffler.Sh SYNOPSIS 4116d78bb8STom RhodesTo compile this driver into the kernel, 4216d78bb8STom Rhodesplace the following lines in your 4390296834STom Rhodeskernel configuration file: 4486e3186eSTom Rhodes.Bd -ragged -offset indent 45cf8faa80SSam Leffler.Cd "device ath" 4610626faeSHiten Pandya.Cd "device ath_hal" 47aa2fce50SSam Leffler.Cd "device ath_rate_sample" 4810626faeSHiten Pandya.Cd "device wlan" 4986e3186eSTom Rhodes.Ed 5086e3186eSTom Rhodes.Pp 5116d78bb8STom RhodesAlternatively, to load the driver as a 5216d78bb8STom Rhodesmodule at boot time, place the following line in 5386e3186eSTom Rhodes.Xr loader.conf 5 : 5486e3186eSTom Rhodes.Bd -literal -offset indent 5586e3186eSTom Rhodesif_ath_load="YES" 5686e3186eSTom Rhodes.Ed 57cf8faa80SSam Leffler.Sh DESCRIPTION 58cf8faa80SSam LefflerThe 59cf8faa80SSam Leffler.Nm 60cf8faa80SSam Lefflerdriver provides support for wireless network adapters based on 6178ad5421SRuslan Ermilovthe Atheros AR5210, AR5211, and AR5212 programming APIs. 6278ad5421SRuslan ErmilovThese APIs are used by a wide variety of chips; all chips with 63aa2fce50SSam Lefflera PCI and/or CardBus interface are supported. 64cf8faa80SSam LefflerChip-specific support is provided by the Atheros Hardware Access Layer 65cf8faa80SSam Leffler(HAL), that is packaged separately. 66cf8faa80SSam Leffler.Pp 67cf8faa80SSam LefflerSupported features include 802.11 and 802.3 frames, power management, BSS, 68cf8faa80SSam LefflerIBSS, and host-based access point operation modes. 69cf8faa80SSam LefflerAll host/device interaction is via DMA. 70cf8faa80SSam Leffler.Pp 71cf8faa80SSam LefflerThe 72cf8faa80SSam Leffler.Nm 73cf8faa80SSam Lefflerdriver encapsulates all IP and ARP traffic as 802.11 frames, however 74cf8faa80SSam Lefflerit can receive either 802.11 or 802.3 frames. 75cf8faa80SSam LefflerTransmit speed and operating mode is selectable 7691d89945SChristian Bruefferand depends on the specific chipset. 7759ddccc6SChristian BruefferAR5210-based devices support 802.11a operation with transmit speeds 78cf8faa80SSam Lefflerof 6 Mbps, 9 Mbps, 12 Mbps, 18 Mbps, 24 Mbps, 36 Mbps, 48 Mbps, and 54 Mbps. 79cf8faa80SSam LefflerAR5211-based devices support 802.11a and 802.11b operation with transmit 80cf8faa80SSam Lefflerspeeds as above for 802.11a operation and 81cf8faa80SSam Leffler1Mbps, 2Mbps, 5.5 Mbps and 11Mbps for 802.11b operation. 82cf8faa80SSam LefflerAR5212-based devices support 802.11a, 802.11b, and 802.11g operation 83cf8faa80SSam Lefflerwith transmit speeds appropriate to each. 84aa2fce50SSam LefflerMost chips also support an Atheros Turbo Mode (TM) that operates in 85014be7fbSSam Lefflerthe 5Ghz frequency range with 2x the transmit speeds. 86aa2fce50SSam LefflerSome chips also support Turbo mode in the 2.4Ghz range with 802.11g 87aa2fce50SSam Lefflerthough this support is not presently available due to regulatory requirements. 88aa2fce50SSam Leffler(Note that Turbo modes are, however, 89aa2fce50SSam Leffleronly interoperable with other Atheros-based devices.) 90cf8faa80SSam LefflerThe actual transmit speed used is dependent on signal quality and the 91702d4fc4SRuslan Ermilov.Dq "rate control" 92702d4fc4SRuslan Ermilovalgorithm employed by the driver. 93cf8faa80SSam LefflerAll chips support WEP encryption. 94014be7fbSSam LefflerThe AR5212 has hardware support for the AES-CCM, TKIP, and Michael cryptographic 95014be7fbSSam Leffleroperations required for WPA. 96cf8faa80SSam LefflerTo enable encryption, use 97cf8faa80SSam Leffler.Xr ifconfig 8 98cf8faa80SSam Leffleras shown below. 99cf8faa80SSam Leffler.Pp 100cf8faa80SSam LefflerBy default, the 101cf8faa80SSam Leffler.Nm 102cf8faa80SSam Lefflerdriver configures the card for BSS operation (aka infrastructure 103cf8faa80SSam Lefflermode). 104cf8faa80SSam LefflerThis mode requires the use of an access point (base station). 105cf8faa80SSam Leffler.Pp 106cf8faa80SSam LefflerThe 107cf8faa80SSam Leffler.Nm 108cf8faa80SSam Lefflerdriver also supports the standard IBSS point-to-point mode 109cf8faa80SSam Lefflerwhere stations can communicate amongst themselves without the 110cf8faa80SSam Leffleraid of an access point. 111cf8faa80SSam Leffler.Pp 112cf8faa80SSam LefflerThe driver may also be configured to operate in hostap mode. 113cf8faa80SSam LefflerIn this mode a host may function as an access point (base station). 114cf8faa80SSam LefflerAccess points are different than operating in IBSS mode. 115cf8faa80SSam LefflerThey operate in BSS mode. 1163c9bf41dSChristian BruefferThey allow for easier roaming and bridge all Ethernet traffic such 117cf8faa80SSam Lefflerthat machines connected via an access point appear to be on the local 1183c9bf41dSChristian BruefferEthernet segment. 119cf8faa80SSam Leffler.Pp 120cf8faa80SSam LefflerFor more information on configuring this device, see 121cf8faa80SSam Leffler.Xr ifconfig 8 . 122cf8faa80SSam Leffler.Pp 123cf8faa80SSam LefflerDevices supported by the 124cf8faa80SSam Leffler.Nm 125cf8faa80SSam Lefflerdriver come in either Cardbus or mini-PCI packages. 126cf8faa80SSam LefflerWireless cards in Cardbus slots may be inserted and ejected on the fly. 12771d4b49aSSimon L. B. Nielsen.Sh HARDWARE 128ab7350b7SGiorgos KeramidasA list of cards that are supported can be found at 1295eebbfd6SSam Leffler.Pa http://customerproducts.atheros.com/customerproducts . 130ab7350b7SGiorgos Keramidas.Pp 131ab7350b7SGiorgos KeramidasThe 132ab7350b7SGiorgos Keramidas.Nm 133ab7350b7SGiorgos Keramidasdriver supports all Atheros Cardbus or PCI cards, 134ab7350b7SGiorgos Keramidasexcept those that are based on the AR5005VL chipset. 135cf8faa80SSam Leffler.Sh EXAMPLES 136cf8faa80SSam LefflerJoin an existing BSS network (ie: connect to an access point): 137cf8faa80SSam Leffler.Pp 138cf8faa80SSam Leffler.Dl "ifconfig ath0 inet 192.168.0.20 netmask 0xffffff00" 139cf8faa80SSam Leffler.Pp 140cf8faa80SSam LefflerJoin a specific BSS network with network name 141cf8faa80SSam Leffler.Dq Li my_net : 142cf8faa80SSam Leffler.Pp 143cf8faa80SSam Leffler.Dl "ifconfig ath0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net" 144cf8faa80SSam Leffler.Pp 145cf8faa80SSam LefflerJoin a specific BSS network with WEP encryption: 146cf8faa80SSam Leffler.Bd -literal -offset indent 147cf8faa80SSam Lefflerifconfig ath0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net \e 148cf8faa80SSam Leffler wepmode on wepkey 0x8736639624 149cf8faa80SSam Leffler.Ed 150cf8faa80SSam Leffler.Pp 151cf8faa80SSam LefflerJoin/create an 802.11b IBSS network with network name 152cf8faa80SSam Leffler.Dq Li my_net : 153cf8faa80SSam Leffler.Bd -literal -offset indent 154cf8faa80SSam Lefflerifconfig ath0 inet 192.168.0.22 netmask 0xffffff00 ssid my_net \e 155cf8faa80SSam Leffler mode 11b mediaopt adhoc 156cf8faa80SSam Leffler.Ed 157cf8faa80SSam Leffler.Pp 158cf8faa80SSam LefflerCreate an 802.11g host-based access point: 159cf8faa80SSam Leffler.Bd -literal -offset indent 160cf8faa80SSam Lefflerifconfig ath0 inet 192.168.0.10 netmask 0xffffff00 ssid my_ap \e 161cf8faa80SSam Leffler mode 11g mediaopt hostap 162cf8faa80SSam Leffler.Ed 163cf8faa80SSam Leffler.Pp 164cf8faa80SSam LefflerCreate an 802.11a host-based access point with WEP enabled: 165cf8faa80SSam Leffler.Bd -literal -offset indent 166cf8faa80SSam Lefflerifconfig ath0 inet 192.168.0.10 netmask 0xffffff00 ssid my_ap \e 167cf8faa80SSam Leffler wepmode on wepkey 0x1234567890 mode 11a mediaopt hostap 168cf8faa80SSam Leffler.Ed 169cf8faa80SSam Leffler.Pp 170cf8faa80SSam LefflerCreate a host-based wireless bridge to fxp0: 171cf8faa80SSam Leffler.Bd -literal -offset indent 172cf8faa80SSam Lefflerifconfig ath0 inet up ssid my_ap media DS/11Mbps mediaopt hostap 17326d2edc7SMaxim Konovalovsysctl net.inet.ip.check_interface=0 174466cbb4bSMaxim Konovalovifconfig bridge0 create 17564e16bf0SMaxim Konovalovifconfig bridge0 addm ath0 addm fxp0 up 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 set up 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 set up 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. 222d562e82bSHideyuki KURASHINAThis should not happen. 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: failed to enable memory mapping" 239cf8faa80SSam LefflerThe driver was unable to enable memory-mapped I/O to the PCI device registers. 240cf8faa80SSam LefflerThis should not happen. 241cf8faa80SSam Leffler.It "ath%d: failed to enable bus mastering" 242cf8faa80SSam LefflerThe driver was unable to enable the device as a PCI bus master for doing DMA. 243cf8faa80SSam LefflerThis should not happen. 244cf8faa80SSam Leffler.It "ath%d: cannot map register space" 245cf8faa80SSam LefflerThe driver was unable to map the device registers into the host address space. 246cf8faa80SSam LefflerThis should not happen. 247cf8faa80SSam Leffler.It "ath%d: could not map interrupt" 248cf8faa80SSam LefflerThe driver was unable to allocate an IRQ for the device interrupt. 249cf8faa80SSam LefflerThis should not happen. 250cf8faa80SSam Leffler.It "ath%d: could not establish interrupt" 251cf8faa80SSam LefflerThe driver was unable to install the device interrupt handler. 252cf8faa80SSam LefflerThis should not happen. 253cf8faa80SSam Leffler.El 254cf8faa80SSam Leffler.Sh SEE ALSO 255cf8faa80SSam Leffler.Xr an 4 , 256cf8faa80SSam Leffler.Xr arp 4 , 257cf8faa80SSam Leffler.Xr ath_hal 4 , 258cf8faa80SSam Leffler.Xr card 4 , 259cf8faa80SSam Leffler.Xr netintro 4 , 260cf8faa80SSam Leffler.Xr pcic 4 , 261cf8faa80SSam Leffler.Xr wi 4 , 262cf8faa80SSam Leffler.Xr wlan 4 , 263cf8faa80SSam Leffler.Xr ifconfig 8 , 264cf8faa80SSam Leffler.Xr wicontrol 8 265cf8faa80SSam Leffler.Sh HISTORY 266cf8faa80SSam LefflerThe 267cf8faa80SSam Leffler.Nm 268cf8faa80SSam Lefflerdevice driver first appeared in 269cf8faa80SSam Leffler.Fx 5.2 . 270cf8faa80SSam Leffler.Sh CAVEATS 271cf8faa80SSam LefflerDifferent regulatory domains have different default channels for adhoc 272cf8faa80SSam Lefflermode. 273cf8faa80SSam LefflerSee 274cf8faa80SSam Leffler.Xr ifconfig 8 275cf8faa80SSam Lefflerfor information on how to change the channel. 276cf8faa80SSam LefflerSee 277cf8faa80SSam Leffler.Xr wicontrol 8 278cf8faa80SSam Lefflerfor information on different regulatory domains. 2797d43c8c9SWarner LoshDifferent regulatory domains may not be able to communicate with each 280c48524c2SMike Pritchardother with 802.11a as different regulatory domains do not necessarily 2817d43c8c9SWarner Loshhave overlapping channels. 282c6316a61SStefan Eßer.Pp 283c6316a61SStefan EßerRevision A1 of the D-LINK DWL-G520 and DWL-G650 are based on an 284c6316a61SStefan EßerIntersil PrismGT chip and are not supported by this driver. 285cf8faa80SSam Leffler.Sh BUGS 286cf8faa80SSam LefflerThere is no software retransmit; only hardware retransmit is used. 287cf8faa80SSam Leffler.Pp 288cf8faa80SSam LefflerThe driver does not fully enable power-save operation of the chip; 289cf8faa80SSam Lefflerconsequently power use is suboptimal. 290b91bb9a5SWarner Losh.Pp 291b91bb9a5SWarner LoshThe driver honors the regulatory domain programmed into the EEPROM of a 292b91bb9a5SWarner Loshdevice and does not support overriding this setting. 293b91bb9a5SWarner LoshThis is done to insure compliance with local regulatory agencies when 294b91bb9a5SWarner Loshoperating as an access point. 295b91bb9a5SWarner LoshUnfortunately this also means that devices purchased for use in one locale 296b91bb9a5SWarner Loshmay not be usable in another. 297b91bb9a5SWarner LoshChanges are planned to remove this restriction when operating in station mode. 298aa2fce50SSam Leffler.Pp 299aa2fce50SSam LefflerWPA is not supported for 5210 parts. 300aa2fce50SSam Leffler.Pp 301aa2fce50SSam LefflerAtheros' SuperG functionality is not supported. 302