diff options
| author | Guisen Yang <guiseny@codeaurora.org> | 2018-07-19 16:51:47 +0800 |
|---|---|---|
| committer | Guisen Yang <guiseny@codeaurora.org> | 2018-07-23 16:58:32 +0800 |
| commit | 27768d2e39b6797eb03a901e96f474cb3c248e47 (patch) | |
| tree | e94b1542461ac8a060b70306ab981a343b9d25ce | |
| parent | a5b3fbc336a2039623054d88662604c6cd61d9c9 (diff) | |
qcacld-2.0: Enable MC thread suspend
MC thread should keep alive only when the suspend is
introduced by thermal. It should be suspended if the
suspend is not introduced by thermal. Disable the
thermal shutdown feature by default.
Change-Id: I92f0a3ada95a532b9070fada18b728751c87909b
CRs-Fixed: 2280791
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_cfg.h | 2 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 22 |
2 files changed, 10 insertions, 14 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h index 52a4278c7f00..6feff7bf5696 100644 --- a/CORE/HDD/inc/wlan_hdd_cfg.h +++ b/CORE/HDD/inc/wlan_hdd_cfg.h @@ -2282,7 +2282,7 @@ typedef enum #define CFG_THERMAL_SHUTDOWN_ENABLE_NAME "gThermalShutdownEnable" #define CFG_THERMAL_SHUTDOWN_ENABLE_MIN ( 0 ) #define CFG_THERMAL_SHUTDOWN_ENABLE_MAX ( 1 ) -#define CFG_THERMAL_SHUTDOWN_ENABLE_DEFAULT ( 1 ) +#define CFG_THERMAL_SHUTDOWN_ENABLE_DEFAULT ( 0 ) /* * <ini> diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index e28db831e885..e56bff77b962 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -30861,18 +30861,12 @@ static bool wlan_hdd_is_thermal_suspended(hdd_context_t *pHddCtx) } return false; } - -static VOS_STATUS wlan_hdd_suspend_mc_thread(pVosSchedContext vosSchedCtx, - hdd_context_t *pHddCtx) -{ - return VOS_STATUS_SUCCESS; -} #else static bool wlan_hdd_is_thermal_suspended(hdd_context_t *pHddCtx) { return false; } - +#endif static VOS_STATUS wlan_hdd_suspend_mc_thread(pVosSchedContext vosSchedCtx, hdd_context_t *pHddCtx) { @@ -30897,7 +30891,6 @@ static VOS_STATUS wlan_hdd_suspend_mc_thread(pVosSchedContext vosSchedCtx, return VOS_STATUS_SUCCESS; } -#endif /* * FUNCTION: __wlan_hdd_cfg80211_suspend_wlan * this is called when cfg80211 driver suspends @@ -31047,11 +31040,14 @@ int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy, goto resume_tx; } - /* Suspend MC thread */ - status = wlan_hdd_suspend_mc_thread(vosSchedContext, pHddCtx); - if (VOS_STATUS_SUCCESS != status) - goto resume_tx; - + /* Suspend MC thread. In thermal suspend, MC thread should be alive + * to receive FW temperature data and compare to the threshold for resume. + */ + if (!thermal) { + status = wlan_hdd_suspend_mc_thread(vosSchedContext, pHddCtx); + if (VOS_STATUS_SUCCESS != status) + goto resume_tx; + } #ifdef QCA_CONFIG_SMP /* Suspend tlshim rx thread */ set_bit(RX_SUSPEND_EVENT, &vosSchedContext->tlshimRxEvtFlg); |
