summaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2020-08-01 11:15:49 +0200
committerJohannes Berg <johannes.berg@intel.com>2020-08-03 10:56:22 +0200
commit3b1648f10961ce41bb709dfcadfdb9836c9a8ab8 (patch)
tree11e053a58e13d567cd9e719bcb180adf86e8d1c8 /net/wireless/nl80211.c
parentmac80211: use eth_zero_addr() to clear mac address (diff)
downloadlinux-3b1648f10961ce41bb709dfcadfdb9836c9a8ab8.tar.xz
linux-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/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c3
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);