From patchwork Wed Jun 22 11:23:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masashi Honma X-Patchwork-Id: 9192613 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 09B9E60890 for ; Wed, 22 Jun 2016 12:26:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDB13283FF for ; Wed, 22 Jun 2016 12:26:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E273428400; Wed, 22 Jun 2016 12:26:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C778928403 for ; Wed, 22 Jun 2016 12:26:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752033AbcFVMZh (ORCPT ); Wed, 22 Jun 2016 08:25:37 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34332 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751453AbcFVMZf (ORCPT ); Wed, 22 Jun 2016 08:25:35 -0400 Received: by mail-pf0-f195.google.com with SMTP id 66so4002589pfy.1 for ; Wed, 22 Jun 2016 05:25:03 -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=J7jczCn4VLEAtHHxsLEkw9gK8cjeIe+2w2r8SSVDbdw=; b=NIMlaQW7PLWLOqM89UHItYqFeRWj8CgOL9ro9wefaBjBJNENy2H0Rl0x4qhvAf3nP8 Vz/NI9WufHW1Prz3itI6Nez/WRurOkjD6AbwlgzcSV6uK2x/qnLhlORRm9r0frZr0waG 8xS0yKE9wfHUme+th2Cxj7LMBucGccbL3SfJDFMITBu4epn1Qjxvz0Ioizo38C6QKSFZ x99uqSVOyisL/lB70lFiYcNINdgXc3EI2OEXtrSt2Ul8et+BxVvaH5fO5EQcVe+MChUM 2jaiK1AeaJ6zid0EVWyz6YZvBSf6/fpttYJdv/fQLHXhqcUj8RLIjOH8YJHx5F/5LoJS OveQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=J7jczCn4VLEAtHHxsLEkw9gK8cjeIe+2w2r8SSVDbdw=; b=DGI6la22C3Gp8znQmPR/61N+BZXak8780cIn+BOfpFI25Ma/UEmlC8pPQZL1+8rEdI RRtKC2pUP4m3Gd7Ycw6M9QjCmOCdbD/67hxDpWd4UG6xG31qJYCPO89cou8CA59QBFNJ EZNJcK5ttoSfsMB6G3Z9Ib6BENnGKIuSGrOIqEy/oTpohqFALQAfrITnNYB+HYYTeJBf k89qTN0tWJr2mOcp0pXpnmwHmoXyPPopccBcMmJMlKOwORGjoN6ZMRJGlGLphR+aC1Yw Xqty5x/l8AVegUJI49xLZVnBJfinrOf/Q3gRw0wBYKNCiamd2178znfldJz+Q6XRsykV B0pw== X-Gm-Message-State: ALyK8tJGx7uXyPPyLMgyyVmmoaO3XT6SR2TXebUa3rv0sDeT4O2gCtixmq1LRpGLfIZe0Q== X-Received: by 10.98.208.197 with SMTP id p188mr26265768pfg.152.1466594596286; Wed, 22 Jun 2016 04:23:16 -0700 (PDT) Received: from localhost.localdomain (p023c03.kngwnt01.ap.so-net.ne.jp. [121.2.60.3]) by smtp.gmail.com with ESMTPSA id o22sm97131418pfa.15.2016.06.22.04.23.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Jun 2016 04:23:15 -0700 (PDT) From: Masashi Honma To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Masashi Honma Subject: [PATCH] mac80211: Use macro instead of number Date: Wed, 22 Jun 2016 20:23:03 +0900 Message-Id: <1466594583-23663-1-git-send-email-masashi.honma@gmail.com> X-Mailer: git-send-email 2.5.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use IEEE80211_MIN_ACTION_SIZE macro for robust management frame check. Signed-off-by: Masashi Honma --- include/linux/ieee80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 7c0771a..8326a91 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h @@ -2465,7 +2465,7 @@ static inline bool _ieee80211_is_robust_mgmt_frame(struct ieee80211_hdr *hdr) */ static inline bool ieee80211_is_robust_mgmt_frame(struct sk_buff *skb) { - if (skb->len < 25) + if (skb->len < IEEE80211_MIN_ACTION_SIZE) return false; return _ieee80211_is_robust_mgmt_frame((void *)skb->data); }