提交 602fae42 编写于 作者: J Johannes Berg

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: NJohannes Berg <johannes.berg@intel.com>
上级 fc4a25c5
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册