ATH12K驱动框架架构图
ATH12K驱动框架架构图(分层描述)
I. 顶层架构
II. 核心数据结构层次关系
III. 主要模块详解
1. 核心模块 (Core)
2. 硬件抽象层 (HAL)
3. 无线管理接口 (WMI)
4. 主机目标通信 (HTC)
5. 复制引擎 (CE)
6. MAC层
7. 数据路径 (DP)
IV. 关键数据流路径
1. 发送数据流 (TX Path)
2. 接收数据流 (RX Path)
V. WMI命令流和事件处理
VI. MLO架构 (多链路操作)
VII. 初始化序列图
ATH12K驱动框架架构图(分层描述)
I. 顶层架构
┌───────────────────────────────────────────────────────┐
│ Linux Kernel │
├───────────────────────────────────────────────────────┤
│ mac80211 │
├───────────────────────────────────────────────────────┤
│ ATH12K Driver │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────────┐ │
│ │ Core │ │ MAC │ │ DP │ │Debug/Tracing│ │
│ └─────────┘ └─────────┘ └─────────┘ └─────────────┘ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────────┐ │
│ │ HAL │ │ HTC │ │ WMI │ │ CE │ │
│ └─────────┘ └─────────┘ └─────────┘ └─────────────┘ │
├───────────────────────────────────────────────────────┤
│ PCI/AHB 总线接口层 (Bus Interface) │
├───────────────────────────────────────────────────────┤
│ Hardware │
└───────────────────────────────────────────────────────┘
II. 核心数据结构层次关系
┌──────────────────────────────────────────────────────────────┐
│ struct ath12k_hw_group │
│ ┌──────────────────────────────────────────────┐ │
│ │ struct ath12k_hw │ │
│ │ ┌──────────────┐ ┌──────────────┐ │ │
│ │ │ struct │ │ struct │ │ │
│ │ │ ath12k │ │ ath12k │... │ │
│ │ │ (radio 0) │ │ (radio 1) │ │ │
│ │ └──────────────┘ └──────────────┘ │ │
│ └──────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────┐ │
│ │ struct ath12k_base (SOC 0) │ │
│ │ ┌─────────────┐ ┌─────────────┐ │ │
│ │ │struct ath12k│ │struct ath12k│... │ │
│ │ │_pdev (0) │ │_pdev (1) │ │ │
│ │ └─────────────┘ └─────────────┘ │ │
│ └──────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────┐ │
│ │ struct ath12k_base (SOC 1) │ │
│ │ ┌─────────────┐ ┌─────────────┐ │ │
│ │ │struct ath12k│ │struct ath12k│... │ │
│ │ │_pdev (0) │ │_pdev (1) │ │ │
│ │ └─────────────┘ └─────────────┘ │ │
│ └──────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────┘
III. 主要模块详解
1. 核心模块 (Core)
┌──────────────────────────────────────────────────────────────┐
│ Core Module │
├──────────────────────────────────────────────────────────────┤
│ ┌────────────────────┐ ┌─────────────────────────────────┐ │
│ │ Initialization │ │ Resource Management │ │
│ │ - ath12k_core_init │ │ - Memory allocation │ │
│ │ - ath12k_core_qmi │ │ - Interrupts │ │
│ │ - Firmware loading │ │ - Device tree parsing │ │
│ └────────────────────┘ └─────────────────────────────────┘ │
│ │
│ ┌────────────────────┐ ┌─────────────────────────────────┐ │
│ │ Power Management │ │ Recovery handling │ │
│ │ - Suspend/Resume │ │ - SSR (Subsystem restart) │ │
│ │ - Runtime PM │ │ - FW crash handling │ │
│ └────────────────────┘ └─────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────┘
2. 硬件抽象层 (HAL)
┌─────────────────────────────────