From patchwork Thu Aug 29 21:35:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Ryazanov X-Patchwork-Id: 2851625 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1E6819F485 for ; Thu, 29 Aug 2013 21:35:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2F17B200CA for ; Thu, 29 Aug 2013 21:35:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 44296200C7 for ; Thu, 29 Aug 2013 21:35:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754051Ab3H2VfM (ORCPT ); Thu, 29 Aug 2013 17:35:12 -0400 Received: from mail-lb0-f176.google.com ([209.85.217.176]:34331 "EHLO mail-lb0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751755Ab3H2VfK (ORCPT ); Thu, 29 Aug 2013 17:35:10 -0400 Received: by mail-lb0-f176.google.com with SMTP id y6so1194602lbh.21 for ; Thu, 29 Aug 2013 14:35:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=R2W/7n7UhJADr+xhvUOnXgdeBWD4gxHzh/Z7yFMqnbY=; b=CTT2+ho5lFebg6csiC3EPR31q5xFVLqUqvF11To4i1o5F+WyeLES12yNJXWa+VUR3B gyEh4nVp7zx6wYC5luV+PNIv0QUSK+1f7D3y42GqGwff9CEd2FUC/bIqbqoqoVijUixR vAKztxr8KrR6TTQjr7jCW8kkjrePUYjVz776QXBTe9PjvRg9hBn8KYBGbR+00pLC/xm9 XZBdaP9/60ecrp9hJ/lTMHQlWFViP2p8DfnM29G317QogyY5xaeccb/iXX+YMPrNArBW KIW5WyzNNRw+PupVK/eSkg9O78SYPguAQkKJdU3HNx1DAoW3Zay+iGCl3ZHTjIYcM3CU xF9g== X-Received: by 10.152.87.143 with SMTP id ay15mr4734877lab.2.1377812108296; Thu, 29 Aug 2013 14:35:08 -0700 (PDT) Received: from rsa-laptop.internal.lan ([109.106.153.218]) by mx.google.com with ESMTPSA id b1sm13903385lah.6.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 Aug 2013 14:35:07 -0700 (PDT) From: Sergey Ryazanov To: linux-wireless@vger.kernel.org Cc: Johannes Berg , Sergey Ryazanov Subject: [PATCH] mac80211: Remove superfluous is_multicast_ether_addr() call Date: Fri, 30 Aug 2013 01:35:09 +0400 Message-Id: <1377812109-22889-1-git-send-email-ryazanov.s.a@gmail.com> X-Mailer: git-send-email 1.7.8.6 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove superfluous call and use locally stored previous result. Signed-off-by: Sergey Ryazanov --- net/mac80211/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 3456c04..102ce8a 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1981,7 +1981,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, * EAPOL frames from the local station. */ if (unlikely(!ieee80211_vif_is_mesh(&sdata->vif) && - !is_multicast_ether_addr(hdr.addr1) && !authorized && + !multicast && !authorized && (cpu_to_be16(ethertype) != sdata->control_port_protocol || !ether_addr_equal(sdata->vif.addr, skb->data + ETH_ALEN)))) { #ifdef CONFIG_MAC80211_VERBOSE_DEBUG