staging: ks7010: use ether_addr_copy in ks_wlan_set_encode_ext
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Wed, 25 Apr 2018 14:01:47 +0000 (16:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Apr 2018 07:35:04 +0000 (09:35 +0200)
Instead of manually memcpy ethernet addresses use ether_addr_copy
function for this purpose.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_wlan_net.c

index f3e83f9aa28300aaac0a38745be098a0e24dd199..8f4da53d3c432bffbea6cd8861314756b326ad7d 100644 (file)
@@ -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: