Re: [PATCH v9 12/14] wifi: ath12k: Switch to generic PAS TZ APIs
From: Jeff Johnson <hidden>
Date: 2026-07-13 18:58:45
Also in:
ath12k, dri-devel, linux-arm-msm, linux-devicetree, linux-media, linux-remoteproc, linux-wireless, lkml
On 7/2/2026 4:58 AM, Sumit Garg wrote:
quoted hunk ↗ jump to hunk
From: Sumit Garg <redacted> Switch ath12k client driver over to generic PAS TZ APIs. Generic PAS TZ service allows to support multiple TZ implementation backends like QTEE based SCM PAS service, OP-TEE based PAS service and any further future TZ backend service. Acked-by: Jeff Johnson <jjohnson@kernel.org> Signed-off-by: Sumit Garg <redacted> --- drivers/net/wireless/ath/ath12k/Kconfig | 2 +- drivers/net/wireless/ath/ath12k/ahb.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-)diff --git a/drivers/net/wireless/ath/ath12k/Kconfig b/drivers/net/wireless/ath/ath12k/Kconfig index 4a2b240f967a..0d5d1c55bfc1 100644 --- a/drivers/net/wireless/ath/ath12k/Kconfig +++ b/drivers/net/wireless/ath/ath12k/Kconfig@@ -18,7 +18,7 @@ config ATH12K_AHB bool "Qualcomm ath12k AHB support" depends on ATH12K && REMOTEPROC select QCOM_MDT_LOADER - select QCOM_SCM + select QCOM_PAS help Enable support for Ath12k AHB bus chipsets, example IPQ5332.diff --git a/drivers/net/wireless/ath/ath12k/ahb.c b/drivers/net/wireless/ath/ath12k/ahb.c index 30733a244454..69e21214e629 100644 --- a/drivers/net/wireless/ath/ath12k/ahb.c +++ b/drivers/net/wireless/ath/ath12k/ahb.c@@ -5,7 +5,7 @@ */ #include <linux/dma-mapping.h> -#include <linux/firmware/qcom/qcom_scm.h> +#include <linux/firmware/qcom/qcom_pas.h> #include <linux/of.h> #include <linux/of_device.h> #include <linux/platform_device.h>@@ -420,7 +420,7 @@ static int ath12k_ahb_power_up(struct ath12k_base *ab) if (ab_ahb->scm_auth_enabled) { /* Authenticate FW image using peripheral ID */ - ret = qcom_scm_pas_auth_and_reset(pasid); + ret = qcom_pas_auth_and_reset(pasid); if (ret) { ath12k_err(ab, "failed to boot the remote processor %d\n", ret); goto err_fw2;@@ -485,10 +485,10 @@ static void ath12k_ahb_power_down(struct ath12k_base *ab, bool is_suspend) pasid = (u32_encode_bits(ab_ahb->userpd_id, ATH12K_USERPD_ID_MASK)) | ATH12K_AHB_UPD_SWID; /* Release the firmware */ - ret = qcom_scm_pas_shutdown(pasid); + ret = qcom_pas_shutdown(pasid); if (ret) - ath12k_err(ab, "scm pas shutdown failed for userPD%d\n", - ab_ahb->userpd_id); + ath12k_err(ab, "PAS shutdown failed for userPD%d: %d\n", + ab_ahb->userpd_id, ret); } }
My code review agent is flagging: **Missing probe-defer guard** (`ahb.c:422`) — `qcom_pas_is_available()` is explicitly documented as mandatory before any PAS call. The OP-TEE backend registers its ops asynchronously; without an `if (!qcom_pas_is_available()) return -EPROBE_DEFER` in the probe path, firmware auth silently returns `-ENODEV` with no retry. Is it an existing deficiency in ath12k that there is no probe deferral? Or did the qcom_scm_*() calls somehow guarantee something that is no longer true with the qcom_pas_*() calls? And also for future cleanup: **Misleading field name** (`ahb.c:384`) — `scm_auth_enabled` should be `pas_auth_enabled` to match the backend-agnostic API it now guards. I plan on taking this patch as-is through the ath tree since it is currently just simple API changes. Any additional changes can come separately. /jeff