From: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
To: Jeff Johnson <jeff.johnson@oss.qualcomm.com>,
Kiran Venkatappa <quic_kiranv@quicinc.com>,
ath12k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH ath12k-ng 00/13] wifi: ath12k: Ath12k modularization changes
Date: Thu, 21 Aug 2025 09:46:09 +0800 [thread overview]
Message-ID: <746724e2-8aae-4103-b53e-da8d45a3d697@oss.qualcomm.com> (raw)
In-Reply-To: <02584bb9-364e-4391-957f-7833d6bc0f79@oss.qualcomm.com>
On 8/21/2025 4:57 AM, Jeff Johnson wrote:
> On 8/20/2025 12:11 AM, Baochen Qiang wrote:
>>
>>
>> On 8/13/2025 1:09 AM, Kiran Venkatappa wrote:
>>> Current ath drivers have separate implementations for different
>>> classes of devices. For example, ath11k supports WiFi-6 devices,
>>> while ath12k supports Wi-Fi 7 devices. However, there is significant
>>> common functionality across these generations due to shared firmware
>>> and hardware architecture. In the existing driver code, this leverage
>>> is achieved through code duplication. As a result, when a new driver
>>> is introduced, many features are missed, and new additions require
>>> porting across different generation drivers.
>>>
>>> To improve reuse and maintainability, ath12k should be split into common
>>> and device-specific modules. Common code can be shared across multiple
>>> architectures, enabling better leverage for future hardware generations.
>>> generation drivers.
>>>
>>> Firmware interfaces and core initialization sequences are typically common
>>> across different device families. In contrast, hardware register offsets, copy
>>> engine mappings, and HAL configurations are usually hardware-specific.
>>>
>>> Common components include:
>>> - mac80211 interface: Control path operations are mostly common across
>>> different ATH hardware and will be shared as much as possible.
>>> - Firmware interface (WMI, HTT, HTC, QMI): Firmware messaging and
>>> sequences are common and maintained with backward/forward compatibility
>>> using TLVs.
>>> - Datapath: Data path files are also separated similarly. More information
>>> will be provided in later patches.
>>> - Core initialization, reset, and recovery sequences: These will be part
>>> of the shared code.
>>>
>>> Device-specific code includes:
>>> - Hardware capabilities, configurations, HAL, and other
>>> architecture-specific logic.
>>>
>>> The original ath12k.ko is split into these two modules as depicted below.
>>>
>>> +-----------------+
>>> | |
>>> | ath12k.ko |
>>> | (common) |
>>> +---------------+ | |
>>> | | +-----------------+
>>> | ath12k.ko | ===========>
>>> | | +------------------+
>>> +---------------+ | |
>>> | ath12k_wifi7.ko |
>>> | (wifi7 family) |
>>> | |
>>> +------------------+
>>>
>>> The ath12k.ko module will serve as the common component, while ath12k_wifi7.ko
>>> will be the architecture-specific module for WiFi-7 devices.
>>>
>>> After this modular separation, adding support for a new device will
>>> primarily involve implementing device-specific code, while reusing the
>>> majority of the shared common components.
>>>
>>> ---
>>> Kiran Venkatappa (13):
>>> wifi: ath12k: Restructure PCI code to common and Wi-Fi 7 specific logic
>>> wifi: ath12k: Move Copy Engine configuration to Wi-Fi 7 specific file
>>> wifi: ath12k: Move Wi-Fi 7 WMI configuration to dedicated file
>>> wifi: ath12k: Move Wi-Fi 7 MHI configuration to dedicated file
>>> wifi: ath12k: Rename hw.c to Wi-Fi 7 specific implementation file
>>> wifi: ath12k: Rename ahb_hif_ops to reflect generic usage
>>> wifi: ath12k: Restructure ahb.c into common and Wi-Fi 7 specific modules
>>> wifi: ath12k: Move Wi-Fi 7 specific init routines to dedicated file
>>> wifi: ath12k: Move hw_init invocation to target-specific probe
>>> wifi: ath12k: Modularize driver into common and Wi-Fi 7 specific components
>>> wifi: ath12k: Rename ath12k_* symbols to ath12k_wifi7_* for clarity
>>> wifi: ath12k: Remove HAL defines from shared PCI code
>>> wifi: ath12k: Remove HAL define dependencies from shared AHB code
>>>
>>> drivers/net/wireless/ath/ath12k/Makefile | 4 +-
>>> drivers/net/wireless/ath/ath12k/ahb.c | 139 ++--
>>> drivers/net/wireless/ath/ath12k/ahb.h | 27 +-
>>> drivers/net/wireless/ath/ath12k/ce.c | 301 -------
>>> drivers/net/wireless/ath/ath12k/ce.h | 5 +-
>>> drivers/net/wireless/ath/ath12k/core.c | 38 +-
>>> drivers/net/wireless/ath/ath12k/core.h | 7 +
>>> drivers/net/wireless/ath/ath12k/debug.c | 4 +
>>> drivers/net/wireless/ath/ath12k/dp_rx.c | 3 +
>>> drivers/net/wireless/ath/ath12k/hal.c | 4 +
>>> drivers/net/wireless/ath/ath12k/htc.c | 2 +
>>> drivers/net/wireless/ath/ath12k/hw.h | 2 -
>>> drivers/net/wireless/ath/ath12k/mhi.c | 130 ---
>>> drivers/net/wireless/ath/ath12k/mhi.h | 4 +-
>>> drivers/net/wireless/ath/ath12k/pci.c | 215 ++---
>>> drivers/net/wireless/ath/ath12k/pci.h | 28 +-
>>> drivers/net/wireless/ath/ath12k/peer.c | 2 +
>>> drivers/net/wireless/ath/ath12k/wifi7/Makefile | 10 +
>>> drivers/net/wireless/ath/ath12k/wifi7/ahb.c | 71 ++
>>> drivers/net/wireless/ath/ath12k/wifi7/ahb.h | 20 +
>>> drivers/net/wireless/ath/ath12k/wifi7/ce.c | 973 +++++++++++++++++++++++
>>> drivers/net/wireless/ath/ath12k/wifi7/ce.h | 22 +
>>> drivers/net/wireless/ath/ath12k/wifi7/core.c | 44 +
>>> drivers/net/wireless/ath/ath12k/{ => wifi7}/hw.c | 798 +++----------------
>>> drivers/net/wireless/ath/ath12k/wifi7/hw.h | 13 +
>>> drivers/net/wireless/ath/ath12k/wifi7/mhi.c | 138 ++++
>>> drivers/net/wireless/ath/ath12k/wifi7/mhi.h | 11 +
>>> drivers/net/wireless/ath/ath12k/wifi7/pci.c | 188 +++++
>>> drivers/net/wireless/ath/ath12k/wifi7/pci.h | 12 +
>>> drivers/net/wireless/ath/ath12k/wifi7/wmi.c | 105 +++
>>> drivers/net/wireless/ath/ath12k/wifi7/wmi.h | 15 +
>>> drivers/net/wireless/ath/ath12k/wmi.c | 97 ---
>>> drivers/net/wireless/ath/ath12k/wmi.h | 4 -
>>> 33 files changed, 1956 insertions(+), 1480 deletions(-)
>>> ---
>>> base-commit: d9104cec3e8fe4b458b74709853231385779001f
>>> change-id: 20250812-ath12k-mod-bd00156df202
>>>
>>
>> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>>
>
> I dropped the extra ">" when applying to the patches in 'pending'
My bad! Didn't notice that, Thanks!
>
> /jeff
next prev parent reply other threads:[~2025-08-21 3:38 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-12 17:09 [PATCH ath12k-ng 00/13] wifi: ath12k: Ath12k modularization changes Kiran Venkatappa
2025-08-12 17:09 ` [PATCH ath12k-ng 01/13] wifi: ath12k: Restructure PCI code to common and Wi-Fi 7 specific logic Kiran Venkatappa
2025-08-12 17:09 ` [PATCH ath12k-ng 02/13] wifi: ath12k: Move Copy Engine configuration to Wi-Fi 7 specific file Kiran Venkatappa
2025-08-12 17:09 ` [PATCH ath12k-ng 03/13] wifi: ath12k: Move Wi-Fi 7 WMI configuration to dedicated file Kiran Venkatappa
2025-08-13 5:52 ` Krzysztof Kozlowski
2025-08-13 15:43 ` Jeff Johnson
2025-08-13 16:00 ` Krzysztof Kozlowski
2025-08-13 16:24 ` Greg Kroah-Hartman
2025-08-13 18:06 ` Jeff Johnson
2025-08-12 17:09 ` [PATCH ath12k-ng 04/13] wifi: ath12k: Move Wi-Fi 7 MHI " Kiran Venkatappa
2025-08-13 5:52 ` Krzysztof Kozlowski
2025-08-12 17:09 ` [PATCH ath12k-ng 05/13] wifi: ath12k: Rename hw.c to Wi-Fi 7 specific implementation file Kiran Venkatappa
2025-08-12 17:09 ` [PATCH ath12k-ng 06/13] wifi: ath12k: Rename ahb_hif_ops to reflect generic usage Kiran Venkatappa
2025-08-12 17:09 ` [PATCH ath12k-ng 07/13] wifi: ath12k: Restructure ahb.c into common and Wi-Fi 7 specific modules Kiran Venkatappa
2025-08-12 17:09 ` [PATCH ath12k-ng 08/13] wifi: ath12k: Move Wi-Fi 7 specific init routines to dedicated file Kiran Venkatappa
2025-08-12 17:09 ` [PATCH ath12k-ng 09/13] wifi: ath12k: Move hw_init invocation to target-specific probe Kiran Venkatappa
2025-08-12 17:09 ` [PATCH ath12k-ng 10/13] wifi: ath12k: Modularize driver into common and Wi-Fi 7 specific components Kiran Venkatappa
2025-08-12 17:09 ` [PATCH ath12k-ng 11/13] wifi: ath12k: Rename ath12k_* symbols to ath12k_wifi7_* for clarity Kiran Venkatappa
2025-08-12 17:09 ` [PATCH ath12k-ng 12/13] wifi: ath12k: Remove HAL defines from shared PCI code Kiran Venkatappa
2025-08-12 17:09 ` [PATCH ath12k-ng 13/13] wifi: ath12k: Remove HAL define dependencies from shared AHB code Kiran Venkatappa
2025-08-20 4:50 ` [PATCH ath12k-ng 00/13] wifi: ath12k: Ath12k modularization changes Vasanthakumar Thiagarajan
2025-08-20 7:11 ` Baochen Qiang
2025-08-20 20:57 ` Jeff Johnson
2025-08-21 1:46 ` Baochen Qiang [this message]
2025-08-20 21:44 ` Jeff Johnson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=746724e2-8aae-4103-b53e-da8d45a3d697@oss.qualcomm.com \
--to=baochen.qiang@oss.qualcomm.com \
--cc=ath12k@lists.infradead.org \
--cc=jeff.johnson@oss.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_kiranv@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox