From patchwork Mon Feb 8 12:17:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Natarajan X-Patchwork-Id: 77723 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o18CHEud011138 for ; Mon, 8 Feb 2010 12:17:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751300Ab0BHMRN (ORCPT ); Mon, 8 Feb 2010 07:17:13 -0500 Received: from mail.atheros.com ([12.36.123.2]:64713 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750854Ab0BHMRM (ORCPT ); Mon, 8 Feb 2010 07:17:12 -0500 Received: from mail.atheros.com ([10.10.20.108]) by sidewinder.atheros.com for ; Mon, 08 Feb 2010 04:17:12 -0800 Received: from smtp.atheros.com (10.12.4.60) by SC1EXHC-02.global.atheros.com (10.10.20.111) with Microsoft SMTP Server (TLS) id 8.0.813.0; Mon, 8 Feb 2010 04:17:04 -0800 Received: by smtp.atheros.com (sSMTP sendmail emulation); Mon, 08 Feb 2010 17:47:07 +0530 From: Vivek Natarajan To: CC: , , Subject: [PATCH] mac80211: Reset dynamic ps timer in Rx path. Date: Mon, 8 Feb 2010 17:47:01 +0530 Message-ID: <1265631421-2574-2-git-send-email-vnatarajan@atheros.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1265631421-2574-1-git-send-email-vnatarajan@atheros.com> References: <1265631421-2574-1-git-send-email-vnatarajan@atheros.com> 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.3 (demeter.kernel.org [140.211.167.41]); Mon, 08 Feb 2010 12:17:14 +0000 (UTC) diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 5709307..657ed66 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -1719,6 +1719,7 @@ static ieee80211_rx_result debug_noinline ieee80211_rx_h_data(struct ieee80211_rx_data *rx) { struct ieee80211_sub_if_data *sdata = rx->sdata; + struct ieee80211_local *local = rx->local; struct net_device *dev = sdata->dev; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data; __le16 fc = hdr->frame_control; @@ -1750,6 +1751,13 @@ ieee80211_rx_h_data(struct ieee80211_rx_data *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;