qcacld-3.0: Prevent suspend to allow for wifi to turn off
When wifi is turned off, system suspend might occur during the timer delay, which would stop the timer and prevent wifi from being turned off, leading to battery drain. To fix this issue, prevent the suspend and turn off the wifi before allowing suspend to happen. Change-Id: Id4fbb13f3ab350b4e2545f65e38d9baaba5ed7ab CRs-Fixed: 2493487
Bu işleme şunda yer alıyor:
@@ -185,6 +185,7 @@ static inline bool in_compat_syscall(void) { return is_compat_task(); }
|
||||
#define NUM_CPUS 1
|
||||
#endif
|
||||
|
||||
#define HDD_PSOC_IDLE_SHUTDOWN_SUSPEND_DELAY (1000)
|
||||
/**
|
||||
* enum hdd_adapter_flags - event bitmap flags registered net device
|
||||
* @NET_DEVICE_REGISTERED: Adapter is registered with the kernel
|
||||
|
@@ -9321,6 +9321,7 @@ void hdd_psoc_idle_timer_start(struct hdd_context *hdd_ctx)
|
||||
}
|
||||
|
||||
hdd_debug("Starting psoc idle timer");
|
||||
timeout_ms += HDD_PSOC_IDLE_SHUTDOWN_SUSPEND_DELAY;
|
||||
qdf_delayed_work_start(&hdd_ctx->psoc_idle_timeout_work, timeout_ms);
|
||||
hdd_prevent_suspend_timeout(timeout_ms, reason);
|
||||
}
|
||||
@@ -9456,6 +9457,7 @@ int hdd_trigger_psoc_idle_restart(struct hdd_context *hdd_ctx)
|
||||
*/
|
||||
static void hdd_psoc_idle_timeout_callback(void *priv)
|
||||
{
|
||||
int ret;
|
||||
struct hdd_context *hdd_ctx = priv;
|
||||
|
||||
if (wlan_hdd_validate_context(hdd_ctx))
|
||||
@@ -9463,7 +9465,11 @@ static void hdd_psoc_idle_timeout_callback(void *priv)
|
||||
|
||||
hdd_info("Psoc idle timeout elapsed; starting psoc shutdown");
|
||||
|
||||
pld_idle_shutdown(hdd_ctx->parent_dev, hdd_psoc_idle_shutdown);
|
||||
ret = pld_idle_shutdown(hdd_ctx->parent_dev, hdd_psoc_idle_shutdown);
|
||||
if (-EAGAIN == ret || hdd_ctx->is_wiphy_suspended) {
|
||||
hdd_debug("System suspend in progress. Restart idle shutdown timer");
|
||||
hdd_psoc_idle_timer_start(hdd_ctx);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WLAN_LOGGING_SOCK_SVC_ENABLE
|
||||
|
Yeni konuda referans
Bir kullanıcı engelle