diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-mac80211.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-mac80211.c b/drivers/net/wireless/iwlwifi/iwl-mac80211.c index ab2f4d7500a4..ff66200b8eaa 100644 --- a/drivers/net/wireless/iwlwifi/iwl-mac80211.c +++ b/drivers/net/wireless/iwlwifi/iwl-mac80211.c | |||
@@ -417,8 +417,6 @@ int iwlagn_mac_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) | |||
417 | if (ret) | 417 | if (ret) |
418 | goto error; | 418 | goto error; |
419 | 419 | ||
420 | device_set_wakeup_enable(priv->trans->dev, true); | ||
421 | |||
422 | iwl_trans_wowlan_suspend(priv->trans); | 420 | iwl_trans_wowlan_suspend(priv->trans); |
423 | 421 | ||
424 | goto out; | 422 | goto out; |
@@ -485,8 +483,6 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw) | |||
485 | 483 | ||
486 | priv->wowlan = false; | 484 | priv->wowlan = false; |
487 | 485 | ||
488 | device_set_wakeup_enable(priv->trans->dev, false); | ||
489 | |||
490 | iwlagn_prepare_restart(priv); | 486 | iwlagn_prepare_restart(priv); |
491 | 487 | ||
492 | memset((void *)&ctx->active, 0, sizeof(ctx->active)); | 488 | memset((void *)&ctx->active, 0, sizeof(ctx->active)); |
@@ -501,6 +497,12 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw) | |||
501 | return 1; | 497 | return 1; |
502 | } | 498 | } |
503 | 499 | ||
500 | static void iwlagn_mac_set_wakeup(struct ieee80211_hw *hw, bool enabled) | ||
501 | { | ||
502 | struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw); | ||
503 | |||
504 | device_set_wakeup_enable(priv->trans->dev, enabled); | ||
505 | } | ||
504 | #endif | 506 | #endif |
505 | 507 | ||
506 | void iwlagn_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | 508 | void iwlagn_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) |
@@ -1581,6 +1583,7 @@ struct ieee80211_ops iwlagn_hw_ops = { | |||
1581 | #ifdef CONFIG_PM_SLEEP | 1583 | #ifdef CONFIG_PM_SLEEP |
1582 | .suspend = iwlagn_mac_suspend, | 1584 | .suspend = iwlagn_mac_suspend, |
1583 | .resume = iwlagn_mac_resume, | 1585 | .resume = iwlagn_mac_resume, |
1586 | .set_wakeup = iwlagn_mac_set_wakeup, | ||
1584 | #endif | 1587 | #endif |
1585 | .add_interface = iwlagn_mac_add_interface, | 1588 | .add_interface = iwlagn_mac_add_interface, |
1586 | .remove_interface = iwlagn_mac_remove_interface, | 1589 | .remove_interface = iwlagn_mac_remove_interface, |