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

staging: ks7010: use ether_addr_copy() instead of custom copy

In order to achieve ethernet address copies, ether_addr_copy()
function exists. So just use it and avoid the byte by byte copy.
This increase readability.
Signed-off-by: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f4455942
...@@ -2686,14 +2686,7 @@ int ks_wlan_net_start(struct net_device *dev) ...@@ -2686,14 +2686,7 @@ int ks_wlan_net_start(struct net_device *dev)
/* dummy address set */ /* dummy address set */
memcpy(priv->eth_addr, dummy_addr, ETH_ALEN); memcpy(priv->eth_addr, dummy_addr, ETH_ALEN);
dev->dev_addr[0] = priv->eth_addr[0]; ether_addr_copy(dev->dev_addr, priv->eth_addr);
dev->dev_addr[1] = priv->eth_addr[1];
dev->dev_addr[2] = priv->eth_addr[2];
dev->dev_addr[3] = priv->eth_addr[3];
dev->dev_addr[4] = priv->eth_addr[4];
dev->dev_addr[5] = priv->eth_addr[5];
dev->dev_addr[6] = 0x00;
dev->dev_addr[7] = 0x00;
/* The ks_wlan-specific entries in the device structure. */ /* The ks_wlan-specific entries in the device structure. */
dev->netdev_ops = &ks_wlan_netdev_ops; dev->netdev_ops = &ks_wlan_netdev_ops;
......
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