All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ath11k: qmi clean up ce and HTC service config update
@ 2019-10-29  6:54 Anilkumar Kolli
  2019-10-29  6:54 ` [PATCH 2/2] ath11k: qmi clean up in ath11k_qmi_wlanfw_wlan_cfg_send() Anilkumar Kolli
  2019-11-07  9:04 ` [PATCH 1/2] ath11k: qmi clean up ce and HTC service config update Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Anilkumar Kolli @ 2019-10-29  6:54 UTC (permalink / raw)
  To: ath11k

Copy CE and htc service configs for all pipes.

Signed-off-by: Anilkumar Kolli <akolli@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/ahb.c | 9 ++++-----
 drivers/net/wireless/ath/ath11k/qmi.h | 4 ++--
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
index a2c697b97bdf..67dd455b56a0 100644
--- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
@@ -677,11 +677,10 @@ static void ath11k_ahb_init_qmi_ce_config(struct ath11k_base *ab)
 {
 	struct ath11k_qmi_ce_cfg *cfg = &ab->qmi.ce_cfg;
 
-	cfg->tgt_ce = (u8 *)target_ce_config_wlan;
-	cfg->tgt_ce_len = sizeof(target_ce_config_wlan);
-
-	cfg->svc_to_ce_map = (u8 *)target_service_to_ce_map_wlan;
-	cfg->svc_to_ce_map_len = sizeof(target_service_to_ce_map_wlan);
+	cfg->tgt_ce_len = ARRAY_SIZE(target_ce_config_wlan) - 1;
+	cfg->tgt_ce = target_ce_config_wlan;
+	cfg->svc_to_ce_map_len = ARRAY_SIZE(target_service_to_ce_map_wlan);
+	cfg->svc_to_ce_map = target_service_to_ce_map_wlan;
 }
 
 static void ath11k_ahb_free_ext_irq(struct ath11k_base *ab)
diff --git a/drivers/net/wireless/ath/ath11k/qmi.h b/drivers/net/wireless/ath/ath11k/qmi.h
index ff9203d46810..fab03f5af271 100644
--- a/drivers/net/wireless/ath/ath11k/qmi.h
+++ b/drivers/net/wireless/ath/ath11k/qmi.h
@@ -64,9 +64,9 @@ struct ath11k_qmi_driver_event {
 };
 
 struct ath11k_qmi_ce_cfg {
-	const u8 *tgt_ce;
+	const struct ce_pipe_config *tgt_ce;
 	int tgt_ce_len;
-	const u8 *svc_to_ce_map;
+	const struct service_to_pipe *svc_to_ce_map;
 	int svc_to_ce_map_len;
 	const u8 *shadow_reg;
 	int shadow_reg_len;
-- 
1.9.1


_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] ath11k: qmi clean up in ath11k_qmi_wlanfw_wlan_cfg_send()
  2019-10-29  6:54 [PATCH 1/2] ath11k: qmi clean up ce and HTC service config update Anilkumar Kolli
@ 2019-10-29  6:54 ` Anilkumar Kolli
  2019-11-07  9:04 ` [PATCH 1/2] ath11k: qmi clean up ce and HTC service config update Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Anilkumar Kolli @ 2019-10-29  6:54 UTC (permalink / raw)
  To: ath11k

Use pipe_id id instead of ret in for loop.

Signed-off-by: Anilkumar Kolli <akolli@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/ce.h  |  9 +++++++--
 drivers/net/wireless/ath/ath11k/qmi.c | 28 +++++++++++++---------------
 2 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/ce.h b/drivers/net/wireless/ath/ath11k/ce.h
index 9f25bad504e9..6f56c4d2ce10 100644
--- a/drivers/net/wireless/ath/ath11k/ce.h
+++ b/drivers/net/wireless/ath/ath11k/ce.h
@@ -57,7 +57,12 @@
 
 struct ath11k_base;
 
-/* Establish a mapping between a service/direction and a pipe. */
+/*
+ * Establish a mapping between a service/direction and a pipe.
+ * Configuration information for a Copy Engine pipe and services.
+ * Passed from Host to Target through QMI message and must be in
+ * little endian format.
+ */
 struct service_to_pipe {
 	__le32 service_id;
 	__le32 pipedir;
@@ -66,7 +71,7 @@ struct service_to_pipe {
 
 /*
  * Configuration information for a Copy Engine pipe.
- * Passed from Host to Target during startup (one per CE).
+ * Passed from Host to Target through QMI message during startup (one per CE).
  *
  * NOTE: Structure is shared between Host software and Target firmware!
  */
diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
index 88e626f2a844..dffb8629f14b 100644
--- a/drivers/net/wireless/ath/ath11k/qmi.c
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
@@ -2035,7 +2035,7 @@ static int ath11k_qmi_wlanfw_wlan_cfg_send(struct ath11k_base *ab)
 	struct ce_pipe_config *ce_cfg;
 	struct service_to_pipe *svc_cfg;
 	struct qmi_txn txn = {};
-	int ret = 0;
+	int ret = 0, pipe_num;
 
 	ce_cfg	= (struct ce_pipe_config *)ab->qmi.ce_cfg.tgt_ce;
 	svc_cfg	= (struct service_to_pipe *)ab->qmi.ce_cfg.svc_to_ce_map;
@@ -2052,24 +2052,22 @@ static int ath11k_qmi_wlanfw_wlan_cfg_send(struct ath11k_base *ab)
 
 	req->tgt_cfg_valid = 1;
 	/* This is number of CE configs */
-	req->tgt_cfg_len = ((ab->qmi.ce_cfg.tgt_ce_len) /
-				(sizeof(struct ce_pipe_config))) - 1;
-	for (ret = 0; ret <= req->tgt_cfg_len ; ret++) {
-		req->tgt_cfg[ret].pipe_num = ce_cfg[ret].pipenum;
-		req->tgt_cfg[ret].pipe_dir = ce_cfg[ret].pipedir;
-		req->tgt_cfg[ret].nentries = ce_cfg[ret].nentries;
-		req->tgt_cfg[ret].nbytes_max = ce_cfg[ret].nbytes_max;
-		req->tgt_cfg[ret].flags = ce_cfg[ret].flags;
+	req->tgt_cfg_len = ab->qmi.ce_cfg.tgt_ce_len;
+	for (pipe_num = 0; pipe_num <= req->tgt_cfg_len ; pipe_num++) {
+		req->tgt_cfg[pipe_num].pipe_num = ce_cfg[pipe_num].pipenum;
+		req->tgt_cfg[pipe_num].pipe_dir = ce_cfg[pipe_num].pipedir;
+		req->tgt_cfg[pipe_num].nentries = ce_cfg[pipe_num].nentries;
+		req->tgt_cfg[pipe_num].nbytes_max = ce_cfg[pipe_num].nbytes_max;
+		req->tgt_cfg[pipe_num].flags = ce_cfg[pipe_num].flags;
 	}
 
 	req->svc_cfg_valid = 1;
 	/* This is number of Service/CE configs */
-	req->svc_cfg_len = (ab->qmi.ce_cfg.svc_to_ce_map_len) /
-				(sizeof(struct service_to_pipe));
-	for (ret = 0; ret < req->svc_cfg_len; ret++) {
-		req->svc_cfg[ret].service_id = svc_cfg[ret].service_id;
-		req->svc_cfg[ret].pipe_dir = svc_cfg[ret].pipedir;
-		req->svc_cfg[ret].pipe_num = svc_cfg[ret].pipenum;
+	req->svc_cfg_len = ab->qmi.ce_cfg.svc_to_ce_map_len;
+	for (pipe_num = 0; pipe_num < req->svc_cfg_len; pipe_num++) {
+		req->svc_cfg[pipe_num].service_id = svc_cfg[pipe_num].service_id;
+		req->svc_cfg[pipe_num].pipe_dir = svc_cfg[pipe_num].pipedir;
+		req->svc_cfg[pipe_num].pipe_num = svc_cfg[pipe_num].pipenum;
 	}
 	req->shadow_reg_valid = 0;
 	req->shadow_reg_v2_valid = 0;
-- 
1.9.1


_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] ath11k: qmi clean up ce and HTC service config update
  2019-10-29  6:54 [PATCH 1/2] ath11k: qmi clean up ce and HTC service config update Anilkumar Kolli
  2019-10-29  6:54 ` [PATCH 2/2] ath11k: qmi clean up in ath11k_qmi_wlanfw_wlan_cfg_send() Anilkumar Kolli
@ 2019-11-07  9:04 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2019-11-07  9:04 UTC (permalink / raw)
  To: Anilkumar Kolli; +Cc: ath11k

Anilkumar Kolli <akolli@codeaurora.org> wrote:

> Copy CE and htc service configs for all pipes.
> 
> Signed-off-by: Anilkumar Kolli <akolli@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

2 patches applied to ath11k-post-bringup branch of ath.git, thanks.

a6e9c4ddb317 ath11k: qmi clean up ce and HTC service config update
b7ba9e95da21 ath11k: qmi clean up in ath11k_qmi_wlanfw_wlan_cfg_send()

-- 
https://patchwork.kernel.org/patch/11217303/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-07  9:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-29  6:54 [PATCH 1/2] ath11k: qmi clean up ce and HTC service config update Anilkumar Kolli
2019-10-29  6:54 ` [PATCH 2/2] ath11k: qmi clean up in ath11k_qmi_wlanfw_wlan_cfg_send() Anilkumar Kolli
2019-11-07  9:04 ` [PATCH 1/2] ath11k: qmi clean up ce and HTC service config update Kalle Valo

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.