Search Linux Wireless

[RFC 7/9] wl12xx: save wl->wow_enabled on suspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



save the WoW parameters we got in the .stop callback, so we will be
able to consider them later (while suspending wl12xx_sdio/spi).

Signed-off-by: Eliad Peller <eliad@xxxxxxxxxx>
---
 drivers/net/wireless/wl12xx/main.c   |    6 ++++--
 drivers/net/wireless/wl12xx/wl12xx.h |    3 +++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 3a7d788..a46022f 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -1084,7 +1084,7 @@ static struct notifier_block wl1271_dev_notifier = {
 static int wl1271_op_start(struct ieee80211_hw *hw,
 			   struct cfg80211_wow *wow)
 {
-	wl1271_debug(DEBUG_MAC80211, "mac80211 start");
+	wl1271_debug(DEBUG_MAC80211, "mac80211 start resume=%d", !!wow);
 
 	/*
 	 * We have to delay the booting of the hardware because
@@ -1106,7 +1106,9 @@ static int wl1271_op_start(struct ieee80211_hw *hw,
 static void wl1271_op_stop(struct ieee80211_hw *hw,
 			   struct cfg80211_wow *wow)
 {
-	wl1271_debug(DEBUG_MAC80211, "mac80211 stop");
+	struct wl1271 *wl = hw->priv;
+	wl1271_debug(DEBUG_MAC80211, "mac80211 stop suspend=%d", !!wow);
+	wl->wow_enabled = !!(wow && wow->enabled_triggers);
 }
 
 static int wl1271_op_add_interface(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h
index 338acc9..dd21818 100644
--- a/drivers/net/wireless/wl12xx/wl12xx.h
+++ b/drivers/net/wireless/wl12xx/wl12xx.h
@@ -521,6 +521,9 @@ struct wl1271 {
 	bool ba_support;
 	u8 ba_rx_bitmap;
 
+	/* tell sdio to stay awake (TODO: move to other place) */
+	bool wow_enabled;
+
 	/*
 	 * AP-mode - links indexed by HLID. The global and broadcast links
 	 * are always active.
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux