xref: /freebsd/share/man/man4/wlan.4 (revision e5b786625f7f82a1fa91e41823332459ea5550f9)
1.\"
2.\" Copyright (c) 2003 Tom Rhodes
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.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.Dd May 5, 2023
27.Dt WLAN 4
28.Os
29.Sh NAME
30.Nm wlan
31.Nd generic WiFi 802.11 link-layer support
32.Sh SYNOPSIS
33.Cd "device wlan"
34.Sh DESCRIPTION
35The
36.Nm
37module provides generic code to support 802.11 drivers.
38Where a device does not directly support 802.11 functionality
39this layer fills in.
40The
41.Nm
42module is required by all native 802.11 drivers.
43.Pp
44.Nm
45supports multi-mode devices capable of
46operating in both 2.4GHz and 5GHz bands and supports numerous
47802.11 standards: 802.11a, 802.11b, 802.11g, 802.11n, and 802.11s (Draft 3.0).
48The WPA, 802.11i, and 802.1x security protocols are supported
49through a combination of in-kernel code and user-mode applications.
50The WME/WMM multi-media protocols are supported entirely within
51the
52.Nm
53module but require a suitably capable hardware device.
54Likewise the 802.11h specification is supported only by suitably
55capable devices.
56.Pp
57Drivers provide 802.11 functionality through
58.Nm
59interfaces that are created at runtime using interface cloning.
60This is done with the
61.Xr ifconfig 8
62.Cm create
63command or using the
64.Va wlans_IFX
65variable in
66.Xr rc.conf 5 .
67Some drivers support the creation of multiple
68.Nm
69interfaces that share the same underlying device;
70this is the way by which ``multi-bss support'' is provided but it
71can also be used to create WDS links and other interesting applications.
72.Pp
73There are several types of
74.Nm
75interfaces that may be created:
76.Bl -tag -width monitor
77.It Cm sta
78A client station in an infrastructure bss
79(i.e. one that associates to an access point).
80.It Cm hostap
81An access point in an infrastructure bss.
82.It Cm mesh
83A mesh station in an MBSS network.
84.It Cm adhoc
85A station in an IBSS network.
86.It Cm ahdemo
87A station operating in ``adhoc demo mode''.
88This is essentially an IBSS station that does not use management
89frames (e.g. no beacons are transmitted).
90An
91.Cm ahdemo
92interface is especially useful for applications that want to transmit
93and receive raw 802.11 packets.
94.It Cm monitor
95An interface used exclusively for capturing 802.11 frames.
96In particular this specified to have read-only properties
97which enables it to be operated on frequencies where one
98would otherwise not be allowed.
99.It Cm wds
100A station that passes 4-address 802.11 traffic for the purpose
101of tunneling traffic over a wireless link.
102Typically this station would share the same MAC address as a
103.Cm hostap
104interface.
105It may be possible to create
106.Cm wds
107interfaces without a companion
108.Cm hostap
109interface but that is not guaranteed; one may need to create a
110.Cm hostap
111interface that does not send beacon frames before
112.Cm wds
113interfaces may be created.
114.El
115.Pp
116Note that an interface's type cannot be changed once it is created.
117.Pp
118.Nm
119defines several mechanisms by which plugin modules may
120be used to extend its functionality.
121Cryptographic support such as WEP, TKIP, and AES-CCMP are implemented
122as standalone modules (if not statically configured into a system)
123that register with
124.Nm .
125Similarly there is an authenticator framework for defining 802.11
126authentication services and a framework for integrating access
127control mechanisms specific to the 802.11 protocol.
128.Sh DEBUGGING
129If the
130.Dv IEEE80211_DEBUG
131option is included in the kernel configuration,
132debugging controls are available using:
133.Pp
134.Dl "sysctl net.wlan.X.debug=mask"
135.Pp
136where
137.Ar X
138is the number of the
139.Nm
140instance and mask is a bit-or of control bits that determine which
141debugging messages to enable.
142For example,
143.Pp
144.Dl "sysctl net.wlan.0.debug=0x00200000"
145.Pp
146enables debugging messages related to scanning for an access point,
147adhoc neighbor, or an unoccupied channel when operation as an access point.
148The
149.Xr wlandebug 8
150tool provides a more user-friendly mechanism for doing the same thing.
151Note that
152.Pp
153.Dl "sysctl net.wlan.debug=mask"
154.Pp
155defines the initial value of the debugging flags for each cloned
156.Nm
157interface; this is useful to enable debug messages during interface creation.
158.Sh COMPATIBILITY
159The module name of
160.Nm
161was used to be compatible with
162.Nx .
163.Pp
164Mesh stations follow the 802.11s Draft 3.0 specification which is
165not ratified and subject to change.
166Be aware that this specification is incompatible with earlier drafts.
167Stations implementing earlier drafts (e.g., Linux) may be incompatible.
168.Sh SEE ALSO
169.Xr an 4 ,
170.Xr ath 4 ,
171.Xr bwi 4 ,
172.Xr bwn 4 ,
173.Xr ipw 4 ,
174.Xr iwi 4 ,
175.Xr iwlwifi 4 ,
176.Xr iwm 4 ,
177.Xr iwn 4 ,
178.Xr malo 4 ,
179.Xr mwl 4 ,
180.Xr netintro 4 ,
181.Xr otus 4 ,
182.Xr ral 4 ,
183.Xr rsu 4 ,
184.Xr rtw88 4 ,
185.Xr rtwn 4 ,
186.Xr rum 4 ,
187.Xr run 4 ,
188.Xr uath 4 ,
189.Xr upgt 4 ,
190.Xr ural 4 ,
191.Xr urtw 4 ,
192.Xr wlan_acl 4 ,
193.Xr wlan_ccmp 4 ,
194.Xr wlan_tkip 4 ,
195.Xr wlan_wep 4 ,
196.Xr wlan_xauth 4 ,
197.Xr wpi 4 ,
198.Xr zyd 4
199.Sh STANDARDS
200More information can be found in the IEEE 802.11 Standards.
201.Sh HISTORY
202The
203.Nm
204driver first appeared in
205.Fx 5.0 .
206.Sh AUTHORS
207Atsushi Onoe is the author of original
208.Nx
209software from which this work began.
210.An -nosplit
211.An Sam Leffler
212brought the code into
213.Fx
214and then rewrote it to support multi-mode devices,
215802.11g, 802.11n, WPA/802.11i, WME, multi-bss, and
216add the extensible frameworks
217for cryptographic, authentication, and access control plugins.
218This manual page was written by
219.An Tom Rhodes Aq Mt trhodes@FreeBSD.org .
220