ATH11K Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mihai Moldovan <ionic@ionic.de>
To: ath11k@lists.infradead.org
Subject: [RFC] [PATCH 13/13] wifi: ath12k: bind to QRTR endpoint ID in ath12k_qmi_init_service
Date: Sun, 17 Nov 2024 17:06:12 +0100	[thread overview]
Message-ID: <94b2d667a387e1d13c55c80c660243b37cf91c32.1731858976.git.ionic@ionic.de> (raw)
In-Reply-To: <cover.1731858971.git.ionic@ionic.de>

If possible, fetch the QRTR endpoint ID in ath12k_qmi_init_service, just
before calling qmi_handle_init, and make it available in the qmi_handle.

qmi_helpers will then automatically bind to this endpoint for us.

This finally allows using multiple ath12k-based cards with the same QRTR
node/port combination to work simultanenous (and, for that matter, at
all), including combinations of ath11k-based and ath12k-based cards.

Signed-off-by: Mihai Moldovan <ionic@ionic.de>
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
---
 drivers/net/wireless/ath/ath12k/qmi.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/wireless/ath/ath12k/qmi.c b/drivers/net/wireless/ath/ath12k/qmi.c
index d2d9d03c7a28..b7bfcb184a6f 100644
--- a/drivers/net/wireless/ath/ath12k/qmi.c
+++ b/drivers/net/wireless/ath/ath12k/qmi.c
@@ -9,8 +9,10 @@
 #include "qmi.h"
 #include "core.h"
 #include "debug.h"
+#include "hif.h"
 #include <linux/of.h>
 #include <linux/firmware.h>
+#include <net/sock.h>
 
 #define SLEEP_CLOCK_SELECT_INTERNAL_BIT	0x02
 #define HOST_CSTATE_BIT			0x04
@@ -3371,6 +3373,13 @@ int ath12k_qmi_init_service(struct ath12k_base *ab)
 	ab->qmi.ab = ab;
 
 	ab->qmi.target_mem_mode = ATH12K_QMI_TARGET_MEM_MODE_DEFAULT;
+
+	ret = ath12k_hif_set_qrtr_endpoint_id(ab);
+	if (ret)
+		ath12k_warn(ab, "failed to set QRTR endpoint ID: %d\n"
+				"continuing without, but only one device per "
+				"system will be supported\n", ret);
+
 	ret = qmi_handle_init(&ab->qmi.handle, ATH12K_QMI_RESP_LEN_MAX,
 			      &ath12k_qmi_ops, ath12k_qmi_msg_handlers);
 	if (ret < 0) {
-- 
2.45.2



  parent reply	other threads:[~2024-11-17 16:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-17 16:05 [RFC] [PATCH 00/13] ath1{1,2}k: support multiple PCI devices in one system Mihai Moldovan
2024-11-17 16:06 ` [RFC] [PATCH 01/13] net: qrtr: support registering endpoint-specific data Mihai Moldovan
2024-11-17 16:06 ` [RFC] [PATCH 02/13] net: qrtr: mhi: register mhi_controller as " Mihai Moldovan
2024-11-17 16:06 ` [RFC] [PATCH 03/13] net: qrtr: smd: register rpmsg_device " Mihai Moldovan
2024-11-17 16:06 ` [RFC] [PATCH 04/13] net: qrtr: tun: register inode " Mihai Moldovan
2024-11-17 16:06 ` [RFC] [PATCH 05/13] soc: qcom: qmi_helpers: add QRTR endpoint ID to qmi_handle Mihai Moldovan
2024-11-17 16:06 ` [RFC] [PATCH 06/13] soc: qcom: qmi_helpers: optionally bind to QRTR endpoint ID in qmi_sock_create Mihai Moldovan
2024-11-17 16:06 ` [RFC] [PATCH 07/13] wifi: ath11k: add QRTR endpoint ID hif feature Mihai Moldovan
2024-11-17 16:06 ` [RFC] [PATCH 08/13] wifi: ath11k: stub QRTR endpoint ID fetching for AHB Mihai Moldovan
2024-11-17 16:06 ` [RFC] [PATCH 09/13] wifi: ath11k: implement QRTR endpoint ID fetching for PCI Mihai Moldovan
2024-11-17 16:06 ` [RFC] [PATCH 10/13] wifi: ath11k: bind to QRTR endpoint ID in ath11k_qmi_init_service Mihai Moldovan
2024-11-17 16:06 ` [RFC] [PATCH 11/13] wifi: ath12k: add QRTR endpoint ID hif feature Mihai Moldovan
2024-11-17 16:06 ` [RFC] [PATCH 12/13] wifi: ath12k: implement QRTR endpoint ID fetching for PCI Mihai Moldovan
2024-11-17 16:06 ` Mihai Moldovan [this message]
2024-11-17 16:59 ` [RFC] [PATCH 00/13] ath1{1,2}k: support multiple PCI devices in one system Mihai Moldovan
2024-11-18 15:52   ` Jeff Johnson
2024-11-22 16:40     ` Jeff Johnson
2024-11-22 20:05       ` 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=94b2d667a387e1d13c55c80c660243b37cf91c32.1731858976.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox