xref: /freebsd/share/man/man4/ath.4 (revision 2be1a816)
1.\"-
2.\" Copyright (c) 2002-2008 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.\"
16.\" NO WARRANTY
17.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19.\" LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
20.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
21.\" THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
22.\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27.\" THE POSSIBILITY OF SUCH DAMAGES.
28.\"
29.\" $FreeBSD$
30.\"/
31.Dd April 13, 2008
32.Dt ATH 4
33.Os
34.Sh NAME
35.Nm ath
36.Nd "Atheros IEEE 802.11 wireless network driver"
37.Sh SYNOPSIS
38To compile this driver into the kernel,
39place the following lines in your
40kernel configuration file:
41.Bd -ragged -offset indent
42.Cd "device ath"
43.Cd "device ath_hal"
44.Cd "device ath_rate_sample"
45.Cd "device wlan"
46.Ed
47.Pp
48Alternatively, to load the driver as a
49module at boot time, place the following line in
50.Xr loader.conf 5 :
51.Bd -literal -offset indent
52if_ath_load="YES"
53.Ed
54.Sh DESCRIPTION
55The
56.Nm
57driver provides support for wireless network adapters based on
58the Atheros AR5210, AR5211, and AR5212 programming APIs.
59These APIs are used by a wide variety of chips; most all chips with
60a PCI and/or CardBus interface are supported.
61Chip-specific support is provided by the Atheros Hardware Access Layer
62(HAL), that is packaged separately.
63.Pp
64Supported features include 802.11 and 802.3 frames, power management, BSS,
65IBSS, and host-based access point operation modes.
66All host/device interaction is via DMA.
67.Pp
68The
69.Nm
70driver encapsulates all IP and ARP traffic as 802.11 frames, however
71it can receive either 802.11 or 802.3 frames.
72Transmit speed and operating mode is selectable
73and depends on the specific chipset.
74AR5210-based devices support 802.11a operation with transmit speeds
75of 6 Mbps, 9 Mbps, 12 Mbps, 18 Mbps, 24 Mbps, 36 Mbps, 48 Mbps, and 54 Mbps.
76AR5211-based devices support 802.11a and 802.11b operation with transmit
77speeds as above for 802.11a operation and
781Mbps, 2Mbps, 5.5 Mbps and 11Mbps for 802.11b operation.
79AR5212-based devices support 802.11a, 802.11b, and 802.11g operation
80with transmit speeds appropriate to each.
81Most chips also support an Atheros Turbo Mode (TM) that operates in
82the 5Ghz frequency range with 2x the transmit speeds.
83Some chips also support Turbo mode in the 2.4Ghz range with 802.11g
84though this support is not presently available due to regulatory requirements.
85(Note that Turbo modes are, however,
86only interoperable with other Atheros-based devices.)
87The actual transmit speed used is dependent on signal quality and the
88.Dq "rate control"
89algorithm employed by the driver.
90All chips support WEP encryption.
91The AR5212 has hardware support for the AES-CCM, TKIP, and Michael cryptographic
92operations required for WPA.
93To enable encryption, use
94.Xr ifconfig 8
95as shown below.
96.Pp
97The driver supports
98.Cm station ,
99.Cm adhoc ,
100.Cm adhoc-demo ,
101.Cm hostap ,
102.Cm wds ,
103and
104.Cm monitor
105mode operation.
106Multiple
107.Cm hostap
108virtual interfaces may be configured for simultaneous
109use on cards that use a 5212 part.
110When multiple interfaces are configured each may have a separate
111mac address that is formed by setting the U/L bits in the mac
112address assigned to the underlying device.
113Any number of
114.Cm wds
115virtual interfaces may be configured together with
116.Cm hostap
117interfaces.
118Multiple
119.Cm station
120interfaces may be operated together with
121.Cm hostap
122interfaces to construct a wireless repeater device.
123For more information on configuring this device, see
124.Xr ifconfig 8 .
125.Pp
126Devices supported by the
127.Nm
128driver come in either Cardbus or mini-PCI packages.
129Wireless cards in Cardbus slots may be inserted and ejected on the fly.
130.Sh HARDWARE
131The
132.Nm
133driver supports most Atheros Cardbus or PCI cards,
134except those that are based on the AR5005VL chipset.
135More recent parts may require a hal that is not part of
136.Fb .
137.Pp
138A list of cards that are supported can be found at
139.Pa http://customerproducts.atheros.com/customerproducts/default.asp .
140.Sh EXAMPLES
141Join an existing BSS network (ie: connect to an access point):
142.Pp
143.Dl "ifconfig ath0 inet 192.168.0.20 netmask 0xffffff00"
144.Pp
145Join a specific BSS network with network name
146.Dq Li my_net :
147.Pp
148.Dl "ifconfig ath0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net"
149.Pp
150Join a specific BSS network with WEP encryption:
151.Bd -literal -offset indent
152ifconfig wlan0 create wlandev ath0
153ifconfig wlan0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net \e
154	wepmode on wepkey 0x8736639624
155.Ed
156.Pp
157Join/create an 802.11b IBSS network with network name
158.Dq Li my_net :
159.Bd -literal -offset indent
160ifconfig wlan0 create wlandev ath0 wlanmode adhoc
161ifconfig wlan0 inet 192.168.0.22 netmask 0xffffff00 ssid my_net \e
162	mode 11b
163.Ed
164.Pp
165Create an 802.11g host-based access point:
166.Bd -literal -offset indent
167ifconfig wlan0 create wlandev ath0 wlanmode hostap
168ifconfig wlan0 inet 192.168.0.10 netmask 0xffffff00 ssid my_ap \e
169	mode 11g
170.Ed
171.Pp
172Create two virtual 802.11a host-based access points, one with
173with WEP enabled and one with no security, and bridge them to
174the fxp0 (wired) device:
175.Bd -literal -offset indent
176ifconfig wlan0 create wlandev ath0 wlanmode hostap \e
177	ssid paying-customers wepmode on wepkey 0x1234567890 \e
178	mode 11a up
179ifconfig wlan1 create wlandev ath0 wlanmode hostap bssid \e
180	ssid freeloaders up
181ifconfig bridge0 create addm wlan0 addm wlan1 addm fxp0 up
182.Ed
183.Sh DIAGNOSTICS
184.Bl -diag
185.It "ath%d: unable to attach hardware; HAL status %u"
186The Atheros Hardware Access Layer was unable to configure the hardware
187as requested.
188The status code is explained in the HAL include file
189.Pa sys/contrib/dev/ath/ah.h .
190.It "ath%d: failed to allocate descriptors: %d"
191The driver was unable to allocate contiguous memory for the transmit
192and receive descriptors.
193This usually indicates system memory is scarce and/or fragmented.
194.It "ath%d: unable to setup a data xmit queue!"
195The request to the HAL to set up the transmit queue for normal
196data frames failed.
197This should not happen.
198.It "ath%d: unable to setup a beacon xmit queue!"
199The request to the HAL to set up the transmit queue for 802.11 beacon frames
200frames failed.
201This should not happen.
202.It "ath%d: 802.11 address: %s"
203The MAC address programmed in the EEPROM is displayed.
204.It "ath%d: hardware error; resetting"
205An unrecoverable error in the hardware occurred.
206Errors of this sort include unrecoverable DMA errors.
207The driver will reset the hardware and continue.
208.It "ath%d: rx FIFO overrun; resetting"
209The receive FIFO in the hardware overflowed before the data could be
210transferred to the host.
211This typically occurs because the hardware ran short of receive
212descriptors and had no place to transfer received data.
213The driver will reset the hardware and continue.
214.It "ath%d: unable to reset hardware; hal status %u"
215The Atheros Hardware Access Layer was unable to reset the hardware
216as requested.
217The status code is explained in the HAL include file
218.Pa sys/contrib/dev/ath/ah.h .
219This should not happen.
220.It "ath%d: unable to start recv logic"
221The driver was unable to restart frame reception.
222This should not happen.
223.It "ath%d: device timeout"
224A frame dispatched to the hardware for transmission did not complete in time.
225The driver will reset the hardware and continue.
226This should not happen.
227.It "ath%d: bogus xmit rate 0x%x"
228An invalid transmit rate was specified for an outgoing frame.
229The frame is discarded.
230This should not happen.
231.It "ath%d: ath_chan_set: unable to reset channel %u (%u Mhz)"
232The Atheros Hardware Access Layer was unable to reset the hardware
233when switching channels during scanning.
234This should not happen.
235.It "ath%d: unable to allocate channel table"
236The driver was unable to allocate memory for the table used to hold
237the set of available channels.
238.It "ath%d: unable to collect channel list from hal"
239A problem occurred while querying the HAL to find the set of available
240channels for the device.
241This should not happen.
242.It "ath%d: failed to enable memory mapping"
243The driver was unable to enable memory-mapped I/O to the PCI device registers.
244This should not happen.
245.It "ath%d: failed to enable bus mastering"
246The driver was unable to enable the device as a PCI bus master for doing DMA.
247This should not happen.
248.It "ath%d: cannot map register space"
249The driver was unable to map the device registers into the host address space.
250This should not happen.
251.It "ath%d: could not map interrupt"
252The driver was unable to allocate an IRQ for the device interrupt.
253This should not happen.
254.It "ath%d: could not establish interrupt"
255The driver was unable to install the device interrupt handler.
256This should not happen.
257.El
258.Sh SEE ALSO
259.Xr ath_hal 4 ,
260.Xr intro 4 ,
261.Xr cardbus 4 ,
262.Xr pcic 4 ,
263.Xr wlan 4 ,
264.Xr wlan_ccmp 4 ,
265.Xr wlan_tkip 4 ,
266.Xr wlan_wep 4 ,
267.Xr wlan_xauth 4 ,
268.Xr hostapd 8 ,
269.Xr ifconfig 8 ,
270.Xr wpa_supplicant 8 .
271.Sh HISTORY
272The
273.Nm
274device driver first appeared in
275.Fx 5.2 .
276.Sh CAVEATS
277Different regulatory domains have different default channels for adhoc
278mode.
279See
280.Xr ifconfig 8
281for information on how to change the channel.
282Different regulatory domains may not be able to communicate with each
283other with 802.11a as different regulatory domains do not necessarily
284have overlapping channels.
285.Pp
286Revision A1 of the D-LINK DWL-G520 and DWL-G650 are based on an
287Intersil PrismGT chip and are not supported by this driver.
288.Sh BUGS
289There is no software retransmit; only hardware retransmit is used.
290.Pp
291The driver does not fully enable power-save operation of the chip
292in station mode; consequently power use is suboptimal (e.g. on a laptop).
293.Pp
294WPA is not supported for 5210 parts.
295