STRUCT MT76_CONNAC2_MCU_UNI_TXD(9)
π struct mt76_connac2_mcu_uni_txd π
okay bestie, so this is a page from the Kernel API Manual (section 9, the kernel-API girlies) and it's all about one little struct: struct mt76_connac2_mcu_uni_txd β the mcu command descriptor for connac2 and connac3. no cap, that's literally what it is. it's giving "the envelope your command rides in." π
πΈ NAME πΈ
struct mt76_connac2_mcu_uni_txd β the mcu command descriptor for connac2 and connac3. that's the whole assignment. π
β¨ SYNOPSIS β¨
struct mt76_connac2_mcu_uni_txd {
__le32 txd[8];
__le16 len;
__le16 cid;
u8 rsv;
u8 pkt_type;
u8 frag_n;
u8 seq;
__le16 checksum;
u8 s2d_index;
u8 option;
u8 rsv1[4];
};
look at her. iconic layout. every field exactly where it belongs, not a single byte out of place. π«Ά
π¦ Members π¦
so here's the breakdown, field by field, no skipping, we respect every single one:
txdβ the hardware descriptor. that's the hardware's business, we just hold space for it. πlenβ total length, not includingtxd. important!! thetxddoes not count. don't @ me.cidβ the command identifier. which command are we even sending, bestie?pkt_typeβ must be0xa0(cmd packet by long format). must. not "should", not "ideally".0xa0. periodt. π₯frag_nβ fragment number.seqβ sequence number.checksumβ0mean there is no checksum. so if you see a zero, that's the "no checksum" vibe check, okay?s2d_indexβ index for command source and destination. Definition time, get comfy:CMD_S2D_IDX_H2Nβ value0x00β command from HOST to WMCMD_S2D_IDX_C2Nβ value0x01β command from WA to WMCMD_S2D_IDX_H2Cβ value0x02β command from HOST to WACMD_S2D_IDX_H2N_AND_H2Cβ value0x03β command from HOST to WA and WM
optionβ command option. three whole bits of personality:- BIT[0]:
UNI_CMD_OPT_BIT_ACKβ set to 1 to request a fw reply. and the deets: ifUNI_CMD_OPT_BIT_0_ACKis set andUNI_CMD_OPT_BIT_2_SET_QUERYis set, mcu firmware will send response eventEID = 0x01(UNI_EVENT_ID_CMD_RESULT) to the host. yes, both conditions. both. π - 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
- BIT[0]:
not me reading the option bits three times to make sure i got the AND conditions right π this is genuinely the most extra part of the whole struct and i respect her for it π
π SEE ALSO π
- Kernel file
./drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.hβ go read the source, bestie, it's all in there, iykyk π
and that's the page!! mwah π this was brought to you by Kernel API Manual, source ./drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h, dated October 2026 β struct mt76..._mcu_uni_txd(9), slay, see you in the next one ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms