Linux wireless drivers development
 help / color / mirror / Atom feed
From: Eliad Peller <eliad@wizery.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: <linux-wireless@vger.kernel.org>
Subject: [RFC 7/9] wl12xx: save wl->wow_enabled on suspend
Date: Tue,  1 Mar 2011 22:36:42 +0200	[thread overview]
Message-ID: <1299011804-13899-8-git-send-email-eliad@wizery.com> (raw)
In-Reply-To: <1299011804-13899-1-git-send-email-eliad@wizery.com>

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@wizery.com>
---
 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


  parent reply	other threads:[~2011-03-01 20:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-01 20:36 [RFC 0/9] add WoW support Eliad Peller
2011-03-01 20:36 ` [RFC 1/9] cfg80211: " Eliad Peller
2011-03-08 14:09   ` Johannes Berg
2011-03-01 20:36 ` [RFC 2/9] mac80211: add WoW param to suspend/resume functions Eliad Peller
2011-03-08 14:10   ` Johannes Berg
2011-03-01 20:36 ` [RFC 3/9] mac80211: add WoW param to .start/.stop callbacks Eliad Peller
2011-03-08 14:12   ` Johannes Berg
2011-03-01 20:36 ` [RFC 4/9] mac80211: don't remove/add interfaces when WoW is enabled Eliad Peller
2011-03-08 14:14   ` Johannes Berg
2011-03-01 20:36 ` [RFC 5/9] wl12xx_sdio: set interrupt as wake_up interrupt Eliad Peller
2011-03-01 20:36 ` [RFC 6/9] wl12xx_sdio: set MMC_PM_KEEP_POWER flag on suspend Eliad Peller
2011-03-01 20:36 ` Eliad Peller [this message]
2011-03-01 20:36 ` [RFC 8/9] wl12xx: prevent scheduling while suspending (WoW enabled) Eliad Peller
2011-03-01 20:36 ` [RFC 9/9] wl12xx_sdio: declare support for NL80211_WOW_TRIGGER_ANYTHING trigger Eliad Peller
2011-03-22 14:46 ` [RFC 0/9] add WoW support Johannes Berg
2011-03-22 15:13 ` Johannes Berg
2011-03-22 15:40   ` Ohad Ben-Cohen
2011-03-23  9:40   ` Eliad Peller
2011-03-23  9:51     ` Johannes Berg
2011-03-22 15:20 ` Johannes Berg
2011-03-23  9:46   ` Eliad Peller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1299011804-13899-8-git-send-email-eliad@wizery.com \
    --to=eliad@wizery.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox