From d2a03db1e5526ab3bf04f12ccc247841eb808631 Mon Sep 17 00:00:00 2001 From: vasilito Date: Wed, 5 Aug 2026 03:31:29 +0300 Subject: [PATCH] docs(policy): linux-kpi mt76 C exemption (operator-approved 2026-08-04) --- AGENTS.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 1180397a6c..1a61654e0d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -439,6 +439,29 @@ duplicate working code with zero functional gain, and the firmware expects `#[re packed)]` struct layouts that are most reliably defined in C headers matching the Linux source. +### linux-kpi + redbear-mt76 exemption (operator-approved 2026-08-04) + +The mt76 C headers (mt76/Connac register and descriptor layouts, matching Linux +`mt792x_regs.h` and the firmware headers byte-for-byte) and the bounded mt76 C transport +layer in `redbear-mt7922` are an **exemption** to the Rust-only policy. This subsystem is +a C-to-Redox driver shim that talks directly to MediaTek MT7922 (mt7921-family) Wi-Fi +firmware via PCI WFDMA rings. The C headers are the firmware ABI contract. The C +transport handles ONLY: WFDMA ring init, Connac TX/RX descriptor encode/decode, ROM-patch +(`WIFI_MT7922_patch_mcu_1_1_hdr.bin`) section parsing + download, WM firmware +(`WIFI_RAM_CODE_MT7922_1.bin`) transfer, MCU mailbox commands, and subsystem reset. + +**Architecture:** C headers = ABI contract (match Linux source 1:1). C transport = +bounded firmware transport (no control logic). Rust = ALL driver logic: the +SoftMAC/MLME control plane (scan/auth/assoc/key/regulatory/aggregation policy), +lifecycle, driver-manager onboarding, netstack bridge, and the wifictl control surface. +MT7922 is a mac80211 SoftMAC device — the MLME is implemented in Rust (shaped on +mac80211 ops), never imported from Linux mac80211/cfg80211. + +This exemption mirrors the operator-approved linux-kpi + redbear-iwlwifi exemption +(2026-07-24) and exists for the same reason: the firmware expects `#[repr(C, packed)]` +struct layouts most reliably defined in C headers matching the Linux source, and the +transport follows the proven bounded-C-transport pattern. + ## DURABILITY POLICY Every change to an upstream-owned source tree (anything under `recipes/*/source/`) **must** be