aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-06-27 03:23:48 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-06-27 11:55:11 -0400
commitdfb89c56add259b72a9c68d6b2846c1cd8c4e4b6 (patch)
tree02a9c8a2995cb7f13b4461837cdf1e14648b1afb /drivers
parentcc45ae547b960b805ee0b201b3807e93a0060472 (diff)
cfg80211: don't allow WoWLAN support without CONFIG_PM
When CONFIG_PM is disabled, 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> Acked-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c2
-rw-r--r--drivers/net/wireless/ti/wlcore/main.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index f27e9732951d..b8fce0d4d72e 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -3487,6 +3487,7 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
3487 wiphy->cipher_suites = cipher_suites; 3487 wiphy->cipher_suites = cipher_suites;
3488 wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites); 3488 wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites);
3489 3489
3490#ifdef CONFIG_PM
3490 wiphy->wowlan.flags = WIPHY_WOWLAN_MAGIC_PKT | 3491 wiphy->wowlan.flags = WIPHY_WOWLAN_MAGIC_PKT |
3491 WIPHY_WOWLAN_DISCONNECT | 3492 WIPHY_WOWLAN_DISCONNECT |
3492 WIPHY_WOWLAN_GTK_REKEY_FAILURE | 3493 WIPHY_WOWLAN_GTK_REKEY_FAILURE |
@@ -3496,6 +3497,7 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
3496 wiphy->wowlan.n_patterns = WOW_MAX_FILTERS_PER_LIST; 3497 wiphy->wowlan.n_patterns = WOW_MAX_FILTERS_PER_LIST;
3497 wiphy->wowlan.pattern_min_len = 1; 3498 wiphy->wowlan.pattern_min_len = 1;
3498 wiphy->wowlan.pattern_max_len = WOW_PATTERN_SIZE; 3499 wiphy->wowlan.pattern_max_len = WOW_PATTERN_SIZE;
3500#endif
3499 3501
3500 wiphy->max_sched_scan_ssids = MAX_PROBED_SSID_INDEX; 3502 wiphy->max_sched_scan_ssids = MAX_PROBED_SSID_INDEX;
3501 3503
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 1156e3f578c1..747a997bc608 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -5321,6 +5321,7 @@ int __devinit wlcore_probe(struct wl1271 *wl, struct platform_device *pdev)
5321 goto out_free_hw; 5321 goto out_free_hw;
5322 } 5322 }
5323 5323
5324#ifdef CONFIG_PM
5324 ret = enable_irq_wake(wl->irq); 5325 ret = enable_irq_wake(wl->irq);
5325 if (!ret) { 5326 if (!ret) {
5326 wl->irq_wake_enabled = true; 5327 wl->irq_wake_enabled = true;
@@ -5334,6 +5335,7 @@ int __devinit wlcore_probe(struct wl1271 *wl, struct platform_device *pdev)
5334 WL1271_RX_FILTER_MAX_PATTERN_SIZE; 5335 WL1271_RX_FILTER_MAX_PATTERN_SIZE;
5335 } 5336 }
5336 } 5337 }
5338#endif
5337 disable_irq(wl->irq); 5339 disable_irq(wl->irq);
5338 5340
5339 ret = wl12xx_get_hw_info(wl); 5341 ret = wl12xx_get_hw_info(wl);