[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100330225708.630359553@linux.site>
Date: Tue, 30 Mar 2010 15:56:22 -0700
From: Greg KH <gregkh@...e.de>
To: linux-kernel@...r.kernel.org, stable@...nel.org
Cc: stable-review@...nel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, alan@...rguk.ukuu.org.uk,
Vivek Natarajan <vnatarajan@...eros.com>,
"John W. Linville" <linville@...driver.com>,
"Luis R. Rodriguez" <lrodriguez@...eros.com>,
Greg Kroah-Hartman <gregkh@...e.de>
Subject: [104/116] mac80211: Reset dynamic ps timer in Rx path.
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Vivek Natarajan <vnatarajan@...eros.com>
commit e15276a4b220c54db665cf46a92bd9ceb9aeb052 upstream.
The current mac80211 implementation enables power save if there
is no Tx traffic for a specific timeout. Hence, PS is triggered
even if there is a continuous Rx only traffic(like UDP) going on.
This makes the drivers to wait on the tim bit in the next beacon
to awake which leads to redundant sleep-wake cycles.
Fix this by restarting the dynamic ps timer on receiving every
data packet.
Signed-off-by: Vivek Natarajan <vnatarajan@...eros.com>
Signed-off-by: John W. Linville <linville@...driver.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@...eros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
net/mac80211/rx.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1590,6 +1590,7 @@ static ieee80211_rx_result debug_noinlin
ieee80211_rx_h_data(struct ieee80211_rx_data *rx)
{
struct net_device *dev = rx->dev;
+ struct ieee80211_local *local = rx->local;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
__le16 fc = hdr->frame_control;
int err;
@@ -1612,6 +1613,13 @@ ieee80211_rx_h_data(struct ieee80211_rx_
dev->stats.rx_packets++;
dev->stats.rx_bytes += rx->skb->len;
+ if (ieee80211_is_data(hdr->frame_control) &&
+ !is_multicast_ether_addr(hdr->addr1) &&
+ local->hw.conf.dynamic_ps_timeout > 0 && local->ps_sdata) {
+ mod_timer(&local->dynamic_ps_timer, jiffies +
+ msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout));
+ }
+
ieee80211_deliver_skb(rx);
return RX_QUEUED;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists