STRUCT MT76_CONNAC2_MCU_UNI_TXD(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 including txd. important!! the txd does not count. don't @ me.
  • cid β€” the command identifier. which command are we even sending, bestie?
  • pkt_type β€” must be 0xa0 (cmd packet by long format). must. not "should", not "ideally". 0xa0. periodt. πŸ”₯
  • frag_n β€” fragment number.
  • seq β€” sequence number.
  • checksum β€” 0 mean 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 β€” value 0x00 β€” command from HOST to WM
    • CMD_S2D_IDX_C2N β€” value 0x01 β€” command from WA to WM
    • CMD_S2D_IDX_H2C β€” value 0x02 β€” command from HOST to WA
    • CMD_S2D_IDX_H2N_AND_H2C β€” value 0x03 β€” 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: 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. 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
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