Name Date Size #Lines LOC

..--

DATAPATH_RECEIVE.mdH A D27-Apr-20266.2 KiB161117

DATAPATH_TRANSMIT.mdH A D27-Apr-202617.2 KiB391301

DEBUG.mdH A D27-Apr-20264.3 KiB10277

DEFERRED_WORK.mdH A D09-Jun-20267.7 KiB181137

PROTOCOL.mdH A D27-Apr-202622.5 KiB564410

README.mdH A D09-Jun-20264.6 KiB140103

_ieee80211.hH A D19-Jun-202527.1 KiB663441

ieee80211.cH A D20-Sep-202576.9 KiB2,7961,954

ieee80211.hH A D03-Jun-202578.7 KiB2,1721,555

ieee80211_acl.cH A D16-Aug-20238.6 KiB343252

ieee80211_action.cH A D24-Nov-20238.1 KiB285235

ieee80211_action.hH A D16-Aug-20232.2 KiB5319

ieee80211_adhoc.cH A D19-Jun-202530.7 KiB1,059721

ieee80211_adhoc.hH A D16-Aug-20231.6 KiB365

ieee80211_ageq.cH A D16-Aug-20236.1 KiB240141

ieee80211_ageq.hH A D16-Aug-20232.3 KiB5525

ieee80211_alq.cH A D01-Jun-20254.8 KiB175118

ieee80211_alq.hH A D16-Aug-20232.2 KiB6017

ieee80211_amrr.cH A D31-May-202520.3 KiB761552

ieee80211_amrr.hH A D13-Jan-20252 KiB6523

ieee80211_crypto.cH A D19-Aug-202632.1 KiB1,107558

ieee80211_crypto.hH A D19-Aug-202619.3 KiB565270

ieee80211_crypto_ccmp.cH A D15-Mar-202522.4 KiB808493

ieee80211_crypto_gcm.cH A D28-Feb-20258.1 KiB364224

ieee80211_crypto_gcm.hH A D28-Feb-20252.2 KiB5916

ieee80211_crypto_gcmp.cH A D15-Mar-202516.4 KiB599364

ieee80211_crypto_none.cH A D16-Aug-20234.3 KiB15697

ieee80211_crypto_tkip.cH A D19-May-202630.4 KiB1,072773

ieee80211_crypto_wep.cH A D09-Jun-202615.2 KiB518363

ieee80211_ddb.cH A D14-Aug-202534.8 KiB1,057895

ieee80211_dfs.cH A D31-May-202512.4 KiB438253

ieee80211_dfs.hH A D16-Aug-20232.5 KiB6427

ieee80211_freebsd.cH A D20-Jan-202634.7 KiB1,386977

ieee80211_freebsd.hH A D31-Aug-202525.6 KiB756536

ieee80211_hostap.cH A D19-Jun-202571.3 KiB2,5101,817

ieee80211_hostap.hH A D16-Aug-20231.7 KiB426

ieee80211_ht.cH A D17-May-2026111.2 KiB3,8662,554

ieee80211_ht.hH A D17-May-20269.7 KiB254169

ieee80211_hwmp.cH A D13-Oct-202565.5 KiB2,0871,630

ieee80211_input.cH A D11-Jun-202529.6 KiB1,066747

ieee80211_input.hH A D16-Aug-202310.2 KiB325187

ieee80211_ioctl.cH A D19-Aug-2026107.9 KiB3,8423,170

ieee80211_ioctl.hH A D19-Aug-202637.8 KiB890591

ieee80211_mesh.cH A D19-Jun-2025104.9 KiB3,6142,812

ieee80211_mesh.hH A D16-Aug-202319.6 KiB605418

ieee80211_monitor.cH A D19-Jun-20253.8 KiB13880

ieee80211_monitor.hH A D16-Aug-20231.6 KiB365

ieee80211_node.cH A D19-Jun-202595.1 KiB3,3662,233

ieee80211_node.hH A D19-Jun-202523.1 KiB557392

ieee80211_output.cH A D27-Aug-2025125.6 KiB4,3072,755

ieee80211_phy.cH A D13-Oct-202525.5 KiB795547

ieee80211_phy.hH A D14-Aug-20257.4 KiB235106

ieee80211_power.cH A D01-Jun-202517.4 KiB652414

ieee80211_power.hH A D16-Aug-20233.4 KiB8834

ieee80211_proto.cH A D14-Jan-202685.9 KiB2,9161,815

ieee80211_proto.hH A D25-Jan-202518.8 KiB469342

ieee80211_radiotap.cH A D10-Jan-202612.8 KiB478351

ieee80211_radiotap.hH A D12-Aug-202629.4 KiB689408

ieee80211_ratectl.cH A D24-Nov-20234 KiB13691

ieee80211_ratectl.hH A D19-Jun-20255.6 KiB175118

ieee80211_ratectl_none.cH A D02-Jan-20253.2 KiB11975

ieee80211_regdomain.cH A D27-Oct-202314.2 KiB471349

ieee80211_regdomain.hH A D16-Aug-202310.5 KiB294238

ieee80211_rssadapt.cH A D31-May-202511 KiB392287

ieee80211_rssadapt.hH A D16-Aug-20232.9 KiB7325

ieee80211_scan.cH A D02-Jun-202518.8 KiB699451

ieee80211_scan.hH A D19-Jun-202514.8 KiB354223

ieee80211_scan_sta.cH A D01-Jun-202557.4 KiB2,0001,371

ieee80211_scan_sw.cH A D02-Jun-202530.9 KiB1,047647

ieee80211_scan_sw.hH A D16-Aug-20231.5 KiB314

ieee80211_sta.cH A D19-Jun-202561 KiB2,0691,387

ieee80211_sta.hH A D16-Aug-20232 KiB5010

ieee80211_superg.cH A D01-Jun-202529.6 KiB1,081724

ieee80211_superg.hH A D16-Aug-20235.4 KiB15695

ieee80211_tdma.cH A D01-Jun-202524.5 KiB835576

ieee80211_tdma.hH A D16-Aug-20234 KiB10455

ieee80211_var.hH A D17-May-202648.2 KiB1,172825

ieee80211_vht.cH A D19-May-202633.1 KiB1,169651

ieee80211_vht.hH A D14-Aug-20253.1 KiB7335

ieee80211_wds.cH A D19-Jun-202523.4 KiB802544

ieee80211_wds.hH A D16-Aug-20231.8 KiB408

ieee80211_wps.hH A D16-Aug-20236.6 KiB148110

ieee80211_xauth.cH A D16-Aug-20232.8 KiB7825

README.md

1# net80211
2
3This is the 802.11 wireless stack for FreeBSD.
4
5## Introduction
6
7The net80211 subsystem implements the 802.11 protocol and support infrastructure.
8It supports a variety of device types, 802.11 protocols, operating modes and
9security extensions.
10
11net80211 handles the 802.11 state machine, interface management, node management,
12virtual interfaces, packet encapsulation and de-encapsulation and basic
13security key management.
14
15The userland ioctl() API provides control mechanisms for the above and is how
16management tooling (ifconfig, libifconfig) and management services (hostapd,
17wpa_supplicant) interfaces with the net80211 stack.
18
19The security state machine and key management (802.1x, WPA, etc) are handled
20by management services.
21
22Drivers can implement as much or as little of the 802.11 infrastructure as
23needed.  net80211 support drivers from full-offload (ie, supplying ethernet
24encapsulated/de-encapsulated frames with management control via driver
25methods) down to fully software controlled devices (ie, the hardware
26is minimal and all 802.11 packet handling, state machine, reordering, security,
27etc is handled by net80211.)
28
29## Overview
30
31net80211 consists of a few top level design modules:
32
33 * The 802.11 device representation and functions (ieee80211com), used
34   in conjunction with an 802.11 device driver to represent the physical device.
35
36 * The 802.11 virtual interface representation and functions (ieee80211vap),
37   used to represent instances of virtual interfaces.
38
39 * A representation of 802.11 stations/nodes (ieee80211_node), which
40   keep the state of each 802.11 station/node that the stack knows about.
41
42 * Encryption handling (ieee80211_crypto), handling 802.11 frame encryption,
43   decryption and session/state tracking.
44
45 * Regulatory domain (ieee80211_regdomain), which implements the 802.11
46   regulatory domains, allowed frequencies, operating modes and transmit power.
47
48 * Radar detection (ieee80211_dfs.c), tracking the state of radar detection and
49   interoperability in the 5GHz frequency range.
50
51 * Transmit rate control (ieee80211_ratectl.c) implements software and
52   firmware based rate control for devices that don't implement full rate control
53   offload.
54
55 * Power save support (ieee82011_power.c) implements various power saving
56   mode features and support for devices which do not fully implement offloaded
57   power management.
58
59 * Operating system specific interfaces (ieee80211_freebsd.c) which implement
60   the bulk of the operating system specific glue (logging, memory allocation,
61   network interfaces, etc.)
62
63 * The configuration interface (ieee80211_ioctl.c) which implements the ioctl
64   API used by userland to configure and monitor the state of the 802.11 stack
65   and devices.
66
67In addition, each operating mode (adhoc, station, AP, WDS, mesh) have their own
68modules that implement the state machines and functionality required for 802.11.
69
70## Portability
71
72Although net80211 attempts to keep most OS specific components in a single file
73(ieee80211_freebsd.c), it is not currently perfect.
74
75Notably:
76
77 * There are still plenty of FreeBSD-isms located throughout the source code,
78   including BSD specific includes, network APIs, etc.
79
80 * The interface and networking model is still very BSD, including using the
81   system implementation of mbufs.
82
83When developing for net80211 please keep in mind that other operating systems
84(such as DragonflyBSD) and third parties do leverage this codebase.
85Try to keep all FreeBSD specific components in ieee80211_freebsd.[ch].
86
87## Protocol Overview
88
89A basic protocol overview is available at (@ref md_net80211_PROTOCOL).
90
91The most comprehensive overview is the 802.11 protocol document itself,
92but it is very large and implementations do not always correspond 1:1
93with the protocol definitions.
94
95## Functional Overview
96
97(TODO)
98
99 * Module layout
100 * Logging
101 * Debugging - (@ref md_net80211_DEBUG)
102 * Top-level device layout (ieee80211com)
103 * Data / Control Path Overview (@ref md_net80211_DATAPATH_TRANSMIT), (@ref md_net80211_DATAPATH_RECEIVE)
104 * Deferred work (@ref md_net80211_DEFERRED_WORK)
105 * Regulatory
106 * Virtual interfaces
107 * Operating Modes
108 * Nodes
109 * Node tables, node table iteration
110 * Device and VAP states
111 * Node states
112 * Operating modes
113 * Cipher management
114 * Radar detection
115 * ioctl interface
116 * ACL support
117 * Scanning, Scan Modules
118 * Power Management
119 * Transmit Path
120 * Receive Path
121 * A-MSDU Fast Frames
122 * A-MPDU
123 * Radiotap
124 * Monitor Mode
125
126## Driver Overview
127
128(TODO)
129
130 * Introduction
131 * Driver Structure
132 * Setup and Attach
133 * Virtual Interfaces
134 * Control Path
135 * Data Path
136 * VAP state
137 * Device State
138 * Suspend and Resume
139
140