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