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: 117818 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2239766qgn; Thu, 2 Nov 2017 07:28:45 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RYd6u7paZKJ8fw8eKXF52hjHF7iaXMG93NJMhNXBRxclGi6SDtKVe0sfIvYrNnysvSpePc X-Received: by 10.101.91.78 with SMTP id y14mr3784419pgr.380.1509632925626; Thu, 02 Nov 2017 07:28:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509632925; cv=none; d=google.com; s=arc-20160816; b=Zjv5+YI1HbZxLTgrpAlTOlMyqF5cZZSCdsXqZ97GWWTwCgO+zzRZxvvDxsghYTS7wf /x7mpbVDGJsFrNBps5fHEu9d2y9ScM9tpZWiJWXkan6EnOXWVuCymmUm2NWJeUJA4Sgr oZ8pzEbVvv/2e5wRWjYqsmlUbV/dCxGyESHPccd7fIaSzTn3hKIrdjWJFDuM9rNB3J57 Jg/4f2/7u8SxPlHWWTZr1AxeMFp6Fr6I01Vrd5E6VuWi1OdvNdR+v62t+Grzcp0Z/G4N kzeqDL5tYhmf8nWh3TBff0wYCtUnQX0YHp9mBWx575T+CChVl3FccD4Ag/MOp5Xwep6T ST6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=dSkyfmWzfE7ILftmbN/nTRhWfOP5sb+1UX1EcqOpL+w=; b=ZzRxiHdP/ppUGgujJcgGHIfbfon2Q4efjGQG7SzAIj/TDA8HEAyZJo5EM+ty/62/W+ tIPl4LLelBLdIbZXS29BxqdlmTmA5b4i6CITdM4Iho3K8TarWx64WhfWaWuaXatJsrMX vKX6jEtDa0JZlWhDHSi6J0eq4oSJa4AF5YD4XC/J2pg32gj9tPGo2D229xy123RXaDKL 9LGg0LpuQymqsvrlEa3+nMDb+KXg2IfrVH0+YcgkVnWCRmuMKrQ+G8+WcX7NwlCv00e/ 2Fd3NV3lhb6xcRnQWBKtc4Zg9gy51oVTICM263bQbK9xiv4Og0lLYy+8YB1SYiVmpBfG E5eQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t1si2360362plb.265.2017.11.02.07.28.45; Thu, 02 Nov 2017 07:28:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933559AbdKBO2m (ORCPT + 26 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.9.0 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.