From fd75cd294867a41cc298d8acdb6fe66e64c87eb6 Mon Sep 17 00:00:00 2001 From: Yue Ma Date: Tue, 23 Jul 2019 19:14:15 -0700 Subject: [PATCH] qcacmn: Remove WLAN_SUSPEND_RESUME_TEST flag for WAKE MSI handler WAKE MSI can be triggered and handled properly for both unit test framework and runtime PM feature in runtime, so there is no need to have a compile time flag. Hence remove it. Change-Id: I97127575114d6be40b36a7417cc7c177cec69808 CRs-fixed: 2496366 --- hif/src/hif_main.c | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/hif/src/hif_main.c b/hif/src/hif_main.c index 305da8981bbe..d8f55d6af4c7 100644 --- a/hif/src/hif_main.c +++ b/hif/src/hif_main.c @@ -1249,13 +1249,19 @@ void hif_ramdump_handler(struct hif_opaque_softc *scn) hif_usb_ramdump_handler(scn); } -#ifdef WLAN_SUSPEND_RESUME_TEST irqreturn_t hif_wake_interrupt_handler(int irq, void *context) { struct hif_softc *scn = context; + struct hif_opaque_softc *hif_ctx = GET_HIF_OPAQUE_HDL(scn); HIF_INFO("wake interrupt received on irq %d", irq); + if (hif_pm_runtime_get_monitor_wake_intr(hif_ctx) && + hif_pm_runtime_is_suspended(hif_ctx)) { + hif_pm_runtime_set_monitor_wake_intr(hif_ctx, 0); + hif_pm_runtime_request_resume(hif_ctx); + } + if (scn->initial_wakeup_cb) scn->initial_wakeup_cb(scn->initial_wakeup_priv); @@ -1264,26 +1270,6 @@ irqreturn_t hif_wake_interrupt_handler(int irq, void *context) return IRQ_HANDLED; } -#else /* WLAN_SUSPEND_RESUME_TEST */ -irqreturn_t hif_wake_interrupt_handler(int irq, void *context) -{ - struct hif_softc *scn = context; - struct hif_opaque_softc *hif_ctx = GET_HIF_OPAQUE_HDL(scn); - - HIF_INFO("wake interrupt received on irq %d", irq); - - if (scn->initial_wakeup_cb) - scn->initial_wakeup_cb(scn->initial_wakeup_priv); - - if (hif_pm_runtime_get_monitor_wake_intr(hif_ctx) && - hif_pm_runtime_is_suspended(hif_ctx)) { - hif_pm_runtime_set_monitor_wake_intr(hif_ctx, 0); - hif_pm_runtime_request_resume(hif_ctx); - } - - return IRQ_HANDLED; -} -#endif /* WLAN_SUSPEND_RESUME_TEST */ void hif_set_initial_wakeup_cb(struct hif_opaque_softc *hif_ctx, void (*callback)(void *),