Received: by 10.213.65.16 with SMTP id m16csp237108imf; Mon, 12 Mar 2018 01:49:12 -0700 (PDT) X-Google-Smtp-Source: AG47ELsOGEX3UKYJld/w71BVbHsFNwQaPqOyDetejbGxWRqmcRG5XucODAwD8P62KdEWfG+gjTns X-Received: by 2002:a17:902:6184:: with SMTP id u4-v6mr2447248plj.390.1520844552276; Mon, 12 Mar 2018 01:49:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520844552; cv=none; d=google.com; s=arc-20160816; b=IZjh9MYrEpkcweVALeSrtSsvv8c1ABPMHhYl8vEGAXV0bI75FA1oC/SKzkrAZDV0Cz ygmn+rccdBx6LKuZmG0Jsm0vY+xX/+z9HCQ3TRHPCxTbv4JyS0CnhYXgFI03wHnQiIp3 avjO9xUVH2I0GPPsZgYRcJRTngDkQ8A/mgYj0229RYkh+9h3aWTDpg9fM/K08veroJ6b fwHF5SEOPWEaNpL3G8DuucyTs9IP1c5Svo4V34zsPAoQGuA+Fc2QbN9pGIem5437xYa+ j4O7HW5zo1czwKOFwXvoX5fJ1wphWePpEqffvSu60B09LNTXrQWkUzG6mHruOXeCKvve R/JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=TzKPDubYx7Hk6JiTDCk6mSkcJX0YLQdDQ6dVnMSK4hw=; b=Kh3h2f1RtxITUeNs6b71yo4Hx5DoVoYphH9Sy7n8RPvG5trq78ruuJpHA/Hx+eMmxy 7RPQTLBEqlvbPoGhtikQlXPHgFz5ufWRxqUzy4fw9PeoNVcvvuTM9DyAYS6lLPOLmHaT zSEmSsurbJGthvyboBIUZtjCb0x//d6EQ5TfQAn88Cm4msL26r+LZ/eIz9zI0xGFz+U8 b/IVOQ8KnE9RvEQCWCCRrDRH96WrNzDszDx14qxAJIej1UT3XgcsBRKNtQ6midXbeHMf Qt7w7rW688zJzde5xBkkZfPwbZDyyB6ov2wrBfU7isIxG09opZ9mu0UXNaKO5IKsDtBa 4xSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PIcU+Vh2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h1-v6si5583656pld.16.2018.03.12.01.48.58; Mon, 12 Mar 2018 01:49:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PIcU+Vh2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751866AbeCLIrj (ORCPT + 99 others); Mon, 12 Mar 2018 04:47:39 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:43251 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751418AbeCLIrh (ORCPT ); Mon, 12 Mar 2018 04:47:37 -0400 Received: by mail-pl0-f67.google.com with SMTP id f23-v6so8950348plr.10; Mon, 12 Mar 2018 01:47:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=TzKPDubYx7Hk6JiTDCk6mSkcJX0YLQdDQ6dVnMSK4hw=; b=PIcU+Vh28LqWnnYgG/4/AHt+EAFny75ARl/OmbPI7pceaE/vnIsncULLXk3CzvoNJ3 y/z7YicK4MPK8rIz/J1+KDqbiQW2fmdFZIP3M26rbLalgvY6eyeyIz0k67Hkxf2jbGxr WVmQgSSVv9crE0BCajppLvI3aojkmJr0bwD+QFDPl8IgIGxKOYxcWg5Ixjbqyh+Dh3kF yg15raXjP3gabWVImlYTQivrUphdNjrdedEOtPROzgyuak6DL7nFqUgOvY1piS1dhfrx sx2IdYnnStjcdF6za7nHj/VDtd5QSmCgLbgNFJMfxpvxHur4xFOsmz5mxD4O8oZfPU62 GlCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=TzKPDubYx7Hk6JiTDCk6mSkcJX0YLQdDQ6dVnMSK4hw=; b=YuKc/hsA9cCpTeV55X63A+bnuWyXpTl7ESVOqKZ125ZecpGCV+d0MMv/O3uSTtLxMK vH2wgFXtxop1SE3NSc9d6n/WxzFNR4UURZWGWTlqSM1hz5pZPyFfXrvg5nttY8f7YgGZ Mwo7R/qsQNJUM7Srnemm2FlGh5Kspq73WydGIIeEF6Sm2I4aAA4FV52FcxRI6b1qdEge yoWVGMKF93BbPxssmLCBoc65vRuhIA4ZF776SOh/hVpD/Lc9+860mA0o0XUZ7sC295Y1 8LdqBVe/tqfTGyJVHpfEgNDsWU5dPgO4/vLFgx+sccQSQsQfk2aQ4Ouy/hXLvkNx3laq JXqw== X-Gm-Message-State: AElRT7G+WqT+9wIJQt6X4RPQN7wfLWB0Tnp34hI49SS3yTmQRwhlOxAF qKno7Fiwk4+epdQQEQ62T4w= X-Received: by 2002:a17:902:34f:: with SMTP id 73-v6mr7448865pld.55.1520844457298; Mon, 12 Mar 2018 01:47:37 -0700 (PDT) Received: from localhost.localdomain ([2405:204:714d:efc4:a583:666e:901d:538]) by smtp.gmail.com with ESMTPSA id e82sm14423537pfh.89.2018.03.12.01.47.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Mar 2018 01:47:36 -0700 (PDT) From: hariprasath.elango@gmail.com To: aditya.shankar@microchip.com Cc: hariprasath.elango@gmail.com, vbabu3@visteon.com, Hari Prasath , Ganesh Krishna , Greg Kroah-Hartman , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: wilc1000: use pre-defined macro is_broadcast_ether_addr Date: Mon, 12 Mar 2018 14:17:15 +0530 Message-Id: <20180312084715.30103-1-hariprasath.elango@gmail.com> X-Mailer: git-send-email 2.10.0.GIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hari Prasath Use the kernel pre-defined macro is_broadcast_ether_addr() instead of doing a memcmp here. Signed-off-by: Hari Prasath --- drivers/staging/wilc1000/linux_mon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index bbdfc7a..f93f411 100644 --- a/drivers/staging/wilc1000/linux_mon.c +++ b/drivers/staging/wilc1000/linux_mon.c @@ -27,7 +27,6 @@ static struct net_device *wilc_wfi_mon; /* global monitor netdev */ static u8 srcadd[6]; static u8 bssid[6]; -static u8 broadcast[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; /** * @brief WILC_WFI_monitor_rx * @details @@ -193,7 +192,7 @@ static netdev_tx_t WILC_WFI_mon_xmit(struct sk_buff *skb, skb_pull(skb, rtap_len); - if (skb->data[0] == 0xc0 && (!(memcmp(broadcast, &skb->data[4], 6)))) { + if (skb->data[0] == 0xc0 && is_broadcast_ether_addr(&skb->data[4])) { skb2 = dev_alloc_skb(skb->len + sizeof(struct wilc_wfi_radiotap_cb_hdr)); if (!skb2) return -ENOMEM; -- 2.10.0.GIT