linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Sebastian Kemper <sebastian_ml@gmx.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: IWLWIFI should depend on SUSPEND
Date: Wed, 30 May 2012 15:29:03 +0200	[thread overview]
Message-ID: <1338384543.4511.18.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1337540836.4585.1.camel@jlt3.sipsolutions.net> (sfid-20120520_210755_672970_92507325)

On Sun, 2012-05-20 at 21:07 +0200, Johannes Berg wrote:
> On Sat, 2012-05-19 at 22:19 +0200, Sebastian Kemper wrote:
> > Hello everybody,
> > 
> > iwlwifi doesn't start without suspend support in the kernel. The last
> > thing it says when suspend is missing is this:
> > 
> > iwlwifi 0000:03:00.0: Failed to register hw (error -22)
> > iwlwifi 0000:03:00.0: PCI INT A disabled
> 
> I was going to say it's a mac80211 bug due to this code:
> 
>         if ((hw->wiphy->wowlan.flags || hw->wiphy->wowlan.n_patterns)
> #ifdef CONFIG_PM
>             && (!local->ops->suspend || !local->ops->resume)
> #endif
>             )
>                 return -EINVAL;
> 
> But then I thought about it and think it makes sense, if you don't have
> suspend then you can't have WoWLAN, so the driver shouldn't advertise it
> in that case, which makes it an iwlwifi bug again, we should ifdef the
> wowlan support correctly.

Could you try this patch please?

johannes

diff --git a/drivers/net/wireless/iwlwifi/iwl-mac80211.c b/drivers/net/wireless/iwlwifi/iwl-mac80211.c
index ab2f4d7..06546f7 100644
--- a/drivers/net/wireless/iwlwifi/iwl-mac80211.c
+++ b/drivers/net/wireless/iwlwifi/iwl-mac80211.c
@@ -199,6 +199,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv,
 			    WIPHY_FLAG_DISABLE_BEACON_HINTS |
 			    WIPHY_FLAG_IBSS_RSN;
 
+#ifdef CONFIG_PM
 	if (priv->fw->img[IWL_UCODE_WOWLAN].sec[0].len &&
 	    priv->trans->ops->wowlan_suspend &&
 	    device_can_wakeup(priv->trans->dev)) {
@@ -217,6 +218,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv,
 		hw->wiphy->wowlan.pattern_max_len =
 					IWLAGN_WOWLAN_MAX_PATTERN_LEN;
 	}
+#endif
 
 	if (iwlwifi_mod_params.power_save)
 		hw->wiphy->flags |= WIPHY_FLAG_PS_ON_BY_DEFAULT;



  reply	other threads:[~2012-05-30 13:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-19 20:19 IWLWIFI should depend on SUSPEND Sebastian Kemper
2012-05-20 19:07 ` Johannes Berg
2012-05-30 13:29   ` Johannes Berg [this message]
2012-06-03  9:16     ` Sebastian Kemper
2012-06-03 15:02       ` Johannes Berg
     [not found]         ` <20120603164905.GA2056@wolfgang>
2012-06-03 18:33           ` Johannes Berg
2012-06-04 20:31             ` Sebastian Kemper

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=1338384543.4511.18.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sebastian_ml@gmx.net \
    /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;
as well as URLs for NNTP newsgroup(s).