From cda34a0b3cb3d246c10e0406131250e5991209dc Mon Sep 17 00:00:00 2001 From: Ana Rey Date: Mon, 17 Mar 2014 21:22:28 +0100 Subject: [PATCH] staging: rtl8187se: Use ether_addr_copy function Use ether_addr_copy instead of memcpy function for fast copy an Ethernet address in ieee80211/ieee80211_wx.c Fixes sparse warnings: WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) Signed-off-by: Ana Rey Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c index 5165379..0ac82d3 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "ieee80211.h" static const char *ieee80211_modes[] = { @@ -53,7 +54,7 @@ static inline char *rtl818x_translate_scan(struct ieee80211_device *ieee, /* First entry *MUST* be the AP MAC address */ iwe.cmd = SIOCGIWAP; iwe.u.ap_addr.sa_family = ARPHRD_ETHER; - memcpy(iwe.u.ap_addr.sa_data, network->bssid, ETH_ALEN); + ether_addr_copy(iwe.u.ap_addr.sa_data, network->bssid); start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_ADDR_LEN); /* Remaining entries will be displayed in the order we provide them */ -- 2.7.4