From 39c3318c674944cd5637913fbdb971456ed3fd20 Mon Sep 17 00:00:00 2001 From: Sergio Paracuellos Date: Tue, 24 Apr 2018 15:50:03 +0200 Subject: [PATCH] staging: ks7010: use ether_addr_copy in hostif_mib_get_confirm This commit improves readability changing custom ethernet addresses copies in favour of using ether_addr_copy() function. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ks7010/ks_hostif.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index b92211f..fac7f8e 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -484,16 +484,9 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv) switch (mib_attribute) { case DOT11_MAC_ADDRESS: hostif_sme_enqueue(priv, SME_GET_MAC_ADDRESS); - memcpy(priv->eth_addr, priv->rxp, ETH_ALEN); + ether_addr_copy(priv->eth_addr, priv->rxp); priv->mac_address_valid = true; - dev->dev_addr[0] = priv->eth_addr[0]; - 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; + ether_addr_copy(dev->dev_addr, priv->eth_addr); netdev_info(dev, "MAC ADDRESS = %pM\n", priv->eth_addr); break; case DOT11_PRODUCT_VERSION: -- 2.7.4