linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] mac80211: don't start dynamic PS timer if not needed
@ 2016-03-17 13:02 Emmanuel Grumbach
  2016-03-17 13:02 ` [PATCH 2/4] ieee80211: support parsing Fine Timing Measurement action frame Emmanuel Grumbach
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Emmanuel Grumbach @ 2016-03-17 13:02 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

If the device implements dynamic PS itself, there's no need
to ever start the dynamic powersave timer on RX.

While at it, fix up some indentation in this code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/rx.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 9127957..3746ba5 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2456,14 +2456,14 @@ ieee80211_rx_h_data(struct ieee80211_rx_data *rx)
 
 	rx->skb->dev = dev;
 
-	if (local->ps_sdata && local->hw.conf.dynamic_ps_timeout > 0 &&
+	if (!ieee80211_hw_check(&local->hw, SUPPORTS_DYNAMIC_PS) &&
+	    local->ps_sdata && local->hw.conf.dynamic_ps_timeout > 0 &&
 	    !is_multicast_ether_addr(
 		    ((struct ethhdr *)rx->skb->data)->h_dest) &&
 	    (!local->scanning &&
-	     !test_bit(SDATA_STATE_OFFCHANNEL, &sdata->state))) {
-			mod_timer(&local->dynamic_ps_timer, jiffies +
-			 msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout));
-	}
+	     !test_bit(SDATA_STATE_OFFCHANNEL, &sdata->state)))
+		mod_timer(&local->dynamic_ps_timer, jiffies +
+			  msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout));
 
 	ieee80211_deliver_skb(rx);
 
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-05 10:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-17 13:02 [PATCH 1/4] mac80211: don't start dynamic PS timer if not needed Emmanuel Grumbach
2016-03-17 13:02 ` [PATCH 2/4] ieee80211: support parsing Fine Timing Measurement action frame Emmanuel Grumbach
2016-03-17 13:02 ` [PATCH 3/4] mac80211: clean up station flags debugfs Emmanuel Grumbach
2016-03-17 13:02 ` [PATCH 4/4] mac80211: fix cipher scheme function name Emmanuel Grumbach
2016-04-05 10:13   ` Johannes Berg

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