From patchwork Thu Nov 2 14:28:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10038793 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 66496602D8 for ; Thu, 2 Nov 2017 14:28:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 595F429094 for ; Thu, 2 Nov 2017 14:28:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4E62B29099; Thu, 2 Nov 2017 14:28:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D959129094 for ; Thu, 2 Nov 2017 14:28:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933021AbdKBO2m (ORCPT ); Thu, 2 Nov 2017 10:28:42 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:54494 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755759AbdKBO2k (ORCPT ); Thu, 2 Nov 2017 10:28:40 -0400 Received: from wuerfel.lan ([109.193.157.232]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0MIv6n-1e7mRI214T-002YeO; Thu, 02 Nov 2017 15:28:29 +0100 From: Arnd Bergmann To: Kalle Valo Cc: Arnd Bergmann , Prameela Rani Garnepudi , Amitkumar Karwar , Karun Eagalapati , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] rsi: sdio: fix building without CONFIG_PM Date: Thu, 2 Nov 2017 15:28:07 +0100 Message-Id: <20171102142827.773188-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:DKWVTz7RtvypXZX5B8KMN3VgpAiLf+IaSRCQMdhTmizVoEzGcoI 3tO7LI8M65qJnRpXi9kx2TeWDJo6bar/hHE37Kq5v1Uf37IJJfeReEQnG5SaV0TrWL+qJ8l k03V4l8Gh9RQDyo+U2BMqnQuAc6ILu5b5EdQX/axG8+tS94gHkXFTq1ET0xmQE4zJZ9h92X S3G8UUVQGLsNMJpzPOxKA== X-UI-Out-Filterresults: notjunk:1; V01:K0:0C6a/NsCFwM=:rku/8FeFX54hcwPdNdHgTq M9iTfH8COTgxREO5haFaDRpGD9C0QSO2RFdL4oUvvRv5lORlsWKTokttaNjlbJ/7T+mUvqm5D eKCtgYtE+GhPcorlQ13ATMuMGsc7Sju+eIAOst1Jwdv+NW50l5tsHqL8WLfge1MAkpfFj3/UV fYTcqdflAr7j3Be8OpzV4n5ok7+jKmTbNXDhBPvD6YhrYUfqtJsnrfTkLWgTxcnLvSMCR7mgW 7GRVEt0ZUBvIJAShqQ+YUIa4CEtM546hhmoES40+cRbztLdnoanxn/B3zRjlefItqBsAeRBcA zjrVfKQhvp/xQP+7GMd6/OxGwIi+MzldhiGqi8yYKFjngMRnbdr1Ve28PxJJmecTCwboeYlU1 fXhA2MeEGArqYl+P7V8IVbI4QRA6nrMr58aNNJtQ4ESV39eQGuwqj92xXXo6MhH/ZDucUdpiF pR959B76o+GUWhKNANxC7GcK1MftJxJ+uDNH6vy1JyFEom/ODz7x525JBxjXCwSjq2/ytxT2S plbU+lmS7Coray0JCx/HK+J8PpwwXC5l+QSw8+V3Uj/ZFQeqcsmk58NMRlRWuJIHFTfd2CroR TxALgz6BPIw8w1KDO0zb9WFK/Jhq8joHA7gqKjYGcCgNoDTqMATpYqLILb40BqlrS1VU/ukt+ Z080i71EuQHmU14QIoeB0crzKJbJAJ6sIE0Wx/biPr4w4mzy2Tb6eRTWCT4XqJjFVpAu8eyEs W2OBCTEyEhFes+V0ytcpWcC/8WTX7XZLMSPz0A== Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The addition of the WoWLAN support has caused a number of new build errors when CONFIG_PM is disabled, including: drivers/net/wireless/rsi/rsi_91x_mac80211.c: In function 'rsi_wow_map_triggers': drivers/net/wireless/rsi/rsi_91x_mac80211.c:1773:19: error: 'RSI_WOW_ANY' undeclared (first use in this function); did you mean 'RSI_WEP_KEY'? drivers/net/wireless/rsi/rsi_91x_mac80211.c: In function 'rsi_mac80211_attach': drivers/net/wireless/rsi/rsi_91x_mac80211.c:1980:7: error: 'struct wiphy' has no member named 'wowlan' This adds more #ifdef CONFIG_PM guards around the code that otherwise fails to build and that we know is not used without CONFIG_PM. Fixes: f3ac4e7394a1 ("rsi: sdio: add WOWLAN support for S3 suspend state") Signed-off-by: Arnd Bergmann --- drivers/net/wireless/rsi/rsi_91x_mac80211.c | 4 +++- drivers/net/wireless/rsi/rsi_91x_mgmt.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c index 36c63e953f84..ba6405c7d92b 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c +++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c @@ -1752,6 +1752,7 @@ static int rsi_mac80211_cancel_roc(struct ieee80211_hw *hw) return 0; } +#ifdef CONFIG_PM static const struct wiphy_wowlan_support rsi_wowlan_support = { .flags = WIPHY_WOWLAN_ANY | WIPHY_WOWLAN_MAGIC_PKT | @@ -1824,7 +1825,6 @@ int rsi_config_wowlan(struct rsi_hw *adapter, struct cfg80211_wowlan *wowlan) } EXPORT_SYMBOL(rsi_config_wowlan); -#ifdef CONFIG_PM static int rsi_mac80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) { @@ -1977,7 +1977,9 @@ int rsi_mac80211_attach(struct rsi_common *common) wiphy->features |= NL80211_FEATURE_INACTIVITY_TIMER; wiphy->reg_notifier = rsi_reg_notify; +#ifdef CONFIG_PM wiphy->wowlan = &rsi_wowlan_support; +#endif wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); /* Wi-Fi direct parameters */ diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c index d38a09f15742..46c9d5470dfb 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c +++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c @@ -1597,6 +1597,7 @@ static int rsi_send_beacon(struct rsi_common *common) return 0; } +#ifdef CONFIG_PM int rsi_send_wowlan_request(struct rsi_common *common, u16 flags, u16 sleep_status) { @@ -1630,6 +1631,7 @@ int rsi_send_wowlan_request(struct rsi_common *common, u16 flags, return rsi_send_internal_mgmt_frame(common, skb); } +#endif /** * rsi_handle_ta_confirm_type() - This function handles the confirm frames.