From patchwork Fri Feb 5 12:27:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Natarajan X-Patchwork-Id: 77331 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 o15CRjq7023810 for ; Fri, 5 Feb 2010 12:27:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932313Ab0BEM1o (ORCPT ); Fri, 5 Feb 2010 07:27:44 -0500 Received: from mail.atheros.com ([12.36.123.2]:14684 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932268Ab0BEM1n (ORCPT ); Fri, 5 Feb 2010 07:27:43 -0500 Received: from mail.atheros.com ([10.10.20.105]) by sidewinder.atheros.com for ; Fri, 05 Feb 2010 04:27:43 -0800 Received: from smtp.atheros.com (10.12.4.60) by SC1EXHC-01.global.atheros.com (10.10.20.111) with Microsoft SMTP Server (TLS) id 8.0.751.0; Fri, 5 Feb 2010 04:27:40 -0800 Received: by smtp.atheros.com (sSMTP sendmail emulation); Fri, 05 Feb 2010 17:57:38 +0530 From: Vivek Natarajan To: Subject: [PATCH 2/2 v2] mac80211: Reset dynamic ps timer in Rx path. Date: Fri, 5 Feb 2010 17:57:32 +0530 Message-ID: <1265372852-4692-2-git-send-email-vnatarajan@atheros.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1265372852-4692-1-git-send-email-vnatarajan@atheros.com> References: <1265372852-4692-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]); Fri, 05 Feb 2010 12:27:45 +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;