All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Luciano Coelho <coelho@ti.com>
Subject: Re: [RFC] cfg80211: don't allow WoWLAN support without CONFIG_PM
Date: Wed, 30 May 2012 20:50:34 +0300	[thread overview]
Message-ID: <4FC65DEA.9040609@qca.qualcomm.com> (raw)
In-Reply-To: <1338385542.4511.19.camel@jlt3.sipsolutions.net>

On 05/30/2012 04:45 PM, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> When CONFIG_PM is enabled, no device can possibly
> support WoWLAN since it can't go to sleep to start
> with. Due to this, mac80211 had even rejected the
> hardware registration. By making all the code and
> data for WoWLAN depend on CONFIG_PM we can promote
> this runtime error to a compile-time error.
> 
> Add #ifdef around all WoWLAN code to remove it in
> systems that don't need it as they never suspend.
> 
> Cc: Kalle Valo <kvalo@qca.qualcomm.com>
> Cc: Luciano Coelho <coelho@ti.com>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>

For the ath6kl part:

Acked-by: Kalle Valo <kvalo@qca.qualcomm.com>

> --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
> +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
> @@ -3517,6 +3517,7 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
>  	wiphy->cipher_suites = cipher_suites;
>  	wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites);
>  
> +#ifdef CONFIG_PM
>  	wiphy->wowlan.flags = WIPHY_WOWLAN_MAGIC_PKT |
>  			      WIPHY_WOWLAN_DISCONNECT |
>  			      WIPHY_WOWLAN_GTK_REKEY_FAILURE  |
> @@ -3526,6 +3527,7 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
>  	wiphy->wowlan.n_patterns = WOW_MAX_FILTERS_PER_LIST;
>  	wiphy->wowlan.pattern_min_len = 1;
>  	wiphy->wowlan.pattern_max_len = WOW_PATTERN_SIZE;
> +#endif

To be honest I'm not really fond of ifdefs in the code, but that's just
me :)

Kalle

      parent reply	other threads:[~2012-05-30 17:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-30 13:45 [RFC] cfg80211: don't allow WoWLAN support without CONFIG_PM Johannes Berg
2012-05-30 14:45 ` Eliad Peller
2012-05-30 14:47   ` Johannes Berg
2012-05-30 17:50 ` Kalle Valo [this message]

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=4FC65DEA.9040609@qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=coelho@ti.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.