net/mac80211/debugfs_netdev.c
Source file repositories/reference/linux-study-clean/net/mac80211/debugfs_netdev.c
File Facts
- System
- Linux kernel
- Corpus path
net/mac80211/debugfs_netdev.c- Extension
.c- Size
- 32063 bytes
- Lines
- 1106
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/kernel.hlinux/device.hlinux/hex.hlinux/if.hlinux/if_ether.hlinux/interrupt.hlinux/netdevice.hlinux/rtnetlink.hlinux/slab.hlinux/notifier.hnet/mac80211.hnet/cfg80211.hieee80211_i.hrate.hdebugfs.hdebugfs_netdev.hdriver-ops.h
Detected Declarations
struct ieee80211_if_read_sdata_datastruct ieee80211_if_write_sdata_datastruct ieee80211_if_read_link_datastruct ieee80211_if_write_link_datafunction ieee80211_if_read_sdata_handlerfunction ieee80211_if_read_sdatafunction ieee80211_if_write_sdata_handlerfunction ieee80211_if_write_sdatafunction ieee80211_if_read_link_handlerfunction ieee80211_if_read_linkfunction ieee80211_if_write_link_handlerfunction ieee80211_if_write_linkfunction ieee80211_if_fmt_rc_rateidx_vht_mcs_mask_2ghzfunction ieee80211_if_fmt_rc_rateidx_vht_mcs_mask_5ghzfunction ieee80211_if_fmt_hw_queuesfunction ieee80211_set_smpsfunction ieee80211_if_fmt_smpsfunction ieee80211_if_parse_smpsfunction ieee80211_if_parse_tkip_mic_testfunction ieee80211_if_parse_beacon_lossfunction ieee80211_if_fmt_uapsd_queuesfunction ieee80211_if_parse_uapsd_queuesfunction ieee80211_if_fmt_uapsd_max_sp_lenfunction ieee80211_if_parse_uapsd_max_sp_lenfunction ieee80211_if_fmt_tdls_wider_bwfunction ieee80211_if_parse_tdls_wider_bwfunction ieee80211_if_fmt_num_buffered_multicastfunction ieee80211_if_fmt_aqmfunction ieee80211_if_fmt_tsffunction ieee80211_if_parse_tsffunction ieee80211_if_fmt_valid_linksfunction ieee80211_if_fmt_active_linksfunction ieee80211_if_parse_active_linksfunction add_common_filesfunction add_sta_filesfunction add_ap_filesfunction add_vlan_filesfunction add_ibss_filesfunction add_mesh_filesfunction add_mesh_statsfunction add_mesh_configfunction add_filesfunction add_link_filesfunction ieee80211_debugfs_add_netdevfunction ieee80211_debugfs_remove_netdevfunction ieee80211_debugfs_rename_netdevfunction ieee80211_debugfs_recreate_netdevfunction ieee80211_link_debugfs_add
Annotated Snippet
struct ieee80211_if_read_sdata_data {
ssize_t (*format)(const struct ieee80211_sub_if_data *, char *, int);
struct ieee80211_sub_if_data *sdata;
};
static ssize_t ieee80211_if_read_sdata_handler(struct wiphy *wiphy,
struct file *file,
char *buf,
size_t bufsize,
void *data)
{
struct ieee80211_if_read_sdata_data *d = data;
return d->format(d->sdata, buf, bufsize);
}
static ssize_t ieee80211_if_read_sdata(
struct file *file,
char __user *userbuf,
size_t count, loff_t *ppos,
ssize_t (*format)(const struct ieee80211_sub_if_data *sdata, char *, int))
{
struct ieee80211_sub_if_data *sdata = file->private_data;
struct ieee80211_if_read_sdata_data data = {
.format = format,
.sdata = sdata,
};
char buf[200];
return wiphy_locked_debugfs_read(sdata->local->hw.wiphy,
file, buf, sizeof(buf),
userbuf, count, ppos,
ieee80211_if_read_sdata_handler,
&data);
}
struct ieee80211_if_write_sdata_data {
ssize_t (*write)(struct ieee80211_sub_if_data *, const char *, int);
struct ieee80211_sub_if_data *sdata;
};
static ssize_t ieee80211_if_write_sdata_handler(struct wiphy *wiphy,
struct file *file,
char *buf,
size_t count,
void *data)
{
struct ieee80211_if_write_sdata_data *d = data;
return d->write(d->sdata, buf, count);
}
static ssize_t ieee80211_if_write_sdata(
struct file *file,
const char __user *userbuf,
size_t count, loff_t *ppos,
ssize_t (*write)(struct ieee80211_sub_if_data *sdata, const char *, int))
{
struct ieee80211_sub_if_data *sdata = file->private_data;
struct ieee80211_if_write_sdata_data data = {
.write = write,
.sdata = sdata,
};
char buf[64];
return wiphy_locked_debugfs_write(sdata->local->hw.wiphy,
file, buf, sizeof(buf),
userbuf, count,
ieee80211_if_write_sdata_handler,
&data);
}
struct ieee80211_if_read_link_data {
ssize_t (*format)(const struct ieee80211_link_data *, char *, int);
struct ieee80211_link_data *link;
};
static ssize_t ieee80211_if_read_link_handler(struct wiphy *wiphy,
struct file *file,
char *buf,
size_t bufsize,
void *data)
{
struct ieee80211_if_read_link_data *d = data;
return d->format(d->link, buf, bufsize);
}
static ssize_t ieee80211_if_read_link(
struct file *file,
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/device.h`, `linux/hex.h`, `linux/if.h`, `linux/if_ether.h`, `linux/interrupt.h`, `linux/netdevice.h`, `linux/rtnetlink.h`.
- Detected declarations: `struct ieee80211_if_read_sdata_data`, `struct ieee80211_if_write_sdata_data`, `struct ieee80211_if_read_link_data`, `struct ieee80211_if_write_link_data`, `function ieee80211_if_read_sdata_handler`, `function ieee80211_if_read_sdata`, `function ieee80211_if_write_sdata_handler`, `function ieee80211_if_write_sdata`, `function ieee80211_if_read_link_handler`, `function ieee80211_if_read_link`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- 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.