drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h- Extension
.h- Size
- 9661 bytes
- Lines
- 354
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
../mt792x.hregs.h
Detected Declarations
struct mt7921_realease_infostruct mt7921_fw_featuresstruct mt7921_roc_grant_tlvstruct mt7921_sdio_intrstruct mt7921_dma_layoutstruct mt7921_clc_rulestruct mt7921_clcstruct mt7921_txpwrenum mt7921_roc_reqenum mt7921_sdio_pkt_typeenum mt7921_txq_idenum mt7921_rxq_idenum mt7902_txq_idenum mt7921_eeprom_fieldfunction mt7921_reg_map_l1function mt7921_l1_rrfunction mt7921_l1_wrfunction mt7921_l1_rmw
Annotated Snippet
struct mt7921_realease_info {
__le16 len;
u8 pad_len;
u8 tag;
} __packed;
struct mt7921_fw_features {
u8 segment;
u8 data;
u8 rsv[14];
} __packed;
struct mt7921_roc_grant_tlv {
__le16 tag;
__le16 len;
u8 bss_idx;
u8 tokenid;
u8 status;
u8 primarychannel;
u8 rfsco;
u8 rfband;
u8 channelwidth;
u8 centerfreqseg1;
u8 centerfreqseg2;
u8 reqtype;
u8 dbdcband;
u8 rsv[1];
__le32 max_interval;
} __packed;
enum mt7921_sdio_pkt_type {
MT7921_SDIO_TXD,
MT7921_SDIO_DATA,
MT7921_SDIO_CMD,
MT7921_SDIO_FWDL,
};
struct mt7921_sdio_intr {
u32 isr;
struct {
u32 wtqcr[16];
} tx;
struct {
u16 num[2];
u16 len0[16];
u16 len1[128];
} rx;
u32 rec_mb[2];
} __packed;
#define to_rssi(field, rxv) ((FIELD_GET(field, rxv) - 220) / 2)
#define to_rcpi(rssi) (2 * (rssi) + 220)
enum mt7921_txq_id {
MT7921_TXQ_BAND0,
MT7921_TXQ_BAND1,
MT7921_TXQ_FWDL = 16,
MT7921_TXQ_MCU_WM,
};
enum mt7921_rxq_id {
MT7921_RXQ_BAND0 = 0,
MT7921_RXQ_BAND1,
MT7921_RXQ_MCU_WM = 0,
};
/* MT7902 assigns its MCU-WM TXQ at index 15 */
enum mt7902_txq_id {
MT7902_TXQ_MCU_WM = 15,
};
struct mt7921_dma_layout {
u8 mcu_wm_txq;
u16 mcu_rxdone_ring_size;
bool has_mcu_wa;
};
enum {
MT7921_CLC_POWER,
MT7921_CLC_CHAN,
MT7921_CLC_MAX_NUM,
};
struct mt7921_clc_rule {
u8 alpha2[2];
u8 type[2];
__le16 len;
u8 data[];
} __packed;
Annotation
- Immediate include surface: `../mt792x.h`, `regs.h`.
- Detected declarations: `struct mt7921_realease_info`, `struct mt7921_fw_features`, `struct mt7921_roc_grant_tlv`, `struct mt7921_sdio_intr`, `struct mt7921_dma_layout`, `struct mt7921_clc_rule`, `struct mt7921_clc`, `struct mt7921_txpwr`, `enum mt7921_roc_req`, `enum mt7921_sdio_pkt_type`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
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.