Replace _rtw_memcpy with memcpy

This commit is contained in:
Carlos Garces 2021-10-12 16:53:20 +02:00
parent cd6cb41e0f
commit 71d5c54af2
58 changed files with 1564 additions and 1583 deletions

View File

@ -984,7 +984,7 @@ u8 rtw_efuse_access(PADAPTER adapter, u8 write, u16 addr, u16 cnts, u8 *data)
return _FAIL; return _FAIL;
} }
_rtw_memcpy(data, efuse + addr, cnts); memcpy(data, efuse + addr, cnts);
rtw_mfree(efuse, size); rtw_mfree(efuse, size);
} else { } else {
err = rtw_halmac_read_physical_efuse(d, addr, cnts, data); err = rtw_halmac_read_physical_efuse(d, addr, cnts, data);
@ -1044,7 +1044,7 @@ u8 rtw_efuse_bt_access(PADAPTER adapter, u8 write, u16 addr, u16 cnts, u8 *data)
} }
dump_buf(efuse + addr, cnts); dump_buf(efuse + addr, cnts);
_rtw_memcpy(data, efuse + addr, cnts); memcpy(data, efuse + addr, cnts);
RTW_INFO("%s: rtw_halmac_read_bt_physical_efuse_map ok! data 0x%x\n", __FUNCTION__, *data); RTW_INFO("%s: rtw_halmac_read_bt_physical_efuse_map ok! data 0x%x\n", __FUNCTION__, *data);
rtw_mfree(efuse, size); rtw_mfree(efuse, size);
@ -1092,7 +1092,7 @@ u8 rtw_efuse_map_read(PADAPTER adapter, u16 addr, u16 cnts, u8 *data)
goto exit; goto exit;
} }
_rtw_memcpy(data, efuse + addr, cnts); memcpy(data, efuse + addr, cnts);
rtw_mfree(efuse, size); rtw_mfree(efuse, size);
} else { } else {
err = rtw_halmac_read_logical_efuse(d, addr, cnts, data); err = rtw_halmac_read_logical_efuse(d, addr, cnts, data);
@ -1146,14 +1146,14 @@ u8 rtw_efuse_map_write(PADAPTER adapter, u16 addr, u16 cnts, u8 *data)
goto exit; goto exit;
} }
_rtw_memcpy(efuse + addr, data, cnts); memcpy(efuse + addr, data, cnts);
if (adapter->registrypriv.boffefusemask == 0) { if (adapter->registrypriv.boffefusemask == 0) {
RTW_INFO("Use mask Array Len: %d\n", mask_len); RTW_INFO("Use mask Array Len: %d\n", mask_len);
if (mask_len != 0) { if (mask_len != 0) {
if (adapter->registrypriv.bFileMaskEfuse == _TRUE) if (adapter->registrypriv.bFileMaskEfuse == _TRUE)
_rtw_memcpy(mask_buf, maskfileBuffer, mask_len); memcpy(mask_buf, maskfileBuffer, mask_len);
else else
rtw_efuse_mask_array(adapter, mask_buf); rtw_efuse_mask_array(adapter, mask_buf);
@ -1243,7 +1243,7 @@ u8 rtw_BT_efuse_map_write(PADAPTER adapter, u16 addr, u16 cnts, u8 *data)
while (idx < cnts) { while (idx < cnts) {
word_en = 0xF; word_en = 0xF;
j = (addr + idx) & 0x7; j = (addr + idx) & 0x7;
_rtw_memcpy(newdata, &map[offset << 3], PGPKT_DATA_SIZE); memcpy(newdata, &map[offset << 3], PGPKT_DATA_SIZE);
for (i = j; i < PGPKT_DATA_SIZE && idx < cnts; i++, idx++) { for (i = j; i < PGPKT_DATA_SIZE && idx < cnts; i++, idx++) {
if (data[idx] != map[addr + idx]) { if (data[idx] != map[addr + idx]) {
word_en &= ~BIT(i >> 1); word_en &= ~BIT(i >> 1);
@ -2420,8 +2420,8 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
if (ret == _FAIL) if (ret == _FAIL)
goto exit; goto exit;
_rtw_memcpy(efuse , map, mapLen); memcpy(efuse , map, mapLen);
_rtw_memcpy(efuse + addr, data, cnts); memcpy(efuse + addr, data, cnts);
if (padapter->registrypriv.boffefusemask == 0) { if (padapter->registrypriv.boffefusemask == 0) {
for (i = 0; i < cnts; i++) { for (i = 0; i < cnts; i++) {
@ -2484,7 +2484,7 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
while (idx < cnts) { while (idx < cnts) {
word_en = 0xF; word_en = 0xF;
j = (addr + idx) & 0x7; j = (addr + idx) & 0x7;
_rtw_memcpy(newdata, &map[offset << 3], PGPKT_DATA_SIZE); memcpy(newdata, &map[offset << 3], PGPKT_DATA_SIZE);
for (i = j; i < PGPKT_DATA_SIZE && idx < cnts; i++, idx++) { for (i = j; i < PGPKT_DATA_SIZE && idx < cnts; i++, idx++) {
if (efuse[addr + idx] != map[addr + idx]) { if (efuse[addr + idx] != map[addr + idx]) {
word_en &= ~BIT(i >> 1); word_en &= ~BIT(i >> 1);
@ -2578,7 +2578,7 @@ u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
while (idx < cnts) { while (idx < cnts) {
word_en = 0xF; word_en = 0xF;
j = (addr + idx) & 0x7; j = (addr + idx) & 0x7;
_rtw_memcpy(newdata, &map[offset << 3], PGPKT_DATA_SIZE); memcpy(newdata, &map[offset << 3], PGPKT_DATA_SIZE);
for (i = j; i < PGPKT_DATA_SIZE && idx < cnts; i++, idx++) { for (i = j; i < PGPKT_DATA_SIZE && idx < cnts; i++, idx++) {
if (data[idx] != map[addr + idx]) { if (data[idx] != map[addr + idx]) {
word_en &= ~BIT(i >> 1); word_en &= ~BIT(i >> 1);
@ -3207,7 +3207,7 @@ u32 rtw_read_efuse_from_file(const char *path, u8 *buf, int map_size)
RTW_PRINT("efuse file:%s, 0x%03x byte content read\n", path, i); RTW_PRINT("efuse file:%s, 0x%03x byte content read\n", path, i);
_rtw_memcpy(buf, map, map_size); memcpy(buf, map, map_size);
ret = _SUCCESS; ret = _SUCCESS;
@ -3262,7 +3262,7 @@ u32 rtw_read_macaddr_from_file(const char *path, u8 *buf)
} }
} }
_rtw_memcpy(buf, addr, ETH_ALEN); memcpy(buf, addr, ETH_ALEN);
RTW_PRINT("wifi_mac file: %s\n", path); RTW_PRINT("wifi_mac file: %s\n", path);
#ifdef CONFIG_RTW_DEBUG #ifdef CONFIG_RTW_DEBUG

View File

@ -102,7 +102,7 @@ inline u8 *rtw_set_ie_mpm(u8 *buf, u32 *buf_len
} }
if (chosen_pmk) { if (chosen_pmk) {
_rtw_memcpy(pos, chosen_pmk, 16); memcpy(pos, chosen_pmk, 16);
pos += 16; pos += 16;
} }
@ -854,7 +854,7 @@ flush_add:
for (i = 0; i < flush_num; i++) { for (i = 0; i < flush_num; i++) {
sta = rtw_get_stainfo_by_offset(stapriv, flush_list[i]); sta = rtw_get_stainfo_by_offset(stapriv, flush_list[i]);
_rtw_memcpy(sta_addr, sta->cmn.mac_addr, ETH_ALEN); memcpy(sta_addr, sta->cmn.mac_addr, ETH_ALEN);
updated |= ap_free_sta(adapter, sta, _TRUE, WLAN_REASON_DEAUTH_LEAVING, _FALSE); updated |= ap_free_sta(adapter, sta, _TRUE, WLAN_REASON_DEAUTH_LEAVING, _FALSE);
rtw_mesh_expire_peer(adapter, sta_addr); rtw_mesh_expire_peer(adapter, sta_addr);
@ -1202,7 +1202,7 @@ static int rtw_mpm_ampe_dec(_adapter *adapter, struct mesh_plink_ent *plink
if (!iv_crypt) if (!iv_crypt)
goto exit; goto exit;
_rtw_memcpy(iv_crypt, mic_ie + 2, iv_crypt_len); memcpy(iv_crypt, mic_ie + 2, iv_crypt_len);
verify_ret = aes_siv_decrypt(plink->aek, iv_crypt, iv_crypt_len verify_ret = aes_siv_decrypt(plink->aek, iv_crypt, iv_crypt_len
, 3, aad, aad_len, ampe_buf); , 3, aad, aad_len, ampe_buf);
@ -1248,7 +1248,7 @@ static int rtw_mpm_ampe_enc(_adapter *adapter, struct mesh_plink_ent *plink
if (!ampe_ie) if (!ampe_ie)
goto exit; goto exit;
_rtw_memcpy(ampe_ie, ampe_buf, ampe_ie_len); memcpy(ampe_ie, ampe_buf, ampe_ie_len);
protect_ret = aes_siv_encrypt(plink->aek, ampe_ie, ampe_ie_len protect_ret = aes_siv_encrypt(plink->aek, ampe_ie, ampe_ie_len
, 3, aad, aad_len, mic_ie + 2); , 3, aad, aad_len, mic_ie + 2);
@ -1304,9 +1304,9 @@ static int rtw_mpm_tx_ies_sync_bss(_adapter *adapter, struct mesh_plink_ent *pli
goto exit; goto exit;
if (*(ampe_buf + 1) >= 68) { if (*(ampe_buf + 1) >= 68) {
_rtw_memcpy(plink->sel_pcs, ampe_buf + 2, 4); memcpy(plink->sel_pcs, ampe_buf + 2, 4);
_rtw_memcpy(plink->l_nonce, ampe_buf + 6, 32); memcpy(plink->l_nonce, ampe_buf + 6, 32);
_rtw_memcpy(plink->p_nonce, ampe_buf + 38, 32); memcpy(plink->p_nonce, ampe_buf + 38, 32);
} }
} }
#endif #endif
@ -1349,7 +1349,7 @@ static int rtw_mpm_tx_ies_sync_bss(_adapter *adapter, struct mesh_plink_ent *pli
} }
/* build new frame */ /* build new frame */
_rtw_memcpy(new_buf, fhead, sizeof(struct rtw_ieee80211_hdr_3addr) + tlv_ies_offset); memcpy(new_buf, fhead, sizeof(struct rtw_ieee80211_hdr_3addr) + tlv_ies_offset);
new_fhead = new_buf; new_fhead = new_buf;
new_flen = new_len; new_flen = new_len;
new_fbody = new_fhead + sizeof(struct rtw_ieee80211_hdr_3addr); new_fbody = new_fhead + sizeof(struct rtw_ieee80211_hdr_3addr);
@ -1666,7 +1666,7 @@ bypass_sync_bss:
RTW_INFO(FUNC_ADPT_FMT" sacrifice "MAC_FMT" for acnode\n" RTW_INFO(FUNC_ADPT_FMT" sacrifice "MAC_FMT" for acnode\n"
, FUNC_ADPT_ARG(adapter), MAC_ARG(sac->cmn.mac_addr)); , FUNC_ADPT_ARG(adapter), MAC_ARG(sac->cmn.mac_addr));
_rtw_memcpy(sta_addr, sac->cmn.mac_addr, ETH_ALEN); memcpy(sta_addr, sac->cmn.mac_addr, ETH_ALEN);
updated = ap_free_sta(adapter, sac, 0, 0, 1); updated = ap_free_sta(adapter, sac, 0, 0, 1);
rtw_mesh_expire_peer(stapriv->padapter, sta_addr); rtw_mesh_expire_peer(stapriv->padapter, sta_addr);
@ -1697,7 +1697,7 @@ bypass_sync_bss:
plink->plid = mpm_info.llid_v; plink->plid = mpm_info.llid_v;
plink->peer_aid = mpm_info.aid_v; plink->peer_aid = mpm_info.aid_v;
if (mpm_info.pid_v == 1) if (mpm_info.pid_v == 1)
_rtw_memcpy(plink->chosen_pmk, mpm_info.chosen_pmk, 16); memcpy(plink->chosen_pmk, mpm_info.chosen_pmk, 16);
} }
#ifdef CONFIG_RTW_MESH_DRIVER_AID #ifdef CONFIG_RTW_MESH_DRIVER_AID
else { else {
@ -1724,7 +1724,7 @@ bypass_sync_bss:
ies = rtw_zmalloc(ies_len); ies = rtw_zmalloc(ies_len);
if (ies) { if (ies) {
_rtw_memcpy(ies, fhead + sizeof(struct rtw_ieee80211_hdr_3addr) + 2, ies_len); memcpy(ies, fhead + sizeof(struct rtw_ieee80211_hdr_3addr) + 2, ies_len);
if (tx == _FALSE) { if (tx == _FALSE) {
plink->rx_conf_ies = ies; plink->rx_conf_ies = ies;
plink->rx_conf_ies_len = ies_len; plink->rx_conf_ies_len = ies_len;
@ -2094,7 +2094,7 @@ int _rtw_mesh_plink_add(_adapter *adapter, const u8 *hwaddr)
} }
if (exist == _FALSE && ent) { if (exist == _FALSE && ent) {
_rtw_memcpy(ent->addr, hwaddr, ETH_ALEN); memcpy(ent->addr, hwaddr, ETH_ALEN);
ent->valid = _TRUE; ent->valid = _TRUE;
#ifdef CONFIG_RTW_MESH_AEK #ifdef CONFIG_RTW_MESH_AEK
ent->aek_valid = 0; ent->aek_valid = 0;
@ -2163,7 +2163,7 @@ int rtw_mesh_plink_set_aek(_adapter *adapter, const u8 *hwaddr, const u8 *aek)
_enter_critical_bh(&(plink_ctl->lock), &irqL); _enter_critical_bh(&(plink_ctl->lock), &irqL);
ent = _rtw_mesh_plink_get(adapter, hwaddr); ent = _rtw_mesh_plink_get(adapter, hwaddr);
if (ent) { if (ent) {
_rtw_memcpy(ent->aek, aek, 32); memcpy(ent->aek, aek, 32);
ent->aek_valid = 1; ent->aek_valid = 1;
} }
_exit_critical_bh(&(plink_ctl->lock), &irqL); _exit_critical_bh(&(plink_ctl->lock), &irqL);
@ -2524,9 +2524,9 @@ static u8 *rtw_mesh_construct_peer_mesh_close(_adapter *adapter, struct mesh_pli
goto exit; goto exit;
whdr = (struct rtw_ieee80211_hdr *)frame; whdr = (struct rtw_ieee80211_hdr *)frame;
_rtw_memcpy(whdr->addr1, adapter_mac_addr(adapter), ETH_ALEN); memcpy(whdr->addr1, adapter_mac_addr(adapter), ETH_ALEN);
_rtw_memcpy(whdr->addr2, plink->addr, ETH_ALEN); memcpy(whdr->addr2, plink->addr, ETH_ALEN);
_rtw_memcpy(whdr->addr3, adapter_mac_addr(adapter), ETH_ALEN); memcpy(whdr->addr3, adapter_mac_addr(adapter), ETH_ALEN);
set_frame_sub_type(frame, WIFI_ACTION); set_frame_sub_type(frame, WIFI_ACTION);
@ -2553,9 +2553,9 @@ static u8 *rtw_mesh_construct_peer_mesh_close(_adapter *adapter, struct mesh_pli
ampe_buf[0] = WLAN_EID_AMPE; ampe_buf[0] = WLAN_EID_AMPE;
ampe_buf[1] = 68; ampe_buf[1] = 68;
_rtw_memcpy(ampe_buf + 2, plink->sel_pcs, 4); memcpy(ampe_buf + 2, plink->sel_pcs, 4);
_rtw_memcpy(ampe_buf + 6, plink->p_nonce, 32); memcpy(ampe_buf + 6, plink->p_nonce, 32);
_rtw_memcpy(ampe_buf + 38, plink->l_nonce, 32); memcpy(ampe_buf + 38, plink->l_nonce, 32);
enc_ret = rtw_mpm_ampe_enc(adapter, plink enc_ret = rtw_mpm_ampe_enc(adapter, plink
, frame + sizeof(struct rtw_ieee80211_hdr_3addr) , frame + sizeof(struct rtw_ieee80211_hdr_3addr)
@ -2942,7 +2942,7 @@ static int rtw_mrc_check(_adapter *adapter, const u8 *msa, u32 seq)
p->seqnum = seq; p->seqnum = seq;
p->exp_time = rtw_get_current_time() + rtw_ms_to_systime(RTW_MRC_TIMEOUT_MS); p->exp_time = rtw_get_current_time() + rtw_ms_to_systime(RTW_MRC_TIMEOUT_MS);
_rtw_memcpy(p->msa, msa, ETH_ALEN); memcpy(p->msa, msa, ETH_ALEN);
rtw_hlist_add_head(&p->list, &mrc->bucket[idx]); rtw_hlist_add_head(&p->list, &mrc->bucket[idx]);
return 0; return 0;
} }
@ -3224,7 +3224,7 @@ int rtw_mesh_nexthop_lookup(_adapter *adapter,
next_hop = rtw_rcu_dereference(mpath->next_hop); next_hop = rtw_rcu_dereference(mpath->next_hop);
if (next_hop) { if (next_hop) {
_rtw_memcpy(ra, next_hop->cmn.mac_addr, ETH_ALEN); memcpy(ra, next_hop->cmn.mac_addr, ETH_ALEN);
err = 0; err = 0;
} }
@ -3296,12 +3296,12 @@ static bool rtw_mesh_data_bmc_to_uc(_adapter *adapter
attrib->mb2u = 1; attrib->mb2u = 1;
attrib->mseq = *b2u_mseq; attrib->mseq = *b2u_mseq;
attrib->mfwd_ttl = ori_ta ? mfwd_ttl : 0; attrib->mfwd_ttl = ori_ta ? mfwd_ttl : 0;
_rtw_memcpy(attrib->ra, sta->cmn.mac_addr, ETH_ALEN); memcpy(attrib->ra, sta->cmn.mac_addr, ETH_ALEN);
_rtw_memcpy(attrib->ta, adapter_mac_addr(adapter), ETH_ALEN); memcpy(attrib->ta, adapter_mac_addr(adapter), ETH_ALEN);
_rtw_memcpy(attrib->mda, mda, ETH_ALEN); memcpy(attrib->mda, mda, ETH_ALEN);
_rtw_memcpy(attrib->msa, msa, ETH_ALEN); memcpy(attrib->msa, msa, ETH_ALEN);
_rtw_memcpy(attrib->dst, da, ETH_ALEN); memcpy(attrib->dst, da, ETH_ALEN);
_rtw_memcpy(attrib->src, sa, ETH_ALEN); memcpy(attrib->src, sa, ETH_ALEN);
attrib->mesh_frame_mode = ae_need ? MESH_UCAST_PX_DATA : MESH_UCAST_DATA; attrib->mesh_frame_mode = ae_need ? MESH_UCAST_PX_DATA : MESH_UCAST_DATA;
rtw_list_insert_tail(&b2uframe->list, b2u_list); rtw_list_insert_tail(&b2uframe->list, b2u_list);
@ -3402,18 +3402,18 @@ int rtw_mesh_addr_resolve(_adapter *adapter, struct xmit_frame *xframe, _pkt *pk
#endif #endif
attrib->mfwd_ttl = 0; attrib->mfwd_ttl = 0;
_rtw_memcpy(attrib->dst, etherhdr.h_dest, ETH_ALEN); memcpy(attrib->dst, etherhdr.h_dest, ETH_ALEN);
_rtw_memcpy(attrib->src, etherhdr.h_source, ETH_ALEN); memcpy(attrib->src, etherhdr.h_source, ETH_ALEN);
_rtw_memcpy(attrib->ta, adapter_mac_addr(adapter), ETH_ALEN); memcpy(attrib->ta, adapter_mac_addr(adapter), ETH_ALEN);
if (is_da_mcast) { if (is_da_mcast) {
attrib->mesh_frame_mode = ae_need ? MESH_BMCAST_PX_DATA : MESH_BMCAST_DATA; attrib->mesh_frame_mode = ae_need ? MESH_BMCAST_PX_DATA : MESH_BMCAST_DATA;
_rtw_memcpy(attrib->ra, attrib->dst, ETH_ALEN); memcpy(attrib->ra, attrib->dst, ETH_ALEN);
_rtw_memcpy(attrib->msa, adapter_mac_addr(adapter), ETH_ALEN); memcpy(attrib->msa, adapter_mac_addr(adapter), ETH_ALEN);
} else { } else {
attrib->mesh_frame_mode = ae_need ? MESH_UCAST_PX_DATA : MESH_UCAST_DATA; attrib->mesh_frame_mode = ae_need ? MESH_UCAST_PX_DATA : MESH_UCAST_DATA;
_rtw_memcpy(attrib->mda, (mppath && ae_need) ? mppath->mpp : attrib->dst, ETH_ALEN); memcpy(attrib->mda, (mppath && ae_need) ? mppath->mpp : attrib->dst, ETH_ALEN);
_rtw_memcpy(attrib->msa, adapter_mac_addr(adapter), ETH_ALEN); memcpy(attrib->msa, adapter_mac_addr(adapter), ETH_ALEN);
/* RA needs to be resolved */ /* RA needs to be resolved */
res = rtw_mesh_nexthop_resolve(adapter, xframe); res = rtw_mesh_nexthop_resolve(adapter, xframe);
} }
@ -3486,12 +3486,12 @@ void rtw_mesh_tx_build_mctrl(_adapter *adapter, struct pkt_attrib *attrib, u8 *b
break; break;
case MESH_UCAST_PX_DATA: case MESH_UCAST_PX_DATA:
mctrl->flags |= MESH_FLAGS_AE_A5_A6; mctrl->flags |= MESH_FLAGS_AE_A5_A6;
_rtw_memcpy(mctrl->eaddr1, attrib->dst, ETH_ALEN); memcpy(mctrl->eaddr1, attrib->dst, ETH_ALEN);
_rtw_memcpy(mctrl->eaddr2, attrib->src, ETH_ALEN); memcpy(mctrl->eaddr2, attrib->src, ETH_ALEN);
break; break;
case MESH_BMCAST_PX_DATA: case MESH_BMCAST_PX_DATA:
mctrl->flags |= MESH_FLAGS_AE_A4; mctrl->flags |= MESH_FLAGS_AE_A4;
_rtw_memcpy(mctrl->eaddr1, attrib->src, ETH_ALEN); memcpy(mctrl->eaddr1, attrib->src, ETH_ALEN);
break; break;
case MESH_MHOP_UCAST_ACT: case MESH_MHOP_UCAST_ACT:
/* TBD */ /* TBD */
@ -3512,17 +3512,17 @@ u8 rtw_mesh_tx_build_whdr(_adapter *adapter, struct pkt_attrib *attrib
case MESH_UCAST_PX_DATA: /* 1, 1, RA, TA, mDA, mSA, [DA, SA] */ case MESH_UCAST_PX_DATA: /* 1, 1, RA, TA, mDA, mSA, [DA, SA] */
SetToDs(fctrl); SetToDs(fctrl);
SetFrDs(fctrl); SetFrDs(fctrl);
_rtw_memcpy(whdr->addr1, attrib->ra, ETH_ALEN); memcpy(whdr->addr1, attrib->ra, ETH_ALEN);
_rtw_memcpy(whdr->addr2, attrib->ta, ETH_ALEN); memcpy(whdr->addr2, attrib->ta, ETH_ALEN);
_rtw_memcpy(whdr->addr3, attrib->mda, ETH_ALEN); memcpy(whdr->addr3, attrib->mda, ETH_ALEN);
_rtw_memcpy(whdr->addr4, attrib->msa, ETH_ALEN); memcpy(whdr->addr4, attrib->msa, ETH_ALEN);
break; break;
case MESH_BMCAST_DATA: /* 0, 1, RA(DA), TA, mSA(SA) */ case MESH_BMCAST_DATA: /* 0, 1, RA(DA), TA, mSA(SA) */
case MESH_BMCAST_PX_DATA: /* 0, 1, RA(DA), TA, mSA, [SA] */ case MESH_BMCAST_PX_DATA: /* 0, 1, RA(DA), TA, mSA, [SA] */
SetFrDs(fctrl); SetFrDs(fctrl);
_rtw_memcpy(whdr->addr1, attrib->ra, ETH_ALEN); memcpy(whdr->addr1, attrib->ra, ETH_ALEN);
_rtw_memcpy(whdr->addr2, attrib->ta, ETH_ALEN); memcpy(whdr->addr2, attrib->ta, ETH_ALEN);
_rtw_memcpy(whdr->addr3, attrib->msa, ETH_ALEN); memcpy(whdr->addr3, attrib->msa, ETH_ALEN);
break; break;
case MESH_MHOP_UCAST_ACT: case MESH_MHOP_UCAST_ACT:
/* TBD */ /* TBD */
@ -3567,13 +3567,13 @@ int rtw_mesh_rx_data_validate_hdr(_adapter *adapter, union recv_frame *rframe, s
ret = _SUCCESS; /* return _SUCCESS to drop at sta checking */ ret = _SUCCESS; /* return _SUCCESS to drop at sta checking */
goto exit; goto exit;
} }
_rtw_memcpy(rattrib->ra, GetAddr1Ptr(whdr), ETH_ALEN); memcpy(rattrib->ra, GetAddr1Ptr(whdr), ETH_ALEN);
_rtw_memcpy(rattrib->ta, get_addr2_ptr(whdr), ETH_ALEN); memcpy(rattrib->ta, get_addr2_ptr(whdr), ETH_ALEN);
_rtw_memcpy(rattrib->mda, GetAddr1Ptr(whdr), ETH_ALEN); memcpy(rattrib->mda, GetAddr1Ptr(whdr), ETH_ALEN);
_rtw_memcpy(rattrib->msa, GetAddr3Ptr(whdr), ETH_ALEN); /* may change after checking AMSDU subframe header */ memcpy(rattrib->msa, GetAddr3Ptr(whdr), ETH_ALEN); /* may change after checking AMSDU subframe header */
_rtw_memcpy(rattrib->dst, GetAddr1Ptr(whdr), ETH_ALEN); memcpy(rattrib->dst, GetAddr1Ptr(whdr), ETH_ALEN);
_rtw_memcpy(rattrib->src, GetAddr3Ptr(whdr), ETH_ALEN); /* may change after checking mesh ctrl field */ memcpy(rattrib->src, GetAddr3Ptr(whdr), ETH_ALEN); /* may change after checking mesh ctrl field */
_rtw_memcpy(rattrib->bssid, get_addr2_ptr(whdr), ETH_ALEN); memcpy(rattrib->bssid, get_addr2_ptr(whdr), ETH_ALEN);
is_ra_bmc = 1; is_ra_bmc = 1;
break; break;
case 3: case 3:
@ -3584,13 +3584,13 @@ int rtw_mesh_rx_data_validate_hdr(_adapter *adapter, union recv_frame *rframe, s
ret = _SUCCESS; /* return _SUCCESS to drop at sta checking */ ret = _SUCCESS; /* return _SUCCESS to drop at sta checking */
goto exit; goto exit;
} }
_rtw_memcpy(rattrib->ra, GetAddr1Ptr(whdr), ETH_ALEN); memcpy(rattrib->ra, GetAddr1Ptr(whdr), ETH_ALEN);
_rtw_memcpy(rattrib->ta, get_addr2_ptr(whdr), ETH_ALEN); memcpy(rattrib->ta, get_addr2_ptr(whdr), ETH_ALEN);
_rtw_memcpy(rattrib->mda, GetAddr3Ptr(whdr), ETH_ALEN); /* may change after checking AMSDU subframe header */ memcpy(rattrib->mda, GetAddr3Ptr(whdr), ETH_ALEN); /* may change after checking AMSDU subframe header */
_rtw_memcpy(rattrib->msa, GetAddr4Ptr(whdr), ETH_ALEN); /* may change after checking AMSDU subframe header */ memcpy(rattrib->msa, GetAddr4Ptr(whdr), ETH_ALEN); /* may change after checking AMSDU subframe header */
_rtw_memcpy(rattrib->dst, GetAddr3Ptr(whdr), ETH_ALEN); /* may change after checking mesh ctrl field */ memcpy(rattrib->dst, GetAddr3Ptr(whdr), ETH_ALEN); /* may change after checking mesh ctrl field */
_rtw_memcpy(rattrib->src, GetAddr4Ptr(whdr), ETH_ALEN); /* may change after checking mesh ctrl field */ memcpy(rattrib->src, GetAddr4Ptr(whdr), ETH_ALEN); /* may change after checking mesh ctrl field */
_rtw_memcpy(rattrib->bssid, get_addr2_ptr(whdr), ETH_ALEN); memcpy(rattrib->bssid, get_addr2_ptr(whdr), ETH_ALEN);
a4_shift = ETH_ALEN; a4_shift = ETH_ALEN;
break; break;
default: default:
@ -3695,8 +3695,8 @@ inline int rtw_mesh_rx_validate_mctrl_non_amsdu(_adapter *adapter, union recv_fr
, &da, &sa); , &da, &sa);
if (ret == _SUCCESS) { if (ret == _SUCCESS) {
_rtw_memcpy(rattrib->dst, da, ETH_ALEN); memcpy(rattrib->dst, da, ETH_ALEN);
_rtw_memcpy(rattrib->src, sa, ETH_ALEN); memcpy(rattrib->src, sa, ETH_ALEN);
} }
return ret; return ret;
@ -3800,7 +3800,7 @@ int rtw_mesh_rx_msdu_act_check(union recv_frame *rframe
else { else {
enter_critical_bh(&mppath->state_lock); enter_critical_bh(&mppath->state_lock);
if (_rtw_memcmp(mppath->mpp, mpp_addr, ETH_ALEN) == _FALSE) if (_rtw_memcmp(mppath->mpp, mpp_addr, ETH_ALEN) == _FALSE)
_rtw_memcpy(mppath->mpp, mpp_addr, ETH_ALEN); memcpy(mppath->mpp, mpp_addr, ETH_ALEN);
mppath->exp_time = rtw_get_current_time(); mppath->exp_time = rtw_get_current_time();
exit_critical_bh(&mppath->state_lock); exit_critical_bh(&mppath->state_lock);
} }
@ -3923,7 +3923,7 @@ int rtw_mesh_rx_msdu_act_check(union recv_frame *rframe
rtw_rcu_read_unlock(); rtw_rcu_read_unlock();
goto exit; goto exit;
} }
_rtw_memcpy(fwd_mpp, mppath->mpp, ETH_ALEN); memcpy(fwd_mpp, mppath->mpp, ETH_ALEN);
mda = fwd_mpp; mda = fwd_mpp;
msa = adapter_mac_addr(adapter); msa = adapter_mac_addr(adapter);
rtw_rcu_read_unlock(); rtw_rcu_read_unlock();
@ -4031,18 +4031,18 @@ fwd_chk:
#endif #endif
xattrib->mfwd_ttl = mctrl->ttl - 1; xattrib->mfwd_ttl = mctrl->ttl - 1;
xattrib->mseq = fwd_mseq; xattrib->mseq = fwd_mseq;
_rtw_memcpy(xattrib->dst, da, ETH_ALEN); memcpy(xattrib->dst, da, ETH_ALEN);
_rtw_memcpy(xattrib->src, sa, ETH_ALEN); memcpy(xattrib->src, sa, ETH_ALEN);
_rtw_memcpy(xattrib->mda, mda, ETH_ALEN); memcpy(xattrib->mda, mda, ETH_ALEN);
_rtw_memcpy(xattrib->msa, msa, ETH_ALEN); memcpy(xattrib->msa, msa, ETH_ALEN);
_rtw_memcpy(xattrib->ta, adapter_mac_addr(adapter), ETH_ALEN); memcpy(xattrib->ta, adapter_mac_addr(adapter), ETH_ALEN);
if (is_mda_bmc) { if (is_mda_bmc) {
xattrib->mesh_frame_mode = ae_need ? MESH_BMCAST_PX_DATA : MESH_BMCAST_DATA; xattrib->mesh_frame_mode = ae_need ? MESH_BMCAST_PX_DATA : MESH_BMCAST_DATA;
_rtw_memcpy(xattrib->ra, mda, ETH_ALEN); memcpy(xattrib->ra, mda, ETH_ALEN);
} else { } else {
xattrib->mesh_frame_mode = ae_need ? MESH_UCAST_PX_DATA : MESH_UCAST_DATA; xattrib->mesh_frame_mode = ae_need ? MESH_UCAST_PX_DATA : MESH_UCAST_DATA;
_rtw_memcpy(xattrib->ra, fwd_ra, ETH_ALEN); memcpy(xattrib->ra, fwd_ra, ETH_ALEN);
} }
*fwd_frame = xframe; *fwd_frame = xframe;

View File

@ -239,9 +239,9 @@ static int rtw_mesh_path_sel_frame_tx(enum rtw_mpath_frame_type mpath_action, u8
fctrl = &(pwlanhdr->frame_ctl); fctrl = &(pwlanhdr->frame_ctl);
*(fctrl) = 0; *(fctrl) = 0;
_rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); memcpy(pwlanhdr->addr1, da, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN); memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, adapter_mac_addr(adapter), ETH_ALEN); memcpy(pwlanhdr->addr3, adapter_mac_addr(adapter), ETH_ALEN);
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++; pmlmeext->mgnt_seq++;
@ -282,7 +282,7 @@ static int rtw_mesh_path_sel_frame_tx(enum rtw_mpath_frame_type mpath_action, u8
*pos++ = hopcount; *pos++ = hopcount;
*pos++ = ttl; *pos++ = ttl;
if (mpath_action == RTW_MPATH_PREP) { if (mpath_action == RTW_MPATH_PREP) {
_rtw_memcpy(pos, target, ETH_ALEN); memcpy(pos, target, ETH_ALEN);
pos += ETH_ALEN; pos += ETH_ALEN;
*(u32 *)pos = cpu_to_le32(target_sn); *(u32 *)pos = cpu_to_le32(target_sn);
pos += 4; pos += 4;
@ -291,7 +291,7 @@ static int rtw_mesh_path_sel_frame_tx(enum rtw_mpath_frame_type mpath_action, u8
*(u32 *)pos = cpu_to_le32(preq_id); *(u32 *)pos = cpu_to_le32(preq_id);
pos += 4; pos += 4;
} }
_rtw_memcpy(pos, originator_addr, ETH_ALEN); memcpy(pos, originator_addr, ETH_ALEN);
pos += ETH_ALEN; pos += ETH_ALEN;
*(u32 *)pos = cpu_to_le32(originator_sn); *(u32 *)pos = cpu_to_le32(originator_sn);
pos += 4; pos += 4;
@ -303,12 +303,12 @@ static int rtw_mesh_path_sel_frame_tx(enum rtw_mpath_frame_type mpath_action, u8
if (mpath_action == RTW_MPATH_PREQ) { if (mpath_action == RTW_MPATH_PREQ) {
*pos++ = 1; /* support only 1 destination now */ *pos++ = 1; /* support only 1 destination now */
*pos++ = target_flags; *pos++ = target_flags;
_rtw_memcpy(pos, target, ETH_ALEN); memcpy(pos, target, ETH_ALEN);
pos += ETH_ALEN; pos += ETH_ALEN;
*(u32 *)pos = cpu_to_le32(target_sn); *(u32 *)pos = cpu_to_le32(target_sn);
pos += 4; pos += 4;
} else if (mpath_action == RTW_MPATH_PREP) { } else if (mpath_action == RTW_MPATH_PREP) {
_rtw_memcpy(pos, originator_addr, ETH_ALEN); memcpy(pos, originator_addr, ETH_ALEN);
pos += ETH_ALEN; pos += ETH_ALEN;
*(u32 *)pos = cpu_to_le32(originator_sn); *(u32 *)pos = cpu_to_le32(originator_sn);
pos += 4; pos += 4;
@ -352,9 +352,9 @@ int rtw_mesh_path_error_tx(_adapter *adapter,
fctrl = &(pwlanhdr->frame_ctl); fctrl = &(pwlanhdr->frame_ctl);
*(fctrl) = 0; *(fctrl) = 0;
_rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN); memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN); memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, adapter_mac_addr(adapter), ETH_ALEN); memcpy(pwlanhdr->addr3, adapter_mac_addr(adapter), ETH_ALEN);
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++; pmlmeext->mgnt_seq++;
@ -377,7 +377,7 @@ int rtw_mesh_path_error_tx(_adapter *adapter,
/* Flags format | B7 | B6 | B5:B0 | = | rsvd | AE | rsvd | */ /* Flags format | B7 | B6 | B5:B0 | = | rsvd | AE | rsvd | */
*pos = 0; *pos = 0;
pos++; pos++;
_rtw_memcpy(pos, target, ETH_ALEN); memcpy(pos, target, ETH_ALEN);
pos += ETH_ALEN; pos += ETH_ALEN;
*(u32 *)pos = cpu_to_le32(target_sn); *(u32 *)pos = cpu_to_le32(target_sn);
pos += 4; pos += 4;
@ -862,7 +862,7 @@ static void rtw_hwmp_prep_frame_process(_adapter *adapter,
exit_critical_bh(&path->state_lock); exit_critical_bh(&path->state_lock);
goto fail; goto fail;
} }
_rtw_memcpy(next_hop, rtw_next_hop_deref_protected(path)->cmn.mac_addr, ETH_ALEN); memcpy(next_hop, rtw_next_hop_deref_protected(path)->cmn.mac_addr, ETH_ALEN);
exit_critical_bh(&path->state_lock); exit_critical_bh(&path->state_lock);
--ttl; --ttl;
flags = RTW_PREP_IE_FLAGS(prep_elem); flags = RTW_PREP_IE_FLAGS(prep_elem);
@ -1015,7 +1015,7 @@ static void rtw_hwmp_rann_frame_process(_adapter *adapter,
"add_chk_rann_snd_addr= "MAC_FMT"\n", "add_chk_rann_snd_addr= "MAC_FMT"\n",
MAC_ARG(mgmt->addr2), MAC_ARG(mgmt->addr2),
MAC_ARG(path->rann_snd_addr)); MAC_ARG(path->rann_snd_addr));
_rtw_memcpy(path->add_chk_rann_snd_addr, memcpy(path->add_chk_rann_snd_addr,
path->rann_snd_addr, ETH_ALEN); path->rann_snd_addr, ETH_ALEN);
preq_node_flag |= RTW_PREQ_Q_F_CHK; preq_node_flag |= RTW_PREQ_Q_F_CHK;
@ -1030,7 +1030,7 @@ static void rtw_hwmp_rann_frame_process(_adapter *adapter,
path->is_root = _TRUE; path->is_root = _TRUE;
/* Recording RANNs sender address to send individually /* Recording RANNs sender address to send individually
* addressed PREQs destined for root mesh STA */ * addressed PREQs destined for root mesh STA */
_rtw_memcpy(path->rann_snd_addr, mgmt->addr2, ETH_ALEN); memcpy(path->rann_snd_addr, mgmt->addr2, ETH_ALEN);
if (root_is_gate) { if (root_is_gate) {
path->gate_ann_int = interval; path->gate_ann_int = interval;
@ -1159,7 +1159,7 @@ static u32 rtw_hwmp_route_info_get(_adapter *adapter,
rtw_mesh_path_activate(path); rtw_mesh_path_activate(path);
#ifdef CONFIG_RTW_MESH_ADD_ROOT_CHK #ifdef CONFIG_RTW_MESH_ADD_ROOT_CHK
if (path->is_root && (action == RTW_MPATH_PREP)) { if (path->is_root && (action == RTW_MPATH_PREP)) {
_rtw_memcpy(path->rann_snd_addr, memcpy(path->rann_snd_addr,
mgmt->addr2, ETH_ALEN); mgmt->addr2, ETH_ALEN);
path->rann_metric = new_metric; path->rann_metric = new_metric;
} }
@ -1309,7 +1309,7 @@ void rtw_mesh_queue_preq(struct rtw_mesh_path *path, u8 flags)
return; return;
} }
_rtw_memcpy(preq_node->dst, path->dst, ETH_ALEN); memcpy(preq_node->dst, path->dst, ETH_ALEN);
preq_node->flags = flags; preq_node->flags = flags;
path->flags |= RTW_MESH_PATH_REQ_QUEUED; path->flags |= RTW_MESH_PATH_REQ_QUEUED;

View File

@ -117,7 +117,7 @@ void rtw_mesh_path_assign_nexthop(struct rtw_mesh_path *mpath, struct sta_info *
while (rtw_end_of_queue_search(head, list) == _FALSE) { while (rtw_end_of_queue_search(head, list) == _FALSE) {
xframe = LIST_CONTAINOR(list, struct xmit_frame, list); xframe = LIST_CONTAINOR(list, struct xmit_frame, list);
list = get_next(list); list = get_next(list);
_rtw_memcpy(xframe->attrib.ra, sta->cmn.mac_addr, ETH_ALEN); memcpy(xframe->attrib.ra, sta->cmn.mac_addr, ETH_ALEN);
} }
exit_critical_bh(&mpath->frame_queue.lock); exit_critical_bh(&mpath->frame_queue.lock);
@ -135,9 +135,9 @@ static void rtw_prepare_for_gate(struct xmit_frame *xframe, char *dst_addr,
/* update next hop */ /* update next hop */
rtw_rcu_read_lock(); rtw_rcu_read_lock();
next_hop = rtw_rcu_dereference(gate_mpath->next_hop)->cmn.mac_addr; next_hop = rtw_rcu_dereference(gate_mpath->next_hop)->cmn.mac_addr;
_rtw_memcpy(attrib->ra, next_hop, ETH_ALEN); memcpy(attrib->ra, next_hop, ETH_ALEN);
rtw_rcu_read_unlock(); rtw_rcu_read_unlock();
_rtw_memcpy(attrib->mda, dst_addr, ETH_ALEN); memcpy(attrib->mda, dst_addr, ETH_ALEN);
} }
/** /**
@ -543,7 +543,7 @@ struct rtw_mesh_path *rtw_mesh_path_new(_adapter *adapter,
if (!new_mpath) if (!new_mpath)
return NULL; return NULL;
_rtw_memcpy(new_mpath->dst, dst, ETH_ALEN); memcpy(new_mpath->dst, dst, ETH_ALEN);
memset(new_mpath->rann_snd_addr, 0xFF, ETH_ALEN); memset(new_mpath->rann_snd_addr, 0xFF, ETH_ALEN);
new_mpath->is_root = false; new_mpath->is_root = false;
new_mpath->adapter = adapter; new_mpath->adapter = adapter;
@ -640,7 +640,7 @@ int rtw_mpp_path_add(_adapter *adapter,
if (!new_mpath) if (!new_mpath)
return -ENOMEM; return -ENOMEM;
_rtw_memcpy(new_mpath->mpp, mpp, ETH_ALEN); memcpy(new_mpath->mpp, mpp, ETH_ALEN);
ret = rtw_rhashtable_lookup_insert_fast(&tbl->rhead, ret = rtw_rhashtable_lookup_insert_fast(&tbl->rhead,
&new_mpath->rhash, &new_mpath->rhash,
rtw_mesh_rht_params); rtw_mesh_rht_params);
@ -663,8 +663,8 @@ void dump_mpp(void *sel, _adapter *adapter)
mpath = rtw_mpp_path_lookup_by_idx(adapter, idx); mpath = rtw_mpp_path_lookup_by_idx(adapter, idx);
if (mpath) { if (mpath) {
_rtw_memcpy(dst, mpath->dst, ETH_ALEN); memcpy(dst, mpath->dst, ETH_ALEN);
_rtw_memcpy(mpp, mpath->mpp, ETH_ALEN); memcpy(mpp, mpath->mpp, ETH_ALEN);
} }
rtw_rcu_read_unlock(); rtw_rcu_read_unlock();

View File

@ -75,7 +75,7 @@ u8 rtw_set_tim_ie(u8 dtim_cnt, u8 dtim_period
*p++ = dtim_cnt; *p++ = dtim_cnt;
*p++ = dtim_period; *p++ = dtim_period;
*p++ = (rtw_bmp_is_set(tim_bmp, tim_bmp_len, 0) ? BIT0 : 0) | n1; *p++ = (rtw_bmp_is_set(tim_bmp, tim_bmp_len, 0) ? BIT0 : 0) | n1;
_rtw_memcpy(p, tim_bmp + n1, bmp_len); memcpy(p, tim_bmp + n1, bmp_len);
#if 0 #if 0
RTW_INFO("n1:%u, n2:%u, bmp_offset:%u, bmp_len:%u\n", n1, n2, n1 / 2, bmp_len); RTW_INFO("n1:%u, n2:%u, bmp_offset:%u, bmp_len:%u\n", n1, n2, n1 / 2, bmp_len);
@ -145,7 +145,7 @@ static void update_BCNTIM(_adapter *padapter)
if (remainder_ielen > 0) { if (remainder_ielen > 0) {
pbackup_remainder_ie = rtw_malloc(remainder_ielen); pbackup_remainder_ie = rtw_malloc(remainder_ielen);
if (pbackup_remainder_ie && premainder_ie) if (pbackup_remainder_ie && premainder_ie)
_rtw_memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen); memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen);
} }
/* append TIM IE */ /* append TIM IE */
@ -153,7 +153,7 @@ static void update_BCNTIM(_adapter *padapter)
/*copy remainder IE*/ /*copy remainder IE*/
if (pbackup_remainder_ie) { if (pbackup_remainder_ie) {
_rtw_memcpy(dst_ie, pbackup_remainder_ie, remainder_ielen); memcpy(dst_ie, pbackup_remainder_ie, remainder_ielen);
rtw_mfree(pbackup_remainder_ie, remainder_ielen); rtw_mfree(pbackup_remainder_ie, remainder_ielen);
} }
@ -210,18 +210,18 @@ void rtw_add_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *d
if (remainder_ielen > 0) { if (remainder_ielen > 0) {
pbackup_remainder_ie = rtw_malloc(remainder_ielen); pbackup_remainder_ie = rtw_malloc(remainder_ielen);
if (pbackup_remainder_ie && premainder_ie) if (pbackup_remainder_ie && premainder_ie)
_rtw_memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen); memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen);
} }
*dst_ie++ = index; *dst_ie++ = index;
*dst_ie++ = len; *dst_ie++ = len;
_rtw_memcpy(dst_ie, data, len); memcpy(dst_ie, data, len);
dst_ie += len; dst_ie += len;
/* copy remainder IE */ /* copy remainder IE */
if (pbackup_remainder_ie) { if (pbackup_remainder_ie) {
_rtw_memcpy(dst_ie, pbackup_remainder_ie, remainder_ielen); memcpy(dst_ie, pbackup_remainder_ie, remainder_ielen);
rtw_mfree(pbackup_remainder_ie, remainder_ielen); rtw_mfree(pbackup_remainder_ie, remainder_ielen);
} }
@ -253,12 +253,12 @@ void rtw_remove_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index)
if (remainder_ielen > 0) { if (remainder_ielen > 0) {
pbackup_remainder_ie = rtw_malloc(remainder_ielen); pbackup_remainder_ie = rtw_malloc(remainder_ielen);
if (pbackup_remainder_ie && premainder_ie) if (pbackup_remainder_ie && premainder_ie)
_rtw_memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen); memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen);
} }
/* copy remainder IE */ /* copy remainder IE */
if (pbackup_remainder_ie) { if (pbackup_remainder_ie) {
_rtw_memcpy(dst_ie, pbackup_remainder_ie, remainder_ielen); memcpy(dst_ie, pbackup_remainder_ie, remainder_ielen);
rtw_mfree(pbackup_remainder_ie, remainder_ielen); rtw_mfree(pbackup_remainder_ie, remainder_ielen);
} }
@ -723,7 +723,7 @@ void expire_timeout_chk(_adapter *padapter)
continue; continue;
psta = rtw_get_stainfo_by_offset(pstapriv, del_asoc_list[i]); psta = rtw_get_stainfo_by_offset(pstapriv, del_asoc_list[i]);
_rtw_memcpy(sta_addr, psta->cmn.mac_addr, ETH_ALEN); memcpy(sta_addr, psta->cmn.mac_addr, ETH_ALEN);
RTW_INFO(FUNC_ADPT_FMT" asoc expire "MAC_FMT", state=0x%x\n" RTW_INFO(FUNC_ADPT_FMT" asoc expire "MAC_FMT", state=0x%x\n"
, FUNC_ADPT_ARG(padapter), MAC_ARG(psta->cmn.mac_addr), psta->state); , FUNC_ADPT_ARG(padapter), MAC_ARG(psta->cmn.mac_addr), psta->state);
@ -1202,7 +1202,7 @@ static void update_ap_info(_adapter *padapter, struct sta_info *psta)
psta->wireless_mode = pmlmeext->cur_wireless_mode; psta->wireless_mode = pmlmeext->cur_wireless_mode;
psta->bssratelen = rtw_get_rateset_len(pnetwork->SupportedRates); psta->bssratelen = rtw_get_rateset_len(pnetwork->SupportedRates);
_rtw_memcpy(psta->bssrateset, pnetwork->SupportedRates, psta->bssratelen); memcpy(psta->bssrateset, pnetwork->SupportedRates, psta->bssratelen);
#ifdef CONFIG_80211N_HT #ifdef CONFIG_80211N_HT
/* HT related cap */ /* HT related cap */
@ -1231,10 +1231,10 @@ static void update_ap_info(_adapter *padapter, struct sta_info *psta)
phtpriv_ap->agg_enable_bitmap = 0x0;/* reset */ phtpriv_ap->agg_enable_bitmap = 0x0;/* reset */
phtpriv_ap->candidate_tid_bitmap = 0x0;/* reset */ phtpriv_ap->candidate_tid_bitmap = 0x0;/* reset */
_rtw_memcpy(&psta->htpriv, &pmlmepriv->htpriv, sizeof(struct ht_priv)); memcpy(&psta->htpriv, &pmlmepriv->htpriv, sizeof(struct ht_priv));
#ifdef CONFIG_80211AC_VHT #ifdef CONFIG_80211AC_VHT
_rtw_memcpy(&psta->vhtpriv, &pmlmepriv->vhtpriv, sizeof(struct vht_priv)); memcpy(&psta->vhtpriv, &pmlmepriv->vhtpriv, sizeof(struct vht_priv));
#endif /* CONFIG_80211AC_VHT */ #endif /* CONFIG_80211AC_VHT */
#endif /* CONFIG_80211N_HT */ #endif /* CONFIG_80211N_HT */
@ -1647,7 +1647,7 @@ void start_bss_network(_adapter *padapter, struct createbss_parm *parm)
else else
rtw_warn_on(1); rtw_warn_on(1);
req_ch = 0; req_ch = 0;
_rtw_memcpy(pnetwork_mlmeext, pnetwork, pnetwork->Length); memcpy(pnetwork_mlmeext, pnetwork, pnetwork->Length);
} }
bcn_interval = (u16)pnetwork->Configuration.BeaconPeriod; bcn_interval = (u16)pnetwork->Configuration.BeaconPeriod;
@ -1714,7 +1714,7 @@ chbw_decision:
continue; continue;
/* let pnetwork_mlme == pnetwork_mlmeext */ /* let pnetwork_mlme == pnetwork_mlmeext */
_rtw_memcpy(&(pdvobj->padapters[i]->mlmepriv.cur_network.network) memcpy(&(pdvobj->padapters[i]->mlmepriv.cur_network.network)
, &(pdvobj->padapters[i]->mlmeextpriv.mlmext_info.network) , &(pdvobj->padapters[i]->mlmeextpriv.mlmext_info.network)
, pdvobj->padapters[i]->mlmeextpriv.mlmext_info.network.Length); , pdvobj->padapters[i]->mlmeextpriv.mlmext_info.network.Length);
@ -1935,7 +1935,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
memset(ie, 0, MAX_IE_SZ); memset(ie, 0, MAX_IE_SZ);
_rtw_memcpy(ie, pbuf, pbss_network->IELength); memcpy(ie, pbuf, pbss_network->IELength);
if (pbss_network->InfrastructureMode != Ndis802_11APMode if (pbss_network->InfrastructureMode != Ndis802_11APMode
@ -1951,7 +1951,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
pbss_network->Rssi = 0; pbss_network->Rssi = 0;
_rtw_memcpy(pbss_network->MacAddress, adapter_mac_addr(padapter), ETH_ALEN); memcpy(pbss_network->MacAddress, adapter_mac_addr(padapter), ETH_ALEN);
/* beacon interval */ /* beacon interval */
p = rtw_get_beacon_interval_from_ie(ie);/* ie + 8; */ /* 8: TimeStamp, 2: Beacon Interval 2:Capability */ p = rtw_get_beacon_interval_from_ie(ie);/* ie + 8; */ /* 8: TimeStamp, 2: Beacon Interval 2:Capability */
@ -1967,10 +1967,10 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SSID_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_)); p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SSID_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
if (p && ie_len > 0) { if (p && ie_len > 0) {
memset(&pbss_network->Ssid, 0, sizeof(NDIS_802_11_SSID)); memset(&pbss_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
_rtw_memcpy(pbss_network->Ssid.Ssid, (p + 2), ie_len); memcpy(pbss_network->Ssid.Ssid, (p + 2), ie_len);
pbss_network->Ssid.SsidLength = ie_len; pbss_network->Ssid.SsidLength = ie_len;
#ifdef CONFIG_P2P #ifdef CONFIG_P2P
_rtw_memcpy(padapter->wdinfo.p2p_group_ssid, pbss_network->Ssid.Ssid, pbss_network->Ssid.SsidLength); memcpy(padapter->wdinfo.p2p_group_ssid, pbss_network->Ssid.Ssid, pbss_network->Ssid.SsidLength);
padapter->wdinfo.p2p_group_ssid_len = pbss_network->Ssid.SsidLength; padapter->wdinfo.p2p_group_ssid_len = pbss_network->Ssid.SsidLength;
#endif #endif
} }
@ -1981,7 +1981,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, WLAN_EID_MESH_ID, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_)); p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, WLAN_EID_MESH_ID, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
if (p && ie_len > 0) { if (p && ie_len > 0) {
memset(&pbss_network->mesh_id, 0, sizeof(NDIS_802_11_SSID)); memset(&pbss_network->mesh_id, 0, sizeof(NDIS_802_11_SSID));
_rtw_memcpy(pbss_network->mesh_id.Ssid, (p + 2), ie_len); memcpy(pbss_network->mesh_id.Ssid, (p + 2), ie_len);
pbss_network->mesh_id.SsidLength = ie_len; pbss_network->mesh_id.SsidLength = ie_len;
} }
} }
@ -2008,7 +2008,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
pbss_network->IELength=pbss_network->IELength - ret_rm; pbss_network->IELength=pbss_network->IELength - ret_rm;
} }
RTW_DBG("%s, ie_len=%u\n", __FUNCTION__, ie_len); RTW_DBG("%s, ie_len=%u\n", __FUNCTION__, ie_len);
_rtw_memcpy(supportRate, p + 2, ie_len); memcpy(supportRate, p + 2, ie_len);
supportRateNum = ie_len; supportRateNum = ie_len;
} }
@ -2021,7 +2021,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
_EXT_SUPPORTEDRATES_IE_,NULL,0); _EXT_SUPPORTEDRATES_IE_,NULL,0);
RTW_DBG("%s, remove_ie of ext_supported rates =%d\n", __FUNCTION__, ret_rm); RTW_DBG("%s, remove_ie of ext_supported rates =%d\n", __FUNCTION__, ret_rm);
} else { } else {
_rtw_memcpy(supportRate + supportRateNum, p + 2, ie_len); memcpy(supportRate + supportRateNum, p + 2, ie_len);
supportRateNum += ie_len; supportRateNum += ie_len;
} }
@ -2286,7 +2286,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
rtw_hal_get_def_var(padapter, HW_VAR_MAX_RX_AMPDU_FACTOR, &max_rx_ampdu_factor); rtw_hal_get_def_var(padapter, HW_VAR_MAX_RX_AMPDU_FACTOR, &max_rx_ampdu_factor);
pht_cap->ampdu_params_info |= (IEEE80211_HT_AMPDU_PARM_FACTOR & max_rx_ampdu_factor); /* set Max Rx AMPDU size to 64K */ pht_cap->ampdu_params_info |= (IEEE80211_HT_AMPDU_PARM_FACTOR & max_rx_ampdu_factor); /* set Max Rx AMPDU size to 64K */
_rtw_memcpy(&(pmlmeinfo->HT_caps), pht_cap, sizeof(struct HT_caps_element)); memcpy(&(pmlmeinfo->HT_caps), pht_cap, sizeof(struct HT_caps_element));
/* Update Supported MCS Set field */ /* Update Supported MCS Set field */
{ {
@ -2346,7 +2346,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
} }
#endif /* CONFIG_BEAMFORMING */ #endif /* CONFIG_BEAMFORMING */
_rtw_memcpy(&pmlmepriv->htpriv.ht_cap, p + 2, ie_len); memcpy(&pmlmepriv->htpriv.ht_cap, p + 2, ie_len);
if (0) { if (0) {
RTW_INFO(FUNC_ADPT_FMT" HT_CAP_IE driver masked:\n", FUNC_ADPT_ARG(padapter)); RTW_INFO(FUNC_ADPT_FMT" HT_CAP_IE driver masked:\n", FUNC_ADPT_ARG(padapter));
@ -2641,7 +2641,7 @@ int rtw_acl_add_sta(_adapter *adapter, u8 period, const u8 *addr)
if (acl_node->valid == _FALSE) { if (acl_node->valid == _FALSE) {
_rtw_init_listhead(&acl_node->list); _rtw_init_listhead(&acl_node->list);
_rtw_memcpy(acl_node->addr, addr, ETH_ALEN); memcpy(acl_node->addr, addr, ETH_ALEN);
acl_node->valid = _TRUE; acl_node->valid = _TRUE;
rtw_list_insert_tail(&acl_node->list, get_list_head(acl_node_q)); rtw_list_insert_tail(&acl_node->list, get_list_head(acl_node_q));
@ -2737,10 +2737,10 @@ u8 rtw_ap_set_sta_key(_adapter *adapter, const u8 *addr, u8 alg, const u8 *key,
init_h2fwcmd_w_parm_no_rsp(cmd, param, _SetStaKey_CMD_); init_h2fwcmd_w_parm_no_rsp(cmd, param, _SetStaKey_CMD_);
_rtw_memcpy(param->addr, addr, ETH_ALEN); memcpy(param->addr, addr, ETH_ALEN);
param->algorithm = alg; param->algorithm = alg;
param->keyid = keyid; param->keyid = keyid;
_rtw_memcpy(param->key, key, 16); memcpy(param->key, key, 16);
param->gk = gk; param->gk = gk;
res = rtw_enqueue_cmd(cmdpriv, cmd); res = rtw_enqueue_cmd(cmdpriv, cmd);
@ -2806,7 +2806,7 @@ static int rtw_ap_set_key(_adapter *padapter, u8 *key, u8 alg, int keyid, u8 set
keylen = 16; keylen = 16;
} }
_rtw_memcpy(&(psetkeyparm->key[0]), key, keylen); memcpy(&(psetkeyparm->key[0]), key, keylen);
pcmd->cmdcode = _SetKey_CMD_; pcmd->cmdcode = _SetKey_CMD_;
pcmd->parmbuf = (u8 *)psetkeyparm; pcmd->parmbuf = (u8 *)psetkeyparm;
@ -3191,16 +3191,16 @@ static void update_bcn_wps_ie(_adapter *padapter)
if (remainder_ielen > 0) { if (remainder_ielen > 0) {
pbackup_remainder_ie = rtw_malloc(remainder_ielen); pbackup_remainder_ie = rtw_malloc(remainder_ielen);
if (pbackup_remainder_ie) if (pbackup_remainder_ie)
_rtw_memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen); memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen);
} }
wps_ielen = (uint)pwps_ie_src[1];/* to get ie data len */ wps_ielen = (uint)pwps_ie_src[1];/* to get ie data len */
if ((wps_offset + wps_ielen + 2 + remainder_ielen) <= MAX_IE_SZ) { if ((wps_offset + wps_ielen + 2 + remainder_ielen) <= MAX_IE_SZ) {
_rtw_memcpy(pwps_ie, pwps_ie_src, wps_ielen + 2); memcpy(pwps_ie, pwps_ie_src, wps_ielen + 2);
pwps_ie += (wps_ielen + 2); pwps_ie += (wps_ielen + 2);
if (pbackup_remainder_ie) if (pbackup_remainder_ie)
_rtw_memcpy(pwps_ie, pbackup_remainder_ie, remainder_ielen); memcpy(pwps_ie, pbackup_remainder_ie, remainder_ielen);
/* update IELength */ /* update IELength */
pnetwork->IELength = wps_offset + (wps_ielen + 2) + remainder_ielen; pnetwork->IELength = wps_offset + (wps_ielen + 2) + remainder_ielen;
@ -3978,7 +3978,7 @@ int rtw_sta_flush(_adapter *padapter, bool enqueue)
u8 sta_addr[ETH_ALEN]; u8 sta_addr[ETH_ALEN];
psta = rtw_get_stainfo_by_offset(pstapriv, flush_list[i]); psta = rtw_get_stainfo_by_offset(pstapriv, flush_list[i]);
_rtw_memcpy(sta_addr, psta->cmn.mac_addr, ETH_ALEN); memcpy(sta_addr, psta->cmn.mac_addr, ETH_ALEN);
ap_free_sta(padapter, psta, _TRUE, WLAN_REASON_DEAUTH_LEAVING, enqueue); ap_free_sta(padapter, psta, _TRUE, WLAN_REASON_DEAUTH_LEAVING, enqueue);
#ifdef CONFIG_RTW_MESH #ifdef CONFIG_RTW_MESH
@ -5160,7 +5160,7 @@ u16 rtw_ap_parse_sta_supported_rates(_adapter *adapter, struct sta_info *sta, u8
goto exit; goto exit;
} }
_rtw_memcpy(sta->bssrateset, rate_set, rate_num); memcpy(sta->bssrateset, rate_set, rate_num);
sta->bssratelen = rate_num; sta->bssratelen = rate_num;
if (MLME_IS_AP(adapter)) { if (MLME_IS_AP(adapter)) {
@ -5339,7 +5339,7 @@ u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct
copy_len = ((wpa_ie_len + 2) > sizeof(sta->wpa_ie)) ? (sizeof(sta->wpa_ie)) : (wpa_ie_len + 2); copy_len = ((wpa_ie_len + 2) > sizeof(sta->wpa_ie)) ? (sizeof(sta->wpa_ie)) : (wpa_ie_len + 2);
if (copy_len > 0) if (copy_len > 0)
_rtw_memcpy(sta->wpa_ie, wpa_ie - 2, copy_len); memcpy(sta->wpa_ie, wpa_ie - 2, copy_len);
} }
exit: exit:
@ -5426,10 +5426,10 @@ void rtw_ap_parse_sta_ht_ie(_adapter *adapter, struct sta_info *sta, struct rtw_
if (elems->ht_capabilities && elems->ht_capabilities_len >= sizeof(struct rtw_ieee80211_ht_cap)) { if (elems->ht_capabilities && elems->ht_capabilities_len >= sizeof(struct rtw_ieee80211_ht_cap)) {
sta->flags |= WLAN_STA_HT; sta->flags |= WLAN_STA_HT;
sta->flags |= WLAN_STA_WME; sta->flags |= WLAN_STA_WME;
_rtw_memcpy(&sta->htpriv.ht_cap, elems->ht_capabilities, sizeof(struct rtw_ieee80211_ht_cap)); memcpy(&sta->htpriv.ht_cap, elems->ht_capabilities, sizeof(struct rtw_ieee80211_ht_cap));
if (elems->ht_operation && elems->ht_operation_len == HT_OP_IE_LEN) { if (elems->ht_operation && elems->ht_operation_len == HT_OP_IE_LEN) {
_rtw_memcpy(sta->htpriv.ht_op, elems->ht_operation, HT_OP_IE_LEN); memcpy(sta->htpriv.ht_op, elems->ht_operation, HT_OP_IE_LEN);
sta->htpriv.op_present = 1; sta->htpriv.op_present = 1;
} }
} }
@ -5452,15 +5452,15 @@ void rtw_ap_parse_sta_vht_ie(_adapter *adapter, struct sta_info *sta, struct rtw
memset(&sta->vhtpriv, 0, sizeof(struct vht_priv)); memset(&sta->vhtpriv, 0, sizeof(struct vht_priv));
if (elems->vht_capabilities && elems->vht_capabilities_len == VHT_CAP_IE_LEN) { if (elems->vht_capabilities && elems->vht_capabilities_len == VHT_CAP_IE_LEN) {
sta->flags |= WLAN_STA_VHT; sta->flags |= WLAN_STA_VHT;
_rtw_memcpy(sta->vhtpriv.vht_cap, elems->vht_capabilities, VHT_CAP_IE_LEN); memcpy(sta->vhtpriv.vht_cap, elems->vht_capabilities, VHT_CAP_IE_LEN);
if (elems->vht_operation && elems->vht_operation_len== VHT_OP_IE_LEN) { if (elems->vht_operation && elems->vht_operation_len== VHT_OP_IE_LEN) {
_rtw_memcpy(sta->vhtpriv.vht_op, elems->vht_operation, VHT_OP_IE_LEN); memcpy(sta->vhtpriv.vht_op, elems->vht_operation, VHT_OP_IE_LEN);
sta->vhtpriv.op_present = 1; sta->vhtpriv.op_present = 1;
} }
if (elems->vht_op_mode_notify && elems->vht_op_mode_notify_len == 1) { if (elems->vht_op_mode_notify && elems->vht_op_mode_notify_len == 1) {
_rtw_memcpy(&sta->vhtpriv.vht_op_mode_notify, elems->vht_op_mode_notify, 1); memcpy(&sta->vhtpriv.vht_op_mode_notify, elems->vht_op_mode_notify, 1);
sta->vhtpriv.notify_present = 1; sta->vhtpriv.notify_present = 1;
} }
} }

View File

@ -235,11 +235,11 @@ static u8 _send_ht_ndpa_packet(PADAPTER adapter, u8 *ra, enum channel_width bw)
set_duration(pframe, duration); set_duration(pframe, duration);
/* DA */ /* DA */
_rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN); memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
/* SA */ /* SA */
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN); memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN);
/* BSSID */ /* BSSID */
_rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
/* HT control field */ /* HT control field */
SET_HT_CTRL_CSI_STEERING(pframe + 24, 3); SET_HT_CTRL_CSI_STEERING(pframe + 24, 3);
@ -250,7 +250,7 @@ static u8 _send_ht_ndpa_packet(PADAPTER adapter, u8 *ra, enum channel_width bw)
* Category field: vender-specific value, 0x7F * Category field: vender-specific value, 0x7F
* OUI: 0x00E04C * OUI: 0x00E04C
*/ */
_rtw_memcpy(pframe + 28, ActionHdr, 4); memcpy(pframe + 28, ActionHdr, 4);
attrib->pktlen = 32; attrib->pktlen = 32;
attrib->last_txcmdsz = attrib->pktlen; attrib->last_txcmdsz = attrib->pktlen;
@ -331,10 +331,10 @@ static u8 _send_vht_ndpa_packet(PADAPTER adapter, u8 *ra, u16 aid, enum channel_
set_duration(pframe, duration); set_duration(pframe, duration);
/* RA */ /* RA */
_rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN); memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
/* TA */ /* TA */
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN); memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN);
/* Sounding Sequence, bit0~1 is reserved */ /* Sounding Sequence, bit0~1 is reserved */
sequence = info->sounding_sequence << 2; sequence = info->sounding_sequence << 2;
@ -342,7 +342,7 @@ static u8 _send_vht_ndpa_packet(PADAPTER adapter, u8 *ra, u16 aid, enum channel_
info->sounding_sequence = 0; info->sounding_sequence = 0;
else else
info->sounding_sequence++; info->sounding_sequence++;
_rtw_memcpy(pframe + 16, &sequence, 1); memcpy(pframe + 16, &sequence, 1);
/* STA Info */ /* STA Info */
/* /*
@ -356,7 +356,7 @@ static u8 _send_vht_ndpa_packet(PADAPTER adapter, u8 *ra, u16 aid, enum channel_
sta_info.feedback_type = 0; sta_info.feedback_type = 0;
/* "Nc Index" reserved if the Feedback Type field indicates SU */ /* "Nc Index" reserved if the Feedback Type field indicates SU */
sta_info.nc_index = 0; sta_info.nc_index = 0;
_rtw_memcpy(pframe + 17, (u8 *)&sta_info, 2); memcpy(pframe + 17, (u8 *)&sta_info, 2);
attrib->pktlen = 19; attrib->pktlen = 19;
attrib->last_txcmdsz = attrib->pktlen; attrib->last_txcmdsz = attrib->pktlen;
@ -448,10 +448,10 @@ static u8 _send_vht_mu_ndpa_packet(PADAPTER adapter, enum channel_width bw)
set_duration(pframe, duration); set_duration(pframe, duration);
/* RA */ /* RA */
_rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN); memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
/* TA */ /* TA */
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN); memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN);
/* Sounding Sequence, bit0~1 is reserved */ /* Sounding Sequence, bit0~1 is reserved */
sequence = info->sounding_sequence << 2; sequence = info->sounding_sequence << 2;
@ -459,7 +459,7 @@ static u8 _send_vht_mu_ndpa_packet(PADAPTER adapter, enum channel_width bw)
info->sounding_sequence = 0; info->sounding_sequence = 0;
else else
info->sounding_sequence++; info->sounding_sequence++;
_rtw_memcpy(pframe + 16, &sequence, 1); memcpy(pframe + 16, &sequence, 1);
attrib->pktlen = 17; attrib->pktlen = 17;
@ -472,7 +472,7 @@ static u8 _send_vht_mu_ndpa_packet(PADAPTER adapter, enum channel_width bw)
sta_info.aid = bfee->aid; sta_info.aid = bfee->aid;
sta_info.feedback_type = 1; /* 1'b1: MU */ sta_info.feedback_type = 1; /* 1'b1: MU */
sta_info.nc_index = 0; sta_info.nc_index = 0;
_rtw_memcpy(pframe + attrib->pktlen, (u8 *)&sta_info, 2); memcpy(pframe + attrib->pktlen, (u8 *)&sta_info, 2);
attrib->pktlen += 2; attrib->pktlen += 2;
} }
@ -529,10 +529,10 @@ static u8 _send_bf_report_poll(PADAPTER adapter, u8 *ra, u8 bFinalPoll)
set_duration(pframe, 100); set_duration(pframe, 100);
/* RA */ /* RA */
_rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN); memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
/* TA */ /* TA */
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN); memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN);
/* Feedback Segment Retransmission Bitmap */ /* Feedback Segment Retransmission Bitmap */
pframe[16] = 0xFF; pframe[16] = 0xFF;
@ -1017,7 +1017,7 @@ static struct beamformer_entry *_bfer_add_entry(PADAPTER adapter,
bfer->used = _TRUE; bfer->used = _TRUE;
_get_txvector_parameter(adapter, sta, &bfer->g_id, &bfer->p_aid); _get_txvector_parameter(adapter, sta, &bfer->g_id, &bfer->p_aid);
_rtw_memcpy(bfer->mac_addr, sta->cmn.mac_addr, ETH_ALEN); memcpy(bfer->mac_addr, sta->cmn.mac_addr, ETH_ALEN);
bfer->cap = bf_cap; bfer->cap = bf_cap;
bfer->state = BEAMFORM_ENTRY_HW_STATE_ADD_INIT; bfer->state = BEAMFORM_ENTRY_HW_STATE_ADD_INIT;
bfer->NumofSoundingDim = sounding_dim; bfer->NumofSoundingDim = sounding_dim;
@ -1209,7 +1209,7 @@ static struct beamformee_entry *_bfee_add_entry(PADAPTER adapter,
sta->cmn.bf_info.g_id = bfee->g_id; sta->cmn.bf_info.g_id = bfee->g_id;
sta->cmn.bf_info.p_aid = bfee->p_aid; sta->cmn.bf_info.p_aid = bfee->p_aid;
_rtw_memcpy(bfee->mac_addr, sta->cmn.mac_addr, ETH_ALEN); memcpy(bfee->mac_addr, sta->cmn.mac_addr, ETH_ALEN);
bfee->txbf = _FALSE; bfee->txbf = _FALSE;
bfee->sounding = _FALSE; bfee->sounding = _FALSE;
bfee->sound_period = 40; bfee->sound_period = 40;
@ -1722,18 +1722,18 @@ u8 rtw_bf_send_vht_gid_mgnt_packet(PADAPTER adapter, u8 *ra, u8 *gid, u8 *positi
SetFragNum(pframe, 0); SetFragNum(pframe, 0);
SetSeqNum(pframe, 0); SetSeqNum(pframe, 0);
_rtw_memcpy(wlanhdr->addr1, ra, ETH_ALEN); memcpy(wlanhdr->addr1, ra, ETH_ALEN);
_rtw_memcpy(wlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN); memcpy(wlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN);
_rtw_memcpy(wlanhdr->addr3, get_bssid(mlmepriv), ETH_ALEN); memcpy(wlanhdr->addr3, get_bssid(mlmepriv), ETH_ALEN);
pframe[24] = RTW_WLAN_CATEGORY_VHT; pframe[24] = RTW_WLAN_CATEGORY_VHT;
pframe[25] = RTW_WLAN_ACTION_VHT_GROUPID_MANAGEMENT; pframe[25] = RTW_WLAN_ACTION_VHT_GROUPID_MANAGEMENT;
/* Set Membership Status Array */ /* Set Membership Status Array */
ptr = pframe + 26; ptr = pframe + 26;
_rtw_memcpy(ptr, gid, 8); memcpy(ptr, gid, 8);
/* Set User Position Array */ /* Set User Position Array */
ptr = pframe + 34; ptr = pframe + 34;
_rtw_memcpy(ptr, position, 16); memcpy(ptr, position, 16);
attrib->pktlen = 54; attrib->pktlen = 54;
attrib->last_txcmdsz = attrib->pktlen; attrib->last_txcmdsz = attrib->pktlen;
@ -1879,7 +1879,7 @@ u8 rtw_bf_cmd(PADAPTER adapter, s32 type, u8 *pbuf, s32 size, u8 enqueue)
goto exit; goto exit;
} }
_rtw_memcpy(wk_buf, pbuf, size); memcpy(wk_buf, pbuf, size);
} else { } else {
wk_buf = NULL; wk_buf = NULL;
size = 0; size = 0;
@ -2077,7 +2077,7 @@ struct beamforming_entry *beamforming_add_entry(PADAPTER adapter, u8 *ra, u16 ai
pEntry->p_aid = (pEntry->p_aid << 1) | (ra[4] >> 7); pEntry->p_aid = (pEntry->p_aid << 1) | (ra[4] >> 7);
pEntry->g_id = 0; pEntry->g_id = 0;
} }
_rtw_memcpy(pEntry->mac_addr, ra, ETH_ALEN); memcpy(pEntry->mac_addr, ra, ETH_ALEN);
pEntry->bSound = _FALSE; pEntry->bSound = _FALSE;
/* 3 TODO SW/FW sound period */ /* 3 TODO SW/FW sound period */
@ -2217,9 +2217,9 @@ BOOLEAN issue_ht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, enum channel_width bw,
set_order_bit(pframe); set_order_bit(pframe);
set_frame_sub_type(pframe, WIFI_ACTION_NOACK); set_frame_sub_type(pframe, WIFI_ACTION_NOACK);
_rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN); memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN); memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN);
if (pmlmeext->cur_wireless_mode == WIRELESS_11B) if (pmlmeext->cur_wireless_mode == WIRELESS_11B)
aSifsTime = 10; aSifsTime = 10;
@ -2239,7 +2239,7 @@ BOOLEAN issue_ht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, enum channel_width bw,
SET_HT_CTRL_CSI_STEERING(pframe + 24, 3); SET_HT_CTRL_CSI_STEERING(pframe + 24, 3);
SET_HT_CTRL_NDP_ANNOUNCEMENT(pframe + 24, 1); SET_HT_CTRL_NDP_ANNOUNCEMENT(pframe + 24, 1);
_rtw_memcpy(pframe + 28, ActionHdr, 4); memcpy(pframe + 28, ActionHdr, 4);
pattrib->pktlen = 32; pattrib->pktlen = 32;
@ -2293,9 +2293,9 @@ BOOLEAN issue_ht_ndpa_packet(PADAPTER Adapter, u8 *ra, enum channel_width bw, u8
set_order_bit(pframe); set_order_bit(pframe);
set_frame_sub_type(pframe, WIFI_ACTION_NOACK); set_frame_sub_type(pframe, WIFI_ACTION_NOACK);
_rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN); memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN); memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN);
if (pmlmeext->cur_wireless_mode == WIRELESS_11B) if (pmlmeext->cur_wireless_mode == WIRELESS_11B)
aSifsTime = 10; aSifsTime = 10;
@ -2315,7 +2315,7 @@ BOOLEAN issue_ht_ndpa_packet(PADAPTER Adapter, u8 *ra, enum channel_width bw, u8
SET_HT_CTRL_CSI_STEERING(pframe + 24, 3); SET_HT_CTRL_CSI_STEERING(pframe + 24, 3);
SET_HT_CTRL_NDP_ANNOUNCEMENT(pframe + 24, 1); SET_HT_CTRL_NDP_ANNOUNCEMENT(pframe + 24, 1);
_rtw_memcpy(pframe + 28, ActionHdr, 4); memcpy(pframe + 28, ActionHdr, 4);
pattrib->pktlen = 32; pattrib->pktlen = 32;
@ -2379,8 +2379,8 @@ BOOLEAN issue_vht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, enum channel
set_frame_sub_type(pframe, WIFI_NDPA); set_frame_sub_type(pframe, WIFI_NDPA);
_rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN); memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN); memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN);
if (is_supported_5g(pmlmeext->cur_wireless_mode) || is_supported_ht(pmlmeext->cur_wireless_mode)) if (is_supported_5g(pmlmeext->cur_wireless_mode) || is_supported_ht(pmlmeext->cur_wireless_mode))
aSifsTime = 16; aSifsTime = 16;
@ -2404,7 +2404,7 @@ BOOLEAN issue_vht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, enum channel
else else
pBeamInfo->sounding_sequence++; pBeamInfo->sounding_sequence++;
_rtw_memcpy(pframe + 16, &sequence, 1); memcpy(pframe + 16, &sequence, 1);
if (((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE)) if (((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE))
aid = 0; aid = 0;
@ -2412,7 +2412,7 @@ BOOLEAN issue_vht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, enum channel
sta_info.feedback_type = 0; sta_info.feedback_type = 0;
sta_info.nc_index = 0; sta_info.nc_index = 0;
_rtw_memcpy(pframe + 17, (u8 *)&sta_info, 2); memcpy(pframe + 17, (u8 *)&sta_info, 2);
pattrib->pktlen = 19; pattrib->pktlen = 19;
@ -2465,8 +2465,8 @@ BOOLEAN issue_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, enum channel_wi
set_frame_sub_type(pframe, WIFI_NDPA); set_frame_sub_type(pframe, WIFI_NDPA);
_rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN); memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN); memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN);
if (is_supported_5g(pmlmeext->cur_wireless_mode) || is_supported_ht(pmlmeext->cur_wireless_mode)) if (is_supported_5g(pmlmeext->cur_wireless_mode) || is_supported_ht(pmlmeext->cur_wireless_mode))
aSifsTime = 16; aSifsTime = 16;
@ -2490,7 +2490,7 @@ BOOLEAN issue_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, enum channel_wi
else else
pBeamInfo->sounding_sequence++; pBeamInfo->sounding_sequence++;
_rtw_memcpy(pframe + 16, &sequence, 1); memcpy(pframe + 16, &sequence, 1);
if (((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE)) if (((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE))
aid = 0; aid = 0;
@ -2499,7 +2499,7 @@ BOOLEAN issue_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, enum channel_wi
sta_info.feedback_type = 0; sta_info.feedback_type = 0;
sta_info.nc_index = 0; sta_info.nc_index = 0;
_rtw_memcpy(pframe + 17, (u8 *)&sta_info, 2); memcpy(pframe + 17, (u8 *)&sta_info, 2);
pattrib->pktlen = 19; pattrib->pktlen = 19;
@ -2947,7 +2947,7 @@ u32 rtw_beamforming_get_report_frame(PADAPTER Adapter, union recv_frame *precv_
else else
pBeamformEntry->DefaultCsiCnt++; pBeamformEntry->DefaultCsiCnt++;
_rtw_memcpy(&pBeamformEntry->PreCsiReport, pframe, frame_len); memcpy(&pBeamformEntry->PreCsiReport, pframe, frame_len);
pBeamformEntry->bDefaultCSI = _FALSE; pBeamformEntry->bDefaultCSI = _FALSE;
@ -3120,7 +3120,7 @@ u8 beamforming_wk_cmd(_adapter *padapter, s32 type, u8 *pbuf, s32 size, u8 enque
goto exit; goto exit;
} }
_rtw_memcpy(wk_buf, pbuf, size); memcpy(wk_buf, pbuf, size);
} else { } else {
wk_buf = NULL; wk_buf = NULL;
size = 0; size = 0;

View File

@ -215,8 +215,8 @@ mptbt_BtFwOpCodeProcess(
pH2c->opCodeVer = opCodeVer; pH2c->opCodeVer = opCodeVer;
pH2c->reqNum = pMptCtx->h2cReqNum; pH2c->reqNum = pMptCtx->h2cReqNum;
/* PlatformMoveMemory(&pH2c->buf[0], pH2cPar, h2cParaLen); */ /* PlatformMoveMemory(&pH2c->buf[0], pH2cPar, h2cParaLen); */
/* _rtw_memcpy(&pH2c->buf[0], pH2cPar, h2cParaLen); */ /* memcpy(&pH2c->buf[0], pH2cPar, h2cParaLen); */
_rtw_memcpy(pH2c->buf, pH2cPar, h2cParaLen); memcpy(pH2c->buf, pH2cPar, h2cParaLen);
RTW_INFO("[MPT], pH2c->opCode=%d\n", pH2c->opCode); RTW_INFO("[MPT], pH2c->opCode=%d\n", pH2c->opCode);
RTW_INFO("[MPT], pH2c->opCodeVer=%d\n", pH2c->opCodeVer); RTW_INFO("[MPT], pH2c->opCodeVer=%d\n", pH2c->opCodeVer);
@ -499,7 +499,7 @@ MPTBT_FwC2hBtMpCtrl(
case EXT_C2H_TRIG_BY_BT_FW: case EXT_C2H_TRIG_BY_BT_FW:
RTW_INFO("[MPT], EXT_C2H_TRIG_BY_BT_FW\n"); RTW_INFO("[MPT], EXT_C2H_TRIG_BY_BT_FW\n");
_rtw_memcpy(&pMptCtx->c2hBuf[0], tmpBuf, length); memcpy(&pMptCtx->c2hBuf[0], tmpBuf, length);
RTW_INFO("[MPT], pExtC2h->statusCode=0x%x\n", pExtC2h->statusCode); RTW_INFO("[MPT], pExtC2h->statusCode=0x%x\n", pExtC2h->statusCode);
RTW_INFO("[MPT], pExtC2h->retLen=0x%x\n", pExtC2h->retLen); RTW_INFO("[MPT], pExtC2h->retLen=0x%x\n", pExtC2h->retLen);
RTW_INFO("[MPT], pExtC2h->opCodeVer=0x%x\n", pExtC2h->opCodeVer); RTW_INFO("[MPT], pExtC2h->opCodeVer=0x%x\n", pExtC2h->opCodeVer);

View File

@ -550,7 +550,7 @@ u8 rtw_btcoex_btinfo_cmd(_adapter *adapter, u8 *buf, u16 len)
pdrvextra_cmd_parm->size = len; pdrvextra_cmd_parm->size = len;
pdrvextra_cmd_parm->pbuf = btinfo; pdrvextra_cmd_parm->pbuf = btinfo;
_rtw_memcpy(btinfo, buf, len); memcpy(btinfo, buf, len);
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra)); init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
@ -635,7 +635,7 @@ u8 rtw_btcoex_parse_BT_info_notify_cmd(_adapter *padapter, u8 *pcmd, u16 cmdlen)
#endif #endif
{ {
if (0x1 == btInfoReason || 0x2 == btInfoReason) { if (0x1 == btInfoReason || 0x2 == btInfoReason) {
_rtw_memcpy(btinfo, &pcmd[4], btInfoLen); memcpy(btinfo, &pcmd[4], btInfoLen);
btinfo[0] = btInfoReason; btinfo[0] = btInfoReason;
rtw_btcoex_btinfo_cmd(padapter, btinfo, btInfoLen); rtw_btcoex_btinfo_cmd(padapter, btinfo, btInfoLen);
} else } else
@ -1323,7 +1323,7 @@ void rtw_btcoex_recvmsgbysocket(void *data)
/*important: cut the udp header from skb->data! header length is 8 byte*/ /*important: cut the udp header from skb->data! header length is 8 byte*/
recv_length = skb->len - 8; recv_length = skb->len - 8;
memset(recv_data, 0, sizeof(recv_data)); memset(recv_data, 0, sizeof(recv_data));
_rtw_memcpy(recv_data, skb->data + 8, recv_length); memcpy(recv_data, skb->data + 8, recv_length);
parse_res = rtw_btcoex_parse_recv_data(recv_data, recv_length); parse_res = rtw_btcoex_parse_recv_data(recv_data, recv_length);
#if 0 #if 0
@ -1650,7 +1650,7 @@ void rtw_btcoex_SendEventExtBtCoexControl(PADAPTER padapter, u8 bNeedDbgRsp, u8
/* Return parameters starts from here */ /* Return parameters starts from here */
pRetPar = &pEvent->Data[len]; pRetPar = &pEvent->Data[len];
_rtw_memcpy(&pRetPar[0], pData, dataLen); memcpy(&pRetPar[0], pData, dataLen);
len += dataLen; len += dataLen;
@ -1692,7 +1692,7 @@ void rtw_btcoex_SendEventExtBtInfoControl(PADAPTER padapter, u8 dataLen, void *p
/* Return parameters starts from here */ /* Return parameters starts from here */
pRetPar = &pEvent->Data[len]; pRetPar = &pEvent->Data[len];
_rtw_memcpy(&pRetPar[0], pData, dataLen); memcpy(&pRetPar[0], pData, dataLen);
len += dataLen; len += dataLen;

View File

@ -651,7 +651,7 @@ _next:
RTW_INFO(ADPT_FMT" "CMD_FMT" %sexecute\n", ADPT_ARG(pcmd->padapter), CMD_ARG(pcmd) RTW_INFO(ADPT_FMT" "CMD_FMT" %sexecute\n", ADPT_ARG(pcmd->padapter), CMD_ARG(pcmd)
, pcmd->res == H2C_ENQ_HEAD ? "ENQ_HEAD " : (pcmd->res == H2C_ENQ_HEAD_FAIL ? "ENQ_HEAD_FAIL " : "")); , pcmd->res == H2C_ENQ_HEAD ? "ENQ_HEAD " : (pcmd->res == H2C_ENQ_HEAD_FAIL ? "ENQ_HEAD_FAIL " : ""));
_rtw_memcpy(pcmdbuf, pcmd->parmbuf, pcmd->cmdsz); memcpy(pcmdbuf, pcmd->parmbuf, pcmd->cmdsz);
ret = cmd_hdl(pcmd->padapter, pcmdbuf); ret = cmd_hdl(pcmd->padapter, pcmdbuf);
pcmd->res = ret; pcmd->res = ret;
@ -889,7 +889,7 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, struct sitesurvey_parm *pparm)
} }
if (pparm) if (pparm)
_rtw_memcpy(psurveyPara, pparm, sizeof(struct sitesurvey_parm)); memcpy(psurveyPara, pparm, sizeof(struct sitesurvey_parm));
else else
psurveyPara->scan_mode = pmlmepriv->scan_mode; psurveyPara->scan_mode = pmlmepriv->scan_mode;
@ -940,10 +940,10 @@ u8 rtw_setdatarate_cmd(_adapter *padapter, u8 *rateset)
init_h2fwcmd_w_parm_no_rsp(ph2c, pbsetdataratepara, GEN_CMD_CODE(_SetDataRate)); init_h2fwcmd_w_parm_no_rsp(ph2c, pbsetdataratepara, GEN_CMD_CODE(_SetDataRate));
#ifdef MP_FIRMWARE_OFFLOAD #ifdef MP_FIRMWARE_OFFLOAD
pbsetdataratepara->curr_rateidx = *(u32 *)rateset; pbsetdataratepara->curr_rateidx = *(u32 *)rateset;
/* _rtw_memcpy(pbsetdataratepara, rateset, sizeof(u32)); */ /* memcpy(pbsetdataratepara, rateset, sizeof(u32)); */
#else #else
pbsetdataratepara->mac_id = 5; pbsetdataratepara->mac_id = 5;
_rtw_memcpy(pbsetdataratepara->datarates, rateset, NumRates); memcpy(pbsetdataratepara->datarates, rateset, NumRates);
#endif #endif
res = rtw_enqueue_cmd(pcmdpriv, ph2c); res = rtw_enqueue_cmd(pcmdpriv, ph2c);
exit: exit:
@ -975,7 +975,7 @@ u8 rtw_setbasicrate_cmd(_adapter *padapter, u8 *rateset)
init_h2fwcmd_w_parm_no_rsp(ph2c, pssetbasicratepara, _SetBasicRate_CMD_); init_h2fwcmd_w_parm_no_rsp(ph2c, pssetbasicratepara, _SetBasicRate_CMD_);
_rtw_memcpy(pssetbasicratepara->basicrates, rateset, NumRates); memcpy(pssetbasicratepara->basicrates, rateset, NumRates);
res = rtw_enqueue_cmd(pcmdpriv, ph2c); res = rtw_enqueue_cmd(pcmdpriv, ph2c);
exit: exit:
@ -1440,15 +1440,15 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
memset(psecnetwork, 0, t_len); memset(psecnetwork, 0, t_len);
_rtw_memcpy(psecnetwork, &pnetwork->network, get_WLAN_BSSID_EX_sz(&pnetwork->network)); memcpy(psecnetwork, &pnetwork->network, get_WLAN_BSSID_EX_sz(&pnetwork->network));
auth = &psecuritypriv->authenticator_ie[0]; auth = &psecuritypriv->authenticator_ie[0];
psecuritypriv->authenticator_ie[0] = (unsigned char)psecnetwork->IELength; psecuritypriv->authenticator_ie[0] = (unsigned char)psecnetwork->IELength;
if ((psecnetwork->IELength - 12) < (256 - 1)) if ((psecnetwork->IELength - 12) < (256 - 1))
_rtw_memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], psecnetwork->IELength - 12); memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], psecnetwork->IELength - 12);
else else
_rtw_memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], (256 - 1)); memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], (256 - 1));
psecnetwork->IELength = 0; psecnetwork->IELength = 0;
/* Added by Albert 2009/02/18 */ /* Added by Albert 2009/02/18 */
@ -1457,10 +1457,10 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
/* the driver just has the bssid information for PMKIDList searching. */ /* the driver just has the bssid information for PMKIDList searching. */
if (pmlmepriv->assoc_by_bssid == _FALSE) if (pmlmepriv->assoc_by_bssid == _FALSE)
_rtw_memcpy(&pmlmepriv->assoc_bssid[0], &pnetwork->network.MacAddress[0], ETH_ALEN); memcpy(&pmlmepriv->assoc_bssid[0], &pnetwork->network.MacAddress[0], ETH_ALEN);
/* copy fixed ie */ /* copy fixed ie */
_rtw_memcpy(psecnetwork->IEs, pnetwork->network.IEs, 12); memcpy(psecnetwork->IEs, pnetwork->network.IEs, 12);
psecnetwork->IELength = 12; psecnetwork->IELength = 12;
psecnetwork->IELength += rtw_restruct_sec_ie(padapter, psecnetwork->IEs + psecnetwork->IELength); psecnetwork->IELength += rtw_restruct_sec_ie(padapter, psecnetwork->IEs + psecnetwork->IELength);
@ -1526,9 +1526,9 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
psecuritypriv->supplicant_ie[0] = (u8)psecnetwork->IELength; psecuritypriv->supplicant_ie[0] = (u8)psecnetwork->IELength;
if (psecnetwork->IELength < (256 - 1)) if (psecnetwork->IELength < (256 - 1))
_rtw_memcpy(&psecuritypriv->supplicant_ie[1], &psecnetwork->IEs[0], psecnetwork->IELength); memcpy(&psecuritypriv->supplicant_ie[1], &psecnetwork->IEs[0], psecnetwork->IELength);
else else
_rtw_memcpy(&psecuritypriv->supplicant_ie[1], &psecnetwork->IEs[0], (256 - 1)); memcpy(&psecuritypriv->supplicant_ie[1], &psecnetwork->IEs[0], (256 - 1));
#endif #endif
pcmd->cmdsz = sizeof(WLAN_BSSID_EX); pcmd->cmdsz = sizeof(WLAN_BSSID_EX);
@ -1743,7 +1743,7 @@ u8 rtw_setstakey_cmd(_adapter *padapter, struct sta_info *sta, u8 key_type, bool
goto exit; goto exit;
} }
_rtw_memcpy(psetstakey_para->addr, sta->cmn.mac_addr, ETH_ALEN); memcpy(psetstakey_para->addr, sta->cmn.mac_addr, ETH_ALEN);
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) if (check_fwstate(pmlmepriv, WIFI_STATION_STATE))
psetstakey_para->algorithm = (unsigned char) psecuritypriv->dot11PrivacyAlgrthm; psetstakey_para->algorithm = (unsigned char) psecuritypriv->dot11PrivacyAlgrthm;
@ -1751,13 +1751,13 @@ u8 rtw_setstakey_cmd(_adapter *padapter, struct sta_info *sta, u8 key_type, bool
GET_ENCRY_ALGO(psecuritypriv, sta, psetstakey_para->algorithm, _FALSE); GET_ENCRY_ALGO(psecuritypriv, sta, psetstakey_para->algorithm, _FALSE);
if (key_type == GROUP_KEY) { if (key_type == GROUP_KEY) {
_rtw_memcpy(&psetstakey_para->key, &psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey, 16); memcpy(&psetstakey_para->key, &psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey, 16);
psetstakey_para->gk = 1; psetstakey_para->gk = 1;
} else if (key_type == UNICAST_KEY) } else if (key_type == UNICAST_KEY)
_rtw_memcpy(&psetstakey_para->key, &sta->dot118021x_UncstKey, 16); memcpy(&psetstakey_para->key, &sta->dot118021x_UncstKey, 16);
#ifdef CONFIG_TDLS #ifdef CONFIG_TDLS
else if (key_type == TDLS_KEY) { else if (key_type == TDLS_KEY) {
_rtw_memcpy(&psetstakey_para->key, sta->tpk.tk, 16); memcpy(&psetstakey_para->key, sta->tpk.tk, 16);
psetstakey_para->algorithm = (u8)sta->dot118021XPrivacy; psetstakey_para->algorithm = (u8)sta->dot118021XPrivacy;
} }
#endif /* CONFIG_TDLS */ #endif /* CONFIG_TDLS */
@ -1841,7 +1841,7 @@ u8 rtw_clearstakey_cmd(_adapter *padapter, struct sta_info *sta, u8 enqueue)
ph2c->rsp = (u8 *) psetstakey_rsp; ph2c->rsp = (u8 *) psetstakey_rsp;
ph2c->rspsz = sizeof(struct set_stakey_rsp); ph2c->rspsz = sizeof(struct set_stakey_rsp);
_rtw_memcpy(psetstakey_para->addr, sta->cmn.mac_addr, ETH_ALEN); memcpy(psetstakey_para->addr, sta->cmn.mac_addr, ETH_ALEN);
psetstakey_para->algorithm = _NO_PRIVACY_; psetstakey_para->algorithm = _NO_PRIVACY_;
@ -1877,7 +1877,7 @@ u8 rtw_setrttbl_cmd(_adapter *padapter, struct setratable_parm *prate_table)
init_h2fwcmd_w_parm_no_rsp(ph2c, psetrttblparm, GEN_CMD_CODE(_SetRaTable)); init_h2fwcmd_w_parm_no_rsp(ph2c, psetrttblparm, GEN_CMD_CODE(_SetRaTable));
_rtw_memcpy(psetrttblparm, prate_table, sizeof(struct setratable_parm)); memcpy(psetrttblparm, prate_table, sizeof(struct setratable_parm));
res = rtw_enqueue_cmd(pcmdpriv, ph2c); res = rtw_enqueue_cmd(pcmdpriv, ph2c);
exit: exit:
@ -1956,7 +1956,7 @@ u8 rtw_setassocsta_cmd(_adapter *padapter, u8 *mac_addr)
ph2c->rsp = (u8 *) psetassocsta_rsp; ph2c->rsp = (u8 *) psetassocsta_rsp;
ph2c->rspsz = sizeof(struct set_assocsta_rsp); ph2c->rspsz = sizeof(struct set_assocsta_rsp);
_rtw_memcpy(psetassocsta_para->addr, mac_addr, ETH_ALEN); memcpy(psetassocsta_para->addr, mac_addr, ETH_ALEN);
res = rtw_enqueue_cmd(pcmdpriv, ph2c); res = rtw_enqueue_cmd(pcmdpriv, ph2c);
@ -1989,7 +1989,7 @@ u8 rtw_addbareq_cmd(_adapter *padapter, u8 tid, u8 *addr)
} }
paddbareq_parm->tid = tid; paddbareq_parm->tid = tid;
_rtw_memcpy(paddbareq_parm->addr, addr, ETH_ALEN); memcpy(paddbareq_parm->addr, addr, ETH_ALEN);
init_h2fwcmd_w_parm_no_rsp(ph2c, paddbareq_parm, GEN_CMD_CODE(_AddBAReq)); init_h2fwcmd_w_parm_no_rsp(ph2c, paddbareq_parm, GEN_CMD_CODE(_AddBAReq));
@ -2026,7 +2026,7 @@ u8 rtw_addbarsp_cmd(_adapter *padapter, u8 *addr, u16 tid, u8 status, u8 size, u
goto exit; goto exit;
} }
_rtw_memcpy(paddBaRsp_parm->addr, addr, ETH_ALEN); memcpy(paddBaRsp_parm->addr, addr, ETH_ALEN);
paddBaRsp_parm->tid = tid; paddBaRsp_parm->tid = tid;
paddBaRsp_parm->status = status; paddBaRsp_parm->status = status;
paddBaRsp_parm->size = size; paddBaRsp_parm->size = size;
@ -2438,7 +2438,7 @@ u8 rtw_tdls_cmd(_adapter *padapter, u8 *addr, u8 option)
_rtw_spinlock(&(padapter->tdlsinfo.cmd_lock)); _rtw_spinlock(&(padapter->tdlsinfo.cmd_lock));
if (addr != NULL) if (addr != NULL)
_rtw_memcpy(TDLSoption->addr, addr, 6); memcpy(TDLSoption->addr, addr, 6);
TDLSoption->option = option; TDLSoption->option = option;
_rtw_spinunlock(&(padapter->tdlsinfo.cmd_lock)); _rtw_spinunlock(&(padapter->tdlsinfo.cmd_lock));
init_h2fwcmd_w_parm_no_rsp(pcmdobj, TDLSoption, GEN_CMD_CODE(_TDLS)); init_h2fwcmd_w_parm_no_rsp(pcmdobj, TDLSoption, GEN_CMD_CODE(_TDLS));
@ -3164,7 +3164,7 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer)
/* TDLS_WATCHDOG_PERIOD * 2sec, periodically send */ /* TDLS_WATCHDOG_PERIOD * 2sec, periodically send */
if (hal_chk_wl_func(padapter, WL_FUNC_TDLS) == _TRUE) { if (hal_chk_wl_func(padapter, WL_FUNC_TDLS) == _TRUE) {
if ((ptdlsinfo->watchdog_count % TDLS_WATCHDOG_PERIOD) == 0) { if ((ptdlsinfo->watchdog_count % TDLS_WATCHDOG_PERIOD) == 0) {
_rtw_memcpy(txmgmt.peer, baddr, ETH_ALEN); memcpy(txmgmt.peer, baddr, ETH_ALEN);
issue_tdls_dis_req(padapter, &txmgmt); issue_tdls_dis_req(padapter, &txmgmt);
} }
ptdlsinfo->watchdog_count++; ptdlsinfo->watchdog_count++;
@ -3852,7 +3852,7 @@ static u8 _p2p_roch_cmd(_adapter *adapter
roch_parm->cookie = cookie; roch_parm->cookie = cookie;
roch_parm->wdev = wdev; roch_parm->wdev = wdev;
if (!cancel) { if (!cancel) {
_rtw_memcpy(&roch_parm->ch, ch, sizeof(struct ieee80211_channel)); memcpy(&roch_parm->ch, ch, sizeof(struct ieee80211_channel));
roch_parm->ch_type = ch_type; roch_parm->ch_type = ch_type;
roch_parm->duration = duration; roch_parm->duration = duration;
} }
@ -4704,7 +4704,7 @@ u8 rtw_btinfo_cmd(_adapter *adapter, u8 *buf, u16 len)
pdrvextra_cmd_parm->size = len; pdrvextra_cmd_parm->size = len;
pdrvextra_cmd_parm->pbuf = btinfo; pdrvextra_cmd_parm->pbuf = btinfo;
_rtw_memcpy(btinfo, buf, len); memcpy(btinfo, buf, len);
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra)); init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
@ -4749,7 +4749,7 @@ u8 rtw_test_h2c_cmd(_adapter *adapter, u8 *buf, u8 len)
pdrvextra_cmd_parm->size = len; pdrvextra_cmd_parm->size = len;
pdrvextra_cmd_parm->pbuf = ph2c_content; pdrvextra_cmd_parm->pbuf = ph2c_content;
_rtw_memcpy(ph2c_content, buf, len); memcpy(ph2c_content, buf, len);
init_h2fwcmd_w_parm_no_rsp(pcmdobj, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra)); init_h2fwcmd_w_parm_no_rsp(pcmdobj, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
@ -4984,7 +4984,7 @@ static u8 rtw_customer_str_cmd(_adapter *adapter, u8 write, const u8 *cstr)
parm->pbuf = write ? str : NULL; parm->pbuf = write ? str : NULL;
if (write) if (write)
_rtw_memcpy(str, cstr, RTW_CUSTOMER_STR_LEN); memcpy(str, cstr, RTW_CUSTOMER_STR_LEN);
/* need enqueue, prepare cmd_obj and enqueue */ /* need enqueue, prepare cmd_obj and enqueue */
cmdobj = (struct cmd_obj *)rtw_zmalloc(sizeof(*cmdobj)); cmdobj = (struct cmd_obj *)rtw_zmalloc(sizeof(*cmdobj));
@ -5057,7 +5057,7 @@ u8 rtw_c2h_wk_cmd(PADAPTER padapter, u8 *pbuf, u16 length, u8 type)
goto exit; goto exit;
} }
_rtw_memcpy(extra_cmd_buf, pbuf, length); memcpy(extra_cmd_buf, pbuf, length);
pdrvextra_cmd_parm->ec_id = C2H_WK_CID; pdrvextra_cmd_parm->ec_id = C2H_WK_CID;
pdrvextra_cmd_parm->type = type; pdrvextra_cmd_parm->type = type;
pdrvextra_cmd_parm->size = length; pdrvextra_cmd_parm->size = length;
@ -5178,10 +5178,10 @@ u8 session_tracker_cmd(_adapter *adapter, u8 cmd, struct sta_info *sta, u8 *loca
st_parm->cmd = cmd; st_parm->cmd = cmd;
st_parm->sta = sta; st_parm->sta = sta;
if (cmd != ST_CMD_CHK) { if (cmd != ST_CMD_CHK) {
_rtw_memcpy(&st_parm->local_naddr, local_naddr, 4); memcpy(&st_parm->local_naddr, local_naddr, 4);
_rtw_memcpy(&st_parm->local_port, local_port, 2); memcpy(&st_parm->local_port, local_port, 2);
_rtw_memcpy(&st_parm->remote_naddr, remote_naddr, 4); memcpy(&st_parm->remote_naddr, remote_naddr, 4);
_rtw_memcpy(&st_parm->remote_port, remote_port, 2); memcpy(&st_parm->remote_port, remote_port, 2);
} }
cmd_parm->ec_id = SESSION_TRACKER_WK_CID; cmd_parm->ec_id = SESSION_TRACKER_WK_CID;
@ -5433,7 +5433,7 @@ static s32 rtw_req_per_cmd_hdl(_adapter *adapter)
u8 i, ret = _FAIL; u8 i, ret = _FAIL;
macid_bmp = &macid_ctl->if_g[adapter->iface_id]; macid_bmp = &macid_ctl->if_g[adapter->iface_id];
_rtw_memcpy(&req_macid_bmp, macid_bmp, sizeof(struct macid_bmp)); memcpy(&req_macid_bmp, macid_bmp, sizeof(struct macid_bmp));
/* Clear none mesh's macid */ /* Clear none mesh's macid */
for (i = 0; i < macid_ctl->num; i++) { for (i = 0; i < macid_ctl->num; i++) {
@ -5765,11 +5765,11 @@ void rtw_create_ibss_post_hdl(_adapter *padapter, int status)
rtw_list_insert_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue); rtw_list_insert_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue);
pdev_network->Length = get_WLAN_BSSID_EX_sz(pdev_network); pdev_network->Length = get_WLAN_BSSID_EX_sz(pdev_network);
_rtw_memcpy(&(pwlan->network), pdev_network, pdev_network->Length); memcpy(&(pwlan->network), pdev_network, pdev_network->Length);
/* pwlan->fixed = _TRUE; */ /* pwlan->fixed = _TRUE; */
/* copy pdev_network information to pmlmepriv->cur_network */ /* copy pdev_network information to pmlmepriv->cur_network */
_rtw_memcpy(&mlme_cur_network->network, pdev_network, (get_WLAN_BSSID_EX_sz(pdev_network))); memcpy(&mlme_cur_network->network, pdev_network, (get_WLAN_BSSID_EX_sz(pdev_network)));
#if 0 #if 0
/* reset DSConfig */ /* reset DSConfig */

View File

@ -900,7 +900,7 @@ int proc_get_tx_stat(struct seq_file *m, void *v)
if ((_rtw_memcmp(psta->cmn.mac_addr, bc_addr, ETH_ALEN) != _TRUE) if ((_rtw_memcmp(psta->cmn.mac_addr, bc_addr, ETH_ALEN) != _TRUE)
&& (_rtw_memcmp(psta->cmn.mac_addr, null_addr, ETH_ALEN) != _TRUE) && (_rtw_memcmp(psta->cmn.mac_addr, null_addr, ETH_ALEN) != _TRUE)
&& (_rtw_memcmp(psta->cmn.mac_addr, adapter_mac_addr(adapter), ETH_ALEN) != _TRUE)) { && (_rtw_memcmp(psta->cmn.mac_addr, adapter_mac_addr(adapter), ETH_ALEN) != _TRUE)) {
_rtw_memcpy(&sta_mac[macid_rec_idx][0], psta->cmn.mac_addr, ETH_ALEN); memcpy(&sta_mac[macid_rec_idx][0], psta->cmn.mac_addr, ETH_ALEN);
mac_id[macid_rec_idx] = psta->cmn.mac_id; mac_id[macid_rec_idx] = psta->cmn.mac_id;
macid_rec_idx++; macid_rec_idx++;
} }
@ -908,7 +908,7 @@ int proc_get_tx_stat(struct seq_file *m, void *v)
} }
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL); _exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
for (i = 0; i < macid_rec_idx; i++) { for (i = 0; i < macid_rec_idx; i++) {
_rtw_memcpy(pstapriv_primary->c2h_sta_mac, &sta_mac[i][0], ETH_ALEN); memcpy(pstapriv_primary->c2h_sta_mac, &sta_mac[i][0], ETH_ALEN);
pstapriv_primary->c2h_adapter_id = adapter->iface_id; pstapriv_primary->c2h_adapter_id = adapter->iface_id;
rtw_sctx_init(&gotc2h, 60); rtw_sctx_init(&gotc2h, 60);
pstapriv_primary->gotc2h = &gotc2h; pstapriv_primary->gotc2h = &gotc2h;
@ -1113,7 +1113,7 @@ ssize_t proc_set_roam_tgt_addr(struct file *file, const char __user *buffer, siz
int num = sscanf(tmp, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", addr, addr + 1, addr + 2, addr + 3, addr + 4, addr + 5); int num = sscanf(tmp, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", addr, addr + 1, addr + 2, addr + 3, addr + 4, addr + 5);
if (num == 6) if (num == 6)
_rtw_memcpy(adapter->mlmepriv.roam_tgt_addr, addr, ETH_ALEN); memcpy(adapter->mlmepriv.roam_tgt_addr, addr, ETH_ALEN);
RTW_INFO("set roam_tgt_addr to "MAC_FMT"\n", MAC_ARG(adapter->mlmepriv.roam_tgt_addr)); RTW_INFO("set roam_tgt_addr to "MAC_FMT"\n", MAC_ARG(adapter->mlmepriv.roam_tgt_addr));
} }
@ -5725,7 +5725,7 @@ ssize_t proc_set_tx_sa_query(struct file *file, const char __user *buffer, size_
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);
_rtw_memcpy(&mac_addr[psta->cmn.mac_id][0], psta->cmn.mac_addr, ETH_ALEN); memcpy(&mac_addr[psta->cmn.mac_id][0], psta->cmn.mac_addr, ETH_ALEN);
} }
} }
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL); _exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
@ -5814,7 +5814,7 @@ ssize_t proc_set_tx_deauth(struct file *file, const char __user *buffer, size_t
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);
_rtw_memcpy(&mac_addr[psta->cmn.mac_id][0], psta->cmn.mac_addr, ETH_ALEN); memcpy(&mac_addr[psta->cmn.mac_id][0], psta->cmn.mac_addr, ETH_ALEN);
} }
} }
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL); _exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);

View File

@ -207,7 +207,7 @@ int rtw_check_network_type(unsigned char *rate, int ratelen, int channel)
u8 *rtw_set_fixed_ie(unsigned char *pbuf, unsigned int len, unsigned char *source, u8 *rtw_set_fixed_ie(unsigned char *pbuf, unsigned int len, unsigned char *source,
unsigned int *frlen) unsigned int *frlen)
{ {
_rtw_memcpy((void *)pbuf, (void *)source, len); memcpy((void *)pbuf, (void *)source, len);
*frlen = *frlen + len; *frlen = *frlen + len;
return pbuf + len; return pbuf + len;
} }
@ -227,7 +227,7 @@ u8 *rtw_set_ie
*(pbuf + 1) = (u8)len; *(pbuf + 1) = (u8)len;
if (len > 0) if (len > 0)
_rtw_memcpy((void *)(pbuf + 2), (void *)source, len); memcpy((void *)(pbuf + 2), (void *)source, len);
if (frlen) if (frlen)
*frlen = *frlen + (len + 2); *frlen = *frlen + (len + 2);
@ -349,7 +349,7 @@ u8 *rtw_get_ie_ex(const u8 *in_ie, uint in_len, u8 eid, const u8 *oui, u8 oui_le
target_ie = &in_ie[cnt]; target_ie = &in_ie[cnt];
if (ie) if (ie)
_rtw_memcpy(ie, &in_ie[cnt], in_ie[cnt + 1] + 2); memcpy(ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
if (ielen) if (ielen)
*ielen = in_ie[cnt + 1] + 2; *ielen = in_ie[cnt + 1] + 2;
@ -461,7 +461,7 @@ void rtw_set_supported_rate(u8 *SupportedRates, uint mode)
switch (mode) { switch (mode) {
case WIRELESS_11B: case WIRELESS_11B:
_rtw_memcpy(SupportedRates, WIFI_CCKRATES, IEEE80211_CCK_RATE_LEN); memcpy(SupportedRates, WIFI_CCKRATES, IEEE80211_CCK_RATE_LEN);
break; break;
case WIRELESS_11G: case WIRELESS_11G:
@ -469,15 +469,15 @@ void rtw_set_supported_rate(u8 *SupportedRates, uint mode)
case WIRELESS_11_5N: case WIRELESS_11_5N:
case WIRELESS_11A_5N: /* Todo: no basic rate for ofdm ? */ case WIRELESS_11A_5N: /* Todo: no basic rate for ofdm ? */
case WIRELESS_11_5AC: case WIRELESS_11_5AC:
_rtw_memcpy(SupportedRates, WIFI_OFDMRATES, IEEE80211_NUM_OFDM_RATESLEN); memcpy(SupportedRates, WIFI_OFDMRATES, IEEE80211_NUM_OFDM_RATESLEN);
break; break;
case WIRELESS_11BG: case WIRELESS_11BG:
case WIRELESS_11G_24N: case WIRELESS_11G_24N:
case WIRELESS_11_24N: case WIRELESS_11_24N:
case WIRELESS_11BG_24N: case WIRELESS_11BG_24N:
_rtw_memcpy(SupportedRates, WIFI_CCKRATES, IEEE80211_CCK_RATE_LEN); memcpy(SupportedRates, WIFI_CCKRATES, IEEE80211_CCK_RATE_LEN);
_rtw_memcpy(SupportedRates + IEEE80211_CCK_RATE_LEN, WIFI_OFDMRATES, IEEE80211_NUM_OFDM_RATESLEN); memcpy(SupportedRates + IEEE80211_CCK_RATE_LEN, WIFI_OFDMRATES, IEEE80211_NUM_OFDM_RATESLEN);
break; break;
} }
@ -603,7 +603,7 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
goto check_next_ie; goto check_next_ie;
/* check version... */ /* check version... */
_rtw_memcpy((u8 *)&val16, (pbuf + 6), sizeof(val16)); memcpy((u8 *)&val16, (pbuf + 6), sizeof(val16));
val16 = le16_to_cpu(val16); val16 = le16_to_cpu(val16);
if (val16 != 0x0001) if (val16 != 0x0001)
@ -947,7 +947,7 @@ int rtw_get_wapi_ie(u8 *in_ie, uint in_len, u8 *wapi_ie, u16 *wapi_len)
if (authmode == _WAPI_IE_ && (_rtw_memcmp(&in_ie[cnt + 6], wapi_oui1, 4) == _TRUE || if (authmode == _WAPI_IE_ && (_rtw_memcmp(&in_ie[cnt + 6], wapi_oui1, 4) == _TRUE ||
_rtw_memcmp(&in_ie[cnt + 6], wapi_oui2, 4) == _TRUE)) { _rtw_memcmp(&in_ie[cnt + 6], wapi_oui2, 4) == _TRUE)) {
if (wapi_ie) if (wapi_ie)
_rtw_memcpy(wapi_ie, &in_ie[cnt], in_ie[cnt + 1] + 2); memcpy(wapi_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
if (wapi_len) if (wapi_len)
*wapi_len = in_ie[cnt + 1] + 2; *wapi_len = in_ie[cnt + 1] + 2;
@ -986,7 +986,7 @@ int rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie,
if ((authmode == _WPA_IE_ID_) && (_rtw_memcmp(&in_ie[cnt + 2], &wpa_oui[0], 4) == _TRUE)) { if ((authmode == _WPA_IE_ID_) && (_rtw_memcmp(&in_ie[cnt + 2], &wpa_oui[0], 4) == _TRUE)) {
if (wpa_ie) if (wpa_ie)
_rtw_memcpy(wpa_ie, &in_ie[cnt], in_ie[cnt + 1] + 2); memcpy(wpa_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
*wpa_len = in_ie[cnt + 1] + 2; *wpa_len = in_ie[cnt + 1] + 2;
cnt += in_ie[cnt + 1] + 2; /* get next */ cnt += in_ie[cnt + 1] + 2; /* get next */
@ -994,7 +994,7 @@ int rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie,
if (authmode == _WPA2_IE_ID_) { if (authmode == _WPA2_IE_ID_) {
if (rsn_ie) if (rsn_ie)
_rtw_memcpy(rsn_ie, &in_ie[cnt], in_ie[cnt + 1] + 2); memcpy(rsn_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
*rsn_len = in_ie[cnt + 1] + 2; *rsn_len = in_ie[cnt + 1] + 2;
cnt += in_ie[cnt + 1] + 2; /* get next */ cnt += in_ie[cnt + 1] + 2; /* get next */
@ -1092,7 +1092,7 @@ u8 *rtw_get_wps_ie(const u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen)
wpsie_ptr = in_ie + cnt; wpsie_ptr = in_ie + cnt;
if (wps_ie) if (wps_ie)
_rtw_memcpy(wps_ie, &in_ie[cnt], in_ie[cnt + 1] + 2); memcpy(wps_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
if (wps_ielen) if (wps_ielen)
*wps_ielen = in_ie[cnt + 1] + 2; *wps_ielen = in_ie[cnt + 1] + 2;
@ -1143,7 +1143,7 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id , u8 *buf_at
target_attr_ptr = attr_ptr; target_attr_ptr = attr_ptr;
if (buf_attr) if (buf_attr)
_rtw_memcpy(buf_attr, attr_ptr, attr_len); memcpy(buf_attr, attr_ptr, attr_len);
if (len_attr) if (len_attr)
*len_attr = attr_len; *len_attr = attr_len;
@ -1180,7 +1180,7 @@ u8 *rtw_get_wps_attr_content(u8 *wps_ie, uint wps_ielen, u16 target_attr_id , u8
if (attr_ptr && attr_len) { if (attr_ptr && attr_len) {
if (buf_content) if (buf_content)
_rtw_memcpy(buf_content, attr_ptr + 4, attr_len - 4); memcpy(buf_content, attr_ptr + 4, attr_len - 4);
if (len_content) if (len_content)
*len_content = attr_len - 4; *len_content = attr_len - 4;
@ -1605,7 +1605,7 @@ void rtw_macaddr_cfg(u8 *out, const u8 *hw_mac_addr)
/* Use the mac address stored in the Efuse */ /* Use the mac address stored in the Efuse */
if (hw_mac_addr) { if (hw_mac_addr) {
_rtw_memcpy(mac, hw_mac_addr, ETH_ALEN); memcpy(mac, hw_mac_addr, ETH_ALEN);
goto err_chk; goto err_chk;
} }
@ -1628,7 +1628,7 @@ err_chk:
#endif #endif
} }
_rtw_memcpy(out, mac, ETH_ALEN); memcpy(out, mac, ETH_ALEN);
RTW_INFO("%s mac addr:"MAC_FMT"\n", __func__, MAC_ARG(out)); RTW_INFO("%s mac addr:"MAC_FMT"\n", __func__, MAC_ARG(out));
} }
@ -1972,7 +1972,7 @@ int rtw_p2p_merge_ies(u8 *in_ie, u32 in_len, u8 *merge_ie)
if (merge_ie != NULL) { if (merge_ie != NULL) {
/* Set first P2P OUI */ /* Set first P2P OUI */
_rtw_memcpy(merge_ie, ELOUI, 6); memcpy(merge_ie, ELOUI, 6);
merge_ie += 6; merge_ie += 6;
while (i < in_len) { while (i < in_len) {
@ -1980,7 +1980,7 @@ int rtw_p2p_merge_ies(u8 *in_ie, u32 in_len, u8 *merge_ie)
/* Take out the rest of P2P OUIs */ /* Take out the rest of P2P OUIs */
if (pIE->ElementID == _VENDOR_SPECIFIC_IE_ && _rtw_memcmp(pIE->data, OUI, 4)) { if (pIE->ElementID == _VENDOR_SPECIFIC_IE_ && _rtw_memcmp(pIE->data, OUI, 4)) {
_rtw_memcpy(merge_ie, pIE->data + 4, pIE->Length - 4); memcpy(merge_ie, pIE->data + 4, pIE->Length - 4);
len += pIE->Length - 4; len += pIE->Length - 4;
merge_ie += pIE->Length - 4; merge_ie += pIE->Length - 4;
} }
@ -2060,7 +2060,7 @@ u8 *rtw_get_p2p_ie(const u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen)
p2p_ie_ptr = in_ie + cnt; p2p_ie_ptr = in_ie + cnt;
if (p2p_ie) if (p2p_ie)
_rtw_memcpy(p2p_ie, &in_ie[cnt], in_ie[cnt + 1] + 2); memcpy(p2p_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
if (p2p_ielen) if (p2p_ielen)
*p2p_ielen = in_ie[cnt + 1] + 2; *p2p_ielen = in_ie[cnt + 1] + 2;
@ -2118,7 +2118,7 @@ u8 *rtw_get_p2p_attr(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id , u8 *buf_att
target_attr_ptr = attr_ptr; target_attr_ptr = attr_ptr;
if (buf_attr) if (buf_attr)
_rtw_memcpy(buf_attr, attr_ptr, attr_len); memcpy(buf_attr, attr_ptr, attr_len);
if (len_attr) if (len_attr)
*len_attr = attr_len; *len_attr = attr_len;
@ -2153,7 +2153,7 @@ u8 *rtw_get_p2p_attr_content(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id , u8
if (attr_ptr && attr_len) { if (attr_ptr && attr_len) {
if (buf_content) if (buf_content)
_rtw_memcpy(buf_content, attr_ptr + 3, attr_len - 3); memcpy(buf_content, attr_ptr + 3, attr_len - 3);
if (len_content) if (len_content)
*len_content = attr_len - 3; *len_content = attr_len - 3;
@ -2174,7 +2174,7 @@ u32 rtw_set_p2p_attr_content(u8 *pbuf, u8 attr_id, u16 attr_len, u8 *pdata_attr)
RTW_PUT_LE16(pbuf + 1, attr_len); RTW_PUT_LE16(pbuf + 1, attr_len);
if (pdata_attr) if (pdata_attr)
_rtw_memcpy(pbuf + 3, pdata_attr, attr_len); memcpy(pbuf + 3, pdata_attr, attr_len);
a_len = attr_len + 3; a_len = attr_len + 3;
@ -2404,7 +2404,7 @@ u8 *rtw_get_wfd_ie(const u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
wfd_ie_ptr = in_ie + cnt; wfd_ie_ptr = in_ie + cnt;
if (wfd_ie) if (wfd_ie)
_rtw_memcpy(wfd_ie, &in_ie[cnt], in_ie[cnt + 1] + 2); memcpy(wfd_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
if (wfd_ielen) if (wfd_ielen)
*wfd_ielen = in_ie[cnt + 1] + 2; *wfd_ielen = in_ie[cnt + 1] + 2;
@ -2462,7 +2462,7 @@ u8 *rtw_get_wfd_attr(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id, u8 *buf_attr
target_attr_ptr = attr_ptr; target_attr_ptr = attr_ptr;
if (buf_attr) if (buf_attr)
_rtw_memcpy(buf_attr, attr_ptr, attr_len); memcpy(buf_attr, attr_ptr, attr_len);
if (len_attr) if (len_attr)
*len_attr = attr_len; *len_attr = attr_len;
@ -2497,7 +2497,7 @@ u8 *rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id, u8 *
if (attr_ptr && attr_len) { if (attr_ptr && attr_len) {
if (buf_content) if (buf_content)
_rtw_memcpy(buf_content, attr_ptr + 3, attr_len - 3); memcpy(buf_content, attr_ptr + 3, attr_len - 3);
if (len_content) if (len_content)
*len_content = attr_len - 3; *len_content = attr_len - 3;

View File

@ -58,7 +58,7 @@ query_802_11_capability(
pCap->NoOfAuthEncryptPairsSupported = ulNumOfPairSupported; pCap->NoOfAuthEncryptPairsSupported = ulNumOfPairSupported;
if (sizeof(szAuthEnc) <= 240) /* 240 = 256 - 4*4 */ { /* SecurityInfo.szCapability: only 256 bytes in size. */ if (sizeof(szAuthEnc) <= 240) /* 240 = 256 - 4*4 */ { /* SecurityInfo.szCapability: only 256 bytes in size. */
_rtw_memcpy(pucAuthEncryptionSupported, (u8 *)szAuthEnc, sizeof(szAuthEnc)); memcpy(pucAuthEncryptionSupported, (u8 *)szAuthEnc, sizeof(szAuthEnc));
*pulOutLen = pCap->Length; *pulOutLen = pCap->Length;
return _TRUE; return _TRUE;
} else { } else {
@ -88,7 +88,7 @@ u8 query_802_11_association_information(_adapter *padapter, PNDIS_802_11_ASSOCIA
pAssocInfo->AvailableRequestFixedIEs |= NDIS_802_11_AI_REQFI_CAPABILITIES | NDIS_802_11_AI_REQFI_CURRENTAPADDRESS; pAssocInfo->AvailableRequestFixedIEs |= NDIS_802_11_AI_REQFI_CAPABILITIES | NDIS_802_11_AI_REQFI_CURRENTAPADDRESS;
pAssocInfo->RequestFixedIEs.Capabilities = (unsigned short) *&psecnetwork->IEs[10]; pAssocInfo->RequestFixedIEs.Capabilities = (unsigned short) *&psecnetwork->IEs[10];
_rtw_memcpy(pAssocInfo->RequestFixedIEs.CurrentAPAddress, memcpy(pAssocInfo->RequestFixedIEs.CurrentAPAddress,
&psecnetwork->MacAddress, 6); &psecnetwork->MacAddress, 6);
pAssocInfo->OffsetRequestIEs = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION); pAssocInfo->OffsetRequestIEs = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION);
@ -105,7 +105,7 @@ u8 query_802_11_association_information(_adapter *padapter, PNDIS_802_11_ASSOCIA
i = 13; /* 0~11 is fixed information element */ i = 13; /* 0~11 is fixed information element */
while ((i < supp_ie[0]) && (i < 256)) { while ((i < supp_ie[0]) && (i < 256)) {
if ((unsigned char)supp_ie[i] == pDest[0]) { if ((unsigned char)supp_ie[i] == pDest[0]) {
_rtw_memcpy((u8 *)(pDest), memcpy((u8 *)(pDest),
&supp_ie[i], &supp_ie[i],
supp_ie[1 + i] + 2); supp_ie[1 + i] + 2);
@ -150,7 +150,7 @@ u8 query_802_11_association_information(_adapter *padapter, PNDIS_802_11_ASSOCIA
i = auth_ie[0] - 12; i = auth_ie[0] - 12;
if (i > 0) { if (i > 0) {
_rtw_memcpy((u8 *)&pDest[0], &auth_ie[1], i); memcpy((u8 *)&pDest[0], &auth_ie[1], i);
pAssocInfo->ResponseIELength = i; pAssocInfo->ResponseIELength = i;
} }

View File

@ -361,7 +361,7 @@ NDIS_STATUS oid_rt_get_rx_icv_err_hdl(struct oid_par_priv *poid_par_priv)
return status; return status;
} }
if (poid_par_priv->information_buf_len >= sizeof(u32)) { if (poid_par_priv->information_buf_len >= sizeof(u32)) {
/* _rtw_memcpy(*(uint *)poid_par_priv->information_buf,padapter->recvpriv.rx_icv_err,sizeof(u32)); */ /* memcpy(*(uint *)poid_par_priv->information_buf,padapter->recvpriv.rx_icv_err,sizeof(u32)); */
*(uint *)poid_par_priv->information_buf = padapter->recvpriv.rx_icv_err; *(uint *)poid_par_priv->information_buf = padapter->recvpriv.rx_icv_err;
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len; *poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
} else } else
@ -530,7 +530,7 @@ NDIS_STATUS oid_rt_get_total_rx_bytes_hdl(struct oid_par_priv *poid_par_priv)
return status; return status;
} }
if (poid_par_priv->information_buf_len >= sizeof(ULONG)) { if (poid_par_priv->information_buf_len >= sizeof(ULONG)) {
/* _rtw_memcpy(*(uint *)poid_par_priv->information_buf,padapter->recvpriv.rx_icv_err,sizeof(u32)); */ /* memcpy(*(uint *)poid_par_priv->information_buf,padapter->recvpriv.rx_icv_err,sizeof(u32)); */
*(u64 *)poid_par_priv->information_buf = padapter->recvpriv.rx_bytes; *(u64 *)poid_par_priv->information_buf = padapter->recvpriv.rx_bytes;
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len; *poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
} else } else

View File

@ -88,7 +88,7 @@ u8 rtw_do_join(_adapter *padapter)
pmlmepriv->to_join = _TRUE; pmlmepriv->to_join = _TRUE;
rtw_init_sitesurvey_parm(padapter, &parm); rtw_init_sitesurvey_parm(padapter, &parm);
_rtw_memcpy(&parm.ssid[0], &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID)); memcpy(&parm.ssid[0], &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
parm.ssid_num = 1; parm.ssid_num = 1;
if (_rtw_queue_empty(queue) == _TRUE) { if (_rtw_queue_empty(queue) == _TRUE) {
@ -139,7 +139,7 @@ u8 rtw_do_join(_adapter *padapter)
pibss = padapter->registrypriv.dev_network.MacAddress; pibss = padapter->registrypriv.dev_network.MacAddress;
memset(&pdev_network->Ssid, 0, sizeof(NDIS_802_11_SSID)); memset(&pdev_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
_rtw_memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID)); memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
rtw_update_registrypriv_dev_network(padapter); rtw_update_registrypriv_dev_network(padapter);
@ -321,7 +321,7 @@ handle_tkip_countermeasure:
} }
memset(&pmlmepriv->assoc_ssid, 0, sizeof(NDIS_802_11_SSID)); memset(&pmlmepriv->assoc_ssid, 0, sizeof(NDIS_802_11_SSID));
_rtw_memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN); memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN);
pmlmepriv->assoc_by_bssid = _TRUE; pmlmepriv->assoc_by_bssid = _TRUE;
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE) if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE)
@ -417,7 +417,7 @@ handle_tkip_countermeasure:
goto release_mlme_lock; goto release_mlme_lock;
} }
_rtw_memcpy(&pmlmepriv->assoc_ssid, ssid, sizeof(NDIS_802_11_SSID)); memcpy(&pmlmepriv->assoc_ssid, ssid, sizeof(NDIS_802_11_SSID));
pmlmepriv->assoc_by_bssid = _FALSE; pmlmepriv->assoc_by_bssid = _FALSE;
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE) if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE)
@ -479,12 +479,12 @@ handle_tkip_countermeasure:
} }
if (ssid && ssid_valid) if (ssid && ssid_valid)
_rtw_memcpy(&pmlmepriv->assoc_ssid, ssid, sizeof(NDIS_802_11_SSID)); memcpy(&pmlmepriv->assoc_ssid, ssid, sizeof(NDIS_802_11_SSID));
else else
memset(&pmlmepriv->assoc_ssid, 0, sizeof(NDIS_802_11_SSID)); memset(&pmlmepriv->assoc_ssid, 0, sizeof(NDIS_802_11_SSID));
if (bssid && bssid_valid) { if (bssid && bssid_valid) {
_rtw_memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN); memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN);
pmlmepriv->assoc_by_bssid = _TRUE; pmlmepriv->assoc_by_bssid = _TRUE;
} else } else
pmlmepriv->assoc_by_bssid = _FALSE; pmlmepriv->assoc_by_bssid = _FALSE;
@ -749,7 +749,7 @@ u8 rtw_set_802_11_add_wep(_adapter *padapter, NDIS_802_11_WEP *wep)
} }
_rtw_memcpy(&(psecuritypriv->dot11DefKey[keyid].skey[0]), &(wep->KeyMaterial), wep->KeyLength); memcpy(&(psecuritypriv->dot11DefKey[keyid].skey[0]), &(wep->KeyMaterial), wep->KeyLength);
psecuritypriv->dot11DefKeylen[keyid] = wep->KeyLength; psecuritypriv->dot11DefKeylen[keyid] = wep->KeyLength;

View File

@ -82,7 +82,7 @@ int rtw_IOL_append_cmds(struct xmit_frame *xmit_frame, u8 *IOL_cmds, u32 cmd_len
return _FAIL; return _FAIL;
} }
_rtw_memcpy(xmit_frame->buf_addr + buf_offset + pattrib->pktlen, IOL_cmds, cmd_len); memcpy(xmit_frame->buf_addr + buf_offset + pattrib->pktlen, IOL_cmds, cmd_len);
pattrib->pktlen += cmd_len; pattrib->pktlen += cmd_len;
pattrib->last_txcmdsz += cmd_len; pattrib->last_txcmdsz += cmd_len;

View File

@ -378,7 +378,7 @@ inline void rtw_mi_update_iface_status(struct mlme_priv *pmlmepriv, sint state)
RTW_INFO("%s => will change or clean state to 0x%08x\n", __func__, state); RTW_INFO("%s => will change or clean state to 0x%08x\n", __func__, state);
rtw_mi_status(adapter, &tmp_mstate); rtw_mi_status(adapter, &tmp_mstate);
_rtw_memcpy(iface_state, &tmp_mstate, sizeof(struct mi_state)); memcpy(iface_state, &tmp_mstate, sizeof(struct mi_state));
if (rtw_mi_get_ch_setting_union(adapter, &u_ch, &u_bw, &u_offset)) if (rtw_mi_get_ch_setting_union(adapter, &u_ch, &u_bw, &u_offset))
rtw_mi_update_union_chan_inf(adapter , u_ch, u_offset , u_bw); rtw_mi_update_union_chan_inf(adapter , u_ch, u_offset , u_bw);
@ -1403,7 +1403,7 @@ static s32 _rtw_mi_buddy_clone_bcmc_packet(_adapter *adapter, union recv_frame *
pcloneframe->u.hdr.precvbuf = NULL; /*can't access the precvbuf for new arch.*/ pcloneframe->u.hdr.precvbuf = NULL; /*can't access the precvbuf for new arch.*/
pcloneframe->u.hdr.len = 0; pcloneframe->u.hdr.len = 0;
_rtw_memcpy(&pcloneframe->u.hdr.attrib, &precvframe->u.hdr.attrib, sizeof(struct rx_pkt_attrib)); memcpy(&pcloneframe->u.hdr.attrib, &precvframe->u.hdr.attrib, sizeof(struct rx_pkt_attrib));
pattrib = &pcloneframe->u.hdr.attrib; pattrib = &pcloneframe->u.hdr.attrib;
#ifdef CONFIG_SKB_ALLOCATED #ifdef CONFIG_SKB_ALLOCATED

View File

@ -266,7 +266,7 @@ int rtw_mlme_update_wfd_ie_data(struct mlme_priv *mlme, u8 type, u8 *ie, u32 ie_
, FUNC_ADPT_ARG(adapter), type); , FUNC_ADPT_ARG(adapter), type);
goto exit; goto exit;
} }
_rtw_memcpy(*t_ie, ie, ie_len); memcpy(*t_ie, ie, ie_len);
*t_ie_len = ie_len; *t_ie_len = ie_len;
} }
@ -531,7 +531,7 @@ u16 rtw_get_capability(WLAN_BSSID_EX *bss)
{ {
u16 val; u16 val;
_rtw_memcpy((u8 *)&val, rtw_get_capability_from_ie(bss->IEs), 2); memcpy((u8 *)&val, rtw_get_capability_from_ie(bss->IEs), 2);
return le16_to_cpu(val); return le16_to_cpu(val);
} }
@ -679,8 +679,8 @@ int is_same_network(WLAN_BSSID_EX *src, WLAN_BSSID_EX *dst, u8 feature)
if (rtw_bug_check(dst, src, &s_cap, &d_cap) == _FALSE) if (rtw_bug_check(dst, src, &s_cap, &d_cap) == _FALSE)
return _FALSE; return _FALSE;
_rtw_memcpy((u8 *)&s_cap, rtw_get_capability_from_ie(src->IEs), 2); memcpy((u8 *)&s_cap, rtw_get_capability_from_ie(src->IEs), 2);
_rtw_memcpy((u8 *)&d_cap, rtw_get_capability_from_ie(dst->IEs), 2); memcpy((u8 *)&d_cap, rtw_get_capability_from_ie(dst->IEs), 2);
s_cap = le16_to_cpu(s_cap); s_cap = le16_to_cpu(s_cap);
@ -852,7 +852,7 @@ void update_network(WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src,
if (update_ie) { if (update_ie) {
dst->Reserved[0] = src->Reserved[0]; dst->Reserved[0] = src->Reserved[0];
dst->Reserved[1] = src->Reserved[1]; dst->Reserved[1] = src->Reserved[1];
_rtw_memcpy((u8 *)dst, (u8 *)src, get_WLAN_BSSID_EX_sz(src)); memcpy((u8 *)dst, (u8 *)src, get_WLAN_BSSID_EX_sz(src));
} }
dst->PhyInfo.SignalStrength = ss_final; dst->PhyInfo.SignalStrength = ss_final;
@ -1032,7 +1032,7 @@ bool rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target)
#ifdef CONFIG_ANTENNA_DIVERSITY #ifdef CONFIG_ANTENNA_DIVERSITY
rtw_hal_get_odm_var(adapter, HAL_ODM_ANTDIV_SELECT, &(target->PhyInfo.Optimum_antenna), NULL); rtw_hal_get_odm_var(adapter, HAL_ODM_ANTDIV_SELECT, &(target->PhyInfo.Optimum_antenna), NULL);
#endif #endif
_rtw_memcpy(&(pnetwork->network), target, get_WLAN_BSSID_EX_sz(target)); memcpy(&(pnetwork->network), target, get_WLAN_BSSID_EX_sz(target));
/* pnetwork->last_scanned = rtw_get_current_time(); */ /* pnetwork->last_scanned = rtw_get_current_time(); */
/* variable initialize */ /* variable initialize */
pnetwork->fixed = _FALSE; pnetwork->fixed = _FALSE;
@ -1061,7 +1061,7 @@ bool rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target)
#ifdef CONFIG_ANTENNA_DIVERSITY #ifdef CONFIG_ANTENNA_DIVERSITY
rtw_hal_get_odm_var(adapter, HAL_ODM_ANTDIV_SELECT, &(target->PhyInfo.Optimum_antenna), NULL); rtw_hal_get_odm_var(adapter, HAL_ODM_ANTDIV_SELECT, &(target->PhyInfo.Optimum_antenna), NULL);
#endif #endif
_rtw_memcpy(&(pnetwork->network), target, bssid_ex_sz); memcpy(&(pnetwork->network), target, bssid_ex_sz);
pnetwork->last_scanned = rtw_get_current_time(); pnetwork->last_scanned = rtw_get_current_time();
@ -1265,11 +1265,11 @@ void rtw_survey_event_callback(_adapter *adapter, u8 *pbuf)
struct wlan_network *ibss_wlan = NULL; struct wlan_network *ibss_wlan = NULL;
_irqL irqL; _irqL irqL;
_rtw_memcpy(pmlmepriv->cur_network.network.IEs, pnetwork->IEs, 8); memcpy(pmlmepriv->cur_network.network.IEs, pnetwork->IEs, 8);
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); _enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
ibss_wlan = _rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->MacAddress); ibss_wlan = _rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->MacAddress);
if (ibss_wlan) { if (ibss_wlan) {
_rtw_memcpy(ibss_wlan->network.IEs , pnetwork->IEs, 8); memcpy(ibss_wlan->network.IEs , pnetwork->IEs, 8);
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); _exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
goto exit; goto exit;
} }
@ -1347,7 +1347,7 @@ void rtw_surveydone_event_callback(_adapter *adapter, u8 *pbuf)
memset(&pdev_network->Ssid, 0, sizeof(NDIS_802_11_SSID)); memset(&pdev_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
_rtw_memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID)); memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
rtw_update_registrypriv_dev_network(adapter); rtw_update_registrypriv_dev_network(adapter);
rtw_generate_random_ibss(pibss); rtw_generate_random_ibss(pibss);
@ -1378,7 +1378,7 @@ void rtw_surveydone_event_callback(_adapter *adapter, u8 *pbuf)
u8 ssc_chk = rtw_sitesurvey_condition_check(adapter, _FALSE); u8 ssc_chk = rtw_sitesurvey_condition_check(adapter, _FALSE);
rtw_init_sitesurvey_parm(adapter, &parm); rtw_init_sitesurvey_parm(adapter, &parm);
_rtw_memcpy(&parm.ssid[0], &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID)); memcpy(&parm.ssid[0], &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
parm.ssid_num = 1; parm.ssid_num = 1;
if (rtw_dec_to_roam(adapter) == 0 if (rtw_dec_to_roam(adapter) == 0
@ -2012,7 +2012,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wl
/* update station supportRate */ /* update station supportRate */
psta->bssratelen = rtw_get_rateset_len(pnetwork->network.SupportedRates); psta->bssratelen = rtw_get_rateset_len(pnetwork->network.SupportedRates);
_rtw_memcpy(psta->bssrateset, pnetwork->network.SupportedRates, psta->bssratelen); memcpy(psta->bssrateset, pnetwork->network.SupportedRates, psta->bssratelen);
rtw_hal_update_sta_ra_info(padapter, psta); rtw_hal_update_sta_ra_info(padapter, psta);
psta->wireless_mode = pmlmeext->cur_wireless_mode; psta->wireless_mode = pmlmeext->cur_wireless_mode;
@ -2081,7 +2081,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wl
} }
#ifdef CONFIG_RTW_80211K #ifdef CONFIG_RTW_80211K
_rtw_memcpy(&psta->rm_en_cap, pnetwork->network.PhyInfo.rm_en_cap, 5); memcpy(&psta->rm_en_cap, pnetwork->network.PhyInfo.rm_en_cap, 5);
#endif #endif
#ifdef CONFIG_RTS_FULL_BW #ifdef CONFIG_RTS_FULL_BW
rtw_parse_sta_vendor_ie_8812(padapter, psta, BSS_EX_TLV_IES(&cur_network->network), BSS_EX_TLV_IES_LEN(&cur_network->network)); rtw_parse_sta_vendor_ie_8812(padapter, psta, BSS_EX_TLV_IES(&cur_network->network), BSS_EX_TLV_IES_LEN(&cur_network->network));
@ -2102,10 +2102,10 @@ static void rtw_joinbss_update_network(_adapter *padapter, struct wlan_network *
RTW_INFO("%s\n", __FUNCTION__); RTW_INFO("%s\n", __FUNCTION__);
/* why not use ptarget_wlan?? */ /* why not use ptarget_wlan?? */
_rtw_memcpy(&cur_network->network, &pnetwork->network, pnetwork->network.Length); memcpy(&cur_network->network, &pnetwork->network, pnetwork->network.Length);
/* some IEs in pnetwork is wrong, so we should use ptarget_wlan IEs */ /* some IEs in pnetwork is wrong, so we should use ptarget_wlan IEs */
cur_network->network.IELength = ptarget_wlan->network.IELength; cur_network->network.IELength = ptarget_wlan->network.IELength;
_rtw_memcpy(&cur_network->network.IEs[0], &ptarget_wlan->network.IEs[0], MAX_IE_SZ); memcpy(&cur_network->network.IEs[0], &ptarget_wlan->network.IEs[0], MAX_IE_SZ);
cur_network->aid = pnetwork->join_res; cur_network->aid = pnetwork->join_res;
@ -2513,7 +2513,7 @@ void rtw_stassoc_event_callback(_adapter *adapter, u8 *pbuf)
passoc_req = rtw_zmalloc(psta->assoc_req_len); passoc_req = rtw_zmalloc(psta->assoc_req_len);
if (passoc_req) { if (passoc_req) {
assoc_req_len = psta->assoc_req_len; assoc_req_len = psta->assoc_req_len;
_rtw_memcpy(passoc_req, psta->passoc_req, assoc_req_len); memcpy(passoc_req, psta->passoc_req, assoc_req_len);
rtw_mfree(psta->passoc_req , psta->assoc_req_len); rtw_mfree(psta->passoc_req , psta->assoc_req_len);
psta->passoc_req = NULL; psta->passoc_req = NULL;
@ -2703,13 +2703,13 @@ void rtw_ft_reassoc_event_callback(_adapter *padapter, u8 *pbuf)
ft_evt_parms.ies_len = pft_roam->ft_event.ies_len; ft_evt_parms.ies_len = pft_roam->ft_event.ies_len;
ft_evt_parms.ies = rtw_zmalloc(ft_evt_parms.ies_len); ft_evt_parms.ies = rtw_zmalloc(ft_evt_parms.ies_len);
if (ft_evt_parms.ies) if (ft_evt_parms.ies)
_rtw_memcpy((void *)ft_evt_parms.ies, pft_roam->ft_event.ies, ft_evt_parms.ies_len); memcpy((void *)ft_evt_parms.ies, pft_roam->ft_event.ies, ft_evt_parms.ies_len);
else else
goto err_2; goto err_2;
ft_evt_parms.target_ap = rtw_zmalloc(ETH_ALEN); ft_evt_parms.target_ap = rtw_zmalloc(ETH_ALEN);
if (ft_evt_parms.target_ap) if (ft_evt_parms.target_ap)
_rtw_memcpy((void *)ft_evt_parms.target_ap, pstassoc->macaddr, ETH_ALEN); memcpy((void *)ft_evt_parms.target_ap, pstassoc->macaddr, ETH_ALEN);
else else
goto err_1; goto err_1;
@ -2966,10 +2966,10 @@ void rtw_stadel_event_callback(_adapter *adapter, u8 *pbuf)
pdev_network = &(adapter->registrypriv.dev_network); pdev_network = &(adapter->registrypriv.dev_network);
pibss = adapter->registrypriv.dev_network.MacAddress; pibss = adapter->registrypriv.dev_network.MacAddress;
_rtw_memcpy(pdev_network, &tgt_network->network, get_WLAN_BSSID_EX_sz(&tgt_network->network)); memcpy(pdev_network, &tgt_network->network, get_WLAN_BSSID_EX_sz(&tgt_network->network));
memset(&pdev_network->Ssid, 0, sizeof(NDIS_802_11_SSID)); memset(&pdev_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
_rtw_memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID)); memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
rtw_update_registrypriv_dev_network(adapter); rtw_update_registrypriv_dev_network(adapter);
@ -4011,19 +4011,19 @@ sint rtw_set_key(_adapter *adapter, struct security_priv *psecuritypriv, sint ke
case _WEP40_: case _WEP40_:
keylen = 5; keylen = 5;
_rtw_memcpy(&(psetkeyparm->key[0]), &(psecuritypriv->dot11DefKey[keyid].skey[0]), keylen); memcpy(&(psetkeyparm->key[0]), &(psecuritypriv->dot11DefKey[keyid].skey[0]), keylen);
break; break;
case _WEP104_: case _WEP104_:
keylen = 13; keylen = 13;
_rtw_memcpy(&(psetkeyparm->key[0]), &(psecuritypriv->dot11DefKey[keyid].skey[0]), keylen); memcpy(&(psetkeyparm->key[0]), &(psecuritypriv->dot11DefKey[keyid].skey[0]), keylen);
break; break;
case _TKIP_: case _TKIP_:
keylen = 16; keylen = 16;
_rtw_memcpy(&psetkeyparm->key, &psecuritypriv->dot118021XGrpKey[keyid], keylen); memcpy(&psetkeyparm->key, &psecuritypriv->dot118021XGrpKey[keyid], keylen);
break; break;
case _AES_: case _AES_:
keylen = 16; keylen = 16;
_rtw_memcpy(&psetkeyparm->key, &psecuritypriv->dot118021XGrpKey[keyid], keylen); memcpy(&psetkeyparm->key, &psecuritypriv->dot118021XGrpKey[keyid], keylen);
break; break;
default: default:
res = _FAIL; res = _FAIL;
@ -4303,7 +4303,7 @@ int rtw_rsn_sync_pmkid(_adapter *adapter, u8 *ie, uint ie_len, int i_ent)
/* bakcup group mgmt cs */ /* bakcup group mgmt cs */
if (info.gmcs) if (info.gmcs)
_rtw_memcpy(gm_cs, info.gmcs, 4); memcpy(gm_cs, info.gmcs, 4);
if (info.pmkid_cnt) { if (info.pmkid_cnt) {
RTW_INFO(FUNC_ADPT_FMT" remove original PMKID, count:%u\n" RTW_INFO(FUNC_ADPT_FMT" remove original PMKID, count:%u\n"
@ -4317,13 +4317,13 @@ int rtw_rsn_sync_pmkid(_adapter *adapter, u8 *ie, uint ie_len, int i_ent)
, FUNC_ADPT_ARG(adapter), KEY_ARG(sec->PMKIDList[i_ent].PMKID)); , FUNC_ADPT_ARG(adapter), KEY_ARG(sec->PMKIDList[i_ent].PMKID));
info.pmkid_cnt = 1; /* update new pmkid_cnt */ info.pmkid_cnt = 1; /* update new pmkid_cnt */
_rtw_memcpy(info.pmkid_list, sec->PMKIDList[i_ent].PMKID, 16); memcpy(info.pmkid_list, sec->PMKIDList[i_ent].PMKID, 16);
} else } else
info.pmkid_cnt = 0; /* update new pmkid_cnt */ info.pmkid_cnt = 0; /* update new pmkid_cnt */
RTW_PUT_LE16(info.pmkid_list - 2, info.pmkid_cnt); RTW_PUT_LE16(info.pmkid_list - 2, info.pmkid_cnt);
if (info.gmcs) if (info.gmcs)
_rtw_memcpy(info.pmkid_list + 16 * info.pmkid_cnt, gm_cs, 4); memcpy(info.pmkid_list + 16 * info.pmkid_cnt, gm_cs, 4);
ie_len = 1 + 1 + 2 + 4 ie_len = 1 + 1 + 2 + 4
+ 2 + 4 * info.pcs_cnt + 2 + 4 * info.pcs_cnt
@ -4355,12 +4355,12 @@ sint rtw_restruct_sec_ie(_adapter *adapter, u8 *out_ie)
authmode = _WPA2_IE_ID_; authmode = _WPA2_IE_ID_;
if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS)) { if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS)) {
_rtw_memcpy(out_ie, psecuritypriv->wps_ie, psecuritypriv->wps_ie_len); memcpy(out_ie, psecuritypriv->wps_ie, psecuritypriv->wps_ie_len);
ielength = psecuritypriv->wps_ie_len; ielength = psecuritypriv->wps_ie_len;
} else if ((authmode == _WPA_IE_ID_) || (authmode == _WPA2_IE_ID_)) { } else if ((authmode == _WPA_IE_ID_) || (authmode == _WPA2_IE_ID_)) {
/* copy RSN or SSN */ /* copy RSN or SSN */
_rtw_memcpy(out_ie, psecuritypriv->supplicant_ie, psecuritypriv->supplicant_ie[1] + 2); memcpy(out_ie, psecuritypriv->supplicant_ie, psecuritypriv->supplicant_ie[1] + 2);
/* debug for CONFIG_IEEE80211W /* debug for CONFIG_IEEE80211W
{ {
int jj; int jj;
@ -4388,9 +4388,9 @@ void rtw_init_registrypriv_dev_network(_adapter *adapter)
u8 *myhwaddr = adapter_mac_addr(adapter); u8 *myhwaddr = adapter_mac_addr(adapter);
_rtw_memcpy(pdev_network->MacAddress, myhwaddr, ETH_ALEN); memcpy(pdev_network->MacAddress, myhwaddr, ETH_ALEN);
_rtw_memcpy(&pdev_network->Ssid, &pregistrypriv->ssid, sizeof(NDIS_802_11_SSID)); memcpy(&pdev_network->Ssid, &pregistrypriv->ssid, sizeof(NDIS_802_11_SSID));
pdev_network->Configuration.Length = sizeof(NDIS_802_11_CONFIGURATION); pdev_network->Configuration.Length = sizeof(NDIS_802_11_CONFIGURATION);
pdev_network->Configuration.BeaconPeriod = 100; pdev_network->Configuration.BeaconPeriod = 100;
@ -4741,7 +4741,7 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
} }
/* fill default supported_mcs_set */ /* fill default supported_mcs_set */
_rtw_memcpy(ht_capie.supp_mcs_set, pmlmeext->default_supported_mcs_set, 16); memcpy(ht_capie.supp_mcs_set, pmlmeext->default_supported_mcs_set, 16);
/* update default supported_mcs_set */ /* update default supported_mcs_set */
rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type)); rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
@ -5161,7 +5161,7 @@ void _rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network)
RTW_INFO("roaming from %s("MAC_FMT"), length:%d\n", RTW_INFO("roaming from %s("MAC_FMT"), length:%d\n",
cur_network->network.Ssid.Ssid, MAC_ARG(cur_network->network.MacAddress), cur_network->network.Ssid.Ssid, MAC_ARG(cur_network->network.MacAddress),
cur_network->network.Ssid.SsidLength); cur_network->network.Ssid.SsidLength);
_rtw_memcpy(&pmlmepriv->assoc_ssid, &cur_network->network.Ssid, sizeof(NDIS_802_11_SSID)); memcpy(&pmlmepriv->assoc_ssid, &cur_network->network.Ssid, sizeof(NDIS_802_11_SSID));
pmlmepriv->assoc_by_bssid = _FALSE; pmlmepriv->assoc_by_bssid = _FALSE;

File diff suppressed because it is too large Load Diff

View File

@ -150,10 +150,10 @@ static void _init_mp_priv_(struct mp_priv *pmp_priv)
pmp_priv->brx_filter_beacon = _FALSE; pmp_priv->brx_filter_beacon = _FALSE;
pnetwork = &pmp_priv->mp_network.network; pnetwork = &pmp_priv->mp_network.network;
_rtw_memcpy(pnetwork->MacAddress, pmp_priv->network_macaddr, ETH_ALEN); memcpy(pnetwork->MacAddress, pmp_priv->network_macaddr, ETH_ALEN);
pnetwork->Ssid.SsidLength = 8; pnetwork->Ssid.SsidLength = 8;
_rtw_memcpy(pnetwork->Ssid.Ssid, "mp_871x", pnetwork->Ssid.SsidLength); memcpy(pnetwork->Ssid.Ssid, "mp_871x", pnetwork->Ssid.SsidLength);
pmp_priv->tx.payload = 2; pmp_priv->tx.payload = 2;
#ifdef CONFIG_80211N_HT #ifdef CONFIG_80211N_HT
@ -280,8 +280,8 @@ static void mp_init_xmit_attrib(struct mp_tx *pmptx, PADAPTER padapter)
pattrib->ether_type = 0x8712; pattrib->ether_type = 0x8712;
#if 0 #if 0
_rtw_memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN);
_rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
#endif #endif
memset(pattrib->dst, 0xFF, ETH_ALEN); memset(pattrib->dst, 0xFF, ETH_ALEN);
@ -874,11 +874,11 @@ u32 mp_join(PADAPTER padapter, u8 mode)
RTW_INFO("%s ,pmppriv->network_macaddr=%x %x %x %x %x %x\n", __func__, RTW_INFO("%s ,pmppriv->network_macaddr=%x %x %x %x %x %x\n", __func__,
pmppriv->network_macaddr[0], pmppriv->network_macaddr[1], pmppriv->network_macaddr[2], pmppriv->network_macaddr[3], pmppriv->network_macaddr[4], pmppriv->network_macaddr[0], pmppriv->network_macaddr[1], pmppriv->network_macaddr[2], pmppriv->network_macaddr[3], pmppriv->network_macaddr[4],
pmppriv->network_macaddr[5]); pmppriv->network_macaddr[5]);
_rtw_memcpy(bssid.MacAddress, pmppriv->network_macaddr, ETH_ALEN); memcpy(bssid.MacAddress, pmppriv->network_macaddr, ETH_ALEN);
if (mode == WIFI_FW_ADHOC_STATE) { if (mode == WIFI_FW_ADHOC_STATE) {
bssid.Ssid.SsidLength = strlen("mp_pseudo_adhoc"); bssid.Ssid.SsidLength = strlen("mp_pseudo_adhoc");
_rtw_memcpy(bssid.Ssid.Ssid, (u8 *)"mp_pseudo_adhoc", bssid.Ssid.SsidLength); memcpy(bssid.Ssid.Ssid, (u8 *)"mp_pseudo_adhoc", bssid.Ssid.SsidLength);
bssid.InfrastructureMode = Ndis802_11IBSS; bssid.InfrastructureMode = Ndis802_11IBSS;
bssid.NetworkTypeInUse = Ndis802_11DS; bssid.NetworkTypeInUse = Ndis802_11DS;
bssid.IELength = 0; bssid.IELength = 0;
@ -886,7 +886,7 @@ u32 mp_join(PADAPTER padapter, u8 mode)
} else if (mode == WIFI_FW_STATION_STATE) { } else if (mode == WIFI_FW_STATION_STATE) {
bssid.Ssid.SsidLength = strlen("mp_pseudo_STATION"); bssid.Ssid.SsidLength = strlen("mp_pseudo_STATION");
_rtw_memcpy(bssid.Ssid.Ssid, (u8 *)"mp_pseudo_STATION", bssid.Ssid.SsidLength); memcpy(bssid.Ssid.Ssid, (u8 *)"mp_pseudo_STATION", bssid.Ssid.SsidLength);
bssid.InfrastructureMode = Ndis802_11Infrastructure; bssid.InfrastructureMode = Ndis802_11Infrastructure;
bssid.NetworkTypeInUse = Ndis802_11DS; bssid.NetworkTypeInUse = Ndis802_11DS;
bssid.IELength = 0; bssid.IELength = 0;
@ -936,10 +936,10 @@ u32 mp_join(PADAPTER padapter, u8 mode)
tgt_network->join_res = 1; tgt_network->join_res = 1;
tgt_network->aid = psta->cmn.aid = 1; tgt_network->aid = psta->cmn.aid = 1;
_rtw_memcpy(&padapter->registrypriv.dev_network, &bssid, length); memcpy(&padapter->registrypriv.dev_network, &bssid, length);
rtw_update_registrypriv_dev_network(padapter); rtw_update_registrypriv_dev_network(padapter);
_rtw_memcpy(&tgt_network->network, &padapter->registrypriv.dev_network, padapter->registrypriv.dev_network.Length); memcpy(&tgt_network->network, &padapter->registrypriv.dev_network, padapter->registrypriv.dev_network.Length);
_rtw_memcpy(pnetwork, &padapter->registrypriv.dev_network, padapter->registrypriv.dev_network.Length); memcpy(pnetwork, &padapter->registrypriv.dev_network, padapter->registrypriv.dev_network.Length);
rtw_indicate_connect(padapter); rtw_indicate_connect(padapter);
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING); _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
@ -1431,8 +1431,8 @@ static thread_return mp_xmit_packet_thread(thread_context context)
continue; continue;
} }
} }
_rtw_memcpy((u8 *)(pxmitframe->buf_addr + TXDESC_OFFSET), pmptx->buf, pmptx->write_size); memcpy((u8 *)(pxmitframe->buf_addr + TXDESC_OFFSET), pmptx->buf, pmptx->write_size);
_rtw_memcpy(&(pxmitframe->attrib), &(pmptx->attrib), sizeof(struct pkt_attrib)); memcpy(&(pxmitframe->attrib), &(pmptx->attrib), sizeof(struct pkt_attrib));
rtw_usleep_os(padapter->mppriv.pktInterval); rtw_usleep_os(padapter->mppriv.pktInterval);
@ -1464,7 +1464,7 @@ exit:
void fill_txdesc_for_mp(PADAPTER padapter, u8 *ptxdesc) void fill_txdesc_for_mp(PADAPTER padapter, u8 *ptxdesc)
{ {
struct mp_priv *pmp_priv = &padapter->mppriv; struct mp_priv *pmp_priv = &padapter->mppriv;
_rtw_memcpy(ptxdesc, pmp_priv->tx.desc, TXDESC_SIZE); memcpy(ptxdesc, pmp_priv->tx.desc, TXDESC_SIZE);
} }
#if defined(CONFIG_RTL8188E) #if defined(CONFIG_RTL8188E)
@ -1946,9 +1946,9 @@ void SetPacketTx(PADAPTER padapter)
/* 3 1. update_attrib() */ /* 3 1. update_attrib() */
pattrib = &pmp_priv->tx.attrib; pattrib = &pmp_priv->tx.attrib;
_rtw_memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN);
_rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
_rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
bmcast = IS_MCAST(pattrib->ra); bmcast = IS_MCAST(pattrib->ra);
if (bmcast) if (bmcast)
pattrib->psta = rtw_get_bcmc_stainfo(padapter); pattrib->psta = rtw_get_bcmc_stainfo(padapter);
@ -2046,9 +2046,9 @@ void SetPacketTx(PADAPTER padapter)
hdr = (struct rtw_ieee80211_hdr *)pkt_start; hdr = (struct rtw_ieee80211_hdr *)pkt_start;
set_frame_sub_type(&hdr->frame_ctl, pattrib->subtype); set_frame_sub_type(&hdr->frame_ctl, pattrib->subtype);
_rtw_memcpy(hdr->addr1, pattrib->dst, ETH_ALEN); /* DA */ memcpy(hdr->addr1, pattrib->dst, ETH_ALEN); /* DA */
_rtw_memcpy(hdr->addr2, pattrib->src, ETH_ALEN); /* SA */ memcpy(hdr->addr2, pattrib->src, ETH_ALEN); /* SA */
_rtw_memcpy(hdr->addr3, get_bssid(&padapter->mlmepriv), ETH_ALEN); /* RA, BSSID */ memcpy(hdr->addr3, get_bssid(&padapter->mlmepriv), ETH_ALEN); /* RA, BSSID */
/* 3 5. make payload */ /* 3 5. make payload */
ptr = pkt_start + pattrib->hdrlen; ptr = pkt_start + pattrib->hdrlen;
@ -2081,7 +2081,7 @@ void SetPacketTx(PADAPTER padapter)
pmp_priv->TXradomBuffer[i] = rtw_random32() % 0xFF; pmp_priv->TXradomBuffer[i] = rtw_random32() % 0xFF;
/* startPlace = (u32)(rtw_random32() % 3450); */ /* startPlace = (u32)(rtw_random32() % 3450); */
_rtw_memcpy(ptr, pmp_priv->TXradomBuffer, pkt_end - ptr); memcpy(ptr, pmp_priv->TXradomBuffer, pkt_end - ptr);
/* memset(ptr, payload, pkt_end - ptr); */ /* memset(ptr, payload, pkt_end - ptr); */
rtw_mfree(pmp_priv->TXradomBuffer, 4096); rtw_mfree(pmp_priv->TXradomBuffer, 4096);
@ -3822,15 +3822,15 @@ void VHT_SIG_B_generator(
if (pPMacTxInfo->BandWidth == 0) { if (pPMacTxInfo->BandWidth == 0) {
bool sigb_temp[26] = {0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}; bool sigb_temp[26] = {0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0};
_rtw_memcpy(sig_bi, sigb_temp, 26); memcpy(sig_bi, sigb_temp, 26);
} else if (pPMacTxInfo->BandWidth == 1) { } else if (pPMacTxInfo->BandWidth == 1) {
bool sigb_temp[27] = {1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0}; bool sigb_temp[27] = {1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0};
_rtw_memcpy(sig_bi, sigb_temp, 27); memcpy(sig_bi, sigb_temp, 27);
} else if (pPMacTxInfo->BandWidth == 2) { } else if (pPMacTxInfo->BandWidth == 2) {
bool sigb_temp[29] = {0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}; bool sigb_temp[29] = {0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0};
_rtw_memcpy(sig_bi, sigb_temp, 29); memcpy(sig_bi, sigb_temp, 29);
} }
} else { /* Not NDP Sounding*/ } else { /* Not NDP Sounding*/
bool *sigb_temp[29] = {0}; bool *sigb_temp[29] = {0};

View File

@ -1079,7 +1079,7 @@ NDIS_STATUS oid_rt_pro8711_wi_poll_hdl(struct oid_par_priv *poid_par_priv)
pwi_param = (struct mp_wiparam *)poid_par_priv->information_buf; pwi_param = (struct mp_wiparam *)poid_par_priv->information_buf;
_rtw_memcpy(pwi_param, &Adapter->mppriv.workparam, sizeof(struct mp_wiparam)); memcpy(pwi_param, &Adapter->mppriv.workparam, sizeof(struct mp_wiparam));
Adapter->mppriv.act_in_progress = _FALSE; Adapter->mppriv.act_in_progress = _FALSE;
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len; *poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
@ -1237,7 +1237,7 @@ NDIS_STATUS oid_rt_poll_rx_status_hdl(struct oid_par_priv *poid_par_priv)
if (poid_par_priv->type_of_oid != QUERY_OID) if (poid_par_priv->type_of_oid != QUERY_OID)
return NDIS_STATUS_NOT_ACCEPTED; return NDIS_STATUS_NOT_ACCEPTED;
_rtw_memcpy(poid_par_priv->information_buf, (unsigned char *)&Adapter->mppriv.rxstat, sizeof(struct recv_stat)); memcpy(poid_par_priv->information_buf, (unsigned char *)&Adapter->mppriv.rxstat, sizeof(struct recv_stat));
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len; *poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
@ -1465,7 +1465,7 @@ NDIS_STATUS oid_rt_pro_qry_pwrstate_hdl(struct oid_par_priv *poid_par_priv)
return NDIS_STATUS_INVALID_LENGTH; return NDIS_STATUS_INVALID_LENGTH;
*poid_par_priv->bytes_rw = 8; *poid_par_priv->bytes_rw = 8;
_rtw_memcpy(poid_par_priv->information_buf, &(adapter_to_pwrctl(Adapter)->pwr_mode), 8); memcpy(poid_par_priv->information_buf, &(adapter_to_pwrctl(Adapter)->pwr_mode), 8);
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len; *poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
@ -2369,7 +2369,7 @@ unsigned int mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv)
pmp_priv->tx.payload = pparm->payload_type; pmp_priv->tx.payload = pparm->payload_type;
pattrib = &pmp_priv->tx.attrib; pattrib = &pmp_priv->tx.attrib;
pattrib->pktlen = pparm->length; pattrib->pktlen = pparm->length;
_rtw_memcpy(pattrib->dst, pparm->da, ETH_ALEN); memcpy(pattrib->dst, pparm->da, ETH_ALEN);
SetPacketTx(padapter); SetPacketTx(padapter);
} else } else
return NDIS_STATUS_FAILURE; return NDIS_STATUS_FAILURE;
@ -2436,10 +2436,10 @@ unsigned int mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv)
*(fctrl) = 0; *(fctrl) = 0;
set_frame_sub_type(pframe, WIFI_DATA); set_frame_sub_type(pframe, WIFI_DATA);
_rtw_memcpy(pwlanhdr->addr1, pethhdr->h_dest, ETH_ALEN); memcpy(pwlanhdr->addr1, pethhdr->h_dest, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, pethhdr->h_source, ETH_ALEN); memcpy(pwlanhdr->addr2, pethhdr->h_source, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, addr3, ETH_ALEN); memcpy(pwlanhdr->addr3, addr3, ETH_ALEN);
pwlanhdr->seq_ctl = 0; pwlanhdr->seq_ctl = 0;
pframe += pattrib->hdrlen; pframe += pattrib->hdrlen;
@ -2447,7 +2447,7 @@ unsigned int mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv)
llc_sz = rtw_put_snap(pframe, pattrib->ether_type); llc_sz = rtw_put_snap(pframe, pattrib->ether_type);
pframe += llc_sz; pframe += llc_sz;
_rtw_memcpy(pframe, (void *)(pmp_pkt + 14), payload_len); memcpy(pframe, (void *)(pmp_pkt + 14), payload_len);
pattrib->last_txcmdsz = pattrib->hdrlen + llc_sz + payload_len; pattrib->last_txcmdsz = pattrib->hdrlen + llc_sz + payload_len;

View File

@ -76,11 +76,11 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
pcur++; pcur++;
/* P2P device address */ /* P2P device address */
_rtw_memcpy(pcur, psta->dev_addr, ETH_ALEN); memcpy(pcur, psta->dev_addr, ETH_ALEN);
pcur += ETH_ALEN; pcur += ETH_ALEN;
/* P2P interface address */ /* P2P interface address */
_rtw_memcpy(pcur, psta->cmn.mac_addr, ETH_ALEN); memcpy(pcur, psta->cmn.mac_addr, ETH_ALEN);
pcur += ETH_ALEN; pcur += ETH_ALEN;
*pcur = psta->dev_cap; *pcur = psta->dev_cap;
@ -90,13 +90,13 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
RTW_PUT_BE16(pcur, psta->config_methods); RTW_PUT_BE16(pcur, psta->config_methods);
pcur += 2; pcur += 2;
_rtw_memcpy(pcur, psta->primary_dev_type, 8); memcpy(pcur, psta->primary_dev_type, 8);
pcur += 8; pcur += 8;
*pcur = psta->num_of_secdev_type; *pcur = psta->num_of_secdev_type;
pcur++; pcur++;
_rtw_memcpy(pcur, psta->secdev_types_list, psta->num_of_secdev_type * 8); memcpy(pcur, psta->secdev_types_list, psta->num_of_secdev_type * 8);
pcur += psta->num_of_secdev_type * 8; pcur += psta->num_of_secdev_type * 8;
if (psta->dev_name_len > 0) { if (psta->dev_name_len > 0) {
@ -108,7 +108,7 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
RTW_PUT_BE16(pcur, psta->dev_name_len); RTW_PUT_BE16(pcur, psta->dev_name_len);
pcur += 2; pcur += 2;
_rtw_memcpy(pcur, psta->dev_name, psta->dev_name_len); memcpy(pcur, psta->dev_name, psta->dev_name_len);
pcur += psta->dev_name_len; pcur += psta->dev_name_len;
} }
@ -171,9 +171,9 @@ static void issue_group_disc_req(struct wifidirect_info *pwdinfo, u8 *da)
fctrl = &(pwlanhdr->frame_ctl); fctrl = &(pwlanhdr->frame_ctl);
*(fctrl) = 0; *(fctrl) = 0;
_rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); memcpy(pwlanhdr->addr1, da, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, pwdinfo->interface_addr, ETH_ALEN); memcpy(pwlanhdr->addr2, pwdinfo->interface_addr, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, pwdinfo->interface_addr, ETH_ALEN); memcpy(pwlanhdr->addr3, pwdinfo->interface_addr, ETH_ALEN);
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++; pmlmeext->mgnt_seq++;
@ -231,9 +231,9 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s
fctrl = &(pwlanhdr->frame_ctl); fctrl = &(pwlanhdr->frame_ctl);
*(fctrl) = 0; *(fctrl) = 0;
_rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); memcpy(pwlanhdr->addr1, da, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, pwdinfo->device_addr, ETH_ALEN); memcpy(pwlanhdr->addr2, pwdinfo->device_addr, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, pwdinfo->device_addr, ETH_ALEN); memcpy(pwlanhdr->addr3, pwdinfo->device_addr, ETH_ALEN);
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++; pmlmeext->mgnt_seq++;
@ -308,9 +308,9 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr,
fctrl = &(pwlanhdr->frame_ctl); fctrl = &(pwlanhdr->frame_ctl);
*(fctrl) = 0; *(fctrl) = 0;
_rtw_memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); memcpy(pwlanhdr->addr1, raddr, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN); memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN);
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++; pmlmeext->mgnt_seq++;
@ -412,9 +412,9 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
fctrl = &(pwlanhdr->frame_ctl); fctrl = &(pwlanhdr->frame_ctl);
*(fctrl) = 0; *(fctrl) = 0;
_rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); memcpy(pwlanhdr->addr1, da, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, pwdinfo->interface_addr, ETH_ALEN); memcpy(pwlanhdr->addr2, pwdinfo->interface_addr, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, pwdinfo->interface_addr, ETH_ALEN); memcpy(pwlanhdr->addr3, pwdinfo->interface_addr, ETH_ALEN);
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++; pmlmeext->mgnt_seq++;
@ -599,7 +599,7 @@ u32 build_beacon_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* Associated BSSID */
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN); memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -711,7 +711,7 @@ u32 build_probe_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* Associated BSSID */
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN); memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -854,7 +854,7 @@ u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 tunnel
/* Value: */ /* Value: */
/* Associated BSSID */ /* Associated BSSID */
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN); memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -919,7 +919,7 @@ u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 tunnel
/* Value: /* Value:
Alternative MAC Address*/ Alternative MAC Address*/
_rtw_memcpy(wfdie + wfdielen, adapter_mac_addr(iface), ETH_ALEN); memcpy(wfdie + wfdielen, adapter_mac_addr(iface), ETH_ALEN);
wfdielen += ETH_ALEN; wfdielen += ETH_ALEN;
} }
} }
@ -1008,7 +1008,7 @@ u32 build_assoc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* Associated BSSID */
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN); memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -1107,7 +1107,7 @@ u32 build_assoc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* Associated BSSID */
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN); memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -1206,7 +1206,7 @@ u32 build_nego_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* Associated BSSID */
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN); memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -1305,7 +1305,7 @@ u32 build_nego_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* Associated BSSID */
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN); memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -1405,7 +1405,7 @@ u32 build_nego_confirm_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* Associated BSSID */
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN); memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -1505,7 +1505,7 @@ u32 build_invitation_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* Associated BSSID */
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN); memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -1618,7 +1618,7 @@ u32 build_invitation_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* Associated BSSID */
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN); memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -1731,7 +1731,7 @@ u32 build_provdisc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* Associated BSSID */
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN); memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -1831,7 +1831,7 @@ u32 build_provdisc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* Associated BSSID */
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN); memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -1973,7 +1973,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* P2P Device Address */ /* P2P Device Address */
_rtw_memcpy(p2pie + p2pielen, pwdinfo->device_addr, ETH_ALEN); memcpy(p2pie + p2pielen, pwdinfo->device_addr, ETH_ALEN);
p2pielen += ETH_ALEN; p2pielen += ETH_ALEN;
/* Config Method */ /* Config Method */
@ -2060,7 +2060,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
p2pielen += 2; p2pielen += 2;
/* Value: */ /* Value: */
_rtw_memcpy(p2pie + p2pielen, pwdinfo->device_name, pwdinfo->device_name_len); memcpy(p2pie + p2pielen, pwdinfo->device_name, pwdinfo->device_name_len);
p2pielen += pwdinfo->device_name_len; p2pielen += pwdinfo->device_name_len;
/* Group Info ATTR */ /* Group Info ATTR */
@ -2129,7 +2129,7 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8
/* Value: */ /* Value: */
/* P2P Device Address */ /* P2P Device Address */
_rtw_memcpy(p2pie + p2pielen, pwdinfo->device_addr, ETH_ALEN); memcpy(p2pie + p2pielen, pwdinfo->device_addr, ETH_ALEN);
p2pielen += ETH_ALEN; p2pielen += ETH_ALEN;
/* Config Method */ /* Config Method */
@ -2175,7 +2175,7 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8
p2pielen += 2; p2pielen += 2;
/* Value: */ /* Value: */
_rtw_memcpy(p2pie + p2pielen, pwdinfo->device_name, pwdinfo->device_name_len); memcpy(p2pie + p2pielen, pwdinfo->device_name, pwdinfo->device_name_len);
p2pielen += pwdinfo->device_name_len; p2pielen += pwdinfo->device_name_len;
if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_CLIENT)) { if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_CLIENT)) {
@ -2192,10 +2192,10 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8
p2pielen += 2; p2pielen += 2;
/* Value: */ /* Value: */
_rtw_memcpy(p2pie + p2pielen, pdev_raddr, ETH_ALEN); memcpy(p2pie + p2pielen, pdev_raddr, ETH_ALEN);
p2pielen += ETH_ALEN; p2pielen += ETH_ALEN;
_rtw_memcpy(p2pie + p2pielen, pssid, ussidlen); memcpy(p2pie + p2pielen, pssid, ussidlen);
p2pielen += ussidlen; p2pielen += ussidlen;
} }
@ -2369,16 +2369,16 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_INFO , pattr_content, (uint *)&attr_contentlen); rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_INFO , pattr_content, (uint *)&attr_contentlen);
_rtw_memcpy(psta->dev_addr, pattr_content, ETH_ALEN);/* P2P Device Address */ memcpy(psta->dev_addr, pattr_content, ETH_ALEN);/* P2P Device Address */
pattr_content += ETH_ALEN; pattr_content += ETH_ALEN;
_rtw_memcpy(&psta->config_methods, pattr_content, 2);/* Config Methods */ memcpy(&psta->config_methods, pattr_content, 2);/* Config Methods */
psta->config_methods = be16_to_cpu(psta->config_methods); psta->config_methods = be16_to_cpu(psta->config_methods);
pattr_content += 2; pattr_content += 2;
_rtw_memcpy(psta->primary_dev_type, pattr_content, 8); memcpy(psta->primary_dev_type, pattr_content, 8);
pattr_content += 8; pattr_content += 8;
@ -2394,7 +2394,7 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
len = (sizeof(psta->secdev_types_list) < (num_of_secdev_type * 8)) ? (sizeof(psta->secdev_types_list)) : (num_of_secdev_type * 8); len = (sizeof(psta->secdev_types_list) < (num_of_secdev_type * 8)) ? (sizeof(psta->secdev_types_list)) : (num_of_secdev_type * 8);
_rtw_memcpy(psta->secdev_types_list, pattr_content, len); memcpy(psta->secdev_types_list, pattr_content, len);
pattr_content += (num_of_secdev_type * 8); pattr_content += (num_of_secdev_type * 8);
} }
@ -2407,7 +2407,7 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
psta->dev_name_len = (sizeof(psta->dev_name) < dev_name_len) ? sizeof(psta->dev_name) : dev_name_len; psta->dev_name_len = (sizeof(psta->dev_name) < dev_name_len) ? sizeof(psta->dev_name) : dev_name_len;
_rtw_memcpy(psta->dev_name, pattr_content + 4, psta->dev_name_len); memcpy(psta->dev_name, pattr_content + 4, psta->dev_name_len);
} }
rtw_mfree(pbuf, attr_contentlen); rtw_mfree(pbuf, attr_contentlen);
@ -2521,19 +2521,19 @@ u8 process_p2p_provdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
uconfig_method = be16_to_cpu(uconfig_method); uconfig_method = be16_to_cpu(uconfig_method);
switch (uconfig_method) { switch (uconfig_method) {
case WPS_CM_DISPLYA: { case WPS_CM_DISPLYA: {
_rtw_memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "dis", 3); memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "dis", 3);
break; break;
} }
case WPS_CM_LABEL: { case WPS_CM_LABEL: {
_rtw_memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "lab", 3); memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "lab", 3);
break; break;
} }
case WPS_CM_PUSH_BUTTON: { case WPS_CM_PUSH_BUTTON: {
_rtw_memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "pbc", 3); memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "pbc", 3);
break; break;
} }
case WPS_CM_KEYPAD: { case WPS_CM_KEYPAD: {
_rtw_memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "pad", 3); memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "pad", 3);
break; break;
} }
} }
@ -2618,11 +2618,11 @@ u8 process_p2p_group_negotation_req(struct wifidirect_info *pwdinfo, u8 *pframe,
wps_devicepassword_id = be16_to_cpu(wps_devicepassword_id); wps_devicepassword_id = be16_to_cpu(wps_devicepassword_id);
if (wps_devicepassword_id == WPS_DPID_USER_SPEC) if (wps_devicepassword_id == WPS_DPID_USER_SPEC)
_rtw_memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "dis", 3); memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "dis", 3);
else if (wps_devicepassword_id == WPS_DPID_REGISTRAR_SPEC) else if (wps_devicepassword_id == WPS_DPID_REGISTRAR_SPEC)
_rtw_memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "pad", 3); memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "pad", 3);
else else
_rtw_memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "pbc", 3); memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "pbc", 3);
} }
} else { } else {
RTW_INFO("[%s] WPS IE not Found!!\n", __FUNCTION__); RTW_INFO("[%s] WPS IE not Found!!\n", __FUNCTION__);
@ -2688,8 +2688,8 @@ u8 process_p2p_group_negotation_req(struct wifidirect_info *pwdinfo, u8 *pframe,
if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) { if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) {
/* Store the group id information. */ /* Store the group id information. */
_rtw_memcpy(pwdinfo->groupid_info.go_device_addr, pwdinfo->device_addr, ETH_ALEN); memcpy(pwdinfo->groupid_info.go_device_addr, pwdinfo->device_addr, ETH_ALEN);
_rtw_memcpy(pwdinfo->groupid_info.ssid, pwdinfo->nego_ssid, pwdinfo->nego_ssidlen); memcpy(pwdinfo->groupid_info.ssid, pwdinfo->nego_ssid, pwdinfo->nego_ssidlen);
} }
} }
@ -2880,8 +2880,8 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe
if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) { if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) {
/* Store the group id information. */ /* Store the group id information. */
_rtw_memcpy(pwdinfo->groupid_info.go_device_addr, pwdinfo->device_addr, ETH_ALEN); memcpy(pwdinfo->groupid_info.go_device_addr, pwdinfo->device_addr, ETH_ALEN);
_rtw_memcpy(pwdinfo->groupid_info.ssid, pwdinfo->nego_ssid, pwdinfo->nego_ssidlen); memcpy(pwdinfo->groupid_info.ssid, pwdinfo->nego_ssid, pwdinfo->nego_ssidlen);
} }
} }
@ -2951,8 +2951,8 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe
attr_contentlen = 0; attr_contentlen = 0;
memset(groupid, 0x00, 38); memset(groupid, 0x00, 38);
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, groupid, &attr_contentlen)) { if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, groupid, &attr_contentlen)) {
_rtw_memcpy(pwdinfo->groupid_info.go_device_addr, &groupid[0], ETH_ALEN); memcpy(pwdinfo->groupid_info.go_device_addr, &groupid[0], ETH_ALEN);
_rtw_memcpy(pwdinfo->groupid_info.ssid, &groupid[6], attr_contentlen - ETH_ALEN); memcpy(pwdinfo->groupid_info.ssid, &groupid[6], attr_contentlen - ETH_ALEN);
} }
/* Get the next P2P IE */ /* Get the next P2P IE */
@ -3033,8 +3033,8 @@ u8 process_p2p_group_negotation_confirm(struct wifidirect_info *pwdinfo, u8 *pfr
memset(groupid, 0x00, 38); memset(groupid, 0x00, 38);
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, groupid, &attr_contentlen)) { if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, groupid, &attr_contentlen)) {
RTW_INFO("[%s] Ssid = %s, ssidlen = %zu\n", __FUNCTION__, &groupid[ETH_ALEN], strlen(&groupid[ETH_ALEN])); RTW_INFO("[%s] Ssid = %s, ssidlen = %zu\n", __FUNCTION__, &groupid[ETH_ALEN], strlen(&groupid[ETH_ALEN]));
_rtw_memcpy(pwdinfo->groupid_info.go_device_addr, &groupid[0], ETH_ALEN); memcpy(pwdinfo->groupid_info.go_device_addr, &groupid[0], ETH_ALEN);
_rtw_memcpy(pwdinfo->groupid_info.ssid, &groupid[6], attr_contentlen - ETH_ALEN); memcpy(pwdinfo->groupid_info.ssid, &groupid[6], attr_contentlen - ETH_ALEN);
} }
attr_contentlen = 0; attr_contentlen = 0;
@ -3078,7 +3078,7 @@ void find_phase_handler(_adapter *padapter)
rtw_init_sitesurvey_parm(padapter, &parm); rtw_init_sitesurvey_parm(padapter, &parm);
_rtw_memcpy(&parm.ssid[0].Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN); memcpy(&parm.ssid[0].Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN);
parm.ssid[0].SsidLength = P2P_WILDCARD_SSID_LEN; parm.ssid[0].SsidLength = P2P_WILDCARD_SSID_LEN;
parm.ssid_num = 1; parm.ssid_num = 1;
@ -4023,9 +4023,9 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
if (nego_info->token != dialogToken) if (nego_info->token != dialogToken)
rtw_wdev_nego_info_init(nego_info); rtw_wdev_nego_info_init(nego_info);
_rtw_memcpy(nego_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN); memcpy(nego_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN);
if (iaddr) if (iaddr)
_rtw_memcpy(tx ? nego_info->iface_addr : nego_info->peer_iface_addr, iaddr, ETH_ALEN); memcpy(tx ? nego_info->iface_addr : nego_info->peer_iface_addr, iaddr, ETH_ALEN);
nego_info->active = tx ? 1 : 0; nego_info->active = tx ? 1 : 0;
nego_info->token = dialogToken; nego_info->token = dialogToken;
nego_info->req_op_ch = op_ch; nego_info->req_op_ch = op_ch;
@ -4080,7 +4080,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
&& _rtw_memcmp(nego_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN) == _TRUE && _rtw_memcmp(nego_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN) == _TRUE
) { ) {
if (iaddr) if (iaddr)
_rtw_memcpy(tx ? nego_info->iface_addr : nego_info->peer_iface_addr, iaddr, ETH_ALEN); memcpy(tx ? nego_info->iface_addr : nego_info->peer_iface_addr, iaddr, ETH_ALEN);
nego_info->status = (status == -1) ? 0xff : status; nego_info->status = (status == -1) ? 0xff : status;
nego_info->rsp_op_ch = op_ch; nego_info->rsp_op_ch = op_ch;
nego_info->rsp_intent = intent; nego_info->rsp_intent = intent;
@ -4177,9 +4177,9 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
if (invit_info->token != dialogToken) if (invit_info->token != dialogToken)
rtw_wdev_invit_info_init(invit_info); rtw_wdev_invit_info_init(invit_info);
_rtw_memcpy(invit_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN); memcpy(invit_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN);
if (gbssid) if (gbssid)
_rtw_memcpy(invit_info->group_bssid, gbssid, ETH_ALEN); memcpy(invit_info->group_bssid, gbssid, ETH_ALEN);
invit_info->active = tx ? 1 : 0; invit_info->active = tx ? 1 : 0;
invit_info->token = dialogToken; invit_info->token = dialogToken;
invit_info->flags = (flags == -1) ? 0x0 : flags; invit_info->flags = (flags == -1) ? 0x0 : flags;
@ -4502,17 +4502,17 @@ void process_p2p_ps_ie(PADAPTER padapter, u8 *IEs, u32 IELength)
/* NoA length should be n*(13) + 2 */ /* NoA length should be n*(13) + 2 */
if (attr_contentlen > 2 && (attr_contentlen - 2) % 13 == 0) { if (attr_contentlen > 2 && (attr_contentlen - 2) % 13 == 0) {
while (noa_offset < attr_contentlen && noa_num < P2P_MAX_NOA_NUM) { while (noa_offset < attr_contentlen && noa_num < P2P_MAX_NOA_NUM) {
/* _rtw_memcpy(&wifidirect_info->noa_count[noa_num], &noa_attr[noa_offset], 1); */ /* memcpy(&wifidirect_info->noa_count[noa_num], &noa_attr[noa_offset], 1); */
pwdinfo->noa_count[noa_num] = noa_attr[noa_offset]; pwdinfo->noa_count[noa_num] = noa_attr[noa_offset];
noa_offset += 1; noa_offset += 1;
_rtw_memcpy(&pwdinfo->noa_duration[noa_num], &noa_attr[noa_offset], 4); memcpy(&pwdinfo->noa_duration[noa_num], &noa_attr[noa_offset], 4);
noa_offset += 4; noa_offset += 4;
_rtw_memcpy(&pwdinfo->noa_interval[noa_num], &noa_attr[noa_offset], 4); memcpy(&pwdinfo->noa_interval[noa_num], &noa_attr[noa_offset], 4);
noa_offset += 4; noa_offset += 4;
_rtw_memcpy(&pwdinfo->noa_start_time[noa_num], &noa_attr[noa_offset], 4); memcpy(&pwdinfo->noa_start_time[noa_num], &noa_attr[noa_offset], 4);
noa_offset += 4; noa_offset += 4;
noa_num++; noa_num++;
@ -4886,7 +4886,7 @@ u32 rtw_append_beacon_wfd_ie(_adapter *adapter, u8 *pbuf)
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
else if (mlme->wfd_beacon_ie && mlme->wfd_beacon_ie_len > 0) { else if (mlme->wfd_beacon_ie && mlme->wfd_beacon_ie_len > 0) {
len = mlme->wfd_beacon_ie_len; len = mlme->wfd_beacon_ie_len;
_rtw_memcpy(pbuf, mlme->wfd_beacon_ie, len); memcpy(pbuf, mlme->wfd_beacon_ie, len);
} }
#endif #endif
@ -4914,7 +4914,7 @@ u32 rtw_append_probe_req_wfd_ie(_adapter *adapter, u8 *pbuf)
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
else if (mlme->wfd_probe_req_ie && mlme->wfd_probe_req_ie_len > 0) { else if (mlme->wfd_probe_req_ie && mlme->wfd_probe_req_ie_len > 0) {
len = mlme->wfd_probe_req_ie_len; len = mlme->wfd_probe_req_ie_len;
_rtw_memcpy(pbuf, mlme->wfd_probe_req_ie, len); memcpy(pbuf, mlme->wfd_probe_req_ie, len);
} }
#endif #endif
@ -4942,7 +4942,7 @@ u32 rtw_append_probe_resp_wfd_ie(_adapter *adapter, u8 *pbuf)
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
else if (mlme->wfd_probe_resp_ie && mlme->wfd_probe_resp_ie_len > 0) { else if (mlme->wfd_probe_resp_ie && mlme->wfd_probe_resp_ie_len > 0) {
len = mlme->wfd_probe_resp_ie_len; len = mlme->wfd_probe_resp_ie_len;
_rtw_memcpy(pbuf, mlme->wfd_probe_resp_ie, len); memcpy(pbuf, mlme->wfd_probe_resp_ie, len);
} }
#endif #endif
@ -4970,7 +4970,7 @@ u32 rtw_append_assoc_req_wfd_ie(_adapter *adapter, u8 *pbuf)
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
else if (mlme->wfd_assoc_req_ie && mlme->wfd_assoc_req_ie_len > 0) { else if (mlme->wfd_assoc_req_ie && mlme->wfd_assoc_req_ie_len > 0) {
len = mlme->wfd_assoc_req_ie_len; len = mlme->wfd_assoc_req_ie_len;
_rtw_memcpy(pbuf, mlme->wfd_assoc_req_ie, len); memcpy(pbuf, mlme->wfd_assoc_req_ie, len);
} }
#endif #endif
@ -4998,7 +4998,7 @@ u32 rtw_append_assoc_resp_wfd_ie(_adapter *adapter, u8 *pbuf)
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
else if (mlme->wfd_assoc_resp_ie && mlme->wfd_assoc_resp_ie_len > 0) { else if (mlme->wfd_assoc_resp_ie && mlme->wfd_assoc_resp_ie_len > 0) {
len = mlme->wfd_assoc_resp_ie_len; len = mlme->wfd_assoc_resp_ie_len;
_rtw_memcpy(pbuf, mlme->wfd_assoc_resp_ie, len); memcpy(pbuf, mlme->wfd_assoc_resp_ie, len);
} }
#endif #endif
@ -5029,9 +5029,9 @@ void rtw_init_wifidirect_addrs(_adapter *padapter, u8 *dev_addr, u8 *iface_addr)
/*init device&interface address */ /*init device&interface address */
if (dev_addr) if (dev_addr)
_rtw_memcpy(pwdinfo->device_addr, dev_addr, ETH_ALEN); memcpy(pwdinfo->device_addr, dev_addr, ETH_ALEN);
if (iface_addr) if (iface_addr)
_rtw_memcpy(pwdinfo->interface_addr, iface_addr, ETH_ALEN); memcpy(pwdinfo->interface_addr, iface_addr, ETH_ALEN);
#endif #endif
} }
@ -5107,7 +5107,7 @@ void init_wifidirect_info(_adapter *padapter, enum P2P_ROLE role)
pwdinfo->support_rate[6] = 0x60; /* 48 */ pwdinfo->support_rate[6] = 0x60; /* 48 */
pwdinfo->support_rate[7] = 0x6c; /* 54 */ pwdinfo->support_rate[7] = 0x6c; /* 54 */
_rtw_memcpy((void *) pwdinfo->p2p_wildcard_ssid, "DIRECT-", 7); memcpy((void *) pwdinfo->p2p_wildcard_ssid, "DIRECT-", 7);
memset(pwdinfo->device_name, 0x00, WPS_MAX_DEVICE_NAME_LEN); memset(pwdinfo->device_name, 0x00, WPS_MAX_DEVICE_NAME_LEN);
pwdinfo->device_name_len = 0; pwdinfo->device_name_len = 0;

View File

@ -741,7 +741,7 @@ union recv_frame *portctrl(_adapter *adapter, union recv_frame *precv_frame)
/* get ether_type */ /* get ether_type */
ptr = ptr + pfhdr->attrib.hdrlen + pfhdr->attrib.iv_len + LLC_HEADER_SIZE; ptr = ptr + pfhdr->attrib.hdrlen + pfhdr->attrib.iv_len + LLC_HEADER_SIZE;
_rtw_memcpy(&ether_type, ptr, 2); memcpy(&ether_type, ptr, 2);
ether_type = ntohs((unsigned short)ether_type); ether_type = ntohs((unsigned short)ether_type);
if (ether_type == eapol_type) if (ether_type == eapol_type)
@ -805,7 +805,7 @@ sint recv_ucast_pn_decache(union recv_frame *precv_frame)
/* return _FAIL; */ /* return _FAIL; */
} else { } else {
prxcache->last_tid = tid; prxcache->last_tid = tid;
_rtw_memcpy(prxcache->iv[tid], memcpy(prxcache->iv[tid],
(pdata + pattrib->hdrlen), (pdata + pattrib->hdrlen),
sizeof(prxcache->iv[tid])); sizeof(prxcache->iv[tid]));
} }
@ -1309,11 +1309,11 @@ sint sta2sta_data_frame(
} }
} else if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE) { } else if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE) {
_rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN); memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN); memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN); memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
_rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
sta_addr = mybssid; sta_addr = mybssid;
} else } else
@ -1424,11 +1424,11 @@ sint ap2sta_data_frame(
} else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE) && } else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE) &&
(check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) { (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) {
_rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN); memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN); memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN); memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
_rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
*psta = rtw_get_stainfo(pstapriv, pattrib->bssid); /* get sta_info */ *psta = rtw_get_stainfo(pstapriv, pattrib->bssid); /* get sta_info */
@ -1527,11 +1527,11 @@ sint sta2ap_data_frame(
} else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE) && } else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE) &&
(check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) { (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) {
/* RTW_INFO("%s ,in WIFI_MP_STATE\n",__func__); */ /* RTW_INFO("%s ,in WIFI_MP_STATE\n",__func__); */
_rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN); memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN); memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN); memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
_rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
*psta = rtw_get_stainfo(pstapriv, pattrib->bssid); /* get sta_info */ *psta = rtw_get_stainfo(pstapriv, pattrib->bssid); /* get sta_info */
@ -1892,8 +1892,8 @@ bip_verify:
/* set iv and icv length */ /* set iv and icv length */
SET_ICE_IV_LEN(pattrib->iv_len, pattrib->icv_len, pattrib->encrypt); SET_ICE_IV_LEN(pattrib->iv_len, pattrib->icv_len, pattrib->encrypt);
_rtw_memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN); memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN); memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN);
/* actual management data frame body */ /* actual management data frame body */
data_len = pattrib->pkt_len - pattrib->hdrlen - pattrib->iv_len - pattrib->icv_len; data_len = pattrib->pkt_len - pattrib->hdrlen - pattrib->iv_len - pattrib->icv_len;
@ -1917,9 +1917,9 @@ bip_verify:
precv_frame = decryptor(adapter, precv_frame); precv_frame = decryptor(adapter, precv_frame);
/* save actual management data frame body */ /* save actual management data frame body */
_rtw_memcpy(mgmt_DATA, ptr + pattrib->hdrlen + pattrib->iv_len, data_len); memcpy(mgmt_DATA, ptr + pattrib->hdrlen + pattrib->iv_len, data_len);
/* overwrite the iv field */ /* overwrite the iv field */
_rtw_memcpy(ptr + pattrib->hdrlen, mgmt_DATA, data_len); memcpy(ptr + pattrib->hdrlen, mgmt_DATA, data_len);
/* remove the iv and icv length */ /* remove the iv and icv length */
pattrib->pkt_len = pattrib->pkt_len - pattrib->iv_len - pattrib->icv_len; pattrib->pkt_len = pattrib->pkt_len - pattrib->iv_len - pattrib->icv_len;
rtw_mfree(mgmt_DATA, data_len); rtw_mfree(mgmt_DATA, data_len);
@ -2000,30 +2000,30 @@ sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_frame)
pbssid = get_hdr_bssid(ptr); pbssid = get_hdr_bssid(ptr);
_rtw_memcpy(pattrib->dst, pda, ETH_ALEN); memcpy(pattrib->dst, pda, ETH_ALEN);
_rtw_memcpy(pattrib->src, psa, ETH_ALEN); memcpy(pattrib->src, psa, ETH_ALEN);
_rtw_memcpy(pattrib->bssid, pbssid, ETH_ALEN); memcpy(pattrib->bssid, pbssid, ETH_ALEN);
switch (pattrib->to_fr_ds) { switch (pattrib->to_fr_ds) {
case 0: case 0:
_rtw_memcpy(pattrib->ra, pda, ETH_ALEN); memcpy(pattrib->ra, pda, ETH_ALEN);
_rtw_memcpy(pattrib->ta, psa, ETH_ALEN); memcpy(pattrib->ta, psa, ETH_ALEN);
break; break;
case 1: case 1:
_rtw_memcpy(pattrib->ra, pda, ETH_ALEN); memcpy(pattrib->ra, pda, ETH_ALEN);
_rtw_memcpy(pattrib->ta, pbssid, ETH_ALEN); memcpy(pattrib->ta, pbssid, ETH_ALEN);
break; break;
case 2: case 2:
_rtw_memcpy(pattrib->ra, pbssid, ETH_ALEN); memcpy(pattrib->ra, pbssid, ETH_ALEN);
_rtw_memcpy(pattrib->ta, psa, ETH_ALEN); memcpy(pattrib->ta, psa, ETH_ALEN);
break; break;
case 3: case 3:
_rtw_memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN); memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN); memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN);
break; break;
default: default:
@ -2072,29 +2072,29 @@ sint validate_recv_data_frame(_adapter *adapter, union recv_frame *precv_frame)
switch (pattrib->to_fr_ds) { switch (pattrib->to_fr_ds) {
case 0: case 0:
_rtw_memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN); memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN); memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN); memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN); memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN); memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
ret = sta2sta_data_frame(adapter, precv_frame, &psta); ret = sta2sta_data_frame(adapter, precv_frame, &psta);
break; break;
case 1: case 1:
_rtw_memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN); memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN); memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN); memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->src, GetAddr3Ptr(ptr), ETH_ALEN); memcpy(pattrib->src, GetAddr3Ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->bssid, get_addr2_ptr(ptr), ETH_ALEN); memcpy(pattrib->bssid, get_addr2_ptr(ptr), ETH_ALEN);
ret = ap2sta_data_frame(adapter, precv_frame, &psta); ret = ap2sta_data_frame(adapter, precv_frame, &psta);
break; break;
case 2: case 2:
_rtw_memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN); memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN); memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->dst, GetAddr3Ptr(ptr), ETH_ALEN); memcpy(pattrib->dst, GetAddr3Ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN); memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->bssid, GetAddr1Ptr(ptr), ETH_ALEN); memcpy(pattrib->bssid, GetAddr1Ptr(ptr), ETH_ALEN);
ret = sta2ap_data_frame(adapter, precv_frame, &psta); ret = sta2ap_data_frame(adapter, precv_frame, &psta);
break; break;
@ -2374,7 +2374,7 @@ sint validate_recv_frame(_adapter *adapter, union recv_frame *precv_frame)
/* dump eapol */ /* dump eapol */
rtw_hal_get_def_var(adapter, HAL_DEF_DBG_DUMP_RXPKT, &(bDumpRxPkt)); rtw_hal_get_def_var(adapter, HAL_DEF_DBG_DUMP_RXPKT, &(bDumpRxPkt));
/* get ether_type */ /* get ether_type */
_rtw_memcpy(&eth_type, ptr + pattrib->hdrlen + pattrib->iv_len + RATTRIB_GET_MCTRL_LEN(pattrib) + LLC_HEADER_SIZE, 2); memcpy(&eth_type, ptr + pattrib->hdrlen + pattrib->iv_len + RATTRIB_GET_MCTRL_LEN(pattrib) + LLC_HEADER_SIZE, 2);
eth_type = ntohs((unsigned short) eth_type); eth_type = ntohs((unsigned short) eth_type);
if ((bDumpRxPkt == 4) && (eth_type == 0x888e)) if ((bDumpRxPkt == 4) && (eth_type == 0x888e))
dump_rx_packet(ptr); dump_rx_packet(ptr);
@ -2441,7 +2441,7 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe)
len = precvframe->u.hdr.len - rmv_len; len = precvframe->u.hdr.len - rmv_len;
_rtw_memcpy(&eth_type, ptr + rmv_len, 2); memcpy(&eth_type, ptr + rmv_len, 2);
eth_type = ntohs((unsigned short)eth_type); /* pattrib->ether_type */ eth_type = ntohs((unsigned short)eth_type); /* pattrib->ether_type */
pattrib->eth_type = eth_type; pattrib->eth_type = eth_type;
@ -2458,7 +2458,7 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe)
ret = _FAIL; ret = _FAIL;
goto exiting; goto exiting;
} }
_rtw_memcpy(ptr, get_rxmem(precvframe), 24); memcpy(ptr, get_rxmem(precvframe), 24);
ptr += 24; ptr += 24;
} else { } else {
ptr = recvframe_pull(precvframe, (rmv_len - sizeof(struct ethhdr) + (bsnaphdr ? 2 : 0))); ptr = recvframe_pull(precvframe, (rmv_len - sizeof(struct ethhdr) + (bsnaphdr ? 2 : 0)));
@ -2469,12 +2469,12 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe)
} }
if (ptr) { if (ptr) {
_rtw_memcpy(ptr, pattrib->dst, ETH_ALEN); memcpy(ptr, pattrib->dst, ETH_ALEN);
_rtw_memcpy(ptr + ETH_ALEN, pattrib->src, ETH_ALEN); memcpy(ptr + ETH_ALEN, pattrib->src, ETH_ALEN);
if (!bsnaphdr) { if (!bsnaphdr) {
len = htons(len); len = htons(len);
_rtw_memcpy(ptr + 12, &len, 2); memcpy(ptr + 12, &len, 2);
} }
rtw_rframe_set_os_pkt(precvframe); rtw_rframe_set_os_pkt(precvframe);
@ -2540,7 +2540,7 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe)
ptr += rmv_len ; ptr += rmv_len ;
_rtw_memcpy(&eth_type, ptr, 2); memcpy(&eth_type, ptr, 2);
eth_type = ntohs((unsigned short)eth_type); /* pattrib->ether_type */ eth_type = ntohs((unsigned short)eth_type); /* pattrib->ether_type */
ptr += 2; ptr += 2;
@ -2564,7 +2564,7 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe)
} else if (eth_type == 0x8712) { /* append rx status for mp test packets */ } else if (eth_type == 0x8712) { /* append rx status for mp test packets */
/* ptr -= 16; */ /* ptr -= 16; */
/* _rtw_memcpy(ptr, get_rxmem(precvframe), 16); */ /* memcpy(ptr, get_rxmem(precvframe), 16); */
} else { } else {
#ifdef PLATFORM_OS_XP #ifdef PLATFORM_OS_XP
NDIS_PACKET_8021Q_INFO VlanPriInfo; NDIS_PACKET_8021Q_INFO VlanPriInfo;
@ -2585,16 +2585,16 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe)
if (eth_type == 0x8712) { /* append rx status for mp test packets */ if (eth_type == 0x8712) { /* append rx status for mp test packets */
ptr = recvframe_pull(precvframe, (rmv_len - sizeof(struct ethhdr) + 2) - 24); ptr = recvframe_pull(precvframe, (rmv_len - sizeof(struct ethhdr) + 2) - 24);
_rtw_memcpy(ptr, get_rxmem(precvframe), 24); memcpy(ptr, get_rxmem(precvframe), 24);
ptr += 24; ptr += 24;
} else } else
ptr = recvframe_pull(precvframe, (rmv_len - sizeof(struct ethhdr) + 2)); ptr = recvframe_pull(precvframe, (rmv_len - sizeof(struct ethhdr) + 2));
_rtw_memcpy(ptr, pattrib->dst, ETH_ALEN); memcpy(ptr, pattrib->dst, ETH_ALEN);
_rtw_memcpy(ptr + ETH_ALEN, pattrib->src, ETH_ALEN); memcpy(ptr + ETH_ALEN, pattrib->src, ETH_ALEN);
eth_type = htons((unsigned short)eth_type) ; eth_type = htons((unsigned short)eth_type) ;
_rtw_memcpy(ptr + 12, &eth_type, 2); memcpy(ptr + 12, &eth_type, 2);
exit: exit:
@ -2647,7 +2647,7 @@ static void recvframe_expand_pkt(
/* copy data to new pkt */ /* copy data to new pkt */
ptr = skb_put(ppkt, pfhdr->len); ptr = skb_put(ppkt, pfhdr->len);
if (ptr) if (ptr)
_rtw_memcpy(ptr, pfhdr->rx_data, pfhdr->len); memcpy(ptr, pfhdr->rx_data, pfhdr->len);
rtw_skb_free(pfhdr->pkt); rtw_skb_free(pfhdr->pkt);
@ -2735,7 +2735,7 @@ union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q)
recvframe_pull_tail(prframe, pfhdr->attrib.icv_len); recvframe_pull_tail(prframe, pfhdr->attrib.icv_len);
/* memcpy */ /* memcpy */
_rtw_memcpy(pfhdr->rx_tail, pnfhdr->rx_data, pnfhdr->len); memcpy(pfhdr->rx_tail, pnfhdr->rx_data, pnfhdr->len);
recvframe_put(prframe, pnfhdr->len); recvframe_put(prframe, pnfhdr->len);
@ -3760,7 +3760,7 @@ static sint MPwlanhdr_to_ethhdr(union recv_frame *precvframe)
len = precvframe->u.hdr.len - rmv_len; len = precvframe->u.hdr.len - rmv_len;
_rtw_memcpy(&eth_type, ptr + rmv_len, 2); memcpy(&eth_type, ptr + rmv_len, 2);
eth_type = ntohs((unsigned short)eth_type); /* pattrib->ether_type */ eth_type = ntohs((unsigned short)eth_type); /* pattrib->ether_type */
pattrib->eth_type = eth_type; pattrib->eth_type = eth_type;
@ -3768,24 +3768,24 @@ static sint MPwlanhdr_to_ethhdr(union recv_frame *precvframe)
ptr = recvframe_pull(precvframe, (rmv_len - sizeof(struct ethhdr) + (bsnaphdr ? 2 : 0))); ptr = recvframe_pull(precvframe, (rmv_len - sizeof(struct ethhdr) + (bsnaphdr ? 2 : 0)));
} }
_rtw_memcpy(ptr, pattrib->dst, ETH_ALEN); memcpy(ptr, pattrib->dst, ETH_ALEN);
_rtw_memcpy(ptr + ETH_ALEN, pattrib->src, ETH_ALEN); memcpy(ptr + ETH_ALEN, pattrib->src, ETH_ALEN);
if (!bsnaphdr) { if (!bsnaphdr) {
len = htons(len); len = htons(len);
_rtw_memcpy(ptr + 12, &len, 2); memcpy(ptr + 12, &len, 2);
} }
len = htons(pattrib->seq_num); len = htons(pattrib->seq_num);
/* RTW_INFO("wlan seq = %d ,seq_num =%x\n",len,pattrib->seq_num); */ /* RTW_INFO("wlan seq = %d ,seq_num =%x\n",len,pattrib->seq_num); */
_rtw_memcpy(ptr + 12, &len, 2); memcpy(ptr + 12, &len, 2);
if (adapter->mppriv.bRTWSmbCfg == _TRUE) { if (adapter->mppriv.bRTWSmbCfg == _TRUE) {
/* if(_rtw_memcmp(mcastheadermac, pattrib->dst, 3) == _TRUE) */ /* SimpleConfig Dest. */ /* if(_rtw_memcmp(mcastheadermac, pattrib->dst, 3) == _TRUE) */ /* SimpleConfig Dest. */
/* _rtw_memcpy(ptr+ETH_ALEN, pattrib->bssid, ETH_ALEN); */ /* memcpy(ptr+ETH_ALEN, pattrib->bssid, ETH_ALEN); */
if (_rtw_memcmp(mcastheadermac, pattrib->bssid, 3) == _TRUE) /* SimpleConfig Dest. */ if (_rtw_memcmp(mcastheadermac, pattrib->bssid, 3) == _TRUE) /* SimpleConfig Dest. */
_rtw_memcpy(ptr, pattrib->bssid, ETH_ALEN); memcpy(ptr, pattrib->bssid, ETH_ALEN);
} }
@ -3840,34 +3840,34 @@ int mp_recv_frame(_adapter *padapter, union recv_frame *rframe)
psa = get_sa(ptr); psa = get_sa(ptr);
pbssid = get_hdr_bssid(ptr); pbssid = get_hdr_bssid(ptr);
_rtw_memcpy(pattrib->dst, pda, ETH_ALEN); memcpy(pattrib->dst, pda, ETH_ALEN);
_rtw_memcpy(pattrib->src, psa, ETH_ALEN); memcpy(pattrib->src, psa, ETH_ALEN);
_rtw_memcpy(pattrib->bssid, pbssid, ETH_ALEN); memcpy(pattrib->bssid, pbssid, ETH_ALEN);
switch (pattrib->to_fr_ds) { switch (pattrib->to_fr_ds) {
case 0: case 0:
_rtw_memcpy(pattrib->ra, pda, ETH_ALEN); memcpy(pattrib->ra, pda, ETH_ALEN);
_rtw_memcpy(pattrib->ta, psa, ETH_ALEN); memcpy(pattrib->ta, psa, ETH_ALEN);
ret = sta2sta_data_frame(padapter, rframe, &psta); ret = sta2sta_data_frame(padapter, rframe, &psta);
break; break;
case 1: case 1:
_rtw_memcpy(pattrib->ra, pda, ETH_ALEN); memcpy(pattrib->ra, pda, ETH_ALEN);
_rtw_memcpy(pattrib->ta, pbssid, ETH_ALEN); memcpy(pattrib->ta, pbssid, ETH_ALEN);
ret = ap2sta_data_frame(padapter, rframe, &psta); ret = ap2sta_data_frame(padapter, rframe, &psta);
break; break;
case 2: case 2:
_rtw_memcpy(pattrib->ra, pbssid, ETH_ALEN); memcpy(pattrib->ra, pbssid, ETH_ALEN);
_rtw_memcpy(pattrib->ta, psa, ETH_ALEN); memcpy(pattrib->ta, psa, ETH_ALEN);
ret = sta2ap_data_frame(padapter, rframe, &psta); ret = sta2ap_data_frame(padapter, rframe, &psta);
break; break;
case 3: case 3:
_rtw_memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN); memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN); memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN);
ret = _FAIL; ret = _FAIL;
break; break;

View File

@ -637,9 +637,9 @@ void rtw_regd_exc_add_with_nlen(struct rf_ctl_t *rfctl, const char *country, u8
_rtw_init_listhead(&ent->list); _rtw_init_listhead(&ent->list);
if (country) if (country)
_rtw_memcpy(ent->country, country, 2); memcpy(ent->country, country, 2);
ent->domain = domain; ent->domain = domain;
_rtw_memcpy(ent->regd_name, regd_name, nlen); memcpy(ent->regd_name, regd_name, nlen);
_enter_critical_mutex(&rfctl->txpwr_lmt_mutex, &irqL); _enter_critical_mutex(&rfctl->txpwr_lmt_mutex, &irqL);
@ -1061,7 +1061,7 @@ void rtw_txpwr_lmt_add_with_nlen(struct rf_ctl_t *rfctl, const char *regd_name,
goto release_lock; goto release_lock;
_rtw_init_listhead(&ent->list); _rtw_init_listhead(&ent->list);
_rtw_memcpy(ent->regd_name, regd_name, nlen); memcpy(ent->regd_name, regd_name, nlen);
{ {
u8 j, k, l, m; u8 j, k, l, m;

View File

@ -336,9 +336,9 @@ static u8 *build_wlan_hdr(_adapter *padapter, struct xmit_frame *pmgntframe,
fctrl = &(pwlanhdr->frame_ctl); fctrl = &(pwlanhdr->frame_ctl);
*(fctrl) = 0; *(fctrl) = 0;
_rtw_memcpy(pwlanhdr->addr1, psta->cmn.mac_addr, ETH_ALEN); memcpy(pwlanhdr->addr1, psta->cmn.mac_addr, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, memcpy(pwlanhdr->addr3,
get_my_bssid(&(pmlmeinfo->network)),ETH_ALEN); get_my_bssid(&(pmlmeinfo->network)),ETH_ALEN);
RTW_INFO("RM: dst = " MAC_FMT "\n", MAC_ARG(pwlanhdr->addr1)); RTW_INFO("RM: dst = " MAC_FMT "\n", MAC_ARG(pwlanhdr->addr1));
@ -475,10 +475,10 @@ int rm_sitesurvey(struct rm_obj *prm)
prm->q.ch_set_ch_amount = meas_ch_num; prm->q.ch_set_ch_amount = meas_ch_num;
memset(&parm, 0, sizeof(struct sitesurvey_parm)); memset(&parm, 0, sizeof(struct sitesurvey_parm));
_rtw_memcpy(parm.ch, pch_set, memcpy(parm.ch, pch_set,
sizeof(struct rtw_ieee80211_channel) * MAX_OP_CHANNEL_SET_NUM); sizeof(struct rtw_ieee80211_channel) * MAX_OP_CHANNEL_SET_NUM);
_rtw_memcpy(&parm.ssid[0], &prm->q.opt.bcn.ssid, IW_ESSID_MAX_SIZE); memcpy(&parm.ssid[0], &prm->q.opt.bcn.ssid, IW_ESSID_MAX_SIZE);
parm.ssid_num = 1; parm.ssid_num = 1;
parm.scan_mode = prm->q.m_mode; parm.scan_mode = prm->q.m_mode;
@ -529,7 +529,7 @@ static int rm_parse_ch_load_s_elem(struct rm_obj *prm, u8 *pbody, int req_len)
/* check RM_EN */ /* check RM_EN */
rm_en_cap_chk_and_set(prm, RM_CH_LOAD_CAP_EN); rm_en_cap_chk_and_set(prm, RM_CH_LOAD_CAP_EN);
_rtw_memcpy(&(prm->q.opt.clm.rep_cond), memcpy(&(prm->q.opt.clm.rep_cond),
&pbody[p+2], sizeof(prm->q.opt.clm.rep_cond)); &pbody[p+2], sizeof(prm->q.opt.clm.rep_cond));
RTW_INFO("RM: ch_load_rep_info=%u:%u\n", RTW_INFO("RM: ch_load_rep_info=%u:%u\n",
@ -569,7 +569,7 @@ static int rm_parse_noise_histo_s_elem(struct rm_obj *prm,
/* check RM_EN */ /* check RM_EN */
rm_en_cap_chk_and_set(prm, RM_NOISE_HISTO_CAP_EN); rm_en_cap_chk_and_set(prm, RM_NOISE_HISTO_CAP_EN);
_rtw_memcpy(&(prm->q.opt.nhm.rep_cond), memcpy(&(prm->q.opt.nhm.rep_cond),
&pbody[p+2], sizeof(prm->q.opt.nhm.rep_cond)); &pbody[p+2], sizeof(prm->q.opt.nhm.rep_cond));
RTW_INFO("RM: noise_histo_rep_info=%u:%u\n", RTW_INFO("RM: noise_histo_rep_info=%u:%u\n",
@ -618,12 +618,12 @@ static int rm_parse_bcn_req_s_elem(struct rm_obj *prm, u8 *pbody, int req_len)
RTW_INFO("DBG set ssid to %s\n",DBG_BCN_REQ_SSID_NAME); RTW_INFO("DBG set ssid to %s\n",DBG_BCN_REQ_SSID_NAME);
i = strlen(DBG_BCN_REQ_SSID_NAME); i = strlen(DBG_BCN_REQ_SSID_NAME);
prm->q.opt.bcn.ssid.SsidLength = i; prm->q.opt.bcn.ssid.SsidLength = i;
_rtw_memcpy(&(prm->q.opt.bcn.ssid.Ssid), memcpy(&(prm->q.opt.bcn.ssid.Ssid),
DBG_BCN_REQ_SSID_NAME, i); DBG_BCN_REQ_SSID_NAME, i);
#else /* original */ #else /* original */
prm->q.opt.bcn.ssid.SsidLength = pbody[p+1]; prm->q.opt.bcn.ssid.SsidLength = pbody[p+1];
_rtw_memcpy(&(prm->q.opt.bcn.ssid.Ssid), memcpy(&(prm->q.opt.bcn.ssid.Ssid),
&pbody[p+2], pbody[p+1]); &pbody[p+2], pbody[p+1]);
#endif #endif
#endif #endif
@ -638,7 +638,7 @@ static int rm_parse_bcn_req_s_elem(struct rm_obj *prm, u8 *pbody, int req_len)
/* check RM_EN */ /* check RM_EN */
rm_en_cap_chk_and_set(prm, RM_BCN_MEAS_REP_COND_CAP_EN); rm_en_cap_chk_and_set(prm, RM_BCN_MEAS_REP_COND_CAP_EN);
_rtw_memcpy(&(prm->q.opt.bcn.rep_cond), memcpy(&(prm->q.opt.bcn.rep_cond),
&pbody[p+2], sizeof(prm->q.opt.bcn.rep_cond)); &pbody[p+2], sizeof(prm->q.opt.bcn.rep_cond));
RTW_INFO("bcn_req_rep_info=%u:%u\n", RTW_INFO("bcn_req_rep_info=%u:%u\n",
@ -726,7 +726,7 @@ static int rm_parse_meas_req(struct rm_obj *prm, u8 *pbody)
prm->q.m_mode = pbody[p++]; prm->q.m_mode = pbody[p++];
/* BSSID */ /* BSSID */
_rtw_memcpy(&(prm->q.bssid), &pbody[p], 6); memcpy(&(prm->q.bssid), &pbody[p], 6);
p+=6; p+=6;
/* /*
@ -1617,7 +1617,7 @@ int issue_nb_req(struct rm_obj *prm)
sub_ie[0] = 0; /*SSID*/ sub_ie[0] = 0; /*SSID*/
sub_ie[1] = val8; sub_ie[1] = val8;
_rtw_memcpy(pie, prm->q.pssid, val8); memcpy(pie, prm->q.pssid, val8);
pframe = rtw_set_fixed_ie(pframe, val8 + 2, pframe = rtw_set_fixed_ie(pframe, val8 + 2,
sub_ie, &pattr->pktlen); sub_ie, &pattr->pktlen);
@ -1637,7 +1637,7 @@ int issue_nb_req(struct rm_obj *prm)
sub_ie[0] = 0; /*SSID*/ sub_ie[0] = 0; /*SSID*/
sub_ie[1] = pmlmepriv->cur_network.network.Ssid.SsidLength; sub_ie[1] = pmlmepriv->cur_network.network.Ssid.SsidLength;
_rtw_memcpy(pie, pmlmepriv->cur_network.network.Ssid.Ssid, memcpy(pie, pmlmepriv->cur_network.network.Ssid.Ssid,
pmlmepriv->cur_network.network.Ssid.SsidLength); pmlmepriv->cur_network.network.Ssid.SsidLength);
pframe = rtw_set_fixed_ie(pframe, pframe = rtw_set_fixed_ie(pframe,
@ -1978,7 +1978,7 @@ void rtw_ap_parse_sta_rm_en_cap(_adapter *padapter,
if (elem->rm_en_cap) { if (elem->rm_en_cap) {
RTW_INFO("assoc.rm_en_cap="RM_CAP_FMT"\n", RTW_INFO("assoc.rm_en_cap="RM_CAP_FMT"\n",
RM_CAP_ARG(elem->rm_en_cap)); RM_CAP_ARG(elem->rm_en_cap));
_rtw_memcpy(psta->rm_en_cap, memcpy(psta->rm_en_cap,
(elem->rm_en_cap), elem->rm_en_cap_len); (elem->rm_en_cap), elem->rm_en_cap_len);
} }
} }
@ -1987,7 +1987,7 @@ void RM_IE_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
{ {
int i; int i;
_rtw_memcpy(&padapter->rmpriv.rm_en_cap_assoc, pIE->data, pIE->Length); memcpy(&padapter->rmpriv.rm_en_cap_assoc, pIE->data, pIE->Length);
RTW_INFO("assoc.rm_en_cap="RM_CAP_FMT"\n", RM_CAP_ARG(pIE->data)); RTW_INFO("assoc.rm_en_cap="RM_CAP_FMT"\n", RM_CAP_ARG(pIE->data));
} }

View File

@ -254,7 +254,7 @@ u32 rtw_rson_append_ie(_adapter *padapter, unsigned char *pframe, u32 *len)
ptr = ori = pframe; ptr = ori = pframe;
*ptr++ = _VENDOR_SPECIFIC_IE_; *ptr++ = _VENDOR_SPECIFIC_IE_;
*ptr++ = ie_len = sizeof(RTW_RSON_OUI)+sizeof(pdvobj->rson_data); *ptr++ = ie_len = sizeof(RTW_RSON_OUI)+sizeof(pdvobj->rson_data);
_rtw_memcpy(ptr, RTW_RSON_OUI, sizeof(RTW_RSON_OUI)); memcpy(ptr, RTW_RSON_OUI, sizeof(RTW_RSON_OUI));
ptr = ptr + sizeof(RTW_RSON_OUI); ptr = ptr + sizeof(RTW_RSON_OUI);
*ptr++ = pdvobj->rson_data.ver; *ptr++ = pdvobj->rson_data.ver;
*(s32 *)ptr = cpu_to_le32(pdvobj->rson_data.id); *(s32 *)ptr = cpu_to_le32(pdvobj->rson_data.id);
@ -262,7 +262,7 @@ u32 rtw_rson_append_ie(_adapter *padapter, unsigned char *pframe, u32 *len)
*ptr++ = pdvobj->rson_data.hopcnt; *ptr++ = pdvobj->rson_data.hopcnt;
*ptr++ = pdvobj->rson_data.connectible; *ptr++ = pdvobj->rson_data.connectible;
*ptr++ = pdvobj->rson_data.loading; *ptr++ = pdvobj->rson_data.loading;
_rtw_memcpy(ptr, pdvobj->rson_data.res, sizeof(pdvobj->rson_data.res)); memcpy(ptr, pdvobj->rson_data.res, sizeof(pdvobj->rson_data.res));
pframe = ptr; pframe = ptr;
/* /*
iii = iii % 20; iii = iii % 20;

View File

@ -264,8 +264,8 @@ void rtw_wep_encrypt(_adapter *padapter, u8 *pxmitframe)
for (curfragnum = 0; curfragnum < pattrib->nr_frags; curfragnum++) { for (curfragnum = 0; curfragnum < pattrib->nr_frags; curfragnum++) {
iv = pframe + pattrib->hdrlen; iv = pframe + pattrib->hdrlen;
_rtw_memcpy(&wepkey[0], iv, 3); memcpy(&wepkey[0], iv, 3);
_rtw_memcpy(&wepkey[3], &psecuritypriv->dot11DefKey[psecuritypriv->dot11PrivacyKeyIndex].skey[0], keylength); memcpy(&wepkey[3], &psecuritypriv->dot11DefKey[psecuritypriv->dot11PrivacyKeyIndex].skey[0], keylength);
payload = pframe + pattrib->iv_len + pattrib->hdrlen; payload = pframe + pattrib->iv_len + pattrib->hdrlen;
if ((curfragnum + 1) == pattrib->nr_frags) { if ((curfragnum + 1) == pattrib->nr_frags) {
@ -320,9 +320,9 @@ void rtw_wep_decrypt(_adapter *padapter, u8 *precvframe)
/* keyindex=(iv[3]&0x3); */ /* keyindex=(iv[3]&0x3); */
keyindex = prxattrib->key_index; keyindex = prxattrib->key_index;
keylength = psecuritypriv->dot11DefKeylen[keyindex]; keylength = psecuritypriv->dot11DefKeylen[keyindex];
_rtw_memcpy(&wepkey[0], iv, 3); memcpy(&wepkey[0], iv, 3);
/* _rtw_memcpy(&wepkey[3], &psecuritypriv->dot11DefKey[psecuritypriv->dot11PrivacyKeyIndex].skey[0],keylength); */ /* memcpy(&wepkey[3], &psecuritypriv->dot11DefKey[psecuritypriv->dot11PrivacyKeyIndex].skey[0],keylength); */
_rtw_memcpy(&wepkey[3], &psecuritypriv->dot11DefKey[keyindex].skey[0], keylength); memcpy(&wepkey[3], &psecuritypriv->dot11DefKey[keyindex].skey[0], keylength);
length = ((union recv_frame *)precvframe)->u.hdr.len - prxattrib->hdrlen - prxattrib->iv_len; length = ((union recv_frame *)precvframe)->u.hdr.len - prxattrib->hdrlen - prxattrib->iv_len;
payload = pframe + prxattrib->iv_len + prxattrib->hdrlen; payload = pframe + prxattrib->iv_len + prxattrib->hdrlen;
@ -1767,7 +1767,7 @@ static sint aes_decipher(u8 *key, uint hdrlen,
/* start to calculate the mic */ /* start to calculate the mic */
if ((hdrlen + plen + 8) <= MAX_MSG_SIZE) if ((hdrlen + plen + 8) <= MAX_MSG_SIZE)
_rtw_memcpy((void *)message, pframe, (hdrlen + plen + 8)); /* 8 is for ext iv len */ memcpy((void *)message, pframe, (hdrlen + plen + 8)); /* 8 is for ext iv len */
pn_vector[0] = pframe[hdrlen]; pn_vector[0] = pframe[hdrlen];
@ -2049,7 +2049,7 @@ u32 rtw_BIP_verify(_adapter *padapter, u8 *whdr_pos, sint flen
return RTW_RX_HANDLED; return RTW_RX_HANDLED;
/* copy key index */ /* copy key index */
_rtw_memcpy(&pkt_keyid, mme + 2, 2); memcpy(&pkt_keyid, mme + 2, 2);
pkt_keyid = le16_to_cpu(pkt_keyid); pkt_keyid = le16_to_cpu(pkt_keyid);
if (pkt_keyid != keyid) { if (pkt_keyid != keyid) {
RTW_INFO("BIP key index error!\n"); RTW_INFO("BIP key index error!\n");
@ -2057,7 +2057,7 @@ u32 rtw_BIP_verify(_adapter *padapter, u8 *whdr_pos, sint flen
} }
/* save packet number */ /* save packet number */
_rtw_memcpy(&pkt_ipn, mme + 4, 6); memcpy(&pkt_ipn, mme + 4, 6);
pkt_ipn = le64_to_cpu(pkt_ipn); pkt_ipn = le64_to_cpu(pkt_ipn);
/* BIP packet number should bigger than previous BIP packet */ /* BIP packet number should bigger than previous BIP packet */
if (pkt_ipn <= *ipn) { /* wrap around? */ if (pkt_ipn <= *ipn) { /* wrap around? */
@ -2076,7 +2076,7 @@ u32 rtw_BIP_verify(_adapter *padapter, u8 *whdr_pos, sint flen
pwlanhdr = (struct rtw_ieee80211_hdr *)whdr_pos; pwlanhdr = (struct rtw_ieee80211_hdr *)whdr_pos;
/* save the frame body + MME */ /* save the frame body + MME */
_rtw_memcpy(BIP_AAD + BIP_AAD_SIZE, whdr_pos + WLAN_HDR_A3_LEN, flen - WLAN_HDR_A3_LEN); memcpy(BIP_AAD + BIP_AAD_SIZE, whdr_pos + WLAN_HDR_A3_LEN, flen - WLAN_HDR_A3_LEN);
/* point mme to the copy */ /* point mme to the copy */
mme = BIP_AAD + ori_len - 18; mme = BIP_AAD + ori_len - 18;
@ -2085,12 +2085,12 @@ u32 rtw_BIP_verify(_adapter *padapter, u8 *whdr_pos, sint flen
memset(mme + 10, 0, 8); memset(mme + 10, 0, 8);
/* conscruct AAD, copy frame control field */ /* conscruct AAD, copy frame control field */
_rtw_memcpy(BIP_AAD, &pwlanhdr->frame_ctl, 2); memcpy(BIP_AAD, &pwlanhdr->frame_ctl, 2);
ClearRetry(BIP_AAD); ClearRetry(BIP_AAD);
ClearPwrMgt(BIP_AAD); ClearPwrMgt(BIP_AAD);
ClearMData(BIP_AAD); ClearMData(BIP_AAD);
/* conscruct AAD, copy address 1 to address 3 */ /* conscruct AAD, copy address 1 to address 3 */
_rtw_memcpy(BIP_AAD + 2, pwlanhdr->addr1, 18); memcpy(BIP_AAD + 2, pwlanhdr->addr1, 18);
if (omac1_aes_128(key, BIP_AAD, ori_len, mic)) if (omac1_aes_128(key, BIP_AAD, ori_len, mic))
goto BIP_exit; goto BIP_exit;
@ -2220,7 +2220,7 @@ static int sha256_process(struct sha256_state_rtk *md, unsigned char *in,
inlen -= block_size; inlen -= block_size;
} else { } else {
n = MIN(inlen, (block_size - md->curlen)); n = MIN(inlen, (block_size - md->curlen));
_rtw_memcpy(md->buf + md->curlen, in, n); memcpy(md->buf + md->curlen, in, n);
md->curlen += n; md->curlen += n;
in += n; in += n;
inlen -= n; inlen -= n;
@ -2378,7 +2378,7 @@ static void hmac_sha256_vector(u8 *key, size_t key_len, size_t num_elem,
/* start out by storing key in ipad */ /* start out by storing key in ipad */
memset(k_pad, 0, sizeof(k_pad)); memset(k_pad, 0, sizeof(k_pad));
_rtw_memcpy(k_pad, key, key_len); memcpy(k_pad, key, key_len);
/* XOR key with ipad values */ /* XOR key with ipad values */
for (i = 0; i < 64; i++) for (i = 0; i < 64; i++)
k_pad[i] ^= 0x36; k_pad[i] ^= 0x36;
@ -2393,7 +2393,7 @@ static void hmac_sha256_vector(u8 *key, size_t key_len, size_t num_elem,
sha256_vector(1 + num_elem, _addr, _len, mac); sha256_vector(1 + num_elem, _addr, _len, mac);
memset(k_pad, 0, sizeof(k_pad)); memset(k_pad, 0, sizeof(k_pad));
_rtw_memcpy(k_pad, key, key_len); memcpy(k_pad, key, key_len);
/* XOR key with opad values */ /* XOR key with opad values */
for (i = 0; i < 64; i++) for (i = 0; i < 64; i++)
k_pad[i] ^= 0x5c; k_pad[i] ^= 0x5c;
@ -2452,7 +2452,7 @@ static void sha256_prf(u8 *key, size_t key_len, char *label,
pos += SHA256_MAC_LEN; pos += SHA256_MAC_LEN;
} else { } else {
hmac_sha256_vector(key, key_len, 4, addr, len, hash); hmac_sha256_vector(key, key_len, 4, addr, len, hash);
_rtw_memcpy(&buf[pos], hash, plen); memcpy(&buf[pos], hash, plen);
break; break;
} }
counter++; counter++;
@ -2860,7 +2860,7 @@ int omac1_aes_128(const u8 *key, const u8 *data, size_t data_len, u8 *mac)
#ifdef CONFIG_RTW_MESH_AEK #ifdef CONFIG_RTW_MESH_AEK
/* for AES-SIV */ /* for AES-SIV */
#define os_memset memset #define os_memset memset
#define os_memcpy _rtw_memcpy #define os_memcpy memcpy
#define os_malloc rtw_malloc #define os_malloc rtw_malloc
#define bin_clear_free(bin, len) \ #define bin_clear_free(bin, len) \
do { \ do { \
@ -3119,13 +3119,13 @@ void wpa_tdls_generate_tpk(_adapter *padapter, PVOID sta)
*/ */
if (os_memcmp(adapter_mac_addr(padapter), psta->cmn.mac_addr, ETH_ALEN) < 0) { if (os_memcmp(adapter_mac_addr(padapter), psta->cmn.mac_addr, ETH_ALEN) < 0) {
_rtw_memcpy(data, adapter_mac_addr(padapter), ETH_ALEN); memcpy(data, adapter_mac_addr(padapter), ETH_ALEN);
_rtw_memcpy(data + ETH_ALEN, psta->cmn.mac_addr, ETH_ALEN); memcpy(data + ETH_ALEN, psta->cmn.mac_addr, ETH_ALEN);
} else { } else {
_rtw_memcpy(data, psta->cmn.mac_addr, ETH_ALEN); memcpy(data, psta->cmn.mac_addr, ETH_ALEN);
_rtw_memcpy(data + ETH_ALEN, adapter_mac_addr(padapter), ETH_ALEN); memcpy(data + ETH_ALEN, adapter_mac_addr(padapter), ETH_ALEN);
} }
_rtw_memcpy(data + 2 * ETH_ALEN, get_bssid(pmlmepriv), ETH_ALEN); memcpy(data + 2 * ETH_ALEN, get_bssid(pmlmepriv), ETH_ALEN);
sha256_prf(key_input, SHA256_MAC_LEN, "TDLS PMK", data, sizeof(data), (u8 *) &psta->tpk, sizeof(psta->tpk)); sha256_prf(key_input, SHA256_MAC_LEN, "TDLS PMK", data, sizeof(data), (u8 *) &psta->tpk, sizeof(psta->tpk));
@ -3162,24 +3162,24 @@ int wpa_tdls_ftie_mic(u8 *kck, u8 trans_seq,
pos = buf; pos = buf;
_lnkid = (struct wpa_tdls_lnkid *) lnkid; _lnkid = (struct wpa_tdls_lnkid *) lnkid;
/* 1) TDLS initiator STA MAC address */ /* 1) TDLS initiator STA MAC address */
_rtw_memcpy(pos, _lnkid->init_sta, ETH_ALEN); memcpy(pos, _lnkid->init_sta, ETH_ALEN);
pos += ETH_ALEN; pos += ETH_ALEN;
/* 2) TDLS responder STA MAC address */ /* 2) TDLS responder STA MAC address */
_rtw_memcpy(pos, _lnkid->resp_sta, ETH_ALEN); memcpy(pos, _lnkid->resp_sta, ETH_ALEN);
pos += ETH_ALEN; pos += ETH_ALEN;
/* 3) Transaction Sequence number */ /* 3) Transaction Sequence number */
*pos++ = trans_seq; *pos++ = trans_seq;
/* 4) Link Identifier IE */ /* 4) Link Identifier IE */
_rtw_memcpy(pos, lnkid, 2 + lnkid[1]); memcpy(pos, lnkid, 2 + lnkid[1]);
pos += 2 + lnkid[1]; pos += 2 + lnkid[1];
/* 5) RSN IE */ /* 5) RSN IE */
_rtw_memcpy(pos, rsnie, 2 + rsnie[1]); memcpy(pos, rsnie, 2 + rsnie[1]);
pos += 2 + rsnie[1]; pos += 2 + rsnie[1];
/* 6) Timeout Interval IE */ /* 6) Timeout Interval IE */
_rtw_memcpy(pos, timeoutie, 2 + timeoutie[1]); memcpy(pos, timeoutie, 2 + timeoutie[1]);
pos += 2 + timeoutie[1]; pos += 2 + timeoutie[1];
/* 7) FTIE, with the MIC field of the FTIE set to 0 */ /* 7) FTIE, with the MIC field of the FTIE set to 0 */
_rtw_memcpy(pos, ftie, 2 + ftie[1]); memcpy(pos, ftie, 2 + ftie[1]);
_ftie = (struct wpa_tdls_ftie *) pos; _ftie = (struct wpa_tdls_ftie *) pos;
memset(_ftie->mic, 0, TDLS_MIC_LEN); memset(_ftie->mic, 0, TDLS_MIC_LEN);
pos += 2 + ftie[1]; pos += 2 + ftie[1];
@ -3218,17 +3218,17 @@ int wpa_tdls_teardown_ftie_mic(u8 *kck, u8 *lnkid, u16 reason,
pos = buf; pos = buf;
/* 1) Link Identifier IE */ /* 1) Link Identifier IE */
_rtw_memcpy(pos, lnkid, 2 + lnkid[1]); memcpy(pos, lnkid, 2 + lnkid[1]);
pos += 2 + lnkid[1]; pos += 2 + lnkid[1];
/* 2) Reason Code */ /* 2) Reason Code */
_rtw_memcpy(pos, (u8 *)&reason, 2); memcpy(pos, (u8 *)&reason, 2);
pos += 2; pos += 2;
/* 3) Dialog Token */ /* 3) Dialog Token */
*pos++ = dialog_token; *pos++ = dialog_token;
/* 4) Transaction Sequence number */ /* 4) Transaction Sequence number */
*pos++ = trans_seq; *pos++ = trans_seq;
/* 5) FTIE, with the MIC field of the FTIE set to 0 */ /* 5) FTIE, with the MIC field of the FTIE set to 0 */
_rtw_memcpy(pos, ftie, 2 + ftie[1]); memcpy(pos, ftie, 2 + ftie[1]);
_ftie = (struct wpa_tdls_ftie *) pos; _ftie = (struct wpa_tdls_ftie *) pos;
memset(_ftie->mic, 0, TDLS_MIC_LEN); memset(_ftie->mic, 0, TDLS_MIC_LEN);
pos += 2 + ftie[1]; pos += 2 + ftie[1];
@ -3260,24 +3260,24 @@ int tdls_verify_mic(u8 *kck, u8 trans_seq,
pos = buf; pos = buf;
/* 1) TDLS initiator STA MAC address */ /* 1) TDLS initiator STA MAC address */
_rtw_memcpy(pos, lnkid + ETH_ALEN + 2, ETH_ALEN); memcpy(pos, lnkid + ETH_ALEN + 2, ETH_ALEN);
pos += ETH_ALEN; pos += ETH_ALEN;
/* 2) TDLS responder STA MAC address */ /* 2) TDLS responder STA MAC address */
_rtw_memcpy(pos, lnkid + 2 * ETH_ALEN + 2, ETH_ALEN); memcpy(pos, lnkid + 2 * ETH_ALEN + 2, ETH_ALEN);
pos += ETH_ALEN; pos += ETH_ALEN;
/* 3) Transaction Sequence number */ /* 3) Transaction Sequence number */
*pos++ = trans_seq; *pos++ = trans_seq;
/* 4) Link Identifier IE */ /* 4) Link Identifier IE */
_rtw_memcpy(pos, lnkid, 2 + 18); memcpy(pos, lnkid, 2 + 18);
pos += 2 + 18; pos += 2 + 18;
/* 5) RSN IE */ /* 5) RSN IE */
_rtw_memcpy(pos, rsnie, 2 + *(rsnie + 1)); memcpy(pos, rsnie, 2 + *(rsnie + 1));
pos += 2 + *(rsnie + 1); pos += 2 + *(rsnie + 1);
/* 6) Timeout Interval IE */ /* 6) Timeout Interval IE */
_rtw_memcpy(pos, timeoutie, 2 + *(timeoutie + 1)); memcpy(pos, timeoutie, 2 + *(timeoutie + 1));
pos += 2 + *(timeoutie + 1); pos += 2 + *(timeoutie + 1);
/* 7) FTIE, with the MIC field of the FTIE set to 0 */ /* 7) FTIE, with the MIC field of the FTIE set to 0 */
_rtw_memcpy(pos, ftie, 2 + *(ftie + 1)); memcpy(pos, ftie, 2 + *(ftie + 1));
pos += 2; pos += 2;
tmp_ftie = (u8 *)(pos + 2); tmp_ftie = (u8 *)(pos + 2);
memset(tmp_ftie, 0, 16); memset(tmp_ftie, 0, 16);

View File

@ -479,7 +479,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, const u8 *hwaddr)
psta->padapter = pstapriv->padapter; psta->padapter = pstapriv->padapter;
_rtw_memcpy(psta->cmn.mac_addr, hwaddr, ETH_ALEN); memcpy(psta->cmn.mac_addr, hwaddr, ETH_ALEN);
index = wifi_mac_hash(hwaddr); index = wifi_mac_hash(hwaddr);
@ -504,8 +504,8 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, const u8 *hwaddr)
* So, we initialize the tid_rxseq variable as the 0xffff. */ * So, we initialize the tid_rxseq variable as the 0xffff. */
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
_rtw_memcpy(&psta->sta_recvpriv.rxcache.tid_rxseq[i], &wRxSeqInitialValue, 2); memcpy(&psta->sta_recvpriv.rxcache.tid_rxseq[i], &wRxSeqInitialValue, 2);
_rtw_memcpy(&psta->sta_recvpriv.bmc_tid_rxseq[i], &wRxSeqInitialValue, 2); memcpy(&psta->sta_recvpriv.bmc_tid_rxseq[i], &wRxSeqInitialValue, 2);
memset(&psta->sta_recvpriv.rxcache.iv[i], 0, sizeof(psta->sta_recvpriv.rxcache.iv[i])); memset(&psta->sta_recvpriv.rxcache.iv[i], 0, sizeof(psta->sta_recvpriv.rxcache.iv[i]));
} }
@ -1142,7 +1142,7 @@ struct sta_info *rtw_pre_link_sta_add(struct sta_priv *stapriv, u8 *hwaddr)
} }
if (exist == _FALSE && node) { if (exist == _FALSE && node) {
_rtw_memcpy(node->addr, hwaddr, ETH_ALEN); memcpy(node->addr, hwaddr, ETH_ALEN);
node->valid = _TRUE; node->valid = _TRUE;
pre_link_sta_ctl->num++; pre_link_sta_ctl->num++;
} }
@ -1227,7 +1227,7 @@ void rtw_pre_link_sta_ctl_reset(struct sta_priv *stapriv)
for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) { for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) {
if (pre_link_sta_ctl->node[i].valid == _FALSE) if (pre_link_sta_ctl->node[i].valid == _FALSE)
continue; continue;
_rtw_memcpy(&(addrs[j][0]), pre_link_sta_ctl->node[i].addr, ETH_ALEN); memcpy(&(addrs[j][0]), pre_link_sta_ctl->node[i].addr, ETH_ALEN);
pre_link_sta_ctl->node[i].valid = _FALSE; pre_link_sta_ctl->node[i].valid = _FALSE;
pre_link_sta_ctl->num--; pre_link_sta_ctl->num--;
j++; j++;

File diff suppressed because it is too large Load Diff

View File

@ -464,7 +464,7 @@ void update_sta_vht_info_apmode(_adapter *padapter, PVOID sta)
pvhtpriv_sta->ampdu_len = GET_VHT_CAPABILITY_ELE_MAX_RXAMPDU_FACTOR(pvhtpriv_sta->vht_cap); pvhtpriv_sta->ampdu_len = GET_VHT_CAPABILITY_ELE_MAX_RXAMPDU_FACTOR(pvhtpriv_sta->vht_cap);
pcap_mcs = GET_VHT_CAPABILITY_ELE_RX_MCS(pvhtpriv_sta->vht_cap); pcap_mcs = GET_VHT_CAPABILITY_ELE_RX_MCS(pvhtpriv_sta->vht_cap);
_rtw_memcpy(pvhtpriv_sta->vht_mcs_map, pcap_mcs, 2); memcpy(pvhtpriv_sta->vht_mcs_map, pcap_mcs, 2);
pvhtpriv_sta->vht_highest_rate = rtw_get_vht_highest_rate(pvhtpriv_sta->vht_mcs_map); pvhtpriv_sta->vht_highest_rate = rtw_get_vht_highest_rate(pvhtpriv_sta->vht_mcs_map);
} }
@ -545,8 +545,8 @@ void VHT_caps_handler_infra_ap(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE
/*store information about vht_mcs_set*/ /*store information about vht_mcs_set*/
pcap_mcs = GET_VHT_CAPABILITY_ELE_RX_MCS(pIE->data); pcap_mcs = GET_VHT_CAPABILITY_ELE_RX_MCS(pIE->data);
pcap_mcs_tx = GET_VHT_CAPABILITY_ELE_TX_MCS(pIE->data); pcap_mcs_tx = GET_VHT_CAPABILITY_ELE_TX_MCS(pIE->data);
_rtw_memcpy(pvhtpriv->vht_mcs_map_infra_ap, pcap_mcs, 2); memcpy(pvhtpriv->vht_mcs_map_infra_ap, pcap_mcs, 2);
_rtw_memcpy(pvhtpriv->vht_mcs_map_tx_infra_ap, pcap_mcs_tx, 2); memcpy(pvhtpriv->vht_mcs_map_tx_infra_ap, pcap_mcs_tx, 2);
Rx_ss = VHT_get_ss_from_map(pvhtpriv->vht_mcs_map_infra_ap); Rx_ss = VHT_get_ss_from_map(pvhtpriv->vht_mcs_map_infra_ap);
Tx_ss = VHT_get_ss_from_map(pvhtpriv->vht_mcs_map_tx_infra_ap); Tx_ss = VHT_get_ss_from_map(pvhtpriv->vht_mcs_map_tx_infra_ap);
@ -722,7 +722,7 @@ void rtw_process_vht_op_mode_notify(_adapter *padapter, u8 *pframe, PVOID sta)
update_ra = _TRUE; update_ra = _TRUE;
rtw_vht_nss_to_mcsmap(target_rxss, vht_mcs_map, psta->vhtpriv.vht_mcs_map); rtw_vht_nss_to_mcsmap(target_rxss, vht_mcs_map, psta->vhtpriv.vht_mcs_map);
_rtw_memcpy(psta->vhtpriv.vht_mcs_map, vht_mcs_map, 2); memcpy(psta->vhtpriv.vht_mcs_map, vht_mcs_map, 2);
rtw_hal_update_sta_ra_info(padapter, psta); rtw_hal_update_sta_ra_info(padapter, psta);
} }
@ -761,7 +761,7 @@ u32 rtw_build_vht_operation_ie(_adapter *padapter, u8 *pbuf, u8 channel)
SET_VHT_OPERATION_ELE_CHL_CENTER_FREQ1(operation, center_freq);/* Todo: need to set correct center channel */ SET_VHT_OPERATION_ELE_CHL_CENTER_FREQ1(operation, center_freq);/* Todo: need to set correct center channel */
SET_VHT_OPERATION_ELE_CHL_CENTER_FREQ2(operation, 0); SET_VHT_OPERATION_ELE_CHL_CENTER_FREQ2(operation, 0);
_rtw_memcpy(operation + 3, pvhtpriv->vht_mcs_map, 2); memcpy(operation + 3, pvhtpriv->vht_mcs_map, 2);
rtw_set_ie(pbuf, EID_VHTOperation, 5, operation, &len); rtw_set_ie(pbuf, EID_VHTOperation, 5, operation, &len);
@ -912,10 +912,10 @@ u32 rtw_build_vht_cap_ie(_adapter *padapter, u8 *pbuf)
SET_VHT_CAPABILITY_ELE_LINK_ADAPTION(pcap, 0); SET_VHT_CAPABILITY_ELE_LINK_ADAPTION(pcap, 0);
pcap_mcs = GET_VHT_CAPABILITY_ELE_RX_MCS(pcap); pcap_mcs = GET_VHT_CAPABILITY_ELE_RX_MCS(pcap);
_rtw_memcpy(pcap_mcs, pvhtpriv->vht_mcs_map, 2); memcpy(pcap_mcs, pvhtpriv->vht_mcs_map, 2);
pcap_mcs = GET_VHT_CAPABILITY_ELE_TX_MCS(pcap); pcap_mcs = GET_VHT_CAPABILITY_ELE_TX_MCS(pcap);
_rtw_memcpy(pcap_mcs, pvhtpriv->vht_mcs_map, 2); memcpy(pcap_mcs, pvhtpriv->vht_mcs_map, 2);
/* find the largest bw supported by both registry and hal */ /* find the largest bw supported by both registry and hal */
bw = hal_largest_bw(padapter, REGSTY_BW_5G(pregistrypriv)); bw = hal_largest_bw(padapter, REGSTY_BW_5G(pregistrypriv));

View File

@ -163,7 +163,7 @@ WapiGetEntryForCamWrite(_adapter *padapter, u8 *pMacAddr, u8 KID, BOOLEAN IsMsk)
pWapiInfo->wapiCamEntry[i].IsUsed = 1; pWapiInfo->wapiCamEntry[i].IsUsed = 1;
pWapiInfo->wapiCamEntry[i].type = IsMsk; pWapiInfo->wapiCamEntry[i].type = IsMsk;
pWapiInfo->wapiCamEntry[i].keyidx = KID; pWapiInfo->wapiCamEntry[i].keyidx = KID;
_rtw_memcpy(pWapiInfo->wapiCamEntry[i].PeerMacAddr, pMacAddr, ETH_ALEN); memcpy(pWapiInfo->wapiCamEntry[i].PeerMacAddr, pMacAddr, ETH_ALEN);
ret = pWapiInfo->wapiCamEntry[i].entry_idx; ret = pWapiInfo->wapiCamEntry[i].entry_idx;
break; break;
} }
@ -438,9 +438,9 @@ void rtw_wapi_update_info(_adapter *padapter, union recv_frame *precv_frame)
precv_hdr->UserPriority = 0; precv_hdr->UserPriority = 0;
pTA = get_addr2_ptr(ptr); pTA = get_addr2_ptr(ptr);
_rtw_memcpy((u8 *)precv_hdr->WapiSrcAddr, pTA, 6); memcpy((u8 *)precv_hdr->WapiSrcAddr, pTA, 6);
pRecvPN = ptr + precv_hdr->attrib.hdrlen + 2; pRecvPN = ptr + precv_hdr->attrib.hdrlen + 2;
_rtw_memcpy((u8 *)precv_hdr->WapiTempPN, pRecvPN, 16); memcpy((u8 *)precv_hdr->WapiTempPN, pRecvPN, 16);
WAPI_TRACE(WAPI_RX, "<========== %s\n", __FUNCTION__); WAPI_TRACE(WAPI_RX, "<========== %s\n", __FUNCTION__);
} }
@ -543,12 +543,12 @@ u8 rtw_wapi_check_for_drop(
if (!WapiComparePN(precv_hdr->WapiTempPN, pLastRecvPN)) { if (!WapiComparePN(precv_hdr->WapiTempPN, pLastRecvPN)) {
WAPI_TRACE(WAPI_RX, "%s: Equal PN!!\n", __FUNCTION__); WAPI_TRACE(WAPI_RX, "%s: Equal PN!!\n", __FUNCTION__);
if (IS_MCAST(precv_hdr->attrib.ra)) if (IS_MCAST(precv_hdr->attrib.ra))
_rtw_memcpy(pLastRecvPN, WapiAEMultiCastPNInitialValueSrc, 16); memcpy(pLastRecvPN, WapiAEMultiCastPNInitialValueSrc, 16);
else else
_rtw_memcpy(pLastRecvPN, WapiAEPNInitialValueSrc, 16); memcpy(pLastRecvPN, WapiAEPNInitialValueSrc, 16);
bDrop = true; bDrop = true;
} else } else
_rtw_memcpy(pLastRecvPN, precv_hdr->WapiTempPN, 16); memcpy(pLastRecvPN, precv_hdr->WapiTempPN, 16);
} }
WAPI_TRACE(WAPI_RX, "<========== %s\n", __FUNCTION__); WAPI_TRACE(WAPI_RX, "<========== %s\n", __FUNCTION__);
@ -571,7 +571,7 @@ void rtw_build_probe_resp_wapi_ie(_adapter *padapter, unsigned char *pframe, str
WapiIELength = pWapiInfo->wapiIELength; WapiIELength = pWapiInfo->wapiIELength;
pframe[0] = _WAPI_IE_; pframe[0] = _WAPI_IE_;
pframe[1] = WapiIELength; pframe[1] = WapiIELength;
_rtw_memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength); memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength);
pframe += WapiIELength + 2; pframe += WapiIELength + 2;
pattrib->pktlen += WapiIELength + 2; pattrib->pktlen += WapiIELength + 2;
@ -593,7 +593,7 @@ void rtw_build_beacon_wapi_ie(_adapter *padapter, unsigned char *pframe, struct
WapiIELength = pWapiInfo->wapiIELength; WapiIELength = pWapiInfo->wapiIELength;
pframe[0] = _WAPI_IE_; pframe[0] = _WAPI_IE_;
pframe[1] = WapiIELength; pframe[1] = WapiIELength;
_rtw_memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength); memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength);
pframe += WapiIELength + 2; pframe += WapiIELength + 2;
pattrib->pktlen += WapiIELength + 2; pattrib->pktlen += WapiIELength + 2;
@ -620,16 +620,16 @@ void rtw_build_assoc_req_wapi_ie(_adapter *padapter, unsigned char *pframe, stru
if (!list_empty(&(pWapiInfo->wapiBKIDStoreList))) { if (!list_empty(&(pWapiInfo->wapiBKIDStoreList))) {
list_for_each_entry(pWapiBKID, &pWapiInfo->wapiBKIDStoreList, list) { list_for_each_entry(pWapiBKID, &pWapiInfo->wapiBKIDStoreList, list) {
bkidNum++; bkidNum++;
_rtw_memcpy(pWapiInfo->wapiIE + WapiIELength + 2, pWapiBKID->bkid, 16); memcpy(pWapiInfo->wapiIE + WapiIELength + 2, pWapiBKID->bkid, 16);
WapiIELength += 16; WapiIELength += 16;
} }
} }
_rtw_memcpy(pWapiInfo->wapiIE + WapiIELength, &bkidNum, 2); memcpy(pWapiInfo->wapiIE + WapiIELength, &bkidNum, 2);
WapiIELength += 2; WapiIELength += 2;
pframe[0] = _WAPI_IE_; pframe[0] = _WAPI_IE_;
pframe[1] = WapiIELength; pframe[1] = WapiIELength;
_rtw_memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength); memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength);
pframe += WapiIELength + 2; pframe += WapiIELength + 2;
pattrib->pktlen += WapiIELength + 2; pattrib->pktlen += WapiIELength + 2;
WAPI_TRACE(WAPI_MLME, "<========== %s\n", __FUNCTION__); WAPI_TRACE(WAPI_MLME, "<========== %s\n", __FUNCTION__);
@ -653,15 +653,15 @@ void rtw_wapi_on_assoc_ok(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
pWapiSta = (PRT_WAPI_STA_INFO)list_entry(pWapiInfo->wapiSTAIdleList.next, RT_WAPI_STA_INFO, list); pWapiSta = (PRT_WAPI_STA_INFO)list_entry(pWapiInfo->wapiSTAIdleList.next, RT_WAPI_STA_INFO, list);
list_del_init(&pWapiSta->list); list_del_init(&pWapiSta->list);
list_add_tail(&pWapiSta->list, &pWapiInfo->wapiSTAUsedList); list_add_tail(&pWapiSta->list, &pWapiInfo->wapiSTAUsedList);
_rtw_memcpy(pWapiSta->PeerMacAddr, padapter->mlmeextpriv.mlmext_info.network.MacAddress, 6); memcpy(pWapiSta->PeerMacAddr, padapter->mlmeextpriv.mlmext_info.network.MacAddress, 6);
_rtw_memcpy(pWapiSta->lastRxMulticastPN, WapiAEMultiCastPNInitialValueSrc, 16); memcpy(pWapiSta->lastRxMulticastPN, WapiAEMultiCastPNInitialValueSrc, 16);
_rtw_memcpy(pWapiSta->lastRxUnicastPN, WapiAEPNInitialValueSrc, 16); memcpy(pWapiSta->lastRxUnicastPN, WapiAEPNInitialValueSrc, 16);
/* For chenk PN error with Qos Data after s3: add by ylb 20111114 */ /* For chenk PN error with Qos Data after s3: add by ylb 20111114 */
_rtw_memcpy(pWapiSta->lastRxUnicastPNBEQueue, WapiAEPNInitialValueSrc, 16); memcpy(pWapiSta->lastRxUnicastPNBEQueue, WapiAEPNInitialValueSrc, 16);
_rtw_memcpy(pWapiSta->lastRxUnicastPNBKQueue, WapiAEPNInitialValueSrc, 16); memcpy(pWapiSta->lastRxUnicastPNBKQueue, WapiAEPNInitialValueSrc, 16);
_rtw_memcpy(pWapiSta->lastRxUnicastPNVIQueue, WapiAEPNInitialValueSrc, 16); memcpy(pWapiSta->lastRxUnicastPNVIQueue, WapiAEPNInitialValueSrc, 16);
_rtw_memcpy(pWapiSta->lastRxUnicastPNVOQueue, WapiAEPNInitialValueSrc, 16); memcpy(pWapiSta->lastRxUnicastPNVOQueue, WapiAEPNInitialValueSrc, 16);
WAPI_TRACE(WAPI_MLME, "<========== %s\n", __FUNCTION__); WAPI_TRACE(WAPI_MLME, "<========== %s\n", __FUNCTION__);
} }
@ -1189,7 +1189,7 @@ void rtw_wapi_get_iv(_adapter *padapter, u8 *pRA, u8 *IV)
pWapiExt->Reserved = 0; pWapiExt->Reserved = 0;
bPNOverflow = WapiIncreasePN(pWapiSta->lastTxUnicastPN, 2); bPNOverflow = WapiIncreasePN(pWapiSta->lastTxUnicastPN, 2);
_rtw_memcpy(pWapiExt->PN, pWapiSta->lastTxUnicastPN, 16); memcpy(pWapiExt->PN, pWapiSta->lastTxUnicastPN, 16);
} }
} }
@ -1265,19 +1265,19 @@ void rtw_wapi_set_set_encryption(_adapter *padapter, struct ieee_param *param)
if (param->u.crypt.set_tx == 1) { if (param->u.crypt.set_tx == 1) {
list_for_each_entry(pWapiSta, &pWapiInfo->wapiSTAUsedList, list) { list_for_each_entry(pWapiSta, &pWapiInfo->wapiSTAUsedList, list) {
if (_rtw_memcmp(pWapiSta->PeerMacAddr, param->sta_addr, 6)) { if (_rtw_memcmp(pWapiSta->PeerMacAddr, param->sta_addr, 6)) {
_rtw_memcpy(pWapiSta->lastTxUnicastPN, WapiASUEPNInitialValueSrc, 16); memcpy(pWapiSta->lastTxUnicastPN, WapiASUEPNInitialValueSrc, 16);
pWapiSta->wapiUsk.bSet = true; pWapiSta->wapiUsk.bSet = true;
_rtw_memcpy(pWapiSta->wapiUsk.dataKey, param->u.crypt.key, 16); memcpy(pWapiSta->wapiUsk.dataKey, param->u.crypt.key, 16);
_rtw_memcpy(pWapiSta->wapiUsk.micKey, param->u.crypt.key + 16, 16); memcpy(pWapiSta->wapiUsk.micKey, param->u.crypt.key + 16, 16);
pWapiSta->wapiUsk.keyId = param->u.crypt.idx ; pWapiSta->wapiUsk.keyId = param->u.crypt.idx ;
pWapiSta->wapiUsk.bTxEnable = true; pWapiSta->wapiUsk.bTxEnable = true;
_rtw_memcpy(pWapiSta->lastRxUnicastPNBEQueue, WapiAEPNInitialValueSrc, 16); memcpy(pWapiSta->lastRxUnicastPNBEQueue, WapiAEPNInitialValueSrc, 16);
_rtw_memcpy(pWapiSta->lastRxUnicastPNBKQueue, WapiAEPNInitialValueSrc, 16); memcpy(pWapiSta->lastRxUnicastPNBKQueue, WapiAEPNInitialValueSrc, 16);
_rtw_memcpy(pWapiSta->lastRxUnicastPNVIQueue, WapiAEPNInitialValueSrc, 16); memcpy(pWapiSta->lastRxUnicastPNVIQueue, WapiAEPNInitialValueSrc, 16);
_rtw_memcpy(pWapiSta->lastRxUnicastPNVOQueue, WapiAEPNInitialValueSrc, 16); memcpy(pWapiSta->lastRxUnicastPNVOQueue, WapiAEPNInitialValueSrc, 16);
_rtw_memcpy(pWapiSta->lastRxUnicastPN, WapiAEPNInitialValueSrc, 16); memcpy(pWapiSta->lastRxUnicastPN, WapiAEPNInitialValueSrc, 16);
pWapiSta->wapiUskUpdate.bTxEnable = false; pWapiSta->wapiUskUpdate.bTxEnable = false;
pWapiSta->wapiUskUpdate.bSet = false; pWapiSta->wapiUskUpdate.bSet = false;
@ -1291,15 +1291,15 @@ void rtw_wapi_set_set_encryption(_adapter *padapter, struct ieee_param *param)
list_for_each_entry(pWapiSta, &pWapiInfo->wapiSTAUsedList, list) { list_for_each_entry(pWapiSta, &pWapiInfo->wapiSTAUsedList, list) {
if (_rtw_memcmp(pWapiSta->PeerMacAddr, get_bssid(pmlmepriv), 6)) { if (_rtw_memcmp(pWapiSta->PeerMacAddr, get_bssid(pmlmepriv), 6)) {
pWapiSta->wapiMsk.bSet = true; pWapiSta->wapiMsk.bSet = true;
_rtw_memcpy(pWapiSta->wapiMsk.dataKey, param->u.crypt.key, 16); memcpy(pWapiSta->wapiMsk.dataKey, param->u.crypt.key, 16);
_rtw_memcpy(pWapiSta->wapiMsk.micKey, param->u.crypt.key + 16, 16); memcpy(pWapiSta->wapiMsk.micKey, param->u.crypt.key + 16, 16);
pWapiSta->wapiMsk.keyId = param->u.crypt.idx ; pWapiSta->wapiMsk.keyId = param->u.crypt.idx ;
pWapiSta->wapiMsk.bTxEnable = false; pWapiSta->wapiMsk.bTxEnable = false;
if (!pWapiSta->bSetkeyOk) if (!pWapiSta->bSetkeyOk)
pWapiSta->bSetkeyOk = true; pWapiSta->bSetkeyOk = true;
pWapiSta->bAuthenticateInProgress = false; pWapiSta->bAuthenticateInProgress = false;
_rtw_memcpy(pWapiSta->lastRxMulticastPN, WapiAEMultiCastPNInitialValueSrc, 16); memcpy(pWapiSta->lastRxMulticastPN, WapiAEMultiCastPNInitialValueSrc, 16);
if (psecuritypriv->sw_decrypt == false) { if (psecuritypriv->sw_decrypt == false) {
/* set rx broadcast key for ASUE */ /* set rx broadcast key for ASUE */

View File

@ -338,7 +338,7 @@ void get_rate_set(_adapter *padapter, unsigned char *pbssrate, int *bssrate_len)
memset(supportedrates, 0, NumRates); memset(supportedrates, 0, NumRates);
*bssrate_len = ratetbl2rateset(padapter, supportedrates); *bssrate_len = ratetbl2rateset(padapter, supportedrates);
_rtw_memcpy(pbssrate, supportedrates, *bssrate_len); memcpy(pbssrate, supportedrates, *bssrate_len);
} }
void set_mcs_rate_by_mask(u8 *mcs_set, u32 mask) void set_mcs_rate_by_mask(u8 *mcs_set, u32 mask)
@ -675,7 +675,7 @@ __inline u8 *get_my_bssid(WLAN_BSSID_EX *pnetwork)
u16 get_beacon_interval(WLAN_BSSID_EX *bss) u16 get_beacon_interval(WLAN_BSSID_EX *bss)
{ {
unsigned short val; unsigned short val;
_rtw_memcpy((unsigned char *)&val, rtw_get_beacon_interval_from_ie(bss->IEs), 2); memcpy((unsigned char *)&val, rtw_get_beacon_interval_from_ie(bss->IEs), 2);
return le16_to_cpu(val); return le16_to_cpu(val);
@ -793,7 +793,7 @@ inline void write_cam_from_cache(_adapter *adapter, u8 id)
struct sec_cam_ent cache; struct sec_cam_ent cache;
_enter_critical_bh(&cam_ctl->lock, &irqL); _enter_critical_bh(&cam_ctl->lock, &irqL);
_rtw_memcpy(&cache, &dvobj->cam_cache[id], sizeof(struct sec_cam_ent)); memcpy(&cache, &dvobj->cam_cache[id], sizeof(struct sec_cam_ent));
_exit_critical_bh(&cam_ctl->lock, &irqL); _exit_critical_bh(&cam_ctl->lock, &irqL);
rtw_sec_write_cam_ent(adapter, id, cache.ctrl, cache.mac, cache.key); rtw_sec_write_cam_ent(adapter, id, cache.ctrl, cache.mac, cache.key);
@ -807,8 +807,8 @@ void write_cam_cache(_adapter *adapter, u8 id, u16 ctrl, u8 *mac, u8 *key)
_enter_critical_bh(&cam_ctl->lock, &irqL); _enter_critical_bh(&cam_ctl->lock, &irqL);
dvobj->cam_cache[id].ctrl = ctrl; dvobj->cam_cache[id].ctrl = ctrl;
_rtw_memcpy(dvobj->cam_cache[id].mac, mac, ETH_ALEN); memcpy(dvobj->cam_cache[id].mac, mac, ETH_ALEN);
_rtw_memcpy(dvobj->cam_cache[id].key, key, 16); memcpy(dvobj->cam_cache[id].key, key, 16);
_exit_critical_bh(&cam_ctl->lock, &irqL); _exit_critical_bh(&cam_ctl->lock, &irqL);
} }
@ -1331,10 +1331,10 @@ inline void rtw_sec_cam_swap(_adapter *adapter, u8 cam_id_a, u8 cam_id_b)
cam_b_used = _rtw_sec_camid_is_used(cam_ctl, cam_id_b); cam_b_used = _rtw_sec_camid_is_used(cam_ctl, cam_id_b);
if (cam_a_used) if (cam_a_used)
_rtw_memcpy(&cache_a, &dvobj->cam_cache[cam_id_a], sizeof(struct sec_cam_ent)); memcpy(&cache_a, &dvobj->cam_cache[cam_id_a], sizeof(struct sec_cam_ent));
if (cam_b_used) if (cam_b_used)
_rtw_memcpy(&cache_b, &dvobj->cam_cache[cam_id_b], sizeof(struct sec_cam_ent)); memcpy(&cache_b, &dvobj->cam_cache[cam_id_b], sizeof(struct sec_cam_ent));
_exit_critical_bh(&cam_ctl->lock, &irqL); _exit_critical_bh(&cam_ctl->lock, &irqL);
@ -1507,7 +1507,7 @@ int WMM_param_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
if (_rtw_memcmp(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element))) if (_rtw_memcmp(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element)))
return _FALSE; return _FALSE;
else else
_rtw_memcpy(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element)); memcpy(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element));
pmlmeinfo->WMM_enable = 1; pmlmeinfo->WMM_enable = 1;
return _TRUE; return _TRUE;
@ -2061,7 +2061,7 @@ void HT_info_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
return; return;
pmlmeinfo->HT_info_enable = 1; pmlmeinfo->HT_info_enable = 1;
_rtw_memcpy(&(pmlmeinfo->HT_info), pIE->data, pIE->Length); memcpy(&(pmlmeinfo->HT_info), pIE->data, pIE->Length);
#endif /* CONFIG_80211N_HT */ #endif /* CONFIG_80211N_HT */
return; return;
} }
@ -2153,7 +2153,7 @@ void ERP_IE_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
return; return;
pmlmeinfo->ERP_enable = 1; pmlmeinfo->ERP_enable = 1;
_rtw_memcpy(&(pmlmeinfo->ERP_IE), pIE->data, pIE->Length); memcpy(&(pmlmeinfo->ERP_IE), pIE->data, pIE->Length);
} }
void VCS_update(_adapter *padapter, struct sta_info *psta) void VCS_update(_adapter *padapter, struct sta_info *psta)
@ -2405,13 +2405,13 @@ void rtw_absorb_ssid_ifneed(_adapter *padapter, WLAN_BSSID_EX *bssid, u8 *pframe
next_ie = p + 2 + ssid_len_ori; next_ie = p + 2 + ssid_len_ori;
remain_len = snetwork->IELength - (next_ie - snetwork->IEs); remain_len = snetwork->IELength - (next_ie - snetwork->IEs);
scanned->network.Ssid.SsidLength = bssid->Ssid.SsidLength; scanned->network.Ssid.SsidLength = bssid->Ssid.SsidLength;
_rtw_memcpy(scanned->network.Ssid.Ssid, bssid->Ssid.Ssid, bssid->Ssid.SsidLength); memcpy(scanned->network.Ssid.Ssid, bssid->Ssid.Ssid, bssid->Ssid.SsidLength);
//update pnetwork->ssid, pnetwork->ssidlen //update pnetwork->ssid, pnetwork->ssidlen
_rtw_memcpy(backupIE, next_ie, remain_len); memcpy(backupIE, next_ie, remain_len);
*(p+1) = bssid->Ssid.SsidLength; *(p+1) = bssid->Ssid.SsidLength;
_rtw_memcpy(p+2, bssid->Ssid.Ssid, bssid->Ssid.SsidLength); memcpy(p+2, bssid->Ssid.Ssid, bssid->Ssid.SsidLength);
_rtw_memcpy(p+2+bssid->Ssid.SsidLength, backupIE, remain_len); memcpy(p+2+bssid->Ssid.SsidLength, backupIE, remain_len);
snetwork->IELength += bssid->Ssid.SsidLength; snetwork->IELength += bssid->Ssid.SsidLength;
} }
_exit_critical_bh(&padapter->mlmepriv.scanned_queue.lock, &irqL); _exit_critical_bh(&padapter->mlmepriv.scanned_queue.lock, &irqL);
@ -2522,7 +2522,7 @@ int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len,
if (elems.ssid_len > sizeof(recv_beacon->ssid)) if (elems.ssid_len > sizeof(recv_beacon->ssid))
return _FALSE; return _FALSE;
_rtw_memcpy(recv_beacon->ssid, elems.ssid, elems.ssid_len); memcpy(recv_beacon->ssid, elems.ssid, elems.ssid_len);
recv_beacon->ssid_len = elems.ssid_len; recv_beacon->ssid_len = elems.ssid_len;
} }
@ -2546,7 +2546,7 @@ int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len,
struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv;
#ifdef DBG_RX_BCN #ifdef DBG_RX_BCN
_rtw_memcpy(pmlmeext->tim, elems.tim, 4); memcpy(pmlmeext->tim, elems.tim, 4);
#endif #endif
pmlmeext->dtim = elems.tim[1]; pmlmeext->dtim = elems.tim[1];
} }
@ -2558,7 +2558,7 @@ void rtw_dump_bcn_keys(void *sel, struct beacon_keys *recv_beacon)
{ {
u8 ssid[IW_ESSID_MAX_SIZE + 1]; u8 ssid[IW_ESSID_MAX_SIZE + 1];
_rtw_memcpy(ssid, recv_beacon->ssid, recv_beacon->ssid_len); memcpy(ssid, recv_beacon->ssid, recv_beacon->ssid_len);
ssid[recv_beacon->ssid_len] = '\0'; ssid[recv_beacon->ssid_len] = '\0';
RTW_PRINT_SEL(sel, "ssid = %s (len = %u)\n", ssid, recv_beacon->ssid_len); RTW_PRINT_SEL(sel, "ssid = %s (len = %u)\n", ssid, recv_beacon->ssid_len);
@ -2609,7 +2609,7 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
RTW_DBG("%s: new beacon key\n", __func__); RTW_DBG("%s: new beacon key\n", __func__);
RTW_DBG_EXPR(rtw_dump_bcn_keys(RTW_DBGDUMP, &recv_beacon)); RTW_DBG_EXPR(rtw_dump_bcn_keys(RTW_DBGDUMP, &recv_beacon));
_rtw_memcpy(&pmlmepriv->new_beacon_keys, &recv_beacon, sizeof(recv_beacon)); memcpy(&pmlmepriv->new_beacon_keys, &recv_beacon, sizeof(recv_beacon));
pmlmepriv->new_beacon_cnts = 1; pmlmepriv->new_beacon_cnts = 1;
} else { } else {
RTW_DBG("%s: new beacon again (seq=%d)\n", __func__, GetSequence(pframe)); RTW_DBG("%s: new beacon again (seq=%d)\n", __func__, GetSequence(pframe));
@ -2634,7 +2634,7 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
, recv_beacon.ch, recv_beacon.bw, recv_beacon.offset)) , recv_beacon.ch, recv_beacon.bw, recv_beacon.offset))
goto exit; goto exit;
_rtw_memcpy(&tmp_beacon, cur_beacon, sizeof(tmp_beacon)); memcpy(&tmp_beacon, cur_beacon, sizeof(tmp_beacon));
/* check fields excluding below */ /* check fields excluding below */
tmp_beacon.ch = recv_beacon.ch; tmp_beacon.ch = recv_beacon.ch;
@ -2644,12 +2644,12 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
tmp_beacon.proto_cap = recv_beacon.proto_cap; tmp_beacon.proto_cap = recv_beacon.proto_cap;
if (!BCNKEY_VERIFY_WHOLE_RATE_SET) { if (!BCNKEY_VERIFY_WHOLE_RATE_SET) {
tmp_beacon.rate_num = recv_beacon.rate_num; tmp_beacon.rate_num = recv_beacon.rate_num;
_rtw_memcpy(tmp_beacon.rate_set, recv_beacon.rate_set, 12); memcpy(tmp_beacon.rate_set, recv_beacon.rate_set, 12);
} }
if (_rtw_memcmp(&tmp_beacon, &recv_beacon, sizeof(recv_beacon)) == _FALSE) if (_rtw_memcmp(&tmp_beacon, &recv_beacon, sizeof(recv_beacon)) == _FALSE)
goto exit; goto exit;
_rtw_memcpy(cur_beacon, &recv_beacon, sizeof(recv_beacon)); memcpy(cur_beacon, &recv_beacon, sizeof(recv_beacon));
#ifdef CONFIG_BCN_CNT_CONFIRM_HDL #ifdef CONFIG_BCN_CNT_CONFIRM_HDL
pmlmepriv->new_beacon_cnts = 0; pmlmepriv->new_beacon_cnts = 0;
#endif #endif
@ -3075,11 +3075,11 @@ void update_tx_basic_rate(_adapter *padapter, u8 wirelessmode)
wirelessmode &= ~(WIRELESS_11B); wirelessmode &= ~(WIRELESS_11B);
if ((wirelessmode & WIRELESS_11B) && (wirelessmode == WIRELESS_11B)) if ((wirelessmode & WIRELESS_11B) && (wirelessmode == WIRELESS_11B))
_rtw_memcpy(supported_rates, rtw_basic_rate_cck, 4); memcpy(supported_rates, rtw_basic_rate_cck, 4);
else if (wirelessmode & WIRELESS_11B) else if (wirelessmode & WIRELESS_11B)
_rtw_memcpy(supported_rates, rtw_basic_rate_mix, 7); memcpy(supported_rates, rtw_basic_rate_mix, 7);
else else
_rtw_memcpy(supported_rates, rtw_basic_rate_ofdm, 3); memcpy(supported_rates, rtw_basic_rate_ofdm, 3);
if (wirelessmode & WIRELESS_11B) if (wirelessmode & WIRELESS_11B)
update_mgnt_tx_rate(padapter, IEEE80211_CCK_RATE_1MB); update_mgnt_tx_rate(padapter, IEEE80211_CCK_RATE_1MB);
@ -3429,10 +3429,10 @@ void update_sta_basic_rate(struct sta_info *psta, u8 wireless_mode)
{ {
if (IsSupportedTxCCK(wireless_mode)) { if (IsSupportedTxCCK(wireless_mode)) {
/* Only B, B/G, and B/G/N AP could use CCK rate */ /* Only B, B/G, and B/G/N AP could use CCK rate */
_rtw_memcpy(psta->bssrateset, rtw_basic_rate_cck, 4); memcpy(psta->bssrateset, rtw_basic_rate_cck, 4);
psta->bssratelen = 4; psta->bssratelen = 4;
} else { } else {
_rtw_memcpy(psta->bssrateset, rtw_basic_rate_ofdm, 3); memcpy(psta->bssrateset, rtw_basic_rate_ofdm, 3);
psta->bssratelen = 3; psta->bssratelen = 3;
} }
} }
@ -4196,9 +4196,9 @@ unsigned int setup_beacon_frame(_adapter *padapter, unsigned char *beacon_frame)
fctrl = &(pwlanhdr->frame_ctl); fctrl = &(pwlanhdr->frame_ctl);
*(fctrl) = 0; *(fctrl) = 0;
_rtw_memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN); memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN);
set_frame_sub_type(pframe, WIFI_BEACON); set_frame_sub_type(pframe, WIFI_BEACON);
@ -4210,13 +4210,13 @@ unsigned int setup_beacon_frame(_adapter *padapter, unsigned char *beacon_frame)
len += 8; len += 8;
/* beacon interval: 2 bytes */ /* beacon interval: 2 bytes */
_rtw_memcpy(pframe, (unsigned char *)(rtw_get_beacon_interval_from_ie(cur_network->IEs)), 2); memcpy(pframe, (unsigned char *)(rtw_get_beacon_interval_from_ie(cur_network->IEs)), 2);
pframe += 2; pframe += 2;
len += 2; len += 2;
/* capability info: 2 bytes */ /* capability info: 2 bytes */
_rtw_memcpy(pframe, (unsigned char *)(rtw_get_capability_from_ie(cur_network->IEs)), 2); memcpy(pframe, (unsigned char *)(rtw_get_capability_from_ie(cur_network->IEs)), 2);
pframe += 2; pframe += 2;
len += 2; len += 2;
@ -4448,11 +4448,11 @@ u8 rtw_set_default_pattern(_adapter *adapter)
switch (index) { switch (index) {
case 0: case 0:
target = pwrpriv->patterns[index].content; target = pwrpriv->patterns[index].content;
_rtw_memcpy(target, adapter_mac_addr(adapter), memcpy(target, adapter_mac_addr(adapter),
ETH_ALEN); ETH_ALEN);
target += ETH_TYPE_OFFSET; target += ETH_TYPE_OFFSET;
_rtw_memcpy(target, &ip_protocol, memcpy(target, &ip_protocol,
sizeof(ip_protocol)); sizeof(ip_protocol));
/* TCP */ /* TCP */
@ -4461,10 +4461,10 @@ u8 rtw_set_default_pattern(_adapter *adapter)
target += (IP_OFFSET - PROTOCOL_OFFSET); target += (IP_OFFSET - PROTOCOL_OFFSET);
_rtw_memcpy(target, pmlmeinfo->ip_addr, memcpy(target, pmlmeinfo->ip_addr,
RTW_IP_ADDR_LEN); RTW_IP_ADDR_LEN);
_rtw_memcpy(pwrpriv->patterns[index].mask, memcpy(pwrpriv->patterns[index].mask,
&unicast_mask, sizeof(unicast_mask)); &unicast_mask, sizeof(unicast_mask));
pwrpriv->patterns[index].len = pwrpriv->patterns[index].len =
@ -4472,21 +4472,21 @@ u8 rtw_set_default_pattern(_adapter *adapter)
break; break;
case 1: case 1:
target = pwrpriv->patterns[index].content; target = pwrpriv->patterns[index].content;
_rtw_memcpy(target, adapter_mac_addr(adapter), memcpy(target, adapter_mac_addr(adapter),
ETH_ALEN); ETH_ALEN);
target += ETH_TYPE_OFFSET; target += ETH_TYPE_OFFSET;
_rtw_memcpy(target, &ip_protocol, sizeof(ip_protocol)); memcpy(target, &ip_protocol, sizeof(ip_protocol));
/* ICMP */ /* ICMP */
target += (PROTOCOL_OFFSET - ETH_TYPE_OFFSET); target += (PROTOCOL_OFFSET - ETH_TYPE_OFFSET);
memset(target, 0x01, 1); memset(target, 0x01, 1);
target += (IP_OFFSET - PROTOCOL_OFFSET); target += (IP_OFFSET - PROTOCOL_OFFSET);
_rtw_memcpy(target, pmlmeinfo->ip_addr, memcpy(target, pmlmeinfo->ip_addr,
RTW_IP_ADDR_LEN); RTW_IP_ADDR_LEN);
_rtw_memcpy(pwrpriv->patterns[index].mask, memcpy(pwrpriv->patterns[index].mask,
&unicast_mask, sizeof(unicast_mask)); &unicast_mask, sizeof(unicast_mask));
pwrpriv->patterns[index].len = pwrpriv->patterns[index].len =
@ -4498,7 +4498,7 @@ u8 rtw_set_default_pattern(_adapter *adapter)
target = pwrpriv->patterns[index].content; target = pwrpriv->patterns[index].content;
target += ETH_TYPE_OFFSET; target += ETH_TYPE_OFFSET;
_rtw_memcpy(target, &ipv6_protocol, memcpy(target, &ipv6_protocol,
sizeof(ipv6_protocol)); sizeof(ipv6_protocol));
/* ICMPv6 */ /* ICMPv6 */
@ -4507,10 +4507,10 @@ u8 rtw_set_default_pattern(_adapter *adapter)
memset(target, 0x3a, 1); memset(target, 0x3a, 1);
target += (IPv6_OFFSET - IPv6_PROTOCOL_OFFSET); target += (IPv6_OFFSET - IPv6_PROTOCOL_OFFSET);
_rtw_memcpy(target, pmlmeinfo->ip6_addr, memcpy(target, pmlmeinfo->ip6_addr,
RTW_IPv6_ADDR_LEN); RTW_IPv6_ADDR_LEN);
_rtw_memcpy(pwrpriv->patterns[index].mask, memcpy(pwrpriv->patterns[index].mask,
&icmpv6_mask, sizeof(icmpv6_mask)); &icmpv6_mask, sizeof(icmpv6_mask));
pwrpriv->patterns[index].len = pwrpriv->patterns[index].len =
IPv6_OFFSET + RTW_IPv6_ADDR_LEN; IPv6_OFFSET + RTW_IPv6_ADDR_LEN;
@ -4519,21 +4519,21 @@ u8 rtw_set_default_pattern(_adapter *adapter)
#endif /*CONFIG_IPV6*/ #endif /*CONFIG_IPV6*/
case 3: case 3:
target = pwrpriv->patterns[index].content; target = pwrpriv->patterns[index].content;
_rtw_memcpy(target, &multicast_addr, memcpy(target, &multicast_addr,
sizeof(multicast_addr)); sizeof(multicast_addr));
target += ETH_TYPE_OFFSET; target += ETH_TYPE_OFFSET;
_rtw_memcpy(target, &ip_protocol, sizeof(ip_protocol)); memcpy(target, &ip_protocol, sizeof(ip_protocol));
/* UDP */ /* UDP */
target += (PROTOCOL_OFFSET - ETH_TYPE_OFFSET); target += (PROTOCOL_OFFSET - ETH_TYPE_OFFSET);
memset(target, 0x11, 1); memset(target, 0x11, 1);
target += (IP_OFFSET - PROTOCOL_OFFSET); target += (IP_OFFSET - PROTOCOL_OFFSET);
_rtw_memcpy(target, &multicast_ip, memcpy(target, &multicast_ip,
sizeof(multicast_ip)); sizeof(multicast_ip));
_rtw_memcpy(pwrpriv->patterns[index].mask, memcpy(pwrpriv->patterns[index].mask,
&multicast_mask, sizeof(multicast_mask)); &multicast_mask, sizeof(multicast_mask));
pwrpriv->patterns[index].len = pwrpriv->patterns[index].len =
@ -4810,7 +4810,7 @@ int rtw_dev_ssid_list_set(struct pno_ssid_list *pno_ssid_list,
num = MAX_PNO_LIST_COUNT; num = MAX_PNO_LIST_COUNT;
for (i = 0 ; i < num ; i++) { for (i = 0 ; i < num ; i++) {
_rtw_memcpy(&pno_ssid_list->node[i].SSID, memcpy(&pno_ssid_list->node[i].SSID,
ssid[i].SSID, ssid[i].SSID_len); ssid[i].SSID, ssid[i].SSID_len);
pno_ssid_list->node[i].SSID_len = ssid[i].SSID_len; pno_ssid_list->node[i].SSID_len = ssid[i].SSID_len;
} }

View File

@ -1048,7 +1048,7 @@ static s32 update_attrib_sec_info(_adapter *padapter, struct pkt_attrib *pattrib
TKIP_IV(pattrib->iv, psta->dot11txpn, 0); TKIP_IV(pattrib->iv, psta->dot11txpn, 0);
_rtw_memcpy(pattrib->dot11tkiptxmickey.skey, psta->dot11tkiptxmickey.skey, 16); memcpy(pattrib->dot11tkiptxmickey.skey, psta->dot11tkiptxmickey.skey, 16);
break; break;
@ -1078,7 +1078,7 @@ static s32 update_attrib_sec_info(_adapter *padapter, struct pkt_attrib *pattrib
} }
if (pattrib->encrypt > 0) if (pattrib->encrypt > 0)
_rtw_memcpy(pattrib->dot118021x_UncstKey.skey, psta->dot118021x_UncstKey.skey, 16); memcpy(pattrib->dot118021x_UncstKey.skey, psta->dot118021x_UncstKey.skey, 16);
if (pattrib->encrypt && if (pattrib->encrypt &&
@ -1329,26 +1329,26 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
if (MLME_IS_MESH(padapter)) /* address resolve is done for mesh */ if (MLME_IS_MESH(padapter)) /* address resolve is done for mesh */
goto get_sta_info; goto get_sta_info;
_rtw_memcpy(pattrib->dst, &etherhdr.h_dest, ETH_ALEN); memcpy(pattrib->dst, &etherhdr.h_dest, ETH_ALEN);
_rtw_memcpy(pattrib->src, &etherhdr.h_source, ETH_ALEN); memcpy(pattrib->src, &etherhdr.h_source, ETH_ALEN);
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) || if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) ||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) { (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) {
_rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
_rtw_memcpy(pattrib->ta, adapter_mac_addr(padapter), ETH_ALEN); memcpy(pattrib->ta, adapter_mac_addr(padapter), ETH_ALEN);
DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_adhoc); DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_adhoc);
} else if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) { } else if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
#ifdef CONFIG_TDLS #ifdef CONFIG_TDLS
if (rtw_check_tdls_established(padapter, pattrib) == _TRUE) if (rtw_check_tdls_established(padapter, pattrib) == _TRUE)
_rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); /* For TDLS direct link Tx, set ra to be same to dst */ memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); /* For TDLS direct link Tx, set ra to be same to dst */
else else
#endif #endif
_rtw_memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN); memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN);
_rtw_memcpy(pattrib->ta, adapter_mac_addr(padapter), ETH_ALEN); memcpy(pattrib->ta, adapter_mac_addr(padapter), ETH_ALEN);
DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_sta); DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_sta);
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
_rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
_rtw_memcpy(pattrib->ta, get_bssid(pmlmepriv), ETH_ALEN); memcpy(pattrib->ta, get_bssid(pmlmepriv), ETH_ALEN);
DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_ap); DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_ap);
} else } else
DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_unknown); DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_unknown);
@ -1677,7 +1677,7 @@ static s32 xmitframe_addmic(_adapter *padapter, struct xmit_frame *pxmitframe)
rtw_secgetmic(&micdata, &(mic[0])); rtw_secgetmic(&micdata, &(mic[0]));
/* add mic code and add the mic code length in last_txcmdsz */ /* add mic code and add the mic code length in last_txcmdsz */
_rtw_memcpy(payload, &(mic[0]), 8); memcpy(payload, &(mic[0]), 8);
pattrib->last_txcmdsz += 8; pattrib->last_txcmdsz += 8;
payload = payload - pattrib->last_txcmdsz + 8; payload = payload - pattrib->last_txcmdsz + 8;
@ -1775,9 +1775,9 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib)
#ifdef CONFIG_TDLS #ifdef CONFIG_TDLS
if (pattrib->direct_link == _TRUE) { if (pattrib->direct_link == _TRUE) {
/* TDLS data transfer, ToDS=0, FrDs=0 */ /* TDLS data transfer, ToDS=0, FrDs=0 */
_rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN); memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN);
if (pattrib->qos_en) if (pattrib->qos_en)
qos_option = _TRUE; qos_option = _TRUE;
@ -1788,9 +1788,9 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib)
/* 1.Data transfer to AP */ /* 1.Data transfer to AP */
/* 2.Arp pkt will relayed by AP */ /* 2.Arp pkt will relayed by AP */
SetToDs(fctrl); SetToDs(fctrl);
_rtw_memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN); memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, pattrib->ta, ETH_ALEN); memcpy(pwlanhdr->addr2, pattrib->ta, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN); memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN);
if (pqospriv->qos_option) if (pqospriv->qos_option)
qos_option = _TRUE; qos_option = _TRUE;
@ -1798,17 +1798,17 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib)
} else if ((check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)) { } else if ((check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)) {
/* to_ds = 0, fr_ds = 1; */ /* to_ds = 0, fr_ds = 1; */
SetFrDs(fctrl); SetFrDs(fctrl);
_rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, get_bssid(pmlmepriv), ETH_ALEN); memcpy(pwlanhdr->addr2, get_bssid(pmlmepriv), ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, pattrib->src, ETH_ALEN); memcpy(pwlanhdr->addr3, pattrib->src, ETH_ALEN);
if (pattrib->qos_en) if (pattrib->qos_en)
qos_option = _TRUE; qos_option = _TRUE;
} else if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) || } else if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) ||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) { (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) {
_rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, pattrib->ta, ETH_ALEN); memcpy(pwlanhdr->addr2, pattrib->ta, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN); memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN);
if (pattrib->qos_en) if (pattrib->qos_en)
qos_option = _TRUE; qos_option = _TRUE;
@ -2095,30 +2095,30 @@ s32 rtw_make_tdls_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattr
case TUNNELED_PROBE_RSP: case TUNNELED_PROBE_RSP:
case TDLS_DISCOVERY_REQUEST: case TDLS_DISCOVERY_REQUEST:
SetToDs(fctrl); SetToDs(fctrl);
_rtw_memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN); memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN); memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN);
break; break;
case TDLS_CHANNEL_SWITCH_REQUEST: case TDLS_CHANNEL_SWITCH_REQUEST:
case TDLS_CHANNEL_SWITCH_RESPONSE: case TDLS_CHANNEL_SWITCH_RESPONSE:
case TDLS_PEER_PSM_RESPONSE: case TDLS_PEER_PSM_RESPONSE:
case TDLS_PEER_TRAFFIC_RESPONSE: case TDLS_PEER_TRAFFIC_RESPONSE:
_rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN); memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN);
tdls_seq = 1; tdls_seq = 1;
break; break;
case TDLS_TEARDOWN: case TDLS_TEARDOWN:
if (ptxmgmt->status_code == _RSON_TDLS_TEAR_UN_RSN_) { if (ptxmgmt->status_code == _RSON_TDLS_TEAR_UN_RSN_) {
_rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN); memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN);
tdls_seq = 1; tdls_seq = 1;
} else { } else {
SetToDs(fctrl); SetToDs(fctrl);
_rtw_memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN); memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN); memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN);
} }
break; break;
} }
@ -2241,7 +2241,7 @@ s32 rtw_xmit_tdls_coalesce(_adapter *padapter, struct xmit_frame *pxmitframe, st
} }
} }
_rtw_memcpy(pframe, pattrib->iv, pattrib->iv_len); memcpy(pframe, pattrib->iv, pattrib->iv_len);
pframe += pattrib->iv_len; pframe += pattrib->iv_len;
} }
@ -2256,7 +2256,7 @@ s32 rtw_xmit_tdls_coalesce(_adapter *padapter, struct xmit_frame *pxmitframe, st
if ((pattrib->icv_len > 0) && (pattrib->bswenc)) { if ((pattrib->icv_len > 0) && (pattrib->bswenc)) {
pframe += pattrib->pktlen; pframe += pattrib->pktlen;
_rtw_memcpy(pframe, pattrib->icv, pattrib->icv_len); memcpy(pframe, pattrib->icv, pattrib->icv_len);
pframe += pattrib->icv_len; pframe += pattrib->icv_len;
} }
@ -2420,7 +2420,7 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra
/* adding icv, if necessary... */ /* adding icv, if necessary... */
if (pattrib->iv_len) { if (pattrib->iv_len) {
_rtw_memcpy(pframe, pattrib->iv, pattrib->iv_len); // queue or new? memcpy(pframe, pattrib->iv, pattrib->iv_len); // queue or new?
RTW_DBG("rtw_xmitframe_coalesce: keyid=%d pattrib->iv[3]=%.2x pframe=%.2x %.2x %.2x %.2x\n", RTW_DBG("rtw_xmitframe_coalesce: keyid=%d pattrib->iv[3]=%.2x pframe=%.2x %.2x %.2x %.2x\n",
padapter->securitypriv.dot11PrivacyKeyIndex, pattrib->iv[3], *pframe, *(pframe + 1), *(pframe + 2), *(pframe + 3)); padapter->securitypriv.dot11PrivacyKeyIndex, pattrib->iv[3], *pframe, *(pframe + 1), *(pframe + 2), *(pframe + 3));
@ -2441,9 +2441,9 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra
#ifdef CONFIG_RTW_MESH #ifdef CONFIG_RTW_MESH
if (MLME_IS_MESH(padapter)) { if (MLME_IS_MESH(padapter)) {
/* mDA(6), mSA(6), len(2), mctrl */ /* mDA(6), mSA(6), len(2), mctrl */
_rtw_memcpy(pframe, pattrib_queue->mda, ETH_ALEN); memcpy(pframe, pattrib_queue->mda, ETH_ALEN);
pframe += ETH_ALEN; pframe += ETH_ALEN;
_rtw_memcpy(pframe, pattrib_queue->msa, ETH_ALEN); memcpy(pframe, pattrib_queue->msa, ETH_ALEN);
pframe += ETH_ALEN; pframe += ETH_ALEN;
len = (u16*)pframe; len = (u16*)pframe;
pframe += 2; pframe += 2;
@ -2453,9 +2453,9 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra
#endif #endif
{ {
/* 802.3 MAC Header DA(6) SA(6) Len(2)*/ /* 802.3 MAC Header DA(6) SA(6) Len(2)*/
_rtw_memcpy(pframe, pattrib_queue->dst, ETH_ALEN); memcpy(pframe, pattrib_queue->dst, ETH_ALEN);
pframe += ETH_ALEN; pframe += ETH_ALEN;
_rtw_memcpy(pframe, pattrib_queue->src, ETH_ALEN); memcpy(pframe, pattrib_queue->src, ETH_ALEN);
pframe += ETH_ALEN; pframe += ETH_ALEN;
len = (u16*)pframe; len = (u16*)pframe;
pframe += 2; pframe += 2;
@ -2489,9 +2489,9 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra
#ifdef CONFIG_RTW_MESH #ifdef CONFIG_RTW_MESH
if (MLME_IS_MESH(padapter)) { if (MLME_IS_MESH(padapter)) {
/* mDA(6), mSA(6), len(2), mctrl */ /* mDA(6), mSA(6), len(2), mctrl */
_rtw_memcpy(pframe, pattrib->mda, ETH_ALEN); memcpy(pframe, pattrib->mda, ETH_ALEN);
pframe += ETH_ALEN; pframe += ETH_ALEN;
_rtw_memcpy(pframe, pattrib->msa, ETH_ALEN); memcpy(pframe, pattrib->msa, ETH_ALEN);
pframe += ETH_ALEN; pframe += ETH_ALEN;
len = (u16*)pframe; len = (u16*)pframe;
pframe += 2; pframe += 2;
@ -2501,9 +2501,9 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra
#endif #endif
{ {
/* 802.3 MAC Header DA(6) SA(6) Len(2) */ /* 802.3 MAC Header DA(6) SA(6) Len(2) */
_rtw_memcpy(pframe, pattrib->dst, ETH_ALEN); memcpy(pframe, pattrib->dst, ETH_ALEN);
pframe += ETH_ALEN; pframe += ETH_ALEN;
_rtw_memcpy(pframe, pattrib->src, ETH_ALEN); memcpy(pframe, pattrib->src, ETH_ALEN);
pframe += ETH_ALEN; pframe += ETH_ALEN;
len = (u16*)pframe; len = (u16*)pframe;
pframe += 2; pframe += 2;
@ -2527,7 +2527,7 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra
((pattrib->bswenc) ? pattrib->icv_len : 0) ; ((pattrib->bswenc) ? pattrib->icv_len : 0) ;
if ((pattrib->icv_len > 0) && (pattrib->bswenc)) { if ((pattrib->icv_len > 0) && (pattrib->bswenc)) {
_rtw_memcpy(pframe, pattrib->icv, pattrib->icv_len); memcpy(pframe, pattrib->icv, pattrib->icv_len);
pframe += pattrib->icv_len; pframe += pattrib->icv_len;
} }
@ -2683,7 +2683,7 @@ s32 rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxm
} }
} }
#endif #endif
_rtw_memcpy(pframe, pattrib->iv, pattrib->iv_len); memcpy(pframe, pattrib->iv, pattrib->iv_len);
pframe += pattrib->iv_len; pframe += pattrib->iv_len;
@ -2718,7 +2718,7 @@ s32 rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxm
pframe += mem_sz; pframe += mem_sz;
if ((pattrib->icv_len > 0) && (pattrib->bswenc)) { if ((pattrib->icv_len > 0) && (pattrib->bswenc)) {
_rtw_memcpy(pframe, pattrib->icv, pattrib->icv_len); memcpy(pframe, pattrib->icv, pattrib->icv_len);
pframe += pattrib->icv_len; pframe += pattrib->icv_len;
} }
@ -2739,7 +2739,7 @@ s32 rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxm
addr = (SIZE_PTR)(pframe); addr = (SIZE_PTR)(pframe);
mem_start = (unsigned char *)RND4(addr) + hw_hdr_offset; mem_start = (unsigned char *)RND4(addr) + hw_hdr_offset;
_rtw_memcpy(mem_start, pbuf_start + hw_hdr_offset, pattrib->hdrlen); memcpy(mem_start, pbuf_start + hw_hdr_offset, pattrib->hdrlen);
} }
@ -2907,14 +2907,14 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
frame_body_len = pattrib->pktlen - sizeof(struct rtw_ieee80211_hdr_3addr); frame_body_len = pattrib->pktlen - sizeof(struct rtw_ieee80211_hdr_3addr);
/* conscruct AAD, copy frame control field */ /* conscruct AAD, copy frame control field */
_rtw_memcpy(BIP_AAD, &pwlanhdr->frame_ctl, 2); memcpy(BIP_AAD, &pwlanhdr->frame_ctl, 2);
ClearRetry(BIP_AAD); ClearRetry(BIP_AAD);
ClearPwrMgt(BIP_AAD); ClearPwrMgt(BIP_AAD);
ClearMData(BIP_AAD); ClearMData(BIP_AAD);
/* conscruct AAD, copy address 1 to address 3 */ /* conscruct AAD, copy address 1 to address 3 */
_rtw_memcpy(BIP_AAD + 2, pwlanhdr->addr1, 18); memcpy(BIP_AAD + 2, pwlanhdr->addr1, 18);
/* copy management fram body */ /* copy management fram body */
_rtw_memcpy(BIP_AAD + BIP_AAD_SIZE, MGMT_body, frame_body_len); memcpy(BIP_AAD + BIP_AAD_SIZE, MGMT_body, frame_body_len);
#if DBG_MGMT_XMIT_BIP_DUMP #if DBG_MGMT_XMIT_BIP_DUMP
/* dump total packet include MME with zero MIC */ /* dump total packet include MME with zero MIC */
@ -2944,7 +2944,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
#endif #endif
/* copy right BIP mic value, total is 128bits, we use the 0~63 bits */ /* copy right BIP mic value, total is 128bits, we use the 0~63 bits */
_rtw_memcpy(pframe - 8, mic, 8); memcpy(pframe - 8, mic, 8);
#if DBG_MGMT_XMIT_BIP_DUMP #if DBG_MGMT_XMIT_BIP_DUMP
/*dump all packet after mic ok */ /*dump all packet after mic ok */
@ -2977,7 +2977,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
} }
#endif #endif
_rtw_memcpy(pattrib->dot118021x_UncstKey.skey, psta->dot118021x_UncstKey.skey, 16); memcpy(pattrib->dot118021x_UncstKey.skey, psta->dot118021x_UncstKey.skey, 16);
/* To use wrong key */ /* To use wrong key */
if (pattrib->key_type == IEEE80211W_WRONG_KEY) { if (pattrib->key_type == IEEE80211W_WRONG_KEY) {
@ -3001,7 +3001,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
#endif #endif
/* bakeup original management packet */ /* bakeup original management packet */
_rtw_memcpy(tmp_buf, pframe, pattrib->pktlen); memcpy(tmp_buf, pframe, pattrib->pktlen);
/* move to data portion */ /* move to data portion */
pframe += pattrib->hdrlen; pframe += pattrib->hdrlen;
@ -3025,10 +3025,10 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
} }
/* insert iv header into management frame */ /* insert iv header into management frame */
_rtw_memcpy(pframe, pattrib->iv, pattrib->iv_len); memcpy(pframe, pattrib->iv, pattrib->iv_len);
pframe += pattrib->iv_len; pframe += pattrib->iv_len;
/* copy mgmt data portion after CCMP header */ /* copy mgmt data portion after CCMP header */
_rtw_memcpy(pframe, tmp_buf + pattrib->hdrlen, pattrib->pktlen - pattrib->hdrlen); memcpy(pframe, tmp_buf + pattrib->hdrlen, pattrib->pktlen - pattrib->hdrlen);
/* move pframe to end of mgmt pkt */ /* move pframe to end of mgmt pkt */
pframe += pattrib->pktlen - pattrib->hdrlen; pframe += pattrib->pktlen - pattrib->hdrlen;
/* add 8 bytes CCMP IV header to length */ /* add 8 bytes CCMP IV header to length */
@ -3046,7 +3046,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
#endif #endif
if ((pattrib->icv_len > 0) && (pattrib->bswenc)) { if ((pattrib->icv_len > 0) && (pattrib->bswenc)) {
_rtw_memcpy(pframe, pattrib->icv, pattrib->icv_len); memcpy(pframe, pattrib->icv, pattrib->icv_len);
pframe += pattrib->icv_len; pframe += pattrib->icv_len;
} }
/* add 8 bytes MIC */ /* add 8 bytes MIC */
@ -4424,7 +4424,7 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev)
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
// _rtw_memcpy(pframe, (void *)checking, len); // memcpy(pframe, (void *)checking, len);
_rtw_pktfile_read(&pktfile, pframe, len); _rtw_pktfile_read(&pktfile, pframe, len);
@ -5730,8 +5730,8 @@ void rtw_tx_desc_backup(_adapter *padapter, struct xmit_frame *pxmitframe, u8 de
pxmit_buf = pxmitframe->pxmitbuf->pbuf; pxmit_buf = pxmitframe->pxmitbuf->pbuf;
_rtw_memcpy(tx_backup[hwq][backup_idx[hwq]].tx_bak_desc, pxmit_buf, desc_size); memcpy(tx_backup[hwq][backup_idx[hwq]].tx_bak_desc, pxmit_buf, desc_size);
_rtw_memcpy(tx_backup[hwq][backup_idx[hwq]].tx_bak_data_hdr, pxmit_buf+desc_size, TX_BAK_DATA_LEN); memcpy(tx_backup[hwq][backup_idx[hwq]].tx_bak_data_hdr, pxmit_buf+desc_size, TX_BAK_DATA_LEN);
tmp32 = rtw_read32(padapter, get_txbd_rw_reg(hwq)); tmp32 = rtw_read32(padapter, get_txbd_rw_reg(hwq));

View File

@ -245,7 +245,7 @@ void DBG_BT_INFO(u8 *dbgmsg)
return; return;
pbuf = pinfo->info + pinfo->len; pbuf = pinfo->info + pinfo->len;
_rtw_memcpy(pbuf, dbgmsg, msglen); memcpy(pbuf, dbgmsg, msglen);
pinfo->len += msglen; pinfo->len += msglen;
} }
@ -747,7 +747,7 @@ static u8 _btmpoper_cmd(PBTC_COEXIST pBtCoexist, u8 opcode, u8 opcodever, u8 *cm
buf[0] = (opcodever & 0xF) | (seq << 4); buf[0] = (opcodever & 0xF) | (seq << 4);
buf[1] = opcode; buf[1] = opcode;
if (cmd && size) if (cmd && size)
_rtw_memcpy(buf + 2, cmd, size); memcpy(buf + 2, cmd, size);
GLBtcBtMpRptWait = _TRUE; GLBtcBtMpRptWait = _TRUE;
GLBtcBtMpRptWiFiOK = _FALSE; GLBtcBtMpRptWiFiOK = _FALSE;
@ -1486,7 +1486,7 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf)
u8 dataLen = *pU1Tmp; u8 dataLen = *pU1Tmp;
u8 tmpBuf[BTC_TMP_BUF_SHORT]; u8 tmpBuf[BTC_TMP_BUF_SHORT];
if (dataLen) if (dataLen)
_rtw_memcpy(tmpBuf, pU1Tmp + 1, dataLen); memcpy(tmpBuf, pU1Tmp + 1, dataLen);
BT_SendEventExtBtInfoControl(padapter, dataLen, &tmpBuf[0]); BT_SendEventExtBtInfoControl(padapter, dataLen, &tmpBuf[0]);
} }
#else /* !CONFIG_BT_COEXIST_SOCKET_TRX */ #else /* !CONFIG_BT_COEXIST_SOCKET_TRX */
@ -1500,7 +1500,7 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf)
u8 dataLen = *pU1Tmp; u8 dataLen = *pU1Tmp;
u8 tmpBuf[BTC_TMP_BUF_SHORT]; u8 tmpBuf[BTC_TMP_BUF_SHORT];
if (dataLen) if (dataLen)
_rtw_memcpy(tmpBuf, pU1Tmp + 1, dataLen); memcpy(tmpBuf, pU1Tmp + 1, dataLen);
BT_SendEventExtBtCoexControl(padapter, _FALSE, dataLen, &tmpBuf[0]); BT_SendEventExtBtCoexControl(padapter, _FALSE, dataLen, &tmpBuf[0]);
} }
#else /* !CONFIG_BT_COEXIST_SOCKET_TRX */ #else /* !CONFIG_BT_COEXIST_SOCKET_TRX */
@ -5058,7 +5058,7 @@ void hal_btcoex_BtMpRptNotify(PADAPTER padapter, u8 length, u8 *tmpBuf)
GLBtcBtMpRptSeq = seq; GLBtcBtMpRptSeq = seq;
GLBtcBtMpRptStatus = status; GLBtcBtMpRptStatus = status;
_rtw_memcpy(GLBtcBtMpRptRsp, tmpBuf + 3, len); memcpy(GLBtcBtMpRptRsp, tmpBuf + 3, len);
GLBtcBtMpRptRspSize = len; GLBtcBtMpRptRspSize = len;
break; break;
@ -5220,7 +5220,7 @@ u32 hal_btcoex_GetRaMask(PADAPTER padapter)
void hal_btcoex_RecordPwrMode(PADAPTER padapter, u8 *pCmdBuf, u8 cmdLen) void hal_btcoex_RecordPwrMode(PADAPTER padapter, u8 *pCmdBuf, u8 cmdLen)
{ {
_rtw_memcpy(GLBtCoexist.pwrModeVal, pCmdBuf, cmdLen); memcpy(GLBtCoexist.pwrModeVal, pCmdBuf, cmdLen);
} }
void hal_btcoex_DisplayBtCoexInfo(PADAPTER padapter, u8 *pbuf, u32 bufsize) void hal_btcoex_DisplayBtCoexInfo(PADAPTER padapter, u8 *pbuf, u32 bufsize)

File diff suppressed because it is too large Load Diff

View File

@ -4094,7 +4094,7 @@ phy_ConfigMACWithParaFile(
rtStatus = _SUCCESS; rtStatus = _SUCCESS;
pHalData->mac_reg = vzalloc(rlen); pHalData->mac_reg = vzalloc(rlen);
if (pHalData->mac_reg) { if (pHalData->mac_reg) {
_rtw_memcpy(pHalData->mac_reg, pHalData->para_file_buf, rlen); memcpy(pHalData->mac_reg, pHalData->para_file_buf, rlen);
pHalData->mac_reg_len = rlen; pHalData->mac_reg_len = rlen;
} else } else
RTW_INFO("%s mac_reg alloc fail !\n", __FUNCTION__); RTW_INFO("%s mac_reg alloc fail !\n", __FUNCTION__);
@ -4102,7 +4102,7 @@ phy_ConfigMACWithParaFile(
} }
} else { } else {
if ((pHalData->mac_reg_len != 0) && (pHalData->mac_reg != NULL)) { if ((pHalData->mac_reg_len != 0) && (pHalData->mac_reg != NULL)) {
_rtw_memcpy(pHalData->para_file_buf, pHalData->mac_reg, pHalData->mac_reg_len); memcpy(pHalData->para_file_buf, pHalData->mac_reg, pHalData->mac_reg_len);
rtStatus = _SUCCESS; rtStatus = _SUCCESS;
} else } else
RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__); RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__);
@ -4173,7 +4173,7 @@ phy_ConfigBBWithParaFile(
rtStatus = _SUCCESS; rtStatus = _SUCCESS;
pBuf = vzalloc(rlen); pBuf = vzalloc(rlen);
if (pBuf) { if (pBuf) {
_rtw_memcpy(pBuf, pHalData->para_file_buf, rlen); memcpy(pBuf, pHalData->para_file_buf, rlen);
*pBufLen = rlen; *pBufLen = rlen;
switch (ConfigType) { switch (ConfigType) {
@ -4190,7 +4190,7 @@ phy_ConfigBBWithParaFile(
} }
} else { } else {
if ((pBufLen != NULL) && (*pBufLen != 0) && (pBuf != NULL)) { if ((pBufLen != NULL) && (*pBufLen != 0) && (pBuf != NULL)) {
_rtw_memcpy(pHalData->para_file_buf, pBuf, *pBufLen); memcpy(pHalData->para_file_buf, pBuf, *pBufLen);
rtStatus = _SUCCESS; rtStatus = _SUCCESS;
} else } else
RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__); RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__);
@ -4479,7 +4479,7 @@ phy_ConfigBBWithPgParaFile(
rtStatus = _SUCCESS; rtStatus = _SUCCESS;
pHalData->bb_phy_reg_pg = vzalloc(rlen); pHalData->bb_phy_reg_pg = vzalloc(rlen);
if (pHalData->bb_phy_reg_pg) { if (pHalData->bb_phy_reg_pg) {
_rtw_memcpy(pHalData->bb_phy_reg_pg, pHalData->para_file_buf, rlen); memcpy(pHalData->bb_phy_reg_pg, pHalData->para_file_buf, rlen);
pHalData->bb_phy_reg_pg_len = rlen; pHalData->bb_phy_reg_pg_len = rlen;
} else } else
RTW_INFO("%s bb_phy_reg_pg alloc fail !\n", __FUNCTION__); RTW_INFO("%s bb_phy_reg_pg alloc fail !\n", __FUNCTION__);
@ -4487,7 +4487,7 @@ phy_ConfigBBWithPgParaFile(
} }
} else { } else {
if ((pHalData->bb_phy_reg_pg_len != 0) && (pHalData->bb_phy_reg_pg != NULL)) { if ((pHalData->bb_phy_reg_pg_len != 0) && (pHalData->bb_phy_reg_pg != NULL)) {
_rtw_memcpy(pHalData->para_file_buf, pHalData->bb_phy_reg_pg, pHalData->bb_phy_reg_pg_len); memcpy(pHalData->para_file_buf, pHalData->bb_phy_reg_pg, pHalData->bb_phy_reg_pg_len);
rtStatus = _SUCCESS; rtStatus = _SUCCESS;
} else } else
RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__); RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__);
@ -4528,7 +4528,7 @@ phy_ConfigBBWithMpParaFile(
rtStatus = _SUCCESS; rtStatus = _SUCCESS;
pHalData->bb_phy_reg_mp = vzalloc(rlen); pHalData->bb_phy_reg_mp = vzalloc(rlen);
if (pHalData->bb_phy_reg_mp) { if (pHalData->bb_phy_reg_mp) {
_rtw_memcpy(pHalData->bb_phy_reg_mp, pHalData->para_file_buf, rlen); memcpy(pHalData->bb_phy_reg_mp, pHalData->para_file_buf, rlen);
pHalData->bb_phy_reg_mp_len = rlen; pHalData->bb_phy_reg_mp_len = rlen;
} else } else
RTW_INFO("%s bb_phy_reg_mp alloc fail !\n", __FUNCTION__); RTW_INFO("%s bb_phy_reg_mp alloc fail !\n", __FUNCTION__);
@ -4536,7 +4536,7 @@ phy_ConfigBBWithMpParaFile(
} }
} else { } else {
if ((pHalData->bb_phy_reg_mp_len != 0) && (pHalData->bb_phy_reg_mp != NULL)) { if ((pHalData->bb_phy_reg_mp_len != 0) && (pHalData->bb_phy_reg_mp != NULL)) {
_rtw_memcpy(pHalData->para_file_buf, pHalData->bb_phy_reg_mp, pHalData->bb_phy_reg_mp_len); memcpy(pHalData->para_file_buf, pHalData->bb_phy_reg_mp, pHalData->bb_phy_reg_mp_len);
rtStatus = _SUCCESS; rtStatus = _SUCCESS;
} else } else
RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__); RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__);
@ -4632,7 +4632,7 @@ PHY_ConfigRFWithParaFile(
rtStatus = _SUCCESS; rtStatus = _SUCCESS;
pBuf = vzalloc(rlen); pBuf = vzalloc(rlen);
if (pBuf) { if (pBuf) {
_rtw_memcpy(pBuf, pHalData->para_file_buf, rlen); memcpy(pBuf, pHalData->para_file_buf, rlen);
*pBufLen = rlen; *pBufLen = rlen;
switch (eRFPath) { switch (eRFPath) {
@ -4652,7 +4652,7 @@ PHY_ConfigRFWithParaFile(
} }
} else { } else {
if ((pBufLen != NULL) && (*pBufLen != 0) && (pBuf != NULL)) { if ((pBufLen != NULL) && (*pBufLen != 0) && (pBuf != NULL)) {
_rtw_memcpy(pHalData->para_file_buf, pBuf, *pBufLen); memcpy(pHalData->para_file_buf, pBuf, *pBufLen);
rtStatus = _SUCCESS; rtStatus = _SUCCESS;
} else } else
RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__); RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__);
@ -4831,7 +4831,7 @@ PHY_ConfigRFWithTxPwrTrackParaFile(
rtStatus = _SUCCESS; rtStatus = _SUCCESS;
pHalData->rf_tx_pwr_track = vzalloc(rlen); pHalData->rf_tx_pwr_track = vzalloc(rlen);
if (pHalData->rf_tx_pwr_track) { if (pHalData->rf_tx_pwr_track) {
_rtw_memcpy(pHalData->rf_tx_pwr_track, pHalData->para_file_buf, rlen); memcpy(pHalData->rf_tx_pwr_track, pHalData->para_file_buf, rlen);
pHalData->rf_tx_pwr_track_len = rlen; pHalData->rf_tx_pwr_track_len = rlen;
} else } else
RTW_INFO("%s rf_tx_pwr_track alloc fail !\n", __FUNCTION__); RTW_INFO("%s rf_tx_pwr_track alloc fail !\n", __FUNCTION__);
@ -4839,7 +4839,7 @@ PHY_ConfigRFWithTxPwrTrackParaFile(
} }
} else { } else {
if ((pHalData->rf_tx_pwr_track_len != 0) && (pHalData->rf_tx_pwr_track != NULL)) { if ((pHalData->rf_tx_pwr_track_len != 0) && (pHalData->rf_tx_pwr_track != NULL)) {
_rtw_memcpy(pHalData->para_file_buf, pHalData->rf_tx_pwr_track, pHalData->rf_tx_pwr_track_len); memcpy(pHalData->para_file_buf, pHalData->rf_tx_pwr_track, pHalData->rf_tx_pwr_track_len);
rtStatus = _SUCCESS; rtStatus = _SUCCESS;
} else } else
RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__); RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__);
@ -5164,7 +5164,7 @@ phy_ParsePowerLimitTableFile(
goto exit; goto exit;
} }
_rtw_memcpy(regulation[forCnt], szLine + i_ns, i - i_ns); memcpy(regulation[forCnt], szLine + i_ns, i - i_ns);
regulation[forCnt][i - i_ns] = '\0'; regulation[forCnt][i - i_ns] = '\0';
} }
@ -5330,7 +5330,7 @@ PHY_ConfigRFWithPowerLimitTableParaFile(
rtStatus = _SUCCESS; rtStatus = _SUCCESS;
pHalData->rf_tx_pwr_lmt = vzalloc(rlen); pHalData->rf_tx_pwr_lmt = vzalloc(rlen);
if (pHalData->rf_tx_pwr_lmt) { if (pHalData->rf_tx_pwr_lmt) {
_rtw_memcpy(pHalData->rf_tx_pwr_lmt, pHalData->para_file_buf, rlen); memcpy(pHalData->rf_tx_pwr_lmt, pHalData->para_file_buf, rlen);
pHalData->rf_tx_pwr_lmt_len = rlen; pHalData->rf_tx_pwr_lmt_len = rlen;
} else } else
RTW_INFO("%s rf_tx_pwr_lmt alloc fail !\n", __FUNCTION__); RTW_INFO("%s rf_tx_pwr_lmt alloc fail !\n", __FUNCTION__);
@ -5338,7 +5338,7 @@ PHY_ConfigRFWithPowerLimitTableParaFile(
} }
} else { } else {
if ((pHalData->rf_tx_pwr_lmt_len != 0) && (pHalData->rf_tx_pwr_lmt != NULL)) { if ((pHalData->rf_tx_pwr_lmt_len != 0) && (pHalData->rf_tx_pwr_lmt != NULL)) {
_rtw_memcpy(pHalData->para_file_buf, pHalData->rf_tx_pwr_lmt, pHalData->rf_tx_pwr_lmt_len); memcpy(pHalData->para_file_buf, pHalData->rf_tx_pwr_lmt, pHalData->rf_tx_pwr_lmt_len);
rtStatus = _SUCCESS; rtStatus = _SUCCESS;
} else } else
RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__); RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__);

View File

@ -204,7 +204,7 @@ void rtw_acs_get_rst(_adapter *adapter)
(rpt.nhm_rpt_stamp == hal_data->acs.trig_rpt.nhm_rpt_stamp)){ (rpt.nhm_rpt_stamp == hal_data->acs.trig_rpt.nhm_rpt_stamp)){
hal_data->acs.clm_ratio[chan_idx] = rpt.clm_ratio; hal_data->acs.clm_ratio[chan_idx] = rpt.clm_ratio;
hal_data->acs.nhm_ratio[chan_idx] = rpt.nhm_ratio; hal_data->acs.nhm_ratio[chan_idx] = rpt.nhm_ratio;
_rtw_memcpy(&hal_data->acs.nhm[chan_idx][0], rpt.nhm_result, NHM_RPT_NUM); memcpy(&hal_data->acs.nhm[chan_idx][0], rpt.nhm_result, NHM_RPT_NUM);
/*RTW_INFO("[ACS] get_rst success (rst = 0x%02x, clm_stamp:%d:%d, nhm_stamp:%d:%d)\n", /*RTW_INFO("[ACS] get_rst success (rst = 0x%02x, clm_stamp:%d:%d, nhm_stamp:%d:%d)\n",
rst, rst,

View File

@ -210,7 +210,7 @@ static u8 _halmac_sdio_reg_read_n(void *p, u32 offset, u32 size, u8 *data)
goto exit; goto exit;
} }
_rtw_memcpy(data, pbuf, size); memcpy(data, pbuf, size);
rst = RTW_HALMAC_SUCCESS; rst = RTW_HALMAC_SUCCESS;
exit: exit:
rtw_mfree(pbuf, sdio_read_size); rtw_mfree(pbuf, sdio_read_size);
@ -230,7 +230,7 @@ static void _halmac_sdio_reg_write_8(void *p, u32 offset, u8 val)
pbuf = rtw_zmalloc(1); pbuf = rtw_zmalloc(1);
if (!pbuf) if (!pbuf)
return; return;
_rtw_memcpy(pbuf, &val, 1); memcpy(pbuf, &val, 1);
ret = rtw_sdio_write_cmd53(d, offset, pbuf, 1); ret = rtw_sdio_write_cmd53(d, offset, pbuf, 1);
if (ret == _FAIL) if (ret == _FAIL)
@ -252,7 +252,7 @@ static void _halmac_sdio_reg_write_16(void *p, u32 offset, u16 val)
pbuf = rtw_zmalloc(2); pbuf = rtw_zmalloc(2);
if (!pbuf) if (!pbuf)
return; return;
_rtw_memcpy(pbuf, &val, 2); memcpy(pbuf, &val, 2);
ret = rtw_sdio_write_cmd53(d, offset, pbuf, 2); ret = rtw_sdio_write_cmd53(d, offset, pbuf, 2);
if (ret == _FAIL) if (ret == _FAIL)
@ -274,7 +274,7 @@ static void _halmac_sdio_reg_write_32(void *p, u32 offset, u32 val)
pbuf = rtw_zmalloc(4); pbuf = rtw_zmalloc(4);
if (!pbuf) if (!pbuf)
return; return;
_rtw_memcpy(pbuf, &val, 4); memcpy(pbuf, &val, 4);
ret = rtw_sdio_write_cmd53(d, offset, pbuf, 4); ret = rtw_sdio_write_cmd53(d, offset, pbuf, 4);
if (ret == _FAIL) if (ret == _FAIL)
@ -396,7 +396,7 @@ static void *_halmac_malloc(void *p, u32 size)
static u8 _halmac_memcpy(void *p, void *dest, void *src, u32 size) static u8 _halmac_memcpy(void *p, void *dest, void *src, u32 size)
{ {
_rtw_memcpy(dest, src, size); memcpy(dest, src, size);
return RTW_HALMAC_SUCCESS; return RTW_HALMAC_SUCCESS;
} }
@ -729,7 +729,7 @@ static u8 _halmac_event_indication(void *p, enum halmac_feature_id feature_id, e
cpsz = size; cpsz = size;
} }
if (cpsz && indicator->buffer) if (cpsz && indicator->buffer)
_rtw_memcpy(indicator->buffer, buf, cpsz); memcpy(indicator->buffer, buf, cpsz);
rtw_sctx_done(&sctx); rtw_sctx_done(&sctx);
@ -841,7 +841,7 @@ static void _read_register(struct dvobj_priv *d, u32 addr, u32 cnt, u8 *buf)
if (i) { if (i) {
val32 = cpu_to_le32(rtw_read32(a, addr & ~0x3)); val32 = cpu_to_le32(rtw_read32(a, addr & ~0x3));
n = 4 - i; n = 4 - i;
_rtw_memcpy(buf, ((u8 *)&val32) + i, n); memcpy(buf, ((u8 *)&val32) + i, n);
i = n; i = n;
cnt -= n; cnt -= n;
} }
@ -862,12 +862,12 @@ static void _read_register(struct dvobj_priv *d, u32 addr, u32 cnt, u8 *buf)
break; break;
case 2: case 2:
val16 = cpu_to_le16(rtw_read16(a, addr+i)); val16 = cpu_to_le16(rtw_read16(a, addr+i));
_rtw_memcpy(&buf[i], &val16, 2); memcpy(&buf[i], &val16, 2);
i += 2; i += 2;
break; break;
case 4: case 4:
val32 = cpu_to_le32(rtw_read32(a, addr+i)); val32 = cpu_to_le32(rtw_read32(a, addr+i));
_rtw_memcpy(&buf[i], &val32, 4); memcpy(&buf[i], &val32, 4);
i += 4; i += 4;
break; break;
} }
@ -1800,7 +1800,7 @@ int rtw_halmac_get_mac_address(struct dvobj_priv *d, enum _hw_port hwport, u8 *a
if (status != HALMAC_RET_SUCCESS) if (status != HALMAC_RET_SUCCESS)
goto out; goto out;
_rtw_memcpy(addr, hwa.addr, 6); memcpy(addr, hwa.addr, 6);
err = 0; err = 0;
out: out:
@ -2020,7 +2020,7 @@ int rtw_halmac_set_mac_address(struct dvobj_priv *d, enum _hw_port hwport, u8 *a
port = _hw_port_drv2halmac(hwport); port = _hw_port_drv2halmac(hwport);
memset(&hwa, 0, sizeof(hwa)); memset(&hwa, 0, sizeof(hwa));
_rtw_memcpy(hwa.addr, addr, 6); memcpy(hwa.addr, addr, 6);
status = api->halmac_cfg_mac_addr(halmac, port, &hwa); status = api->halmac_cfg_mac_addr(halmac, port, &hwa);
if (status != HALMAC_RET_SUCCESS) if (status != HALMAC_RET_SUCCESS)
@ -2056,7 +2056,7 @@ int rtw_halmac_set_bssid(struct dvobj_priv *d, enum _hw_port hwport, u8 *addr)
port = _hw_port_drv2halmac(hwport); port = _hw_port_drv2halmac(hwport);
memset(&hwa, 0, sizeof(hwa)); memset(&hwa, 0, sizeof(hwa));
_rtw_memcpy(hwa.addr, addr, 6); memcpy(hwa.addr, addr, 6);
status = api->halmac_cfg_bssid(halmac, port, &hwa); status = api->halmac_cfg_bssid(halmac, port, &hwa);
if (status != HALMAC_RET_SUCCESS) if (status != HALMAC_RET_SUCCESS)
goto out; goto out;
@ -2090,7 +2090,7 @@ int rtw_halmac_set_tx_address(struct dvobj_priv *d, enum _hw_port hwport, u8 *ad
api = HALMAC_GET_API(halmac); api = HALMAC_GET_API(halmac);
port = _hw_port_drv2halmac(hwport); port = _hw_port_drv2halmac(hwport);
memset(&hwa, 0, sizeof(hwa)); memset(&hwa, 0, sizeof(hwa));
_rtw_memcpy(hwa.addr, addr, 6); memcpy(hwa.addr, addr, 6);
status = api->halmac_cfg_transmitter_addr(halmac, port, &hwa); status = api->halmac_cfg_transmitter_addr(halmac, port, &hwa);
if (status != HALMAC_RET_SUCCESS) if (status != HALMAC_RET_SUCCESS)
@ -3979,13 +3979,13 @@ int rtw_halmac_send_h2c(struct dvobj_priv *d, u8 *h2c)
/* Write Ext command (byte 4~7) */ /* Write Ext command (byte 4~7) */
msgbox_ex_addr = REG_HMEBOX_E0 + (h2c_box_num * EX_MESSAGE_BOX_SIZE); msgbox_ex_addr = REG_HMEBOX_E0 + (h2c_box_num * EX_MESSAGE_BOX_SIZE);
_rtw_memcpy((u8 *)(&h2c_cmd_ex), h2c + 4, EX_MESSAGE_BOX_SIZE); memcpy((u8 *)(&h2c_cmd_ex), h2c + 4, EX_MESSAGE_BOX_SIZE);
h2c_cmd_ex = le32_to_cpu(h2c_cmd_ex); h2c_cmd_ex = le32_to_cpu(h2c_cmd_ex);
rtw_write32(adapter, msgbox_ex_addr, h2c_cmd_ex); rtw_write32(adapter, msgbox_ex_addr, h2c_cmd_ex);
/* Write command (byte 0~3) */ /* Write command (byte 0~3) */
msgbox_addr = REG_HMEBOX0 + (h2c_box_num * MESSAGE_BOX_SIZE); msgbox_addr = REG_HMEBOX0 + (h2c_box_num * MESSAGE_BOX_SIZE);
_rtw_memcpy((u8 *)(&h2c_cmd), h2c, 4); memcpy((u8 *)(&h2c_cmd), h2c, 4);
h2c_cmd = le32_to_cpu(h2c_cmd); h2c_cmd = le32_to_cpu(h2c_cmd);
rtw_write32(adapter, msgbox_addr, h2c_cmd); rtw_write32(adapter, msgbox_addr, h2c_cmd);
@ -4136,7 +4136,7 @@ int rtw_halmac_read_physical_efuse(struct dvobj_priv *d, u32 offset, u32 cnt, u8
if (err) if (err)
err = -1; err = -1;
else else
_rtw_memcpy(data, efuse + offset, cnt); memcpy(data, efuse + offset, cnt);
rtw_mfree(efuse, size); rtw_mfree(efuse, size);
} }
@ -5023,7 +5023,7 @@ static int _halmac_scanoffload(struct dvobj_priv *d, u32 enable, u8 nlo,
} }
pnossid.SSID_len = ssid_len; pnossid.SSID_len = ssid_len;
_rtw_memcpy(pnossid.SSID, ssid, ssid_len); memcpy(pnossid.SSID, ssid, ssid_len);
} }
rtw_hal_construct_ProbeReq(adapter, probereq, &len, &pnossid); rtw_hal_construct_ProbeReq(adapter, probereq, &len, &pnossid);
@ -5433,7 +5433,7 @@ int rtw_halmac_bf_add_mu_bfer(struct dvobj_priv *d, u16 paid, u16 csi_para,
param.csi_para = csi_para; param.csi_para = csi_para;
param.my_aid = my_aid; param.my_aid = my_aid;
param.csi_length_sel = sel; param.csi_length_sel = sel;
_rtw_memcpy(param.bfer_address.addr, addr, 6); memcpy(param.bfer_address.addr, addr, 6);
status = api->halmac_mu_bfer_entry_init(mac, &param); status = api->halmac_mu_bfer_entry_init(mac, &param);
if (status != HALMAC_RET_SUCCESS) if (status != HALMAC_RET_SUCCESS)
@ -5536,13 +5536,13 @@ int rtw_halmac_bf_cfg_mu_mimo(struct dvobj_priv *d, enum halmac_snd_role role,
param.mu_tx_en = mu_tx_en; param.mu_tx_en = mu_tx_en;
if (sounding_sts) if (sounding_sts)
_rtw_memcpy(param.sounding_sts, sounding_sts, 6); memcpy(param.sounding_sts, sounding_sts, 6);
if (given_gid_tab) if (given_gid_tab)
_rtw_memcpy(param.given_gid_tab, given_gid_tab, 8); memcpy(param.given_gid_tab, given_gid_tab, 8);
if (given_user_pos) if (given_user_pos)
_rtw_memcpy(param.given_user_pos, given_user_pos, 16); memcpy(param.given_user_pos, given_user_pos, 16);
status = api->halmac_cfg_mumimo(mac, &param); status = api->halmac_cfg_mumimo(mac, &param);
if (status != HALMAC_RET_SUCCESS) if (status != HALMAC_RET_SUCCESS)

View File

@ -244,7 +244,7 @@ void usb_c2h_hisr_hdl(_adapter *adapter, u8 *buf)
} else { } else {
c2h_evt = rtw_malloc(C2H_REG_LEN); c2h_evt = rtw_malloc(C2H_REG_LEN);
if (c2h_evt != NULL) { if (c2h_evt != NULL) {
_rtw_memcpy(c2h_evt, buf, C2H_REG_LEN); memcpy(c2h_evt, buf, C2H_REG_LEN);
if (rtw_cbuf_push(adapter->evtpriv.c2h_queue, (void*)c2h_evt) != _SUCCESS) if (rtw_cbuf_push(adapter->evtpriv.c2h_queue, (void*)c2h_evt) != _SUCCESS)
RTW_ERR("%s rtw_cbuf_push fail\n", __func__); RTW_ERR("%s rtw_cbuf_push fail\n", __func__);
} else { } else {

View File

@ -90,7 +90,7 @@ static void rtw_hal_mcc_build_p2p_noa_attr(PADAPTER padapter, u8 *ie, u32 *ie_le
noa_interval = mcc_switch_channel_policy_table[mcc_policy_idx][MCC_INTERVAL_IDX] * TU; noa_interval = mcc_switch_channel_policy_table[mcc_policy_idx][MCC_INTERVAL_IDX] * TU;
/* P2P OUI(4 bytes) */ /* P2P OUI(4 bytes) */
_rtw_memcpy(p2p_noa_attr_ie, P2P_OUI, 4); memcpy(p2p_noa_attr_ie, P2P_OUI, 4);
p2p_noa_attr_len = p2p_noa_attr_len + 4; p2p_noa_attr_len = p2p_noa_attr_len + 4;
/* attrute ID(1 byte) */ /* attrute ID(1 byte) */
@ -997,9 +997,9 @@ static void rtw_hal_construct_CTS(PADAPTER padapter, u8 *pframe, u32 *pLength)
*(pframe + 3) = 0x78; *(pframe + 3) = 0x78;
/* frame recvaddr, length = 6 */ /* frame recvaddr, length = 6 */
_rtw_memcpy((pframe + 4), broadcast_addr, ETH_ALEN); memcpy((pframe + 4), broadcast_addr, ETH_ALEN);
_rtw_memcpy((pframe + 4 + ETH_ALEN), adapter_mac_addr(padapter), ETH_ALEN); memcpy((pframe + 4 + ETH_ALEN), adapter_mac_addr(padapter), ETH_ALEN);
_rtw_memcpy((pframe + 4 + ETH_ALEN*2), adapter_mac_addr(padapter), ETH_ALEN); memcpy((pframe + 4 + ETH_ALEN*2), adapter_mac_addr(padapter), ETH_ALEN);
*pLength = 22; *pLength = 22;
} }
@ -3288,7 +3288,7 @@ u8 *rtw_hal_mcc_append_go_p2p_ie(PADAPTER padapter, u8 *pframe, u32 *len)
if (pmccadapriv->p2p_go_noa_ie_len == 0) if (pmccadapriv->p2p_go_noa_ie_len == 0)
return pframe; return pframe;
_rtw_memcpy(pframe, pmccadapriv->p2p_go_noa_ie, pmccadapriv->p2p_go_noa_ie_len); memcpy(pframe, pmccadapriv->p2p_go_noa_ie, pmccadapriv->p2p_go_noa_ie_len);
*len = *len + pmccadapriv->p2p_go_noa_ie_len; *len = *len + pmccadapriv->p2p_go_noa_ie_len;
return pframe + pmccadapriv->p2p_go_noa_ie_len; return pframe + pmccadapriv->p2p_go_noa_ie_len;
@ -3476,7 +3476,7 @@ u8 rtw_set_mcc_duration_cmd(_adapter *adapter, u8 type, u8 val)
pdrvextra_cmd_parm->size = 1; pdrvextra_cmd_parm->size = 1;
pdrvextra_cmd_parm->pbuf = mcc_duration; pdrvextra_cmd_parm->pbuf = mcc_duration;
_rtw_memcpy(mcc_duration, &val, 1); memcpy(mcc_duration, &val, 1);
init_h2fwcmd_w_parm_no_rsp(cmdobj, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra)); init_h2fwcmd_w_parm_no_rsp(cmdobj, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
res = rtw_enqueue_cmd(pcmdpriv, cmdobj); res = rtw_enqueue_cmd(pcmdpriv, cmdobj);

View File

@ -2270,7 +2270,7 @@ void mpt_ProSetPMacTx(PADAPTER Adapter)
u4bTmp = PMacTxInfo.VHT_SIG_A[3] | ((PMacTxInfo.VHT_SIG_A[4]) << 8) | ((PMacTxInfo.VHT_SIG_A[5]) << 16); u4bTmp = PMacTxInfo.VHT_SIG_A[3] | ((PMacTxInfo.VHT_SIG_A[4]) << 8) | ((PMacTxInfo.VHT_SIG_A[5]) << 16);
phy_set_bb_reg(Adapter, 0xb10, 0xffffff, u4bTmp); phy_set_bb_reg(Adapter, 0xb10, 0xffffff, u4bTmp);
_rtw_memcpy(&u4bTmp, PMacTxInfo.VHT_SIG_B, 4); memcpy(&u4bTmp, PMacTxInfo.VHT_SIG_B, 4);
phy_set_bb_reg(Adapter, 0xb14, bMaskDWord, u4bTmp); phy_set_bb_reg(Adapter, 0xb14, bMaskDWord, u4bTmp);
} }
@ -2278,7 +2278,7 @@ void mpt_ProSetPMacTx(PADAPTER Adapter)
u4bTmp = (PMacTxInfo.VHT_SIG_B_CRC << 24) | PMacTxInfo.PacketPeriod; /* for TX interval */ u4bTmp = (PMacTxInfo.VHT_SIG_B_CRC << 24) | PMacTxInfo.PacketPeriod; /* for TX interval */
phy_set_bb_reg(Adapter, 0xb20, bMaskDWord, u4bTmp); phy_set_bb_reg(Adapter, 0xb20, bMaskDWord, u4bTmp);
_rtw_memcpy(&u4bTmp, PMacTxInfo.VHT_Delimiter, 4); memcpy(&u4bTmp, PMacTxInfo.VHT_Delimiter, 4);
phy_set_bb_reg(Adapter, 0xb24, bMaskDWord, u4bTmp); phy_set_bb_reg(Adapter, 0xb24, bMaskDWord, u4bTmp);
/* 0xb28 - 0xb34 24 byte Probe Request MAC Header*/ /* 0xb28 - 0xb34 24 byte Probe Request MAC Header*/

View File

@ -407,7 +407,7 @@ void odm_move_memory(struct dm_struct *dm, void *dest, void *src, u32 length)
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE) && defined(DM_ODM_CE_MAC80211_V2) #elif (DM_ODM_SUPPORT_TYPE & ODM_CE) && defined(DM_ODM_CE_MAC80211_V2)
memcpy(dest, src, length); memcpy(dest, src, length);
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE) #elif (DM_ODM_SUPPORT_TYPE & ODM_CE)
_rtw_memcpy(dest, src, length); memcpy(dest, src, length);
#elif (DM_ODM_SUPPORT_TYPE & ODM_WIN) #elif (DM_ODM_SUPPORT_TYPE & ODM_WIN)
PlatformMoveMemory(dest, src, length); PlatformMoveMemory(dest, src, length);
#elif (DM_ODM_SUPPORT_TYPE & ODM_IOT) #elif (DM_ODM_SUPPORT_TYPE & ODM_IOT)

View File

@ -1056,9 +1056,9 @@ send_fw_ht_ndpa_packet(
set_order_bit(pframe); set_order_bit(pframe);
set_frame_sub_type(pframe, WIFI_ACTION_NOACK); set_frame_sub_type(pframe, WIFI_ACTION_NOACK);
_rtw_memcpy(pwlanhdr->addr1, RA, ETH_ALEN); memcpy(pwlanhdr->addr1, RA, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN); memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN);
if (pmlmeext->cur_wireless_mode == WIRELESS_11B) if (pmlmeext->cur_wireless_mode == WIRELESS_11B)
a_sifs_time = 10; a_sifs_time = 10;
@ -1078,7 +1078,7 @@ send_fw_ht_ndpa_packet(
SET_HT_CTRL_CSI_STEERING(pframe + 24, 3); SET_HT_CTRL_CSI_STEERING(pframe + 24, 3);
SET_HT_CTRL_NDP_ANNOUNCEMENT(pframe + 24, 1); SET_HT_CTRL_NDP_ANNOUNCEMENT(pframe + 24, 1);
_rtw_memcpy(pframe + 28, action_hdr, 4); memcpy(pframe + 28, action_hdr, 4);
pattrib->pktlen = 32; pattrib->pktlen = 32;
@ -1142,9 +1142,9 @@ send_sw_ht_ndpa_packet(
set_order_bit(pframe); set_order_bit(pframe);
set_frame_sub_type(pframe, WIFI_ACTION_NOACK); set_frame_sub_type(pframe, WIFI_ACTION_NOACK);
_rtw_memcpy(pwlanhdr->addr1, RA, ETH_ALEN); memcpy(pwlanhdr->addr1, RA, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN); memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN);
if (pmlmeext->cur_wireless_mode == WIRELESS_11B) if (pmlmeext->cur_wireless_mode == WIRELESS_11B)
a_sifs_time = 10; a_sifs_time = 10;
@ -1164,7 +1164,7 @@ send_sw_ht_ndpa_packet(
SET_HT_CTRL_CSI_STEERING(pframe + 24, 3); SET_HT_CTRL_CSI_STEERING(pframe + 24, 3);
SET_HT_CTRL_NDP_ANNOUNCEMENT(pframe + 24, 1); SET_HT_CTRL_NDP_ANNOUNCEMENT(pframe + 24, 1);
_rtw_memcpy(pframe + 28, action_hdr, 4); memcpy(pframe + 28, action_hdr, 4);
pattrib->pktlen = 32; pattrib->pktlen = 32;
@ -1209,7 +1209,7 @@ send_fw_vht_ndpa_packet(
/* update attribute */ /* update attribute */
pattrib = &pmgntframe->attrib; pattrib = &pmgntframe->attrib;
_rtw_memcpy(pattrib->ra, RA, ETH_ALEN); memcpy(pattrib->ra, RA, ETH_ALEN);
update_mgntframe_attrib(adapter, pattrib); update_mgntframe_attrib(adapter, pattrib);
pattrib->qsel = QSLT_BEACON; pattrib->qsel = QSLT_BEACON;
@ -1231,8 +1231,8 @@ send_fw_vht_ndpa_packet(
set_frame_sub_type(pframe, WIFI_NDPA); set_frame_sub_type(pframe, WIFI_NDPA);
_rtw_memcpy(pwlanhdr->addr1, RA, ETH_ALEN); memcpy(pwlanhdr->addr1, RA, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN); memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN);
if (is_supported_5g(pmlmeext->cur_wireless_mode) || is_supported_ht(pmlmeext->cur_wireless_mode)) if (is_supported_5g(pmlmeext->cur_wireless_mode) || is_supported_ht(pmlmeext->cur_wireless_mode))
a_sifs_time = 16; a_sifs_time = 16;
@ -1256,7 +1256,7 @@ send_fw_vht_ndpa_packet(
else else
beam_info->sounding_sequence++; beam_info->sounding_sequence++;
_rtw_memcpy(pframe + 16, &sequence, 1); memcpy(pframe + 16, &sequence, 1);
if (((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE)) if (((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE))
AID = 0; AID = 0;
@ -1265,7 +1265,7 @@ send_fw_vht_ndpa_packet(
sta_info.feedback_type = 0; sta_info.feedback_type = 0;
sta_info.nc_index = 0; sta_info.nc_index = 0;
_rtw_memcpy(pframe + 17, (u8 *)&sta_info, 2); memcpy(pframe + 17, (u8 *)&sta_info, 2);
pattrib->pktlen = 19; pattrib->pktlen = 19;
@ -1314,7 +1314,7 @@ send_sw_vht_ndpa_packet(
/*update attribute*/ /*update attribute*/
pattrib = &pmgntframe->attrib; pattrib = &pmgntframe->attrib;
_rtw_memcpy(pattrib->ra, RA, ETH_ALEN); memcpy(pattrib->ra, RA, ETH_ALEN);
update_mgntframe_attrib(adapter, pattrib); update_mgntframe_attrib(adapter, pattrib);
pattrib->qsel = QSLT_MGNT; pattrib->qsel = QSLT_MGNT;
pattrib->rate = ndp_tx_rate; pattrib->rate = ndp_tx_rate;
@ -1332,8 +1332,8 @@ send_sw_vht_ndpa_packet(
set_frame_sub_type(pframe, WIFI_NDPA); set_frame_sub_type(pframe, WIFI_NDPA);
_rtw_memcpy(pwlanhdr->addr1, RA, ETH_ALEN); memcpy(pwlanhdr->addr1, RA, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN); memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN);
if (is_supported_5g(pmlmeext->cur_wireless_mode) || is_supported_ht(pmlmeext->cur_wireless_mode)) if (is_supported_5g(pmlmeext->cur_wireless_mode) || is_supported_ht(pmlmeext->cur_wireless_mode))
a_sifs_time = 16; a_sifs_time = 16;
@ -1357,7 +1357,7 @@ send_sw_vht_ndpa_packet(
else else
beam_info->sounding_sequence++; beam_info->sounding_sequence++;
_rtw_memcpy(pframe + 16, &sequence, 1); memcpy(pframe + 16, &sequence, 1);
if (((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE)) if (((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE))
AID = 0; AID = 0;
@ -1365,7 +1365,7 @@ send_sw_vht_ndpa_packet(
ndpa_sta_info.feedback_type = 0; ndpa_sta_info.feedback_type = 0;
ndpa_sta_info.nc_index = 0; ndpa_sta_info.nc_index = 0;
_rtw_memcpy(pframe + 17, (u8 *)&ndpa_sta_info, 2); memcpy(pframe + 17, (u8 *)&ndpa_sta_info, 2);
pattrib->pktlen = 19; pattrib->pktlen = 19;

View File

@ -100,10 +100,10 @@ s32 FillH2CCmd_8192E(PADAPTER padapter, u8 ElementID, u32 CmdLen, u8 *pCmdBuffer
*(u8 *)(&h2c_cmd) = ElementID; *(u8 *)(&h2c_cmd) = ElementID;
if (CmdLen <= 3) if (CmdLen <= 3)
_rtw_memcpy((u8 *)(&h2c_cmd) + 1, pCmdBuffer, CmdLen); memcpy((u8 *)(&h2c_cmd) + 1, pCmdBuffer, CmdLen);
else { else {
_rtw_memcpy((u8 *)(&h2c_cmd) + 1, pCmdBuffer, 3); memcpy((u8 *)(&h2c_cmd) + 1, pCmdBuffer, 3);
_rtw_memcpy((u8 *)(&h2c_cmd_ex), pCmdBuffer + 3, CmdLen - 3); memcpy((u8 *)(&h2c_cmd_ex), pCmdBuffer + 3, CmdLen - 3);
} }
/* Write Ext command */ /* Write Ext command */

View File

@ -994,7 +994,7 @@ s32 rtl8192eu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
/* */ /* */
skb_put(pxmit_skb, len + TXDESC_SIZE); skb_put(pxmit_skb, len + TXDESC_SIZE);
pxmitbuf = pxmitbuf + TXDESC_SIZE; pxmitbuf = pxmitbuf + TXDESC_SIZE;
_rtw_memcpy(pxmitbuf, skb->data, len); memcpy(pxmitbuf, skb->data, len);
/* RTW_INFO("mgnt_xmit, len=%x\n", pxmit_skb->len); */ /* RTW_INFO("mgnt_xmit, len=%x\n", pxmit_skb->len); */

View File

@ -28,16 +28,16 @@ void interrupt_handler_8192eu(_adapter *padapter, u16 pkt_len, u8 *pbuf)
} }
/* HISR */ /* HISR */
_rtw_memcpy(&(pHalData->IntArray[0]), &(pbuf[USB_INTR_CONTENT_HISR_OFFSET]), 4); memcpy(&(pHalData->IntArray[0]), &(pbuf[USB_INTR_CONTENT_HISR_OFFSET]), 4);
_rtw_memcpy(&(pHalData->IntArray[1]), &(pbuf[USB_INTR_CONTENT_HISRE_OFFSET]), 4); memcpy(&(pHalData->IntArray[1]), &(pbuf[USB_INTR_CONTENT_HISRE_OFFSET]), 4);
#if 0 /* DBG */ #if 0 /* DBG */
{ {
u32 hisr = 0 , hisr_ex = 0; u32 hisr = 0 , hisr_ex = 0;
_rtw_memcpy(&hisr, &(pHalData->IntArray[0]), 4); memcpy(&hisr, &(pHalData->IntArray[0]), 4);
hisr = le32_to_cpu(hisr); hisr = le32_to_cpu(hisr);
_rtw_memcpy(&hisr_ex, &(pHalData->IntArray[1]), 4); memcpy(&hisr_ex, &(pHalData->IntArray[1]), 4);
hisr_ex = le32_to_cpu(hisr_ex); hisr_ex = le32_to_cpu(hisr_ex);
if ((hisr != 0) || (hisr_ex != 0)) if ((hisr != 0) || (hisr_ex != 0))
@ -68,8 +68,8 @@ void interrupt_handler_8192eu(_adapter *padapter, u16 pkt_len, u8 *pbuf)
#ifdef CONFIG_LPS_LCLK #ifdef CONFIG_LPS_LCLK
if (pHalData->IntArray[0] & IMR_CPWM_88E) { if (pHalData->IntArray[0] & IMR_CPWM_88E) {
_rtw_memcpy(&pwr_rpt.state, &(pbuf[USB_INTR_CONTENT_CPWM1_OFFSET]), 1); memcpy(&pwr_rpt.state, &(pbuf[USB_INTR_CONTENT_CPWM1_OFFSET]), 1);
/* _rtw_memcpy(&pwr_rpt.state2, &(pbuf[USB_INTR_CONTENT_CPWM2_OFFSET]), 1); */ /* memcpy(&pwr_rpt.state2, &(pbuf[USB_INTR_CONTENT_CPWM2_OFFSET]), 1); */
/* 88e's cpwm value only change BIT0, so driver need to add PS_STATE_S2 for LPS flow. */ /* 88e's cpwm value only change BIT0, so driver need to add PS_STATE_S2 for LPS flow. */
pwr_rpt.state |= PS_STATE_S2; pwr_rpt.state |= PS_STATE_S2;

View File

@ -254,10 +254,8 @@ _pkt *rtw_os_pkt_copy(_pkt *pkt);
void *rtw_os_pkt_data(_pkt *pkt); void *rtw_os_pkt_data(_pkt *pkt);
u32 rtw_os_pkt_len(_pkt *pkt); u32 rtw_os_pkt_len(_pkt *pkt);
extern void _rtw_memcpy(void *dec, const void *sour, u32 sz);
extern void _rtw_memmove(void *dst, const void *src, u32 sz); extern void _rtw_memmove(void *dst, const void *src, u32 sz);
extern int _rtw_memcmp(const void *dst, const void *src, u32 sz); extern int _rtw_memcmp(const void *dst, const void *src, u32 sz);
extern void _rtw_memset(void *pbuf, int c, u32 sz);
extern void _rtw_init_listhead(_list *list); extern void _rtw_init_listhead(_list *list);
extern u32 rtw_is_list_empty(_list *phead); extern u32 rtw_is_list_empty(_list *phead);

View File

@ -1419,15 +1419,15 @@ void rtw_proxim_send_packet(_adapter *padapter, u8 *pbuf, u16 len, u8 m_rate);
#define ARP_TARGET_MAC_ADDR(_arp) ARP_THA(_arp, ETH_ALEN, RTW_IP_ADDR_LEN) #define ARP_TARGET_MAC_ADDR(_arp) ARP_THA(_arp, ETH_ALEN, RTW_IP_ADDR_LEN)
#define ARP_TARGET_IP_ADDR(_arp) ARP_TPA(_arp, ETH_ALEN, RTW_IP_ADDR_LEN) #define ARP_TARGET_IP_ADDR(_arp) ARP_TPA(_arp, ETH_ALEN, RTW_IP_ADDR_LEN)
#define GET_ARP_SENDER_MAC_ADDR(_arp, _val) _rtw_memcpy(_val, ARP_SENDER_MAC_ADDR(_arp), ETH_ALEN) #define GET_ARP_SENDER_MAC_ADDR(_arp, _val) memcpy(_val, ARP_SENDER_MAC_ADDR(_arp), ETH_ALEN)
#define GET_ARP_SENDER_IP_ADDR(_arp, _val) _rtw_memcpy(_val, ARP_SENDER_IP_ADDR(_arp), RTW_IP_ADDR_LEN) #define GET_ARP_SENDER_IP_ADDR(_arp, _val) memcpy(_val, ARP_SENDER_IP_ADDR(_arp), RTW_IP_ADDR_LEN)
#define GET_ARP_TARGET_MAC_ADDR(_arp, _val) _rtw_memcpy(_val, ARP_TARGET_MAC_ADDR(_arp), ETH_ALEN) #define GET_ARP_TARGET_MAC_ADDR(_arp, _val) memcpy(_val, ARP_TARGET_MAC_ADDR(_arp), ETH_ALEN)
#define GET_ARP_TARGET_IP_ADDR(_arp, _val) _rtw_memcpy(_val, ARP_TARGET_IP_ADDR(_arp), RTW_IP_ADDR_LEN) #define GET_ARP_TARGET_IP_ADDR(_arp, _val) memcpy(_val, ARP_TARGET_IP_ADDR(_arp), RTW_IP_ADDR_LEN)
#define SET_ARP_SENDER_MAC_ADDR(_arp, _val) _rtw_memcpy(ARP_SENDER_MAC_ADDR(_arp), _val, ETH_ALEN) #define SET_ARP_SENDER_MAC_ADDR(_arp, _val) memcpy(ARP_SENDER_MAC_ADDR(_arp), _val, ETH_ALEN)
#define SET_ARP_SENDER_IP_ADDR(_arp, _val) _rtw_memcpy(ARP_SENDER_IP_ADDR(_arp), _val, RTW_IP_ADDR_LEN) #define SET_ARP_SENDER_IP_ADDR(_arp, _val) memcpy(ARP_SENDER_IP_ADDR(_arp), _val, RTW_IP_ADDR_LEN)
#define SET_ARP_TARGET_MAC_ADDR(_arp, _val) _rtw_memcpy(ARP_TARGET_MAC_ADDR(_arp), _val, ETH_ALEN) #define SET_ARP_TARGET_MAC_ADDR(_arp, _val) memcpy(ARP_TARGET_MAC_ADDR(_arp), _val, ETH_ALEN)
#define SET_ARP_TARGET_IP_ADDR(_arp, _val) _rtw_memcpy(ARP_TARGET_IP_ADDR(_arp), _val, RTW_IP_ADDR_LEN) #define SET_ARP_TARGET_IP_ADDR(_arp, _val) memcpy(ARP_TARGET_IP_ADDR(_arp), _val, RTW_IP_ADDR_LEN)
void dump_arp_pkt(void *sel, u8 *da, u8 *sa, u8 *arp, bool tx); void dump_arp_pkt(void *sel, u8 *da, u8 *sa, u8 *arp, bool tx);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -84,7 +84,7 @@ int rtw_mp_write_reg(struct net_device *dev,
*pnext = 0; *pnext = 0;
/*addr = simple_strtoul(pch, &ptmp, 16); /*addr = simple_strtoul(pch, &ptmp, 16);
memset(buf, '\0', sizeof(buf)); memset(buf, '\0', sizeof(buf));
_rtw_memcpy(buf, pch, pnext-pch); memcpy(buf, pch, pnext-pch);
ret = kstrtoul(buf, 16, &addr);*/ ret = kstrtoul(buf, 16, &addr);*/
ret = sscanf(pch, "%x", &addr); ret = sscanf(pch, "%x", &addr);
if (addr > 0x3FFF) if (addr > 0x3FFF)
@ -2154,7 +2154,7 @@ int rtw_mp_hwtx(struct net_device *dev,
return -EFAULT; return -EFAULT;
memset(&pMptCtx->PMacTxInfo, 0, sizeof(RT_PMAC_TX_INFO)); memset(&pMptCtx->PMacTxInfo, 0, sizeof(RT_PMAC_TX_INFO));
_rtw_memcpy((void *)&pMptCtx->PMacTxInfo, (void *)input, sizeof(RT_PMAC_TX_INFO)); memcpy((void *)&pMptCtx->PMacTxInfo, (void *)input, sizeof(RT_PMAC_TX_INFO));
memset(wrqu->data.pointer, 0, wrqu->data.length); memset(wrqu->data.pointer, 0, wrqu->data.length);
if (pMptCtx->PMacTxInfo.bEnPMacTx == 1 && pmp_priv->mode != MP_ON) { if (pMptCtx->PMacTxInfo.bEnPMacTx == 1 && pmp_priv->mode != MP_ON) {

View File

@ -114,7 +114,7 @@ void rtw_reset_securitypriv(_adapter *adapter)
memset(&backupPMKIDList[0], 0x00, sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE); memset(&backupPMKIDList[0], 0x00, sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
_rtw_memcpy(&backupPMKIDList[0], &adapter->securitypriv.PMKIDList[0], sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE); memcpy(&backupPMKIDList[0], &adapter->securitypriv.PMKIDList[0], sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
backupPMKIDIndex = adapter->securitypriv.PMKIDIndex; backupPMKIDIndex = adapter->securitypriv.PMKIDIndex;
backupTKIPCountermeasure = adapter->securitypriv.btkip_countermeasure; backupTKIPCountermeasure = adapter->securitypriv.btkip_countermeasure;
backupTKIPcountermeasure_time = adapter->securitypriv.btkip_countermeasure_time; backupTKIPcountermeasure_time = adapter->securitypriv.btkip_countermeasure_time;
@ -122,7 +122,7 @@ void rtw_reset_securitypriv(_adapter *adapter)
/* Added by Albert 2009/02/18 */ /* Added by Albert 2009/02/18 */
/* Restore the PMK information to securitypriv structure for the following connection. */ /* Restore the PMK information to securitypriv structure for the following connection. */
_rtw_memcpy(&adapter->securitypriv.PMKIDList[0], &backupPMKIDList[0], sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE); memcpy(&adapter->securitypriv.PMKIDList[0], &backupPMKIDList[0], sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
adapter->securitypriv.PMKIDIndex = backupPMKIDIndex; adapter->securitypriv.PMKIDIndex = backupPMKIDIndex;
adapter->securitypriv.btkip_countermeasure = backupTKIPCountermeasure; adapter->securitypriv.btkip_countermeasure = backupTKIPCountermeasure;
adapter->securitypriv.btkip_countermeasure_time = backupTKIPcountermeasure_time; adapter->securitypriv.btkip_countermeasure_time = backupTKIPcountermeasure_time;
@ -242,7 +242,7 @@ void rtw_indicate_sta_assoc_event(_adapter *padapter, struct sta_info *psta)
wrqu.addr.sa_family = ARPHRD_ETHER; wrqu.addr.sa_family = ARPHRD_ETHER;
_rtw_memcpy(wrqu.addr.sa_data, psta->cmn.mac_addr, ETH_ALEN); memcpy(wrqu.addr.sa_data, psta->cmn.mac_addr, ETH_ALEN);
RTW_INFO("+rtw_indicate_sta_assoc_event\n"); RTW_INFO("+rtw_indicate_sta_assoc_event\n");
@ -269,7 +269,7 @@ void rtw_indicate_sta_disassoc_event(_adapter *padapter, struct sta_info *psta)
wrqu.addr.sa_family = ARPHRD_ETHER; wrqu.addr.sa_family = ARPHRD_ETHER;
_rtw_memcpy(wrqu.addr.sa_data, psta->cmn.mac_addr, ETH_ALEN); memcpy(wrqu.addr.sa_data, psta->cmn.mac_addr, ETH_ALEN);
RTW_INFO("+rtw_indicate_sta_disassoc_event\n"); RTW_INFO("+rtw_indicate_sta_disassoc_event\n");
@ -404,7 +404,7 @@ int hostapd_mode_init(_adapter *padapter)
mac[4] = 0x11; mac[4] = 0x11;
mac[5] = 0x12; mac[5] = 0x12;
_rtw_memcpy(pnetdev->dev_addr, mac, ETH_ALEN); memcpy(pnetdev->dev_addr, mac, ETH_ALEN);
rtw_netif_carrier_off(pnetdev); rtw_netif_carrier_off(pnetdev);

View File

@ -900,7 +900,7 @@ uint loadparam(_adapter *padapter)
/* registry_par->hci = (u8)hci; */ /* registry_par->hci = (u8)hci; */
registry_par->network_mode = (u8)rtw_network_mode; registry_par->network_mode = (u8)rtw_network_mode;
_rtw_memcpy(registry_par->ssid.Ssid, "ANY", 3); memcpy(registry_par->ssid.Ssid, "ANY", 3);
registry_par->ssid.SsidLength = 3; registry_par->ssid.SsidLength = 3;
registry_par->channel = (u8)rtw_channel; registry_par->channel = (u8)rtw_channel;
@ -1011,7 +1011,7 @@ uint loadparam(_adapter *padapter)
RTW_ERR("%s discard rtw_country_code not in alpha2\n", __func__); RTW_ERR("%s discard rtw_country_code not in alpha2\n", __func__);
memset(registry_par->alpha2, 0xFF, 2); memset(registry_par->alpha2, 0xFF, 2);
} else } else
_rtw_memcpy(registry_par->alpha2, rtw_country_code, 2); memcpy(registry_par->alpha2, rtw_country_code, 2);
registry_par->channel_plan = (u8)rtw_channel_plan; registry_par->channel_plan = (u8)rtw_channel_plan;
rtw_regsty_load_excl_chs(registry_par); rtw_regsty_load_excl_chs(registry_par);
@ -1249,8 +1249,8 @@ static int rtw_net_set_mac_address(struct net_device *pnetdev, void *addr)
return ret; return ret;
} }
_rtw_memcpy(adapter_mac_addr(padapter), sa->sa_data, ETH_ALEN); /* set mac addr to adapter */ memcpy(adapter_mac_addr(padapter), sa->sa_data, ETH_ALEN); /* set mac addr to adapter */
_rtw_memcpy(pnetdev->dev_addr, sa->sa_data, ETH_ALEN); /* set mac addr to net_device */ memcpy(pnetdev->dev_addr, sa->sa_data, ETH_ALEN); /* set mac addr to net_device */
#if 0 #if 0
if (rtw_is_hw_init_completed(padapter)) { if (rtw_is_hw_init_completed(padapter)) {
@ -1366,7 +1366,7 @@ u16 rtw_recv_select_queue(struct sk_buff *skb)
u32 priority; u32 priority;
u8 *pdata = skb->data; u8 *pdata = skb->data;
_rtw_memcpy(&eth_type, pdata + (ETH_ALEN << 1), 2); memcpy(&eth_type, pdata + (ETH_ALEN << 1), 2);
switch (eth_type) { switch (eth_type) {
case htons(ETH_P_IP): case htons(ETH_P_IP):
@ -1696,7 +1696,7 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name)
/* alloc netdev name */ /* alloc netdev name */
rtw_init_netdev_name(ndev, name); rtw_init_netdev_name(ndev, name);
_rtw_memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN); memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN);
/* Tell the network stack we exist */ /* Tell the network stack we exist */
@ -2639,7 +2639,7 @@ int _netdev_vir_if_open(struct net_device *pnetdev)
if (primary_padapter->bup == _FALSE) if (primary_padapter->bup == _FALSE)
rtw_macaddr_cfg(adapter_mac_addr(primary_padapter), get_hal_mac_addr(primary_padapter)); rtw_macaddr_cfg(adapter_mac_addr(primary_padapter), get_hal_mac_addr(primary_padapter));
_rtw_memcpy(mac, adapter_mac_addr(primary_padapter), ETH_ALEN); memcpy(mac, adapter_mac_addr(primary_padapter), ETH_ALEN);
/* /*
* If the BIT1 is 0, the address is universally administered. * If the BIT1 is 0, the address is universally administered.
@ -2647,13 +2647,13 @@ int _netdev_vir_if_open(struct net_device *pnetdev)
*/ */
mac[0] |= BIT(1); mac[0] |= BIT(1);
_rtw_memcpy(adapter_mac_addr(padapter), mac, ETH_ALEN); memcpy(adapter_mac_addr(padapter), mac, ETH_ALEN);
#ifdef CONFIG_MI_WITH_MBSSID_CAM #ifdef CONFIG_MI_WITH_MBSSID_CAM
rtw_mbid_camid_alloc(padapter, adapter_mac_addr(padapter)); rtw_mbid_camid_alloc(padapter, adapter_mac_addr(padapter));
#endif #endif
rtw_init_wifidirect_addrs(padapter, adapter_mac_addr(padapter), adapter_mac_addr(padapter)); rtw_init_wifidirect_addrs(padapter, adapter_mac_addr(padapter), adapter_mac_addr(padapter));
_rtw_memcpy(pnetdev->dev_addr, adapter_mac_addr(padapter), ETH_ALEN); memcpy(pnetdev->dev_addr, adapter_mac_addr(padapter), ETH_ALEN);
} }
#endif /*CONFIG_PLATFORM_INTEL_BYT*/ #endif /*CONFIG_PLATFORM_INTEL_BYT*/
@ -2812,7 +2812,7 @@ _adapter *rtw_drv_add_vir_if(_adapter *primary_padapter,
if (loadparam(padapter) != _SUCCESS) if (loadparam(padapter) != _SUCCESS)
goto free_adapter; goto free_adapter;
_rtw_memcpy(padapter, primary_padapter, sizeof(_adapter)); memcpy(padapter, primary_padapter, sizeof(_adapter));
/* */ /* */
padapter->bup = _FALSE; padapter->bup = _FALSE;
@ -2850,7 +2850,7 @@ _adapter *rtw_drv_add_vir_if(_adapter *primary_padapter,
/*get mac address from primary_padapter*/ /*get mac address from primary_padapter*/
_rtw_memcpy(mac, adapter_mac_addr(primary_padapter), ETH_ALEN); memcpy(mac, adapter_mac_addr(primary_padapter), ETH_ALEN);
/* /*
* If the BIT1 is 0, the address is universally administered. * If the BIT1 is 0, the address is universally administered.
@ -2860,7 +2860,7 @@ _adapter *rtw_drv_add_vir_if(_adapter *primary_padapter,
if (padapter->iface_id > IFACE_ID1) if (padapter->iface_id > IFACE_ID1)
mac[4] ^= BIT(padapter->iface_id); mac[4] ^= BIT(padapter->iface_id);
_rtw_memcpy(adapter_mac_addr(padapter), mac, ETH_ALEN); memcpy(adapter_mac_addr(padapter), mac, ETH_ALEN);
/* update mac-address to mbsid-cam cache*/ /* update mac-address to mbsid-cam cache*/
#ifdef CONFIG_MI_WITH_MBSSID_CAM #ifdef CONFIG_MI_WITH_MBSSID_CAM
rtw_mbid_camid_alloc(padapter, adapter_mac_addr(padapter)); rtw_mbid_camid_alloc(padapter, adapter_mac_addr(padapter));
@ -2991,7 +2991,7 @@ static int rtw_inetaddr_notifier_call(struct notifier_block *nb,
switch (action) { switch (action) {
case NETDEV_UP: case NETDEV_UP:
_rtw_memcpy(pmlmeinfo->ip_addr, &ifa->ifa_address, memcpy(pmlmeinfo->ip_addr, &ifa->ifa_address,
RTW_IP_ADDR_LEN); RTW_IP_ADDR_LEN);
RTW_DBG("%s[%s]: up IP: %pI4\n", __func__, RTW_DBG("%s[%s]: up IP: %pI4\n", __func__,
ifa->ifa_label, pmlmeinfo->ip_addr); ifa->ifa_label, pmlmeinfo->ip_addr);
@ -3044,7 +3044,7 @@ static int rtw_inet6addr_notifier_call(struct notifier_block *nb,
#ifdef CONFIG_WOWLAN #ifdef CONFIG_WOWLAN
pwrctl->wowlan_ns_offload_en = _TRUE; pwrctl->wowlan_ns_offload_en = _TRUE;
#endif #endif
_rtw_memcpy(pmlmeinfo->ip6_addr, &inet6_ifa->addr, memcpy(pmlmeinfo->ip6_addr, &inet6_ifa->addr,
RTW_IPv6_ADDR_LEN); RTW_IPv6_ADDR_LEN);
RTW_DBG("%s: up IPv6 addrs: %pI6\n", __func__, RTW_DBG("%s: up IPv6 addrs: %pI6\n", __func__,
pmlmeinfo->ip6_addr); pmlmeinfo->ip6_addr);
@ -3402,7 +3402,7 @@ int _netdev_open(struct net_device *pnetdev)
rtw_mbid_camid_alloc(padapter, adapter_mac_addr(padapter)); rtw_mbid_camid_alloc(padapter, adapter_mac_addr(padapter));
#endif #endif
rtw_init_wifidirect_addrs(padapter, adapter_mac_addr(padapter), adapter_mac_addr(padapter)); rtw_init_wifidirect_addrs(padapter, adapter_mac_addr(padapter), adapter_mac_addr(padapter));
_rtw_memcpy(pnetdev->dev_addr, adapter_mac_addr(padapter), ETH_ALEN); memcpy(pnetdev->dev_addr, adapter_mac_addr(padapter), ETH_ALEN);
#endif /* CONFIG_PLATFORM_INTEL_BYT */ #endif /* CONFIG_PLATFORM_INTEL_BYT */
rtw_clr_surprise_removed(padapter); rtw_clr_surprise_removed(padapter);
@ -4160,7 +4160,7 @@ static int arp_query(unsigned char *haddr, u32 paddr,
if (neighbor_entry != NULL) { if (neighbor_entry != NULL) {
neighbor_entry->used = jiffies; neighbor_entry->used = jiffies;
if (neighbor_entry->nud_state & NUD_VALID) { if (neighbor_entry->nud_state & NUD_VALID) {
_rtw_memcpy(haddr, neighbor_entry->ha, dev->addr_len); memcpy(haddr, neighbor_entry->ha, dev->addr_len);
ret = 1; ret = 1;
} }
neigh_release(neighbor_entry); neigh_release(neighbor_entry);
@ -4213,7 +4213,7 @@ int rtw_gw_addr_query(_adapter *padapter)
pmlmepriv->gw_ip[1] = (gw_addr & 0xff00) >> 8; pmlmepriv->gw_ip[1] = (gw_addr & 0xff00) >> 8;
pmlmepriv->gw_ip[2] = (gw_addr & 0xff0000) >> 16; pmlmepriv->gw_ip[2] = (gw_addr & 0xff0000) >> 16;
pmlmepriv->gw_ip[3] = (gw_addr & 0xff000000) >> 24; pmlmepriv->gw_ip[3] = (gw_addr & 0xff000000) >> 24;
_rtw_memcpy(pmlmepriv->gw_mac_addr, gw_mac, ETH_ALEN); memcpy(pmlmepriv->gw_mac_addr, gw_mac, ETH_ALEN);
RTW_INFO("%s Gateway Mac:\t" MAC_FMT "\n", __FUNCTION__, MAC_ARG(pmlmepriv->gw_mac_addr)); RTW_INFO("%s Gateway Mac:\t" MAC_FMT "\n", __FUNCTION__, MAC_ARG(pmlmepriv->gw_mac_addr));
RTW_INFO("%s Gateway IP:\t" IP_FMT "\n", __FUNCTION__, IP_ARG(pmlmepriv->gw_ip)); RTW_INFO("%s Gateway IP:\t" IP_FMT "\n", __FUNCTION__, IP_ARG(pmlmepriv->gw_ip));
} else } else

View File

@ -96,7 +96,7 @@ int rtw_os_alloc_recvframe(_adapter *padapter, union recv_frame *precvframe, u8
precvframe->u.hdr.rx_end = pkt_copy->data + alloc_sz; precvframe->u.hdr.rx_end = pkt_copy->data + alloc_sz;
skb_reserve(pkt_copy, 8 - ((SIZE_PTR)(pkt_copy->data) & 7)); /* force pkt_copy->data at 8-byte alignment address */ skb_reserve(pkt_copy, 8 - ((SIZE_PTR)(pkt_copy->data) & 7)); /* force pkt_copy->data at 8-byte alignment address */
skb_reserve(pkt_copy, shift_sz);/* force ip_hdr at 8-byte alignment address according to shift_sz. */ skb_reserve(pkt_copy, shift_sz);/* force ip_hdr at 8-byte alignment address according to shift_sz. */
_rtw_memcpy(pkt_copy->data, pdata, skb_len); memcpy(pkt_copy->data, pdata, skb_len);
precvframe->u.hdr.rx_data = precvframe->u.hdr.rx_tail = pkt_copy->data; precvframe->u.hdr.rx_data = precvframe->u.hdr.rx_tail = pkt_copy->data;
} else { } else {
#if 0 #if 0
@ -296,7 +296,7 @@ _pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, const u8 *da, const u8 *s
if (sub_skb) { if (sub_skb) {
skb_reserve(sub_skb, 14); skb_reserve(sub_skb, 14);
data_ptr = (u8 *)skb_put(sub_skb, msdu_len); data_ptr = (u8 *)skb_put(sub_skb, msdu_len);
_rtw_memcpy(data_ptr, msdu, msdu_len); memcpy(data_ptr, msdu, msdu_len);
} else } else
#endif /* CONFIG_SKB_COPY */ #endif /* CONFIG_SKB_COPY */
{ {
@ -320,16 +320,16 @@ _pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, const u8 *da, const u8 *s
) { ) {
/* remove RFC1042 or Bridge-Tunnel encapsulation and replace EtherType */ /* remove RFC1042 or Bridge-Tunnel encapsulation and replace EtherType */
skb_pull(sub_skb, SNAP_SIZE); skb_pull(sub_skb, SNAP_SIZE);
_rtw_memcpy(skb_push(sub_skb, ETH_ALEN), sa, ETH_ALEN); memcpy(skb_push(sub_skb, ETH_ALEN), sa, ETH_ALEN);
_rtw_memcpy(skb_push(sub_skb, ETH_ALEN), da, ETH_ALEN); memcpy(skb_push(sub_skb, ETH_ALEN), da, ETH_ALEN);
} else { } else {
/* Leave Ethernet header part of hdr and full payload */ /* Leave Ethernet header part of hdr and full payload */
u16 len; u16 len;
len = htons(sub_skb->len); len = htons(sub_skb->len);
_rtw_memcpy(skb_push(sub_skb, 2), &len, 2); memcpy(skb_push(sub_skb, 2), &len, 2);
_rtw_memcpy(skb_push(sub_skb, ETH_ALEN), sa, ETH_ALEN); memcpy(skb_push(sub_skb, ETH_ALEN), sa, ETH_ALEN);
_rtw_memcpy(skb_push(sub_skb, ETH_ALEN), da, ETH_ALEN); memcpy(skb_push(sub_skb, ETH_ALEN), da, ETH_ALEN);
} }
return sub_skb; return sub_skb;
@ -590,7 +590,7 @@ void rtw_handle_tkip_mic_err(_adapter *padapter, struct sta_info *sta, u8 bgroup
ev.flags |= IW_MICFAILURE_PAIRWISE; ev.flags |= IW_MICFAILURE_PAIRWISE;
ev.src_addr.sa_family = ARPHRD_ETHER; ev.src_addr.sa_family = ARPHRD_ETHER;
_rtw_memcpy(ev.src_addr.sa_data, sta->cmn.mac_addr, ETH_ALEN); memcpy(ev.src_addr.sa_data, sta->cmn.mac_addr, ETH_ALEN);
memset(&wrqu, 0x00, sizeof(wrqu)); memset(&wrqu, 0x00, sizeof(wrqu));
wrqu.data.length = sizeof(ev); wrqu.data.length = sizeof(ev);

View File

@ -415,7 +415,7 @@ int rtw_android_get_p2p_dev_addr(struct net_device *net, char *command, int tota
int bytes_written = 0; int bytes_written = 0;
/* We use the same address as our HW MAC address */ /* We use the same address as our HW MAC address */
_rtw_memcpy(command, net->dev_addr, ETH_ALEN); memcpy(command, net->dev_addr, ETH_ALEN);
bytes_written = ETH_ALEN; bytes_written = ETH_ALEN;
return bytes_written; return bytes_written;
@ -538,7 +538,7 @@ int rtw_gtk_offload(struct net_device *net, u8 *cmd_ptr)
/* string command length of "GTK_REKEY_OFFLOAD" */ /* string command length of "GTK_REKEY_OFFLOAD" */
cmd_ptr += 18; cmd_ptr += 18;
_rtw_memcpy(psta->kek, cmd_ptr, RTW_KEK_LEN); memcpy(psta->kek, cmd_ptr, RTW_KEK_LEN);
cmd_ptr += RTW_KEK_LEN; cmd_ptr += RTW_KEK_LEN;
/* /*
printk("supplicant KEK: "); printk("supplicant KEK: ");
@ -546,13 +546,13 @@ int rtw_gtk_offload(struct net_device *net, u8 *cmd_ptr)
printk(" %02x ", psta->kek[i]); printk(" %02x ", psta->kek[i]);
printk("\n supplicant KCK: "); printk("\n supplicant KCK: ");
*/ */
_rtw_memcpy(psta->kck, cmd_ptr, RTW_KCK_LEN); memcpy(psta->kck, cmd_ptr, RTW_KCK_LEN);
cmd_ptr += RTW_KCK_LEN; cmd_ptr += RTW_KCK_LEN;
/* /*
for(i=0;i<RTW_KEK_LEN; i++) for(i=0;i<RTW_KEK_LEN; i++)
printk(" %02x ", psta->kck[i]); printk(" %02x ", psta->kck[i]);
*/ */
_rtw_memcpy(psta->replay_ctr, cmd_ptr, RTW_REPLAY_CTR_LEN); memcpy(psta->replay_ctr, cmd_ptr, RTW_REPLAY_CTR_LEN);
psecuritypriv->binstallKCK_KEK = _TRUE; psecuritypriv->binstallKCK_KEK = _TRUE;
/* printk("\nREPLAY_CTR: "); */ /* printk("\nREPLAY_CTR: "); */

View File

@ -1358,7 +1358,7 @@ void rtw_cfgvendor_rssi_monitor_evt(_adapter *padapter) {
data.version = RSSI_MONITOR_EVT_VERSION; data.version = RSSI_MONITOR_EVT_VERSION;
data.cur_rssi = rssi; data.cur_rssi = rssi;
_rtw_memcpy(data.BSSID, pcur_network->network.MacAddress, sizeof(mac_addr)); memcpy(data.BSSID, pcur_network->network.MacAddress, sizeof(mac_addr));
nla_append(skb, sizeof(data), &data); nla_append(skb, sizeof(data), &data);
@ -1476,7 +1476,7 @@ static int rtw_cfgvendor_logger_get_ring_status(struct wiphy *wiphy,
wifi_ring_buffer_status ring_status; wifi_ring_buffer_status ring_status;
_rtw_memcpy(ring_status.name, ring_buf_name, strlen(ring_buf_name)+1); memcpy(ring_status.name, ring_buf_name, strlen(ring_buf_name)+1);
ring_status.ring_id = 1; ring_status.ring_id = 1;
/* Alloc the SKB for vendor_event */ /* Alloc the SKB for vendor_event */
skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy, skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy,
@ -1700,7 +1700,7 @@ static int rtw_cfgvendor_set_country(struct wiphy *wiphy,
type = nla_type(iter); type = nla_type(iter);
switch (type) { switch (type) {
case ANDR_WIFI_ATTRIBUTE_COUNTRY: case ANDR_WIFI_ATTRIBUTE_COUNTRY:
_rtw_memcpy(country_code, nla_data(iter), memcpy(country_code, nla_data(iter),
MIN(nla_len(iter), CNTRY_BUF_SZ)); MIN(nla_len(iter), CNTRY_BUF_SZ));
break; break;
default: default:

View File

@ -106,7 +106,7 @@ int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u16 value, u16 index, void *pda
reqtype = REALTEK_USB_VENQT_READ; reqtype = REALTEK_USB_VENQT_READ;
} else { } else {
reqtype = REALTEK_USB_VENQT_WRITE; reqtype = REALTEK_USB_VENQT_WRITE;
_rtw_memcpy(pIo_buf, pdata, len); memcpy(pIo_buf, pdata, len);
} }
status = usb_control_msg(udev, pipe, REALTEK_USB_VENQT_CMD_REQ, reqtype, value, index, pIo_buf, len, RTW_USB_CONTROL_MSG_TIMEOUT); status = usb_control_msg(udev, pipe, REALTEK_USB_VENQT_CMD_REQ, reqtype, value, index, pIo_buf, len, RTW_USB_CONTROL_MSG_TIMEOUT);
@ -115,7 +115,7 @@ int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u16 value, u16 index, void *pda
rtw_reset_continual_io_error(pdvobjpriv); rtw_reset_continual_io_error(pdvobjpriv);
if (requesttype == VENDOR_READ) { if (requesttype == VENDOR_READ) {
/* For Control read transfer, we have to copy the read data from pIo_buf to pdata. */ /* For Control read transfer, we have to copy the read data from pIo_buf to pdata. */
_rtw_memcpy(pdata, pIo_buf, len); memcpy(pdata, pIo_buf, len);
} }
} else { /* error cases */ } else { /* error cases */
RTW_INFO("reg 0x%x, usb %s %u fail, status:%d value=0x%x, vendorreq_times:%d\n" RTW_INFO("reg 0x%x, usb %s %u fail, status:%d value=0x%x, vendorreq_times:%d\n"
@ -136,7 +136,7 @@ int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u16 value, u16 index, void *pda
if (status > 0) { if (status > 0) {
if (requesttype == 0x01) { if (requesttype == 0x01) {
/* For Control read transfer, we have to copy the read data from pIo_buf to pdata. */ /* For Control read transfer, we have to copy the read data from pIo_buf to pdata. */
_rtw_memcpy(pdata, pIo_buf, len); memcpy(pdata, pIo_buf, len);
} }
} }
} }
@ -250,7 +250,7 @@ int _usbctrl_vendorreq_async_write(struct usb_device *udev, u8 request,
dr->wIndex = cpu_to_le16(index); dr->wIndex = cpu_to_le16(index);
dr->wLength = cpu_to_le16(len); dr->wLength = cpu_to_le16(len);
_rtw_memcpy(buf, pdata, len); memcpy(buf, pdata, len);
usb_fill_control_urb(urb, udev, pipe, (unsigned char *)dr, buf, len, usb_fill_control_urb(urb, udev, pipe, (unsigned char *)dr, buf, len,
_usbctrl_vendorreq_async_callback, buf); _usbctrl_vendorreq_async_callback, buf);

View File

@ -421,7 +421,7 @@ int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb)
newskb = rtw_skb_copy(skb); newskb = rtw_skb_copy(skb);
if (newskb) { if (newskb) {
_rtw_memcpy(newskb->data, psta->cmn.mac_addr, ETH_ALEN); memcpy(newskb->data, psta->cmn.mac_addr, ETH_ALEN);
res = rtw_xmit(padapter, &newskb); res = rtw_xmit(padapter, &newskb);
if (res < 0) { if (res < 0) {
DBG_COUNTER(padapter->tx_logs.os_tx_m2u_entry_err_xmit); DBG_COUNTER(padapter->tx_logs.os_tx_m2u_entry_err_xmit);

View File

@ -792,23 +792,6 @@ inline u32 rtw_os_pkt_len(_pkt *pkt)
#endif #endif
} }
void _rtw_memcpy(void *dst, const void *src, u32 sz)
{
#if defined(PLATFORM_LINUX) || defined (PLATFORM_FREEBSD)
memcpy(dst, src, sz);
#endif
#ifdef PLATFORM_WINDOWS
NdisMoveMemory(dst, src, sz);
#endif
}
inline void _rtw_memmove(void *dst, const void *src, u32 sz) inline void _rtw_memmove(void *dst, const void *src, u32 sz)
{ {
#if defined(PLATFORM_LINUX) #if defined(PLATFORM_LINUX)
@ -2028,7 +2011,7 @@ int rtw_change_ifname(_adapter *padapter, const char *ifname)
rtw_init_netdev_name(pnetdev, ifname); rtw_init_netdev_name(pnetdev, ifname);
_rtw_memcpy(pnetdev->dev_addr, adapter_mac_addr(padapter), ETH_ALEN); memcpy(pnetdev->dev_addr, adapter_mac_addr(padapter), ETH_ALEN);
if (rtnl_lock_needed) if (rtnl_lock_needed)
ret = register_netdev(pnetdev); ret = register_netdev(pnetdev);
@ -2181,7 +2164,7 @@ void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len)
dup = rtw_malloc(src_len); dup = rtw_malloc(src_len);
if (dup) { if (dup) {
dup_len = src_len; dup_len = src_len;
_rtw_memcpy(dup, src, dup_len); memcpy(dup, src, dup_len);
} }
keep_ori: keep_ori:
@ -2343,7 +2326,7 @@ int map_readN(const struct map_t *map, u16 offset, u16 len, u8 *buf)
c_len = seg->sa + seg->len - offset; c_len = seg->sa + seg->len - offset;
} }
_rtw_memcpy(c_dst, c_src, c_len); memcpy(c_dst, c_src, c_len);
} }
exit: exit:
@ -2413,7 +2396,7 @@ int rtw_blacklist_add(_queue *blist, const u8 *addr, u32 timeout_ms)
if (exist == _FALSE) { if (exist == _FALSE) {
ent = rtw_malloc(sizeof(struct blacklist_ent)); ent = rtw_malloc(sizeof(struct blacklist_ent));
if (ent) { if (ent) {
_rtw_memcpy(ent->addr, addr, ETH_ALEN); memcpy(ent->addr, addr, ETH_ALEN);
ent->exp_time = rtw_get_current_time() ent->exp_time = rtw_get_current_time()
+ rtw_ms_to_systime(timeout_ms); + rtw_ms_to_systime(timeout_ms);
rtw_list_insert_tail(&ent->list, head); rtw_list_insert_tail(&ent->list, head);