icnss2: Check for SSR before SOC Wake request
There are scenarios when WLAN Host request for SOC Wake during SSR. If WLAN FW receives the request before FW_READY it ASSERT. Avoid sending SOC Wake request to FW during SSR. Change-Id: Ia42cc17149de7a33da0161a280c79d5dfce0f4c8 CRs-Fixed: 3435111
This commit is contained in:

committed by
Madan Koyyalamudi

parent
31dbde2074
commit
643d19ee98
@@ -486,8 +486,12 @@ static int icnss_send_smp2p(struct icnss_priv *priv,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (test_bit(ICNSS_FW_DOWN, &priv->state))
|
if (test_bit(ICNSS_FW_DOWN, &priv->state) ||
|
||||||
return -ENODEV;
|
!test_bit(ICNSS_FW_READY, &priv->state)) {
|
||||||
|
icnss_pr_smp2p("FW down, ignoring sending SMP2P state: 0x%lx\n",
|
||||||
|
priv->state);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
value |= priv->smp2p_info[smp2p_entry].seq++;
|
value |= priv->smp2p_info[smp2p_entry].seq++;
|
||||||
value <<= ICNSS_SMEM_SEQ_NO_POS;
|
value <<= ICNSS_SMEM_SEQ_NO_POS;
|
||||||
@@ -3303,6 +3307,13 @@ int icnss_force_wake_request(struct device *dev)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (test_bit(ICNSS_FW_DOWN, &priv->state) ||
|
||||||
|
!test_bit(ICNSS_FW_READY, &priv->state)) {
|
||||||
|
icnss_pr_soc_wake("FW down, ignoring SOC Wake request state: 0x%lx\n",
|
||||||
|
priv->state);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
if (atomic_inc_not_zero(&priv->soc_wake_ref_count)) {
|
if (atomic_inc_not_zero(&priv->soc_wake_ref_count)) {
|
||||||
icnss_pr_soc_wake("SOC already awake, Ref count: %d",
|
icnss_pr_soc_wake("SOC already awake, Ref count: %d",
|
||||||
atomic_read(&priv->soc_wake_ref_count));
|
atomic_read(&priv->soc_wake_ref_count));
|
||||||
@@ -3332,6 +3343,13 @@ int icnss_force_wake_release(struct device *dev)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (test_bit(ICNSS_FW_DOWN, &priv->state) ||
|
||||||
|
!test_bit(ICNSS_FW_READY, &priv->state)) {
|
||||||
|
icnss_pr_soc_wake("FW down, ignoring SOC Wake release state: 0x%lx\n",
|
||||||
|
priv->state);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
icnss_pr_soc_wake("Calling SOC Wake response");
|
icnss_pr_soc_wake("Calling SOC Wake response");
|
||||||
|
|
||||||
if (atomic_read(&priv->soc_wake_ref_count) &&
|
if (atomic_read(&priv->soc_wake_ref_count) &&
|
||||||
|
Reference in New Issue
Block a user