Search Linux Wireless

[RFC PATCH v4 3/5] mac80211: add IEEE80211_HW_NO_DYNAMIC_PS flag

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

 



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

 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 {

--
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