xref: /openbsd-src/share/man/man4/ath.4 (revision 50b7afb2c2c0993b0894d4e34bf857cb13ed9c80)
1.\"	$OpenBSD: ath.4,v 1.60 2014/02/15 20:28:19 tedu 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: February 15 2014 $
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
84All chips also support an Atheros Turbo Mode (TM) that operates in the
85802.11a frequency range with 2x the transmit speeds.
86(This mode is, however, only interoperable with other Atheros-based devices.)
87.Pp
88The actual transmit speed used is dependent on signal quality and the
89.Dq rate control
90algorithm employed by the driver.
91.Pp
92These are the modes the
93.Nm
94driver can operate in:
95.Bl -tag -width "IBSS-masterXX"
96.It BSS mode
97Also known as
98.Em infrastructure
99mode, this is used when associating with an access point, through
100which all traffic passes.
101This mode is the default.
102.It IBSS mode
103Also known as
104.Em IEEE ad-hoc
105mode or
106.Em peer-to-peer
107mode.
108This is the standardized method of operating without an access point.
109Stations associate with a service set.
110However, actual connections between stations are peer-to-peer.
111.It Host AP
112In this mode the adapter acts as an access point (base station)
113for other cards.
114.It monitor mode
115In this mode the driver is able to receive packets without
116associating with an access point.
117This disables the internal receive filter and enables the card to
118capture packets from networks which it wouldn't normally have access to,
119or to scan for access points.
120.El
121.Pp
122The
123.Nm
124driver can be configured to use
125Wired Equivalent Privacy (WEP) or
126Wi-Fi Protected Access (WPA-PSK and WPA2-PSK).
127WPA is the current encryption standard for wireless networks.
128It is strongly recommended that WEP
129not be used as the sole mechanism
130to secure wireless communication,
131due to serious weaknesses in it.
132.Pp
133AR5211 and AR5212 support the AES, TKIP, and Michael cryptographic
134operations required for WPA in hardware but at this time the driver
135does not support them.
136.Pp
137The
138.Nm
139driver can be configured at runtime with
140.Xr ifconfig 8
141or on boot with
142.Xr hostname.if 5 .
143.Sh HARDWARE
144Devices supported by the
145.Nm
146driver come in either CardBus or Mini PCI packages.
147Wireless cards in CardBus slots may be inserted and ejected on the fly.
148.Pp
149The following cards are among those supported by the
150.Nm
151driver:
152.Bl -column "Proxim Skyline 4030" "AR5212" "Mini PCI" "Standard" -offset 6n
153.It Em Card Ta Em Chip Ta Em Bus Ta Em Standard
154.It "3Com 3CRPAG175" Ta AR5212 Ta CardBus Ta a/b/g
155.\"It "Aztech WL830PC" Ta AR5212 Ta CardBus Ta b/g
156.It "Cisco AIR-CB21AG" Ta AR5212 Ta CardBus Ta a/b/g
157.It "D-Link DWL-A650" Ta AR5210 Ta CardBus Ta a
158.It "D-Link DWL-AB650" Ta AR5211 Ta CardBus Ta a/b
159.It "D-Link DWL-A520" Ta AR5210 Ta PCI Ta a
160.\"It "D-Link DWL-AG520" Ta AR5212 Ta PCI Ta a/b/g
161.\"It "D-Link DWL-AG650" Ta AR5212 Ta CardBus Ta a/b/g
162.\"It "D-Link DWL-G520" Ta AR5212 Ta PCI Ta b/g
163.\"It "D-Link DWL-G650B" Ta AR5212 Ta CardBus Ta b/g
164.\"It "Elecom LD-WL54AG" Ta AR5212 Ta CardBus Ta a/b/g
165.It "Elecom LD-WL54" Ta AR5211 Ta CardBus Ta a
166.\"It "Fujitsu E5454" Ta AR5212 Ta CardBus Ta a/b/g
167.\"It "Fujitsu FMV-JW481" Ta AR5212 Ta CardBus Ta a/b/g
168.\"It "Fujitsu E5454" Ta AR5212 Ta CardBus Ta a/b/g
169.\"It "HP NC4000" Ta AR5212 Ta PCI Ta a/b/g
170.It "IBM 11ABG WL LAN" Ta AR5212 Ta Mini PCI Ta a/b/g
171.\"It "I/O Data WN-AB" Ta AR5212 Ta CardBus Ta a/b
172.\"It "I/O Data WN-AG" Ta AR5212 Ta CardBus Ta a/b/g
173.\"It "I/O Data WN-A54" Ta AR5212 Ta CardBus Ta a
174.\"It "Linksys WMP55AG" Ta AR5212 Ta PCI Ta a/b/g
175.It "Linksys WPC51AB" Ta AR5211 Ta CardBus Ta a/b
176.\"It "Linksys WPC55AG" Ta AR5212 Ta CardBus Ta a/b/g
177.\"It "NEC PA-WL/54AG" Ta AR5212 Ta CardBus Ta a/b/g
178.\"It "Netgear WAG311" Ta AR5212 Ta PCI Ta a/b/g
179.It "Netgear WAB501" Ta AR5211 Ta CardBus Ta a/b
180.\"It "Netgear WAG511" Ta AR5212 Ta CardBus Ta a/b/g
181.\"It "Netgear WG311 rev1" Ta AR5212 Ta PCI Ta b/g
182.\"It "Netgear WG511T" Ta AR5212 Ta CardBus Ta b/g
183.\"It "Orinoco 8480" Ta AR5212 Ta CardBus Ta a/b/g
184.\"It "Orinoco 8470WD" Ta AR5212 Ta CardBus Ta a/b/g
185.It "Planet WL-3560" Ta AR5211 Ta CardBus Ta a/b/g
186.It "Proxim Skyline 4030" Ta AR5210 Ta CardBus Ta a
187.It "Proxim Skyline 4032" Ta AR5210 Ta PCI Ta a
188.\"It "Samsung SWL-5200N" Ta AR5212 Ta CardBus Ta a/b/g
189.It "Senao NL-5354MP" Ta AR5212 Ta Mini PCI Ta a/b/g
190.It "SMC SMC2735W" Ta AR5210 Ta CardBus Ta a
191.\"It "Sony PCWA-C700" Ta AR5212 Ta CardBus Ta a/b
192.\"It "Sony PCWA-C300S" Ta AR5212 Ta CardBus Ta b/g
193.It "Sony PCWA-C500" Ta AR5210 Ta CardBus Ta a
194.It "Wistron CM9" Ta AR5212 Ta Mini PCI Ta a/b/g
195.El
196.Sh EXAMPLES
197The following example scans for available networks:
198.Pp
199.Dl # ifconfig ath0 scan
200.Pp
201The following
202.Xr hostname.if 5
203example configures ath0 to join network
204.Dq mynwid ,
205using WPA key
206.Dq mywpakey ,
207obtaining an IP address using DHCP:
208.Bd -literal -offset indent
209nwid mynwid
210wpakey 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
218inet 192.168.1.1 255.255.255.0
219mediaopt hostap
220nwid mynwid
221wpakey mywpakey
222.Ed
223.Sh DIAGNOSTICS
224.Bl -diag
225.It "ath0: unable to attach hardware; HAL status N"
226The Hardware Access Layer was unable to configure the hardware
227as requested.
228The status code is explained in the HAL include file
229.Pa sys/dev/ic/ar5xxx.h .
230.It "ath0: failed to allocate descriptors: N"
231The driver was unable to allocate contiguous memory for the transmit
232and receive descriptors.
233This usually indicates system memory is scarce and/or fragmented.
234.It "ath0: unable to setup a data xmit queue!"
235The request to the HAL to set up the transmit queue for normal
236data frames failed.
237This should not happen.
238.It "ath0: unable to setup a beacon xmit queue!"
239The request to the HAL to set up the transmit queue for 802.11 beacon frames
240failed.
241This should not happen.
242.It "ath0: hardware error; resetting"
243An unrecoverable error in the hardware occurred.
244Errors of this sort include unrecoverable DMA errors.
245The driver will reset the hardware and continue.
246.It "ath0: rx FIFO overrun; resetting"
247The receive FIFO in the hardware overflowed before the data could be
248transferred to the host.
249This typically occurs because the hardware ran short of receive
250descriptors and had no place to transfer received data.
251The driver will reset the hardware and continue.
252.It "ath0: unable to reset hardware; hal status N"
253The Hardware Access Layer was unable to reset the hardware
254as requested.
255The status code is explained in the HAL include file
256.Pa /sys/dev/ic/ar5xxx.h .
257This should not happen.
258.It "ath0: unable to initialize the key cache"
259The driver was unable to initialize the hardware key cache.
260This should not happen.
261.It "ath0: unable to start recv logic"
262The driver was unable to restart frame reception.
263This should not happen.
264.It "ath0: device timeout"
265A frame dispatched to the hardware for transmission did not complete in time.
266The driver will reset the hardware and continue.
267This should not happen.
268.It "ath0: bogus xmit rate 0xNNNN"
269An invalid transmit rate was specified for an outgoing frame.
270The frame is discarded.
271This should not happen.
272.It "ath0: ath_chan_set: unable to reset channel N (X MHz)"
273The Hardware Access Layer was unable to reset the hardware
274when switching channels during scanning.
275This should not happen.
276.It "ath0: unable to allocate channel table"
277The driver was unable to allocate memory for the table used to hold
278the set of available channels.
279.It "ath0: unable to collect channel list from hal"
280A problem occurred while querying the HAL to find the set of available
281channels for the device.
282This should not happen.
283.It "ath0: failed to enable memory mapping"
284The driver was unable to enable memory-mapped I/O to the PCI device registers.
285This should not happen.
286.It "ath0: failed to enable bus mastering"
287The driver was unable to enable the device as a PCI bus master for doing DMA.
288This should not happen.
289.It "ath0: cannot map register space"
290The driver was unable to map the device registers into the host address space.
291This should not happen.
292.It "ath0: could not map interrupt"
293The driver was unable to allocate an IRQ for the device interrupt.
294This should not happen.
295.It "ath0: could not establish interrupt"
296The driver was unable to install the device interrupt handler.
297This should not happen.
298.El
299.Sh SEE ALSO
300.Xr arp 4 ,
301.Xr cardbus 4 ,
302.Xr gpio 4 ,
303.Xr ifmedia 4 ,
304.Xr intro 4 ,
305.Xr netintro 4 ,
306.Xr pci 4 ,
307.Xr hostname.if 5 ,
308.Xr gpioctl 8 ,
309.Xr hostapd 8 ,
310.Xr ifconfig 8
311.Sh HISTORY
312The
313.Nm
314device driver first appeared in
315.Fx 5.2
316using a binary-only HAL module which was ported to
317.Nx 2.0 .
318The driver using a free HAL-replacement first appeared in
319.Ox 3.7 .
320.Sh AUTHORS
321.An -nosplit
322The
323.Nm
324driver was written by
325.An Sam Leffler ,
326and was ported to
327.Ox
328by
329.An Reyk Floeter Aq Mt reyk@openbsd.org
330who also wrote a free replacement of the binary-only HAL.
331.Sh CAVEATS
332Different regulatory domains may not be able to communicate with each
333other with 802.11a as different regulatory domains do not necessarily
334have overlapping channels.
335.Pp
336Host AP mode doesn't support power saving.
337Clients attempting to use power saving mode may experience significant
338packet loss (disabling power saving on the client will fix this).
339.Sh BUGS
340Performance in lossy environments is suboptimal.
341The algorithm used to select the rate for transmitted packets is
342very simplistic.
343There is no software retransmit; only hardware retransmit is used.
344Contributors are encouraged to replace the existing rate control algorithm
345with a better one.
346.Pp
347The driver does not fully enable power-save operation of the chip;
348consequently power use is suboptimal.
349