diff mbox

[RFC,v2] mac80211: do not restart ps timer during scan or offchannel

Message ID 1296581526-3004-1-git-send-email-rmanoharan@atheros.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Rajkumar Manoharan Feb. 1, 2011, 5:32 p.m. UTC
None
diff mbox

Patch

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 7185c93..f88ca98 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1929,7 +1929,10 @@  ieee80211_rx_h_data(struct ieee80211_rx_data *rx)
 	dev->stats.rx_bytes += rx->skb->len;
 
 	if (local->ps_sdata && local->hw.conf.dynamic_ps_timeout > 0 &&
-	    !is_multicast_ether_addr(((struct ethhdr *)rx->skb->data)->h_dest)) {
+	    !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));
 	}