diff options
author | Karun Eagalapati <karun256@gmail.com> | 2017-10-27 16:55:56 +0530 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-10-30 12:50:12 +0200 |
commit | b6c8d06c8a6465c054befd416d8b067ad495fa06 (patch) | |
tree | e3c2e9f0072ca5e498f97da6ba79c884fe7fa7a2 /drivers/net/wireless/rsi/rsi_91x_mac80211.c | |
parent | f3ac4e7394a1aa89c5ca49f8a5344a98b56df046 (diff) |
rsi: sdio: Add WOWLAN support for S4 hibernate state
We are disabling of interrupts from firmware in freeze handler.
Also setting power management capability KEEP_MMC_POWER to make
device wakeup for WoWLAN trigger.
At restore, we observed a device reset on some platforms. Hence
reloading of firmware and device initialization is performed.
Signed-off-by: Karun Eagalapati <karun256@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/rsi/rsi_91x_mac80211.c')
-rw-r--r-- | drivers/net/wireless/rsi/rsi_91x_mac80211.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c index c3bd3ca9cf83..95eb5e63999f 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c +++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c @@ -17,6 +17,7 @@ #include <linux/etherdevice.h> #include "rsi_debugfs.h" #include "rsi_mgmt.h" +#include "rsi_sdio.h" #include "rsi_common.h" #include "rsi_ps.h" @@ -325,6 +326,11 @@ static int rsi_mac80211_start(struct ieee80211_hw *hw) rsi_dbg(ERR_ZONE, "===> Interface UP <===\n"); mutex_lock(&common->mutex); + if (common->hibernate_resume) { + common->reinit_hw = true; + adapter->host_intf_ops->reinit_device(adapter); + wait_for_completion(&adapter->priv->wlan_init_completion); + } common->iface_down = false; wiphy_rfkill_start_polling(hw->wiphy); rsi_send_rx_filter_frame(common, 0); @@ -1846,6 +1852,9 @@ static int rsi_mac80211_resume(struct ieee80211_hw *hw) rsi_dbg(INFO_ZONE, "%s: mac80211 resume\n", __func__); + if (common->hibernate_resume) + return 0; + mutex_lock(&common->mutex); rsi_send_wowlan_request(common, 0, 0); |