qcacmn: fix WOW wake up in suspend/resume for Moselle
Fix WOW wake up interrupt from WLAN FW, in system suspend/resume for Moselle platform. Change-Id: I5f71c65e0aa1eeef8225f3fcfae5410233df8b78 CRs-Fixed: 2724142
This commit is contained in:

committed by
nshrivas

parent
6320586a21
commit
168fbbffe7
@@ -1161,6 +1161,28 @@ int hif_apps_wake_irq_enable(struct hif_opaque_softc *hif_ctx);
|
||||
*/
|
||||
int hif_apps_wake_irq_disable(struct hif_opaque_softc *hif_ctx);
|
||||
|
||||
/**
|
||||
* hif_apps_enable_irq_wake() - Enables the irq wake from the APPS side
|
||||
* @hif_ctx: an opaque HIF handle to use
|
||||
*
|
||||
* This function always applies to the APPS side kernel interrupt handling
|
||||
* to wake the system from suspend.
|
||||
*
|
||||
* Return: errno
|
||||
*/
|
||||
int hif_apps_enable_irq_wake(struct hif_opaque_softc *hif_ctx);
|
||||
|
||||
/**
|
||||
* hif_apps_disable_irq_wake() - Disables the wake irq from the APPS side
|
||||
* @hif_ctx: an opaque HIF handle to use
|
||||
*
|
||||
* This function always applies to the APPS side kernel interrupt handling
|
||||
* to disable the wake irq.
|
||||
*
|
||||
* Return: errno
|
||||
*/
|
||||
int hif_apps_disable_irq_wake(struct hif_opaque_softc *hif_ctx);
|
||||
|
||||
#ifdef FEATURE_RUNTIME_PM
|
||||
int hif_pre_runtime_suspend(struct hif_opaque_softc *hif_ctx);
|
||||
void hif_pre_runtime_resume(struct hif_opaque_softc *hif_ctx);
|
||||
|
@@ -530,6 +530,30 @@ int hif_apps_wake_irq_enable(struct hif_opaque_softc *hif_ctx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int hif_apps_disable_irq_wake(struct hif_opaque_softc *hif_ctx)
|
||||
{
|
||||
struct hif_softc *scn;
|
||||
|
||||
QDF_BUG(hif_ctx);
|
||||
scn = HIF_GET_SOFTC(hif_ctx);
|
||||
if (!scn)
|
||||
return -EINVAL;
|
||||
|
||||
return disable_irq_wake(scn->wake_irq);
|
||||
}
|
||||
|
||||
int hif_apps_enable_irq_wake(struct hif_opaque_softc *hif_ctx)
|
||||
{
|
||||
struct hif_softc *scn;
|
||||
|
||||
QDF_BUG(hif_ctx);
|
||||
scn = HIF_GET_SOFTC(hif_ctx);
|
||||
if (!scn)
|
||||
return -EINVAL;
|
||||
|
||||
return enable_irq_wake(scn->wake_irq);
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_BMI
|
||||
bool hif_needs_bmi(struct hif_opaque_softc *scn)
|
||||
{
|
||||
|
@@ -289,39 +289,27 @@ void hif_ipci_prevent_linkdown(struct hif_softc *scn, bool flag)
|
||||
|
||||
int hif_ipci_bus_suspend(struct hif_softc *scn)
|
||||
{
|
||||
QDF_STATUS ret;
|
||||
|
||||
hif_apps_irqs_disable(GET_HIF_OPAQUE_HDL(scn));
|
||||
|
||||
ret = hif_try_complete_tasks(scn);
|
||||
if (QDF_IS_STATUS_ERROR(ret)) {
|
||||
hif_apps_irqs_enable(GET_HIF_OPAQUE_HDL(scn));
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return hif_apps_enable_irq_wake(GET_HIF_OPAQUE_HDL(scn));
|
||||
}
|
||||
|
||||
int hif_ipci_bus_resume(struct hif_softc *scn)
|
||||
{
|
||||
hif_apps_irqs_enable(GET_HIF_OPAQUE_HDL(scn));
|
||||
|
||||
return 0;
|
||||
return hif_apps_disable_irq_wake(GET_HIF_OPAQUE_HDL(scn));
|
||||
}
|
||||
|
||||
int hif_ipci_bus_suspend_noirq(struct hif_softc *scn)
|
||||
{
|
||||
if (hif_can_suspend_link(GET_HIF_OPAQUE_HDL(scn)))
|
||||
qdf_atomic_set(&scn->link_suspended, 1);
|
||||
QDF_STATUS ret;
|
||||
|
||||
ret = hif_try_complete_tasks(scn);
|
||||
if (QDF_IS_STATUS_ERROR(ret))
|
||||
return -EBUSY;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int hif_ipci_bus_resume_noirq(struct hif_softc *scn)
|
||||
{
|
||||
if (hif_can_suspend_link(GET_HIF_OPAQUE_HDL(scn)))
|
||||
qdf_atomic_set(&scn->link_suspended, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -440,9 +428,6 @@ static int hif_ce_msi_configure_irq(struct hif_softc *scn)
|
||||
if (!ce_sc->tasklets[ce_id].inited)
|
||||
continue;
|
||||
|
||||
if (ce_id == wake_ce_id)
|
||||
irqflags |= IRQF_NO_SUSPEND;
|
||||
|
||||
ipci_sc->ce_msi_irq_num[ce_id] = irq;
|
||||
ret = pfrm_request_irq(scn->qdf_dev->dev,
|
||||
irq, hif_ce_interrupt_handler,
|
||||
|
Reference in New Issue
Block a user