summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHsiu-Chang Chen <hsiuchangchen@google.com>2023-11-23 04:07:35 +0000
committerTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2023-11-28 00:35:56 +0000
commit00fdb0fd07b6d5959d8ed0ebce89d43908d8c51a (patch)
tree2d19eac4977cf40e0209e385b623b91539732317
parent522fff122d95213dd553374519ba2cc3f369e779 (diff)
downloadwlan-00fdb0fd07b6d5959d8ed0ebce89d43908d8c51a.tar.gz
This reverts commit 2c512635d66f69888648c1254b7bef710b315dab. Reason for revert: Revert debug patch Bug: 309879757 Test: Regression Test Change-Id: Ie6effe566d395a22b49b540d5fe4906b572d8393 Signed-off-by: Hsiu-Chang Chen <hsiuchangchen@google.com>
-rw-r--r--qcacld-3.0/components/pmo/core/inc/wlan_pmo_priv.h2
-rw-r--r--qcacld-3.0/components/pmo/core/inc/wlan_pmo_suspend_resume.h2
-rw-r--r--qcacld-3.0/components/pmo/core/src/wlan_pmo_main.c2
-rw-r--r--qcacld-3.0/components/pmo/core/src/wlan_pmo_suspend_resume.c102
4 files changed, 1 insertions, 107 deletions
diff --git a/qcacld-3.0/components/pmo/core/inc/wlan_pmo_priv.h b/qcacld-3.0/components/pmo/core/inc/wlan_pmo_priv.h
index cc0da1c..0b6da8e 100644
--- a/qcacld-3.0/components/pmo/core/inc/wlan_pmo_priv.h
+++ b/qcacld-3.0/components/pmo/core/inc/wlan_pmo_priv.h
@@ -85,8 +85,6 @@ struct wlan_pmo_ctx {
pmo_resume_handler[WLAN_UMAC_MAX_COMPONENTS];
void *pmo_resume_handler_arg[WLAN_UMAC_MAX_COMPONENTS];
qdf_spinlock_t lock;
- void *suspend_history_ref;
- void *resume_history_ref;
};
/**
diff --git a/qcacld-3.0/components/pmo/core/inc/wlan_pmo_suspend_resume.h b/qcacld-3.0/components/pmo/core/inc/wlan_pmo_suspend_resume.h
index d831fee..3f20b23 100644
--- a/qcacld-3.0/components/pmo/core/inc/wlan_pmo_suspend_resume.h
+++ b/qcacld-3.0/components/pmo/core/inc/wlan_pmo_suspend_resume.h
@@ -622,6 +622,4 @@ void pmo_core_vdev_set_moddtim_user(struct wlan_objmgr_vdev *vdev,
}
#endif /* WLAN_POWER_MANAGEMENT_OFFLOAD */
-void pmo_store_history_ref(struct wlan_pmo_ctx *ctx);
-
#endif /* end of _WLAN_PMO_SUSPEND_RESUME_H_ */
diff --git a/qcacld-3.0/components/pmo/core/src/wlan_pmo_main.c b/qcacld-3.0/components/pmo/core/src/wlan_pmo_main.c
index 7529591..619a8ef 100644
--- a/qcacld-3.0/components/pmo/core/src/wlan_pmo_main.c
+++ b/qcacld-3.0/components/pmo/core/src/wlan_pmo_main.c
@@ -28,7 +28,6 @@
#include "wlan_fwol_ucfg_api.h"
#include "wlan_ipa_obj_mgmt_api.h"
#include "wlan_pmo_icmp.h"
-#include "wlan_pmo_suspend_resume.h"
static struct wlan_pmo_ctx *gp_pmo_ctx;
@@ -47,7 +46,6 @@ QDF_STATUS pmo_allocate_ctx(void)
return QDF_STATUS_E_NOMEM;
qdf_spinlock_create(&gp_pmo_ctx->lock);
- pmo_store_history_ref(gp_pmo_ctx);
return QDF_STATUS_SUCCESS;
}
diff --git a/qcacld-3.0/components/pmo/core/src/wlan_pmo_suspend_resume.c b/qcacld-3.0/components/pmo/core/src/wlan_pmo_suspend_resume.c
index edc209d..5194ee8 100644
--- a/qcacld-3.0/components/pmo/core/src/wlan_pmo_suspend_resume.c
+++ b/qcacld-3.0/components/pmo/core/src/wlan_pmo_suspend_resume.c
@@ -43,89 +43,6 @@
#include "cdp_txrx_bus.h"
#include "wlan_pmo_ucfg_api.h"
-#define PMO_HISTORY_MAX 32
-static inline
-int32_t pmo_record_circular_index_next(qdf_atomic_t *index, int size)
-{
- int32_t next = qdf_atomic_inc_return(index);
-
- if (next == size)
- qdf_atomic_sub(size, index);
-
- return next % size;
-}
-
-/*Suspend history*/
-enum pmo_suspend_event_type {
- PMO_SUSPEND_ENTER = 0,
- PMO_SUSPEND_STEP_1,
- PMO_SUSPEND_STEP_2,
- PMO_SUSPEND_STEP_3,
- PMO_SUSPEND_EXIT,
- PMO_SUSPEND_ERROR,
- PMO_SUSPEND_EVENT_MAX,
-};
-
-struct pmo_suspend_history {
- enum pmo_suspend_event_type type;
- uint16_t line;
- uint64_t timestamp;
-};
-
-static struct pmo_suspend_history g_suspend_history[PMO_HISTORY_MAX];
-static qdf_atomic_t g_suspend_history_idx;
-
-static void
-pmo_record_suspend_event(enum pmo_suspend_event_type type, uint16_t line)
-{
- int32_t idx = pmo_record_circular_index_next(&g_suspend_history_idx,
- PMO_HISTORY_MAX);
- struct pmo_suspend_history *record = &g_suspend_history[idx];
-
- record->type = type;
- record->line = line;
- record->timestamp = qdf_get_log_timestamp();
-}
-
-/*Resume history*/
-enum pmo_resume_event_type {
- PMO_RESUME_ENTER = 0,
- PMO_RESUME_STEP_1,
- PMO_RESUME_STEP_2,
- PMO_RESUME_STEP_3,
- PMO_RESUME_STEP_4,
- PMO_RESUME_EXIT,
- PMO_RESUME_ERROR,
- PMO_RESUME_EVENT_MAX,
-};
-
-struct pmo_resume_history {
- enum pmo_resume_event_type type;
- uint16_t line;
- uint64_t timestamp;
-};
-
-static struct pmo_resume_history g_resume_history[PMO_HISTORY_MAX];
-static qdf_atomic_t g_resume_history_idx;
-
-static void
-pmo_record_resume_event(enum pmo_resume_event_type type, uint16_t line)
-{
- int32_t idx = pmo_record_circular_index_next(&g_resume_history_idx,
- PMO_HISTORY_MAX);
- struct pmo_resume_history *record = &g_resume_history[idx];
-
- record->type = type;
- record->line = line;
- record->timestamp = qdf_get_log_timestamp();
-}
-
-void pmo_store_history_ref(struct wlan_pmo_ctx *ctx)
-{
- ctx->suspend_history_ref = &g_suspend_history[0];
- ctx->resume_history_ref = &g_resume_history[0];
-}
-
/**
* pmo_core_get_vdev_dtim_period() - Get vdev dtim period
* @vdev: objmgr vdev handle
@@ -1166,7 +1083,6 @@ QDF_STATUS pmo_core_psoc_bus_runtime_suspend(struct wlan_objmgr_psoc *psoc,
int pending;
pmo_enter();
- pmo_record_suspend_event(PMO_SUSPEND_ENTER, __LINE__);
if (!psoc) {
pmo_err("psoc is NULL");
@@ -1220,7 +1136,6 @@ QDF_STATUS pmo_core_psoc_bus_runtime_suspend(struct wlan_objmgr_psoc *psoc,
goto resume_htc;
hif_pm_set_link_state(hif_ctx, HIF_PM_LINK_STATE_DOWN);
- pmo_record_suspend_event(PMO_SUSPEND_STEP_1, __LINE__);
status = pmo_core_psoc_bus_suspend_req(psoc, QDF_RUNTIME_SUSPEND,
&wow_params);
@@ -1244,8 +1159,6 @@ QDF_STATUS pmo_core_psoc_bus_runtime_suspend(struct wlan_objmgr_psoc *psoc,
goto resume_txrx;
}
- pmo_record_suspend_event(PMO_SUSPEND_STEP_2, __LINE__);
-
if (pld_cb) {
begin = qdf_get_log_timestamp_usecs();
ret = pld_cb();
@@ -1259,8 +1172,6 @@ QDF_STATUS pmo_core_psoc_bus_runtime_suspend(struct wlan_objmgr_psoc *psoc,
}
}
- pmo_record_suspend_event(PMO_SUSPEND_STEP_3, __LINE__);
-
if (hif_pm_get_wake_irq_type(hif_ctx) == HIF_PM_CE_WAKE) {
/*
* In moselle, there is no separate interrupt for wake_irq,
@@ -1317,8 +1228,6 @@ cdp_runtime_resume:
runtime_failure:
hif_process_runtime_suspend_failure(hif_ctx);
- pmo_record_suspend_event(PMO_SUSPEND_ERROR, __LINE__);
-
/* always make sure HTC queue kicker is at the end, so if any
* cmd is pending during suspending, it can re-trigger if suspend
* failure.
@@ -1331,7 +1240,6 @@ dec_psoc_ref:
out:
pmo_exit();
- pmo_record_suspend_event(PMO_SUSPEND_EXIT, __LINE__);
return status;
}
@@ -1347,7 +1255,6 @@ QDF_STATUS pmo_core_psoc_bus_runtime_resume(struct wlan_objmgr_psoc *psoc,
qdf_time_t begin, end;
pmo_enter();
- pmo_record_resume_event(PMO_RESUME_ENTER, __LINE__);
if (!psoc) {
pmo_err("psoc is NULL");
@@ -1374,7 +1281,6 @@ QDF_STATUS pmo_core_psoc_bus_runtime_resume(struct wlan_objmgr_psoc *psoc,
}
hif_pre_runtime_resume(hif_ctx);
- pmo_record_resume_event(PMO_RESUME_STEP_1, __LINE__);
if (pld_cb) {
begin = qdf_get_log_timestamp_usecs();
ret = pld_cb();
@@ -1386,7 +1292,6 @@ QDF_STATUS pmo_core_psoc_bus_runtime_resume(struct wlan_objmgr_psoc *psoc,
goto fail;
}
}
- pmo_record_resume_event(PMO_RESUME_STEP_2, __LINE__);
if (hif_runtime_resume(hif_ctx)) {
status = QDF_STATUS_E_FAILURE;
@@ -1402,7 +1307,6 @@ QDF_STATUS pmo_core_psoc_bus_runtime_resume(struct wlan_objmgr_psoc *psoc,
goto fail;
hif_pm_set_link_state(hif_ctx, HIF_PM_LINK_STATE_UP);
- pmo_record_resume_event(PMO_RESUME_STEP_3, __LINE__);
status = pmo_core_psoc_configure_resume(psoc, true);
if (status != QDF_STATUS_SUCCESS)
@@ -1413,7 +1317,6 @@ QDF_STATUS pmo_core_psoc_bus_runtime_resume(struct wlan_objmgr_psoc *psoc,
goto fail;
hif_process_runtime_resume_success(hif_ctx);
- pmo_record_resume_event(PMO_RESUME_STEP_4, __LINE__);
if (htc_runtime_resume(htc_ctx)) {
status = QDF_STATUS_E_FAILURE;
@@ -1424,12 +1327,9 @@ QDF_STATUS pmo_core_psoc_bus_runtime_resume(struct wlan_objmgr_psoc *psoc,
if (status != QDF_STATUS_SUCCESS)
goto fail;
- pmo_record_resume_event(PMO_RESUME_EXIT, __LINE__);
fail:
- if (status != QDF_STATUS_SUCCESS) {
- pmo_record_resume_event(PMO_RESUME_ERROR, __LINE__);
+ if (status != QDF_STATUS_SUCCESS)
qdf_trigger_self_recovery(psoc, QDF_RESUME_TIMEOUT);
- }
dec_psoc_ref:
pmo_psoc_put_ref(psoc);