From patchwork Fri Feb 24 06:24:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeffy Chen X-Patchwork-Id: 731928 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3vV1Lc4FKtz9s7y for ; Fri, 24 Feb 2017 17:25:28 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751348AbdBXGZF (ORCPT ); Fri, 24 Feb 2017 01:25:05 -0500 Received: from regular1.263xmail.com ([211.150.99.134]:50701 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750873AbdBXGYx (ORCPT ); Fri, 24 Feb 2017 01:24:53 -0500 Received: from jeffy.chen?rock-chips.com (unknown [192.168.165.105]) by regular1.263xmail.com (Postfix) with ESMTP id 9BC649192; Fri, 24 Feb 2017 14:24:41 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from smtp.263.net (sg-smtp01.263.net [54.255.195.220]) by smtp.263.net (Postfix) with ESMTP id C0A213FB; Fri, 24 Feb 2017 14:24:40 +0800 (CST) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id 5A26FDF30D; Fri, 24 Feb 2017 14:24:41 +0800 (CST) X-RL-SENDER: jeffy.chen@rock-chips.com X-FST-TO: akarwar@marvell.com X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jeffy.chen@rock-chips.com X-UNIQUE-TAG: <06d3367f40a122cc6f7be46f7e8b4771> X-ATTACHMENT-NUM: 0 X-SENDER: cjf@rock-chips.com X-DNS-TYPE: 0 Received: from localhost (unknown [103.29.142.67]) by smtp.263.net (Postfix) whith ESMTP id 24729QLQJJH; Fri, 24 Feb 2017 14:24:42 +0800 (CST) From: Jeffy Chen To: Amitkumar Karwar Cc: Brian Norris , Rajat Jain , Jeffy Chen , Kalle Valo , netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Nishant Sarmukadam Subject: [PATCH 3/3] mwifiex: wake system up when receives a wake irq Date: Fri, 24 Feb 2017 14:24:31 +0800 Message-Id: <1487917471-5501-3-git-send-email-jeffy.chen@rock-chips.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1487917471-5501-1-git-send-email-jeffy.chen@rock-chips.com> References: <1487917471-5501-1-git-send-email-jeffy.chen@rock-chips.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Currrently we are disabling this wake irq after receiving it. If this happens before we finish suspend and the pm event check is disabled, the system will continue suspending, and this irq would not work again. We may need to abort system suspend to avoid that. Signed-off-by: Jeffy Chen --- drivers/net/wireless/marvell/mwifiex/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c index 5ebca1d..30f4994 100644 --- a/drivers/net/wireless/marvell/mwifiex/main.c +++ b/drivers/net/wireless/marvell/mwifiex/main.c @@ -17,6 +17,8 @@ * this warranty disclaimer. */ +#include + #include "main.h" #include "wmm.h" #include "cfg80211.h" @@ -1509,6 +1511,7 @@ static irqreturn_t mwifiex_irq_wakeup_handler(int irq, void *priv) /* Notify PM core we are wakeup source */ pm_wakeup_event(adapter->dev, 0); + pm_system_wakeup(); return IRQ_HANDLED; }