xref: /openbsd-src/share/man/man4/ath.4 (revision 9f11ffb7133c203312a01e4b986886bc88c7d74b)
1.\"	$OpenBSD: ath.4,v 1.65 2018/07/15 10:44:49 phessler 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: July 15 2018 $
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 wpakey mywpakey
206dhcp
207.Ed
208.Pp
209The following
210.Xr hostname.if 5
211example creates a host-based access point on boot:
212.Bd -literal -offset indent
213mediaopt hostap
214nwid mynwid wpakey mywpakey
215inet 192.168.1.1 255.255.255.0
216.Ed
217.Sh DIAGNOSTICS
218.Bl -diag
219.It "ath0: unable to attach hardware; HAL status N"
220The Hardware Access Layer was unable to configure the hardware
221as requested.
222The status code is explained in the HAL include file
223.Pa sys/dev/ic/ar5xxx.h .
224.It "ath0: failed to allocate descriptors: N"
225The driver was unable to allocate contiguous memory for the transmit
226and receive descriptors.
227This usually indicates system memory is scarce and/or fragmented.
228.It "ath0: unable to setup a data xmit queue!"
229The request to the HAL to set up the transmit queue for normal
230data frames failed.
231This should not happen.
232.It "ath0: unable to setup a beacon xmit queue!"
233The request to the HAL to set up the transmit queue for 802.11 beacon frames
234failed.
235This should not happen.
236.It "ath0: hardware error; resetting"
237An unrecoverable error in the hardware occurred.
238Errors of this sort include unrecoverable DMA errors.
239The driver will reset the hardware and continue.
240.It "ath0: rx FIFO overrun; resetting"
241The receive FIFO in the hardware overflowed before the data could be
242transferred to the host.
243This typically occurs because the hardware ran short of receive
244descriptors and had no place to transfer received data.
245The driver will reset the hardware and continue.
246.It "ath0: unable to reset hardware; hal status N"
247The Hardware Access Layer was unable to reset the hardware
248as requested.
249The status code is explained in the HAL include file
250.Pa /sys/dev/ic/ar5xxx.h .
251This should not happen.
252.It "ath0: unable to initialize the key cache"
253The driver was unable to initialize the hardware key cache.
254This should not happen.
255.It "ath0: unable to start recv logic"
256The driver was unable to restart frame reception.
257This should not happen.
258.It "ath0: device timeout"
259A frame dispatched to the hardware for transmission did not complete in time.
260The driver will reset the hardware and continue.
261This should not happen.
262.It "ath0: bogus xmit rate 0xNNNN"
263An invalid transmit rate was specified for an outgoing frame.
264The frame is discarded.
265This should not happen.
266.It "ath0: ath_chan_set: unable to reset channel N (X MHz)"
267The Hardware Access Layer was unable to reset the hardware
268when switching channels during scanning.
269This should not happen.
270.It "ath0: unable to allocate channel table"
271The driver was unable to allocate memory for the table used to hold
272the set of available channels.
273.It "ath0: unable to collect channel list from hal"
274A problem occurred while querying the HAL to find the set of available
275channels for the device.
276This should not happen.
277.It "ath0: failed to enable memory mapping"
278The driver was unable to enable memory-mapped I/O to the PCI device registers.
279This should not happen.
280.It "ath0: failed to enable bus mastering"
281The driver was unable to enable the device as a PCI bus master for doing DMA.
282This should not happen.
283.It "ath0: cannot map register space"
284The driver was unable to map the device registers into the host address space.
285This should not happen.
286.It "ath0: could not map interrupt"
287The driver was unable to allocate an IRQ for the device interrupt.
288This should not happen.
289.It "ath0: could not establish interrupt"
290The driver was unable to install the device interrupt handler.
291This should not happen.
292.El
293.Sh SEE ALSO
294.Xr arp 4 ,
295.Xr cardbus 4 ,
296.Xr gpio 4 ,
297.Xr ifmedia 4 ,
298.Xr intro 4 ,
299.Xr netintro 4 ,
300.Xr pci 4 ,
301.Xr hostname.if 5 ,
302.Xr gpioctl 8 ,
303.Xr hostapd 8 ,
304.Xr ifconfig 8
305.Sh HISTORY
306The
307.Nm
308device driver first appeared in
309.Fx 5.2
310using a binary-only HAL module which was ported to
311.Nx 2.0 .
312The driver using a free HAL-replacement first appeared in
313.Ox 3.7 .
314.Sh AUTHORS
315.An -nosplit
316The
317.Nm
318driver was written by
319.An Sam Leffler ,
320and was ported to
321.Ox
322by
323.An Reyk Floeter Aq Mt reyk@openbsd.org
324who also wrote a free replacement of the binary-only HAL.
325.Sh CAVEATS
326Different regulatory domains may not be able to communicate with each
327other with 802.11a as different regulatory domains do not necessarily
328have overlapping channels.
329.Pp
330Host AP mode doesn't support power saving.
331Clients attempting to use power saving mode may experience significant
332packet loss (disabling power saving on the client will fix this).
333.Sh BUGS
334Performance in lossy environments is suboptimal.
335The algorithm used to select the rate for transmitted packets is
336very simplistic.
337There is no software retransmit; only hardware retransmit is used.
338Contributors are encouraged to replace the existing rate control algorithm
339with a better one.
340.Pp
341The driver does not fully enable power-save operation of the chip;
342consequently power use is suboptimal.
343.Pp
344Operation in the 2GHz band is restricted to 11b mode because the driver
345does not support running the hardware in 11g mode.
346