Skip to content

Commit

Permalink
nl80211: use eth_zero_addr() to clear mac address
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Miaohe Lin authored and Johannes Berg committed Aug 3, 2020
1 parent 47d76e3 commit 3b1648f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/wireless/nl80211.c
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 3b1648f

Please sign in to comment.