Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1276864rwi; Mon, 31 Oct 2022 14:05:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7z6Mnb4Q9KKzIPRyI4OUPn3hptTFyOBvo92fzATeq4QuWaJ8znJHmyuoY7BPgI9JYLvHTT X-Received: by 2002:a05:6402:50c:b0:461:bc01:1828 with SMTP id m12-20020a056402050c00b00461bc011828mr16002007edv.64.1667250358358; Mon, 31 Oct 2022 14:05:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667250358; cv=none; d=google.com; s=arc-20160816; b=NifTgl4bzqaXJ/2Eo2IljWPvwTPmfZ482SfSvPj2YUULEldo/qXbcHLVjDnFCfPd7O b3DRH1KwFzg/JJGFa12qLtespB1ptpduQpa6ioOAU8FgYZL0f00aRVkr9FushhIDtJfE S+bC5zGT3w2/QkCRkgrl1XRKlDcAls0DqGdhae2CIia064uBG02VMyEc+ou9aIEeMfjd SCawEIsxuPxfpetcM3cOVEqlueZkZaRSgndTwec7D4tc8HHNWKnwOu+UU8ixN1jt+5W3 U3NoK7oFyAkwQg8jFxCajzI4I9nSgYA4yfgtKRxt4KqhoHAm5hX3a+3foURYZf7TIBEr Wysw== 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 :message-id:date:subject:cc:to:from; bh=fBc8gcMZqD1AAuEuez96ceoS5RcwgE4hmikY7rg0ZM0=; b=pzgahcDTCGp2aa4kY8dnpmOVz7kMEWp5winC/PwbALVPgpxJiZER0lKkMtH6l3n9wT fiL9uiq3s5iK+846yUZSszDxyTj7Lj1wJoi5cli4i/OFBr6pcmgcu4E7fFR/me1PKZ0u 4dSHjX36oaDqOQ0Z6dBb+hjSxYhY8U/JZzMrlnbI8RaFYzJpzPr0TOMGMUwRxgsPVBm1 xCSNEKy9TirtM4VKzV+vndR2UnWUlvIGadA1Bq0NNH1MSHG6nH8HAOY+uahHnZHA2RoQ NzvSyAqgWrVpKjCTfX2+UUhDUIiZLHE7nBMmRHsIOEwbsspM7R1UjbS4M9tNUnQr7Faa qR3Q== 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 m7-20020a509307000000b0046107f951f9si9364724eda.237.2022.10.31.14.05.34; Mon, 31 Oct 2022 14:05:58 -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 S230138AbiJaUwN (ORCPT + 98 others); Mon, 31 Oct 2022 16:52:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230124AbiJaUwL (ORCPT ); Mon, 31 Oct 2022 16:52:11 -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 EC87213FB6 for ; Mon, 31 Oct 2022 13:52:09 -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 1opblL-0006y5-FT; Mon, 31 Oct 2022 21:52:03 +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] staging: r8188eu: use ether_addr_equal in OnAction Date: Mon, 31 Oct 2022 21:51:41 +0100 Message-Id: <20221031205140.124682-1-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 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 Use ether_addr_equal to compare two mac addresses in OnAction. Both struct ieee80211_mgmt and struct eeprom_priv's mac_addr component are 2-byte aligned. Suggested-by: Joe Perches Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index e985fc5fc575..6679d4037d6b 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -3823,7 +3823,7 @@ static void OnAction(struct adapter *padapter, struct recv_frame *precv_frame) { struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)precv_frame->rx_data; - if (memcmp(myid(&padapter->eeprompriv), mgmt->da, ETH_ALEN)) + if (!ether_addr_equal(myid(&padapter->eeprompriv), mgmt->da)) return; switch (mgmt->u.action.category) { -- 2.30.2