drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c- Extension
.c- Size
- 45460 bytes
- Lines
- 1688
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/netdevice.hlinux/etherdevice.hbrcmu_utils.hbrcmu_wifi.hcore.hdebug.hproto.hmsgbuf.hcommonring.hflowring.hbus.htracepoint.h
Detected Declarations
struct msgbuf_common_hdrstruct msgbuf_ioctl_req_hdrstruct msgbuf_tx_msghdrstruct msgbuf_rx_bufpoststruct msgbuf_rx_ioctl_resp_or_eventstruct msgbuf_completion_hdrstruct msgbuf_gen_statusstruct msgbuf_ring_statusstruct msgbuf_rx_eventstruct msgbuf_ioctl_resp_hdrstruct msgbuf_tx_statusstruct msgbuf_rx_completestruct msgbuf_tx_flowring_create_reqstruct msgbuf_tx_flowring_delete_reqstruct msgbuf_flowring_create_respstruct msgbuf_flowring_delete_respstruct msgbuf_flowring_flush_respstruct brcmf_msgbuf_work_itemstruct brcmf_msgbufstruct brcmf_msgbuf_pktidstruct brcmf_msgbuf_pktidsfunction brcmf_msgbuf_init_pktidsfunction brcmf_msgbuf_alloc_pktidfunction brcmf_msgbuf_get_pktidfunction brcmf_msgbuf_release_arrayfunction brcmf_msgbuf_release_pktidsfunction brcmf_msgbuf_tx_ioctlfunction brcmf_msgbuf_ioctl_resp_waitfunction brcmf_msgbuf_ioctl_resp_wakefunction brcmf_msgbuf_query_dcmdfunction brcmf_msgbuf_set_dcmdfunction brcmf_msgbuf_hdrpullfunction brcmf_msgbuf_rxreorderfunction brcmf_msgbuf_dequeue_workfunction brcmf_msgbuf_flowring_create_workerfunction brcmf_msgbuf_flowring_workerfunction brcmf_msgbuf_flowring_createfunction brcmf_msgbuf_txflowfunction brcmf_msgbuf_txflow_workerfunction brcmf_msgbuf_schedule_txdatafunction brcmf_msgbuf_tx_queue_datafunction brcmf_msgbuf_configure_addr_modefunction brcmf_msgbuf_delete_peerfunction brcmf_msgbuf_add_tdls_peerfunction brcmf_msgbuf_process_ioctl_completefunction brcmf_msgbuf_process_txstatusfunction brcmf_msgbuf_rxbuf_data_postfunction brcmf_msgbuf_rxbuf_data_fill
Annotated Snippet
struct msgbuf_common_hdr {
u8 msgtype;
u8 ifidx;
u8 flags;
u8 rsvd0;
__le32 request_id;
};
struct msgbuf_ioctl_req_hdr {
struct msgbuf_common_hdr msg;
__le32 cmd;
__le16 trans_id;
__le16 input_buf_len;
__le16 output_buf_len;
__le16 rsvd0[3];
struct msgbuf_buf_addr req_buf_addr;
__le32 rsvd1[2];
};
struct msgbuf_tx_msghdr {
struct msgbuf_common_hdr msg;
u8 txhdr[ETH_HLEN];
u8 flags;
u8 seg_cnt;
struct msgbuf_buf_addr metadata_buf_addr;
struct msgbuf_buf_addr data_buf_addr;
__le16 metadata_buf_len;
__le16 data_len;
__le32 rsvd0;
};
struct msgbuf_rx_bufpost {
struct msgbuf_common_hdr msg;
__le16 metadata_buf_len;
__le16 data_buf_len;
__le32 rsvd0;
struct msgbuf_buf_addr metadata_buf_addr;
struct msgbuf_buf_addr data_buf_addr;
};
struct msgbuf_rx_ioctl_resp_or_event {
struct msgbuf_common_hdr msg;
__le16 host_buf_len;
__le16 rsvd0[3];
struct msgbuf_buf_addr host_buf_addr;
__le32 rsvd1[4];
};
struct msgbuf_completion_hdr {
__le16 status;
__le16 flow_ring_id;
};
/* Data struct for the MSGBUF_TYPE_GEN_STATUS */
struct msgbuf_gen_status {
struct msgbuf_common_hdr msg;
struct msgbuf_completion_hdr compl_hdr;
__le16 write_idx;
__le32 rsvd0[3];
};
/* Data struct for the MSGBUF_TYPE_RING_STATUS */
struct msgbuf_ring_status {
struct msgbuf_common_hdr msg;
struct msgbuf_completion_hdr compl_hdr;
__le16 write_idx;
__le16 rsvd0[5];
};
struct msgbuf_rx_event {
struct msgbuf_common_hdr msg;
struct msgbuf_completion_hdr compl_hdr;
__le16 event_data_len;
__le16 seqnum;
__le16 rsvd0[4];
};
struct msgbuf_ioctl_resp_hdr {
struct msgbuf_common_hdr msg;
struct msgbuf_completion_hdr compl_hdr;
__le16 resp_len;
__le16 trans_id;
__le32 cmd;
__le32 rsvd0;
};
struct msgbuf_tx_status {
struct msgbuf_common_hdr msg;
struct msgbuf_completion_hdr compl_hdr;
__le16 metadata_len;
Annotation
- Immediate include surface: `linux/types.h`, `linux/netdevice.h`, `linux/etherdevice.h`, `brcmu_utils.h`, `brcmu_wifi.h`, `core.h`, `debug.h`, `proto.h`.
- Detected declarations: `struct msgbuf_common_hdr`, `struct msgbuf_ioctl_req_hdr`, `struct msgbuf_tx_msghdr`, `struct msgbuf_rx_bufpost`, `struct msgbuf_rx_ioctl_resp_or_event`, `struct msgbuf_completion_hdr`, `struct msgbuf_gen_status`, `struct msgbuf_ring_status`, `struct msgbuf_rx_event`, `struct msgbuf_ioctl_resp_hdr`.
- Atlas domain: Driver Families / drivers/net.
- 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.