staging: rtl8723au: rtw_xmit.c: Use ether_addr_copy()
authorJes Sorensen <Jes.Sorensen@redhat.com>
Sun, 25 May 2014 20:43:03 +0000 (22:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 May 2014 22:14:38 +0000 (15:14 -0700)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_xmit.c

index 0c66d35416658aaba8e63ed9066cf10b581491fb..90604941624cc15b0152a8a061436253e1c27b7e 100644 (file)
@@ -902,9 +902,9 @@ static int rtw_make_wlanhdr(struct rtw_adapter *padapter, u8 *hdr,
                        /* Data transfer to AP */
                        pwlanhdr->frame_control |=
                                cpu_to_le16(IEEE80211_FCTL_TODS);
-                       memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN);
-                       memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
-                       memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN);
+                       ether_addr_copy(pwlanhdr->addr1, get_bssid(pmlmepriv));
+                       ether_addr_copy(pwlanhdr->addr2, pattrib->src);
+                       ether_addr_copy(pwlanhdr->addr3, pattrib->dst);
 
                        if (pmlmepriv->qos_option)
                                qos_option = true;
@@ -914,18 +914,18 @@ static int rtw_make_wlanhdr(struct rtw_adapter *padapter, u8 *hdr,
                        /* to_ds = 0, fr_ds = 1; */
                        pwlanhdr->frame_control |=
                                cpu_to_le16(IEEE80211_FCTL_FROMDS);
-                       memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
-                       memcpy(pwlanhdr->addr2, get_bssid(pmlmepriv), ETH_ALEN);
-                       memcpy(pwlanhdr->addr3, pattrib->src, ETH_ALEN);
+                       ether_addr_copy(pwlanhdr->addr1, pattrib->dst);
+                       ether_addr_copy(pwlanhdr->addr2, get_bssid(pmlmepriv));
+                       ether_addr_copy(pwlanhdr->addr3, pattrib->src);
 
                        if (psta->qos_option)
                                qos_option = true;
                }
                else if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) ||
                (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) {
-                       memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
-                       memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
-                       memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN);
+                       ether_addr_copy(pwlanhdr->addr1, pattrib->dst);
+                       ether_addr_copy(pwlanhdr->addr2, pattrib->src);
+                       ether_addr_copy(pwlanhdr->addr3, get_bssid(pmlmepriv));
 
                        if (psta->qos_option)
                                qos_option = true;