linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Baochen Qiang <quic_bqiang@quicinc.com>
To: <ath12k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>, <quic_bqiang@quicinc.com>
Subject: [PATCH 07/10] wifi: ath12k: no need to handle pktlog during suspend/resume
Date: Fri, 12 Apr 2024 14:06:17 +0800	[thread overview]
Message-ID: <20240412060620.27519-8-quic_bqiang@quicinc.com> (raw)
In-Reply-To: <20240412060620.27519-1-quic_bqiang@quicinc.com>

Currently pktlog is stopped in suspend callback and started in
resume callback, and in either scenarios it's basically to
delete/modify ab->mon_reap_timer and to purge related rings.
For WCN7850 it's pointless because pktlog is not enabled: both
ab->mon_reap_timer and those rings are not initialized.

So remove pktlog handling in suspend/resume callbacks. And
further, remove these two functions and related callee because
no one is calling them.

Other chips are not affected because now only WCN7850 supports
suspend/resume.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1

Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/core.c  | 21 -----------
 drivers/net/wireless/ath/ath12k/dp_rx.c | 48 -------------------------
 drivers/net/wireless/ath/ath12k/dp_rx.h |  2 --
 3 files changed, 71 deletions(-)

diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c
index dfec390b66c6..aeb7f9e43cc4 100644
--- a/drivers/net/wireless/ath/ath12k/core.c
+++ b/drivers/net/wireless/ath/ath12k/core.c
@@ -64,20 +64,6 @@ int ath12k_core_suspend(struct ath12k_base *ab)
 	}
 	rcu_read_unlock();
 
-	ret = ath12k_dp_rx_pktlog_stop(ab, true);
-	if (ret) {
-		ath12k_warn(ab, "failed to stop dp rx (and timer) pktlog during suspend: %d\n",
-			    ret);
-		return ret;
-	}
-
-	ret = ath12k_dp_rx_pktlog_stop(ab, false);
-	if (ret) {
-		ath12k_warn(ab, "failed to stop dp rx pktlog during suspend: %d\n",
-			    ret);
-		return ret;
-	}
-
 	ath12k_hif_irq_disable(ab);
 	ath12k_hif_ce_irq_disable(ab);
 
@@ -106,13 +92,6 @@ int ath12k_core_resume(struct ath12k_base *ab)
 	ath12k_hif_ce_irq_enable(ab);
 	ath12k_hif_irq_enable(ab);
 
-	ret = ath12k_dp_rx_pktlog_start(ab);
-	if (ret) {
-		ath12k_warn(ab, "failed to start rx pktlog during resume: %d\n",
-			    ret);
-		return ret;
-	}
-
 	return 0;
 }
 
diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
index a593beecdd12..dd6d9b2a5bcf 100644
--- a/drivers/net/wireless/ath/ath12k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
@@ -239,28 +239,6 @@ static inline u8 ath12k_dp_rx_get_msdu_src_link(struct ath12k_base *ab,
 	return ab->hal_rx_ops->rx_desc_get_msdu_src_link_id(desc);
 }
 
-static int ath12k_dp_purge_mon_ring(struct ath12k_base *ab)
-{
-	int i, reaped = 0;
-	unsigned long timeout = jiffies + msecs_to_jiffies(DP_MON_PURGE_TIMEOUT_MS);
-
-	do {
-		for (i = 0; i < ab->hw_params->num_rxmda_per_pdev; i++)
-			reaped += ath12k_dp_mon_process_ring(ab, i, NULL,
-							     DP_MON_SERVICE_BUDGET,
-							     ATH12K_DP_RX_MONITOR_MODE);
-
-		/* nothing more to reap */
-		if (reaped < DP_MON_SERVICE_BUDGET)
-			return 0;
-
-	} while (time_before(jiffies, timeout));
-
-	ath12k_warn(ab, "dp mon ring purge timeout");
-
-	return -ETIMEDOUT;
-}
-
 static size_t ath12k_dp_list_cut_nodes(struct list_head *list,
 				       struct list_head *head,
 				       size_t count)
@@ -4264,29 +4242,3 @@ int ath12k_dp_rx_pdev_mon_attach(struct ath12k *ar)
 
 	return 0;
 }
-
-int ath12k_dp_rx_pktlog_start(struct ath12k_base *ab)
-{
-	/* start reap timer */
-	mod_timer(&ab->mon_reap_timer,
-		  jiffies + msecs_to_jiffies(ATH12K_MON_TIMER_INTERVAL));
-
-	return 0;
-}
-
-int ath12k_dp_rx_pktlog_stop(struct ath12k_base *ab, bool stop_timer)
-{
-	int ret;
-
-	if (stop_timer)
-		del_timer_sync(&ab->mon_reap_timer);
-
-	/* reap all the monitor related rings */
-	ret = ath12k_dp_purge_mon_ring(ab);
-	if (ret) {
-		ath12k_warn(ab, "failed to purge dp mon ring: %d\n", ret);
-		return ret;
-	}
-
-	return 0;
-}
diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.h b/drivers/net/wireless/ath/ath12k/dp_rx.h
index 25940061ead5..6b8e22a5b43c 100644
--- a/drivers/net/wireless/ath/ath12k/dp_rx.h
+++ b/drivers/net/wireless/ath/ath12k/dp_rx.h
@@ -123,8 +123,6 @@ int ath12k_dp_rx_bufs_replenish(struct ath12k_base *ab,
 int ath12k_dp_rx_pdev_mon_attach(struct ath12k *ar);
 int ath12k_dp_rx_peer_frag_setup(struct ath12k *ar, const u8 *peer_mac, int vdev_id);
 
-int ath12k_dp_rx_pktlog_start(struct ath12k_base *ab);
-int ath12k_dp_rx_pktlog_stop(struct ath12k_base *ab, bool stop_timer);
 u8 ath12k_dp_rx_h_l3pad(struct ath12k_base *ab,
 			struct hal_rx_desc *desc);
 struct ath12k_peer *
-- 
2.25.1


  parent reply	other threads:[~2024-04-12  6:06 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-12  6:06 [PATCH 00/10] wifi: ath12k: support suspend/resume Baochen Qiang
2024-04-12  6:06 ` [PATCH 01/10] wifi: ath12k: rearrange IRQ enable/disable in reset path Baochen Qiang
2024-04-12 18:24   ` Sidhanta Sahu
2024-04-15  5:38     ` Baochen Qiang
2024-04-22 17:51   ` Jeff Johnson
2024-04-23  9:27   ` Kalle Valo
2024-04-12  6:06 ` [PATCH 02/10] wifi: ath12k: remove MHI LOOPBACK channels Baochen Qiang
2024-04-22 17:51   ` Jeff Johnson
2024-04-12  6:06 ` [PATCH 03/10] wifi: ath12k: do not dump SRNG statistics during resume Baochen Qiang
2024-04-22 17:51   ` Jeff Johnson
2024-04-12  6:06 ` [PATCH 04/10] wifi: ath12k: fix warning on DMA ring capabilities event Baochen Qiang
2024-04-22 17:51   ` Jeff Johnson
2024-04-12  6:06 ` [PATCH 05/10] wifi: ath12k: decrease MHI channel buffer length to 8KB Baochen Qiang
2024-04-22 17:51   ` Jeff Johnson
2024-04-12  6:06 ` [PATCH 06/10] wifi: ath12k: flush all packets before suspend Baochen Qiang
2024-04-22 17:52   ` Jeff Johnson
2024-04-12  6:06 ` Baochen Qiang [this message]
2024-04-22 17:52   ` [PATCH 07/10] wifi: ath12k: no need to handle pktlog during suspend/resume Jeff Johnson
2024-04-12  6:06 ` [PATCH 08/10] wifi: ath12k: avoid stopping mac80211 queues in ath12k_core_restart() Baochen Qiang
2024-04-22 17:52   ` Jeff Johnson
2024-04-12  6:06 ` [PATCH 09/10] wifi: ath12k: support suspend/resume Baochen Qiang
2024-04-22 17:52   ` Jeff Johnson
2024-04-12  6:06 ` [PATCH 10/10] wifi: ath12k: change supports_suspend to true for WCN7850 Baochen Qiang
2024-04-22 17:52   ` Jeff Johnson
2024-04-12 18:05 ` [PATCH 00/10] wifi: ath12k: support suspend/resume Jeff Johnson
2024-04-15  5:51   ` Baochen Qiang
2024-04-16  8:28     ` Kalle Valo
2024-04-16 10:31       ` Baochen Qiang
2024-04-17 14:22   ` Kalle Valo
2024-04-17 23:32     ` Jeff Johnson
2024-04-18  6:06       ` Jeff Johnson
2024-04-18 10:43         ` Baochen Qiang

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=20240412060620.27519-8-quic_bqiang@quicinc.com \
    --to=quic_bqiang@quicinc.com \
    --cc=ath12k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).