|
@@ -232,9 +232,9 @@ static void ConstructBeacon(struct adapter *adapt, u8 *pframe, u32 *pLength)
|
|
|
fctrl = &pwlanhdr->frame_control;
|
|
|
*(fctrl) = 0;
|
|
|
|
|
|
- memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN);
|
|
|
- memcpy(pwlanhdr->addr2, myid(&(adapt->eeprompriv)), ETH_ALEN);
|
|
|
- memcpy(pwlanhdr->addr3, cur_network->MacAddress, ETH_ALEN);
|
|
|
+ ether_addr_copy(pwlanhdr->addr1, bc_addr);
|
|
|
+ ether_addr_copy(pwlanhdr->addr2, myid(&(adapt->eeprompriv)));
|
|
|
+ ether_addr_copy(pwlanhdr->addr3, cur_network->MacAddress);
|
|
|
|
|
|
SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/);
|
|
|
SetFrameSubType(pframe, WIFI_BEACON);
|
|
@@ -322,10 +322,10 @@ static void ConstructPSPoll(struct adapter *adapt, u8 *pframe, u32 *pLength)
|
|
|
SetDuration(pframe, (pmlmeinfo->aid | 0xc000));
|
|
|
|
|
|
/* BSSID. */
|
|
|
- memcpy(pwlanhdr->addr1, pnetwork->MacAddress, ETH_ALEN);
|
|
|
+ ether_addr_copy(pwlanhdr->addr1, pnetwork->MacAddress);
|
|
|
|
|
|
/* TA. */
|
|
|
- memcpy(pwlanhdr->addr2, myid(&(adapt->eeprompriv)), ETH_ALEN);
|
|
|
+ ether_addr_copy(pwlanhdr->addr2, myid(&(adapt->eeprompriv)));
|
|
|
|
|
|
*pLength = 16;
|
|
|
}
|
|
@@ -357,21 +357,21 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe,
|
|
|
switch (cur_network->network.InfrastructureMode) {
|
|
|
case Ndis802_11Infrastructure:
|
|
|
SetToDs(fctrl);
|
|
|
- memcpy(pwlanhdr->addr1, pnetwork->MacAddress, ETH_ALEN);
|
|
|
- memcpy(pwlanhdr->addr2, myid(&(adapt->eeprompriv)), ETH_ALEN);
|
|
|
- memcpy(pwlanhdr->addr3, StaAddr, ETH_ALEN);
|
|
|
+ ether_addr_copy(pwlanhdr->addr1, pnetwork->MacAddress);
|
|
|
+ ether_addr_copy(pwlanhdr->addr2, myid(&(adapt->eeprompriv)));
|
|
|
+ ether_addr_copy(pwlanhdr->addr3, StaAddr);
|
|
|
break;
|
|
|
case Ndis802_11APMode:
|
|
|
SetFrDs(fctrl);
|
|
|
- memcpy(pwlanhdr->addr1, StaAddr, ETH_ALEN);
|
|
|
- memcpy(pwlanhdr->addr2, pnetwork->MacAddress, ETH_ALEN);
|
|
|
- memcpy(pwlanhdr->addr3, myid(&(adapt->eeprompriv)), ETH_ALEN);
|
|
|
+ ether_addr_copy(pwlanhdr->addr1, StaAddr);
|
|
|
+ ether_addr_copy(pwlanhdr->addr2, pnetwork->MacAddress);
|
|
|
+ ether_addr_copy(pwlanhdr->addr3, myid(&(adapt->eeprompriv)));
|
|
|
break;
|
|
|
case Ndis802_11IBSS:
|
|
|
default:
|
|
|
- memcpy(pwlanhdr->addr1, StaAddr, ETH_ALEN);
|
|
|
- memcpy(pwlanhdr->addr2, myid(&(adapt->eeprompriv)), ETH_ALEN);
|
|
|
- memcpy(pwlanhdr->addr3, pnetwork->MacAddress, ETH_ALEN);
|
|
|
+ ether_addr_copy(pwlanhdr->addr1, StaAddr);
|
|
|
+ ether_addr_copy(pwlanhdr->addr2, myid(&(adapt->eeprompriv)));
|
|
|
+ ether_addr_copy(pwlanhdr->addr3, pnetwork->MacAddress);
|
|
|
break;
|
|
|
}
|
|
|
|
|
@@ -413,9 +413,9 @@ static void ConstructProbeRsp(struct adapter *adapt, u8 *pframe, u32 *pLength, u
|
|
|
|
|
|
fctrl = &pwlanhdr->frame_control;
|
|
|
*(fctrl) = 0;
|
|
|
- memcpy(pwlanhdr->addr1, StaAddr, ETH_ALEN);
|
|
|
- memcpy(pwlanhdr->addr2, mac, ETH_ALEN);
|
|
|
- memcpy(pwlanhdr->addr3, bssid, ETH_ALEN);
|
|
|
+ ether_addr_copy(pwlanhdr->addr1, StaAddr);
|
|
|
+ ether_addr_copy(pwlanhdr->addr2, mac);
|
|
|
+ ether_addr_copy(pwlanhdr->addr3, bssid);
|
|
|
|
|
|
SetSeqNum(pwlanhdr, 0);
|
|
|
SetFrameSubType(fctrl, WIFI_PROBERSP);
|