Commit 3ec51bb2 authored by Sergio Paracuellos's avatar Sergio Paracuellos Committed by Greg Kroah-Hartman

staging: ks7010: use ether_addr_copy in ks_wlan_set_mac_address

Use ether_addr_copy to copy ethernet address instad of using
memcpy in ks_wlan_set_mac_address function.
Signed-off-by: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d87e9626
...@@ -2500,7 +2500,7 @@ int ks_wlan_set_mac_address(struct net_device *dev, void *addr) ...@@ -2500,7 +2500,7 @@ int ks_wlan_set_mac_address(struct net_device *dev, void *addr)
if (netif_running(dev)) if (netif_running(dev))
return -EBUSY; return -EBUSY;
memcpy(dev->dev_addr, mac_addr->sa_data, dev->addr_len); 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; priv->mac_address_valid = false;
hostif_sme_enqueue(priv, SME_MACADDRESS_SET_REQUEST); hostif_sme_enqueue(priv, SME_MACADDRESS_SET_REQUEST);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment