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