mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
Merge "icnss2: Avoid race between SOC wake requests"
This commit is contained in:
commit
9937f5dbd1
1 changed files with 7 additions and 0 deletions
|
|
@ -850,6 +850,7 @@ static int icnss_driver_event_fw_ready_ind(struct icnss_priv *priv, void *data)
|
|||
|
||||
set_bit(ICNSS_FW_READY, &priv->state);
|
||||
clear_bit(ICNSS_MODE_ON, &priv->state);
|
||||
atomic_set(&priv->soc_wake_ref_count, 0);
|
||||
|
||||
if (priv->device_id == WCN6750_DEVICE_ID)
|
||||
icnss_free_qdss_mem(priv);
|
||||
|
|
@ -1091,6 +1092,12 @@ static int icnss_event_soc_wake_request(struct icnss_priv *priv, void *data)
|
|||
if (!priv)
|
||||
return -ENODEV;
|
||||
|
||||
if (atomic_inc_not_zero(&priv->soc_wake_ref_count)) {
|
||||
icnss_pr_dbg("SOC awake after posting work, Ref count: %d",
|
||||
atomic_read(&priv->soc_wake_ref_count));
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = wlfw_send_soc_wake_msg(priv, QMI_WLFW_WAKE_REQUEST_V01);
|
||||
if (!ret)
|
||||
atomic_inc(&priv->soc_wake_ref_count);
|
||||
|
|
|
|||
Loading…
Reference in a new issue