xref: /freebsd/share/man/man4/ath.4 (revision c4f02a891fe62fe1277c89859922804ea2c27bcd)
1.\"-
2.\" Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
3.\" All rights reserved.
4.\""
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer,
10.\"    without modification.
11.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
12.\"    similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
13.\"    redistribution must be conditioned upon including a substantially
14.\"    similar Disclaimer requirement for further binary redistribution.
15.\" 3. Neither the names of the above-listed copyright holders nor the names
16.\"    of any contributors may be used to endorse or promote products derived
17.\"    from this software without specific prior written permission.
18.\"
19.\" NO WARRANTY
20.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22.\" LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
23.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
24.\" THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
25.\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
28.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30.\" THE POSSIBILITY OF SUCH DAMAGES.
31.\"
32.\" $FreeBSD$
33.\"/
34.Dd September 18, 2003
35.Dt ATH 4
36.Os
37.Sh NAME
38.Nm ath
39.Nd "Atheros IEEE 802.11 driver"
40.Sh SYNOPSIS
41.Cd "device ath"
42.Cd "device ath_hal"
43.Cd "device wlan"
44.Sh DESCRIPTION
45The
46.Nm
47driver provides support for wireless network adapters based on
48the Atheros AR5210, AR5211, and AR5212 chips.
49Chip-specific support is provided by the Atheros Hardware Access Layer
50(HAL), that is packaged separately.
51.Pp
52Supported features include 802.11 and 802.3 frames, power management, BSS,
53IBSS, and host-based access point operation modes.
54All host/device interaction is via DMA.
55.Pp
56The
57.Nm
58driver encapsulates all IP and ARP traffic as 802.11 frames, however
59it can receive either 802.11 or 802.3 frames.
60Transmit speed and operating mode is selectable
61depending on your hardware.
62AR5210-based devices support 802.11a operation with transmit speeds
63of 6 Mbps, 9 Mbps, 12 Mbps, 18 Mbps, 24 Mbps, 36 Mbps, 48 Mbps, and 54 Mbps.
64AR5211-based devices support 802.11a and 802.11b operation with transmit
65speeds as above for 802.11a operation and
661Mbps, 2Mbps, 5.5 Mbps and 11Mbps for 802.11b operation.
67AR5212-based devices support 802.11a, 802.11b, and 802.11g operation
68with transmit speeds appropriate to each.
69All chips also support an Atheros Turbo Mode (TM) that operates in the 802.11a frequency range with 2x the transmit speeds.
70(This mode is, however, only interoperable with other Atheros-based devices.)
71The actual transmit speed used is dependent on signal quality and the
72``rate control'' algorithm employed by the driver.
73All chips support WEP encryption.
74AR5211 and AR5212 support the AES, TKIP, and Michael cryptographic
75operations required for WPA but at this time the driver does not support them.
76To enable encryption, use
77.Xr ifconfig 8
78as shown below.
79.Pp
80By default, the
81.Nm
82driver configures the card for BSS operation (aka infrastructure
83mode).
84This mode requires the use of an access point (base station).
85.Pp
86The
87.Nm
88driver also supports the standard IBSS point-to-point mode
89where stations can communicate amongst themselves without the
90aid of an access point.
91.Pp
92The driver may also be configured to operate in hostap mode.
93In this mode a host may function as an access point (base station).
94Access points are different than operating in IBSS mode.
95They operate in BSS mode.
96They allow for easier roaming and bridge all ethernet traffic such
97that machines connected via an access point appear to be on the local
98ethernet segment.
99.Pp
100For more information on configuring this device, see
101.Xr ifconfig 8 .
102.Pp
103Devices supported by the
104.Nm
105driver come in either Cardbus or mini-PCI packages.
106Wireless cards in Cardbus slots may be inserted and ejected on the fly.
107.Pp
108The following cards are among those supported by the
109.Nm
110driver:
111.Pp
112.Bl -column -compact "D-Link DWL-AG650" "AR5212" "Cardbus" "a/b/g"
113.Em "Card	Chip	Bus	Standard"
114D-Link DWL-AB650	AR5211	CardBus	a/b
115D-Link DWL-AG520	AR5212	PCI	a/b/g
116D-Link DWL-AG650	AR5212	CardBus	a/b/g
117D-Link DWL-G520B	AR5212	PCI	b/g
118D-Link DWL-G650B	AR5212	CardBus	b/g
119I/O Data WN-AG/CB	AR5212	CardBus	a/b/g
120Linksys WMP55AG	AR5212	PCI	a/b/g
121Linksys WPC51AB	AR5211	CardBus	a/b
122Linksys WPC55AG	AR5212	CardBus	a/b/g
123NEC PA-WL/54AG	AR5212	CardBus	a/b/g
124Netgear WAG311	AR5212	PCI	a/b/g
125Netgear WAB501	AR5211	CardBus	a/b
126Netgear WAG511	AR5212	CardBus	a/b/g
127Netgear WG311	AR5212	PCI	b/g
128Netgear WG511T	AR5212	PCI	b/g
129Nortel 2201	AR5212	CardBus	a/b
130Orinoco 8480	AR5212	CardBus	a/b/g
131Proxim Skyline 4030	AR5210	CardBus	a
132Proxim Skyline 4032	AR5210	PCI	a
133.El
134.Sh EXAMPLES
135Join an existing BSS network (ie: connect to an access point):
136.Pp
137.Dl "ifconfig ath0 inet 192.168.0.20 netmask 0xffffff00"
138.Pp
139Join a specific BSS network with network name
140.Dq Li my_net :
141.Pp
142.Dl "ifconfig ath0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net"
143.Pp
144Join a specific BSS network with WEP encryption:
145.Bd -literal -offset indent
146ifconfig ath0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net \e
147	wepmode on wepkey 0x8736639624
148.Ed
149.Pp
150Join/create an 802.11b IBSS network with network name
151.Dq Li my_net :
152.Bd -literal -offset indent
153ifconfig ath0 inet 192.168.0.22 netmask 0xffffff00 ssid my_net \e
154	mode 11b mediaopt adhoc
155.Ed
156.Pp
157Create an 802.11g host-based access point:
158.Bd -literal -offset indent
159ifconfig ath0 inet 192.168.0.10 netmask 0xffffff00 ssid my_ap \e
160	mode 11g mediaopt hostap
161.Ed
162.Pp
163Create an 802.11a host-based access point with WEP enabled:
164.Bd -literal -offset indent
165ifconfig ath0 inet 192.168.0.10 netmask 0xffffff00 ssid my_ap \e
166	wepmode on wepkey 0x1234567890 mode 11a mediaopt hostap
167.Ed
168.Pp
169Create a host-based wireless bridge to fxp0:
170.Bd -literal -offset indent
171Add BRIDGE to the kernel config.
172ifconfig ath0 inet up ssid my_ap media DS/11Mbps mediaopt hostap
173sysctl net.link.ether.bridge.enable=1
174sysctl net.link.ether.bridge.config="ath0 fxp0"
175sysctl net.inet.ip.forwarding=1
176.Ed
177.Pp
178This will give you the same functionality as an access point.
179.Sh DIAGNOSTICS
180.Bl -diag
181.It "ath%d: unable to attach hardware; HAL status %u"
182The Atheros Hardware Access Layer was unable to configure the hardware
183as requested.
184The status code is explained in the HAL include file
185.Pa sys/contrib/dev/ath/ah.h .
186.It "ath%d: failed to allocate descriptors: %d"
187The driver was unable to allocate contiguous memory for the transmit
188and receive descriptors.
189This usually indicates system memory is scarce and/or fragmented.
190.It "ath%d: unable to setup a data xmit queue!"
191The request to the HAL to setup the transmit queue for normal
192data frames failed.
193This should not happen.
194.It "ath%d: unable to setup a beacon xmit queue!"
195The request to the HAL to setup the transmit queue for 802.11 beacon frames
196frames failed.
197This should not happen.
198.It "ath%d: 802.11 address: %s"
199The MAC address programmed in the EEPROM is displayed.
200.It "ath%d: hardware error; resetting"
201An unrecoverable error in the hardware occurred.
202Errors of this sort include unrecoverable DMA errors.
203The driver will reset the hardware and continue.
204.It "ath%d: rx FIFO overrun; resetting"
205The receive FIFO in the hardware overflowed before the data could be
206transferred to the host.
207This typically occurs because the hardware ran short of receive
208descriptors and had no place to transfer received data.
209The driver will reset the hardware and continue.
210.It "ath%d: unable to reset hardware; hal status %u"
211The Atheros Hardware Access Layer was unable to reset the hardware
212as requested.
213The status code is explained in the HAL include file
214.Pa sys/contrib/dev/ath/ah.h .
215This should not happen.
216.It "ath%d: unable to start recv logic"
217The driver was unable to restart frame reception.
218This should not happen.
219.It "ath%d: device timeout"
220A frame dispatched to the hardware for transmission did not complete in time.
221The driver will reset the hardware and continue.
222This should not hapen.
223.It "ath%d: bogus xmit rate 0x%x"
224An invalid transmit rate was specified for an outgoing frame.
225The frame is discarded.
226This should not happen.
227.It "ath%d: ath_chan_set: unable to reset channel %u (%u Mhz)"
228The Atheros Hardware Access Layer was unable to reset the hardware
229when switching channels during scanning.
230This should not happen.
231.It "ath%d: unable to allocate channel table"
232The driver was unable to allocate memory for the table used to hold
233the set of available channels.
234.It "ath%d: unable to collect channel list from hal"
235A problem occurred while querying the HAL to find the set of available
236channels for the device.
237This should not happen.
238.It "ath%d: %s: %dM -> %dM (%d ok, %d err, %d retr)"
239The driver's rate control algorithm changed the current rate for transmitting
240frames.
241This message is temporarily enabled for normal use to help in diagnosing
242and improving the rate control algorithm.
243The message indicates the new and old transmit rates and the statistics
244it used to decide on this change.
245.It "ath%d: failed to enable memory mapping"
246The driver was unable to enable memory-mapped I/O to the PCI device registers.
247This should not happen.
248.It "ath%d: failed to enable bus mastering"
249The driver was unable to enable the device as a PCI bus master for doing DMA.
250This should not happen.
251.It "ath%d: cannot map register space"
252The driver was unable to map the device registers into the host address space.
253This should not happen.
254.It "ath%d: could not map interrupt"
255The driver was unable to allocate an IRQ for the device interrupt.
256This should not happen.
257.It "ath%d: could not establish interrupt"
258The driver was unable to install the device interrupt handler.
259This should not happen.
260.El
261.Sh SEE ALSO
262.Xr an 4 ,
263.Xr arp 4 ,
264.Xr ath_hal 4 ,
265.Xr card 4 ,
266.Xr netintro 4 ,
267.Xr pcic 4 ,
268.Xr wi 4 ,
269.Xr wlan 4 ,
270.Xr ifconfig 8 ,
271.Xr wicontrol 8
272.Re
273.Sh HISTORY
274The
275.Nm
276device driver first appeared in
277.Fx 5.2 .
278.Sh CAVEATS
279Different regulatory domains have different default channels for adhoc
280mode.
281See
282.Xr ifconfig 8
283for information on how to change the channel.
284See
285.Xr wicontrol 8
286for information on different regulatory domains.
287Different regulatory domains may not be able to communicate with each
288other with 802.11a as different regualtory domains do not necessarily
289have overlapping channels.
290.Pp
291Revision A1 of the D-LINK DWL-G520 and DWL-G650 are based on an
292Intersil PrismGT chip and are not supported by this driver.
293.Sh BUGS
294.Pp
295Performance in lossy environments is suboptimal.
296The algorithm used to select the rate for transmitted packets is
297very simplistic.
298There is no software retransmit; only hardware retransmit is used.
299Contributors are encouraged to replace the existing rate control algorithm
300with a better one (hint: all the information needed is availble to the driver).
301.Pp
302General performance is suboptimal.
303The Atheros hardware is known to be capable of transfer rates of 23-34 Mb/s
304(or more) in 11a and 11g modes using their NDIS (aka Windows) driver.
305Results with this driver are mixed and seem to vary significantly.
306.Pp
307The driver does not fully enable power-save operation of the chip;
308consequently power use is suboptimal.
309