include/linux/soc/mediatek/mtk_wed.h
Source file repositories/reference/linux-study-clean/include/linux/soc/mediatek/mtk_wed.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/soc/mediatek/mtk_wed.h- Extension
.h- Size
- 9506 bytes
- Lines
- 334
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- 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/rcupdate.hlinux/regmap.hlinux/pci.hlinux/skbuff.hlinux/netdevice.h
Detected Declarations
struct mtk_wed_hwstruct mtk_wdma_descstruct mtk_wed_bm_descstruct mtk_wed_ringstruct mtk_wed_wo_rx_statsstruct mtk_wed_bufstruct mtk_wed_devicestruct mtk_wed_opsenum mtk_wed_wo_cmdenum mtk_wed_bus_tyefunction mtk_wed_device_attachfunction mtk_wed_get_rx_capafunction mtk_wed_is_amsdu_supportedfunction mtk_wed_device_active
Annotated Snippet
struct mtk_wed_bm_desc {
__le32 buf0;
__le32 token;
} __packed __aligned(4);
enum mtk_wed_bus_tye {
MTK_WED_BUS_PCIE,
MTK_WED_BUS_AXI,
};
#define MTK_WED_RING_CONFIGURED BIT(0)
struct mtk_wed_ring {
struct mtk_wdma_desc *desc;
dma_addr_t desc_phys;
u32 desc_size;
int size;
u32 flags;
u32 reg_base;
void __iomem *wpdma;
};
struct mtk_wed_wo_rx_stats {
__le16 wlan_idx;
__le16 tid;
__le32 rx_pkt_cnt;
__le32 rx_byte_cnt;
__le32 rx_err_cnt;
__le32 rx_drop_cnt;
};
struct mtk_wed_buf {
void *p;
dma_addr_t phy_addr;
};
struct mtk_wed_device {
#ifdef CONFIG_NET_MEDIATEK_SOC_WED
const struct mtk_wed_ops *ops;
struct device *dev;
struct mtk_wed_hw *hw;
bool init_done, running;
int wdma_idx;
int irq;
u8 version;
/* used by wlan driver */
u32 rev_id;
struct mtk_wed_ring tx_ring[MTK_WED_TX_QUEUES];
struct mtk_wed_ring rx_ring[MTK_WED_RX_QUEUES];
struct mtk_wed_ring txfree_ring;
struct mtk_wed_ring tx_wdma[MTK_WED_TX_QUEUES];
struct mtk_wed_ring rx_wdma[MTK_WED_RX_QUEUES];
struct mtk_wed_ring rx_rro_ring[MTK_WED_RX_QUEUES];
struct mtk_wed_ring rx_page_ring[MTK_WED_RX_PAGE_QUEUES];
struct mtk_wed_ring ind_cmd_ring;
struct {
int size;
struct mtk_wed_buf *pages;
struct mtk_wdma_desc *desc;
dma_addr_t desc_phys;
} tx_buf_ring;
struct {
int size;
struct mtk_wed_bm_desc *desc;
dma_addr_t desc_phys;
} rx_buf_ring;
struct {
struct mtk_wed_ring ring;
dma_addr_t miod_phys;
dma_addr_t fdbk_phys;
} rro;
struct {
int size;
struct mtk_wed_buf *pages;
struct mtk_wed_bm_desc *desc;
dma_addr_t desc_phys;
} hw_rro;
/* filled by driver: */
struct {
union {
struct platform_device *platform_dev;
struct pci_dev *pci_dev;
};
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/rcupdate.h`, `linux/regmap.h`, `linux/pci.h`, `linux/skbuff.h`, `linux/netdevice.h`.
- Detected declarations: `struct mtk_wed_hw`, `struct mtk_wdma_desc`, `struct mtk_wed_bm_desc`, `struct mtk_wed_ring`, `struct mtk_wed_wo_rx_stats`, `struct mtk_wed_buf`, `struct mtk_wed_device`, `struct mtk_wed_ops`, `enum mtk_wed_wo_cmd`, `enum mtk_wed_bus_tye`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.