Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp3294628rwo; Fri, 4 Aug 2023 02:33:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFeBUXkMVs/nNZg0gBpcOS15dgJNBAVxpvCWlDyI3x9TxJ8CshSnuHVDu3yThtih8+AwVOY X-Received: by 2002:a05:6a20:2591:b0:13d:71f4:fd8a with SMTP id k17-20020a056a20259100b0013d71f4fd8amr1705884pzd.13.1691141628008; Fri, 04 Aug 2023 02:33:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691141627; cv=none; d=google.com; s=arc-20160816; b=tw6NI9E37uCZkaJxRXkilodO3cvVMdvn0zYNAo9ScgXcGHPzypAP2EGRvfSMOwnBWB dYThOhimlq/jdUFySUWC2BSBIwZd8jfxajR9DjpMdjQ0VL/6Ab0AzepqvBEgZLh9i++G rA4jWUunPgl37y6a/8yT/1PRczb+L3ptSKz62XN6wMb3sp/FrUufR0BEJH3iBq3kjmyL dUYs5ssPwVQVBAU/FOXhbBu/s+xsqgBDqETTAGkOiXnNi0nUcbFvldqe2bqzrs8v6xuh WKJgc1F1SIvQyxSZknnci5C6BYZLG6++P3Fvm9dIa/9/2JbqzNFyTAUFOui+0yoVohKT OWfQ== 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=TlBcfU6KJsGNwDj2omEF9LHce9MBcYayeoBHKKcegTA=; fh=oZ+EZCXM1fiG+efmqysO7hSc7riDEMNE0HWyXDmK5Qk=; b=DQWu1FHviJz+jDka+GlBfGYAyzeM666JxXFuxnCHQsFQw2wYJdyY1BG/e1YtqRRmGk 3xbJLqeFuwD/TRV8w47I3VJ3VWKWVj7lj+lqkEhqaBS65o7JvcEGUCA89LAXlQaGw4de l3drmsniaiURCuGq7hdp0CpmeyTdL9Ws8hz1dGT7kc10pdrQSicpB5aDz6H5xtqhKbJT PCRebbBKEQ73oiYU/mxr3vzD8ZCqOvJ2LbRJJs5/6U9GRxB0ssRpNcgvwtqEQJTjWGET nJtxpL7RlGhssaU4OuVYjEl4DGHxx0hXj0MTm2uh0HWfIyvVgxxk1W1xLTPGdfWlDeKW Ihcg== 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 u185-20020a6385c2000000b00563b05b9ff9si1485421pgd.44.2023.08.04.02.33.37; Fri, 04 Aug 2023 02:33:47 -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 S230122AbjHDJHU (ORCPT + 56 others); Fri, 4 Aug 2023 05:07:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229549AbjHDJGo (ORCPT ); Fri, 4 Aug 2023 05:06:44 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AACC4ECB for ; Fri, 4 Aug 2023 02:04:13 -0700 (PDT) Received: from dggpemm500006.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4RHKSC4TnyzNm9C; Fri, 4 Aug 2023 17:00:43 +0800 (CST) Received: from dggpemm500007.china.huawei.com (7.185.36.183) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 4 Aug 2023 17:04:10 +0800 Received: from huawei.com (10.175.103.91) by dggpemm500007.china.huawei.com (7.185.36.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 4 Aug 2023 17:04:09 +0800 From: Yang Yingliang To: CC: , , Subject: [PATCH -next] wifi: rtlwifi: use eth_broadcast_addr() to assign broadcast address Date: Fri, 4 Aug 2023 17:01:20 +0800 Message-ID: <20230804090120.1332091-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm500007.china.huawei.com (7.185.36.183) 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 eth_broadcast_addr() to assign broadcast address instead of memcpy(). Signed-off-by: Yang Yingliang --- drivers/net/wireless/realtek/rtlwifi/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c index 4fb16f5f6f83..3835b639d453 100644 --- a/drivers/net/wireless/realtek/rtlwifi/core.c +++ b/drivers/net/wireless/realtek/rtlwifi/core.c @@ -1656,7 +1656,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, memcpy(rtlpriv->sec.key_buf[key_idx], key->key, key->keylen); rtlpriv->sec.key_len[key_idx] = key->keylen; - memcpy(mac_addr, bcast_addr, ETH_ALEN); + eth_broadcast_addr(mac_addr); } else { /* pairwise key */ rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG, "set pairwise key\n"); -- 2.25.1