summaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2020-08-01 12:12:38 +0300
committerJohannes Berg <johannes.berg@intel.com>2020-08-03 11:56:04 +0300
commit47d76e31908d8fdb06c6c75e4f3c4d4a08c9c850 (patch)
tree16aee187fbef3ae4bac2368b3dd1d0d735507ff1 /net/mac80211
parent6628d00116b37bd5ef44cc69f5a8df6b0d4e14b7 (diff)
downloadlinux-47d76e31908d8fdb06c6c75e4f3c4d4a08c9c850.tar.xz
mac80211: 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/1596273158-24183-1-git-send-email-linmiaohe@huawei.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/trace.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
index 1b4709694d2a..50ab5b9d8eab 100644
--- a/net/mac80211/trace.h
+++ b/net/mac80211/trace.h
@@ -22,7 +22,8 @@
#define LOCAL_PR_ARG __entry->wiphy_name
#define STA_ENTRY __array(char, sta_addr, ETH_ALEN)
-#define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN))
+#define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : \
+ eth_zero_addr(__entry->sta_addr))
#define STA_NAMED_ASSIGN(s) memcpy(__entry->sta_addr, (s)->addr, ETH_ALEN)
#define STA_PR_FMT " sta:%pM"
#define STA_PR_ARG __entry->sta_addr