From: Sergio Paracuellos Date: Wed, 25 Apr 2018 14:01:47 +0000 (+0200) Subject: staging: ks7010: use ether_addr_copy in ks_wlan_set_encode_ext X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b8cbbc1261bed209e4ecbf5ba5fa0f4f684c7ad0;p=openwrt%2Fstaging%2Fblogic.git staging: ks7010: use ether_addr_copy in ks_wlan_set_encode_ext Instead of manually memcpy ethernet addresses use ether_addr_copy function for this purpose. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c index f3e83f9aa283..8f4da53d3c43 100644 --- a/drivers/staging/ks7010/ks_wlan_net.c +++ b/drivers/staging/ks7010/ks_wlan_net.c @@ -1594,7 +1594,7 @@ static int ks_wlan_set_encode_ext(struct net_device *dev, memcpy(&key->rx_seq[0], &enc->rx_seq[0], IW_ENCODE_SEQ_MAX_SIZE); } - memcpy(&key->addr.sa_data[0], &enc->addr.sa_data[0], ETH_ALEN); + ether_addr_copy(&key->addr.sa_data[0], &enc->addr.sa_data[0]); switch (enc->alg) { case IW_ENCODE_ALG_NONE: