From b8cbbc1261bed209e4ecbf5ba5fa0f4f684c7ad0 Mon Sep 17 00:00:00 2001 From: Sergio Paracuellos Date: Wed, 25 Apr 2018 16:01:47 +0200 Subject: [PATCH] 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 --- drivers/staging/ks7010/ks_wlan_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: