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