summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEbru Akagunduz <ebru.akagunduz@gmail.com>2014-10-03 13:08:21 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-20 10:29:12 +0800
commit6d36fe3edc99165c8d1be60445b807a613d2c918 (patch)
treeecbc3c9cb8c016cec9ad43fa6ff049e4bba28d8e
parentf9800f82b6c403d4ba595383859030360b67dae0 (diff)
staging: rtl8188eu: Fix prefer ether_addr_copy() over memcpy()
This patch fixes "Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)" in rtw_ap.c Pahole showed that the addresses are aligned. Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/rtl8188eu/core/rtw_ap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c
index 9224e029ef2b..7de7ba197be1 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ap.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ap.c
@@ -888,7 +888,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
pbss_network->Rssi = 0;
- memcpy(pbss_network->MacAddress, myid(&(padapter->eeprompriv)), ETH_ALEN);
+ ether_addr_copy(pbss_network->MacAddress, myid(&(padapter->eeprompriv)));
/* beacon interval */
p = rtw_get_beacon_interval_from_ie(ie);/* 8: TimeStamp, 2: Beacon Interval 2:Capability */
@@ -1164,7 +1164,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
if (!paclnode->valid) {
INIT_LIST_HEAD(&paclnode->list);
- memcpy(paclnode->addr, addr, ETH_ALEN);
+ ether_addr_copy(paclnode->addr, addr);
paclnode->valid = true;