# jetm/mediatek-mt7927-dkms architecture

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

- Interactive diagram: https://gitdiagram.com/jetm/mediatek-mt7927-dkms
- Repository: https://github.com/jetm/mediatek-mt7927-dkms

## Overview

This repository packages patched out-of-tree Linux Wi-Fi and Bluetooth drivers for MediaTek MT7927-family hardware. The documented user workflow is to install or build the DKMS package, have DKMS build and install the modules for the running kernel, then load them for the device’s PCIe Wi-Fi and USB Bluetooth functions. The README also documents firmware extraction and compatibility support. Source excerpts are limited to the firmware extractor and an Airoha compatibility stub, so driver interactions are shown only where the README documents them; the graph does not infer calls among patch files.

Main entry points: [`dkms.conf`](https://github.com/jetm/mediatek-mt7927-dkms/blob/master/dkms.conf) (DKMS package), [`mt7927-wifi-01-add-missing-he-ap-phy-capabilities.patch`](https://github.com/jetm/mediatek-mt7927-dkms/blob/master/mt7927-wifi-01-add-missing-he-ap-phy-capabilities.patch) (Wi-Fi driver), [`mt6639-bt-01-add-hp-elitemini-e156-id.patch`](https://github.com/jetm/mediatek-mt7927-dkms/blob/master/mt6639-bt-01-add-hp-elitemini-e156-id.patch) (Bluetooth driver), [`extract_firmware.py`](https://github.com/jetm/mediatek-mt7927-dkms/blob/master/extract_firmware.py) (Firmware extractor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_drivers["Kernel drivers"]
  node_dkms["DKMS package<br/>[dkms.conf]"]
  node_wifi["Wi-Fi driver"]
  node_bluetooth["Bluetooth driver"]
  node_wifi_build["Wi-Fi build config"]
  node_bt_patches["Bluetooth patches"]
end

subgraph group_support["Driver support"]
  node_wifi_compat["Wi-Fi compatibility"]
  node_airoha_stub["Airoha stub"]
end

subgraph group_firmware["Firmware"]
  node_firmware_extract["Firmware extractor"]
  node_firmware_source["Firmware input"]
  node_linux_firmware["Linux firmware"]
end

node_user(("Linux user"))
node_kernel["Linux kernel"]
node_hardware["MT7927 hardware"]

node_user -->|"installs package"| node_dkms
node_dkms -->|"builds module"| node_wifi
node_dkms -->|"builds module"| node_bluetooth
node_wifi -->|"loads into"| node_kernel
node_bluetooth -->|"loads into"| node_kernel
node_kernel -->|"drives PCIe Wi-Fi and USB Bluetooth"| node_hardware
node_firmware_source -->|"provides container"| node_firmware_extract
node_firmware_extract -->|"extracts named blobs"| node_firmware_source
node_linux_firmware -->|"supplies Wi-Fi firmware"| node_wifi

click node_dkms "https://github.com/jetm/mediatek-mt7927-dkms/blob/master/dkms.conf"
click node_wifi "https://github.com/jetm/mediatek-mt7927-dkms/blob/master/mt7927-wifi-01-add-missing-he-ap-phy-capabilities.patch"
click node_bluetooth "https://github.com/jetm/mediatek-mt7927-dkms/blob/master/mt6639-bt-01-add-hp-elitemini-e156-id.patch"
click node_bt_patches "https://github.com/jetm/mediatek-mt7927-dkms/blob/master/mt6639-bt-compat-for-pre-7.0-kernels.patch"
click node_wifi_compat "https://github.com/jetm/mediatek-mt7927-dkms/blob/master/mt7927-wifi-compat-kzalloc_flex-for-pre-7.0-kernels.patch"
click node_airoha_stub "https://github.com/jetm/mediatek-mt7927-dkms/blob/master/compat-airoha-offload.h"
click node_firmware_extract "https://github.com/jetm/mediatek-mt7927-dkms/blob/master/extract_firmware.py"

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_dkms,node_wifi,node_bluetooth,node_wifi_build,node_bt_patches,node_user toneBlue
class node_wifi_compat,node_airoha_stub toneAmber
class node_firmware_extract,node_firmware_source,node_linux_firmware toneMint
class node_kernel,node_hardware toneIndigo
```

## Components

### Kernel drivers

- [DKMS package](https://github.com/jetm/mediatek-mt7927-dkms/blob/master/dkms.conf): `dkms.conf`
- [Wi-Fi driver](https://github.com/jetm/mediatek-mt7927-dkms/blob/master/mt7927-wifi-01-add-missing-he-ap-phy-capabilities.patch): `mt7927-wifi-01-add-missing-he-ap-phy-capabilities.patch`
- [Bluetooth driver](https://github.com/jetm/mediatek-mt7927-dkms/blob/master/mt6639-bt-01-add-hp-elitemini-e156-id.patch): `mt6639-bt-01-add-hp-elitemini-e156-id.patch`
- **Wi-Fi build config**
- [Bluetooth patches](https://github.com/jetm/mediatek-mt7927-dkms/blob/master/mt6639-bt-compat-for-pre-7.0-kernels.patch): `mt6639-bt-compat-for-pre-7.0-kernels.patch`

### Driver support

- [Wi-Fi compatibility](https://github.com/jetm/mediatek-mt7927-dkms/blob/master/mt7927-wifi-compat-kzalloc_flex-for-pre-7.0-kernels.patch): `mt7927-wifi-compat-kzalloc_flex-for-pre-7.0-kernels.patch`
- [Airoha stub](https://github.com/jetm/mediatek-mt7927-dkms/blob/master/compat-airoha-offload.h): `compat-airoha-offload.h`

### Firmware

- [Firmware extractor](https://github.com/jetm/mediatek-mt7927-dkms/blob/master/extract_firmware.py): `extract_firmware.py`
- **Firmware input**
- **Linux firmware**

### Other components

- **Linux user**
- **Linux kernel**
- **MT7927 hardware**

## Connections

- Linux user → DKMS package: installs package (evidence: `README.md`)
- DKMS package → Wi-Fi driver: builds module (evidence: `README.md`)
- DKMS package → Bluetooth driver: builds module (evidence: `README.md`)
- Wi-Fi driver → Linux kernel: loads into (evidence: `README.md`)
- Bluetooth driver → Linux kernel: loads into (evidence: `README.md`)
- Linux kernel → MT7927 hardware: drives PCIe Wi-Fi and USB Bluetooth (evidence: `README.md`)
- Firmware input → Firmware extractor: provides container (evidence: `extract_firmware.py`)
- Firmware extractor → Firmware input: extracts named blobs (evidence: `extract_firmware.py`)
- Linux firmware → Wi-Fi driver: supplies Wi-Fi firmware (evidence: `README.md`)
