xref: /freebsd/share/man/man4/ath.4 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
1cf8faa80SSam Leffler.\"-
26fd63a5dSSam Leffler.\" Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
3cf8faa80SSam Leffler.\" All rights reserved.
4cf8faa80SSam Leffler.\""
5cf8faa80SSam Leffler.\" Redistribution and use in source and binary forms, with or without
6cf8faa80SSam Leffler.\" modification, are permitted provided that the following conditions
7cf8faa80SSam Leffler.\" are met:
8cf8faa80SSam Leffler.\" 1. Redistributions of source code must retain the above copyright
9cf8faa80SSam Leffler.\"    notice, this list of conditions and the following disclaimer,
10cf8faa80SSam Leffler.\"    without modification.
11cf8faa80SSam Leffler.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
12cf8faa80SSam Leffler.\"    similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
13cf8faa80SSam Leffler.\"    redistribution must be conditioned upon including a substantially
14cf8faa80SSam Leffler.\"    similar Disclaimer requirement for further binary redistribution.
15cf8faa80SSam Leffler.\"
16cf8faa80SSam Leffler.\" NO WARRANTY
17cf8faa80SSam Leffler.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18cf8faa80SSam Leffler.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19cf8faa80SSam Leffler.\" LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
20cf8faa80SSam Leffler.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
21cf8faa80SSam Leffler.\" THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
22cf8faa80SSam Leffler.\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23cf8faa80SSam Leffler.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24cf8faa80SSam Leffler.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25cf8faa80SSam Leffler.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26cf8faa80SSam Leffler.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27cf8faa80SSam Leffler.\" THE POSSIBILITY OF SUCH DAMAGES.
28cf8faa80SSam Leffler.\"/
29*37c8ee88SMarius Strobl.Dd August 7, 2023
30cf8faa80SSam Leffler.Dt ATH 4
31cf8faa80SSam Leffler.Os
32cf8faa80SSam Leffler.Sh NAME
33cf8faa80SSam Leffler.Nm ath
343c9bf41dSChristian Brueffer.Nd "Atheros IEEE 802.11 wireless network driver"
35cf8faa80SSam Leffler.Sh SYNOPSIS
3616d78bb8STom RhodesTo compile this driver into the kernel,
3716d78bb8STom Rhodesplace the following lines in your
3890296834STom Rhodeskernel configuration file:
3986e3186eSTom Rhodes.Bd -ragged -offset indent
40cf8faa80SSam Leffler.Cd "device ath"
4110626faeSHiten Pandya.Cd "device ath_hal"
42aa2fce50SSam Leffler.Cd "device ath_rate_sample"
4310626faeSHiten Pandya.Cd "device wlan"
4486e3186eSTom Rhodes.Ed
4586e3186eSTom Rhodes.Pp
4616d78bb8STom RhodesAlternatively, to load the driver as a
4716d78bb8STom Rhodesmodule at boot time, place the following line in
4886e3186eSTom Rhodes.Xr loader.conf 5 :
4986e3186eSTom Rhodes.Bd -literal -offset indent
5086e3186eSTom Rhodesif_ath_load="YES"
5186e3186eSTom Rhodes.Ed
52cf8faa80SSam Leffler.Sh DESCRIPTION
53cf8faa80SSam LefflerThe
54cf8faa80SSam Leffler.Nm
55cf8faa80SSam Lefflerdriver provides support for wireless network adapters based on
5661f78dd7SAdrian Chaddthe Atheros AR5210, AR5211, AR5212, AR5416 and AR9300 programming APIs.
57b032f27cSSam LefflerThese APIs are used by a wide variety of chips; most all chips with
5870c8948aSAdrian Chadda PCI, PCIe and/or CardBus interface are supported.
59cf8faa80SSam Leffler.Pp
60cf8faa80SSam LefflerSupported features include 802.11 and 802.3 frames, power management, BSS,
6170c8948aSAdrian ChaddIBSS, MBSS, WDS/DWDS TDMA, and host-based access point operation modes.
62cf8faa80SSam LefflerAll host/device interaction is via DMA.
63cf8faa80SSam Leffler.Pp
64cf8faa80SSam LefflerThe
65cf8faa80SSam Leffler.Nm
66cf8faa80SSam Lefflerdriver encapsulates all IP and ARP traffic as 802.11 frames, however
67cf8faa80SSam Lefflerit can receive either 802.11 or 802.3 frames.
68cf8faa80SSam LefflerTransmit speed and operating mode is selectable
6991d89945SChristian Bruefferand depends on the specific chipset.
7059ddccc6SChristian BruefferAR5210-based devices support 802.11a operation with transmit speeds
71cf8faa80SSam Lefflerof 6 Mbps, 9 Mbps, 12 Mbps, 18 Mbps, 24 Mbps, 36 Mbps, 48 Mbps, and 54 Mbps.
72cf8faa80SSam LefflerAR5211-based devices support 802.11a and 802.11b operation with transmit
73cf8faa80SSam Lefflerspeeds as above for 802.11a operation and
74cf8faa80SSam Leffler1Mbps, 2Mbps, 5.5 Mbps and 11Mbps for 802.11b operation.
75cf8faa80SSam LefflerAR5212-based devices support 802.11a, 802.11b, and 802.11g operation
76cf8faa80SSam Lefflerwith transmit speeds appropriate to each.
7761f78dd7SAdrian ChaddAR5416 and later class devices are capable of 802.11n operation.
78aa2fce50SSam LefflerMost chips also support an Atheros Turbo Mode (TM) that operates in
791748d1e5SGavin Atkinsonthe 5GHz frequency range with 2x the transmit speeds.
801748d1e5SGavin AtkinsonSome chips also support Turbo mode in the 2.4GHz range with 802.11g
81aa2fce50SSam Lefflerthough this support is not presently available due to regulatory requirements.
82aa2fce50SSam Leffler(Note that Turbo modes are, however,
83aa2fce50SSam Leffleronly interoperable with other Atheros-based devices.)
8461f78dd7SAdrian ChaddAR5212-based and AR5416-based devices also support half- (10MHz) and quarter-width (5MHz) channels.
85cf8faa80SSam LefflerThe actual transmit speed used is dependent on signal quality and the
86702d4fc4SRuslan Ermilov.Dq "rate control"
87702d4fc4SRuslan Ermilovalgorithm employed by the driver.
88cf8faa80SSam LefflerAll chips support WEP encryption.
8961f78dd7SAdrian ChaddAR5212, AR5416 and later parts have hardware support for the
906fd63a5dSSam LefflerAES-CCM, TKIP, and Michael cryptographic
91014be7fbSSam Leffleroperations required for WPA.
92cf8faa80SSam LefflerTo enable encryption, use
93cf8faa80SSam Leffler.Xr ifconfig 8
94cf8faa80SSam Leffleras shown below.
95cf8faa80SSam Leffler.Pp
96b032f27cSSam LefflerThe driver supports
97b032f27cSSam Leffler.Cm station ,
98b032f27cSSam Leffler.Cm adhoc ,
99b032f27cSSam Leffler.Cm adhoc-demo ,
100b032f27cSSam Leffler.Cm hostap ,
10159aa14a9SRui Paulo.Cm mesh ,
102b032f27cSSam Leffler.Cm wds ,
103b032f27cSSam Lefflerand
104b032f27cSSam Leffler.Cm monitor
105b032f27cSSam Lefflermode operation.
106b032f27cSSam LefflerMultiple
107b032f27cSSam Leffler.Cm hostap
108b032f27cSSam Lefflervirtual interfaces may be configured for simultaneous
10961f78dd7SAdrian Chadduse on cards that use a 5212 or later part.
110b032f27cSSam LefflerWhen multiple interfaces are configured each may have a separate
111b032f27cSSam Lefflermac address that is formed by setting the U/L bits in the mac
112b032f27cSSam Leffleraddress assigned to the underlying device.
113b032f27cSSam LefflerAny number of
114b032f27cSSam Leffler.Cm wds
115b032f27cSSam Lefflervirtual interfaces may be configured together with
116b032f27cSSam Leffler.Cm hostap
117b032f27cSSam Lefflerinterfaces.
118b032f27cSSam LefflerMultiple
119b032f27cSSam Leffler.Cm station
120b032f27cSSam Lefflerinterfaces may be operated together with
121b032f27cSSam Leffler.Cm hostap
122b032f27cSSam Lefflerinterfaces to construct a wireless repeater device.
1236fd63a5dSSam LefflerThe driver also support
1246fd63a5dSSam Leffler.Cm tdma
1256fd63a5dSSam Leffleroperation when compiled with
1266fd63a5dSSam Leffler.Cd "options IEEE80211_SUPPORT_TDMA"
127930034efSSam Leffler(which also enables the required 802.11 support).
128cf8faa80SSam LefflerFor more information on configuring this device, see
129cf8faa80SSam Leffler.Xr ifconfig 8 .
130cf8faa80SSam Leffler.Pp
131cf8faa80SSam LefflerDevices supported by the
132cf8faa80SSam Leffler.Nm
13370c8948aSAdrian Chadddriver come in Cardbus, ExpressCard, Mini-PCI and Mini-PCIe packages.
13470c8948aSAdrian ChaddWireless cards in Cardbus and ExpressCard slots may be inserted and
13570c8948aSAdrian Chaddejected on the fly.
13671d4b49aSSimon L. B. Nielsen.Sh HARDWARE
137ab7350b7SGiorgos KeramidasThe
138ab7350b7SGiorgos Keramidas.Nm
13970c8948aSAdrian Chadddriver supports all Atheros Cardbus, ExpressCard, PCI and PCIe cards,
140ab7350b7SGiorgos Keramidasexcept those that are based on the AR5005VL chipset.
141cf8faa80SSam Leffler.Sh EXAMPLES
142cf8faa80SSam LefflerJoin a specific BSS network with WEP encryption:
143cf8faa80SSam Leffler.Bd -literal -offset indent
144b032f27cSSam Lefflerifconfig wlan0 create wlandev ath0
145b032f27cSSam Lefflerifconfig wlan0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net \e
146cf8faa80SSam Leffler	wepmode on wepkey 0x8736639624
147cf8faa80SSam Leffler.Ed
148cf8faa80SSam Leffler.Pp
149cf8faa80SSam LefflerJoin/create an 802.11b IBSS network with network name
150cf8faa80SSam Leffler.Dq Li my_net :
151cf8faa80SSam Leffler.Bd -literal -offset indent
152b032f27cSSam Lefflerifconfig wlan0 create wlandev ath0 wlanmode adhoc
153b032f27cSSam Lefflerifconfig wlan0 inet 192.168.0.22 netmask 0xffffff00 ssid my_net \e
154b032f27cSSam Leffler	mode 11b
155cf8faa80SSam Leffler.Ed
156cf8faa80SSam Leffler.Pp
157cf8faa80SSam LefflerCreate an 802.11g host-based access point:
158cf8faa80SSam Leffler.Bd -literal -offset indent
159b032f27cSSam Lefflerifconfig wlan0 create wlandev ath0 wlanmode hostap
160b032f27cSSam Lefflerifconfig wlan0 inet 192.168.0.10 netmask 0xffffff00 ssid my_ap \e
161b032f27cSSam Leffler	mode 11g
162cf8faa80SSam Leffler.Ed
163cf8faa80SSam Leffler.Pp
16459aa14a9SRui PauloCreate an 802.11a mesh station:
16559aa14a9SRui Paulo.Bd -literal -offset indent
16659aa14a9SRui Pauloifconfig wlan0 create wlandev ath0 wlanmode mesh
16759aa14a9SRui Pauloifconfig wlan0 meshid my_mesh mode 11a inet 192.168.0.10/24
16859aa14a9SRui Paulo.Ed
16959aa14a9SRui Paulo.Pp
170b032f27cSSam LefflerCreate two virtual 802.11a host-based access points, one with
17150d922a0SGlen BarberWEP enabled and one with no security, and bridge them to
172b032f27cSSam Lefflerthe fxp0 (wired) device:
173cf8faa80SSam Leffler.Bd -literal -offset indent
174b032f27cSSam Lefflerifconfig wlan0 create wlandev ath0 wlanmode hostap \e
175b032f27cSSam Leffler	ssid paying-customers wepmode on wepkey 0x1234567890 \e
176b032f27cSSam Leffler	mode 11a up
177b032f27cSSam Lefflerifconfig wlan1 create wlandev ath0 wlanmode hostap bssid \e
178b032f27cSSam Leffler	ssid freeloaders up
179b032f27cSSam Lefflerifconfig bridge0 create addm wlan0 addm wlan1 addm fxp0 up
180cf8faa80SSam Leffler.Ed
1816fd63a5dSSam Leffler.Pp
1826fd63a5dSSam LefflerCreate a master node in a two slot TDMA BSS configured to use
1836fd63a5dSSam Leffler2.5 millisecond slots.
1846fd63a5dSSam Leffler.Bd -literal -offset indent
1856fd63a5dSSam Lefflerifconfig wlan0 create wlandev ath0 wlanmode tdma \e
1866fd63a5dSSam Leffler	ssid tdma-test tmdaslot 0 tdmaslotlen 2500 \e
1876fd63a5dSSam Leffler	channel 36 up
1886fd63a5dSSam Leffler.Ed
189cf8faa80SSam Leffler.Sh DIAGNOSTICS
190cf8faa80SSam Leffler.Bl -diag
191cf8faa80SSam Leffler.It "ath%d: unable to attach hardware; HAL status %u"
192cf8faa80SSam LefflerThe Atheros Hardware Access Layer was unable to configure the hardware
193cf8faa80SSam Leffleras requested.
194cf8faa80SSam LefflerThe status code is explained in the HAL include file
1956cbaa952SMaxim Konovalov.Pa sys/dev/ath/ath_hal/ah.h .
196cf8faa80SSam Leffler.It "ath%d: failed to allocate descriptors: %d"
197cf8faa80SSam LefflerThe driver was unable to allocate contiguous memory for the transmit
19859ddccc6SChristian Bruefferand receive descriptors.
199cf8faa80SSam LefflerThis usually indicates system memory is scarce and/or fragmented.
200cf8faa80SSam Leffler.It "ath%d: unable to setup a data xmit queue!"
201cf8faa80SSam LefflerThe request to the HAL to set up the transmit queue for normal
202cf8faa80SSam Lefflerdata frames failed.
203cf8faa80SSam LefflerThis should not happen.
204cf8faa80SSam Leffler.It "ath%d: unable to setup a beacon xmit queue!"
205cf8faa80SSam LefflerThe request to the HAL to set up the transmit queue for 802.11 beacon frames
20650d922a0SGlen Barberfailed.
207cf8faa80SSam LefflerThis should not happen.
208cf8faa80SSam Leffler.It "ath%d: 802.11 address: %s"
209cf8faa80SSam LefflerThe MAC address programmed in the EEPROM is displayed.
210cf8faa80SSam Leffler.It "ath%d: hardware error; resetting"
211cf8faa80SSam LefflerAn unrecoverable error in the hardware occurred.
212cf8faa80SSam LefflerErrors of this sort include unrecoverable DMA errors.
213cf8faa80SSam LefflerThe driver will reset the hardware and continue.
214cf8faa80SSam Leffler.It "ath%d: rx FIFO overrun; resetting"
215cf8faa80SSam LefflerThe receive FIFO in the hardware overflowed before the data could be
216cf8faa80SSam Lefflertransferred to the host.
217cf8faa80SSam LefflerThis typically occurs because the hardware ran short of receive
218cf8faa80SSam Lefflerdescriptors and had no place to transfer received data.
219cf8faa80SSam LefflerThe driver will reset the hardware and continue.
220cf8faa80SSam Leffler.It "ath%d: unable to reset hardware; hal status %u"
221cf8faa80SSam LefflerThe Atheros Hardware Access Layer was unable to reset the hardware
222cf8faa80SSam Leffleras requested.
223cf8faa80SSam LefflerThe status code is explained in the HAL include file
2246cbaa952SMaxim Konovalov.Pa sys/dev/ath/ath_hal/ah.h .
225cf8faa80SSam LefflerThis should not happen.
226cf8faa80SSam Leffler.It "ath%d: unable to start recv logic"
227cf8faa80SSam LefflerThe driver was unable to restart frame reception.
228cf8faa80SSam LefflerThis should not happen.
229cf8faa80SSam Leffler.It "ath%d: device timeout"
230cf8faa80SSam LefflerA frame dispatched to the hardware for transmission did not complete in time.
231cf8faa80SSam LefflerThe driver will reset the hardware and continue.
232d562e82bSHideyuki KURASHINAThis should not happen.
233cf8faa80SSam Leffler.It "ath%d: bogus xmit rate 0x%x"
234cf8faa80SSam LefflerAn invalid transmit rate was specified for an outgoing frame.
235cf8faa80SSam LefflerThe frame is discarded.
236cf8faa80SSam LefflerThis should not happen.
23779649302SGavin Atkinson.It "ath%d: ath_chan_set: unable to reset channel %u (%u MHz)"
238cf8faa80SSam LefflerThe Atheros Hardware Access Layer was unable to reset the hardware
239cf8faa80SSam Lefflerwhen switching channels during scanning.
240cf8faa80SSam LefflerThis should not happen.
241cf8faa80SSam Leffler.It "ath%d: failed to enable memory mapping"
242cf8faa80SSam LefflerThe driver was unable to enable memory-mapped I/O to the PCI device registers.
243cf8faa80SSam LefflerThis should not happen.
244cf8faa80SSam Leffler.It "ath%d: failed to enable bus mastering"
245cf8faa80SSam LefflerThe driver was unable to enable the device as a PCI bus master for doing DMA.
246cf8faa80SSam LefflerThis should not happen.
247cf8faa80SSam Leffler.It "ath%d: cannot map register space"
248cf8faa80SSam LefflerThe driver was unable to map the device registers into the host address space.
249cf8faa80SSam LefflerThis should not happen.
250cf8faa80SSam Leffler.It "ath%d: could not map interrupt"
251cf8faa80SSam LefflerThe driver was unable to allocate an IRQ for the device interrupt.
252cf8faa80SSam LefflerThis should not happen.
253cf8faa80SSam Leffler.It "ath%d: could not establish interrupt"
254cf8faa80SSam LefflerThe driver was unable to install the device interrupt handler.
255cf8faa80SSam LefflerThis should not happen.
256cf8faa80SSam Leffler.El
257cf8faa80SSam Leffler.Sh SEE ALSO
258cf8faa80SSam Leffler.Xr ath_hal 4 ,
259b032f27cSSam Leffler.Xr cardbus 4 ,
260ca23ba6eSChristian Brueffer.Xr intro 4 ,
261cf8faa80SSam Leffler.Xr pcic 4 ,
262cf8faa80SSam Leffler.Xr wlan 4 ,
263b032f27cSSam Leffler.Xr wlan_ccmp 4 ,
264b032f27cSSam Leffler.Xr wlan_tkip 4 ,
265b032f27cSSam Leffler.Xr wlan_wep 4 ,
266b032f27cSSam Leffler.Xr wlan_xauth 4 ,
267b032f27cSSam Leffler.Xr hostapd 8 ,
268cf8faa80SSam Leffler.Xr ifconfig 8 ,
269ca23ba6eSChristian Brueffer.Xr wpa_supplicant 8
270cf8faa80SSam Leffler.Sh HISTORY
271cf8faa80SSam LefflerThe
272cf8faa80SSam Leffler.Nm
273cf8faa80SSam Lefflerdevice driver first appeared in
274cf8faa80SSam Leffler.Fx 5.2 .
275cf8faa80SSam Leffler.Sh CAVEATS
276c6316a61SStefan EßerRevision A1 of the D-LINK DWL-G520 and DWL-G650 are based on an
277c6316a61SStefan EßerIntersil PrismGT chip and are not supported by this driver.
278cf8faa80SSam Leffler.Sh BUGS
27970c8948aSAdrian ChaddThe driver does supports optional station mode power-save operation.
280aa2fce50SSam Leffler.Pp
28161f78dd7SAdrian ChaddThe AR5210 can only do WEP in hardware; consequently hardware assisted WEP
28261f78dd7SAdrian Chaddis disabled in order to allow software implementations of TKIP and CCMP to
28361f78dd7SAdrian Chaddfunction.
28461f78dd7SAdrian ChaddHardware WEP can be re-enabled by modifying the driver.
285