Received: by 10.213.65.16 with SMTP id m16csp255503imf; Mon, 12 Mar 2018 02:40:50 -0700 (PDT) X-Google-Smtp-Source: AG47ELsA+zHdwyz/3hqub+kUFiwnDpzWPZ+A8E7ws3RTKf8Lo5BBbFABpC3lcDVa4QkgDs3grBvb X-Received: by 2002:a17:902:2f81:: with SMTP id t1-v6mr7565320plb.290.1520847650499; Mon, 12 Mar 2018 02:40:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520847650; cv=none; d=google.com; s=arc-20160816; b=hjIIlpXXUmeLYDFKbQ30tTecwRj7zlTdN0lYPnZd0nN6RhXMbp7WP16VpLS0zWsYZ3 cwmvhRTKBTagbf7iflUs+GfodwLGQN5t5Fc25JMjdpMXNX4Em/PympEaK1INs4skZOlz wcy/0CJAyL6B+YGBjVI+KH96n/WFWu+K0ZyCi0uMxlBPoiZvAUqnIykmsGQMrG1M/Sng d7o5N6Tns4mFeQFe0/kXcMTFUNpHjwYLZMBO/EBdQJz8wcVD/l75fKnakHGrRvXMX5Qp qFl9ITF/osYQWYtNWxkig9oOSM7qSLJMDIHiAsVTesWcKI/suajK9VMQMGbrbjugb6RL THiQ== 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=P1Z05eDoY+jy2ksoUgnVS/DXauWdtzuappUrOSXSWJI=; b=p+GEK4/+CdJyqkfJZHM+46HY5c8qOTiLL3gDaUTXyKEyp2UFfWmCWdDt9U2TP8Bjuu DktL0RWNkMPyA9npGZfZecD3owkIpgG6AxjGhQOFzOeSMJdHXx+8ZdU0M/vDaLZlpd81 J3IuzXHZ5kBgcn1j7bQVuJjOHnH/N5DC4JV0VEq/V/VC05yogkpFoLNC/aZcF2lu++gf TStg9n/McPSno83p4GJ4Cu0v6w7r4BS4IU3eq5oqKyp7zgpIO+0jRZKJEIpML9DcscMS qA4xnv4+HTz5OzluvSdfU7mZLDEIYZDoMTXFv+oUB3447I7dgGjNo8b3ccdsvpnpa2Pe ZiKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mU8fY7XP; 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 m13si4795996pgd.641.2018.03.12.02.40.36; Mon, 12 Mar 2018 02:40:50 -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=mU8fY7XP; 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 S1752246AbeCLJjh (ORCPT + 99 others); Mon, 12 Mar 2018 05:39:37 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:39654 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751229AbeCLJjf (ORCPT ); Mon, 12 Mar 2018 05:39:35 -0400 Received: by mail-pl0-f66.google.com with SMTP id s13-v6so9010505plq.6; Mon, 12 Mar 2018 02:39:35 -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=P1Z05eDoY+jy2ksoUgnVS/DXauWdtzuappUrOSXSWJI=; b=mU8fY7XPFGB11ERe/5DSGs2+t/t6UymeAwp4HkAyRvY2ftPmnMvPBO+83XLkS8paAW UN5XJK7ZmDVOltNXokpW4Z4VDO0S+dbpePPUdcudwpoTYc3J2gWlzA/IkaX1cPKgIovf 6XxC2TIdQYRLa8Ioz7t5rmhTgkl4nfSc4g4PqARZCj8MpN3+9GT3nyatN8WPFkLV0ANu 7odb2JET4FzqTrsQ/3CUXrUrZi+F0JueZ5Md7HW1HBRvyVWoJRlb1WG0S3Aoi/jkJmTV Ak1RQ2G2FVp7Wd9tdJPhj6zC1HMTuyOEDrp4EHDxo4ZPxYlsf+vdixXEsFRb/CnN/PLB WICA== 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=P1Z05eDoY+jy2ksoUgnVS/DXauWdtzuappUrOSXSWJI=; b=D747ZKWBqCGjdvq5pL+fthC74lHF1q7JRjx/tTuKYpjofd00LsqoRTqzPl7mAIZLPB jJKcSWCyAgpYpy2G08Uogeicw15o8+9zB5oD2oh7kKdNtOkBrv3BJk0mzw860/0CMl4a T5n4IfkTjkluxo7n3Q4MOrWUeKTXdjcohTC0qRWXE+drUnZbk4Fi3hrcZrU80MKAy94c s0Gd5zM+kS4e8tHBmZkSo97XGMAEc7G7rm4EPFARcnQe1gldWDYkp9JRETP8g1CI2fXk e+96qtBJ7dYz2QYhYtW4PdY8Ae2Up/uatWSQwGye71jD4lZd+FLLobWyk2sgt+asGXHH h1cw== X-Gm-Message-State: AElRT7HBXDXn/mgFIZvbG+qLq3Qh7KvA/g/sIIB7V8jwUpysgGiSzvrF OPNrNt/Hcr9DZx/JVKaKlok= X-Received: by 2002:a17:902:bb06:: with SMTP id l6-v6mr7741793pls.394.1520847575037; Mon, 12 Mar 2018 02:39:35 -0700 (PDT) Received: from localhost.localdomain ([2405:204:714d:efc4:a583:666e:901d:538]) by smtp.gmail.com with ESMTPSA id c11sm17551407pfe.109.2018.03.12.02.39.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Mar 2018 02:39:34 -0700 (PDT) From: hariprasath.elango@gmail.com To: aditya.shankar@microchip.com Cc: hariprasath.elango@gmail.com, vbabu3@visteon.com, Ganesh Krishna , Greg Kroah-Hartman , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCHv2] staging: wilc1000: use pre-defined macro is_broadcast_ether_addr Date: Mon, 12 Mar 2018 15:09:03 +0530 Message-Id: <20180312093903.9147-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: HariPrasath Elango Use the kernel pre-defined macro is_broadcast_ether_addr() instead of doing a memcmp here. Signed-off-by: HariPrasath Elango --- 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