qcacld-3.0: suspend scan before scheduler thread suspended

Scan cmd still can be exist after scheduler thread is suspended
when host suspend, the scan cmd can't be removed from
serialization list by either complete or cancel any more since
both depends on scheduler thread, suspend thread blocked 30s to
wait scan cmd cleared.

Roam sync event from F/W can't be handled and Roam sync complete
can't be sent to F/W since scheduler thread suspended, then F/W
assert for roam sync cmd timeout.

After receive F/W down event, host will try SSR, but blocked by
unfinished suspend thread too.

Fix: suspend all components including scan before suspend
scheduler thread, make sure scan cmd is cleared and no new scan
is allowed any more before scheduler thread suspended.

Change-Id: I7a3badeedea018e4d92bbe8660692e42923852aa
CRs-Fixed: 2620650
This commit is contained in:
Jianmin Zhu
2020-02-12 21:33:08 +08:00
committed by nshrivas
부모 15d20e9cbb
커밋 5b0746560d
4개의 변경된 파일70개의 추가작업 그리고 23개의 파일을 삭제

파일 보기

@@ -531,18 +531,10 @@ QDF_STATUS pmo_core_psoc_user_space_suspend_req(struct wlan_objmgr_psoc *psoc,
goto out;
}
/* Suspend all components before sending target suspend command */
status = pmo_suspend_all_components(psoc, type);
if (status != QDF_STATUS_SUCCESS) {
pmo_err("Failed to suspend all component");
goto dec_psoc_ref;
}
status = pmo_core_psoc_configure_suspend(psoc, false);
if (status != QDF_STATUS_SUCCESS)
pmo_err("Failed to configure suspend");
dec_psoc_ref:
pmo_psoc_put_ref(psoc);
out:
pmo_exit();
@@ -712,18 +704,10 @@ QDF_STATUS pmo_core_psoc_user_space_resume_req(struct wlan_objmgr_psoc *psoc,
goto out;
}
/* Resume all components */
status = pmo_resume_all_components(psoc, type);
if (status != QDF_STATUS_SUCCESS) {
pmo_err("Failed to resume all the components");
goto dec_psoc_ref;
}
status = pmo_core_psoc_configure_resume(psoc, false);
if (status != QDF_STATUS_SUCCESS)
pmo_err("Failed to configure resume");
dec_psoc_ref:
pmo_psoc_put_ref(psoc);
out:
pmo_exit();

파일 보기

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -824,6 +824,30 @@ QDF_STATUS ucfg_pmo_psoc_user_space_suspend_req(struct wlan_objmgr_psoc *psoc,
QDF_STATUS ucfg_pmo_psoc_user_space_resume_req(struct wlan_objmgr_psoc *psoc,
enum qdf_suspend_type type);
/**
* ucfg_pmo_suspend_all_components() - Suspend all components
* @psoc: objmgr psoc handle
* @type: type of suspend
*
* Suspend all components registered to pmo
*
* Return: QDF status
*/
QDF_STATUS ucfg_pmo_suspend_all_components(struct wlan_objmgr_psoc *psoc,
enum qdf_suspend_type type);
/**
* ucfg_pmo_resume_all_components() - Resume all components
* @psoc: objmgr psoc handle
* @type: type of suspend from which resume needed
*
* Resume all components registered to pmo
*
* Return: QDF status
*/
QDF_STATUS ucfg_pmo_resume_all_components(struct wlan_objmgr_psoc *psoc,
enum qdf_suspend_type type);
/**
* ucfg_pmo_psoc_bus_suspend_req(): handles bus suspend for psoc
* @psoc: objmgr psoc
@@ -1458,6 +1482,20 @@ ucfg_pmo_psoc_user_space_resume_req(
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS
ucfg_pmo_suspend_all_components(struct wlan_objmgr_psoc *psoc,
enum qdf_suspend_type type)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS
ucfg_pmo_resume_all_components(struct wlan_objmgr_psoc *psoc,
enum qdf_suspend_type type)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS
ucfg_pmo_psoc_bus_suspend_req(
struct wlan_objmgr_psoc *psoc,

파일 보기

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -388,7 +388,6 @@ ucfg_pmo_psoc_user_space_suspend_req(struct wlan_objmgr_psoc *psoc,
return pmo_core_psoc_user_space_suspend_req(psoc, type);
}
QDF_STATUS
ucfg_pmo_psoc_user_space_resume_req(struct wlan_objmgr_psoc *psoc,
enum qdf_suspend_type type)
@@ -396,6 +395,18 @@ ucfg_pmo_psoc_user_space_resume_req(struct wlan_objmgr_psoc *psoc,
return pmo_core_psoc_user_space_resume_req(psoc, type);
}
QDF_STATUS ucfg_pmo_suspend_all_components(struct wlan_objmgr_psoc *psoc,
enum qdf_suspend_type type)
{
return pmo_suspend_all_components(psoc, type);
}
QDF_STATUS ucfg_pmo_resume_all_components(struct wlan_objmgr_psoc *psoc,
enum qdf_suspend_type type)
{
return pmo_resume_all_components(psoc, type);
}
QDF_STATUS
ucfg_pmo_psoc_bus_suspend_req(struct wlan_objmgr_psoc *psoc,
enum qdf_suspend_type type,