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>
This commit is contained in:
Miaohe Lin 2020-08-01 17:15:49 +08:00 committed by Johannes Berg
parent 47d76e3190
commit 3b1648f109
1 changed files with 1 additions and 2 deletions

View File

@ -10400,8 +10400,7 @@ static int nl80211_connect(struct sk_buff *skb, struct genl_info *info)
memcpy(dev->ieee80211_ptr->disconnect_bssid, memcpy(dev->ieee80211_ptr->disconnect_bssid,
connect.bssid, ETH_ALEN); connect.bssid, ETH_ALEN);
else else
memset(dev->ieee80211_ptr->disconnect_bssid, eth_zero_addr(dev->ieee80211_ptr->disconnect_bssid);
0, ETH_ALEN);
} }
wdev_unlock(dev->ieee80211_ptr); wdev_unlock(dev->ieee80211_ptr);