aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-mac80211.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-05 14:24:35 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-06 15:16:12 -0500
commit2dd4f9f731f593a52a3fdca20bb32a78d917baf7 (patch)
tree85da9965d4384031e466690de2ad8828491e6085 /drivers/net/wireless/iwlwifi/iwl-mac80211.c
parentce9e80af4f2c5dffb0df470538573d473c91d540 (diff)
iwlwifi: clean up (wowlan) suspend flow
In the WoWLAN suspend flow, instead of accessing registers directly, ask the transport to do the required setup at the end of suspend. If the transport doesn't implement this, don't tell the stack we support WoWLAN. When the device suspends w/o WoWLAN, mac80211 will have stopped it already, which has already called iwl_apm_stop() via stop_hw(). Thus, it isn't necessary to call it again in pcie_suspend and we can simply do nothing there. This unifies the regular and WoWLAN suspend. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-mac80211.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-mac80211.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-mac80211.c b/drivers/net/wireless/iwlwifi/iwl-mac80211.c
index 8b26f3217823..8c7ca7318c00 100644
--- a/drivers/net/wireless/iwlwifi/iwl-mac80211.c
+++ b/drivers/net/wireless/iwlwifi/iwl-mac80211.c
@@ -196,6 +196,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv,
196 WIPHY_FLAG_IBSS_RSN; 196 WIPHY_FLAG_IBSS_RSN;
197 197
198 if (nic(priv)->fw.ucode_wowlan.code.len && 198 if (nic(priv)->fw.ucode_wowlan.code.len &&
199 trans(priv)->ops->wowlan_suspend &&
199 device_can_wakeup(trans(priv)->dev)) { 200 device_can_wakeup(trans(priv)->dev)) {
200 hw->wiphy->wowlan.flags = WIPHY_WOWLAN_MAGIC_PKT | 201 hw->wiphy->wowlan.flags = WIPHY_WOWLAN_MAGIC_PKT |
201 WIPHY_WOWLAN_DISCONNECT | 202 WIPHY_WOWLAN_DISCONNECT |
@@ -412,9 +413,7 @@ static int iwlagn_mac_suspend(struct ieee80211_hw *hw,
412 413
413 device_set_wakeup_enable(trans(priv)->dev, true); 414 device_set_wakeup_enable(trans(priv)->dev, true);
414 415
415 /* Now let the ucode operate on its own */ 416 iwl_trans_wowlan_suspend(trans(priv));
416 iwl_write32(trans(priv), CSR_UCODE_DRV_GP1_SET,
417 CSR_UCODE_DRV_GP1_BIT_D3_CFG_COMPLETE);
418 417
419 goto out; 418 goto out;
420 419