From patchwork Mon Apr 27 05:06:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Fu, Zhonghui" X-Patchwork-Id: 6277651 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AB627BF4A6 for ; Mon, 27 Apr 2015 05:07:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E8960203DA for ; Mon, 27 Apr 2015 05:07:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D641A20412 for ; Mon, 27 Apr 2015 05:07:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751914AbbD0FGt (ORCPT ); Mon, 27 Apr 2015 01:06:49 -0400 Received: from mga03.intel.com ([134.134.136.65]:8640 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751439AbbD0FGr (ORCPT ); Mon, 27 Apr 2015 01:06:47 -0400 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 26 Apr 2015 22:06:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,655,1422950400"; d="scan'208";a="562183417" Received: from hwang37-mobl1.ccr.corp.intel.com (HELO [10.255.30.47]) ([10.255.30.47]) by orsmga003.jf.intel.com with ESMTP; 26 Apr 2015 22:06:45 -0700 Message-ID: <553DC3E3.5050802@linux.intel.com> Date: Mon, 27 Apr 2015 13:06:43 +0800 From: "Fu, Zhonghui" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "brudley@broadcom.com" , Arend van Spriel , Franky Lin , "meuleman@broadcom.com" , Kalle Valo , "pieterpg@broadcom.com" , "hdegoede@redhat.com" , "linux-wireless@vger.kernel.org" , "brcm80211-dev-list@broadcom.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH 2/2] brcmfmac: keep WiFi chip's power during system suspension Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Need to keep the power supply for WiFi chip during system suspension. Otherwise, the context of WiFi chip will be lost. Signed-off-by: Zhonghui Fu --- drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c index fdf8feb..03d3671 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c @@ -1251,15 +1251,17 @@ static int brcmf_ops_sdio_suspend(struct device *dev) brcmf_sdiod_freezer_on(sdiodev); brcmf_sdio_wd_timer(sdiodev->bus, 0); + sdio_flags = MMC_PM_KEEP_POWER; if (sdiodev->wowl_enabled) { - sdio_flags = MMC_PM_KEEP_POWER; if (sdiodev->pdata->oob_irq_supported) enable_irq_wake(sdiodev->pdata->oob_irq_nr); else - sdio_flags = MMC_PM_WAKE_SDIO_IRQ; - if (sdio_set_host_pm_flags(sdiodev->func[1], sdio_flags)) - brcmf_err("Failed to set pm_flags %x\n", sdio_flags); + sdio_flags |= MMC_PM_WAKE_SDIO_IRQ; } + + if (sdio_set_host_pm_flags(sdiodev->func[1], sdio_flags)) + brcmf_err("Failed to set pm_flags %x\n", sdio_flags); + return 0; }