xref: /freebsd/share/man/man4/ath.4 (revision e0c27215058b5786c78fcfb3963eebe61a989511)
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 July 13, 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 trasmit 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"
113.Em "Card	Chip	Bus"
114D-Link DWL-AB650	AR5211	Cardbus
115D-Link DWL-AG520	AR5212	PCI
116D-Link DWL-AG650	AR5212	Cardbus
117Linksys WMP55AG	AR5212	PCI
118Linksys WPC51AB	AR5211	Cardbus
119Linksys WPC55AG	AR5212	Cardbus
120Netgear WAB501	AR5211	Cardbus
121Netgear WAG511	AR5212	Cardbus
122.El
123.Sh EXAMPLES
124Join an existing BSS network (ie: connect to an access point):
125.Pp
126.Dl "ifconfig ath0 inet 192.168.0.20 netmask 0xffffff00"
127.Pp
128Join a specific BSS network with network name
129.Dq Li my_net :
130.Pp
131.Dl "ifconfig ath0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net"
132.Pp
133Join a specific BSS network with WEP encryption:
134.Bd -literal -offset indent
135ifconfig ath0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net \e
136	wepmode on wepkey 0x8736639624
137.Ed
138.Pp
139Join/create an 802.11b IBSS network with network name
140.Dq Li my_net :
141.Bd -literal -offset indent
142ifconfig ath0 inet 192.168.0.22 netmask 0xffffff00 ssid my_net \e
143	mode 11b mediaopt adhoc
144.Ed
145.Pp
146Create an 802.11g host-based access point:
147.Bd -literal -offset indent
148ifconfig ath0 inet 192.168.0.10 netmask 0xffffff00 ssid my_ap \e
149	mode 11g mediaopt hostap
150.Ed
151.Pp
152Create an 802.11a host-based access point with WEP enabled:
153.Bd -literal -offset indent
154ifconfig ath0 inet 192.168.0.10 netmask 0xffffff00 ssid my_ap \e
155	wepmode on wepkey 0x1234567890 mode 11a mediaopt hostap
156.Ed
157.Pp
158Create a host-based wireless bridge to fxp0:
159.Bd -literal -offset indent
160Add BRIDGE to the kernel config.
161ifconfig ath0 inet up ssid my_ap media DS/11Mbps mediaopt hostap
162sysctl net.link.ether.bridge=1
163sysctl net.link.ether.bridge_cfg="ath0 fxp0"
164sysctl net.inet.ip.forwarding=1
165.Ed
166.Pp
167This will give you the same functionality as an access point.
168.Sh DIAGNOSTICS
169.Bl -diag
170.It "ath%d: unable to attach hardware; HAL status %u"
171The Atheros Hardware Access Layer was unable to configure the hardware
172as requested.
173The status code is explained in the HAL include file
174.Pa sys/contrib/dev/ath/ah.h .
175.It "ath%d: failed to allocate descriptors: %d"
176The driver was unable to allocate contiguous memory for the transmit
177ad receive descriptors.
178This usually indicates system memory is scarce and/or fragmented.
179.It "ath%d: unable to setup a data xmit queue!"
180The request to the HAL to setup the transmit queue for normal
181data frames failed.
182This should not happen.
183.It "ath%d: unable to setup a beacon xmit queue!"
184The request to the HAL to setup the transmit queue for 802.11 beacon frames
185frames failed.
186This should not happen.
187.It "ath%d: 802.11 address: %s"
188The MAC address programmed in the EEPROM is displayed.
189.It "ath%d: hardware error; resetting"
190A nunrecoverable error in the hardware occurred.
191Errors of this sort include unrecoverable DMA errors.
192The driver will reset the hardware and continue.
193.It "ath%d: rx FIFO overrun; resetting"
194The receive FIFO in the hardware overflowed before the data could be
195transferred to the host.
196This typically occurs because the hardware ran short of receive
197descriptors and had no place to transfer received data.
198The driver will reset the hardware and continue.
199.It "ath%d: unable to reset hardware; hal status %u"
200The Atheros Hardware Access Layer was unable to reset the hardware
201as requested.
202The status code is explained in the HAL include file
203.Pa sys/contrib/dev/ath/ah.h .
204This should not happen.
205.It "ath%d: unable to start recv logic"
206The driver was unable to restart frame reception.
207This should not happen.
208.It "ath%d: device timeout"
209A frame dispatched to the hardware for transmission did not complete in time.
210The driver will reset the hardware and continue.
211This should not hapen.
212.It "ath%d: bogus xmit rate 0x%x"
213An invalid transmit rate was specified for an outgoing frame.
214The frame is discarded.
215This should not happen.
216.It "ath%d: ath_chan_set: unable to reset channel %u (%u Mhz)"
217The Atheros Hardware Access Layer was unable to reset the hardware
218when switching channels during scanning.
219This should not happen.
220.It "ath%d: unable to allocate channel table"
221The driver was unable to allocate memory for the table used to hold
222the set of available channels.
223.It "ath%d: unable to collect channel list from hal"
224A problem occurred while querying the HAL to find the set of available
225channels for the device.
226This should not happen.
227.It "ath%d: %s: %dM -> %dM (%d ok, %d err, %d retr)"
228The driver's rate control algorithm changed the current rate for transmitting
229frames.
230This message is temporarily enabled for normal use to help in diagnosing
231and improving the rate control algorithm.
232The message indicates the new and old transmit rates and the statistics
233it used to decide on this change.
234.It "ath%d: failed to enable memory mapping"
235The driver was unable to enable memory-mapped I/O to the PCI device registers.
236This should not happen.
237.It "ath%d: failed to enable bus mastering"
238The driver was unable to enable the device as a PCI bus master for doing DMA.
239This should not happen.
240.It "ath%d: cannot map register space"
241The driver was unable to map the device registers into the host address space.
242This should not happen.
243.It "ath%d: could not map interrupt"
244The driver was unable to allocate an IRQ for the device interrupt.
245This should not happen.
246.It "ath%d: could not establish interrupt"
247The driver was unable to install the device interrupt handler.
248This should not happen.
249.El
250.Sh SEE ALSO
251.Xr an 4 ,
252.Xr arp 4 ,
253.Xr ath_hal 4,
254.Xr card 4 ,
255.Xr netintro 4 ,
256.Xr pcic 4 ,
257.Xr wi 4 ,
258.Xr wlan 4 ,
259.Xr ifconfig 8 ,
260.Xr wicontrol 8
261.Re
262.Sh HISTORY
263The
264.Nm
265device driver first appeared in
266.Fx 5.2 .
267.Sh CAVEATS
268Different regulatory domains have different default channels for adhoc
269mode.
270See
271.Xr ifconfig 8
272for information on how to change the channel.
273See
274.Xr wicontrol 8
275for information on different regulatory domains.
276.Pp
277802.11g support is little tested and may have interoperabity problems.
278The software is known to function with an Atheros 11g access point but
279interoperability may be problematic until vendors update firmware in
280existing 11g products.
281If you encounter problems using an 11g access point you should be able
282to workaround incompatibilities by locking the driver to 11b mode.
283Alternatively, most 11g compatibility issues are in the 802.11 layer
284and you may be able to workaround issues by modifying the
285.Xr wlan 4
286module.
287.Pp
288Atheros Turbo mode is untested.
289.Sh BUGS
290.Pp
291Roaming mode is broken.
292If you lose your access point by going out of
293range the driver does not automaticaly re-associate.
294.Pp
295Adhoc mode is untested and possibly/probably broken.
296.Pp
297Performance in lossy environments is suboptimal.
298The algorithm used to select the rate for transmitted packets is
299very simplistic.
300There is no software retransmit; only hardware retransmit is used.
301Contributors are encouraged to replace the existing rate control algorithm
302with a better one (hint: all the information needed is availble to the driver).
303.Pp
304General performance is suboptimal.
305The Atheros hardware is known to be capable of transfer rates of 23-34 Mb/s
306(or more) in 11a and 11g modes using their NDIS (aka Windows) driver.
307Results with this driver are mixed and seem to vary significantly.
308.Pp
309It has been observed that getting a DHCP address sometimes requires
310multiple tries.
311This seems to happen only with AR5211 and AR5212 parts and mostly
312in a noisy environment (i.e. one where many access points are found).
313This problem is specific to the driver and not the hardware.
314.Pp
315The driver does not fully enable power-save operation of the chip;
316consequently power use is suboptimal.
317