Skip to contentSkip to conversation

iwlwifi: disable WoWLAN if !CONFIG_PM

PATCH Superseded Johannes Berg 1 participant 2 messages Jun 1, 2012 – Jun 4, 2012 Networking drivers (wireless)

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 iwlwifi: disable WoWLAN if !CONFIG_PM

From: Johannes Berg <[email protected]>

If CONFIG_PM is disabled, then mac80211 (correctly) refuses advertising WoWLAN. Disable WoWLAN in the driver in this case.

---
 drivers/net/wireless/iwlwifi/iwl-mac80211.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/net/wireless/iwlwifi/iwl-mac80211.c +2 -0
index ab2f4d7..06546f7 100644
@@ -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;
Signature · 1 line
1.7.10
author maintainer
#1 lore raw

PATCH v2 1/1 iwlwifi: disable WoWLAN if !CONFIG_PM_SLEEP

From: Johannes Berg <[email protected]>

If CONFIG_PM_SLEEP is disabled, then iwlwifi doesn't support suspend/resume handlers and thus mac80211 (correctly) refuses advertising WoWLAN. Disable WoWLAN in the driver in this case.

---
 drivers/net/wireless/iwlwifi/iwl-mac80211.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/net/wireless/iwlwifi/iwl-mac80211.c +2 -0
index ab2f4d7..5d158ca 100644
@@ -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_SLEEP
 	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;
Signature · 1 line
1.7.10