wifi: ath12k: no need to handle pktlog during suspend/resume
authorBaochen Qiang <quic_bqiang@quicinc.com>
Mon, 22 Apr 2024 12:11:45 +0000 (15:11 +0300)
committerKalle Valo <quic_kvalo@quicinc.com>
Tue, 23 Apr 2024 09:27:15 +0000 (12:27 +0300)
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>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240412060620.27519-8-quic_bqiang@quicinc.com
drivers/net/wireless/ath/ath12k/core.c
drivers/net/wireless/ath/ath12k/dp_rx.c
drivers/net/wireless/ath/ath12k/dp_rx.h

index d55245b480208976a6981a19ab04d5987938d18e..973bd4cf9cee7d8632bf8a1eff134a0aa688b300 100644 (file)
@@ -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;
 }
 
index 2b89a8d2c08ff0260a77a4a21383bbb792ed0baa..75df622f25d8545fc3ed8277c06606f3adc9d115 100644 (file)
@@ -247,28 +247,6 @@ static void ath12k_dp_clean_up_skb_list(struct sk_buff_head *skb_list)
                dev_kfree_skb_any(skb);
 }
 
-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)
@@ -4310,29 +4288,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;
-}
index 25940061ead52e79eac8d80caa255ff5ce1d9e6d..2ff4211601810b3220bfb6538f8e0bbac26037a4 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause-Clear */
 /*
  * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 #ifndef ATH12K_DP_RX_H
 #define 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 *