All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath11k: htt stats module does not handle multiple skbs
@ 2019-12-17 17:22 ` John Crispin
  0 siblings, 0 replies; 4+ messages in thread
From: John Crispin @ 2019-12-17 17:22 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Miles Hu, linux-wireless, ath11k, John Crispin

From: Miles Hu <milehu@codeaurora.org>

This patch removes the "done" check from the stats handler thus allowing
the code to parse more skbs.

Reviewed-by: John Crispin <john@phrozen.org>
Signed-off-by: Miles Hu <milehu@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/debug_htt_stats.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/debug_htt_stats.c b/drivers/net/wireless/ath/ath11k/debug_htt_stats.c
index 27b301bc1a1b..45dbffaca3bd 100644
--- a/drivers/net/wireless/ath/ath11k/debug_htt_stats.c
+++ b/drivers/net/wireless/ath/ath11k/debug_htt_stats.c
@@ -4119,6 +4119,7 @@ void ath11k_dbg_htt_ext_stats_handler(struct ath11k_base *ab,
 {
 	struct ath11k_htt_extd_stats_msg *msg;
 	struct debug_htt_stats_req *stats_req;
+	bool send_completion = false;
 	struct ath11k *ar;
 	u32 len;
 	u64 cookie;
@@ -4147,10 +4148,8 @@ void ath11k_dbg_htt_ext_stats_handler(struct ath11k_base *ab,
 		return;
 
 	spin_lock_bh(&ar->debug.htt_stats.lock);
-	if (stats_req->done) {
-		spin_unlock_bh(&ar->debug.htt_stats.lock);
-		return;
-	}
+	if (!stats_req->done)
+		send_completion = true;
 	stats_req->done = true;
 	spin_unlock_bh(&ar->debug.htt_stats.lock);
 
@@ -4161,7 +4160,8 @@ void ath11k_dbg_htt_ext_stats_handler(struct ath11k_base *ab,
 	if (ret)
 		ath11k_warn(ab, "Failed to parse tlv %d\n", ret);
 
-	complete(&stats_req->cmpln);
+	if (send_completion)
+		complete(&stats_req->cmpln);
 }
 
 static ssize_t ath11k_read_htt_stats_type(struct file *file,
-- 
2.20.1


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

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

* [PATCH] ath11k: htt stats module does not handle multiple skbs
@ 2019-12-17 17:22 ` John Crispin
  0 siblings, 0 replies; 4+ messages in thread
From: John Crispin @ 2019-12-17 17:22 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, ath11k, Miles Hu, John Crispin

From: Miles Hu <milehu@codeaurora.org>

This patch removes the "done" check from the stats handler thus allowing
the code to parse more skbs.

Reviewed-by: John Crispin <john@phrozen.org>
Signed-off-by: Miles Hu <milehu@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/debug_htt_stats.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/debug_htt_stats.c b/drivers/net/wireless/ath/ath11k/debug_htt_stats.c
index 27b301bc1a1b..45dbffaca3bd 100644
--- a/drivers/net/wireless/ath/ath11k/debug_htt_stats.c
+++ b/drivers/net/wireless/ath/ath11k/debug_htt_stats.c
@@ -4119,6 +4119,7 @@ void ath11k_dbg_htt_ext_stats_handler(struct ath11k_base *ab,
 {
 	struct ath11k_htt_extd_stats_msg *msg;
 	struct debug_htt_stats_req *stats_req;
+	bool send_completion = false;
 	struct ath11k *ar;
 	u32 len;
 	u64 cookie;
@@ -4147,10 +4148,8 @@ void ath11k_dbg_htt_ext_stats_handler(struct ath11k_base *ab,
 		return;
 
 	spin_lock_bh(&ar->debug.htt_stats.lock);
-	if (stats_req->done) {
-		spin_unlock_bh(&ar->debug.htt_stats.lock);
-		return;
-	}
+	if (!stats_req->done)
+		send_completion = true;
 	stats_req->done = true;
 	spin_unlock_bh(&ar->debug.htt_stats.lock);
 
@@ -4161,7 +4160,8 @@ void ath11k_dbg_htt_ext_stats_handler(struct ath11k_base *ab,
 	if (ret)
 		ath11k_warn(ab, "Failed to parse tlv %d\n", ret);
 
-	complete(&stats_req->cmpln);
+	if (send_completion)
+		complete(&stats_req->cmpln);
 }
 
 static ssize_t ath11k_read_htt_stats_type(struct file *file,
-- 
2.20.1


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

* Re: [PATCH] ath11k: htt stats module does not handle multiple skbs
  2019-12-17 17:22 ` John Crispin
  (?)
@ 2020-01-26 14:27 ` Kalle Valo
  -1 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2020-01-26 14:27 UTC (permalink / raw)
  To: John Crispin; +Cc: Miles Hu, linux-wireless, ath11k

John Crispin <john@phrozen.org> wrote:

> This patch removes the "done" check from the stats handler thus allowing
> the code to parse more skbs.
> 
> Reviewed-by: John Crispin <john@phrozen.org>
> Signed-off-by: Miles Hu <milehu@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

s-o-b from John missing

Patch set to Changes Requested.

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

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] 4+ messages in thread

* Re: [PATCH] ath11k: htt stats module does not handle multiple skbs
  2019-12-17 17:22 ` John Crispin
  (?)
  (?)
@ 2020-01-26 14:27 ` Kalle Valo
  -1 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2020-01-26 14:27 UTC (permalink / raw)
  To: John Crispin; +Cc: linux-wireless, ath11k, Miles Hu, John Crispin

John Crispin <john@phrozen.org> wrote:

> This patch removes the "done" check from the stats handler thus allowing
> the code to parse more skbs.
> 
> Reviewed-by: John Crispin <john@phrozen.org>
> Signed-off-by: Miles Hu <milehu@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

s-o-b from John missing

Patch set to Changes Requested.

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

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

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

end of thread, other threads:[~2020-01-26 14:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-17 17:22 [PATCH] ath11k: htt stats module does not handle multiple skbs John Crispin
2019-12-17 17:22 ` John Crispin
2020-01-26 14:27 ` Kalle Valo
2020-01-26 14:27 ` 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.