summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-mac80211.c
diff options
context:
space:
mode:
authorJohannes Berg2012-03-05 20:24:35 +0100
committerJohn W. Linville2012-03-06 21:16:12 +0100
commit2dd4f9f731f593a52a3fdca20bb32a78d917baf7 (patch)
tree85da9965d4384031e466690de2ad8828491e6085 /drivers/net/wireless/iwlwifi/iwl-mac80211.c
parentiwlwifi: reduce IDI code ifdef (diff)
downloadkernel-qcow2-linux-2dd4f9f731f593a52a3fdca20bb32a78d917baf7.tar.gz
kernel-qcow2-linux-2dd4f9f731f593a52a3fdca20bb32a78d917baf7.tar.xz
kernel-qcow2-linux-2dd4f9f731f593a52a3fdca20bb32a78d917baf7.zip
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,
WIPHY_FLAG_IBSS_RSN;
if (nic(priv)->fw.ucode_wowlan.code.len &&
+ trans(priv)->ops->wowlan_suspend &&
device_can_wakeup(trans(priv)->dev)) {
hw->wiphy->wowlan.flags = WIPHY_WOWLAN_MAGIC_PKT |
WIPHY_WOWLAN_DISCONNECT |
@@ -412,9 +413,7 @@ static int iwlagn_mac_suspend(struct ieee80211_hw *hw,
device_set_wakeup_enable(trans(priv)->dev, true);
- /* Now let the ucode operate on its own */
- iwl_write32(trans(priv), CSR_UCODE_DRV_GP1_SET,
- CSR_UCODE_DRV_GP1_BIT_D3_CFG_COMPLETE);
+ iwl_trans_wowlan_suspend(trans(priv));
goto out;