drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h- Extension
.h- Size
- 50320 bytes
- Lines
- 2109
- 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
mt76_connac.h
Detected Declarations
struct mt76_connac2_mcu_txdstruct mt76_connac2_mcu_uni_txdstruct mt76_connac2_mcu_rxdstruct mt76_connac2_patch_hdrstruct mt76_connac2_patch_secstruct mt76_connac2_fw_trailerstruct mt76_connac2_fw_regionstruct tlvstruct bss_info_omacstruct bss_info_basicstruct bss_info_rf_chstruct bss_info_ext_bssstruct sta_ntlv_hdrstruct sta_req_hdrstruct sta_rec_basicstruct sta_rec_htstruct sta_rec_vhtstruct sta_rec_uapsdstruct sta_rec_bastruct sta_rec_hestruct sta_rec_he_v2struct sta_rec_amsdustruct sta_rec_statestruct sta_rec_ra_infostruct sta_rec_phystruct sta_rec_he_6g_capastruct sta_rec_pn_infostruct sec_keystruct sta_rec_secstruct sta_rec_bfstruct sta_rec_bfeestruct sta_rec_murustruct sta_rec_removestruct sta_phystruct sta_rec_rastruct sta_rec_ra_fixedstruct sta_rec_tx_procstruct sta_rec_eml_opstruct wtbl_req_hdrstruct wtbl_genericstruct wtbl_rxstruct wtbl_htstruct wtbl_vhtstruct wtbl_tx_psstruct wtbl_hdr_transstruct wtbl_bastruct wtbl_smpsstruct wtbl_bf
Annotated Snippet
struct mt76_connac2_mcu_txd {
__le32 txd[8];
__le16 len;
__le16 pq_id;
u8 cid;
u8 pkt_type;
u8 set_query; /* FW don't care */
u8 seq;
u8 uc_d2b0_rev;
u8 ext_cid;
u8 s2d_index;
u8 ext_cid_ack;
u32 rsv[5];
} __packed __aligned(4);
/**
* struct mt76_connac2_mcu_uni_txd - mcu command descriptor for connac2 and connac3
* @txd: hardware descriptor
* @len: total length not including txd
* @cid: command identifier
* @pkt_type: must be 0xa0 (cmd packet by long format)
* @frag_n: fragment number
* @seq: sequence number
* @checksum: 0 mean there is no checksum
* @s2d_index: index for command source and destination
* Definition | value | note
* CMD_S2D_IDX_H2N | 0x00 | command from HOST to WM
* CMD_S2D_IDX_C2N | 0x01 | command from WA to WM
* CMD_S2D_IDX_H2C | 0x02 | command from HOST to WA
* CMD_S2D_IDX_H2N_AND_H2C | 0x03 | command from HOST to WA and WM
*
* @option: command option
* BIT[0]: UNI_CMD_OPT_BIT_ACK
* set to 1 to request a fw reply
* if UNI_CMD_OPT_BIT_0_ACK is set and UNI_CMD_OPT_BIT_2_SET_QUERY
* is set, mcu firmware will send response event EID = 0x01
* (UNI_EVENT_ID_CMD_RESULT) to the host.
* BIT[1]: UNI_CMD_OPT_BIT_UNI_CMD
* 0: original command
* 1: unified command
* BIT[2]: UNI_CMD_OPT_BIT_SET_QUERY
* 0: QUERY command
* 1: SET command
*/
struct mt76_connac2_mcu_uni_txd {
__le32 txd[8];
/* DW1 */
__le16 len;
__le16 cid;
/* DW2 */
u8 rsv;
u8 pkt_type;
u8 frag_n;
u8 seq;
/* DW3 */
__le16 checksum;
u8 s2d_index;
u8 option;
/* DW4 */
u8 rsv1[4];
} __packed __aligned(4);
struct mt76_connac2_mcu_rxd {
/* New members MUST be added within the struct_group() macro below. */
struct_group_tagged(mt76_connac2_mcu_rxd_hdr, hdr,
__le32 rxd[6];
__le16 len;
__le16 pkt_type_id;
u8 eid;
u8 seq;
u8 option;
u8 rsv;
u8 ext_eid;
u8 rsv1[2];
u8 s2d_index;
);
u8 tlv[];
};
static_assert(offsetof(struct mt76_connac2_mcu_rxd, tlv) == sizeof(struct mt76_connac2_mcu_rxd_hdr),
Annotation
- Immediate include surface: `mt76_connac.h`.
- Detected declarations: `struct mt76_connac2_mcu_txd`, `struct mt76_connac2_mcu_uni_txd`, `struct mt76_connac2_mcu_rxd`, `struct mt76_connac2_patch_hdr`, `struct mt76_connac2_patch_sec`, `struct mt76_connac2_fw_trailer`, `struct mt76_connac2_fw_region`, `struct tlv`, `struct bss_info_omac`, `struct bss_info_basic`.
- 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.