From: Sergio Paracuellos Date: Fri, 4 May 2018 04:16:30 +0000 (+0200) Subject: staging: ks7010: use ether_addr_copy to copy ethernet address sa_data X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6663f11bd4d8dba3bc058ab49848885600cce5b6;p=openwrt%2Fstaging%2Fblogic.git staging: ks7010: use ether_addr_copy to copy ethernet address sa_data Use ether_addr_copy kernel function to copy an ethernet address instead of a simple memcpy with ETH_ALEN size. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 8cd3dac4fcd3..00d631828436 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -151,8 +151,7 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info *ap_info) wrqu.data.flags = 0; wrqu.ap_addr.sa_family = ARPHRD_ETHER; if (is_connect_status(priv->connect_status)) { - memcpy(wrqu.ap_addr.sa_data, - priv->current_ap.bssid, ETH_ALEN); + ether_addr_copy(wrqu.ap_addr.sa_data, priv->current_ap.bssid); netdev_dbg(priv->net_dev, "IWEVENT: connect bssid=%pM\n", wrqu.ap_addr.sa_data); wireless_send_event(netdev, SIOCGIWAP, &wrqu, NULL);