[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8768f055a92edb14d5f7bab8e497f437f06272b9.1732506261.git.ionic@ionic.de>
Date: Mon, 25 Nov 2024 04:50:25 +0100
From: Mihai Moldovan <ionic@...ic.de>
To: ath11k@...ts.infradead.org,
ath12k@...ts.infradead.org,
Kalle Valo <kvalo@...nel.org>,
Jeff Johnson <jjohnson@...nel.org>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Cc: Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konradybcio@...nel.org>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>,
linux-wireless@...r.kernel.org,
linux-arm-msm@...r.kernel.org,
netdev@...r.kernel.org
Subject: [RFC] [PATCH v2 10/13] wifi: ath11k: bind to QRTR endpoint ID in ath11k_qmi_init_service
If possible, fetch the QRTR endpoint ID in ath11k_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 ath11k-based cards with the same QRTR
node/port combination to work simultanenous (and, for that matter, at
all).
Signed-off-by: Mihai Moldovan <ionic@...ic.de>
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-05266-QCAHSTSWPLZ_V2_TO_X86-1
---
drivers/net/wireless/ath/ath11k/qmi.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
index 5759fc521316..604d7211b980 100644
--- a/drivers/net/wireless/ath/ath11k/qmi.c
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
@@ -15,6 +15,7 @@
#include <linux/ioport.h>
#include <linux/firmware.h>
#include <linux/of_irq.h>
+#include <net/sock.h>
#define SLEEP_CLOCK_SELECT_INTERNAL_BIT 0x02
#define HOST_CSTATE_BIT 0x04
@@ -3315,6 +3316,13 @@ int ath11k_qmi_init_service(struct ath11k_base *ab)
ab->qmi.ab = ab;
ab->qmi.target_mem_mode = ab->hw_params.fw_mem_mode;
+
+ ret = ath11k_set_qrtr_endpoint_id(ab);
+ if (ret) {
+ ath11k_warn(ab, "failed to set QRTR endpoint ID: %d\n", ret);
+ ath11k_warn(ab, "only one device per system will be supported\n");
+ }
+
ret = qmi_handle_init(&ab->qmi.handle, ATH11K_QMI_RESP_LEN_MAX,
&ath11k_qmi_ops, ath11k_qmi_msg_handlers);
if (ret < 0) {
--
2.45.2
Powered by blists - more mailing lists