From patchwork Tue Feb 1 17:32:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 523541 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p11HXEnb008549 for ; Tue, 1 Feb 2011 17:33:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754634Ab1BARcz (ORCPT ); Tue, 1 Feb 2011 12:32:55 -0500 Received: from mail.atheros.com ([12.19.149.2]:60789 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754486Ab1BARcy (ORCPT ); Tue, 1 Feb 2011 12:32:54 -0500 Received: from mail.atheros.com ([10.10.20.108]) by sidewinder.atheros.com for ; Tue, 01 Feb 2011 09:32:34 -0800 Received: from mail.atheros.com (10.12.4.12) by SC1EXHC-02.global.atheros.com (10.10.20.106) with Microsoft SMTP Server (TLS) id 8.2.213.0; Tue, 1 Feb 2011 09:32:52 -0800 Received: by mail.atheros.com (sSMTP sendmail emulation); Tue, 01 Feb 2011 23:02:06 +0530 From: Rajkumar Manoharan To: CC: Rajkumar Manoharan Subject: [RFC v2] mac80211: do not restart ps timer during scan or offchannel Date: Tue, 1 Feb 2011 23:02:06 +0530 Message-ID: <1296581526-3004-1-git-send-email-rmanoharan@atheros.com> X-Mailer: git-send-email 1.7.4 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 01 Feb 2011 17:33:37 +0000 (UTC) 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)); }