diff options
author | Miaohe Lin <linmiaohe@huawei.com> | 2020-08-01 17:15:49 +0800 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2020-08-03 10:56:22 +0200 |
commit | 3b1648f10961ce41bb709dfcadfdb9836c9a8ab8 (patch) | |
tree | 11e053a58e13d567cd9e719bcb180adf86e8d1c8 /net | |
parent | 47d76e31908d8fdb06c6c75e4f3c4d4a08c9c850 (diff) | |
download | lwn-3b1648f10961ce41bb709dfcadfdb9836c9a8ab8.tar.gz lwn-3b1648f10961ce41bb709dfcadfdb9836c9a8ab8.zip |
nl80211: use eth_zero_addr() to clear mac address
Use eth_zero_addr() to clear mac address instead of memset().
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Link: https://lore.kernel.org/r/1596273349-24333-1-git-send-email-linmiaohe@huawei.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/wireless/nl80211.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 5c57ac2ee75b..814e23d3ce7c 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -10400,8 +10400,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); |