public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Bryan Brattlof <hello@bryanbrattlof.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Bryan Brattlof <hello@bryanbrattlof.com>
Subject: [PATCH] staging: rtl8723bs: define wowlan_stub only when CONFIG_PM is enabled
Date: Mon, 13 Sep 2021 14:10:12 +0000	[thread overview]
Message-ID: <20210913140937.1490133-1-hello@bryanbrattlof.com> (raw)

The wake-on-lan stub is needed only when the device power management
functionality is enabled in the kernel. Conditionally define
wowlan_stub to avoid potential unused object warnings.

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
---
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 34da8a569709..f4a9b4b7c97e 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -47,6 +47,7 @@ static const u32 rtw_cipher_suites[] = {
  * Moreover wowlan has to be enabled via a the nl80211_set_wowlan callback.
  * (from user space, e.g. iw phy0 wowlan enable)
  */
+#if defined(CONFIG_PM)
 static const struct wiphy_wowlan_support wowlan_stub = {
 	.flags = WIPHY_WOWLAN_ANY,
 	.n_patterns = 0,
@@ -54,6 +55,7 @@ static const struct wiphy_wowlan_support wowlan_stub = {
 	.pattern_min_len = 0,
 	.max_pkt_offset = 0,
 };
+#endif

 static struct ieee80211_rate rtw_rates[] = {
 	RATETAB_ENT(10,  0x1,   0),
--
2.30.2



             reply	other threads:[~2021-09-13 14:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13 14:10 Bryan Brattlof [this message]
2021-09-13 16:25 ` [PATCH] staging: rtl8723bs: define wowlan_stub only when CONFIG_PM is enabled Greg Kroah-Hartman
2021-09-13 23:42   ` Bryan Brattlof
2021-09-14  8:52     ` Dan Carpenter
2021-09-14 22:45       ` Bryan Brattlof

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210913140937.1490133-1-hello@bryanbrattlof.com \
    --to=hello@bryanbrattlof.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox