staging: ks7010: use ether_addr_copy in ks_wlan_set_mac_address
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Fri, 4 May 2018 04:16:39 +0000 (06:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 May 2018 01:58:40 +0000 (18:58 -0700)
Use ether_addr_copy to copy ethernet address instad of using
memcpy in ks_wlan_set_mac_address function.

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 8b4a1ed..bb8ec04 100644 (file)
@@ -2500,7 +2500,7 @@ int ks_wlan_set_mac_address(struct net_device *dev, void *addr)
        if (netif_running(dev))
                return -EBUSY;
        memcpy(dev->dev_addr, mac_addr->sa_data, dev->addr_len);
-       memcpy(priv->eth_addr, mac_addr->sa_data, ETH_ALEN);
+       ether_addr_copy(priv->eth_addr, mac_addr->sa_data);
 
        priv->mac_address_valid = false;
        hostif_sme_enqueue(priv, SME_MACADDRESS_SET_REQUEST);