icnss2: Export API to host driver to exit power save
Avoid sending EXIT_POWER_SAVE QMI message to FW from kernel pm_resume callback. Send EXIT_POWER_SAVE QMI from new exported API which will be called from Host driver at the time of HOST_WAKEUP_FROM_SLEEP. When FW receive EXIT_POWER_SAVE QMI, it will implicitly consider that it also received HOST_WAKEUP_FROM_SLEEP and send ACK for it through CE2. Change-Id: Iba6e0d026749bbe5fb4fca5547cad4540932142f Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
This commit is contained in:
parent
9297104f83
commit
e926a43389
@ -2733,6 +2733,26 @@ int icnss_idle_restart(struct device *dev)
|
||||
}
|
||||
EXPORT_SYMBOL(icnss_idle_restart);
|
||||
|
||||
int icnss_exit_power_save(struct device *dev)
|
||||
{
|
||||
struct icnss_priv *priv = dev_get_drvdata(dev);
|
||||
int ret = 0;
|
||||
|
||||
icnss_pr_dbg("Calling Exit Power Save\n");
|
||||
|
||||
if (test_bit(ICNSS_PD_RESTART, &priv->state) ||
|
||||
!test_bit(ICNSS_MODE_ON, &priv->state))
|
||||
return 0;
|
||||
|
||||
ret = wlfw_exit_power_save_send_msg(priv);
|
||||
if (ret) {
|
||||
priv->stats.pm_resume_err++;
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(icnss_exit_power_save);
|
||||
|
||||
void icnss_allow_recursive_recovery(struct device *dev)
|
||||
{
|
||||
struct icnss_priv *priv = dev_get_drvdata(dev);
|
||||
@ -3345,14 +3365,6 @@ static int icnss_pm_resume(struct device *dev)
|
||||
!test_bit(ICNSS_DRIVER_PROBED, &priv->state))
|
||||
goto out;
|
||||
|
||||
if (priv->device_id == WCN6750_DEVICE_ID) {
|
||||
ret = wlfw_exit_power_save_send_msg(priv);
|
||||
if (ret) {
|
||||
priv->stats.pm_resume_err++;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
ret = priv->ops->pm_resume(dev);
|
||||
|
||||
out:
|
||||
@ -3459,13 +3471,8 @@ static int icnss_pm_runtime_resume(struct device *dev)
|
||||
if (!priv->ops || !priv->ops->runtime_resume)
|
||||
goto out;
|
||||
|
||||
ret = wlfw_exit_power_save_send_msg(priv);
|
||||
if (ret) {
|
||||
priv->stats.pm_resume_err++;
|
||||
return ret;
|
||||
}
|
||||
icnss_pr_vdbg("Runtime resume, state: 0x%lx\n", priv->state);
|
||||
|
||||
icnss_pr_vdbg("Runtime resume\n");
|
||||
ret = priv->ops->runtime_resume(dev);
|
||||
|
||||
out:
|
||||
|
@ -190,4 +190,5 @@ extern void icnss_thermal_cdev_unregister(struct device *dev, int tcdev_id);
|
||||
extern int icnss_get_curr_therm_cdev_state(struct device *dev,
|
||||
unsigned long *thermal_state,
|
||||
int tcdev_id);
|
||||
extern int icnss_exit_power_save(struct device *dev);
|
||||
#endif /* _ICNSS_WLAN_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user