ath10k: prefer ether_addr_copy() over memcpy()
authorKalle Valo <kvalo@qca.qualcomm.com>
Wed, 13 Apr 2016 11:14:02 +0000 (14:14 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 14 Apr 2016 14:30:55 +0000 (17:30 +0300)
Fixes checkpatch warning:

drivers/net/wireless/ath/ath10k/wmi.c:5800: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/wmi.c

index d64e8681898d39ef74bd9de7d08499f979ae9818..7eb40f54fdb553cfa558e0cf5e66d3a2f56077f6 100644 (file)
@@ -5827,9 +5827,8 @@ ath10k_wmi_put_start_scan_tlvs(struct wmi_start_scan_tlvs *tlvs,
                bssids->num_bssid = __cpu_to_le32(arg->n_bssids);
 
                for (i = 0; i < arg->n_bssids; i++)
-                       memcpy(&bssids->bssid_list[i],
-                              arg->bssids[i].bssid,
-                              ETH_ALEN);
+                       ether_addr_copy(bssids->bssid_list[i].addr,
+                                       arg->bssids[i].bssid);
 
                ptr += sizeof(*bssids);
                ptr += sizeof(struct wmi_mac_addr) * arg->n_bssids;