ATH12K驱动框架架构图

发布于:2025-05-09 ⋅ 阅读:(14) ⋅ 点赞:(0)

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)

┌─────────────────────────────────

网站公告

今日签到

点亮在社区的每一天
去签到