linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kalle.valo@nokia.com>
To: linux-wireless@vger.kernel.org
Subject: [RFC PATCH v4 3/5] mac80211: add IEEE80211_HW_NO_DYNAMIC_PS flag
Date: Tue, 02 Dec 2008 22:04:12 +0200	[thread overview]
Message-ID: <20081202200412.5507.63993.stgit@tikku> (raw)
In-Reply-To: <20081202200219.5507.83250.stgit@tikku>

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
---

 include/net/mac80211.h |    5 +++++
 net/mac80211/tx.c      |    3 ++-
 net/mac80211/wext.c    |    3 ++-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 6a1d4ea..89affd8 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -846,6 +846,10 @@ enum ieee80211_tkip_key_type {
  *
  * @IEEE80211_HW_AMPDU_AGGREGATION:
  *	Hardware supports 11n A-MPDU aggregation.
+ *
+ * @IEEE80211_HW_NO_DYNAMIC_PS:
+ *	Hardware which don't have dynamic power save support, meaning
+ *	that power save is enabled in idle periods.
  */
 enum ieee80211_hw_flags {
 	IEEE80211_HW_RX_INCLUDES_FCS			= 1<<1,
@@ -858,6 +862,7 @@ enum ieee80211_hw_flags {
 	IEEE80211_HW_NOISE_DBM				= 1<<8,
 	IEEE80211_HW_SPECTRUM_MGMT			= 1<<9,
 	IEEE80211_HW_AMPDU_AGGREGATION			= 1<<10,
+	IEEE80211_HW_NO_DYNAMIC_PS			= 1<<11,
 };
 
 /**
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 60cbc28..9444a06 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1476,7 +1476,8 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
 		goto fail;
 	}
 
-	if (local->dynamic_ps_timeout > 0) {
+	if ((local->hw.flags & IEEE80211_HW_NO_DYNAMIC_PS) &&
+	    local->dynamic_ps_timeout > 0) {
 		if (local->hw.conf.flags & IEEE80211_CONF_PS) {
 			netif_tx_stop_all_queues(local->mdev);
 			queue_work(local->hw.workqueue,
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index 8815858..a666ced 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -989,7 +989,8 @@ set:
 		return ret;
 
 	if (sdata->u.sta.flags & IEEE80211_STA_ASSOCIATED) {
-		if (local->dynamic_ps_timeout > 0)
+		if ((local->hw.flags & IEEE80211_HW_NO_DYNAMIC_PS) &&
+		    local->dynamic_ps_timeout > 0)
 			mod_timer(&local->dynamic_ps_timer, jiffies +
 				  msecs_to_jiffies(local->dynamic_ps_timeout));
 		else {


  parent reply	other threads:[~2008-12-02 20:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-02 20:03 [RFC PATCH v4 0/5] mac80211 dynamic power save Kalle Valo
2008-12-02 20:03 ` [RFC PATCH v4 1/5] mac80211: enable IEEE80211_CONF_PS only when associated Kalle Valo
2008-12-04 17:27   ` Johannes Berg
2008-12-05  5:47     ` Kalle Valo
2008-12-05  9:40       ` Johannes Berg
2008-12-02 20:04 ` [RFC PATCH v4 2/5] mac80211: implement dynamic power save Kalle Valo
2008-12-02 20:04 ` Kalle Valo [this message]
2008-12-02 20:04 ` [RFC PATCH v4 4/5] mac80211: move dynamic_ps_timeout to hw.conf Kalle Valo
2008-12-02 20:04 ` [RFC PATCH v4 5/5] mac80211: track master queue status Kalle Valo
2008-12-04 17:34   ` Johannes Berg
2008-12-05  5:51     ` Kalle Valo
2008-12-05  9:41       ` Johannes Berg
2008-12-05  9:57         ` Kalle Valo

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=20081202200412.5507.63993.stgit@tikku \
    --to=kalle.valo@nokia.com \
    --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;
as well as URLs for NNTP newsgroup(s).