# zbowling/mt7925 architecture

> Architecture diagram of the GitHub repository zbowling/mt7925, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zbowling/mt7925
- Repository: https://github.com/zbowling/mt7925

## Overview

This repository packages a Linux MediaTek mt76 Wi-Fi driver replacement, aimed especially at stabilizing MT7921/MT7925 hardware. The principal workflow is Linux wireless configuration entering a chipset driver, which coordinates firmware commands and MAC/DMA operations to configure links and exchange traffic. The tree also contains drivers for other mt76 chipsets and shared Connac support. The README documents MLO stability fixes, RSSI notifications, channel-switch support, and test/debug capabilities; only selected source excerpts were available, so many subsystem links are omitted rather than inferred.

Main entry points: [`dkms/src/mt7996/mcu.c`](https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7996/mcu.c) (MT7996 firmware control), [`dkms/src/mt7921/main.c`](https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7921/main.c) (MT7921 driver), [`dkms/src/mt76.h`](https://github.com/zbowling/mt7925/blob/main/dkms/src/mt76.h) (Driver framework), [`dkms/src/mac80211.c`](https://github.com/zbowling/mt7925/blob/main/dkms/src/mac80211.c) (mac80211 integration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shared["Shared mt76 runtime"]
  node_mt76core["Driver framework<br/>[mt76.h]"]
  node_mac80211["mac80211 integration<br/>[mac80211.c]"]
  node_dma["DMA transport<br/>[dma.c]"]
end

subgraph group_connac["Connac firmware support"]
  node_connacmcu["Shared MCU protocol<br/>[mt76_connac_mcu.c]"]
  node_connacmac["Shared MAC protocol<br/>[mt76_connac_mac.c]"]
end

subgraph group_target["MT7921/MT7925"]
  node_mt7921main["MT7921 driver<br/>[main.c]"]
  node_mt7921mcu["MT7921 firmware control<br/>[mcu.c]"]
  node_mt7925main["MT7925 driver<br/>[main.c]"]
  node_mt7925mac["MT7925 MAC<br/>[mac.c]"]
  node_mt7925mcu["MT7925 firmware control<br/>[mcu.c]"]
end

subgraph group_legacy["Other chipset drivers"]
  node_mt7915main["MT7915 driver<br/>[main.c]"]
  node_mt7915mac["MT7915 MAC<br/>[mac.c]"]
  node_mt7915mcu["MT7915 firmware control<br/>[mcu.c]"]
  node_mt7615mac["MT7615 MAC<br/>[mac.c]"]
  node_mt7603mac["MT7603 MAC<br/>[mac.c]"]
  node_mt76x0phy["MT76x0 PHY<br/>[phy.c]"]
  node_mt76x2eeprom["MT76x2 calibration<br/>[eeprom.c]"]
end

subgraph group_newer["Newer chipset drivers"]
  node_mt7996main["MT7996 driver<br/>[main.c]"]
  node_mt7996mac["MT7996 MAC<br/>[mac.c]"]
  node_mt7996mcu["MT7996 firmware control<br/>[mcu.c]"]
end

node_linux(("Linux wireless stack"))
node_wifi[("Wi-Fi hardware")]

node_linux -.->|"configures wireless"| node_mac80211
node_mac80211 -->|"integrates driver"| node_mt76core
node_mt7925main -->|"requests firmware actions"| node_mt7925mcu
node_mt7925mcu -.->|"uses shared protocol"| node_connacmcu
node_mt7921main -.->|"coordinates firmware"| node_mt7921mcu
node_mt7915main -->|"configures device"| node_mt7915mcu
node_mt7996main -->|"configures device"| node_mt7996mcu
node_mt7996mcu -->|"starts firmware"| node_connacmcu
node_mt76core -.->|"provides transport"| node_dma
node_mt7925mac -.->|"exchanges frames"| node_wifi
node_mt7921main -.->|"drives hardware"| node_wifi
node_mt7915mac -.->|"requests station actions"| node_mt7915mcu
node_mt7615mac -.->|"drives hardware"| node_wifi
node_mt7603mac -.->|"drives hardware"| node_wifi
node_mt76x0phy -.->|"controls radio"| node_wifi
node_mt76x2eeprom -.->|"reads calibration"| node_wifi
node_mt7996mac -.->|"requests station actions"| node_mt7996mcu

click node_mt76core "https://github.com/zbowling/mt7925/blob/main/dkms/src/mt76.h"
click node_mac80211 "https://github.com/zbowling/mt7925/blob/main/dkms/src/mac80211.c"
click node_dma "https://github.com/zbowling/mt7925/blob/main/dkms/src/dma.c"
click node_mt7921main "https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7921/main.c"
click node_mt7921mcu "https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7921/mcu.c"
click node_mt7925main "https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7925/main.c"
click node_mt7925mac "https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7925/mac.c"
click node_mt7925mcu "https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7925/mcu.c"
click node_connacmcu "https://github.com/zbowling/mt7925/blob/main/dkms/src/mt76_connac_mcu.c"
click node_connacmac "https://github.com/zbowling/mt7925/blob/main/dkms/src/mt76_connac_mac.c"
click node_mt7915main "https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7915/main.c"
click node_mt7915mac "https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7915/mac.c"
click node_mt7915mcu "https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7915/mcu.c"
click node_mt7615mac "https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7615/mac.c"
click node_mt7603mac "https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7603/mac.c"
click node_mt7996main "https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7996/main.c"
click node_mt7996mac "https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7996/mac.c"
click node_mt7996mcu "https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7996/mcu.c"
click node_mt76x0phy "https://github.com/zbowling/mt7925/blob/main/dkms/src/mt76x0/phy.c"
click node_mt76x2eeprom "https://github.com/zbowling/mt7925/blob/main/dkms/src/mt76x2/eeprom.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mt76core,node_mac80211,node_dma toneBlue
class node_connacmcu,node_connacmac,node_wifi toneAmber
class node_mt7921main,node_mt7921mcu,node_mt7925main,node_mt7925mac,node_mt7925mcu toneMint
class node_mt7915main,node_mt7915mac,node_mt7915mcu,node_mt7615mac,node_mt7603mac,node_mt76x0phy,node_mt76x2eeprom toneRose
class node_mt7996main,node_mt7996mac,node_mt7996mcu,node_linux toneIndigo
```

## Components

### Shared mt76 runtime

- [Driver framework](https://github.com/zbowling/mt7925/blob/main/dkms/src/mt76.h): `dkms/src/mt76.h`
- [mac80211 integration](https://github.com/zbowling/mt7925/blob/main/dkms/src/mac80211.c): `dkms/src/mac80211.c`
- [DMA transport](https://github.com/zbowling/mt7925/blob/main/dkms/src/dma.c): `dkms/src/dma.c`

### Connac firmware support

- [Shared MCU protocol](https://github.com/zbowling/mt7925/blob/main/dkms/src/mt76_connac_mcu.c): `dkms/src/mt76_connac_mcu.c`
- [Shared MAC protocol](https://github.com/zbowling/mt7925/blob/main/dkms/src/mt76_connac_mac.c): `dkms/src/mt76_connac_mac.c`

### MT7921/MT7925

- [MT7921 driver](https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7921/main.c): `dkms/src/mt7921/main.c`
- [MT7921 firmware control](https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7921/mcu.c): `dkms/src/mt7921/mcu.c`
- [MT7925 driver](https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7925/main.c): `dkms/src/mt7925/main.c`
- [MT7925 MAC](https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7925/mac.c): `dkms/src/mt7925/mac.c`
- [MT7925 firmware control](https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7925/mcu.c): `dkms/src/mt7925/mcu.c`

### Other chipset drivers

- [MT7915 driver](https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7915/main.c): `dkms/src/mt7915/main.c`
- [MT7915 MAC](https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7915/mac.c): `dkms/src/mt7915/mac.c`
- [MT7915 firmware control](https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7915/mcu.c): `dkms/src/mt7915/mcu.c`
- [MT7615 MAC](https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7615/mac.c): `dkms/src/mt7615/mac.c`
- [MT7603 MAC](https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7603/mac.c): `dkms/src/mt7603/mac.c`
- [MT76x0 PHY](https://github.com/zbowling/mt7925/blob/main/dkms/src/mt76x0/phy.c): `dkms/src/mt76x0/phy.c`
- [MT76x2 calibration](https://github.com/zbowling/mt7925/blob/main/dkms/src/mt76x2/eeprom.c): `dkms/src/mt76x2/eeprom.c`

### Newer chipset drivers

- [MT7996 driver](https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7996/main.c): `dkms/src/mt7996/main.c`
- [MT7996 MAC](https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7996/mac.c): `dkms/src/mt7996/mac.c`
- [MT7996 firmware control](https://github.com/zbowling/mt7925/blob/main/dkms/src/mt7996/mcu.c): `dkms/src/mt7996/mcu.c`

### Other components

- **Linux wireless stack**
- **Wi-Fi hardware**

## Connections

- Linux wireless stack → mac80211 integration: configures wireless
- mac80211 integration → Driver framework: integrates driver (evidence: `dkms/src/mac80211.c`)
- MT7925 driver → MT7925 firmware control: requests firmware actions (evidence: `dkms/src/mt7925/main.c`)
- MT7925 firmware control → Shared MCU protocol: uses shared protocol
- MT7921 driver → MT7921 firmware control: coordinates firmware
- MT7915 driver → MT7915 firmware control: configures device (evidence: `dkms/src/mt7915/main.c`)
- MT7996 driver → MT7996 firmware control: configures device (evidence: `dkms/src/mt7996/main.c`)
- MT7996 firmware control → Shared MCU protocol: starts firmware (evidence: `dkms/src/mt7996/mcu.c`)
- Driver framework → DMA transport: provides transport
- MT7925 MAC → Wi-Fi hardware: exchanges frames
- MT7921 driver → Wi-Fi hardware: drives hardware
- MT7915 MAC → MT7915 firmware control: requests station actions
- MT7615 MAC → Wi-Fi hardware: drives hardware
- MT7603 MAC → Wi-Fi hardware: drives hardware
- MT76x0 PHY → Wi-Fi hardware: controls radio
- MT76x2 calibration → Wi-Fi hardware: reads calibration
- MT7996 MAC → MT7996 firmware control: requests station actions
