1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
5 <book id="mac80211-developers-guide">
7 <title>The mac80211 subsystem for kernel developers</title>
11 <firstname>Johannes</firstname>
12 <surname>Berg</surname>
14 <address><email>johannes@sipsolutions.net</email></address>
20 <year>2007-2009</year>
21 <holder>Johannes Berg</holder>
26 This documentation is free software; you can redistribute
27 it and/or modify it under the terms of the GNU General Public
28 License version 2 as published by the Free Software Foundation.
32 This documentation is distributed in the hope that it will be
33 useful, but WITHOUT ANY WARRANTY; without even the implied
34 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35 See the GNU General Public License for more details.
39 You should have received a copy of the GNU General Public
40 License along with this documentation; if not, write to the Free
41 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
46 For more details see the file COPYING in the source
47 distribution of Linux.
52 !Pinclude/net/mac80211.h Introduction
53 !Pinclude/net/mac80211.h Warning
60 Generally, this document shall be ordered by increasing complexity.
61 It is important to note that readers should be able to read only
62 the first few sections to get a working driver and only advanced
63 usage should require reading the full document.
67 <title>The basic mac80211 driver interface</title>
70 You should read and understand the information contained
71 within this part of the book while implementing a driver.
72 In some chapters, advanced usage is noted, that may be
76 This part of the book only covers station and monitor mode
77 functionality, additional information required to implement
78 the other modes is covered in the second part of the book.
83 <title>Basic hardware handling</title>
86 This chapter shall contain information on getting a hw
87 struct allocated and registered with mac80211.
90 Since it is required to allocate rates/modes before registering
91 a hw struct, this chapter shall also contain information on setting
92 up the rate/mode structs.
95 Additionally, some discussion about the callbacks and
96 the general programming model should be in here, including
97 the definition of ieee80211_ops which will be referred to
101 Finally, a discussion of hardware capabilities should be done
102 with references to other parts of the book.
104 <!-- intentionally multiple !F lines to get proper order -->
105 !Finclude/net/mac80211.h ieee80211_hw
106 !Finclude/net/mac80211.h ieee80211_hw_flags
107 !Finclude/net/mac80211.h SET_IEEE80211_DEV
108 !Finclude/net/mac80211.h SET_IEEE80211_PERM_ADDR
109 !Finclude/net/mac80211.h ieee80211_ops
110 !Finclude/net/mac80211.h ieee80211_alloc_hw
111 !Finclude/net/mac80211.h ieee80211_register_hw
112 !Finclude/net/mac80211.h ieee80211_get_tx_led_name
113 !Finclude/net/mac80211.h ieee80211_get_rx_led_name
114 !Finclude/net/mac80211.h ieee80211_get_assoc_led_name
115 !Finclude/net/mac80211.h ieee80211_get_radio_led_name
116 !Finclude/net/mac80211.h ieee80211_unregister_hw
117 !Finclude/net/mac80211.h ieee80211_free_hw
120 <chapter id="phy-handling">
121 <title>PHY configuration</title>
124 This chapter should describe PHY handling including
125 start/stop callbacks and the various structures used.
127 !Finclude/net/mac80211.h ieee80211_conf
128 !Finclude/net/mac80211.h ieee80211_conf_flags
131 <chapter id="iface-handling">
132 <title>Virtual interfaces</title>
135 This chapter should describe virtual interface basics
136 that are relevant to the driver (VLANs, MGMT etc are not.)
137 It should explain the use of the add_iface/remove_iface
138 callbacks as well as the interface configuration callbacks.
140 <para>Things related to AP mode should be discussed there.</para>
142 Things related to supporting multiple interfaces should be
143 in the appropriate chapter, a BIG FAT note should be here about
144 this though and the recommendation to allow only a single
145 interface in STA mode at first!
147 !Finclude/net/mac80211.h ieee80211_if_init_conf
151 <title>Receive and transmit processing</title>
153 <title>what should be here</title>
156 This should describe the receive and transmit
157 paths in mac80211/the drivers as well as
158 transmit status handling.
162 <title>Frame format</title>
163 !Pinclude/net/mac80211.h Frame format
166 <title>Packet alignment</title>
167 !Pnet/mac80211/rx.c Packet alignment
170 <title>Calling into mac80211 from interrupts</title>
171 !Pinclude/net/mac80211.h Calling mac80211 from interrupts
174 <title>functions/definitions</title>
175 !Finclude/net/mac80211.h ieee80211_rx_status
176 !Finclude/net/mac80211.h mac80211_rx_flags
177 !Finclude/net/mac80211.h ieee80211_tx_info
178 !Finclude/net/mac80211.h ieee80211_rx
179 !Finclude/net/mac80211.h ieee80211_rx_irqsafe
180 !Finclude/net/mac80211.h ieee80211_tx_status
181 !Finclude/net/mac80211.h ieee80211_tx_status_irqsafe
182 !Finclude/net/mac80211.h ieee80211_rts_get
183 !Finclude/net/mac80211.h ieee80211_rts_duration
184 !Finclude/net/mac80211.h ieee80211_ctstoself_get
185 !Finclude/net/mac80211.h ieee80211_ctstoself_duration
186 !Finclude/net/mac80211.h ieee80211_generic_frame_duration
187 !Finclude/net/mac80211.h ieee80211_get_hdrlen_from_skb
188 !Finclude/net/mac80211.h ieee80211_hdrlen
189 !Finclude/net/mac80211.h ieee80211_wake_queue
190 !Finclude/net/mac80211.h ieee80211_stop_queue
191 !Finclude/net/mac80211.h ieee80211_wake_queues
192 !Finclude/net/mac80211.h ieee80211_stop_queues
196 <chapter id="filters">
197 <title>Frame filtering</title>
198 !Pinclude/net/mac80211.h Frame filtering
199 !Finclude/net/mac80211.h ieee80211_filter_flags
204 <title>Advanced driver interface</title>
207 Information contained within this part of the book is
208 of interest only for advanced interaction of mac80211
209 with drivers to exploit more hardware capabilities and
214 <chapter id="hardware-crypto-offload">
215 <title>Hardware crypto acceleration</title>
216 !Pinclude/net/mac80211.h Hardware crypto acceleration
217 <!-- intentionally multiple !F lines to get proper order -->
218 !Finclude/net/mac80211.h set_key_cmd
219 !Finclude/net/mac80211.h ieee80211_key_conf
220 !Finclude/net/mac80211.h ieee80211_key_alg
221 !Finclude/net/mac80211.h ieee80211_key_flags
224 <chapter id="powersave">
225 <title>Powersave support</title>
226 !Pinclude/net/mac80211.h Powersave support
229 <chapter id="beacon-filter">
230 <title>Beacon filter support</title>
231 !Pinclude/net/mac80211.h Beacon filter support
232 !Finclude/net/mac80211.h ieee80211_beacon_loss
236 <title>Multiple queues and QoS support</title>
238 !Finclude/net/mac80211.h ieee80211_tx_queue_params
239 !Finclude/net/mac80211.h ieee80211_tx_queue_stats
243 <title>Access point mode support</title>
245 <para>Some parts of the if_conf should be discussed here instead</para>
247 Insert notes about VLAN interfaces with hw crypto here or
248 in the hw crypto chapter.
250 !Finclude/net/mac80211.h ieee80211_get_buffered_bc
251 !Finclude/net/mac80211.h ieee80211_beacon_get
254 <chapter id="multi-iface">
255 <title>Supporting multiple virtual interfaces</title>
258 Note: WDS with identical MAC address should almost always be OK
261 Insert notes about having multiple virtual interfaces with
262 different MAC addresses here, note which configurations are
263 supported by mac80211, add notes about supporting hw crypto
268 <chapter id="hardware-scan-offload">
269 <title>Hardware scan offload</title>
271 !Finclude/net/mac80211.h ieee80211_scan_completed
275 <part id="rate-control">
276 <title>Rate control interface</title>
280 This part of the book describes the rate control algorithm
281 interface and how it relates to mac80211 and drivers.
285 <title>dummy chapter</title>
291 <title>Internals</title>
295 This part of the book describes mac80211 internals.
299 <chapter id="key-handling">
300 <title>Key handling</title>
302 <title>Key handling basics</title>
303 !Pnet/mac80211/key.c Key handling basics
306 <title>MORE TBD</title>
311 <chapter id="rx-processing">
312 <title>Receive processing</title>
316 <chapter id="tx-processing">
317 <title>Transmit processing</title>
321 <chapter id="sta-info">
322 <title>Station info handling</title>
324 <title>Programming information</title>
325 !Fnet/mac80211/sta_info.h sta_info
326 !Fnet/mac80211/sta_info.h ieee80211_sta_info_flags
329 <title>STA information lifetime rules</title>
330 !Pnet/mac80211/sta_info.c STA information lifetime rules
334 <chapter id="synchronisation">
335 <title>Synchronisation</title>
337 <para>Locking, lots of RCU</para>