From patchwork Wed Feb 2 17:27:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 527201 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 p12K0VJY000416 for ; Wed, 2 Feb 2011 20:03:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754726Ab1BBR2p (ORCPT ); Wed, 2 Feb 2011 12:28:45 -0500 Received: from mail.atheros.com ([12.19.149.2]:48029 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754722Ab1BBR2o (ORCPT ); Wed, 2 Feb 2011 12:28:44 -0500 Received: from mail.atheros.com ([10.10.20.108]) by sidewinder.atheros.com for ; Wed, 02 Feb 2011 09:28:24 -0800 Received: from mail.atheros.com (10.12.4.12) by SC1EXHC-02.global.atheros.com (10.10.20.111) with Microsoft SMTP Server (TLS) id 8.2.213.0; Wed, 2 Feb 2011 09:28:40 -0800 Received: by mail.atheros.com (sSMTP sendmail emulation); Wed, 02 Feb 2011 22:57:54 +0530 From: Rajkumar Manoharan To: CC: , Rajkumar Manoharan Subject: [PATCH] mac80211: do not restart ps timer during scan or offchannel Date: Wed, 2 Feb 2011 22:57:53 +0530 Message-ID: <1296667673-4773-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]); Wed, 02 Feb 2011 20:03:57 +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)); }