From: Michael Straube Date: Mon, 30 Aug 2021 12:15:06 +0000 (+0200) Subject: staging: r8188eu: use ether_addr_copy() in rtw_macaddr_cfg() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=98119aa4c75e94ac23c7f0f2a8f5b8904ad28b6a;p=linux.git staging: r8188eu: use ether_addr_copy() in rtw_macaddr_cfg() Use ether_addr_copy() in rtw_macaddr_cfg() to copy the mac address. The buffers are properly aligned. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20210830121508.6411-7-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/r8188eu/core/rtw_ieee80211.c b/drivers/staging/r8188eu/core/rtw_ieee80211.c index 370a710ab7cb3..c37358be631f9 100644 --- a/drivers/staging/r8188eu/core/rtw_ieee80211.c +++ b/drivers/staging/r8188eu/core/rtw_ieee80211.c @@ -1026,10 +1026,10 @@ void rtw_macaddr_cfg(u8 *mac_addr) if (rtw_initmac && mac_pton(rtw_initmac, mac)) { /* Users specify the mac address */ - memcpy(mac_addr, mac, ETH_ALEN); + ether_addr_copy(mac_addr, mac); } else { /* Use the mac address stored in the Efuse */ - memcpy(mac, mac_addr, ETH_ALEN); + ether_addr_copy(mac, mac_addr); } if (is_broadcast_ether_addr(mac) || is_zero_ether_addr(mac)) {