summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2016-03-17 15:02:52 +0200
committerJohannes Berg <johannes.berg@intel.com>2016-04-05 12:11:54 +0200
commit602fae425cf3ade41a4787f8ddf850af418faa3b (patch)
tree3e8e227316734596243f82f504f5eb08e21efca8 /net/mac80211
parentfc4a25c5b741ecb4ef4d0f1802775e8a88d7e0a7 (diff)
downloadop-kernel-dev-602fae425cf3ade41a4787f8ddf850af418faa3b.zip
op-kernel-dev-602fae425cf3ade41a4787f8ddf850af418faa3b.tar.gz
mac80211: don't start dynamic PS timer if not needed
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>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/rx.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index dc27bec..36214e3 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2474,14 +2474,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);
OpenPOWER on IntegriCloud