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