From patchwork Sat Aug 1 09:15:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 11695945 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A5B411392 for ; Sat, 1 Aug 2020 09:13:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9113C2076A for ; Sat, 1 Aug 2020 09:13:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728631AbgHAJN0 (ORCPT ); Sat, 1 Aug 2020 05:13:26 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:54410 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725876AbgHAJN0 (ORCPT ); Sat, 1 Aug 2020 05:13:26 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id D4254CCF6278C7BA1681; Sat, 1 Aug 2020 17:13:19 +0800 (CST) Received: from huawei.com (10.175.101.6) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Sat, 1 Aug 2020 17:13:13 +0800 From: linmiaohe To: , , CC: , , , Subject: [PATCH] nl80211: use eth_zero_addr() to clear mac address Date: Sat, 1 Aug 2020 17:15:49 +0800 Message-ID: <1596273349-24333-1-git-send-email-linmiaohe@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.101.6] X-CFilter-Loop: Reflected Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Miaohe Lin Use eth_zero_addr() to clear mac address instead of memset(). Signed-off-by: Miaohe Lin --- net/wireless/nl80211.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 7fbca0854265..c88f9d09cb25 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -10394,8 +10394,7 @@ static int nl80211_connect(struct sk_buff *skb, struct genl_info *info) memcpy(dev->ieee80211_ptr->disconnect_bssid, connect.bssid, ETH_ALEN); else - memset(dev->ieee80211_ptr->disconnect_bssid, - 0, ETH_ALEN); + eth_zero_addr(dev->ieee80211_ptr->disconnect_bssid); } wdev_unlock(dev->ieee80211_ptr);