Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2540777rdg; Mon, 14 Aug 2023 06:03:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFQyuNyRbOkVJyNKTmC0Y3SYLpDgkG1IMzqCu/bqNQQ931npMeMdgA0ZLkYY3SM2OpYDG/1 X-Received: by 2002:a17:906:3f5d:b0:99d:a6b9:fd04 with SMTP id f29-20020a1709063f5d00b0099da6b9fd04mr2717936ejj.46.1692018200152; Mon, 14 Aug 2023 06:03:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692018200; cv=none; d=google.com; s=arc-20160816; b=Fg9YOThWW5TNlZ5BrgRXcyK5Lw03j9Qa6GkGOsgcPHdBYBBRJG76z2KJvFM3NhKjO6 qCj/LgQu1RTu1WHDoj0/McnFPEFttszACsqjb7LaN9aw8V1RzYFsLQ/kfVYdY3ABa8dH eE68PcV9xK8LznB1U6df2rbbvjUjH2ttd2KuTMc0bHn+1YxQZ6V0bAALKJFAkDHzrK8w SxY6hsu+e2RxGNVvwWofZuhMYch2mwdkf01BV3c8qGbOc5L+wu0hdrc6Hhw45yBJ46ag PKjE9psJFLTIDQdSq21SpAjsoyiVpBYqJlNtEwvEmvvtEDQALj44XTz9FGvNrIoKsyNK bqGA== 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=Q8x1bY++YK/CXkFgUcJchr+x2JEFo47ljh6r2tXJOEM=; fh=pRqsT4w4uCsG/bWnINfvZVMyX9wExXd09y0QAs4hb3Y=; b=dk8DBSmi1WifgfyJus8pCvfKnSBoGDbcNqqBtnkRfkvYbT5QEicApFZ27jkJ53mnnI 9HehRv4KjONWpgVxJjCBLHlJGQJos4DEWVMWWfr5OgNH0+2xaGqZuv8T8eg063U4qF9s i0x2uvgmrRfY4ze6rj+RQ4apqtT3p0L88C3vS4CsX5wnx5fha4vvYzUZDMwZYADHSuIm 5O47arxvVLdDFDTvjeRvrDx9GImtZhPGqi6T16eLz1F9u+BxlK2GGXSGKL6LUGBigIlY hvcVJwuzVv2XY+BqIc8EDLdfmXXeOL0M82oPFbgPQfHgJaRMjMkuVoH53bzDR/OpJfON V1+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a17-20020a17090640d100b00988907e3aaesi7569225ejk.428.2023.08.14.06.02.48; Mon, 14 Aug 2023 06:03:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230123AbjHNMne (ORCPT + 54 others); Mon, 14 Aug 2023 08:43:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230153AbjHNMnZ (ORCPT ); Mon, 14 Aug 2023 08:43:25 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30151E4A for ; Mon, 14 Aug 2023 05:43:25 -0700 (PDT) Received: from kwepemi500008.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4RPYt84q9nzTmq9; Mon, 14 Aug 2023 20:41:20 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemi500008.china.huawei.com (7.221.188.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Mon, 14 Aug 2023 20:43:22 +0800 From: Ruan Jinjie To: , , , , , , , , , CC: Subject: [PATCH net-next 1/2] wifi: ath: Use is_multicast_ether_addr() to check multicast Ether address Date: Mon, 14 Aug 2023 20:42:11 +0800 Message-ID: <20230814124212.302738-2-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230814124212.302738-1-ruanjinjie@huawei.com> References: <20230814124212.302738-1-ruanjinjie@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemi500008.china.huawei.com (7.221.188.139) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS 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-wireless@vger.kernel.org Use is_multicast_ether_addr() to perform the Checking. Signed-off-by: Ruan Jinjie --- drivers/net/wireless/ath/key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/key.c b/drivers/net/wireless/ath/key.c index b7b61d4f02ba..21a93fec284d 100644 --- a/drivers/net/wireless/ath/key.c +++ b/drivers/net/wireless/ath/key.c @@ -104,7 +104,7 @@ bool ath_hw_keysetmac(struct ath_common *common, u16 entry, const u8 *mac) * Not setting this bit allows the hardware to use the key * for multicast frame decryption. */ - if (mac[0] & 0x01) + if (is_multicast_ether_addr(mac)) unicast_flag = 0; macLo = get_unaligned_le32(mac); -- 2.34.1