From b25f32cb02155d68c690255ba846796a1c248fd3 Mon Sep 17 00:00:00 2001 From: Kalle Valo Date: Sun, 14 Sep 2014 12:50:49 +0300 Subject: ath10k: use ether_addr_copy() As suggeested by checkpatch: WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) In wmi.c I had to change due to sparse warnings copying of struct wmi_mac_addr from form &cmd->peer_macaddr.addr to cmd->peer_macaddr.addr. In ath10k_wmi_set_ap_ps_param() I also added the missing ".addr" to the copy command. Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/htt_rx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/net/wireless/ath/ath10k/htt_rx.c') diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index 92b56e4..60d40a0 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -954,8 +954,8 @@ static void ath10k_htt_rx_amsdu(struct ath10k_htt *htt, /* pull decapped header and copy SA & DA */ hdr = (struct ieee80211_hdr *)skb->data; hdr_len = ath10k_htt_rx_nwifi_hdrlen(hdr); - memcpy(da, ieee80211_get_DA(hdr), ETH_ALEN); - memcpy(sa, ieee80211_get_SA(hdr), ETH_ALEN); + ether_addr_copy(da, ieee80211_get_DA(hdr)); + ether_addr_copy(sa, ieee80211_get_SA(hdr)); skb_pull(skb, hdr_len); /* push original 802.11 header */ @@ -972,8 +972,8 @@ static void ath10k_htt_rx_amsdu(struct ath10k_htt *htt, /* original 802.11 header has a different DA and in * case of 4addr it may also have different SA */ - memcpy(ieee80211_get_DA(hdr), da, ETH_ALEN); - memcpy(ieee80211_get_SA(hdr), sa, ETH_ALEN); + ether_addr_copy(ieee80211_get_DA(hdr), da); + ether_addr_copy(ieee80211_get_SA(hdr), sa); break; case RX_MSDU_DECAP_ETHERNET2_DIX: /* strip ethernet header and insert decapped 802.11 -- cgit v1.1