[PATCH ath-next 13/15] wifi: ath12k: add Wi-Fi 8 hw ops for QCN9575
From: Madhavan Ganesan
Date: Thu Nov 12 2026 - 03:44:38 EST
Implement hw_ops for QCN9575.
Add QCN9575 hw_ops (qcn9575_ops) in wifi8/hw.c implementing pdev/mac ID
mapping, srng ID lookup, and TX ring selector callbacks. Update the
QCN9575 hw params entry to use qcn9575_ops.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3
Signed-off-by: Madhavan Ganesan <madhavan.ganesan@xxxxxxxxxxxxxxxx>
---
drivers/net/wireless/ath/ath12k/wifi8/hw.c | 38 +++++++++++++++++++++++++++++-
1 file changed, 37 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath12k/wifi8/hw.c b/drivers/net/wireless/ath/ath12k/wifi8/hw.c
index 74873fc5f3f3..92c897de16f4 100644
--- a/drivers/net/wireless/ath/ath12k/wifi8/hw.c
+++ b/drivers/net/wireless/ath/ath12k/wifi8/hw.c
@@ -18,6 +18,42 @@
#include "mhi.h"
#include "wmi.h"
+static u8 ath12k_wifi8_hw_qcn9575_mac_from_pdev_id(int pdev_idx)
+{
+ return pdev_idx;
+}
+
+static int
+ath12k_wifi8_hw_mac_id_to_pdev_id_qcn9575(const struct ath12k_hw_params *hw,
+ int mac_id)
+{
+ return mac_id;
+}
+
+static int
+ath12k_wifi8_hw_mac_id_to_srng_id_qcn9575(const struct ath12k_hw_params *hw,
+ int mac_id)
+{
+ /*
+ * TODO: QCN9575 supports 2 radios (max_radios = 2). This currently
+ * maps both radios to srng 0; per-radio srng mapping will be wired
+ * in by an upcoming DP patch.
+ */
+ return 0;
+}
+
+static u8 ath12k_wifi8_hw_get_ring_selector_qcn9575(struct sk_buff *skb)
+{
+ return smp_processor_id();
+}
+
+static const struct ath12k_hw_ops qcn9575_ops = {
+ .get_hw_mac_from_pdev_id = ath12k_wifi8_hw_qcn9575_mac_from_pdev_id,
+ .mac_id_to_pdev_id = ath12k_wifi8_hw_mac_id_to_pdev_id_qcn9575,
+ .mac_id_to_srng_id = ath12k_wifi8_hw_mac_id_to_srng_id_qcn9575,
+ .get_ring_selector = ath12k_wifi8_hw_get_ring_selector_qcn9575,
+};
+
static const struct ath12k_hw_params ath12k_wifi8_hw_params[] = {
{
.name = "qcn9575 hw2.0",
@@ -37,7 +73,7 @@ static const struct ath12k_hw_params ath12k_wifi8_hw_params[] = {
.qmi_max_chunk_size = SZ_2M,
.internal_sleep_clock = false,
- .hw_ops = NULL,
+ .hw_ops = &qcn9575_ops,
.ring_mask = NULL,
.host_ce_config = ath12k_wifi8_host_ce_config_qcn9575,
--
2.34.1