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 = { | |||
234 | .get_stats = cw1200_get_stats, | 234 | .get_stats = cw1200_get_stats, |
235 | .ampdu_action = cw1200_ampdu_action, | 235 | .ampdu_action = cw1200_ampdu_action, |
236 | .flush = cw1200_flush, | 236 | .flush = cw1200_flush, |
237 | #ifdef CONFIG_PM | ||
237 | .suspend = cw1200_wow_suspend, | 238 | .suspend = cw1200_wow_suspend, |
238 | .resume = cw1200_wow_resume, | 239 | .resume = cw1200_wow_resume, |
240 | #endif | ||
239 | /* Intentionally not offloaded: */ | 241 | /* Intentionally not offloaded: */ |
240 | /*.channel_switch = cw1200_channel_switch, */ | 242 | /*.channel_switch = cw1200_channel_switch, */ |
241 | /*.remain_on_channel = cw1200_remain_on_channel, */ | 243 | /*.remain_on_channel = cw1200_remain_on_channel, */ |
@@ -292,10 +294,12 @@ static struct ieee80211_hw *cw1200_init_common(const u8 *macaddr, | |||
292 | BIT(NL80211_IFTYPE_P2P_CLIENT) | | 294 | BIT(NL80211_IFTYPE_P2P_CLIENT) | |
293 | BIT(NL80211_IFTYPE_P2P_GO); | 295 | BIT(NL80211_IFTYPE_P2P_GO); |
294 | 296 | ||
297 | #ifdef CONFIG_PM | ||
295 | /* Support only for limited wowlan functionalities */ | 298 | /* Support only for limited wowlan functionalities */ |
296 | hw->wiphy->wowlan.flags = WIPHY_WOWLAN_ANY | | 299 | hw->wiphy->wowlan.flags = WIPHY_WOWLAN_ANY | |
297 | WIPHY_WOWLAN_DISCONNECT; | 300 | WIPHY_WOWLAN_DISCONNECT; |
298 | hw->wiphy->wowlan.n_patterns = 0; | 301 | hw->wiphy->wowlan.n_patterns = 0; |
302 | #endif | ||
299 | 303 | ||
300 | hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD; | 304 | hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD; |
301 | 305 | ||
@@ -419,18 +423,22 @@ static int cw1200_register_common(struct ieee80211_hw *dev) | |||
419 | goto done; | 423 | goto done; |
420 | #endif | 424 | #endif |
421 | 425 | ||
426 | #ifdef CONFIG_PM | ||
422 | err = cw1200_pm_init(&priv->pm_state, priv); | 427 | err = cw1200_pm_init(&priv->pm_state, priv); |
423 | if (err) { | 428 | if (err) { |
424 | pr_err("Cannot init PM. (%d).\n", | 429 | pr_err("Cannot init PM. (%d).\n", |
425 | err); | 430 | err); |
426 | return err; | 431 | return err; |
427 | } | 432 | } |
433 | #endif | ||
428 | 434 | ||
429 | err = ieee80211_register_hw(dev); | 435 | err = ieee80211_register_hw(dev); |
430 | if (err) { | 436 | if (err) { |
431 | pr_err("Cannot register device (%d).\n", | 437 | pr_err("Cannot register device (%d).\n", |
432 | err); | 438 | err); |
439 | #ifdef CONFIG_PM | ||
433 | cw1200_pm_deinit(&priv->pm_state); | 440 | cw1200_pm_deinit(&priv->pm_state); |
441 | #endif | ||
434 | return err; | 442 | return err; |
435 | } | 443 | } |
436 | 444 | ||
@@ -482,7 +490,9 @@ static void cw1200_unregister_common(struct ieee80211_hw *dev) | |||
482 | cw1200_queue_deinit(&priv->tx_queue[i]); | 490 | cw1200_queue_deinit(&priv->tx_queue[i]); |
483 | 491 | ||
484 | cw1200_queue_stats_deinit(&priv->tx_queue_stats); | 492 | cw1200_queue_stats_deinit(&priv->tx_queue_stats); |
493 | #ifdef CONFIG_PM | ||
485 | cw1200_pm_deinit(&priv->pm_state); | 494 | cw1200_pm_deinit(&priv->pm_state); |
495 | #endif | ||
486 | } | 496 | } |
487 | 497 | ||
488 | /* Clock is in KHz */ | 498 | /* Clock is in KHz */ |