diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2013-05-29 22:22:05 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-05-30 14:42:47 -0400 |
commit | 4e17b87e792ed19e75a96eea618b90510265120c (patch) | |
tree | 4fffe1993ffd22606b5739a466ec8b4692510a01 /drivers/net/wireless/cw1200/main.c | |
parent | b0a1ae976d6cd40ff90ba87883e17eb2610dae3d (diff) |
cw1200: Fix compile with CONFIG_PM=n
Intel's 0-day kernel build tester caught this build failure. This patch
properly wraps everything that depends on CONFIG_PM.
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/cw1200/main.c')
-rw-r--r-- | drivers/net/wireless/cw1200/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/cw1200/main.c b/drivers/net/wireless/cw1200/main.c index 8426d3d7607e..ef4b0b915f87 100644 --- a/drivers/net/wireless/cw1200/main.c +++ b/drivers/net/wireless/cw1200/main.c @@ -234,8 +234,10 @@ static const struct ieee80211_ops cw1200_ops = { .get_stats = cw1200_get_stats, .ampdu_action = cw1200_ampdu_action, .flush = cw1200_flush, +#ifdef CONFIG_PM .suspend = cw1200_wow_suspend, .resume = cw1200_wow_resume, +#endif /* Intentionally not offloaded: */ /*.channel_switch = cw1200_channel_switch, */ /*.remain_on_channel = cw1200_remain_on_channel, */ @@ -292,10 +294,12 @@ static struct ieee80211_hw *cw1200_init_common(const u8 *macaddr, BIT(NL80211_IFTYPE_P2P_CLIENT) | BIT(NL80211_IFTYPE_P2P_GO); +#ifdef CONFIG_PM /* Support only for limited wowlan functionalities */ hw->wiphy->wowlan.flags = WIPHY_WOWLAN_ANY | WIPHY_WOWLAN_DISCONNECT; hw->wiphy->wowlan.n_patterns = 0; +#endif hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD; @@ -419,18 +423,22 @@ static int cw1200_register_common(struct ieee80211_hw *dev) goto done; #endif +#ifdef CONFIG_PM err = cw1200_pm_init(&priv->pm_state, priv); if (err) { pr_err("Cannot init PM. (%d).\n", err); return err; } +#endif err = ieee80211_register_hw(dev); if (err) { pr_err("Cannot register device (%d).\n", err); +#ifdef CONFIG_PM cw1200_pm_deinit(&priv->pm_state); +#endif return err; } @@ -482,7 +490,9 @@ static void cw1200_unregister_common(struct ieee80211_hw *dev) cw1200_queue_deinit(&priv->tx_queue[i]); cw1200_queue_stats_deinit(&priv->tx_queue_stats); +#ifdef CONFIG_PM cw1200_pm_deinit(&priv->pm_state); +#endif } /* Clock is in KHz */ |