xref: /freebsd/share/man/man9/ieee80211_beacon.9 (revision 692eebe092e81927e190dd5eeb4f65d2324ea3fa)
1692eebe0SSam Leffler.\"
2692eebe0SSam Leffler.\" Copyright (c) 2009 Sam Leffler, Errno Consulting
3692eebe0SSam Leffler.\" All rights reserved.
4692eebe0SSam Leffler.\"
5692eebe0SSam Leffler.\" Redistribution and use in source and binary forms, with or without
6692eebe0SSam Leffler.\" modification, are permitted provided that the following conditions
7692eebe0SSam Leffler.\" are met:
8692eebe0SSam Leffler.\" 1. Redistributions of source code must retain the above copyright
9692eebe0SSam Leffler.\"    notice, this list of conditions and the following disclaimer.
10692eebe0SSam Leffler.\" 2. Redistributions in binary form must reproduce the above copyright
11692eebe0SSam Leffler.\"    notice, this list of conditions and the following disclaimer in the
12692eebe0SSam Leffler.\"    documentation and/or other materials provided with the distribution.
13692eebe0SSam Leffler.\"
14692eebe0SSam Leffler.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15692eebe0SSam Leffler.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16692eebe0SSam Leffler.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17692eebe0SSam Leffler.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18692eebe0SSam Leffler.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19692eebe0SSam Leffler.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20692eebe0SSam Leffler.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21692eebe0SSam Leffler.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22692eebe0SSam Leffler.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23692eebe0SSam Leffler.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24692eebe0SSam Leffler.\" SUCH DAMAGE.
25692eebe0SSam Leffler.\"
26692eebe0SSam Leffler.\" $FreeBSD$
27692eebe0SSam Leffler.\"
28692eebe0SSam Leffler.Dd August 4, 2009
29692eebe0SSam Leffler.Dt IEEE80211_BEACON 9
30692eebe0SSam Leffler.Os
31692eebe0SSam Leffler.Sh NAME
32692eebe0SSam Leffler.Nm ieee80211_beacon
33692eebe0SSam Leffler.Nd 802.11 beacon support
34692eebe0SSam Leffler.Sh SYNOPSIS
35692eebe0SSam Leffler.In net80211/ieee80211_var.h
36692eebe0SSam Leffler.Pp
37692eebe0SSam Leffler.Ft "struct mbuf *"
38692eebe0SSam Leffler.Fo ieee80211_beacon_alloc
39692eebe0SSam Leffler.Fa "struct ieee80211_node *"
40692eebe0SSam Leffler.Fa "struct ieee80211_beacon_offsets *"
41692eebe0SSam Leffler.Fc
42692eebe0SSam Leffler.\"
43692eebe0SSam Leffler.Ft int
44692eebe0SSam Leffler.Fo ieee80211_beacon_update
45692eebe0SSam Leffler.Fa "struct ieee80211_node *"
46692eebe0SSam Leffler.Fa "struct ieee80211_beacon_offsets *"
47692eebe0SSam Leffler.Fa "struct mbuf *"
48692eebe0SSam Leffler.Fa "int mcast"
49692eebe0SSam Leffler.Fc
50692eebe0SSam Leffler.\"
51692eebe0SSam Leffler.Ft void
52692eebe0SSam Leffler.Fn ieee80211_beacon_notify "struct ieee80211vap *" "int what"
53692eebe0SSam Leffler.Sh DESCRIPTION
54692eebe0SSam LefflerThe
55692eebe0SSam Leffler.Nm net80211
56692eebe0SSam Lefflersoftware layer provides a support framework for drivers that includes
57692eebe0SSam Lefflera template-based mechanism for dynamic update of beacon frames transmit
58692eebe0SSam Lefflerin hostap, adhoc, and mesh operating modes.
59692eebe0SSam LefflerDrivers should use
60692eebe0SSam Leffler.Fn ieee80211_beacon_alloc
61692eebe0SSam Lefflerto create an initial beacon frame.
62692eebe0SSam LefflerThe
63692eebe0SSam Leffler.Vt ieee80211_beacon_offsets
64692eebe0SSam Lefflerstructure holds information about the beacon contents that is used
65692eebe0SSam Lefflerto optimize updates done with
66692eebe0SSam Leffler.Fn ieee80211_beacon_update .
67692eebe0SSam Leffler.Pp
68692eebe0SSam LefflerUpdate calls should only be done when something changes that
69692eebe0SSam Leffleraffects the contents of the beacon frame.
70692eebe0SSam LefflerWhen this happens the
71692eebe0SSam Leffler.Dv iv_update_beacon
72692eebe0SSam Lefflermethod is invoked and a driver-supplied routine must do the right thing.
73692eebe0SSam LefflerFor devices that involve the host to transmit each
74692eebe0SSam Lefflerbeacon frame this work may be as simple as marking a bit in the
75692eebe0SSam Leffler.Vt ieee80211_beacon_offsets
76692eebe0SSam Lefflerstructure:
77692eebe0SSam Leffler.Bd -literal
78692eebe0SSam Lefflerstatic void
79692eebe0SSam Lefflerath_beacon_update(struct ieee80211vap *vap, int item)
80692eebe0SSam Leffler{
81692eebe0SSam Leffler        struct ieee80211_beacon_offsets *bo = &ATH_VAP(vap)->av_boff;
82692eebe0SSam Leffler	setbit(bo->bo_flags, item);
83692eebe0SSam Leffler}
84692eebe0SSam Leffler.Ed
85692eebe0SSam Leffler.Pp
86692eebe0SSam Lefflerwith the
87692eebe0SSam Leffler.Fn ieee80211_beacon_update
88692eebe0SSam Lefflercall done before the next beacon is to be sent.
89692eebe0SSam Leffler.Pp
90692eebe0SSam LefflerDevices that off-load beacon generation may instead choose to use
91692eebe0SSam Lefflerthis callback to push updates immediately to the device.
92692eebe0SSam LefflerExactly how that is accomplished is unspecified.
93692eebe0SSam LefflerOne possibility is to update the beacon frame contents and extract
94692eebe0SSam Lefflerthe appropriate information element, but other scenarios are possible.
95692eebe0SSam Leffler.Sh MULTI-VAP BEACON SCHEDULING
96692eebe0SSam LefflerDrivers that support multiple vaps that can each beacon need to consider
97692eebe0SSam Lefflerhow to schedule beacon frames.
98692eebe0SSam LefflerThere are two possibilities at the moment:
99692eebe0SSam Leffler.Em burst
100692eebe0SSam Lefflerall beacons at TBTT or
101692eebe0SSam Leffler.Em stagger beacons
102692eebe0SSam Lefflerover the beacon interval.
103692eebe0SSam LefflerBursting beacon frames may result in aperiodic delivery that can affect
104692eebe0SSam Lefflerpower save operation of associated stations.
105692eebe0SSam LefflerApplying some jitter (e.g. by randomly ordering burst frames) may be
106692eebe0SSam Lefflersufficient to combat this and typically this is not an issue unless
107692eebe0SSam Lefflerstations are using aggressive power save techniques
108692eebe0SSam Lefflersuch as U-APSD (sometimes employed by VoIP phones).
109692eebe0SSam LefflerStaggering frames requires more interrupts and device support that
110692eebe0SSam Lefflermay not be available.
111692eebe0SSam LefflerStaggering beacon frames is usually superior to bursting frames, up to
112692eebe0SSam Lefflerabout eight vaps, at which point the overhead becomes significant and
113692eebe0SSam Lefflerthe channel becomes noticeably busy anyway.
114692eebe0SSam Leffler.Sh SEE ALSO
115692eebe0SSam Leffler.Xr ieee80211 9 .
116