[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1596273349-24333-1-git-send-email-linmiaohe@huawei.com>
Date: Sat, 1 Aug 2020 17:15:49 +0800
From: linmiaohe <linmiaohe@...wei.com>
To: <johannes@...solutions.net>, <davem@...emloft.net>,
<kuba@...nel.org>
CC: <linux-wireless@...r.kernel.org>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linmiaohe@...wei.com>
Subject: [PATCH] nl80211: use eth_zero_addr() to clear mac address
From: Miaohe Lin <linmiaohe@...wei.com>
Use eth_zero_addr() to clear mac address instead of memset().
Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
---
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);
--
2.19.1
Powered by blists - more mailing lists