net/mac80211/trace.h
Source file repositories/reference/linux-study-clean/net/mac80211/trace.h
File Facts
- System
- Linux kernel
- Corpus path
net/mac80211/trace.h- Extension
.h- Size
- 74208 bytes
- Lines
- 3413
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: implementation source
- Status
- source implementation candidate
Why This File Exists
Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/tracepoint.hnet/mac80211.hieee80211_i.htrace/define_trace.h
Detected Declarations
struct trace_vif_entrystruct trace_chandef_entrystruct trace_switch_entry
Annotated Snippet
struct trace_vif_entry {
enum nl80211_iftype vif_type;
bool p2p;
char vif_name[IFNAMSIZ];
} __packed;
struct trace_chandef_entry {
u32 control_freq;
u32 freq_offset;
u32 chan_width;
u32 center_freq1;
u32 freq1_offset;
u32 center_freq2;
} __packed;
struct trace_switch_entry {
struct trace_vif_entry vif;
unsigned int link_id;
struct trace_chandef_entry old_chandef;
struct trace_chandef_entry new_chandef;
} __packed;
#define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from
#endif
TRACE_EVENT(drv_switch_vif_chanctx,
TP_PROTO(struct ieee80211_local *local,
struct ieee80211_vif_chanctx_switch *vifs,
int n_vifs, enum ieee80211_chanctx_switch_mode mode),
TP_ARGS(local, vifs, n_vifs, mode),
TP_STRUCT__entry(
LOCAL_ENTRY
__field(int, n_vifs)
__field(u32, mode)
__dynamic_array(u8, vifs,
sizeof(struct trace_switch_entry) * n_vifs)
),
TP_fast_assign(
LOCAL_ASSIGN;
__entry->n_vifs = n_vifs;
__entry->mode = mode;
{
struct trace_switch_entry *local_vifs =
__get_dynamic_array(vifs);
int i;
for (i = 0; i < n_vifs; i++) {
struct ieee80211_sub_if_data *sdata;
sdata = container_of(vifs[i].vif,
struct ieee80211_sub_if_data,
vif);
SWITCH_ENTRY_ASSIGN(vif.vif_type, vif->type);
SWITCH_ENTRY_ASSIGN(vif.p2p, vif->p2p);
SWITCH_ENTRY_ASSIGN(link_id, link_conf->link_id);
strscpy_pad(local_vifs[i].vif.vif_name,
sdata->name);
SWITCH_ENTRY_ASSIGN(old_chandef.control_freq,
old_ctx->def.chan->center_freq);
SWITCH_ENTRY_ASSIGN(old_chandef.freq_offset,
old_ctx->def.chan->freq_offset);
SWITCH_ENTRY_ASSIGN(old_chandef.chan_width,
old_ctx->def.width);
SWITCH_ENTRY_ASSIGN(old_chandef.center_freq1,
old_ctx->def.center_freq1);
SWITCH_ENTRY_ASSIGN(old_chandef.freq1_offset,
old_ctx->def.freq1_offset);
SWITCH_ENTRY_ASSIGN(old_chandef.center_freq2,
old_ctx->def.center_freq2);
SWITCH_ENTRY_ASSIGN(new_chandef.control_freq,
new_ctx->def.chan->center_freq);
SWITCH_ENTRY_ASSIGN(new_chandef.freq_offset,
new_ctx->def.chan->freq_offset);
SWITCH_ENTRY_ASSIGN(new_chandef.chan_width,
new_ctx->def.width);
SWITCH_ENTRY_ASSIGN(new_chandef.center_freq1,
new_ctx->def.center_freq1);
SWITCH_ENTRY_ASSIGN(new_chandef.freq1_offset,
new_ctx->def.freq1_offset);
SWITCH_ENTRY_ASSIGN(new_chandef.center_freq2,
new_ctx->def.center_freq2);
}
}
),
TP_printk(
LOCAL_PR_FMT " n_vifs:%d mode:%d",
Annotation
- Immediate include surface: `linux/tracepoint.h`, `net/mac80211.h`, `ieee80211_i.h`, `trace/define_trace.h`.
- Detected declarations: `struct trace_vif_entry`, `struct trace_chandef_entry`, `struct trace_switch_entry`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.