Search Linux Wireless

Re: IWLWIFI should depend on SUSPEND

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux