xref: /freebsd/share/man/man9/ieee80211_beacon.9 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
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.Dd August 4, 2009
27692eebe0SSam Leffler.Dt IEEE80211_BEACON 9
28692eebe0SSam Leffler.Os
29692eebe0SSam Leffler.Sh NAME
30692eebe0SSam Leffler.Nm ieee80211_beacon
31692eebe0SSam Leffler.Nd 802.11 beacon support
32692eebe0SSam Leffler.Sh SYNOPSIS
33692eebe0SSam Leffler.In net80211/ieee80211_var.h
34692eebe0SSam Leffler.Pp
35692eebe0SSam Leffler.Ft "struct mbuf *"
36692eebe0SSam Leffler.Fo ieee80211_beacon_alloc
37692eebe0SSam Leffler.Fa "struct ieee80211_node *"
38692eebe0SSam Leffler.Fa "struct ieee80211_beacon_offsets *"
39692eebe0SSam Leffler.Fc
40692eebe0SSam Leffler.\"
41692eebe0SSam Leffler.Ft int
42692eebe0SSam Leffler.Fo ieee80211_beacon_update
43692eebe0SSam Leffler.Fa "struct ieee80211_node *"
44692eebe0SSam Leffler.Fa "struct ieee80211_beacon_offsets *"
45692eebe0SSam Leffler.Fa "struct mbuf *"
46692eebe0SSam Leffler.Fa "int mcast"
47692eebe0SSam Leffler.Fc
48692eebe0SSam Leffler.\"
49692eebe0SSam Leffler.Ft void
50692eebe0SSam Leffler.Fn ieee80211_beacon_notify "struct ieee80211vap *" "int what"
51692eebe0SSam Leffler.Sh DESCRIPTION
52692eebe0SSam LefflerThe
53692eebe0SSam Leffler.Nm net80211
54692eebe0SSam Lefflersoftware layer provides a support framework for drivers that includes
55692eebe0SSam Lefflera template-based mechanism for dynamic update of beacon frames transmit
56692eebe0SSam Lefflerin hostap, adhoc, and mesh operating modes.
57692eebe0SSam LefflerDrivers should use
58692eebe0SSam Leffler.Fn ieee80211_beacon_alloc
59692eebe0SSam Lefflerto create an initial beacon frame.
60692eebe0SSam LefflerThe
61692eebe0SSam Leffler.Vt ieee80211_beacon_offsets
62692eebe0SSam Lefflerstructure holds information about the beacon contents that is used
63692eebe0SSam Lefflerto optimize updates done with
64692eebe0SSam Leffler.Fn ieee80211_beacon_update .
65692eebe0SSam Leffler.Pp
66692eebe0SSam LefflerUpdate calls should only be done when something changes that
67692eebe0SSam Leffleraffects the contents of the beacon frame.
68692eebe0SSam LefflerWhen this happens the
69692eebe0SSam Leffler.Dv iv_update_beacon
70692eebe0SSam Lefflermethod is invoked and a driver-supplied routine must do the right thing.
71692eebe0SSam LefflerFor devices that involve the host to transmit each
72692eebe0SSam Lefflerbeacon frame this work may be as simple as marking a bit in the
73692eebe0SSam Leffler.Vt ieee80211_beacon_offsets
74692eebe0SSam Lefflerstructure:
75692eebe0SSam Leffler.Bd -literal
76692eebe0SSam Lefflerstatic void
77692eebe0SSam Lefflerath_beacon_update(struct ieee80211vap *vap, int item)
78692eebe0SSam Leffler{
79692eebe0SSam Leffler        struct ieee80211_beacon_offsets *bo = &ATH_VAP(vap)->av_boff;
80692eebe0SSam Leffler	setbit(bo->bo_flags, item);
81692eebe0SSam Leffler}
82692eebe0SSam Leffler.Ed
83692eebe0SSam Leffler.Pp
84692eebe0SSam Lefflerwith the
85692eebe0SSam Leffler.Fn ieee80211_beacon_update
86692eebe0SSam Lefflercall done before the next beacon is to be sent.
87692eebe0SSam Leffler.Pp
88692eebe0SSam LefflerDevices that off-load beacon generation may instead choose to use
89692eebe0SSam Lefflerthis callback to push updates immediately to the device.
90692eebe0SSam LefflerExactly how that is accomplished is unspecified.
91692eebe0SSam LefflerOne possibility is to update the beacon frame contents and extract
92692eebe0SSam Lefflerthe appropriate information element, but other scenarios are possible.
93692eebe0SSam Leffler.Sh MULTI-VAP BEACON SCHEDULING
94692eebe0SSam LefflerDrivers that support multiple vaps that can each beacon need to consider
95692eebe0SSam Lefflerhow to schedule beacon frames.
96692eebe0SSam LefflerThere are two possibilities at the moment:
97692eebe0SSam Leffler.Em burst
98692eebe0SSam Lefflerall beacons at TBTT or
99692eebe0SSam Leffler.Em stagger beacons
100692eebe0SSam Lefflerover the beacon interval.
101692eebe0SSam LefflerBursting beacon frames may result in aperiodic delivery that can affect
102692eebe0SSam Lefflerpower save operation of associated stations.
103692eebe0SSam LefflerApplying some jitter (e.g. by randomly ordering burst frames) may be
104692eebe0SSam Lefflersufficient to combat this and typically this is not an issue unless
105692eebe0SSam Lefflerstations are using aggressive power save techniques
106692eebe0SSam Lefflersuch as U-APSD (sometimes employed by VoIP phones).
107692eebe0SSam LefflerStaggering frames requires more interrupts and device support that
108692eebe0SSam Lefflermay not be available.
109692eebe0SSam LefflerStaggering beacon frames is usually superior to bursting frames, up to
110692eebe0SSam Lefflerabout eight vaps, at which point the overhead becomes significant and
111692eebe0SSam Lefflerthe channel becomes noticeably busy anyway.
112692eebe0SSam Leffler.Sh SEE ALSO
113ace02a6dSChristian Brueffer.Xr ieee80211 9
114