xref: /openbsd/share/man/man4/ath.4 (revision fc61954a)
1.\"	$OpenBSD: ath.4,v 1.64 2016/04/05 15:12:11 mestre 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: April 5 2016 $
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
133The
134.Nm
135driver can be configured at runtime with
136.Xr ifconfig 8
137or on boot with
138.Xr hostname.if 5 .
139.Sh HARDWARE
140Devices supported by the
141.Nm
142driver come in either CardBus or Mini PCI packages.
143Wireless cards in CardBus slots may be inserted and ejected on the fly.
144.Pp
145The following cards are among those supported by the
146.Nm
147driver:
148.Bl -column "Proxim Skyline 4030" "AR5212" "Mini PCI" "Standard" -offset 6n
149.It Em Card Ta Em Chip Ta Em Bus Ta Em Standard
150.It "3Com 3CRPAG175" Ta AR5212 Ta CardBus Ta a/b/g
151.\"It "Aztech WL830PC" Ta AR5212 Ta CardBus Ta b/g
152.It "Cisco AIR-CB21AG" Ta AR5212 Ta CardBus Ta a/b/g
153.It "D-Link DWL-A650" Ta AR5210 Ta CardBus Ta a
154.It "D-Link DWL-AB650" Ta AR5211 Ta CardBus Ta a/b
155.It "D-Link DWL-A520" Ta AR5210 Ta PCI Ta a
156.\"It "D-Link DWL-AG520" Ta AR5212 Ta PCI Ta a/b/g
157.\"It "D-Link DWL-AG650" Ta AR5212 Ta CardBus Ta a/b/g
158.\"It "D-Link DWL-G520" Ta AR5212 Ta PCI Ta b/g
159.\"It "D-Link DWL-G650B" Ta AR5212 Ta CardBus Ta b/g
160.\"It "Elecom LD-WL54AG" Ta AR5212 Ta CardBus Ta a/b/g
161.It "Elecom LD-WL54" Ta AR5211 Ta CardBus Ta a
162.\"It "Fujitsu E5454" Ta AR5212 Ta CardBus Ta a/b/g
163.\"It "Fujitsu FMV-JW481" Ta AR5212 Ta CardBus Ta a/b/g
164.\"It "Fujitsu E5454" Ta AR5212 Ta CardBus Ta a/b/g
165.\"It "HP NC4000" Ta AR5212 Ta PCI Ta a/b/g
166.It "IBM 11ABG WL LAN" Ta AR5212 Ta Mini PCI Ta a/b/g
167.\"It "I/O Data WN-AB" Ta AR5212 Ta CardBus Ta a/b
168.\"It "I/O Data WN-AG" Ta AR5212 Ta CardBus Ta a/b/g
169.\"It "I/O Data WN-A54" Ta AR5212 Ta CardBus Ta a
170.\"It "Linksys WMP55AG" Ta AR5212 Ta PCI Ta a/b/g
171.It "Linksys WPC51AB" Ta AR5211 Ta CardBus Ta a/b
172.\"It "Linksys WPC55AG" Ta AR5212 Ta CardBus Ta a/b/g
173.\"It "NEC PA-WL/54AG" Ta AR5212 Ta CardBus Ta a/b/g
174.\"It "Netgear WAG311" Ta AR5212 Ta PCI Ta a/b/g
175.It "Netgear WAB501" Ta AR5211 Ta CardBus Ta a/b
176.\"It "Netgear WAG511" Ta AR5212 Ta CardBus Ta a/b/g
177.\"It "Netgear WG311 rev1" Ta AR5212 Ta PCI Ta b/g
178.\"It "Netgear WG511T" Ta AR5212 Ta CardBus Ta b/g
179.\"It "Orinoco 8480" Ta AR5212 Ta CardBus Ta a/b/g
180.\"It "Orinoco 8470WD" Ta AR5212 Ta CardBus Ta a/b/g
181.It "Planet WL-3560" Ta AR5211 Ta CardBus Ta a/b/g
182.It "Proxim Skyline 4030" Ta AR5210 Ta CardBus Ta a
183.It "Proxim Skyline 4032" Ta AR5210 Ta PCI Ta a
184.\"It "Samsung SWL-5200N" Ta AR5212 Ta CardBus Ta a/b/g
185.It "Senao NL-5354MP" Ta AR5212 Ta Mini PCI Ta a/b/g
186.It "SMC SMC2735W" Ta AR5210 Ta CardBus Ta a
187.\"It "Sony PCWA-C700" Ta AR5212 Ta CardBus Ta a/b
188.\"It "Sony PCWA-C300S" Ta AR5212 Ta CardBus Ta b/g
189.It "Sony PCWA-C500" Ta AR5210 Ta CardBus Ta a
190.It "Wistron CM9" Ta AR5212 Ta Mini PCI Ta a/b/g
191.El
192.Sh EXAMPLES
193The following example scans for available networks:
194.Pp
195.Dl # ifconfig ath0 scan
196.Pp
197The following
198.Xr hostname.if 5
199example configures ath0 to join network
200.Dq mynwid ,
201using WPA key
202.Dq mywpakey ,
203obtaining an IP address using DHCP:
204.Bd -literal -offset indent
205nwid mynwid
206wpakey mywpakey
207dhcp
208.Ed
209.Pp
210The following
211.Xr hostname.if 5
212example creates a host-based access point on boot:
213.Bd -literal -offset indent
214mediaopt hostap
215nwid mynwid
216wpakey mywpakey
217inet 192.168.1.1 255.255.255.0
218.Ed
219.Sh DIAGNOSTICS
220.Bl -diag
221.It "ath0: unable to attach hardware; HAL status N"
222The Hardware Access Layer was unable to configure the hardware
223as requested.
224The status code is explained in the HAL include file
225.Pa sys/dev/ic/ar5xxx.h .
226.It "ath0: failed to allocate descriptors: N"
227The driver was unable to allocate contiguous memory for the transmit
228and receive descriptors.
229This usually indicates system memory is scarce and/or fragmented.
230.It "ath0: unable to setup a data xmit queue!"
231The request to the HAL to set up the transmit queue for normal
232data frames failed.
233This should not happen.
234.It "ath0: unable to setup a beacon xmit queue!"
235The request to the HAL to set up the transmit queue for 802.11 beacon frames
236failed.
237This should not happen.
238.It "ath0: hardware error; resetting"
239An unrecoverable error in the hardware occurred.
240Errors of this sort include unrecoverable DMA errors.
241The driver will reset the hardware and continue.
242.It "ath0: rx FIFO overrun; resetting"
243The receive FIFO in the hardware overflowed before the data could be
244transferred to the host.
245This typically occurs because the hardware ran short of receive
246descriptors and had no place to transfer received data.
247The driver will reset the hardware and continue.
248.It "ath0: unable to reset hardware; hal status N"
249The Hardware Access Layer was unable to reset the hardware
250as requested.
251The status code is explained in the HAL include file
252.Pa /sys/dev/ic/ar5xxx.h .
253This should not happen.
254.It "ath0: unable to initialize the key cache"
255The driver was unable to initialize the hardware key cache.
256This should not happen.
257.It "ath0: unable to start recv logic"
258The driver was unable to restart frame reception.
259This should not happen.
260.It "ath0: device timeout"
261A frame dispatched to the hardware for transmission did not complete in time.
262The driver will reset the hardware and continue.
263This should not happen.
264.It "ath0: bogus xmit rate 0xNNNN"
265An invalid transmit rate was specified for an outgoing frame.
266The frame is discarded.
267This should not happen.
268.It "ath0: ath_chan_set: unable to reset channel N (X MHz)"
269The Hardware Access Layer was unable to reset the hardware
270when switching channels during scanning.
271This should not happen.
272.It "ath0: unable to allocate channel table"
273The driver was unable to allocate memory for the table used to hold
274the set of available channels.
275.It "ath0: unable to collect channel list from hal"
276A problem occurred while querying the HAL to find the set of available
277channels for the device.
278This should not happen.
279.It "ath0: failed to enable memory mapping"
280The driver was unable to enable memory-mapped I/O to the PCI device registers.
281This should not happen.
282.It "ath0: failed to enable bus mastering"
283The driver was unable to enable the device as a PCI bus master for doing DMA.
284This should not happen.
285.It "ath0: cannot map register space"
286The driver was unable to map the device registers into the host address space.
287This should not happen.
288.It "ath0: could not map interrupt"
289The driver was unable to allocate an IRQ for the device interrupt.
290This should not happen.
291.It "ath0: could not establish interrupt"
292The driver was unable to install the device interrupt handler.
293This should not happen.
294.El
295.Sh SEE ALSO
296.Xr arp 4 ,
297.Xr cardbus 4 ,
298.Xr gpio 4 ,
299.Xr ifmedia 4 ,
300.Xr intro 4 ,
301.Xr netintro 4 ,
302.Xr pci 4 ,
303.Xr hostname.if 5 ,
304.Xr gpioctl 8 ,
305.Xr hostapd 8 ,
306.Xr ifconfig 8
307.Sh HISTORY
308The
309.Nm
310device driver first appeared in
311.Fx 5.2
312using a binary-only HAL module which was ported to
313.Nx 2.0 .
314The driver using a free HAL-replacement first appeared in
315.Ox 3.7 .
316.Sh AUTHORS
317.An -nosplit
318The
319.Nm
320driver was written by
321.An Sam Leffler ,
322and was ported to
323.Ox
324by
325.An Reyk Floeter Aq Mt reyk@openbsd.org
326who also wrote a free replacement of the binary-only HAL.
327.Sh CAVEATS
328Different regulatory domains may not be able to communicate with each
329other with 802.11a as different regulatory domains do not necessarily
330have overlapping channels.
331.Pp
332Host AP mode doesn't support power saving.
333Clients attempting to use power saving mode may experience significant
334packet loss (disabling power saving on the client will fix this).
335.Sh BUGS
336Performance in lossy environments is suboptimal.
337The algorithm used to select the rate for transmitted packets is
338very simplistic.
339There is no software retransmit; only hardware retransmit is used.
340Contributors are encouraged to replace the existing rate control algorithm
341with a better one.
342.Pp
343The driver does not fully enable power-save operation of the chip;
344consequently power use is suboptimal.
345.Pp
346Operation in the 2GHz band is restricted to 11b mode because the driver
347does not support running the hardware in 11g mode.
348