drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h- Extension
.h- Size
- 9685 bytes
- Lines
- 343
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/firmware.hlinux/device.hdebug.h
Detected Declarations
struct brcmf_mp_devicestruct brcmf_bus_dcmdstruct brcmf_bus_opsstruct brcmf_bus_msgbufstruct brcmf_bus_statsstruct brcmf_busenum brcmf_fwvendorenum brcmf_bus_stateenum brcmf_bus_protocol_typeenum brcmf_blob_typefunction brcmf_bus_preinitfunction brcmf_bus_stopfunction brcmf_bus_txdatafunction brcmf_bus_txctlfunction brcmf_bus_rxctlfunction brcmf_bus_wowl_configfunction brcmf_bus_get_ramsizefunction brcmf_bus_get_memdumpfunction brcmf_bus_get_blobfunction brcmf_bus_debugfs_createfunction brcmf_bus_resetfunction brcmf_bus_removefunction brcmf_sdio_exitfunction brcmf_usb_exitfunction brcmf_pcie_exit
Annotated Snippet
struct brcmf_bus_dcmd {
char *name;
char *param;
int param_len;
struct list_head list;
};
/**
* struct brcmf_bus_ops - bus callback operations.
*
* @preinit: execute bus/device specific dongle init commands (optional).
* @init: prepare for communication with dongle.
* @stop: clear pending frames, disable data flow.
* @txdata: send a data frame to the dongle. When the data
* has been transferred, the common driver must be
* notified using brcmf_txcomplete(). The common
* driver calls this function with interrupts
* disabled.
* @txctl: transmit a control request message to dongle.
* @rxctl: receive a control response message from dongle.
* @gettxq: obtain a reference of bus transmit queue (optional).
* @wowl_config: specify if dongle is configured for wowl when going to suspend
* @get_ramsize: obtain size of device memory.
* @get_memdump: obtain device memory dump in provided buffer.
* @get_blob: obtain a firmware blob.
* @remove: initiate unbind of the device.
*
* This structure provides an abstract interface towards the
* bus specific driver. For control messages to common driver
* will assure there is only one active transaction. Unless
* indicated otherwise these callbacks are mandatory.
*/
struct brcmf_bus_ops {
int (*preinit)(struct device *dev);
void (*stop)(struct device *dev);
int (*txdata)(struct device *dev, struct sk_buff *skb);
int (*txctl)(struct device *dev, unsigned char *msg, uint len);
int (*rxctl)(struct device *dev, unsigned char *msg, uint len);
struct pktq * (*gettxq)(struct device *dev);
void (*wowl_config)(struct device *dev, bool enabled);
size_t (*get_ramsize)(struct device *dev);
int (*get_memdump)(struct device *dev, void *data, size_t len);
int (*get_blob)(struct device *dev, const struct firmware **fw,
enum brcmf_blob_type type);
void (*debugfs_create)(struct device *dev);
int (*reset)(struct device *dev);
void (*remove)(struct device *dev);
};
/**
* struct brcmf_bus_msgbuf - bus ringbuf if in case of msgbuf.
*
* @commonrings: commonrings which are always there.
* @flowrings: commonrings which are dynamically created and destroyed for data.
* @rx_dataoffset: if set then all rx data has this offset.
* @max_rxbufpost: maximum number of buffers to post for rx.
* @max_flowrings: maximum number of tx flow rings supported.
* @max_submissionrings: maximum number of submission rings(h2d) supported.
* @max_completionrings: maximum number of completion rings(d2h) supported.
*/
struct brcmf_bus_msgbuf {
struct brcmf_commonring *commonrings[BRCMF_NROF_COMMON_MSGRINGS];
struct brcmf_commonring **flowrings;
u32 rx_dataoffset;
u32 max_rxbufpost;
u16 max_flowrings;
u16 max_submissionrings;
u16 max_completionrings;
};
/**
* struct brcmf_bus_stats - bus statistic counters.
*
* @pktcowed: packets cowed for extra headroom/unorphan.
* @pktcow_failed: packets dropped due to failed cow-ing.
*/
struct brcmf_bus_stats {
atomic_t pktcowed;
atomic_t pktcow_failed;
};
/**
* struct brcmf_bus - interface structure between common and bus layer
*
* @bus_priv: pointer to private bus device.
* @proto_type: protocol type, bcdc or msgbuf
* @dev: device pointer of bus device.
* @drvr: public driver information.
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/firmware.h`, `linux/device.h`, `debug.h`.
- Detected declarations: `struct brcmf_mp_device`, `struct brcmf_bus_dcmd`, `struct brcmf_bus_ops`, `struct brcmf_bus_msgbuf`, `struct brcmf_bus_stats`, `struct brcmf_bus`, `enum brcmf_fwvendor`, `enum brcmf_bus_state`, `enum brcmf_bus_protocol_type`, `enum brcmf_blob_type`.
- 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.
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.