staging: ks7010: use ether_addr_copy in ks_wlan_get_wap
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Wed, 25 Apr 2018 14:01:50 +0000 (16:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Apr 2018 07:35:04 +0000 (09:35 +0200)
Use ether_addr_copy to copy ethernet addresses instead
of a custom memcpy. This improves readability.

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 f23838e..45f850a 100644 (file)
@@ -346,7 +346,7 @@ static int ks_wlan_get_wap(struct net_device *dev, struct iw_request_info *info,
 
        /* for SLEEP MODE */
        if (is_connect_status(priv->connect_status))
-               memcpy(awrq->ap_addr.sa_data, priv->current_ap.bssid, ETH_ALEN);
+               ether_addr_copy(awrq->ap_addr.sa_data, priv->current_ap.bssid);
        else
                eth_zero_addr(awrq->ap_addr.sa_data);