IEEE80211_BEACON(9)
π« ieee80211_beacon β 802.11 beacon support π«
okay bestie, so this is a page from the Kernel Developer's Manual, and it's all about ieee80211_beacon β the 802.11 beacon support situation. buckle up, it's actually so good π
πΈ SYNOPSIS πΈ
like, first you gotta pull in the header:
#include <net80211/ieee80211_var.h>
then the three iconic functions, exactly as they are:
struct mbuf *
ieee80211_beacon_alloc(struct ieee80211_node *,
struct ieee80211_beacon_offsets *);
int
ieee80211_beacon_update(struct ieee80211_node *,
struct ieee80211_beacon_offsets *, struct mbuf *, int mcast);
void
ieee80211_beacon_notify(struct ieee80211vap *, int what);
no cap, that's the whole API right there β¨
π¦ DESCRIPTION π¦
the net80211 software layer is literally the supportive bestie of drivers β it gives you a whole support framework, including a template-based mechanism for dynamically updating beacon frames that get transmitted in hostap, adhoc, and mesh operating modes. main character framework energy fr fr π
so here's the tea: drivers should use ieee80211_beacon_alloc() to create an initial beacon frame. and the ieee80211_beacon_offsets structure? it holds info about what's inside the beacon, and that's what's used to optimize updates done with ieee80211_beacon_update(). iykyk π
important vibe check: update calls should only be done when something actually changes that affects the contents of the beacon frame. don't be out here updating for no reason π
when a change happens, the iv_update_beacon method is invoked, and a driver-supplied routine must do the right thing. for devices that involve the host to transmit each beacon frame, that work may be as simple as marking a bit in the ieee80211_beacon_offsets structure, like this:
static void
ath_beacon_update(struct ieee80211vap *vap, int item)
{
struct ieee80211_beacon_offsets *bo = &ATH_VAP(vap)->av_boff;
setbit(bo->bo_flags, item);
}
and then the ieee80211_beacon_update() call gets done before the next beacon is to be sent. so efficient, we love her π«Ά
devices that off-load beacon generation may instead choose to use this callback to push updates immediately to the device. exactly how that is accomplished is unspecified β so no guessing, bestie, the page doesn't say π. one possibility is to update the beacon frame contents and extract the appropriate information element, but other scenarios are possible. possibilities are endless, honestly π
π₯ MULTI-VAP BEACON SCHEDULING π₯
drivers that support multiple vaps that can each beacon need to consider how to schedule beacon frames. there are two possibilities at the moment:
- burst all beacons at TBTT
- stagger beacons over the beacon interval
so let's talk about it π
bursting beacon frames may result in aperiodic delivery, which can affect power save operation of associated stations. applying some jitter (e.g. by randomly ordering burst frames) may be sufficient to combat this, and typically this is not an issue unless stations are using aggressive power save techniques such as U-APSD (sometimes employed by VoIP phones). like, that's a very specific scenario but okay, noted π
staggering frames requires more interrupts and device support that may not be available. so it's giving high maintenance, butβ
staggering beacon frames is usually superior to bursting frames, up to about eight vaps, at which point the overhead becomes significant and the channel becomes noticeably busy anyway. so basically, eight vaps is the vibe limit πβ¨
π SEE ALSO π
okay that's the whole thing, bestie, you're officially a beacon scheduling expert π
this page came from the Debian crew, dated August 4, 2009, and it's living inside the Kernel Developer's Manual β go off, legends π«Άβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2009 Sam Leffler, Errno Consulting
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms