Aerlync Logo
calendar

16 Apr 2026

calendar

5 min read

The ath12k Unified Driver Model

-Team Aerlync

The ath12k Unified Driver Model

How Qualcomm is rearchitecting Wi-Fi for the Linux kernel — turning a generation-specific driver into a living platform for all future Qualcomm wireless silicon.

The Problem

A History Lesson Written in C

Open any recent Linux kernel tree and navigate to drivers/net/wireless/ath/. What you find is a generational timeline: ath9k for 802.11n, ath10k for Wi-Fi 5, ath11k for Wi-Fi 6, ath12k for Wi-Fi 7 — each a complete, self-contained driver, each solving the same problems its predecessor already solved.

This is the silent tax of generational hardware refreshes. ath10k and ath11k share an estimated 80% of their functional logic — identical WMI messaging model, identical HTC/HTT framing, identical firmware recovery philosophy — but share exactly zero lines of code. Every bug fix, every security patch, every protocol corner case must be manually evaluated and ported. The ath12k unified driver model is the attempt to break this cycle.

Zephyr RTOS Diagram

The Three-Tier Portability Model

Before any architectural decision, you need precision about what "shared" actually means — not all driver subsystems are equally portable across hardware generations.

Zephyr RTOS Diagram

Key Insight

The unified driver model is not simply a code-sharing exercise. It is a precise encoding of the three-tier portability classification into the module boundary itself. ath12k.ko owns Tier 1 entirely and the portable half of Tier 2. ath12k_wifi7.ko owns the hardware-specific half of Tier 2 and all of Tier 3.

Architecture

Two Modules, One Platform

The core change is a split of the monolithic ath12k.ko into two distinct kernel modules. The split precisely follows the Tier 1/2/3 portability classification. ath12k.ko owns everything hardware-generation-agnostic: the mac80211 interface, firmware messaging stack, shared data path, and core init sequences. ath12k_wifi7.ko owns everything tied to Wi-Fi 7 silicon: HAL register offsets, Copy Engine pipe assignments, MHI channel setup, Wi-Fi 7 firmware capability TLV negotiation.

Zephyr RTOS Diagram

Directory Structure

The module boundary is reflected directly in the filesystem layout. A new wifi7/ subdirectory is introduced, containing all device-specific code for the Wi-Fi 7 hardware generation.

Zephyr RTOS Diagram

HIF Decoupling

When a future Wi-Fi 8 chipset arrives, the team implementing ath12k_wifi8.ko does not rewrite DMA management or PCIe enumeration. They implement new register offsets in wifi8/pci.c and inherit everything else. The PCI bus driver in the common layer already knows how to talk to the kernel.

Data Path & Monitor Mode

Where the Boundary Gets Subtle

Packet movement — enqueuing descriptors into TX rings, draining RX rings, managing buffer pools — follows the same structural pattern across hardware generations and lives in the shared dp.c, dp_rx.c, and dp_tx.c. What varies between generations is the interpretation layer: RX status TLVs, monitor mode frame annotation, and CE descriptor parsing are all hardware-format-specific.

Zephyr RTOS Diagram

Implementation

13 Patches, Sequenced with Intent

The implementation was delivered as 13 commits to the ath12k-ng branch. The commit ordering is deliberate: establish logical separation first, then draw the module boundary, then harden it. Commits 01–09 validate the separation within a still-compilable monolith. Commit 10 draws the actual module boundary. Commits 11–13 enforce it by eliminating cross-dependencies.

Zephyr RTOS Diagram
#CommitWhat changesPhase
01Restructure PCI codeSeparates generic PCI routines from Wi-Fi 7 specificsSEPARATE
02Move CE configuration
Copy Engine pipe assignments go to wifi7/ce.
c.
SEPARATE
03Move WMI capabilities
Wi-Fi 7 firmware TLV negotiation to wifi7/wmi.
c.
SEPARATE
04Move MHI configuration
PCIe MHI channel setup to wifi7/mhi.
c.
SEPARATE
05Rename hw.cExplicit rename to signal Wi-Fi 7 specificitySEPARATE
06Rename ahb_hif_opsSymbol renamed to reflect generic reusabilitySEPARATE
07Restructure ahb.cSplit into shared routines and Wi-Fi 7 specificSEPARATE
08Move Wi-Fi 7 init routinesDevice-specific init consolidated in wifi7/SEPARATE
09Move hw_init invocationRouted through target-specific probe functionSEPARATE
10Modularize the driver
Creates ath12k_wifi7.
ko as a distinct kernel module.
SPLIT
11Rename ath12k_* symbolsath12k_wifi7_* namespace — prevents future collisionsHARDEN
12Remove HAL defines from PCIEliminates remaining cross-dependency in shared PCI codeHARDEN
13Remove HAL defines from AHBEliminates remaining cross-dependency in shared AHB codeHARDEN

Change Statistics

13

commits to ath12k-ng

33

files changed

1956

lines added new wifi7/ structure

1480

lines removed consolidation

+476

net lines total delta

Why +476 Net Signals Discipline

A refactor that adds significantly more code than it removes often signals over-engineering. A net addition of only 476 lines across a 33-file refactor suggests the design is extracting existing structure rather than imposing new abstraction layers. The largest new file is wifi7/ce.c at 973 lines — justified, since Copy Engine configuration is one of the most hardware-specific parts of any Qualcomm Wi-Fi driver.

Future Extensibility

A Platform, Not a Driver

ath12k.ko is not a Wi-Fi 7 driver with shared code extracted into a library. It is a platform designed to host multiple device-specific modules. The extensibility model has three identified target classes and one implied long-term convergence path.

Zephyr RTOS Diagram

The most strategically significant implication is the potential to unify ath11k and ath12k under the same common infrastructure via a future ath12k_wifi6.ko. If realised, ath11k.ko could eventually be deprecated — collapsing two independently maintained drivers into one.

Upstream Risk

The Linux wireless maintainers have historically been cautious about unifying driver families. Any ath11k convergence would need to demonstrate zero regression on all existing Wi-Fi 6 hardware — a substantial validation burden that the phased delivery model is designed to address incrementally.

Upstream Path & Conclusion

What Needs to Be True for Mainline

The ath12k-ng branch designation signals this is a staging ground, not yet in Linus's tree. The phased delivery suggests a rollout strategy that aligns feature parity with the proprietary SDK before pushing to mainline. Three critical gates determine upstream acceptance.

Zephyr RTOS Diagram

Legacy vs Unified — Maintenance Model

Zephyr RTOS Diagram

Conclusion

The ath12k unified driver model is one of the more architecturally coherent proposals to emerge from the Qualcomm wireless driver team in recent times. It takes a real problem — the generational code duplication that has plagued the ath driver family since ath9k — and addresses it with a structural solution proportionate to the problem: 476 net lines of change, 13 commits, a clean module boundary, an explicit extensibility model, and a sequencing strategy that validates the separation before drawing the boundary.

The immediate value is reduced maintenance overhead for Wi-Fi 7 hardware. The longer-term value is a living driver platform that absorbs new Qualcomm Wi-Fi silicon by implementing only what is genuinely new — the HAL register layout, the CE configuration, the MHI channel setup — while inheriting a decade's worth of hardened firmware interface and 802.11 state machine code from the common layer.

That is the difference between a driver and a platform.

Bottom Line

The right time to solve generational driver duplication is at the transition to a new Wi-Fi standard — when a new driver would have been written anyway. The incremental cost of the modular split over a clean new driver is modest. The compounding return across future hardware generations is substantial.

Recommended Blogs

Exploring Zephyr RTOS: A Lightweight, Scalable Real-Time Operating System for the Modern IoT Era
calendar

14 May 2025

calendar

5 min read

Exploring Zephyr RTOS: A Lightweight, Scalable Real-Time Operating System for the Modern IoT Era

The Connected Device Revolution: Why Engineering Complexity Is Increasing Faster Than Ever
calendar

16 Jun 2026

calendar

5 min read

The Connected Device Revolution: Why Engineering Complexity Is Increasing Faster Than Ever

Hardware Emulation in Modern VLSI Verification: Enabling Hardware–Software Co-Development and Reducing Costly Silicon Respins
calendar

11 March 2026

calendar

5 min read

Hardware Emulation in Modern VLSI Verification: Enabling Hardware–Software Co-Development and Reducing Costly Silicon Respins

Build with the Most Trusted Engineering Partner

Aerlync Logo

Delivers cutting-edge embedded solutions, from firmware development to wireless protocols, ensuring reliability and innovation.

facebook
linkedin
twitter
insta

Privacy Policy

Terms of Service

Copyright © 2026

The ath12k Unified Driver Model | Aerlync