summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/htt_rx.c
diff options
context:
space:
mode:
authorKalle Valo <kvalo@qca.qualcomm.com>2014-09-14 12:50:49 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2014-09-18 10:47:03 +0300
commitb25f32cb02155d68c690255ba846796a1c248fd3 (patch)
tree67bfbd65920ced68f7e8ea96749587bfee55294b /drivers/net/wireless/ath/ath10k/htt_rx.c
parent75cb96d3eb6d1eb16e48931e987c1a7770b4758e (diff)
downloadop-kernel-dev-b25f32cb02155d68c690255ba846796a1c248fd3.zip
op-kernel-dev-b25f32cb02155d68c690255ba846796a1c248fd3.tar.gz
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 <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/htt_rx.c')
-rw-r--r--drivers/net/wireless/ath/ath10k/htt_rx.c8
1 files changed, 4 insertions, 4 deletions
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
OpenPOWER on IntegriCloud