From patchwork Tue Nov 30 11:19:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helmut Schaa X-Patchwork-Id: 366701 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 oAUBJx6M006929 for ; Tue, 30 Nov 2010 11:19:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755729Ab0K3LTs (ORCPT ); Tue, 30 Nov 2010 06:19:48 -0500 Received: from mail-bw0-f46.google.com ([209.85.214.46]:43075 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755717Ab0K3LTr (ORCPT ); Tue, 30 Nov 2010 06:19:47 -0500 Received: by bwz15 with SMTP id 15so4896601bwz.19 for ; Tue, 30 Nov 2010 03:19:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=pHbVbJBqNqjNSRDBYSTJMQIHGPHtqpzBmMUHeoCr6i0=; b=rfpgWU1r0wiyKL7XQKOYnGvSncewG1jVPqqnvdY2AOPWIdTR3vibaoSLANclRCgvmG 6RjJM2zepgN1cd6GbGHEbTl7MPOuVN82AYxhAyYU6gQDH+ThtAeVRYQe6vPUDu3pkmx6 la5d4yjgtGJZdDfKRoF3Toc6kY1rs4zBgB9Ro= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=pcDxd7mXnpBPYZZg+Y7O7i078MPbFGjSPLqY/RjGKwWjHnRpNm2U8Ai98UFc/vxF6Y d0pYJxLT3NN/xtv0CWOOLfWcEAiUYtYAbiabnFk6dv1CH6ohWmbM9Z3VI0PWmlwhv3+o nmpVlGRh93MKdwmbL96us0nDYQyzWpcLhGUrk= Received: by 10.204.50.135 with SMTP id z7mr1098211bkf.63.1291115985896; Tue, 30 Nov 2010 03:19:45 -0800 (PST) Received: from localhost.localdomain (p5495FDCF.dip.t-dialin.net [84.149.253.207]) by mx.google.com with ESMTPS id v1sm2615719bkt.17.2010.11.30.03.19.44 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 30 Nov 2010 03:19:45 -0800 (PST) From: Helmut Schaa To: "John W. Linville" Cc: linux-wireless@vger.kernel.org, Helmut Schaa , Johannes Berg Subject: [PATCH] mac80211: Minor optimization in ieee80211_rx_h_data Date: Tue, 30 Nov 2010 12:19:34 +0100 Message-Id: <1291115974-4878-1-git-send-email-helmut.schaa@googlemail.com> X-Mailer: git-send-email 1.7.1 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 (demeter1.kernel.org [140.211.167.41]); Tue, 30 Nov 2010 11:19:59 +0000 (UTC) diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 9dd60a7..9e44fbf 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -1871,9 +1871,8 @@ 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) { + if (local->ps_sdata && local->hw.conf.dynamic_ps_timeout > 0 && + !is_multicast_ether_addr(((struct ethhdr *)rx->skb->data)->h_dest)) { mod_timer(&local->dynamic_ps_timer, jiffies + msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout)); }