Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1282582rwi; Mon, 31 Oct 2022 14:11:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4P/dkr08oXxgx6P/WPino//cNJdpgVPXvAV+hBcnrm6VnL8xFfw6Z28ufS7bMfYJ6+EvQU X-Received: by 2002:a17:906:fe45:b0:791:9624:9e9f with SMTP id wz5-20020a170906fe4500b0079196249e9fmr15211501ejb.86.1667250559523; Mon, 31 Oct 2022 14:09:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667250559; cv=none; d=google.com; s=arc-20160816; b=tarBDqPro6C2e1wEmDCI9S3FGGNdOIN8XKwmZp7ungBf01Xlu2aVONJxcXWX4dvIjQ t+uF5CdEbTJwc3PbCBs9GlstSaGxJXfAccl8zNCXb2hzj8n/klyVD8uv5XIaBDQJL1RG sOdbP65vw/kYfFu9Eu79Uxnb4f8wU7PF7pPyf7u3RNJ07WyX9cNvYGY/EL3vw8mD25hR LE9H0HsjJQFGWIM2rHWpL51H8wTUcoUnJ3jUMbSe906M4SBUIsavSMnGGQQEZyBksYNR jtNz0+SPD3lK+NS3WI9HSgUgoQLt8RbjbvizRjyEG8W4adkr2/H/f+vGRlXEl704iEsV BYzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=KG138z2VDLgPQTMe33TSkheuxHiqtYTg+jz69pDePlg=; b=RCpeauXWWi/Xp98w84rAxQq1P7Bgt7pmkqr7bYrqlJu/v45w78XaUYxX0N3JJs9BDd A7EAmP5VnPu7w4oKhbP9SRyjThydE/J+QD3vPZeE8j2Uq3Gi2ZC9f16JtB1zu3D58EHD wQgB7vGJOg9n/Bn5xpp08LkcNJd7O2McDrZBjnCnh+ME6Do6OL4Xm8zSogYV/BrJtYrg Bvjr6QJgnkYin1iHGU4a8hotFwVEdWmDlyYMyEJYED7947h+U/nOmkSHVmEWF6KExule 1ofknEbKbokDqkfcNZfG4TXvl4ZdUsMKLVID1sBzk/iPpLETzQacDqtWUR2rGv2GdNmJ IkAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z14-20020a056402274e00b0045cecdc1fbcsi11470248edd.9.2022.10.31.14.08.43; Mon, 31 Oct 2022 14:09:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230171AbiJaUzO (ORCPT + 98 others); Mon, 31 Oct 2022 16:55:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230106AbiJaUy6 (ORCPT ); Mon, 31 Oct 2022 16:54:58 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5FCFD10E for ; Mon, 31 Oct 2022 13:54:57 -0700 (PDT) Received: from dslb-084-059-234-234.084.059.pools.vodafone-ip.de ([84.59.234.234] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1opbo5-0006z9-R0; Mon, 31 Oct 2022 21:54:53 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser , Joe Perches Subject: [PATCH 1/3] staging: r8188eu: use ether_addr_equal for address comparison Date: Mon, 31 Oct 2022 21:54:10 +0100 Message-Id: <20221031205412.124871-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221031205412.124871-1-martin@kaiser.cx> References: <20221031205412.124871-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We can use ether_addr_equal instead of memcmp in update_recvframe_phyinfo_88e for comparing the incoming frame's destination address with our local address. Both struct ieee80211_hdr and struct eeprom_priv's mac_addr component are 2-byte aligned. Suggested-by: Joe Perches Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c b/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c index f01ae71bcdb1..10bb2e602984 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c @@ -126,8 +126,8 @@ void update_recvframe_phyinfo_88e(struct recv_frame *precvframe, struct phy_stat get_bssid(&padapter->mlmepriv), ETH_ALEN)); pkt_info.bPacketToSelf = pkt_info.bPacketMatchBSSID && - (!memcmp(ieee80211_get_DA(hdr), - myid(&padapter->eeprompriv), ETH_ALEN)); + ether_addr_equal(ieee80211_get_DA(hdr), + myid(&padapter->eeprompriv)); pkt_info.bPacketBeacon = pkt_info.bPacketMatchBSSID && ieee80211_is_beacon(fc); if (pkt_info.bPacketBeacon) { -- 2.30.2