From patchwork Fri Feb 5 05:40:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glen Lee X-Patchwork-Id: 8231781 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7EF1A9F1C1 for ; Fri, 5 Feb 2016 05:46:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8F81720397 for ; Fri, 5 Feb 2016 05:46:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6A24A20395 for ; Fri, 5 Feb 2016 05:46:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751416AbcBEFqt (ORCPT ); Fri, 5 Feb 2016 00:46:49 -0500 Received: from eusmtp01.atmel.com ([212.144.249.243]:24827 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750775AbcBEFqs (ORCPT ); Fri, 5 Feb 2016 00:46:48 -0500 Received: from glen-ubuntu.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.31) with Microsoft SMTP Server id 14.3.235.1; Fri, 5 Feb 2016 06:46:39 +0100 From: Glen Lee To: CC: , , , , , , , , Subject: [PATCH] staging: wilc1000: Fix compilation error when CONFIG_PM disabled Date: Fri, 5 Feb 2016 14:40:27 +0900 Message-ID: <1454650827-24961-1-git-send-email-glen.lee@atmel.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Commit 73584a40d748 ("staging: wilc1000: add ops resuem/suspend/wakeup in cfg80211") causes following compilation error. This patch fixes this by using suspend/resume under CONFIG_PM. drivers/staging/wilc1000/wilc_wfi_cfgoperations.c: In function 'wilc_create_wiphy': >> drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2833:13: error: 'struct wiphy' has no member named 'wowlan' wdev->wiphy->wowlan = &wowlan_support; Fixes: 73584a40d748 ("staging: wilc1000: add ops resuem/suspend/wakeup in cfg80211") Reported-by: kbuild test robot Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_sdio.c | 4 ++++ drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 9 ++++++++- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 7c20c8c..26cc9c3 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -162,6 +162,7 @@ static int sdio_reset(struct wilc *wilc) return 0; } +#ifdef CONFIG_PM static int wilc_sdio_suspend(struct device *dev) { struct sdio_func *func = dev_to_sdio_func(dev); @@ -210,15 +211,18 @@ static const struct dev_pm_ops wilc_sdio_pm_ops = { .suspend = wilc_sdio_suspend, .resume = wilc_sdio_resume, }; +#endif static struct sdio_driver wilc1000_sdio_driver = { .name = SDIO_MODALIAS, .id_table = wilc_sdio_ids, .probe = linux_sdio_probe, .remove = linux_sdio_remove, +#ifdef CONFIG_PM .drv = { .pm = &wilc_sdio_pm_ops, } +#endif }; module_driver(wilc1000_sdio_driver, sdio_register_driver, diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index a899b37..a4a6bb8 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -74,9 +74,11 @@ static const struct ieee80211_txrx_stypes } }; +#ifdef CONFIG_PM static const struct wiphy_wowlan_support wowlan_support = { .flags = WIPHY_WOWLAN_ANY }; +#endif #define WILC_WFI_DWELL_PASSIVE 100 #define WILC_WFI_DWELL_ACTIVE 40 @@ -2407,6 +2409,7 @@ static int del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev) return 0; } +#ifdef CONFIG_PM static int wilc_suspend(struct wiphy *wiphy, struct cfg80211_wowlan *wow) { struct wilc_priv *priv = wiphy_priv(wiphy); @@ -2436,6 +2439,7 @@ static void wilc_set_wakeup(struct wiphy *wiphy, bool enabled) netdev_info(vif->ndev, "cfg set wake up = %d\n", enabled); } +#endif static int set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, enum nl80211_tx_power_setting type, int mbm) @@ -2504,10 +2508,11 @@ static struct cfg80211_ops wilc_cfg80211_ops = { .mgmt_frame_register = wilc_mgmt_frame_register, .set_power_mgmt = set_power_mgmt, .set_cqm_rssi_config = set_cqm_rssi_config, - +#ifdef CONFIG_PM .suspend = wilc_suspend, .resume = wilc_resume, .set_wakeup = wilc_set_wakeup, +#endif .set_tx_power = set_tx_power, .get_tx_power = get_tx_power, @@ -2591,7 +2596,9 @@ struct wireless_dev *wilc_create_wiphy(struct net_device *net, struct device *de sema_init(&(priv->SemHandleUpdateStats), 1); priv->wdev = wdev; wdev->wiphy->max_scan_ssids = MAX_NUM_PROBED_SSID; +#ifdef CONFIG_PM wdev->wiphy->wowlan = &wowlan_support; +#endif wdev->wiphy->max_num_pmkids = WILC_MAX_NUM_PMKIDS; PRINT_INFO(CFG80211_DBG, "Max number of PMKIDs = %d\n", wdev->wiphy->max_num_pmkids); diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h index 3077f5d4..39b72cd 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h @@ -215,7 +215,9 @@ struct wilc { const struct firmware *firmware; struct device *dev; +#ifdef CONFIG_PM bool suspend_event; +#endif struct rf_info dummy_statistics; };