xref: /freebsd/share/man/man4/ath.4 (revision 195ebc7e9e4b129de810833791a19dfb4349d6a9)
1.\"-
2.\" Copyright (c) 2002-2009 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 March 25, 2009
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 "options AH_SUPPORT_AR5416"
45.Cd "device ath_rate_sample"
46.Cd "device wlan"
47.Ed
48.Pp
49Alternatively, to load the driver as a
50module at boot time, place the following line in
51.Xr loader.conf 5 :
52.Bd -literal -offset indent
53if_ath_load="YES"
54.Ed
55.Sh DESCRIPTION
56The
57.Nm
58driver provides support for wireless network adapters based on
59the Atheros AR5210, AR5211, AR5212, and AR5416 programming APIs.
60These APIs are used by a wide variety of chips; most all chips with
61a PCI and/or CardBus interface are supported.
62.Pp
63Supported features include 802.11 and 802.3 frames, power management, BSS,
64IBSS, TDMA, and host-based access point operation modes.
65All host/device interaction is via DMA.
66.Pp
67The
68.Nm
69driver encapsulates all IP and ARP traffic as 802.11 frames, however
70it can receive either 802.11 or 802.3 frames.
71Transmit speed and operating mode is selectable
72and depends on the specific chipset.
73AR5210-based devices support 802.11a operation with transmit speeds
74of 6 Mbps, 9 Mbps, 12 Mbps, 18 Mbps, 24 Mbps, 36 Mbps, 48 Mbps, and 54 Mbps.
75AR5211-based devices support 802.11a and 802.11b operation with transmit
76speeds as above for 802.11a operation and
771Mbps, 2Mbps, 5.5 Mbps and 11Mbps for 802.11b operation.
78AR5212-based devices support 802.11a, 802.11b, and 802.11g operation
79with transmit speeds appropriate to each.
80AR5416-class devices are capable of 802.11n operation
81but are supported only in legacy modes (802.11a, 11b, 11g).
82Most chips also support an Atheros Turbo Mode (TM) that operates in
83the 5Ghz frequency range with 2x the transmit speeds.
84Some chips also support Turbo mode in the 2.4Ghz range with 802.11g
85though this support is not presently available due to regulatory requirements.
86(Note that Turbo modes are, however,
87only interoperable with other Atheros-based devices.)
88AR5212-based devices also support half- (10MHz) and quarter-width (5MHz) channels.
89The actual transmit speed used is dependent on signal quality and the
90.Dq "rate control"
91algorithm employed by the driver.
92All chips support WEP encryption.
93AR5212 and AR5416 parts have hardware support for the
94AES-CCM, TKIP, and Michael cryptographic
95operations required for WPA.
96To enable encryption, use
97.Xr ifconfig 8
98as shown below.
99.Pp
100The driver supports
101.Cm station ,
102.Cm adhoc ,
103.Cm adhoc-demo ,
104.Cm hostap ,
105.Cm wds ,
106and
107.Cm monitor
108mode operation.
109Multiple
110.Cm hostap
111virtual interfaces may be configured for simultaneous
112use on cards that use a 5212 part.
113When multiple interfaces are configured each may have a separate
114mac address that is formed by setting the U/L bits in the mac
115address assigned to the underlying device.
116Any number of
117.Cm wds
118virtual interfaces may be configured together with
119.Cm hostap
120interfaces.
121Multiple
122.Cm station
123interfaces may be operated together with
124.Cm hostap
125interfaces to construct a wireless repeater device.
126The driver also support
127.Cm tdma
128operation when compiled with
129.Cd "options IEEE80211_SUPPORT_TDMA"
130(which also enables the required 802.11 support).
131For more information on configuring this device, see
132.Xr ifconfig 8 .
133.Pp
134Devices supported by the
135.Nm
136driver come in either Cardbus or mini-PCI packages.
137Wireless cards in Cardbus slots may be inserted and ejected on the fly.
138.Sh HARDWARE
139The
140.Nm
141driver supports all Atheros Cardbus and PCI cards,
142except those that are based on the AR5005VL chipset.
143.Pp
144A list of cards that are supported can be found at
145.Pa http://customerproducts.atheros.com/customerproducts/default.asp .
146.Sh EXAMPLES
147Join an existing BSS network (ie: connect to an access point):
148.Pp
149.Dl "ifconfig ath0 inet 192.168.0.20 netmask 0xffffff00"
150.Pp
151Join a specific BSS network with network name
152.Dq Li my_net :
153.Pp
154.Dl "ifconfig ath0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net"
155.Pp
156Join a specific BSS network with WEP encryption:
157.Bd -literal -offset indent
158ifconfig wlan0 create wlandev ath0
159ifconfig wlan0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net \e
160	wepmode on wepkey 0x8736639624
161.Ed
162.Pp
163Join/create an 802.11b IBSS network with network name
164.Dq Li my_net :
165.Bd -literal -offset indent
166ifconfig wlan0 create wlandev ath0 wlanmode adhoc
167ifconfig wlan0 inet 192.168.0.22 netmask 0xffffff00 ssid my_net \e
168	mode 11b
169.Ed
170.Pp
171Create an 802.11g host-based access point:
172.Bd -literal -offset indent
173ifconfig wlan0 create wlandev ath0 wlanmode hostap
174ifconfig wlan0 inet 192.168.0.10 netmask 0xffffff00 ssid my_ap \e
175	mode 11g
176.Ed
177.Pp
178Create two virtual 802.11a host-based access points, one with
179with WEP enabled and one with no security, and bridge them to
180the fxp0 (wired) device:
181.Bd -literal -offset indent
182ifconfig wlan0 create wlandev ath0 wlanmode hostap \e
183	ssid paying-customers wepmode on wepkey 0x1234567890 \e
184	mode 11a up
185ifconfig wlan1 create wlandev ath0 wlanmode hostap bssid \e
186	ssid freeloaders up
187ifconfig bridge0 create addm wlan0 addm wlan1 addm fxp0 up
188.Ed
189.Pp
190Create a master node in a two slot TDMA BSS configured to use
1912.5 millisecond slots.
192.Bd -literal -offset indent
193ifconfig wlan0 create wlandev ath0 wlanmode tdma \e
194	ssid tdma-test tmdaslot 0 tdmaslotlen 2500 \e
195	channel 36 up
196.Ed
197.Sh DIAGNOSTICS
198.Bl -diag
199.It "ath%d: unable to attach hardware; HAL status %u"
200The Atheros Hardware Access Layer was unable to configure the hardware
201as requested.
202The status code is explained in the HAL include file
203.Pa sys/contrib/dev/ath/ah.h .
204.It "ath%d: failed to allocate descriptors: %d"
205The driver was unable to allocate contiguous memory for the transmit
206and receive descriptors.
207This usually indicates system memory is scarce and/or fragmented.
208.It "ath%d: unable to setup a data xmit queue!"
209The request to the HAL to set up the transmit queue for normal
210data frames failed.
211This should not happen.
212.It "ath%d: unable to setup a beacon xmit queue!"
213The request to the HAL to set up the transmit queue for 802.11 beacon frames
214frames failed.
215This should not happen.
216.It "ath%d: 802.11 address: %s"
217The MAC address programmed in the EEPROM is displayed.
218.It "ath%d: hardware error; resetting"
219An unrecoverable error in the hardware occurred.
220Errors of this sort include unrecoverable DMA errors.
221The driver will reset the hardware and continue.
222.It "ath%d: rx FIFO overrun; resetting"
223The receive FIFO in the hardware overflowed before the data could be
224transferred to the host.
225This typically occurs because the hardware ran short of receive
226descriptors and had no place to transfer received data.
227The driver will reset the hardware and continue.
228.It "ath%d: unable to reset hardware; hal status %u"
229The Atheros Hardware Access Layer was unable to reset the hardware
230as requested.
231The status code is explained in the HAL include file
232.Pa sys/contrib/dev/ath/ah.h .
233This should not happen.
234.It "ath%d: unable to start recv logic"
235The driver was unable to restart frame reception.
236This should not happen.
237.It "ath%d: device timeout"
238A frame dispatched to the hardware for transmission did not complete in time.
239The driver will reset the hardware and continue.
240This should not happen.
241.It "ath%d: bogus xmit rate 0x%x"
242An invalid transmit rate was specified for an outgoing frame.
243The frame is discarded.
244This should not happen.
245.It "ath%d: ath_chan_set: unable to reset channel %u (%u Mhz)"
246The Atheros Hardware Access Layer was unable to reset the hardware
247when switching channels during scanning.
248This should not happen.
249.It "ath%d: failed to enable memory mapping"
250The driver was unable to enable memory-mapped I/O to the PCI device registers.
251This should not happen.
252.It "ath%d: failed to enable bus mastering"
253The driver was unable to enable the device as a PCI bus master for doing DMA.
254This should not happen.
255.It "ath%d: cannot map register space"
256The driver was unable to map the device registers into the host address space.
257This should not happen.
258.It "ath%d: could not map interrupt"
259The driver was unable to allocate an IRQ for the device interrupt.
260This should not happen.
261.It "ath%d: could not establish interrupt"
262The driver was unable to install the device interrupt handler.
263This should not happen.
264.El
265.Sh SEE ALSO
266.Xr ath_hal 4 ,
267.Xr cardbus 4 ,
268.Xr intro 4 ,
269.Xr pcic 4 ,
270.Xr wlan 4 ,
271.Xr wlan_ccmp 4 ,
272.Xr wlan_tkip 4 ,
273.Xr wlan_wep 4 ,
274.Xr wlan_xauth 4 ,
275.Xr hostapd 8 ,
276.Xr ifconfig 8 ,
277.Xr wpa_supplicant 8
278.Sh HISTORY
279The
280.Nm
281device driver first appeared in
282.Fx 5.2 .
283.Sh CAVEATS
284Revision A1 of the D-LINK DWL-G520 and DWL-G650 are based on an
285Intersil PrismGT chip and are not supported by this driver.
286.Sh BUGS
287There is no software retransmit; only hardware retransmit is used.
288.Pp
289The driver does not fully enable power-save operation of the chip
290in station mode; consequently power use is suboptimal (e.g. on a laptop).
291.Pp
292WPA is not supported for 5210 parts.
293