|
7 | 7 |
|
8 | 8 | #include <drv_types.h> |
9 | 9 | #include <rtl8723b_hal.h> |
| 10 | +#include <linux/etherdevice.h> |
10 | 11 | #include "hal_com_h2c.h" |
11 | 12 |
|
12 | 13 | #define MAX_H2C_BOX_NUMS 4 |
@@ -117,8 +118,8 @@ static void ConstructBeacon(struct adapter *padapter, u8 *pframe, u32 *pLength) |
117 | 118 | *(fctrl) = 0; |
118 | 119 |
|
119 | 120 | eth_broadcast_addr(pwlanhdr->addr1); |
120 | | - memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); |
121 | | - memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN); |
| 121 | + ether_addr_copy(pwlanhdr->addr2, myid(&(padapter->eeprompriv))); |
| 122 | + ether_addr_copy(pwlanhdr->addr3, get_my_bssid(cur_network)); |
122 | 123 |
|
123 | 124 | SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/); |
124 | 125 | /* pmlmeext->mgnt_seq++; */ |
@@ -209,10 +210,10 @@ static void ConstructPSPoll(struct adapter *padapter, u8 *pframe, u32 *pLength) |
209 | 210 | SetDuration(pframe, (pmlmeinfo->aid | 0xc000)); |
210 | 211 |
|
211 | 212 | /* BSSID. */ |
212 | | - memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); |
| 213 | + ether_addr_copy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network))); |
213 | 214 |
|
214 | 215 | /* TA. */ |
215 | | - memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); |
| 216 | + ether_addr_copy(pwlanhdr->addr2, myid(&(padapter->eeprompriv))); |
216 | 217 |
|
217 | 218 | *pLength = 16; |
218 | 219 | } |
@@ -246,21 +247,21 @@ static void ConstructNullFunctionData( |
246 | 247 | switch (cur_network->network.infrastructure_mode) { |
247 | 248 | case Ndis802_11Infrastructure: |
248 | 249 | SetToDs(fctrl); |
249 | | - memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); |
250 | | - memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); |
251 | | - memcpy(pwlanhdr->addr3, StaAddr, ETH_ALEN); |
| 250 | + ether_addr_copy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network))); |
| 251 | + ether_addr_copy(pwlanhdr->addr2, myid(&(padapter->eeprompriv))); |
| 252 | + ether_addr_copy(pwlanhdr->addr3, StaAddr); |
252 | 253 | break; |
253 | 254 | case Ndis802_11APMode: |
254 | 255 | SetFrDs(fctrl); |
255 | | - memcpy(pwlanhdr->addr1, StaAddr, ETH_ALEN); |
256 | | - memcpy(pwlanhdr->addr2, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); |
257 | | - memcpy(pwlanhdr->addr3, myid(&(padapter->eeprompriv)), ETH_ALEN); |
| 256 | + ether_addr_copy(pwlanhdr->addr1, StaAddr); |
| 257 | + ether_addr_copy(pwlanhdr->addr2, get_my_bssid(&(pmlmeinfo->network))); |
| 258 | + ether_addr_copy(pwlanhdr->addr3, myid(&(padapter->eeprompriv))); |
258 | 259 | break; |
259 | 260 | case Ndis802_11IBSS: |
260 | 261 | default: |
261 | | - memcpy(pwlanhdr->addr1, StaAddr, ETH_ALEN); |
262 | | - memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); |
263 | | - memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); |
| 262 | + ether_addr_copy(pwlanhdr->addr1, StaAddr); |
| 263 | + ether_addr_copy(pwlanhdr->addr2, myid(&(padapter->eeprompriv))); |
| 264 | + ether_addr_copy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network))); |
264 | 265 | break; |
265 | 266 | } |
266 | 267 |
|
@@ -765,9 +766,9 @@ static void ConstructBtNullFunctionData( |
765 | 766 | SetPwrMgt(fctrl); |
766 | 767 |
|
767 | 768 | SetFrDs(fctrl); |
768 | | - memcpy(pwlanhdr->addr1, StaAddr, ETH_ALEN); |
769 | | - memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN); |
770 | | - memcpy(pwlanhdr->addr3, myid(&padapter->eeprompriv), ETH_ALEN); |
| 769 | + ether_addr_copy(pwlanhdr->addr1, StaAddr); |
| 770 | + ether_addr_copy(pwlanhdr->addr2, myid(&padapter->eeprompriv)); |
| 771 | + ether_addr_copy(pwlanhdr->addr3, myid(&padapter->eeprompriv)); |
771 | 772 |
|
772 | 773 | SetDuration(pwlanhdr, 0); |
773 | 774 | SetSeqNum(pwlanhdr, 0); |
|
0 commit comments