From: Mihai Moldovan <ionic@ionic.de>
To: ath11k@lists.infradead.org
Cc: Mihai Moldovan <ionic@ionic.de>
Subject: [DONOTMERGE] [NOTEVENRFC] [PATCH 07/11] wifi: ath11k: implement QRTR endpoint ID fetching for PCI
Date: Tue, 5 Nov 2024 08:06:21 +0100 [thread overview]
Message-ID: <51978d847d5b9e966039bb2fd5fbdb28fa3c94d1.1730790062.git.ionic@ionic.de> (raw)
In-Reply-To: <cover.1730790058.git.ionic@ionic.de>
QRTR endpoint ID fetching for PCIe devices will use MHI.
Signed-off-by: Mihai Moldovan <ionic@ionic.de>
---
drivers/net/wireless/ath/ath11k/mhi.c | 17 +++++++++++++++++
drivers/net/wireless/ath/ath11k/mhi.h | 1 +
drivers/net/wireless/ath/ath11k/pci.c | 1 +
3 files changed, 19 insertions(+)
diff --git a/drivers/net/wireless/ath/ath11k/mhi.c b/drivers/net/wireless/ath/ath11k/mhi.c
index 6974a551883f..5af02802c3b0 100644
--- a/drivers/net/wireless/ath/ath11k/mhi.c
+++ b/drivers/net/wireless/ath/ath11k/mhi.c
@@ -490,3 +490,20 @@ int ath11k_mhi_resume(struct ath11k_pci *ab_pci)
return 0;
}
+
+int ath11k_mhi_set_qrtr_endpoint_id(struct ath11k_base *ab)
+{
+ struct ath11k_pci *ab_pci = ath11k_pci_priv(ab);
+ struct ath11k_qmi *qmi = &ab->qmi;
+ int ret;
+
+ /* Pass endpoint ID up for QMI usage. */
+ ret = mhi_get_qrtr_endpoint_id(ab_pci->mhi_ctrl->mhi_dev, &qmi->handle.endpoint_id);
+ ath11k_dbg(ab, ATH11K_DBG_PCI, "queried mhi_device QRTR endpoint ID: %u\n", qmi->handle.endpoint_id);
+ if (ret) {
+ ath11k_warn(ab, "failed to query QRTR endpoint ID: %d\n", ret);
+ return ret;
+ }
+
+ return 0;
+}
diff --git a/drivers/net/wireless/ath/ath11k/mhi.h b/drivers/net/wireless/ath/ath11k/mhi.h
index a682aad52fc5..84465fb5d5da 100644
--- a/drivers/net/wireless/ath/ath11k/mhi.h
+++ b/drivers/net/wireless/ath/ath11k/mhi.h
@@ -27,4 +27,5 @@ void ath11k_mhi_clear_vector(struct ath11k_base *ab);
int ath11k_mhi_suspend(struct ath11k_pci *ar_pci);
int ath11k_mhi_resume(struct ath11k_pci *ar_pci);
+int ath11k_mhi_set_qrtr_endpoint_id(struct ath11k_base *ab);
#endif
diff --git a/drivers/net/wireless/ath/ath11k/pci.c b/drivers/net/wireless/ath/ath11k/pci.c
index 18248b8e5b93..fd3664c8ff8b 100644
--- a/drivers/net/wireless/ath/ath11k/pci.c
+++ b/drivers/net/wireless/ath/ath11k/pci.c
@@ -744,6 +744,7 @@ static const struct ath11k_hif_ops ath11k_pci_hif_ops = {
.ce_irq_enable = ath11k_pci_hif_ce_irq_enable,
.ce_irq_disable = ath11k_pci_hif_ce_irq_disable,
.get_ce_msi_idx = ath11k_pcic_get_ce_msi_idx,
+ .set_qrtr_endpoint_id = ath11k_mhi_set_qrtr_endpoint_id,
};
static void ath11k_pci_read_hw_version(struct ath11k_base *ab, u32 *major, u32 *minor)
--
2.45.2
next prev parent reply other threads:[~2024-11-05 8:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-05 7:06 [DONOTMERGE] [NOTEVENRFC] [PATCH 00/11] ath1{1,2}k: support multiple PCI devices in one system Mihai Moldovan
2024-11-05 7:06 ` [DONOTMERGE] [NOTEVENRFC] [PATCH 01/11] bus: mhi: host: add QRTR endpoint ID to mhi_device Mihai Moldovan
2024-11-05 7:06 ` [DONOTMERGE] [NOTEVENRFC] [PATCH 02/11] net: qrtr: mhi: pass endpoint ID to MHI device on init Mihai Moldovan
2024-11-05 7:06 ` [DONOTMERGE] [NOTEVENRFC] [PATCH 03/11] soc: qcom: qmi_helpers: add QRTR endpoint ID to qmi_handle Mihai Moldovan
2024-11-05 7:06 ` [DONOTMERGE] [NOTEVENRFC] [PATCH 04/11] soc: qcom: qmi_helpers: optionally bind to QRTR endpoint ID in qmi_sock_create Mihai Moldovan
2024-11-05 7:06 ` [DONOTMERGE] [NOTEVENRFC] [PATCH 05/11] wifi: ath11k: add QRTR endpoint ID hif feature Mihai Moldovan
2024-11-05 7:06 ` [DONOTMERGE] [NOTEVENRFC] [PATCH 06/11] wifi: ath11k: stub QRTR endpoint ID fetching for AHB Mihai Moldovan
2024-11-05 7:06 ` Mihai Moldovan [this message]
2024-11-05 7:06 ` [DONOTMERGE] [NOTEVENRFC] [PATCH 08/11] wifi: ath11k: bind to QRTR endpoint ID in ath11k_qmi_ops_new_server Mihai Moldovan
2024-11-05 7:06 ` [DONOTMERGE] [NOTEVENRFC] [PATCH 09/11] wifi: ath12k: add QRTR endpoint ID hif feature Mihai Moldovan
2024-11-05 7:06 ` [DONOTMERGE] [NOTEVENRFC] [PATCH 10/11] wifi: ath12k: implement QRTR endpoint ID fetching for PCI Mihai Moldovan
2024-11-05 7:06 ` [DONOTMERGE] [NOTEVENRFC] [PATCH 11/11] wifi: ath12k: bind to QRTR endpoint ID in ath12k_qmi_ops_new_server Mihai Moldovan
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=51978d847d5b9e966039bb2fd5fbdb28fa3c94d1.1730790062.git.ionic@ionic.de \
--to=ionic@ionic.de \
--cc=ath11k@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.