diff --git a/core/efuse/rtw_efuse.c b/core/efuse/rtw_efuse.c index 298e26b..4c0043a 100644 --- a/core/efuse/rtw_efuse.c +++ b/core/efuse/rtw_efuse.c @@ -984,7 +984,7 @@ u8 rtw_efuse_access(PADAPTER adapter, u8 write, u16 addr, u16 cnts, u8 *data) return _FAIL; } - _rtw_memcpy(data, efuse + addr, cnts); + memcpy(data, efuse + addr, cnts); rtw_mfree(efuse, size); } else { 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); - _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_mfree(efuse, size); @@ -1092,7 +1092,7 @@ u8 rtw_efuse_map_read(PADAPTER adapter, u16 addr, u16 cnts, u8 *data) goto exit; } - _rtw_memcpy(data, efuse + addr, cnts); + memcpy(data, efuse + addr, cnts); rtw_mfree(efuse, size); } else { 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; } - _rtw_memcpy(efuse + addr, data, cnts); + memcpy(efuse + addr, data, cnts); if (adapter->registrypriv.boffefusemask == 0) { RTW_INFO("Use mask Array Len: %d\n", mask_len); if (mask_len != 0) { if (adapter->registrypriv.bFileMaskEfuse == _TRUE) - _rtw_memcpy(mask_buf, maskfileBuffer, mask_len); + memcpy(mask_buf, maskfileBuffer, mask_len); else 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) { word_en = 0xF; 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++) { if (data[idx] != map[addr + idx]) { 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) goto exit; - _rtw_memcpy(efuse , map, mapLen); - _rtw_memcpy(efuse + addr, data, cnts); + memcpy(efuse , map, mapLen); + memcpy(efuse + addr, data, cnts); if (padapter->registrypriv.boffefusemask == 0) { 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) { word_en = 0xF; 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++) { if (efuse[addr + idx] != map[addr + idx]) { 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) { word_en = 0xF; 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++) { if (data[idx] != map[addr + idx]) { 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_memcpy(buf, map, map_size); + memcpy(buf, map, map_size); 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); #ifdef CONFIG_RTW_DEBUG diff --git a/core/mesh/rtw_mesh.c b/core/mesh/rtw_mesh.c index 1c12a6c..1807993 100644 --- a/core/mesh/rtw_mesh.c +++ b/core/mesh/rtw_mesh.c @@ -102,7 +102,7 @@ inline u8 *rtw_set_ie_mpm(u8 *buf, u32 *buf_len } if (chosen_pmk) { - _rtw_memcpy(pos, chosen_pmk, 16); + memcpy(pos, chosen_pmk, 16); pos += 16; } @@ -854,7 +854,7 @@ flush_add: for (i = 0; i < flush_num; 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); 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) 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 , 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) 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 , 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; if (*(ampe_buf + 1) >= 68) { - _rtw_memcpy(plink->sel_pcs, ampe_buf + 2, 4); - _rtw_memcpy(plink->l_nonce, ampe_buf + 6, 32); - _rtw_memcpy(plink->p_nonce, ampe_buf + 38, 32); + memcpy(plink->sel_pcs, ampe_buf + 2, 4); + memcpy(plink->l_nonce, ampe_buf + 6, 32); + memcpy(plink->p_nonce, ampe_buf + 38, 32); } } #endif @@ -1349,7 +1349,7 @@ static int rtw_mpm_tx_ies_sync_bss(_adapter *adapter, struct mesh_plink_ent *pli } /* 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_flen = new_len; 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" , 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); rtw_mesh_expire_peer(stapriv->padapter, sta_addr); @@ -1697,7 +1697,7 @@ bypass_sync_bss: plink->plid = mpm_info.llid_v; plink->peer_aid = mpm_info.aid_v; 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 else { @@ -1724,7 +1724,7 @@ bypass_sync_bss: ies = rtw_zmalloc(ies_len); 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) { plink->rx_conf_ies = ies; 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) { - _rtw_memcpy(ent->addr, hwaddr, ETH_ALEN); + memcpy(ent->addr, hwaddr, ETH_ALEN); ent->valid = _TRUE; #ifdef CONFIG_RTW_MESH_AEK 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); ent = _rtw_mesh_plink_get(adapter, hwaddr); if (ent) { - _rtw_memcpy(ent->aek, aek, 32); + memcpy(ent->aek, aek, 32); ent->aek_valid = 1; } _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; whdr = (struct rtw_ieee80211_hdr *)frame; - _rtw_memcpy(whdr->addr1, adapter_mac_addr(adapter), ETH_ALEN); - _rtw_memcpy(whdr->addr2, plink->addr, ETH_ALEN); - _rtw_memcpy(whdr->addr3, adapter_mac_addr(adapter), ETH_ALEN); + memcpy(whdr->addr1, adapter_mac_addr(adapter), ETH_ALEN); + memcpy(whdr->addr2, plink->addr, ETH_ALEN); + memcpy(whdr->addr3, adapter_mac_addr(adapter), ETH_ALEN); 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[1] = 68; - _rtw_memcpy(ampe_buf + 2, plink->sel_pcs, 4); - _rtw_memcpy(ampe_buf + 6, plink->p_nonce, 32); - _rtw_memcpy(ampe_buf + 38, plink->l_nonce, 32); + memcpy(ampe_buf + 2, plink->sel_pcs, 4); + memcpy(ampe_buf + 6, plink->p_nonce, 32); + memcpy(ampe_buf + 38, plink->l_nonce, 32); enc_ret = rtw_mpm_ampe_enc(adapter, plink , 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->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]); return 0; } @@ -3224,7 +3224,7 @@ int rtw_mesh_nexthop_lookup(_adapter *adapter, next_hop = rtw_rcu_dereference(mpath->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; } @@ -3296,12 +3296,12 @@ static bool rtw_mesh_data_bmc_to_uc(_adapter *adapter attrib->mb2u = 1; attrib->mseq = *b2u_mseq; attrib->mfwd_ttl = ori_ta ? mfwd_ttl : 0; - _rtw_memcpy(attrib->ra, sta->cmn.mac_addr, ETH_ALEN); - _rtw_memcpy(attrib->ta, adapter_mac_addr(adapter), ETH_ALEN); - _rtw_memcpy(attrib->mda, mda, ETH_ALEN); - _rtw_memcpy(attrib->msa, msa, ETH_ALEN); - _rtw_memcpy(attrib->dst, da, ETH_ALEN); - _rtw_memcpy(attrib->src, sa, ETH_ALEN); + memcpy(attrib->ra, sta->cmn.mac_addr, ETH_ALEN); + memcpy(attrib->ta, adapter_mac_addr(adapter), ETH_ALEN); + memcpy(attrib->mda, mda, ETH_ALEN); + memcpy(attrib->msa, msa, ETH_ALEN); + memcpy(attrib->dst, da, ETH_ALEN); + memcpy(attrib->src, sa, ETH_ALEN); attrib->mesh_frame_mode = ae_need ? MESH_UCAST_PX_DATA : MESH_UCAST_DATA; rtw_list_insert_tail(&b2uframe->list, b2u_list); @@ -3326,7 +3326,7 @@ int rtw_mesh_addr_resolve(_adapter *adapter, struct xmit_frame *xframe, _pkt *pk struct ethhdr etherhdr; struct pkt_attrib *attrib; struct rtw_mesh_path *mpath = NULL, *mppath = NULL; - u8 is_da_mcast; + bool is_da_mcast; u8 ae_need; #if CONFIG_RTW_MESH_DATA_BMC_TO_UC bool bmc_need = _TRUE; @@ -3346,7 +3346,7 @@ int rtw_mesh_addr_resolve(_adapter *adapter, struct xmit_frame *xframe, _pkt *pk _rtw_init_listhead(b2u_list); #endif - is_da_mcast = IS_MCAST(etherhdr.h_dest); + is_da_mcast = is_multicast_ether_addr(etherhdr.h_dest); if (!is_da_mcast) { struct sta_info *next_hop; bool mpp_lookup = 1; @@ -3402,18 +3402,18 @@ int rtw_mesh_addr_resolve(_adapter *adapter, struct xmit_frame *xframe, _pkt *pk #endif attrib->mfwd_ttl = 0; - _rtw_memcpy(attrib->dst, etherhdr.h_dest, ETH_ALEN); - _rtw_memcpy(attrib->src, etherhdr.h_source, ETH_ALEN); - _rtw_memcpy(attrib->ta, adapter_mac_addr(adapter), ETH_ALEN); + memcpy(attrib->dst, etherhdr.h_dest, ETH_ALEN); + memcpy(attrib->src, etherhdr.h_source, ETH_ALEN); + memcpy(attrib->ta, adapter_mac_addr(adapter), ETH_ALEN); if (is_da_mcast) { attrib->mesh_frame_mode = ae_need ? MESH_BMCAST_PX_DATA : MESH_BMCAST_DATA; - _rtw_memcpy(attrib->ra, attrib->dst, ETH_ALEN); - _rtw_memcpy(attrib->msa, adapter_mac_addr(adapter), ETH_ALEN); + memcpy(attrib->ra, attrib->dst, ETH_ALEN); + memcpy(attrib->msa, adapter_mac_addr(adapter), ETH_ALEN); } else { 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); - _rtw_memcpy(attrib->msa, adapter_mac_addr(adapter), ETH_ALEN); + memcpy(attrib->mda, (mppath && ae_need) ? mppath->mpp : attrib->dst, ETH_ALEN); + memcpy(attrib->msa, adapter_mac_addr(adapter), ETH_ALEN); /* RA needs to be resolved */ 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; case MESH_UCAST_PX_DATA: mctrl->flags |= MESH_FLAGS_AE_A5_A6; - _rtw_memcpy(mctrl->eaddr1, attrib->dst, ETH_ALEN); - _rtw_memcpy(mctrl->eaddr2, attrib->src, ETH_ALEN); + memcpy(mctrl->eaddr1, attrib->dst, ETH_ALEN); + memcpy(mctrl->eaddr2, attrib->src, ETH_ALEN); break; case MESH_BMCAST_PX_DATA: mctrl->flags |= MESH_FLAGS_AE_A4; - _rtw_memcpy(mctrl->eaddr1, attrib->src, ETH_ALEN); + memcpy(mctrl->eaddr1, attrib->src, ETH_ALEN); break; case MESH_MHOP_UCAST_ACT: /* 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] */ SetToDs(fctrl); SetFrDs(fctrl); - _rtw_memcpy(whdr->addr1, attrib->ra, ETH_ALEN); - _rtw_memcpy(whdr->addr2, attrib->ta, ETH_ALEN); - _rtw_memcpy(whdr->addr3, attrib->mda, ETH_ALEN); - _rtw_memcpy(whdr->addr4, attrib->msa, ETH_ALEN); + memcpy(whdr->addr1, attrib->ra, ETH_ALEN); + memcpy(whdr->addr2, attrib->ta, ETH_ALEN); + memcpy(whdr->addr3, attrib->mda, ETH_ALEN); + memcpy(whdr->addr4, attrib->msa, ETH_ALEN); break; case MESH_BMCAST_DATA: /* 0, 1, RA(DA), TA, mSA(SA) */ case MESH_BMCAST_PX_DATA: /* 0, 1, RA(DA), TA, mSA, [SA] */ SetFrDs(fctrl); - _rtw_memcpy(whdr->addr1, attrib->ra, ETH_ALEN); - _rtw_memcpy(whdr->addr2, attrib->ta, ETH_ALEN); - _rtw_memcpy(whdr->addr3, attrib->msa, ETH_ALEN); + memcpy(whdr->addr1, attrib->ra, ETH_ALEN); + memcpy(whdr->addr2, attrib->ta, ETH_ALEN); + memcpy(whdr->addr3, attrib->msa, ETH_ALEN); break; case MESH_MHOP_UCAST_ACT: /* TBD */ @@ -3560,37 +3560,37 @@ int rtw_mesh_rx_data_validate_hdr(_adapter *adapter, union recv_frame *rframe, s switch (rattrib->to_fr_ds) { case 1: - if (!IS_MCAST(GetAddr1Ptr(whdr))) + if (!is_multicast_ether_addr(GetAddr1Ptr(whdr))) goto exit; *sta = rtw_get_stainfo(stapriv, get_addr2_ptr(whdr)); if (*sta == NULL) { ret = _SUCCESS; /* return _SUCCESS to drop at sta checking */ goto exit; } - _rtw_memcpy(rattrib->ra, GetAddr1Ptr(whdr), ETH_ALEN); - _rtw_memcpy(rattrib->ta, get_addr2_ptr(whdr), ETH_ALEN); - _rtw_memcpy(rattrib->mda, GetAddr1Ptr(whdr), ETH_ALEN); - _rtw_memcpy(rattrib->msa, GetAddr3Ptr(whdr), ETH_ALEN); /* may change after checking AMSDU subframe header */ - _rtw_memcpy(rattrib->dst, GetAddr1Ptr(whdr), ETH_ALEN); - _rtw_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->ra, GetAddr1Ptr(whdr), ETH_ALEN); + memcpy(rattrib->ta, get_addr2_ptr(whdr), ETH_ALEN); + memcpy(rattrib->mda, GetAddr1Ptr(whdr), ETH_ALEN); + memcpy(rattrib->msa, GetAddr3Ptr(whdr), ETH_ALEN); /* may change after checking AMSDU subframe header */ + memcpy(rattrib->dst, GetAddr1Ptr(whdr), ETH_ALEN); + memcpy(rattrib->src, GetAddr3Ptr(whdr), ETH_ALEN); /* may change after checking mesh ctrl field */ + memcpy(rattrib->bssid, get_addr2_ptr(whdr), ETH_ALEN); is_ra_bmc = 1; break; case 3: - if (IS_MCAST(GetAddr1Ptr(whdr))) + if (is_multicast_ether_addr(GetAddr1Ptr(whdr))) goto exit; *sta = rtw_get_stainfo(stapriv, get_addr2_ptr(whdr)); if (*sta == NULL) { ret = _SUCCESS; /* return _SUCCESS to drop at sta checking */ goto exit; } - _rtw_memcpy(rattrib->ra, GetAddr1Ptr(whdr), ETH_ALEN); - _rtw_memcpy(rattrib->ta, get_addr2_ptr(whdr), ETH_ALEN); - _rtw_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 */ - _rtw_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 */ - _rtw_memcpy(rattrib->bssid, get_addr2_ptr(whdr), ETH_ALEN); + memcpy(rattrib->ra, GetAddr1Ptr(whdr), ETH_ALEN); + memcpy(rattrib->ta, get_addr2_ptr(whdr), ETH_ALEN); + memcpy(rattrib->mda, GetAddr3Ptr(whdr), ETH_ALEN); /* may change after checking AMSDU subframe header */ + memcpy(rattrib->msa, GetAddr4Ptr(whdr), ETH_ALEN); /* may change after checking AMSDU subframe header */ + memcpy(rattrib->dst, GetAddr3Ptr(whdr), ETH_ALEN); /* may change after checking mesh ctrl field */ + memcpy(rattrib->src, GetAddr4Ptr(whdr), ETH_ALEN); /* may change after checking mesh ctrl field */ + memcpy(rattrib->bssid, get_addr2_ptr(whdr), ETH_ALEN); a4_shift = ETH_ALEN; break; default: @@ -3695,8 +3695,8 @@ inline int rtw_mesh_rx_validate_mctrl_non_amsdu(_adapter *adapter, union recv_fr , &da, &sa); if (ret == _SUCCESS) { - _rtw_memcpy(rattrib->dst, da, ETH_ALEN); - _rtw_memcpy(rattrib->src, sa, ETH_ALEN); + memcpy(rattrib->dst, da, ETH_ALEN); + memcpy(rattrib->src, sa, ETH_ALEN); } return ret; @@ -3764,7 +3764,7 @@ int rtw_mesh_rx_msdu_act_check(union recv_frame *rframe struct rtw_mesh_info *minfo = &adapter->mesh_info; struct rx_pkt_attrib *rattrib = &rframe->u.hdr.attrib; struct rtw_mesh_path *mppath; - u8 is_mda_bmc = IS_MCAST(mda); + bool is_mda_bmc = is_multicast_ether_addr(mda); u8 is_mda_self = !is_mda_bmc && _rtw_memcmp(mda, adapter_mac_addr(adapter), ETH_ALEN); struct xmit_frame *xframe; struct pkt_attrib *xattrib; @@ -3800,7 +3800,7 @@ int rtw_mesh_rx_msdu_act_check(union recv_frame *rframe else { enter_critical_bh(&mppath->state_lock); 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(); 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(); goto exit; } - _rtw_memcpy(fwd_mpp, mppath->mpp, ETH_ALEN); + memcpy(fwd_mpp, mppath->mpp, ETH_ALEN); mda = fwd_mpp; msa = adapter_mac_addr(adapter); rtw_rcu_read_unlock(); @@ -4031,18 +4031,18 @@ fwd_chk: #endif xattrib->mfwd_ttl = mctrl->ttl - 1; xattrib->mseq = fwd_mseq; - _rtw_memcpy(xattrib->dst, da, ETH_ALEN); - _rtw_memcpy(xattrib->src, sa, ETH_ALEN); - _rtw_memcpy(xattrib->mda, mda, ETH_ALEN); - _rtw_memcpy(xattrib->msa, msa, ETH_ALEN); - _rtw_memcpy(xattrib->ta, adapter_mac_addr(adapter), ETH_ALEN); + memcpy(xattrib->dst, da, ETH_ALEN); + memcpy(xattrib->src, sa, ETH_ALEN); + memcpy(xattrib->mda, mda, ETH_ALEN); + memcpy(xattrib->msa, msa, ETH_ALEN); + memcpy(xattrib->ta, adapter_mac_addr(adapter), ETH_ALEN); if (is_mda_bmc) { 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 { 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; diff --git a/core/mesh/rtw_mesh_hwmp.c b/core/mesh/rtw_mesh_hwmp.c index c8bee30..8d76622 100644 --- a/core/mesh/rtw_mesh_hwmp.c +++ b/core/mesh/rtw_mesh_hwmp.c @@ -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) = 0; - _rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, adapter_mac_addr(adapter), ETH_ALEN); + memcpy(pwlanhdr->addr1, da, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, adapter_mac_addr(adapter), ETH_ALEN); SetSeqNum(pwlanhdr, 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++ = ttl; if (mpath_action == RTW_MPATH_PREP) { - _rtw_memcpy(pos, target, ETH_ALEN); + memcpy(pos, target, ETH_ALEN); pos += ETH_ALEN; *(u32 *)pos = cpu_to_le32(target_sn); 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); pos += 4; } - _rtw_memcpy(pos, originator_addr, ETH_ALEN); + memcpy(pos, originator_addr, ETH_ALEN); pos += ETH_ALEN; *(u32 *)pos = cpu_to_le32(originator_sn); 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) { *pos++ = 1; /* support only 1 destination now */ *pos++ = target_flags; - _rtw_memcpy(pos, target, ETH_ALEN); + memcpy(pos, target, ETH_ALEN); pos += ETH_ALEN; *(u32 *)pos = cpu_to_le32(target_sn); pos += 4; } else if (mpath_action == RTW_MPATH_PREP) { - _rtw_memcpy(pos, originator_addr, ETH_ALEN); + memcpy(pos, originator_addr, ETH_ALEN); pos += ETH_ALEN; *(u32 *)pos = cpu_to_le32(originator_sn); pos += 4; @@ -352,9 +352,9 @@ int rtw_mesh_path_error_tx(_adapter *adapter, fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, adapter_mac_addr(adapter), ETH_ALEN); + memcpy(pwlanhdr->addr1, ra, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, adapter_mac_addr(adapter), ETH_ALEN); SetSeqNum(pwlanhdr, 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 | */ *pos = 0; pos++; - _rtw_memcpy(pos, target, ETH_ALEN); + memcpy(pos, target, ETH_ALEN); pos += ETH_ALEN; *(u32 *)pos = cpu_to_le32(target_sn); pos += 4; @@ -862,7 +862,7 @@ static void rtw_hwmp_prep_frame_process(_adapter *adapter, exit_critical_bh(&path->state_lock); 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); --ttl; 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", MAC_ARG(mgmt->addr2), 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); 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; /* Recording RANNs sender address to send individually * 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) { path->gate_ann_int = interval; @@ -1159,7 +1159,7 @@ static u32 rtw_hwmp_route_info_get(_adapter *adapter, rtw_mesh_path_activate(path); #ifdef CONFIG_RTW_MESH_ADD_ROOT_CHK if (path->is_root && (action == RTW_MPATH_PREP)) { - _rtw_memcpy(path->rann_snd_addr, + memcpy(path->rann_snd_addr, mgmt->addr2, ETH_ALEN); path->rann_metric = new_metric; } @@ -1309,7 +1309,7 @@ void rtw_mesh_queue_preq(struct rtw_mesh_path *path, u8 flags) return; } - _rtw_memcpy(preq_node->dst, path->dst, ETH_ALEN); + memcpy(preq_node->dst, path->dst, ETH_ALEN); preq_node->flags = flags; path->flags |= RTW_MESH_PATH_REQ_QUEUED; diff --git a/core/mesh/rtw_mesh_pathtbl.c b/core/mesh/rtw_mesh_pathtbl.c index 80fd36f..194ec42 100644 --- a/core/mesh/rtw_mesh_pathtbl.c +++ b/core/mesh/rtw_mesh_pathtbl.c @@ -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) { xframe = LIST_CONTAINOR(list, struct xmit_frame, 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); @@ -135,9 +135,9 @@ static void rtw_prepare_for_gate(struct xmit_frame *xframe, char *dst_addr, /* update next hop */ rtw_rcu_read_lock(); 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_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) 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); new_mpath->is_root = false; new_mpath->adapter = adapter; @@ -640,7 +640,7 @@ int rtw_mpp_path_add(_adapter *adapter, if (!new_mpath) 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, &new_mpath->rhash, rtw_mesh_rht_params); @@ -663,8 +663,8 @@ void dump_mpp(void *sel, _adapter *adapter) mpath = rtw_mpp_path_lookup_by_idx(adapter, idx); if (mpath) { - _rtw_memcpy(dst, mpath->dst, ETH_ALEN); - _rtw_memcpy(mpp, mpath->mpp, ETH_ALEN); + memcpy(dst, mpath->dst, ETH_ALEN); + memcpy(mpp, mpath->mpp, ETH_ALEN); } rtw_rcu_read_unlock(); diff --git a/core/rtw_ap.c b/core/rtw_ap.c index 263a6ac..93bdb94 100644 --- a/core/rtw_ap.c +++ b/core/rtw_ap.c @@ -75,7 +75,7 @@ u8 rtw_set_tim_ie(u8 dtim_cnt, u8 dtim_period *p++ = dtim_cnt; *p++ = dtim_period; *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 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) { pbackup_remainder_ie = rtw_malloc(remainder_ielen); 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 */ @@ -153,7 +153,7 @@ static void update_BCNTIM(_adapter *padapter) /*copy 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); } @@ -210,18 +210,18 @@ void rtw_add_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *d if (remainder_ielen > 0) { pbackup_remainder_ie = rtw_malloc(remainder_ielen); 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++ = len; - _rtw_memcpy(dst_ie, data, len); + memcpy(dst_ie, data, len); dst_ie += len; /* copy 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); } @@ -253,12 +253,12 @@ void rtw_remove_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index) if (remainder_ielen > 0) { pbackup_remainder_ie = rtw_malloc(remainder_ielen); 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 */ 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); } @@ -723,7 +723,7 @@ void expire_timeout_chk(_adapter *padapter) continue; 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" , 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->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 /* 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->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 - _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_80211N_HT */ @@ -1647,7 +1647,7 @@ void start_bss_network(_adapter *padapter, struct createbss_parm *parm) else rtw_warn_on(1); req_ch = 0; - _rtw_memcpy(pnetwork_mlmeext, pnetwork, pnetwork->Length); + memcpy(pnetwork_mlmeext, pnetwork, pnetwork->Length); } bcn_interval = (u16)pnetwork->Configuration.BeaconPeriod; @@ -1714,7 +1714,7 @@ chbw_decision: continue; /* 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.Length); @@ -1935,7 +1935,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len) 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 @@ -1951,7 +1951,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len) 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 */ 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_)); if (p && ie_len > 0) { 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; #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; #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_)); if (p && ie_len > 0) { 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; } } @@ -2008,7 +2008,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len) pbss_network->IELength=pbss_network->IELength - ret_rm; } 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; } @@ -2021,7 +2021,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len) _EXT_SUPPORTEDRATES_IE_,NULL,0); RTW_DBG("%s, remove_ie of ext_supported rates =%d\n", __FUNCTION__, ret_rm); } else { - _rtw_memcpy(supportRate + supportRateNum, p + 2, ie_len); + memcpy(supportRate + supportRateNum, p + 2, 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); 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 */ { @@ -2346,7 +2346,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len) } #endif /* CONFIG_BEAMFORMING */ - _rtw_memcpy(&pmlmepriv->htpriv.ht_cap, p + 2, ie_len); + memcpy(&pmlmepriv->htpriv.ht_cap, p + 2, ie_len); if (0) { 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) { _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; 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_); - _rtw_memcpy(param->addr, addr, ETH_ALEN); + memcpy(param->addr, addr, ETH_ALEN); param->algorithm = alg; param->keyid = keyid; - _rtw_memcpy(param->key, key, 16); + memcpy(param->key, key, 16); param->gk = gk; 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; } - _rtw_memcpy(&(psetkeyparm->key[0]), key, keylen); + memcpy(&(psetkeyparm->key[0]), key, keylen); pcmd->cmdcode = _SetKey_CMD_; pcmd->parmbuf = (u8 *)psetkeyparm; @@ -3191,16 +3191,16 @@ static void update_bcn_wps_ie(_adapter *padapter) if (remainder_ielen > 0) { pbackup_remainder_ie = rtw_malloc(remainder_ielen); 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 */ 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); if (pbackup_remainder_ie) - _rtw_memcpy(pwps_ie, pbackup_remainder_ie, remainder_ielen); + memcpy(pwps_ie, pbackup_remainder_ie, remainder_ielen); /* update IELength */ pnetwork->IELength = wps_offset + (wps_ielen + 2) + remainder_ielen; @@ -3226,11 +3226,6 @@ static void update_bcn_wps_ie(_adapter *padapter) #endif } -static void update_bcn_p2p_ie(_adapter *padapter) -{ - -} - static void update_bcn_vendor_spec_ie(_adapter *padapter, u8 *oui) { RTW_INFO("%s\n", __FUNCTION__); @@ -3241,9 +3236,9 @@ static void update_bcn_vendor_spec_ie(_adapter *padapter, u8 *oui) update_bcn_wmm_ie(padapter); else if (_rtw_memcmp(WPS_OUI, oui, 4)) update_bcn_wps_ie(padapter); - else if (_rtw_memcmp(P2P_OUI, oui, 4)) - update_bcn_p2p_ie(padapter); - else + else if (_rtw_memcmp(P2P_OUI, oui, 4)) { + // update_bcn_p2p_ie(padapter); + } else RTW_INFO("unknown OUI type!\n"); @@ -3614,7 +3609,7 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta) #if 0 - if (!(psta->capability & WLAN_CAPABILITY_SHORT_SLOT) && + if (!(psta->capability & WLAN_CAPABILITY_SHORT_SLOT_TIME) && !psta->no_short_slot_time_set) { psta->no_short_slot_time_set = 1; pmlmepriv->num_sta_no_short_slot_time++; @@ -3624,7 +3619,7 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta) } #endif - if (!(psta->capability & WLAN_CAPABILITY_SHORT_SLOT)) { + if (!(psta->capability & WLAN_CAPABILITY_SHORT_SLOT_TIME)) { if (!psta->no_short_slot_time_set) { psta->no_short_slot_time_set = 1; @@ -3978,7 +3973,7 @@ int rtw_sta_flush(_adapter *padapter, bool enqueue) u8 sta_addr[ETH_ALEN]; 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); #ifdef CONFIG_RTW_MESH @@ -5160,7 +5155,7 @@ u16 rtw_ap_parse_sta_supported_rates(_adapter *adapter, struct sta_info *sta, u8 goto exit; } - _rtw_memcpy(sta->bssrateset, rate_set, rate_num); + memcpy(sta->bssrateset, rate_set, rate_num); sta->bssratelen = rate_num; if (MLME_IS_AP(adapter)) { @@ -5215,10 +5210,10 @@ u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct status = WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION; if (!sta->wpa2_group_cipher) - status = WLAN_STATUS_GROUP_CIPHER_NOT_VALID; + status = WLAN_STATUS_INVALID_GROUP_CIPHER; if (!sta->wpa2_pairwise_cipher) - status = WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID; + status = WLAN_STATUS_INVALID_PAIRWISE_CIPHER; } else status = WLAN_STATUS_INVALID_IE; @@ -5235,10 +5230,10 @@ u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct sta->wpa_pairwise_cipher = pairwise_cipher & sec->wpa_pairwise_cipher; if (!sta->wpa_group_cipher) - status = WLAN_STATUS_GROUP_CIPHER_NOT_VALID; + status = WLAN_STATUS_INVALID_GROUP_CIPHER; if (!sta->wpa_pairwise_cipher) - status = WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID; + status = WLAN_STATUS_INVALID_PAIRWISE_CIPHER; } else status = WLAN_STATUS_INVALID_IE; @@ -5339,7 +5334,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); if (copy_len > 0) - _rtw_memcpy(sta->wpa_ie, wpa_ie - 2, copy_len); + memcpy(sta->wpa_ie, wpa_ie - 2, copy_len); } exit: @@ -5426,10 +5421,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)) { sta->flags |= WLAN_STA_HT; 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) { - _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; } } @@ -5452,15 +5447,15 @@ void rtw_ap_parse_sta_vht_ie(_adapter *adapter, struct sta_info *sta, struct rtw memset(&sta->vhtpriv, 0, sizeof(struct vht_priv)); if (elems->vht_capabilities && elems->vht_capabilities_len == VHT_CAP_IE_LEN) { 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) { - _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; } 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; } } diff --git a/core/rtw_beamforming.c b/core/rtw_beamforming.c index 35543ef..bccef9f 100644 --- a/core/rtw_beamforming.c +++ b/core/rtw_beamforming.c @@ -235,11 +235,11 @@ static u8 _send_ht_ndpa_packet(PADAPTER adapter, u8 *ra, enum channel_width bw) set_duration(pframe, duration); /* DA */ - _rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN); + memcpy(pwlanhdr->addr1, ra, ETH_ALEN); /* SA */ - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN); /* 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 */ 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 * OUI: 0x00E04C */ - _rtw_memcpy(pframe + 28, ActionHdr, 4); + memcpy(pframe + 28, ActionHdr, 4); attrib->pktlen = 32; 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); /* RA */ - _rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN); + memcpy(pwlanhdr->addr1, ra, ETH_ALEN); /* 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 */ 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; else info->sounding_sequence++; - _rtw_memcpy(pframe + 16, &sequence, 1); + memcpy(pframe + 16, &sequence, 1); /* 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; /* "Nc Index" reserved if the Feedback Type field indicates SU */ sta_info.nc_index = 0; - _rtw_memcpy(pframe + 17, (u8 *)&sta_info, 2); + memcpy(pframe + 17, (u8 *)&sta_info, 2); attrib->pktlen = 19; 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); /* RA */ - _rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN); + memcpy(pwlanhdr->addr1, ra, ETH_ALEN); /* 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 */ 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; else info->sounding_sequence++; - _rtw_memcpy(pframe + 16, &sequence, 1); + memcpy(pframe + 16, &sequence, 1); 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.feedback_type = 1; /* 1'b1: MU */ 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; } @@ -529,10 +529,10 @@ static u8 _send_bf_report_poll(PADAPTER adapter, u8 *ra, u8 bFinalPoll) set_duration(pframe, 100); /* RA */ - _rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN); + memcpy(pwlanhdr->addr1, ra, ETH_ALEN); /* TA */ - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN); /* Feedback Segment Retransmission Bitmap */ pframe[16] = 0xFF; @@ -1017,7 +1017,7 @@ static struct beamformer_entry *_bfer_add_entry(PADAPTER adapter, bfer->used = _TRUE; _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->state = BEAMFORM_ENTRY_HW_STATE_ADD_INIT; 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.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->sounding = _FALSE; 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); SetSeqNum(pframe, 0); - _rtw_memcpy(wlanhdr->addr1, ra, ETH_ALEN); - _rtw_memcpy(wlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN); - _rtw_memcpy(wlanhdr->addr3, get_bssid(mlmepriv), ETH_ALEN); + memcpy(wlanhdr->addr1, ra, ETH_ALEN); + memcpy(wlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN); + memcpy(wlanhdr->addr3, get_bssid(mlmepriv), ETH_ALEN); pframe[24] = RTW_WLAN_CATEGORY_VHT; pframe[25] = RTW_WLAN_ACTION_VHT_GROUPID_MANAGEMENT; /* Set Membership Status Array */ ptr = pframe + 26; - _rtw_memcpy(ptr, gid, 8); + memcpy(ptr, gid, 8); /* Set User Position Array */ ptr = pframe + 34; - _rtw_memcpy(ptr, position, 16); + memcpy(ptr, position, 16); attrib->pktlen = 54; 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; } - _rtw_memcpy(wk_buf, pbuf, size); + memcpy(wk_buf, pbuf, size); } else { wk_buf = NULL; 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->g_id = 0; } - _rtw_memcpy(pEntry->mac_addr, ra, ETH_ALEN); + memcpy(pEntry->mac_addr, ra, ETH_ALEN); pEntry->bSound = _FALSE; /* 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_frame_sub_type(pframe, WIFI_ACTION_NOACK); - _rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr1, ra, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); if (pmlmeext->cur_wireless_mode == WIRELESS_11B) 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_NDP_ANNOUNCEMENT(pframe + 24, 1); - _rtw_memcpy(pframe + 28, ActionHdr, 4); + memcpy(pframe + 28, ActionHdr, 4); 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_frame_sub_type(pframe, WIFI_ACTION_NOACK); - _rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr1, ra, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); if (pmlmeext->cur_wireless_mode == WIRELESS_11B) 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_NDP_ANNOUNCEMENT(pframe + 24, 1); - _rtw_memcpy(pframe + 28, ActionHdr, 4); + memcpy(pframe + 28, ActionHdr, 4); 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); - _rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN); + memcpy(pwlanhdr->addr1, ra, 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)) aSifsTime = 16; @@ -2404,7 +2404,7 @@ BOOLEAN issue_vht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, enum channel else 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)) 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.nc_index = 0; - _rtw_memcpy(pframe + 17, (u8 *)&sta_info, 2); + memcpy(pframe + 17, (u8 *)&sta_info, 2); 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); - _rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN); + memcpy(pwlanhdr->addr1, ra, 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)) aSifsTime = 16; @@ -2490,7 +2490,7 @@ BOOLEAN issue_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, enum channel_wi else 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)) 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.nc_index = 0; - _rtw_memcpy(pframe + 17, (u8 *)&sta_info, 2); + memcpy(pframe + 17, (u8 *)&sta_info, 2); pattrib->pktlen = 19; @@ -2947,7 +2947,7 @@ u32 rtw_beamforming_get_report_frame(PADAPTER Adapter, union recv_frame *precv_ else pBeamformEntry->DefaultCsiCnt++; - _rtw_memcpy(&pBeamformEntry->PreCsiReport, pframe, frame_len); + memcpy(&pBeamformEntry->PreCsiReport, pframe, frame_len); pBeamformEntry->bDefaultCSI = _FALSE; @@ -3120,7 +3120,7 @@ u8 beamforming_wk_cmd(_adapter *padapter, s32 type, u8 *pbuf, s32 size, u8 enque goto exit; } - _rtw_memcpy(wk_buf, pbuf, size); + memcpy(wk_buf, pbuf, size); } else { wk_buf = NULL; size = 0; diff --git a/core/rtw_br_ext.c b/core/rtw_br_ext.c index dd11235..8a67073 100644 --- a/core/rtw_br_ext.c +++ b/core/rtw_br_ext.c @@ -17,7 +17,6 @@ #ifdef __KERNEL__ #include #include - #include #if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)) #include #endif diff --git a/core/rtw_bt_mp.c b/core/rtw_bt_mp.c index 2a2c14d..8c2d220 100644 --- a/core/rtw_bt_mp.c +++ b/core/rtw_bt_mp.c @@ -215,8 +215,8 @@ mptbt_BtFwOpCodeProcess( pH2c->opCodeVer = opCodeVer; pH2c->reqNum = pMptCtx->h2cReqNum; /* PlatformMoveMemory(&pH2c->buf[0], pH2cPar, h2cParaLen); */ - /* _rtw_memcpy(&pH2c->buf[0], pH2cPar, h2cParaLen); */ - _rtw_memcpy(pH2c->buf, pH2cPar, h2cParaLen); + /* memcpy(&pH2c->buf[0], pH2cPar, h2cParaLen); */ + memcpy(pH2c->buf, pH2cPar, h2cParaLen); RTW_INFO("[MPT], pH2c->opCode=%d\n", pH2c->opCode); RTW_INFO("[MPT], pH2c->opCodeVer=%d\n", pH2c->opCodeVer); @@ -499,7 +499,7 @@ MPTBT_FwC2hBtMpCtrl( case EXT_C2H_TRIG_BY_BT_FW: 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->retLen=0x%x\n", pExtC2h->retLen); RTW_INFO("[MPT], pExtC2h->opCodeVer=0x%x\n", pExtC2h->opCodeVer); diff --git a/core/rtw_btcoex.c b/core/rtw_btcoex.c index 105a7d6..a6388cc 100644 --- a/core/rtw_btcoex.c +++ b/core/rtw_btcoex.c @@ -550,7 +550,7 @@ u8 rtw_btcoex_btinfo_cmd(_adapter *adapter, u8 *buf, u16 len) pdrvextra_cmd_parm->size = len; 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)); @@ -635,7 +635,7 @@ u8 rtw_btcoex_parse_BT_info_notify_cmd(_adapter *padapter, u8 *pcmd, u16 cmdlen) #endif { if (0x1 == btInfoReason || 0x2 == btInfoReason) { - _rtw_memcpy(btinfo, &pcmd[4], btInfoLen); + memcpy(btinfo, &pcmd[4], btInfoLen); btinfo[0] = btInfoReason; rtw_btcoex_btinfo_cmd(padapter, btinfo, btInfoLen); } else @@ -1323,7 +1323,7 @@ void rtw_btcoex_recvmsgbysocket(void *data) /*important: cut the udp header from skb->data! header length is 8 byte*/ recv_length = skb->len - 8; 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); #if 0 @@ -1650,7 +1650,7 @@ void rtw_btcoex_SendEventExtBtCoexControl(PADAPTER padapter, u8 bNeedDbgRsp, u8 /* Return parameters starts from here */ pRetPar = &pEvent->Data[len]; - _rtw_memcpy(&pRetPar[0], pData, dataLen); + memcpy(&pRetPar[0], pData, dataLen); len += dataLen; @@ -1692,7 +1692,7 @@ void rtw_btcoex_SendEventExtBtInfoControl(PADAPTER padapter, u8 dataLen, void *p /* Return parameters starts from here */ pRetPar = &pEvent->Data[len]; - _rtw_memcpy(&pRetPar[0], pData, dataLen); + memcpy(&pRetPar[0], pData, dataLen); len += dataLen; diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index 8887653..7d452dd 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -26,7 +26,7 @@ Caller and the rtw_cmd_thread can protect cmd_q by spin_lock. No irqsave is necessary. */ -sint _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) +static sint _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) { sint res = _SUCCESS; @@ -126,7 +126,7 @@ static void c2h_wk_callback(_workitem *work) } #endif /* CONFIG_C2H_WK */ -sint _rtw_init_evt_priv(struct evt_priv *pevtpriv) +static sint _rtw_init_evt_priv(struct evt_priv *pevtpriv) { sint res = _SUCCESS; @@ -191,7 +191,7 @@ exit: return res; } -void _rtw_free_evt_priv(struct evt_priv *pevtpriv) +static void _rtw_free_evt_priv(struct evt_priv *pevtpriv) { @@ -220,7 +220,7 @@ void _rtw_free_evt_priv(struct evt_priv *pevtpriv) } -void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv) +static void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv) { if (pcmdpriv) { @@ -251,7 +251,7 @@ ISR/Call-Back functions can't call this sub-function. extern u8 dump_cmd_id; #endif -sint _rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj, bool to_head) +static sint _rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj, bool to_head) { _irqL irqL; @@ -312,7 +312,7 @@ exit: return _SUCCESS; } -struct cmd_obj *_rtw_dequeue_cmd(_queue *queue) +static struct cmd_obj *_rtw_dequeue_cmd(_queue *queue) { _irqL irqL; struct cmd_obj *obj; @@ -651,7 +651,7 @@ _next: 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 " : "")); - _rtw_memcpy(pcmdbuf, pcmd->parmbuf, pcmd->cmdsz); + memcpy(pcmdbuf, pcmd->parmbuf, pcmd->cmdsz); ret = cmd_hdl(pcmd->padapter, pcmdbuf); pcmd->res = ret; @@ -889,7 +889,7 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, struct sitesurvey_parm *pparm) } if (pparm) - _rtw_memcpy(psurveyPara, pparm, sizeof(struct sitesurvey_parm)); + memcpy(psurveyPara, pparm, sizeof(struct sitesurvey_parm)); else 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)); #ifdef MP_FIRMWARE_OFFLOAD pbsetdataratepara->curr_rateidx = *(u32 *)rateset; - /* _rtw_memcpy(pbsetdataratepara, rateset, sizeof(u32)); */ + /* memcpy(pbsetdataratepara, rateset, sizeof(u32)); */ #else pbsetdataratepara->mac_id = 5; - _rtw_memcpy(pbsetdataratepara->datarates, rateset, NumRates); + memcpy(pbsetdataratepara->datarates, rateset, NumRates); #endif res = rtw_enqueue_cmd(pcmdpriv, ph2c); exit: @@ -975,7 +975,7 @@ u8 rtw_setbasicrate_cmd(_adapter *padapter, u8 *rateset) 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); exit: @@ -1440,15 +1440,15 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork) 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]; psecuritypriv->authenticator_ie[0] = (unsigned char)psecnetwork->IELength; 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 - _rtw_memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], (256 - 1)); + memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], (256 - 1)); psecnetwork->IELength = 0; /* 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. */ 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 */ - _rtw_memcpy(psecnetwork->IEs, pnetwork->network.IEs, 12); + memcpy(psecnetwork->IEs, pnetwork->network.IEs, 12); psecnetwork->IELength = 12; 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; 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 - _rtw_memcpy(&psecuritypriv->supplicant_ie[1], &psecnetwork->IEs[0], (256 - 1)); + memcpy(&psecuritypriv->supplicant_ie[1], &psecnetwork->IEs[0], (256 - 1)); #endif 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; } - _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)) 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); 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; } 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 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; } #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->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_; @@ -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)); - _rtw_memcpy(psetrttblparm, prate_table, sizeof(struct setratable_parm)); + memcpy(psetrttblparm, prate_table, sizeof(struct setratable_parm)); res = rtw_enqueue_cmd(pcmdpriv, ph2c); exit: @@ -1956,7 +1956,7 @@ u8 rtw_setassocsta_cmd(_adapter *padapter, u8 *mac_addr) ph2c->rsp = (u8 *) psetassocsta_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); @@ -1989,7 +1989,7 @@ u8 rtw_addbareq_cmd(_adapter *padapter, u8 tid, u8 *addr) } 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)); @@ -2026,7 +2026,7 @@ u8 rtw_addbarsp_cmd(_adapter *padapter, u8 *addr, u16 tid, u8 status, u8 size, u goto exit; } - _rtw_memcpy(paddBaRsp_parm->addr, addr, ETH_ALEN); + memcpy(paddBaRsp_parm->addr, addr, ETH_ALEN); paddBaRsp_parm->tid = tid; paddBaRsp_parm->status = status; paddBaRsp_parm->size = size; @@ -2438,7 +2438,7 @@ u8 rtw_tdls_cmd(_adapter *padapter, u8 *addr, u8 option) _rtw_spinlock(&(padapter->tdlsinfo.cmd_lock)); if (addr != NULL) - _rtw_memcpy(TDLSoption->addr, addr, 6); + memcpy(TDLSoption->addr, addr, 6); TDLSoption->option = option; _rtw_spinunlock(&(padapter->tdlsinfo.cmd_lock)); 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 */ if (hal_chk_wl_func(padapter, WL_FUNC_TDLS) == _TRUE) { 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); } ptdlsinfo->watchdog_count++; @@ -3852,7 +3852,7 @@ static u8 _p2p_roch_cmd(_adapter *adapter roch_parm->cookie = cookie; roch_parm->wdev = wdev; 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->duration = duration; } @@ -4704,7 +4704,7 @@ u8 rtw_btinfo_cmd(_adapter *adapter, u8 *buf, u16 len) pdrvextra_cmd_parm->size = len; 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)); @@ -4749,7 +4749,7 @@ u8 rtw_test_h2c_cmd(_adapter *adapter, u8 *buf, u8 len) pdrvextra_cmd_parm->size = len; 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)); @@ -4984,7 +4984,7 @@ static u8 rtw_customer_str_cmd(_adapter *adapter, u8 write, const u8 *cstr) parm->pbuf = write ? str : NULL; if (write) - _rtw_memcpy(str, cstr, RTW_CUSTOMER_STR_LEN); + memcpy(str, cstr, RTW_CUSTOMER_STR_LEN); /* need enqueue, prepare cmd_obj and enqueue */ 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; } - _rtw_memcpy(extra_cmd_buf, pbuf, length); + memcpy(extra_cmd_buf, pbuf, length); pdrvextra_cmd_parm->ec_id = C2H_WK_CID; pdrvextra_cmd_parm->type = type; 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->sta = sta; if (cmd != ST_CMD_CHK) { - _rtw_memcpy(&st_parm->local_naddr, local_naddr, 4); - _rtw_memcpy(&st_parm->local_port, local_port, 2); - _rtw_memcpy(&st_parm->remote_naddr, remote_naddr, 4); - _rtw_memcpy(&st_parm->remote_port, remote_port, 2); + memcpy(&st_parm->local_naddr, local_naddr, 4); + memcpy(&st_parm->local_port, local_port, 2); + memcpy(&st_parm->remote_naddr, remote_naddr, 4); + memcpy(&st_parm->remote_port, remote_port, 2); } 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; 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 */ 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); 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; */ /* 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 /* reset DSConfig */ diff --git a/core/rtw_debug.c b/core/rtw_debug.c index 4325d30..a6e07ed 100644 --- a/core/rtw_debug.c +++ b/core/rtw_debug.c @@ -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) && (_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_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; 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); 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; rtw_sctx_init(&gotc2h, 60); 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); 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)); } @@ -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) { psta = LIST_CONTAINOR(plist, struct sta_info, hash_list); 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); @@ -5733,7 +5733,7 @@ ssize_t proc_set_tx_sa_query(struct file *file, const char __user *buffer, size_ for (index = 0; index < macid_ctl->num && index < NUM_STA; index++) { if (rtw_macid_is_used(macid_ctl, index) && !rtw_macid_is_bmc(macid_ctl, index)) { if (!_rtw_memcmp(get_my_bssid(&(pmlmeinfo->network)), &mac_addr[index][0], ETH_ALEN) - && !IS_MCAST(&mac_addr[index][0])) { + && !is_multicast_ether_addr(&mac_addr[index][0])) { issue_action_SA_Query(padapter, &mac_addr[index][0], 0, 0, (u8)key_type); RTW_INFO("STA[%u]:"MAC_FMT"\n", index , MAC_ARG(&mac_addr[index][0])); } @@ -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) { psta = LIST_CONTAINOR(plist, struct sta_info, hash_list); 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); diff --git a/core/rtw_ieee80211.c b/core/rtw_ieee80211.c index f8003bb..192cef2 100644 --- a/core/rtw_ieee80211.c +++ b/core/rtw_ieee80211.c @@ -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, unsigned int *frlen) { - _rtw_memcpy((void *)pbuf, (void *)source, len); + memcpy((void *)pbuf, (void *)source, len); *frlen = *frlen + len; return pbuf + len; } @@ -227,7 +227,7 @@ u8 *rtw_set_ie *(pbuf + 1) = (u8)len; if (len > 0) - _rtw_memcpy((void *)(pbuf + 2), (void *)source, len); + memcpy((void *)(pbuf + 2), (void *)source, len); if (frlen) *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]; 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) *ielen = in_ie[cnt + 1] + 2; @@ -395,7 +395,7 @@ int rtw_ies_remove_ie(u8 *ies, uint *ies_len, uint offset, u8 eid, u8 *oui, u8 o u8 *remain_ies = target_ie + target_ielen; uint remain_len = search_len - (remain_ies - start); - _rtw_memmove(target_ie, remain_ies, remain_len); + memmove(target_ie, remain_ies, remain_len); *ies_len = *ies_len - target_ielen; ret = _SUCCESS; @@ -442,7 +442,7 @@ int rtw_remove_ie_g_rate(u8 *ie, uint *ie_len, uint offset, u8 eid) *(tem_target_ie+1)=target_ielen;/*set new length to Supposrted Rates*/ target_ie=tem_target_ie+target_ielen + 2;/*set target ie to address of rate 6Mbps */ - _rtw_memmove(target_ie, remain_ies, remain_len); + memmove(target_ie, remain_ies, remain_len); *ie_len = *ie_len - rm_size; ret = rm_size; @@ -461,7 +461,7 @@ void rtw_set_supported_rate(u8 *SupportedRates, uint mode) switch (mode) { case WIRELESS_11B: - _rtw_memcpy(SupportedRates, WIFI_CCKRATES, IEEE80211_CCK_RATE_LEN); + memcpy(SupportedRates, WIFI_CCKRATES, IEEE80211_CCK_RATE_LEN); break; case WIRELESS_11G: @@ -469,15 +469,15 @@ void rtw_set_supported_rate(u8 *SupportedRates, uint mode) case WIRELESS_11_5N: case WIRELESS_11A_5N: /* Todo: no basic rate for ofdm ? */ case WIRELESS_11_5AC: - _rtw_memcpy(SupportedRates, WIFI_OFDMRATES, IEEE80211_NUM_OFDM_RATESLEN); + memcpy(SupportedRates, WIFI_OFDMRATES, IEEE80211_NUM_OFDM_RATESLEN); break; case WIRELESS_11BG: case WIRELESS_11G_24N: case WIRELESS_11_24N: case WIRELESS_11BG_24N: - _rtw_memcpy(SupportedRates, WIFI_CCKRATES, IEEE80211_CCK_RATE_LEN); - _rtw_memcpy(SupportedRates + IEEE80211_CCK_RATE_LEN, WIFI_OFDMRATES, IEEE80211_NUM_OFDM_RATESLEN); + memcpy(SupportedRates, WIFI_CCKRATES, IEEE80211_CCK_RATE_LEN); + memcpy(SupportedRates + IEEE80211_CCK_RATE_LEN, WIFI_OFDMRATES, IEEE80211_NUM_OFDM_RATESLEN); break; } @@ -603,7 +603,7 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit) goto check_next_ie; /* check version... */ - _rtw_memcpy((u8 *)&val16, (pbuf + 6), sizeof(val16)); + memcpy((u8 *)&val16, (pbuf + 6), sizeof(val16)); val16 = le16_to_cpu(val16); 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 || _rtw_memcmp(&in_ie[cnt + 6], wapi_oui2, 4) == _TRUE)) { 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) *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 (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; 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 (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; 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; 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) *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; if (buf_attr) - _rtw_memcpy(buf_attr, attr_ptr, attr_len); + memcpy(buf_attr, attr_ptr, attr_len); if (len_attr) *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 (buf_content) - _rtw_memcpy(buf_content, attr_ptr + 4, attr_len - 4); + memcpy(buf_content, attr_ptr + 4, attr_len - 4); if (len_content) *len_content = attr_len - 4; @@ -1394,7 +1394,7 @@ ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len, elems->timeout_int = pos; elems->timeout_int_len = elen; break; - case WLAN_EID_HT_CAP: + case WLAN_EID_HT_CAPABILITY: elems->ht_capabilities = pos; elems->ht_capabilities_len = elen; break; @@ -1410,7 +1410,7 @@ ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len, elems->vht_operation = pos; elems->vht_operation_len = elen; break; - case WLAN_EID_VHT_OP_MODE_NOTIFY: + case WLAN_EID_OPMODE_NOTIF: elems->vht_op_mode_notify = pos; elems->vht_op_mode_notify_len = elen; break; @@ -1605,7 +1605,7 @@ void rtw_macaddr_cfg(u8 *out, const u8 *hw_mac_addr) /* Use the mac address stored in the Efuse */ if (hw_mac_addr) { - _rtw_memcpy(mac, hw_mac_addr, ETH_ALEN); + memcpy(mac, hw_mac_addr, ETH_ALEN); goto err_chk; } @@ -1628,7 +1628,7 @@ err_chk: #endif } - _rtw_memcpy(out, mac, ETH_ALEN); + memcpy(out, mac, ETH_ALEN); RTW_INFO("%s mac addr:"MAC_FMT"\n", __func__, MAC_ARG(out)); } @@ -1653,7 +1653,7 @@ void dump_ht_cap_ie(void *sel, const u8 *ie, u32 ie_len) const u8 *ht_cap_ie; sint ht_cap_ielen; - ht_cap_ie = rtw_get_ie(ie, WLAN_EID_HT_CAP, &ht_cap_ielen, ie_len); + ht_cap_ie = rtw_get_ie(ie, WLAN_EID_HT_CAPABILITY, &ht_cap_ielen, ie_len); if (!ie || ht_cap_ie != ie) return; @@ -1972,7 +1972,7 @@ int rtw_p2p_merge_ies(u8 *in_ie, u32 in_len, u8 *merge_ie) if (merge_ie != NULL) { /* Set first P2P OUI */ - _rtw_memcpy(merge_ie, ELOUI, 6); + memcpy(merge_ie, ELOUI, 6); merge_ie += 6; 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 */ 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; 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; 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) *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; if (buf_attr) - _rtw_memcpy(buf_attr, attr_ptr, attr_len); + memcpy(buf_attr, attr_ptr, attr_len); if (len_attr) *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 (buf_content) - _rtw_memcpy(buf_content, attr_ptr + 3, attr_len - 3); + memcpy(buf_content, attr_ptr + 3, attr_len - 3); if (len_content) *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); if (pdata_attr) - _rtw_memcpy(pbuf + 3, pdata_attr, attr_len); + memcpy(pbuf + 3, pdata_attr, attr_len); a_len = attr_len + 3; @@ -2205,7 +2205,7 @@ uint rtw_del_p2p_ie(u8 *ies, uint ies_len_ori, const char *msg) RTW_INFO("next_ie:%p, remain_len:%u\n", next_ie, remain_len); } - _rtw_memmove(target_ie, next_ie, remain_len); + memmove(target_ie, next_ie, remain_len); memset(target_ie + remain_len, 0, target_ie_len); ies_len -= target_ie_len; @@ -2246,7 +2246,7 @@ uint rtw_del_p2p_attr(u8 *ie, uint ielen_ori, u8 attr_id) RTW_INFO("next_attr:%p, remain_len:%u\n", next_attr, remain_len); } - _rtw_memmove(target_attr, next_attr, remain_len); + memmove(target_attr, next_attr, remain_len); memset(target_attr + remain_len, 0, target_attr_len); *(ie + 1) -= target_attr_len; ielen -= target_attr_len; @@ -2316,7 +2316,7 @@ void rtw_bss_ex_del_p2p_attr(WLAN_BSSID_EX *bss_ex, u8 attr_id) if (ie_len != ie_len_ori) { u8 *next_ie = ie + ie_len; - _rtw_memmove(next_ie, next_ie_ori, remain_len); + memmove(next_ie, next_ie_ori, remain_len); memset(next_ie + remain_len, 0, ie_len_ori - ie_len); bss_ex->IELength -= ie_len_ori - ie_len; @@ -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; 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) *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; if (buf_attr) - _rtw_memcpy(buf_attr, attr_ptr, attr_len); + memcpy(buf_attr, attr_ptr, attr_len); if (len_attr) *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 (buf_content) - _rtw_memcpy(buf_content, attr_ptr + 3, attr_len - 3); + memcpy(buf_content, attr_ptr + 3, attr_len - 3); if (len_content) *len_content = attr_len - 3; @@ -2532,7 +2532,7 @@ uint rtw_del_wfd_ie(u8 *ies, uint ies_len_ori, const char *msg) RTW_INFO("next_ie:%p, remain_len:%u\n", next_ie, remain_len); } - _rtw_memmove(target_ie, next_ie, remain_len); + memmove(target_ie, next_ie, remain_len); memset(target_ie + remain_len, 0, target_ie_len); ies_len -= target_ie_len; @@ -2573,7 +2573,7 @@ uint rtw_del_wfd_attr(u8 *ie, uint ielen_ori, u8 attr_id) RTW_INFO("next_attr:%p, remain_len:%u\n", next_attr, remain_len); } - _rtw_memmove(target_attr, next_attr, remain_len); + memmove(target_attr, next_attr, remain_len); memset(target_attr + remain_len, 0, target_attr_len); *(ie + 1) -= target_attr_len; ielen -= target_attr_len; @@ -2642,7 +2642,7 @@ void rtw_bss_ex_del_wfd_attr(WLAN_BSSID_EX *bss_ex, u8 attr_id) if (ie_len != ie_len_ori) { u8 *next_ie = ie + ie_len; - _rtw_memmove(next_ie, next_ie_ori, remain_len); + memmove(next_ie, next_ie_ori, remain_len); memset(next_ie + remain_len, 0, ie_len_ori - ie_len); bss_ex->IELength -= ie_len_ori - ie_len; diff --git a/core/rtw_ioctl_query.c b/core/rtw_ioctl_query.c index dacb006..3b04cc3 100644 --- a/core/rtw_ioctl_query.c +++ b/core/rtw_ioctl_query.c @@ -58,7 +58,7 @@ query_802_11_capability( pCap->NoOfAuthEncryptPairsSupported = ulNumOfPairSupported; 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; return _TRUE; } 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->RequestFixedIEs.Capabilities = (unsigned short) *&psecnetwork->IEs[10]; - _rtw_memcpy(pAssocInfo->RequestFixedIEs.CurrentAPAddress, + memcpy(pAssocInfo->RequestFixedIEs.CurrentAPAddress, &psecnetwork->MacAddress, 6); 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 */ while ((i < supp_ie[0]) && (i < 256)) { if ((unsigned char)supp_ie[i] == pDest[0]) { - _rtw_memcpy((u8 *)(pDest), + memcpy((u8 *)(pDest), &supp_ie[i], 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; if (i > 0) { - _rtw_memcpy((u8 *)&pDest[0], &auth_ie[1], i); + memcpy((u8 *)&pDest[0], &auth_ie[1], i); pAssocInfo->ResponseIELength = i; } diff --git a/core/rtw_ioctl_rtl.c b/core/rtw_ioctl_rtl.c index 5d9e76b..6cc1c0d 100644 --- a/core/rtw_ioctl_rtl.c +++ b/core/rtw_ioctl_rtl.c @@ -361,7 +361,7 @@ NDIS_STATUS oid_rt_get_rx_icv_err_hdl(struct oid_par_priv *poid_par_priv) return status; } 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; *poid_par_priv->bytes_rw = poid_par_priv->information_buf_len; } else @@ -530,7 +530,7 @@ NDIS_STATUS oid_rt_get_total_rx_bytes_hdl(struct oid_par_priv *poid_par_priv) return status; } 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; *poid_par_priv->bytes_rw = poid_par_priv->information_buf_len; } else diff --git a/core/rtw_ioctl_set.c b/core/rtw_ioctl_set.c index 565a734..e48bfe1 100644 --- a/core/rtw_ioctl_set.c +++ b/core/rtw_ioctl_set.c @@ -88,7 +88,7 @@ u8 rtw_do_join(_adapter *padapter) pmlmepriv->to_join = _TRUE; 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; if (_rtw_queue_empty(queue) == _TRUE) { @@ -139,7 +139,7 @@ u8 rtw_do_join(_adapter *padapter) pibss = padapter->registrypriv.dev_network.MacAddress; 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); @@ -321,7 +321,7 @@ handle_tkip_countermeasure: } 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; if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE) @@ -417,7 +417,7 @@ handle_tkip_countermeasure: 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; if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE) @@ -479,12 +479,12 @@ handle_tkip_countermeasure: } 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 memset(&pmlmepriv->assoc_ssid, 0, sizeof(NDIS_802_11_SSID)); if (bssid && bssid_valid) { - _rtw_memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN); + memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN); pmlmepriv->assoc_by_bssid = _TRUE; } else 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; diff --git a/core/rtw_iol.c b/core/rtw_iol.c index 643ec6c..19a2cda 100644 --- a/core/rtw_iol.c +++ b/core/rtw_iol.c @@ -82,7 +82,7 @@ int rtw_IOL_append_cmds(struct xmit_frame *xmit_frame, u8 *IOL_cmds, u32 cmd_len 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->last_txcmdsz += cmd_len; diff --git a/core/rtw_mi.c b/core/rtw_mi.c index 3e22054..5e1a23f 100644 --- a/core/rtw_mi.c +++ b/core/rtw_mi.c @@ -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_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)) 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.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; #ifdef CONFIG_SKB_ALLOCATED diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c index 5a1f552..34d46dd 100644 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -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); goto exit; } - _rtw_memcpy(*t_ie, ie, ie_len); + memcpy(*t_ie, ie, ie_len); *t_ie_len = ie_len; } @@ -531,7 +531,7 @@ u16 rtw_get_capability(WLAN_BSSID_EX *bss) { 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); } @@ -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) return _FALSE; - _rtw_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 *)&s_cap, rtw_get_capability_from_ie(src->IEs), 2); + memcpy((u8 *)&d_cap, rtw_get_capability_from_ie(dst->IEs), 2); s_cap = le16_to_cpu(s_cap); @@ -711,7 +711,7 @@ int is_same_network(WLAN_BSSID_EX *src, WLAN_BSSID_EX *dst, u8 feature) if (((_rtw_memcmp(src->MacAddress, dst->MacAddress, ETH_ALEN)) == _TRUE) && ((s_cap & WLAN_CAPABILITY_IBSS) == (d_cap & WLAN_CAPABILITY_IBSS)) && - ((s_cap & WLAN_CAPABILITY_BSS) == (d_cap & WLAN_CAPABILITY_BSS))) { + ((s_cap & WLAN_CAPABILITY_ESS) == (d_cap & WLAN_CAPABILITY_ESS))) { if ((src->Ssid.SsidLength == dst->Ssid.SsidLength) && (((_rtw_memcmp(src->Ssid.Ssid, dst->Ssid.Ssid, src->Ssid.SsidLength)) == _TRUE) || //Case of normal AP (is_all_null(src->Ssid.Ssid, src->Ssid.SsidLength) == _TRUE || is_all_null(dst->Ssid.Ssid, dst->Ssid.SsidLength) == _TRUE))) //Case of hidden AP @@ -852,7 +852,7 @@ void update_network(WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src, if (update_ie) { dst->Reserved[0] = src->Reserved[0]; 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; @@ -1032,7 +1032,7 @@ bool rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target) #ifdef CONFIG_ANTENNA_DIVERSITY rtw_hal_get_odm_var(adapter, HAL_ODM_ANTDIV_SELECT, &(target->PhyInfo.Optimum_antenna), NULL); #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(); */ /* variable initialize */ pnetwork->fixed = _FALSE; @@ -1061,7 +1061,7 @@ bool rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target) #ifdef CONFIG_ANTENNA_DIVERSITY rtw_hal_get_odm_var(adapter, HAL_ODM_ANTDIV_SELECT, &(target->PhyInfo.Optimum_antenna), NULL); #endif - _rtw_memcpy(&(pnetwork->network), target, bssid_ex_sz); + memcpy(&(pnetwork->network), target, bssid_ex_sz); 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; _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); ibss_wlan = _rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->MacAddress); 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); 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)); - _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_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); 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; 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 */ 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); 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 - _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 #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)); @@ -2102,10 +2102,10 @@ static void rtw_joinbss_update_network(_adapter *padapter, struct wlan_network * RTW_INFO("%s\n", __FUNCTION__); /* 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 */ 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; @@ -2513,7 +2513,7 @@ void rtw_stassoc_event_callback(_adapter *adapter, u8 *pbuf) passoc_req = rtw_zmalloc(psta->assoc_req_len); if (passoc_req) { 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); 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 = rtw_zmalloc(ft_evt_parms.ies_len); 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 goto err_2; ft_evt_parms.target_ap = rtw_zmalloc(ETH_ALEN); 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 goto err_1; @@ -2966,10 +2966,10 @@ void rtw_stadel_event_callback(_adapter *adapter, u8 *pbuf) pdev_network = &(adapter->registrypriv.dev_network); 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)); - _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); @@ -4011,19 +4011,19 @@ sint rtw_set_key(_adapter *adapter, struct security_priv *psecuritypriv, sint ke case _WEP40_: keylen = 5; - _rtw_memcpy(&(psetkeyparm->key[0]), &(psecuritypriv->dot11DefKey[keyid].skey[0]), keylen); + memcpy(&(psetkeyparm->key[0]), &(psecuritypriv->dot11DefKey[keyid].skey[0]), keylen); break; case _WEP104_: keylen = 13; - _rtw_memcpy(&(psetkeyparm->key[0]), &(psecuritypriv->dot11DefKey[keyid].skey[0]), keylen); + memcpy(&(psetkeyparm->key[0]), &(psecuritypriv->dot11DefKey[keyid].skey[0]), keylen); break; case _TKIP_: keylen = 16; - _rtw_memcpy(&psetkeyparm->key, &psecuritypriv->dot118021XGrpKey[keyid], keylen); + memcpy(&psetkeyparm->key, &psecuritypriv->dot118021XGrpKey[keyid], keylen); break; case _AES_: keylen = 16; - _rtw_memcpy(&psetkeyparm->key, &psecuritypriv->dot118021XGrpKey[keyid], keylen); + memcpy(&psetkeyparm->key, &psecuritypriv->dot118021XGrpKey[keyid], keylen); break; default: 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 */ if (info.gmcs) - _rtw_memcpy(gm_cs, info.gmcs, 4); + memcpy(gm_cs, info.gmcs, 4); if (info.pmkid_cnt) { 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)); 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 info.pmkid_cnt = 0; /* update new pmkid_cnt */ RTW_PUT_LE16(info.pmkid_list - 2, info.pmkid_cnt); 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 + 2 + 4 * info.pcs_cnt @@ -4355,12 +4355,12 @@ sint rtw_restruct_sec_ie(_adapter *adapter, u8 *out_ie) authmode = _WPA2_IE_ID_; 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; } else if ((authmode == _WPA_IE_ID_) || (authmode == _WPA2_IE_ID_)) { /* 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 { int jj; @@ -4388,9 +4388,9 @@ void rtw_init_registrypriv_dev_network(_adapter *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.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 */ - _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 */ rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type)); @@ -5048,10 +5048,9 @@ void rtw_issue_addbareq_cmd(_adapter *padapter, struct xmit_frame *pxmitframe) struct sta_info *psta = NULL; struct ht_priv *phtpriv; struct pkt_attrib *pattrib = &pxmitframe->attrib; - s32 bmcst = IS_MCAST(pattrib->ra); /* if(bmcst || (padapter->mlmepriv.LinkDetectInfo.bTxBusyTraffic == _FALSE)) */ - if (bmcst || (padapter->mlmepriv.LinkDetectInfo.NumTxOkInPeriod < 100)) + if (is_multicast_ether_addr(pattrib->ra) || (padapter->mlmepriv.LinkDetectInfo.NumTxOkInPeriod < 100)) return; priority = pattrib->priority; @@ -5161,7 +5160,7 @@ void _rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network) 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.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; diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index eee4dfb..fe23027 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -1007,8 +1007,8 @@ void init_mlme_default_rate_set(_adapter *padapter) if (IsSupportedTxCCK(padapter->registrypriv.wireless_mode)) { unsigned char datarate_b[B_MODE_RATE_NUM] ={_1M_RATE_, _2M_RATE_, _5M_RATE_, _11M_RATE_}; - _rtw_memcpy(pmlmeext->datarate, datarate_b, B_MODE_RATE_NUM); - _rtw_memcpy(pmlmeext->basicrate, datarate_b, B_MODE_RATE_NUM); + memcpy(pmlmeext->datarate, datarate_b, B_MODE_RATE_NUM); + memcpy(pmlmeext->basicrate, datarate_b, B_MODE_RATE_NUM); offset_datarate += B_MODE_RATE_NUM; offset_basicrate += B_MODE_RATE_NUM; RTW_INFO("%s: support CCK\n", __func__); @@ -1016,19 +1016,19 @@ void init_mlme_default_rate_set(_adapter *padapter) if(IsSupportedTxOFDM(padapter->registrypriv.wireless_mode)) { unsigned char datarate_g[G_MODE_RATE_NUM] ={_6M_RATE_, _9M_RATE_, _12M_RATE_, _18M_RATE_,_24M_RATE_, _36M_RATE_, _48M_RATE_, _54M_RATE_}; unsigned char basicrate_g[G_MODE_BASIC_RATE_NUM] = {_6M_RATE_, _12M_RATE_, _24M_RATE_}; - _rtw_memcpy(pmlmeext->datarate + offset_datarate, datarate_g, G_MODE_RATE_NUM); - _rtw_memcpy(pmlmeext->basicrate + offset_basicrate,basicrate_g, G_MODE_BASIC_RATE_NUM); + memcpy(pmlmeext->datarate + offset_datarate, datarate_g, G_MODE_RATE_NUM); + memcpy(pmlmeext->basicrate + offset_basicrate,basicrate_g, G_MODE_BASIC_RATE_NUM); offset_datarate += G_MODE_RATE_NUM; offset_basicrate += G_MODE_BASIC_RATE_NUM; RTW_INFO("%s: support OFDM\n", __func__); } - _rtw_memcpy(pmlmeext->datarate + offset_datarate, end_set, 1); - _rtw_memcpy(pmlmeext->basicrate + offset_basicrate, end_set, 1); + memcpy(pmlmeext->datarate + offset_datarate, end_set, 1); + memcpy(pmlmeext->basicrate + offset_basicrate, end_set, 1); #ifdef CONFIG_80211N_HT if( padapter->registrypriv.ht_enable && is_supported_ht(padapter->registrypriv.wireless_mode)) - _rtw_memcpy(pmlmeext->default_supported_mcs_set, supported_mcs_set, sizeof(pmlmeext->default_supported_mcs_set)); + memcpy(pmlmeext->default_supported_mcs_set, supported_mcs_set, sizeof(pmlmeext->default_supported_mcs_set)); #endif } @@ -1535,7 +1535,7 @@ _continue: unsigned char *sa_addr = get_sa(pframe); printk("%s: Find Ozmo RC -- %02x:%02x:%02x:%02x:%02x:%02x \n\n", __func__, *sa_addr, *(sa_addr + 1), *(sa_addr + 2), *(sa_addr + 3), *(sa_addr + 4), *(sa_addr + 5)); - _rtw_memcpy(pstapriv->atmel_rc_pattern, get_sa(pframe), ETH_ALEN); + memcpy(pstapriv->atmel_rc_pattern, get_sa(pframe), ETH_ALEN); } #endif @@ -1867,7 +1867,7 @@ unsigned int OnBeacon(_adapter *padapter, union recv_frame *precv_frame) /* update bcn keys */ if (rtw_get_bcn_keys(padapter, pframe, len, &recv_beacon) == _TRUE) { RTW_INFO("%s: beacon keys ready\n", __func__); - _rtw_memcpy(&pmlmepriv->cur_beacon_keys, + memcpy(&pmlmepriv->cur_beacon_keys, &recv_beacon, sizeof(recv_beacon)); } else { RTW_ERR("%s: get beacon keys failed\n", __func__); @@ -2009,7 +2009,7 @@ unsigned int OnBeacon(_adapter *padapter, union recv_frame *precv_frame) psta->expire_to = pstapriv->adhoc_expire_to; - _rtw_memcpy(psta->bssrateset, rate_set, rate_num); + memcpy(psta->bssrateset, rate_set, rate_num); psta->bssratelen = rate_num; /* update TSF Value */ @@ -2286,7 +2286,7 @@ auth_fail: pstat = &stat; memset((char *)pstat, '\0', sizeof(stat)); pstat->auth_seq = 2; - _rtw_memcpy(pstat->cmn.mac_addr, sa, ETH_ALEN); + memcpy(pstat->cmn.mac_addr, sa, ETH_ALEN); #ifdef CONFIG_NATIVEAP_MLME issue_auth(padapter, pstat, (unsigned short)status); @@ -2363,7 +2363,7 @@ normal: goto authclnt_fail; } - _rtw_memcpy((void *)(pmlmeinfo->chg_txt), (void *)(p + 2), len); + memcpy((void *)(pmlmeinfo->chg_txt), (void *)(p + 2), len); pmlmeinfo->auth_seq = 3; issue_auth(padapter, NULL, 0); set_link_timer(pmlmeext, REAUTH_TO); @@ -2680,7 +2680,7 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame) pstat->passoc_req = rtw_zmalloc(pkt_len); if (pstat->passoc_req) { - _rtw_memcpy(pstat->passoc_req, pframe, pkt_len); + memcpy(pstat->passoc_req, pframe, pkt_len); pstat->assoc_req_len = pkt_len; } _exit_critical_bh(&pstat->lock, &irqL); @@ -3636,7 +3636,7 @@ unsigned int OnAction_back(_adapter *padapter, union recv_frame *precv_frame) switch (action) { case RTW_WLAN_ACTION_ADDBA_REQ: /* ADDBA request */ - _rtw_memcpy(&(pmlmeinfo->ADDBA_req), &(frame_body[2]), sizeof(struct ADDBA_request)); + memcpy(&(pmlmeinfo->ADDBA_req), &(frame_body[2]), sizeof(struct ADDBA_request)); /* process_addba_req(padapter, (u8*)&(pmlmeinfo->ADDBA_req), GetAddr3Ptr(pframe)); */ process_addba_req(padapter, (u8 *)&(pmlmeinfo->ADDBA_req), addr); @@ -3710,7 +3710,7 @@ u32 rtw_build_vendor_ie(_adapter *padapter , unsigned char **pframe , u8 mgmt_fr for (vendor_ie_num = 0 ; vendor_ie_num < WLAN_MAX_VENDOR_IE_NUM ; vendor_ie_num++) { if (pmlmepriv->vendor_ielen[vendor_ie_num] > 0 && pmlmepriv->vendor_ie_mask[vendor_ie_num] & mgmt_frame_tyte) { - _rtw_memcpy(*pframe , pmlmepriv->vendor_ie[vendor_ie_num] , pmlmepriv->vendor_ielen[vendor_ie_num]); + memcpy(*pframe , pmlmepriv->vendor_ie[vendor_ie_num] , pmlmepriv->vendor_ielen[vendor_ie_num]); *pframe += pmlmepriv->vendor_ielen[vendor_ie_num]; len += pmlmepriv->vendor_ielen[vendor_ie_num]; } @@ -3773,9 +3773,9 @@ void issue_p2p_GO_request(_adapter *padapter, u8 *raddr) fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -3951,7 +3951,7 @@ void issue_p2p_GO_request(_adapter *padapter, u8 *raddr) p2pielen += 2; /* Value: */ - _rtw_memcpy(p2pie + p2pielen, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(p2pie + p2pielen, adapter_mac_addr(padapter), ETH_ALEN); p2pielen += ETH_ALEN; @@ -4039,7 +4039,7 @@ void issue_p2p_GO_request(_adapter *padapter, u8 *raddr) /* Value: */ /* P2P Device Address */ - _rtw_memcpy(p2pie + p2pielen, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(p2pie + p2pielen, adapter_mac_addr(padapter), ETH_ALEN); p2pielen += ETH_ALEN; /* Config Method */ @@ -4075,7 +4075,7 @@ void issue_p2p_GO_request(_adapter *padapter, u8 *raddr) p2pielen += 2; /* 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; @@ -4172,9 +4172,9 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -4241,11 +4241,11 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l /* We have to get peer_req_cm from here. */ if (_rtw_memcmp(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "000", 3)) { 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) - _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 - _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); } pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen); @@ -4384,7 +4384,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l p2pielen += 2; /* Value: */ - _rtw_memcpy(p2pie + p2pielen, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(p2pie + p2pielen, adapter_mac_addr(padapter), ETH_ALEN); p2pielen += ETH_ALEN; /* Channel List */ @@ -4470,7 +4470,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l /* Value: */ /* P2P Device Address */ - _rtw_memcpy(p2pie + p2pielen, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(p2pie + p2pielen, adapter_mac_addr(padapter), ETH_ALEN); p2pielen += ETH_ALEN; /* Config Method */ @@ -4506,7 +4506,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l p2pielen += 2; /* 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; if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) { @@ -4520,11 +4520,11 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l /* Value: */ /* p2P Device Address */ - _rtw_memcpy(p2pie + p2pielen , pwdinfo->device_addr, ETH_ALEN); + memcpy(p2pie + p2pielen , pwdinfo->device_addr, ETH_ALEN); p2pielen += ETH_ALEN; /* SSID */ - _rtw_memcpy(p2pie + p2pielen, pwdinfo->nego_ssid, pwdinfo->nego_ssidlen); + memcpy(p2pie + p2pielen, pwdinfo->nego_ssid, pwdinfo->nego_ssidlen); p2pielen += pwdinfo->nego_ssidlen; } @@ -4584,9 +4584,9 @@ void issue_p2p_GO_confirm(_adapter *padapter, u8 *raddr, u8 result) fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -4755,11 +4755,11 @@ void issue_p2p_GO_confirm(_adapter *padapter, u8 *raddr, u8 result) /* Value: */ /* p2P Device Address */ - _rtw_memcpy(p2pie + p2pielen , pwdinfo->device_addr, ETH_ALEN); + memcpy(p2pie + p2pielen , pwdinfo->device_addr, ETH_ALEN); p2pielen += ETH_ALEN; /* SSID */ - _rtw_memcpy(p2pie + p2pielen, pwdinfo->nego_ssid, pwdinfo->nego_ssidlen); + memcpy(p2pie + p2pielen, pwdinfo->nego_ssid, pwdinfo->nego_ssidlen); p2pielen += pwdinfo->nego_ssidlen; } @@ -4820,9 +4820,9 @@ void issue_p2p_invitation_request(_adapter *padapter, u8 *raddr) fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, raddr, ETH_ALEN); + memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, raddr, ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -4919,7 +4919,7 @@ void issue_p2p_invitation_request(_adapter *padapter, u8 *raddr) /* Value: */ /* P2P Device Address for GO */ - _rtw_memcpy(p2pie + p2pielen, pwdinfo->invitereq_info.go_bssid, ETH_ALEN); + memcpy(p2pie + p2pielen, pwdinfo->invitereq_info.go_bssid, ETH_ALEN); p2pielen += ETH_ALEN; } @@ -5004,11 +5004,11 @@ void issue_p2p_invitation_request(_adapter *padapter, u8 *raddr) /* Value: */ /* P2P Device Address for GO */ - _rtw_memcpy(p2pie + p2pielen, pwdinfo->invitereq_info.go_bssid, ETH_ALEN); + memcpy(p2pie + p2pielen, pwdinfo->invitereq_info.go_bssid, ETH_ALEN); p2pielen += ETH_ALEN; /* SSID */ - _rtw_memcpy(p2pie + p2pielen, pwdinfo->invitereq_info.go_ssid, pwdinfo->invitereq_info.ssidlen); + memcpy(p2pie + p2pielen, pwdinfo->invitereq_info.go_ssid, pwdinfo->invitereq_info.ssidlen); p2pielen += pwdinfo->invitereq_info.ssidlen; @@ -5024,7 +5024,7 @@ void issue_p2p_invitation_request(_adapter *padapter, u8 *raddr) /* Value: */ /* P2P Device Address */ - _rtw_memcpy(p2pie + p2pielen, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(p2pie + p2pielen, adapter_mac_addr(padapter), ETH_ALEN); p2pielen += ETH_ALEN; /* Config Method */ @@ -5058,7 +5058,7 @@ void issue_p2p_invitation_request(_adapter *padapter, u8 *raddr) p2pielen += 2; /* 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; pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &pattrib->pktlen); @@ -5117,9 +5117,9 @@ void issue_p2p_invitation_response(_adapter *padapter, u8 *raddr, u8 dialogToken fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, raddr, ETH_ALEN); + memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, raddr, ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -5221,7 +5221,7 @@ void issue_p2p_invitation_response(_adapter *padapter, u8 *raddr, u8 dialogToken /* Value: */ /* P2P Device Address for GO */ - _rtw_memcpy(p2pie + p2pielen, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(p2pie + p2pielen, adapter_mac_addr(padapter), ETH_ALEN); p2pielen += ETH_ALEN; } @@ -5353,9 +5353,9 @@ void issue_p2p_provision_request(_adapter *padapter, u8 *pssid, u8 ussidlen, u8 fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, pdev_raddr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, pdev_raddr, ETH_ALEN); + memcpy(pwlanhdr->addr1, pdev_raddr, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, pdev_raddr, ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -5492,11 +5492,11 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, mac, ETH_ALEN); + memcpy(pwlanhdr->addr1, da, ETH_ALEN); + memcpy(pwlanhdr->addr2, mac, ETH_ALEN); /* Use the device address for BSSID field. */ - _rtw_memcpy(pwlanhdr->addr3, mac, ETH_ALEN); + memcpy(pwlanhdr->addr3, mac, ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -5511,7 +5511,7 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) pattrib->pktlen += 8; /* beacon interval: 2 bytes */ - _rtw_memcpy(pframe, (unsigned char *) &beacon_interval, 2); + memcpy(pframe, (unsigned char *) &beacon_interval, 2); pframe += 2; pattrib->pktlen += 2; @@ -5520,7 +5520,7 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) capInfo |= cap_ShortPremble; capInfo |= cap_ShortSlot; - _rtw_memcpy(pframe, (unsigned char *) &capInfo, 2); + memcpy(pframe, (unsigned char *) &capInfo, 2); pframe += 2; pattrib->pktlen += 2; @@ -5539,12 +5539,12 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) if (adapter_wdev_data(padapter)->p2p_enabled && pwdinfo->driver_interface == DRIVER_CFG80211) { if (pmlmepriv->wps_probe_resp_ie != NULL && pmlmepriv->p2p_probe_resp_ie != NULL) { /* WPS IE */ - _rtw_memcpy(pframe, pmlmepriv->wps_probe_resp_ie, pmlmepriv->wps_probe_resp_ie_len); + memcpy(pframe, pmlmepriv->wps_probe_resp_ie, pmlmepriv->wps_probe_resp_ie_len); pattrib->pktlen += pmlmepriv->wps_probe_resp_ie_len; pframe += pmlmepriv->wps_probe_resp_ie_len; /* P2P IE */ - _rtw_memcpy(pframe, pmlmepriv->p2p_probe_resp_ie, pmlmepriv->p2p_probe_resp_ie_len); + memcpy(pframe, pmlmepriv->p2p_probe_resp_ie, pmlmepriv->p2p_probe_resp_ie_len); pattrib->pktlen += pmlmepriv->p2p_probe_resp_ie_len; pframe += pmlmepriv->p2p_probe_resp_ie_len; } @@ -5600,7 +5600,7 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) if (_rtw_memcmp(pmlmepriv->sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN) == _FALSE) { /* Vendor Extension */ - _rtw_memcpy(wpsie + wpsielen, pmlmepriv->sa_ext, L2SDTA_SERVICE_VE_LEN); + memcpy(wpsie + wpsielen, pmlmepriv->sa_ext, L2SDTA_SERVICE_VE_LEN); wpsielen += L2SDTA_SERVICE_VE_LEN; } } @@ -5642,9 +5642,9 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) /* Value: */ if (pwdinfo->external_uuid == 0) { memset(wpsie + wpsielen, 0x0, 16); - _rtw_memcpy(wpsie + wpsielen, mac, ETH_ALEN); + memcpy(wpsie + wpsielen, mac, ETH_ALEN); } else - _rtw_memcpy(wpsie + wpsielen, pwdinfo->uuid, 0x10); + memcpy(wpsie + wpsielen, pwdinfo->uuid, 0x10); wpsielen += 0x10; /* Manufacturer */ @@ -5657,7 +5657,7 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) wpsielen += 2; /* Value: */ - _rtw_memcpy(wpsie + wpsielen, "Realtek", 7); + memcpy(wpsie + wpsielen, "Realtek", 7); wpsielen += 7; /* Model Name */ @@ -5670,7 +5670,7 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) wpsielen += 2; /* Value: */ - _rtw_memcpy(wpsie + wpsielen, "8192CU", 6); + memcpy(wpsie + wpsielen, "8192CU", 6); wpsielen += 6; /* Model Number */ @@ -5695,7 +5695,7 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) wpsielen += 2; /* Value: */ - _rtw_memcpy(wpsie + wpsielen, "123456" , ETH_ALEN); + memcpy(wpsie + wpsielen, "123456" , ETH_ALEN); wpsielen += ETH_ALEN; /* Primary Device Type */ @@ -5730,7 +5730,7 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) wpsielen += 2; /* Value: */ - _rtw_memcpy(wpsie + wpsielen, pwdinfo->device_name, pwdinfo->device_name_len); + memcpy(wpsie + wpsielen, pwdinfo->device_name, pwdinfo->device_name_len); wpsielen += pwdinfo->device_name_len; /* Config Method */ @@ -5822,20 +5822,20 @@ int _issue_probereq_p2p(_adapter *padapter, u8 *da, int wait_ack) *(fctrl) = 0; if (da) { - _rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, da, ETH_ALEN); + memcpy(pwlanhdr->addr1, da, ETH_ALEN); + memcpy(pwlanhdr->addr3, da, ETH_ALEN); } else { if ((pwdinfo->p2p_info.scan_op_ch_only) || (pwdinfo->rx_invitereq_info.scan_op_ch_only)) { /* This two flags will be set when this is only the P2P client mode. */ - _rtw_memcpy(pwlanhdr->addr1, pwdinfo->p2p_peer_interface_addr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, pwdinfo->p2p_peer_interface_addr, ETH_ALEN); + memcpy(pwlanhdr->addr1, pwdinfo->p2p_peer_interface_addr, ETH_ALEN); + memcpy(pwlanhdr->addr3, pwdinfo->p2p_peer_interface_addr, ETH_ALEN); } else { /* broadcast probe request frame */ - _rtw_memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, bc_addr, ETH_ALEN); + memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); + memcpy(pwlanhdr->addr3, bc_addr, ETH_ALEN); } } - _rtw_memcpy(pwlanhdr->addr2, mac, ETH_ALEN); + memcpy(pwlanhdr->addr2, mac, ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -5855,12 +5855,12 @@ int _issue_probereq_p2p(_adapter *padapter, u8 *da, int wait_ack) if (adapter_wdev_data(padapter)->p2p_enabled && pwdinfo->driver_interface == DRIVER_CFG80211) { if (pmlmepriv->wps_probe_req_ie != NULL && pmlmepriv->p2p_probe_req_ie != NULL) { /* WPS IE */ - _rtw_memcpy(pframe, pmlmepriv->wps_probe_req_ie, pmlmepriv->wps_probe_req_ie_len); + memcpy(pframe, pmlmepriv->wps_probe_req_ie, pmlmepriv->wps_probe_req_ie_len); pattrib->pktlen += pmlmepriv->wps_probe_req_ie_len; pframe += pmlmepriv->wps_probe_req_ie_len; /* P2P IE */ - _rtw_memcpy(pframe, pmlmepriv->p2p_probe_req_ie, pmlmepriv->p2p_probe_req_ie_len); + memcpy(pframe, pmlmepriv->p2p_probe_req_ie, pmlmepriv->p2p_probe_req_ie_len); pattrib->pktlen += pmlmepriv->p2p_probe_req_ie_len; pframe += pmlmepriv->p2p_probe_req_ie_len; } @@ -5902,9 +5902,9 @@ int _issue_probereq_p2p(_adapter *padapter, u8 *da, int wait_ack) /* Value: */ if (pwdinfo->external_uuid == 0) { memset(wpsie + wpsielen, 0x0, 16); - _rtw_memcpy(wpsie + wpsielen, mac, ETH_ALEN); + memcpy(wpsie + wpsielen, mac, ETH_ALEN); } else - _rtw_memcpy(wpsie + wpsielen, pwdinfo->uuid, 0x10); + memcpy(wpsie + wpsielen, pwdinfo->uuid, 0x10); wpsielen += 0x10; /* Config Method */ @@ -5931,7 +5931,7 @@ int _issue_probereq_p2p(_adapter *padapter, u8 *da, int wait_ack) wpsielen += 2; /* Value: */ - _rtw_memcpy(wpsie + wpsielen, pwdinfo->device_name, pwdinfo->device_name_len); + memcpy(wpsie + wpsielen, pwdinfo->device_name, pwdinfo->device_name_len); wpsielen += pwdinfo->device_name_len; /* Primary Device Type */ @@ -6238,7 +6238,7 @@ unsigned int on_action_public_p2p(union recv_frame *precv_frame) /* Commented by Kurt 20120113 */ /* Get peer_dev_addr here if peer doesn't issue prov_disc frame. */ if (_rtw_memcmp(pwdinfo->rx_prov_disc_info.peerDevAddr, empty_addr, ETH_ALEN)) - _rtw_memcpy(pwdinfo->rx_prov_disc_info.peerDevAddr, get_addr2_ptr(pframe), ETH_ALEN); + memcpy(pwdinfo->rx_prov_disc_info.peerDevAddr, get_addr2_ptr(pframe), ETH_ALEN); result = process_p2p_group_negotation_req(pwdinfo, frame_body, len); issue_p2p_GO_response(padapter, get_addr2_ptr(pframe), frame_body, len, result); @@ -6400,7 +6400,7 @@ unsigned int on_action_public_p2p(union recv_frame *precv_frame) } else { rtw_p2p_set_state(pwdinfo, P2P_STATE_RECV_INVITE_REQ_DISMATCH); #ifdef CONFIG_INTEL_WIDI - _rtw_memcpy(pwdinfo->p2p_peer_device_addr, group_id.go_device_addr , ETH_ALEN); + memcpy(pwdinfo->p2p_peer_device_addr, group_id.go_device_addr , ETH_ALEN); rtw_p2p_set_role(pwdinfo, P2P_ROLE_CLIENT); #endif /* CONFIG_INTEL_WIDI */ @@ -6428,7 +6428,7 @@ unsigned int on_action_public_p2p(union recv_frame *precv_frame) /* The peer device address should be the destination address for the provisioning discovery request. */ /* Then, this Wi-Fi device should use the iwpriv command to get the peer interface address. */ /* The peer interface address should be the address for WPS mac address */ - _rtw_memcpy(pwdinfo->p2p_peer_device_addr, group_id.go_device_addr , ETH_ALEN); + memcpy(pwdinfo->p2p_peer_device_addr, group_id.go_device_addr , ETH_ALEN); rtw_p2p_set_role(pwdinfo, P2P_ROLE_CLIENT); rtw_p2p_set_state(pwdinfo, P2P_STATE_RECV_INVITE_REQ_JOIN); status_code = P2P_STATUS_SUCCESS; @@ -6511,7 +6511,7 @@ unsigned int on_action_public_p2p(union recv_frame *precv_frame) case P2P_PROVISION_DISC_REQ: RTW_INFO("[%s] Got Provisioning Discovery Request Frame\n", __FUNCTION__); process_p2p_provdisc_req(pwdinfo, pframe, len); - _rtw_memcpy(pwdinfo->rx_prov_disc_info.peerDevAddr, get_addr2_ptr(pframe), ETH_ALEN); + memcpy(pwdinfo->rx_prov_disc_info.peerDevAddr, get_addr2_ptr(pframe), ETH_ALEN); /* 20110902 Kurt */ /* Add the following statement to avoid receiving duplicate prov disc req. such that pre_p2p_state would be covered. */ @@ -6684,7 +6684,7 @@ static u8 rtw_wnm_nb_elem_parsing( subelem_len = *(ptr+1); if (from_btm) { pcandidate = (pcandidates + i); - _rtw_memcpy(&pcandidate->nb_rpt, pie, sizeof(struct nb_rpt_hdr)); + memcpy(&pcandidate->nb_rpt, pie, sizeof(struct nb_rpt_hdr)); if (op && (op_len !=0)) { pcandidate->preference = *(op + 2); bfound = _TRUE; @@ -6700,7 +6700,7 @@ static u8 rtw_wnm_nb_elem_parsing( } else { if (_rtw_memcmp(&pnb->nb_rpt[i], pie, sizeof(struct nb_rpt_hdr)) == _FALSE) *nb_rpt_is_same = _FALSE; - _rtw_memcpy(&pnb->nb_rpt[i], pie, sizeof(struct nb_rpt_hdr)); + memcpy(&pnb->nb_rpt[i], pie, sizeof(struct nb_rpt_hdr)); } nb_rpt_entries++; } @@ -6739,9 +6739,9 @@ static u8 rtw_wnm_candidates_sorting( if (pos != i) { updated = _TRUE; - _rtw_memcpy(&swap, (pcandidates+i), sizeof(struct wnm_btm_cant)); - _rtw_memcpy((pcandidates+i), (pcandidates+pos), sizeof(struct wnm_btm_cant)); - _rtw_memcpy((pcandidates+pos), &swap, sizeof(struct wnm_btm_cant)); + memcpy(&swap, (pcandidates+i), sizeof(struct wnm_btm_cant)); + memcpy((pcandidates+i), (pcandidates+pos), sizeof(struct wnm_btm_cant)); + memcpy((pcandidates+pos), &swap, sizeof(struct wnm_btm_cant)); } } return updated; @@ -6767,7 +6767,7 @@ static void rtw_wnm_nb_info_update( if (_rtw_memcmp(&pnb->nb_rpt[i], &pcand->nb_rpt, sizeof(struct nb_rpt_hdr)) == _FALSE) *nb_rpt_is_same = _FALSE; - _rtw_memcpy(&pnb->nb_rpt[i], &pcand->nb_rpt, sizeof(struct nb_rpt_hdr)); + memcpy(&pnb->nb_rpt[i], &pcand->nb_rpt, sizeof(struct nb_rpt_hdr)); } RTW_DBG("WNM: bssid(" MAC_FMT @@ -6813,7 +6813,7 @@ static void rtw_wnm_btm_candidate_select(_adapter *padapter) } if (bfound) { - _rtw_memcpy(pnb->roam_target_addr, pnb->nb_rpt[i].bssid, ETH_ALEN); + memcpy(pnb->roam_target_addr, pnb->nb_rpt[i].bssid, ETH_ALEN); RTW_INFO("WNM : select btm entry(%d) - %s("MAC_FMT", ch%u) rssi:%d\n" , i , pnetwork->network.Ssid.Ssid @@ -6948,7 +6948,7 @@ unsigned int OnAction_ft(_adapter *padapter, union recv_frame *precv_frame) receive_disconnect(padapter, pmlmepriv->cur_network.network.MacAddress, WLAN_REASON_ACTIVE_ROAM, _FALSE); pft_roam->ft_action_len = frame_len; - _rtw_memcpy(pft_roam->ft_action, pframe, rtw_min(frame_len, RTW_FT_MAX_IE_SZ)); + memcpy(pft_roam->ft_action, pframe, rtw_min(frame_len, RTW_FT_MAX_IE_SZ)); ret = _SUCCESS; break; case RTW_WLAN_ACTION_FT_REQ: @@ -7052,7 +7052,7 @@ static void rtw_wnm_btm_req_hdr_parsing(u8* pframe, struct btm_req_hdr *phdr) phdr->disassoc_timer = wnm_btm_disassoc_timer(pframe); phdr->validity_interval = wnm_btm_valid_interval(pframe); if (wnm_btm_bss_term_inc(pframe)) { - _rtw_memcpy(&phdr->term_duration, + memcpy(&phdr->term_duration, wnm_btm_term_duration_offset(pframe), sizeof(struct btm_term_duration)); } @@ -7154,9 +7154,9 @@ void rtw_wnm_issue_action(_adapter *padapter, u8 action, u8 reason) fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); + memcpy(pwlanhdr->addr1, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -7253,7 +7253,7 @@ unsigned int OnAction_sa_query(_adapter *padapter, union recv_frame *precv_frame switch (pframe[WLAN_HDR_A3_LEN + 1]) { case 0: /* SA Query req */ - _rtw_memcpy(&tid, &pframe[WLAN_HDR_A3_LEN + 2], sizeof(u16)); + memcpy(&tid, &pframe[WLAN_HDR_A3_LEN + 2], sizeof(u16)); RTW_INFO("OnAction_sa_query request,action=%d, tid=%04x, pframe=%02x-%02x\n" , pframe[WLAN_HDR_A3_LEN + 1], tid, pframe[WLAN_HDR_A3_LEN + 2], pframe[WLAN_HDR_A3_LEN + 3]); issue_action_SA_Query(padapter, get_addr2_ptr(pframe), 1, tid, IEEE80211W_RIGHT_KEY); @@ -7264,7 +7264,7 @@ unsigned int OnAction_sa_query(_adapter *padapter, union recv_frame *precv_frame if (psta != NULL) _cancel_timer_ex(&psta->dot11w_expire_timer); - _rtw_memcpy(&tid, &pframe[WLAN_HDR_A3_LEN + 2], sizeof(u16)); + memcpy(&tid, &pframe[WLAN_HDR_A3_LEN + 2], sizeof(u16)); RTW_INFO("OnAction_sa_query response,action=%d, tid=%04x, cancel timer\n", pframe[WLAN_HDR_A3_LEN + 1], tid); break; default: @@ -7646,8 +7646,8 @@ void update_mgntframe_attrib_addr(_adapter *padapter, struct xmit_frame *pmgntfr pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; - _rtw_memcpy(pattrib->ra, GetAddr1Ptr(pframe), ETH_ALEN); - _rtw_memcpy(pattrib->ta, get_addr2_ptr(pframe), ETH_ALEN); + memcpy(pattrib->ra, GetAddr1Ptr(pframe), ETH_ALEN); + memcpy(pattrib->ta, get_addr2_ptr(pframe), ETH_ALEN); #if defined(CONFIG_BEAMFORMING) || defined(CONFIG_ANTENNA_DIVERSITY) sta = pattrib->psta; @@ -7760,7 +7760,7 @@ int update_hidden_ssid(u8 *ies, u32 ies_len, u8 hidden_ssid_mode) remain_len = ies_len - (next_ie - ies); ssid_ie[1] = 0; - _rtw_memcpy(ssid_ie + 2, next_ie, remain_len); + memcpy(ssid_ie + 2, next_ie, remain_len); len_diff -= ssid_len_ori; break; @@ -7838,9 +7838,9 @@ void issue_beacon(_adapter *padapter, int timeout_ms) fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN); + memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN); SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/); /* pmlmeext->mgnt_seq++; */ @@ -7870,20 +7870,20 @@ void issue_beacon(_adapter *padapter, int timeout_ms) #ifdef CONFIG_IOCTL_CFG80211 if (adapter_wdev_data(padapter)->p2p_enabled && pwdinfo->driver_interface == DRIVER_CFG80211) { if (pmlmepriv->wps_beacon_ie && pmlmepriv->wps_beacon_ie_len > 0) { - _rtw_memcpy(pframe, cur_network->IEs, wps_offset); + memcpy(pframe, cur_network->IEs, wps_offset); pframe += wps_offset; pattrib->pktlen += wps_offset; - _rtw_memcpy(pframe, pmlmepriv->wps_beacon_ie, pmlmepriv->wps_beacon_ie_len); + memcpy(pframe, pmlmepriv->wps_beacon_ie, pmlmepriv->wps_beacon_ie_len); pframe += pmlmepriv->wps_beacon_ie_len; pattrib->pktlen += pmlmepriv->wps_beacon_ie_len; /* copy remainder_ie to pframe */ - _rtw_memcpy(pframe, premainder_ie, remainder_ielen); + memcpy(pframe, premainder_ie, remainder_ielen); pframe += remainder_ielen; pattrib->pktlen += remainder_ielen; } else { - _rtw_memcpy(pframe, cur_network->IEs, cur_network->IELength); + memcpy(pframe, cur_network->IEs, cur_network->IELength); pframe += cur_network->IELength; pattrib->pktlen += cur_network->IELength; } @@ -7891,7 +7891,7 @@ void issue_beacon(_adapter *padapter, int timeout_ms) #endif /* CONFIG_IOCTL_CFG80211 */ { pframe_wscie = pframe + wps_offset; - _rtw_memcpy(pframe, cur_network->IEs, wps_offset + wpsielen); + memcpy(pframe, cur_network->IEs, wps_offset + wpsielen); pframe += (wps_offset + wpsielen); pattrib->pktlen += (wps_offset + wpsielen); @@ -7929,7 +7929,7 @@ void issue_beacon(_adapter *padapter, int timeout_ms) insert_len += 2; /* Value: */ - _rtw_memcpy(pframe + insert_len, pwdinfo->device_name, pwdinfo->device_name_len); + memcpy(pframe + insert_len, pwdinfo->device_name, pwdinfo->device_name_len); insert_len += pwdinfo->device_name_len; @@ -7941,7 +7941,7 @@ void issue_beacon(_adapter *padapter, int timeout_ms) pattrib->pktlen += insert_len; /* copy remainder_ie to pframe */ - _rtw_memcpy(pframe, premainder_ie, remainder_ielen); + memcpy(pframe, premainder_ie, remainder_ielen); pframe += remainder_ielen; pattrib->pktlen += remainder_ielen; } @@ -7949,7 +7949,7 @@ void issue_beacon(_adapter *padapter, int timeout_ms) #endif /* CONFIG_P2P */ { int len_diff; - _rtw_memcpy(pframe, cur_network->IEs, cur_network->IELength); + memcpy(pframe, cur_network->IEs, cur_network->IELength); len_diff = update_hidden_ssid( pframe + _BEACON_IE_OFFSET_ , cur_network->IELength - _BEACON_IE_OFFSET_ @@ -7986,7 +7986,7 @@ void issue_beacon(_adapter *padapter, int timeout_ms) if (adapter_wdev_data(padapter)->p2p_enabled && pwdinfo->driver_interface == DRIVER_CFG80211) { len = pmlmepriv->p2p_beacon_ie_len; if (pmlmepriv->p2p_beacon_ie && len > 0) - _rtw_memcpy(pframe, pmlmepriv->p2p_beacon_ie, len); + memcpy(pframe, pmlmepriv->p2p_beacon_ie, len); } else #endif /* CONFIG_IOCTL_CFG80211 */ { @@ -8030,14 +8030,14 @@ void issue_beacon(_adapter *padapter, int timeout_ms) /* 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; pattrib->pktlen += 2; /* 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; pattrib->pktlen += 2; @@ -8149,9 +8149,9 @@ void issue_probersp(_adapter *padapter, unsigned char *da, u8 is_valid_p2p_probe fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, mac, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, bssid, ETH_ALEN); + memcpy(pwlanhdr->addr1, da, ETH_ALEN); + memcpy(pwlanhdr->addr2, mac, ETH_ALEN); + memcpy(pwlanhdr->addr3, bssid, ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -8180,24 +8180,24 @@ void issue_probersp(_adapter *padapter, unsigned char *da, u8 is_valid_p2p_probe remainder_ielen = cur_network->IELength - wps_offset - wps_ielen; - _rtw_memcpy(pframe, cur_network->IEs, wps_offset); + memcpy(pframe, cur_network->IEs, wps_offset); pframe += wps_offset; pattrib->pktlen += wps_offset; wps_ielen = (uint)pmlmepriv->wps_probe_resp_ie[1];/* to get ie data len */ if ((wps_offset + wps_ielen + 2) <= MAX_IE_SZ) { - _rtw_memcpy(pframe, pmlmepriv->wps_probe_resp_ie, wps_ielen + 2); + memcpy(pframe, pmlmepriv->wps_probe_resp_ie, wps_ielen + 2); pframe += wps_ielen + 2; pattrib->pktlen += wps_ielen + 2; } if ((wps_offset + wps_ielen + 2 + remainder_ielen) <= MAX_IE_SZ) { - _rtw_memcpy(pframe, premainder_ie, remainder_ielen); + memcpy(pframe, premainder_ie, remainder_ielen); pframe += remainder_ielen; pattrib->pktlen += remainder_ielen; } } else { - _rtw_memcpy(pframe, cur_network->IEs, cur_network->IELength); + memcpy(pframe, cur_network->IEs, cur_network->IELength); pframe += cur_network->IELength; pattrib->pktlen += cur_network->IELength; } @@ -8226,10 +8226,10 @@ void issue_probersp(_adapter *padapter, unsigned char *da, u8 is_valid_p2p_probe remainder_ielen = MAX_IE_SZ; } - _rtw_memcpy(buf, remainder_ie, remainder_ielen); - _rtw_memcpy(remainder_ie + ssid_ielen_diff, buf, remainder_ielen); + memcpy(buf, remainder_ie, remainder_ielen); + memcpy(remainder_ie + ssid_ielen_diff, buf, remainder_ielen); *(ssid_ie + 1) = cur_network->Ssid.SsidLength; - _rtw_memcpy(ssid_ie + 2, cur_network->Ssid.Ssid, cur_network->Ssid.SsidLength); + memcpy(ssid_ie + 2, cur_network->Ssid.Ssid, cur_network->Ssid.SsidLength); pframe += ssid_ielen_diff; pattrib->pktlen += ssid_ielen_diff; @@ -8251,14 +8251,14 @@ void issue_probersp(_adapter *padapter, unsigned char *da, u8 is_valid_p2p_probe /* 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; pattrib->pktlen += 2; /* 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; pattrib->pktlen += 2; @@ -8313,7 +8313,7 @@ void issue_probersp(_adapter *padapter, unsigned char *da, u8 is_valid_p2p_probe /* if pwdinfo->role == P2P_ROLE_DEVICE will call issue_probersp_p2p() */ len = pmlmepriv->p2p_go_probe_resp_ie_len; if (pmlmepriv->p2p_go_probe_resp_ie && len > 0) - _rtw_memcpy(pframe, pmlmepriv->p2p_go_probe_resp_ie, len); + memcpy(pframe, pmlmepriv->p2p_go_probe_resp_ie, len); } else #endif /* CONFIG_IOCTL_CFG80211 */ { @@ -8355,10 +8355,10 @@ void issue_probersp(_adapter *padapter, unsigned char *da, u8 is_valid_p2p_probe psta->pid, MAC_ARG(psta->cmn.mac_addr), cu_ch); /* append vendor specific ie */ - _rtw_memcpy(RC_INFO, RC_OUI, sizeof(RC_OUI)); - _rtw_memcpy(&RC_INFO[4], mac, ETH_ALEN); - _rtw_memcpy(&RC_INFO[10], (u8 *)&psta->pid, 2); - _rtw_memcpy(&RC_INFO[12], (u8 *)&cu_ch, 2); + memcpy(RC_INFO, RC_OUI, sizeof(RC_OUI)); + memcpy(&RC_INFO[4], mac, ETH_ALEN); + memcpy(&RC_INFO[10], (u8 *)&psta->pid, 2); + memcpy(&RC_INFO[12], (u8 *)&cu_ch, 2); pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, sizeof(RC_INFO), RC_INFO, &pattrib->pktlen); } @@ -8428,15 +8428,15 @@ int _issue_probereq(_adapter *padapter, const NDIS_802_11_SSID *pssid, const u8 if (da) { /* unicast probe request frame */ - _rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, da, ETH_ALEN); + memcpy(pwlanhdr->addr1, da, ETH_ALEN); + memcpy(pwlanhdr->addr3, da, ETH_ALEN); } else { /* broadcast probe request frame */ - _rtw_memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, bc_addr, ETH_ALEN); + memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); + memcpy(pwlanhdr->addr3, bc_addr, ETH_ALEN); } - _rtw_memcpy(pwlanhdr->addr2, mac, ETH_ALEN); + memcpy(pwlanhdr->addr2, mac, ETH_ALEN); #ifdef CONFIG_RTW_CFGVENDOR_RANDOM_MAC_OUI if ((pwdev_priv->pno_mac_addr[0] != 0xFF) @@ -8489,7 +8489,7 @@ int _issue_probereq(_adapter *padapter, const NDIS_802_11_SSID *pssid, const u8 if (append_wps) { /* add wps_ie for wps2.0 */ if (pmlmepriv->wps_probe_req_ie_len > 0 && pmlmepriv->wps_probe_req_ie) { - _rtw_memcpy(pframe, pmlmepriv->wps_probe_req_ie, pmlmepriv->wps_probe_req_ie_len); + memcpy(pframe, pmlmepriv->wps_probe_req_ie, pmlmepriv->wps_probe_req_ie_len); pframe += pmlmepriv->wps_probe_req_ie_len; pattrib->pktlen += pmlmepriv->wps_probe_req_ie_len; /* pmlmepriv->wps_probe_req_ie_len = 0 ; */ /* reset to zero */ @@ -8617,9 +8617,9 @@ void issue_auth(_adapter *padapter, struct sta_info *psta, unsigned short status if (psta) { /* for AP mode */ #ifdef CONFIG_NATIVEAP_MLME - _rtw_memcpy(pwlanhdr->addr1, psta->cmn.mac_addr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr1, psta->cmn.mac_addr, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN); /* setting auth algo number */ @@ -8650,9 +8650,9 @@ void issue_auth(_adapter *padapter, struct sta_info *psta, unsigned short status pframe = rtw_set_ie(pframe, _CHLGETXT_IE_, 128, psta->chg_txt, &(pattrib->pktlen)); #endif } else { - _rtw_memcpy(pwlanhdr->addr1, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); + memcpy(pwlanhdr->addr1, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); #ifdef CONFIG_RTW_80211R if (rtw_ft_roam(padapter)) { @@ -8771,9 +8771,9 @@ void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *p fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy((void *)GetAddr1Ptr(pwlanhdr), pstat->cmn.mac_addr, ETH_ALEN); - _rtw_memcpy((void *)get_addr2_ptr(pwlanhdr), adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy((void *)GetAddr3Ptr(pwlanhdr), get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy((void *)GetAddr1Ptr(pwlanhdr), pstat->cmn.mac_addr, ETH_ALEN); + memcpy((void *)get_addr2_ptr(pwlanhdr), adapter_mac_addr(padapter), ETH_ALEN); + memcpy((void *)GetAddr3Ptr(pwlanhdr), get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); @@ -8812,7 +8812,7 @@ void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *p /* Association Comeback time */ timeout_itvl[0] = 0x03; timeout_interval = cpu_to_le32(timeout_interval); - _rtw_memcpy(timeout_itvl + 1, &timeout_interval, 4); + memcpy(timeout_itvl + 1, &timeout_interval, 4); pframe = rtw_set_ie(pframe, _TIMEOUT_ITVL_IE_, 5, timeout_itvl, &(pattrib->pktlen)); } #endif /* CONFIG_IEEE80211W */ @@ -8825,7 +8825,7 @@ void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *p /* p = hostapd_eid_ht_capabilities_info(hapd, p); */ pbuf = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _HT_CAPABILITY_IE_, &ie_len, (pnetwork->IELength - _BEACON_IE_OFFSET_)); if (pbuf && ie_len > 0) { - _rtw_memcpy(pframe, pbuf, ie_len + 2); + memcpy(pframe, pbuf, ie_len + 2); pframe += (ie_len + 2); pattrib->pktlen += (ie_len + 2); } @@ -8834,7 +8834,7 @@ void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *p /* p = hostapd_eid_ht_operation(hapd, p); */ pbuf = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _HT_ADD_INFO_IE_, &ie_len, (pnetwork->IELength - _BEACON_IE_OFFSET_)); if (pbuf && ie_len > 0) { - _rtw_memcpy(pframe, pbuf, ie_len + 2); + memcpy(pframe, pbuf, ie_len + 2); pframe += (ie_len + 2); pattrib->pktlen += (ie_len + 2); } @@ -8848,7 +8848,7 @@ void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *p pbuf = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _EXT_CAP_IE_, &ie_len, (pnetwork->IELength - _BEACON_IE_OFFSET_)); if (pbuf && ie_len > 0) { - _rtw_memcpy(pframe, pbuf, ie_len + 2); + memcpy(pframe, pbuf, ie_len + 2); pframe += (ie_len + 2); pattrib->pktlen += (ie_len + 2); } @@ -8863,7 +8863,7 @@ void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *p /* FILL VHT CAP IE */ pbuf = rtw_get_ie(ie + _BEACON_IE_OFFSET_, EID_VHTCapability, &ie_len, (pnetwork->IELength - _BEACON_IE_OFFSET_)); if (pbuf && ie_len > 0) { - _rtw_memcpy(pframe, pbuf, ie_len + 2); + memcpy(pframe, pbuf, ie_len + 2); pframe += (ie_len + 2); pattrib->pktlen += (ie_len + 2); } @@ -8871,7 +8871,7 @@ void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *p /* FILL VHT OPERATION IE */ pbuf = rtw_get_ie(ie + _BEACON_IE_OFFSET_, EID_VHTOperation, &ie_len, (pnetwork->IELength - _BEACON_IE_OFFSET_)); if (pbuf && ie_len > 0) { - _rtw_memcpy(pframe, pbuf, ie_len + 2); + memcpy(pframe, pbuf, ie_len + 2); pframe += (ie_len + 2); pattrib->pktlen += (ie_len + 2); } @@ -8886,7 +8886,7 @@ void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *p for (pbuf = ie + _BEACON_IE_OFFSET_; ; pbuf += (ie_len + 2)) { pbuf = rtw_get_ie(pbuf, _VENDOR_SPECIFIC_IE_, &ie_len, (pnetwork->IELength - _BEACON_IE_OFFSET_ - (ie_len + 2))); if (pbuf && _rtw_memcmp(pbuf + 2, WMM_PARA_IE, 6)) { - _rtw_memcpy(pframe, pbuf, ie_len + 2); + memcpy(pframe, pbuf, ie_len + 2); pframe += (ie_len + 2); pattrib->pktlen += (ie_len + 2); @@ -8905,7 +8905,7 @@ void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *p /* add WPS IE ie for wps 2.0 */ if (pmlmepriv->wps_assoc_resp_ie && pmlmepriv->wps_assoc_resp_ie_len > 0) { - _rtw_memcpy(pframe, pmlmepriv->wps_assoc_resp_ie, pmlmepriv->wps_assoc_resp_ie_len); + memcpy(pframe, pmlmepriv->wps_assoc_resp_ie, pmlmepriv->wps_assoc_resp_ie_len); pframe += pmlmepriv->wps_assoc_resp_ie_len; pattrib->pktlen += pmlmepriv->wps_assoc_resp_ie_len; @@ -8919,7 +8919,7 @@ void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *p len = 0; if (pmlmepriv->p2p_assoc_resp_ie && pmlmepriv->p2p_assoc_resp_ie_len > 0) { len = pmlmepriv->p2p_assoc_resp_ie_len; - _rtw_memcpy(pframe, pmlmepriv->p2p_assoc_resp_ie, len); + memcpy(pframe, pmlmepriv->p2p_assoc_resp_ie, len); } } else len = build_assoc_resp_p2p_ie(pwdinfo, pframe, pstat->p2p_status_code); @@ -9007,9 +9007,9 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc) fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -9024,11 +9024,11 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc) /* caps */ #ifdef CONFIG_DFS - _rtw_memcpy(&cap, rtw_get_capability_from_ie(pmlmeinfo->network.IEs), 2); + memcpy(&cap, rtw_get_capability_from_ie(pmlmeinfo->network.IEs), 2); cap |= cap_SpecMgmt; - _rtw_memcpy(pframe, &cap, 2); + memcpy(pframe, &cap, 2); #else - _rtw_memcpy(pframe, rtw_get_capability_from_ie(pmlmeinfo->network.IEs), 2); + memcpy(pframe, rtw_get_capability_from_ie(pmlmeinfo->network.IEs), 2); #endif /* CONFIG_DFS */ pframe += 2; @@ -9037,13 +9037,13 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc) /* listen interval */ /* todo: listen interval for power saving */ val16 = cpu_to_le16(3); - _rtw_memcpy(pframe , (unsigned char *)&val16, 2); + memcpy(pframe , (unsigned char *)&val16, 2); pframe += 2; pattrib->pktlen += 2; /*Construct Current AP Field for Reassoc-Req only*/ if (is_reassoc == _TRUE) { - _rtw_memcpy(pframe, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pframe, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); pframe += ETH_ALEN; pattrib->pktlen += ETH_ALEN; } @@ -9210,7 +9210,7 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc) case EID_HTCapability: if (padapter->mlmepriv.htpriv.ht_option == _TRUE) { if (!(is_ap_in_tkip(padapter))) { - _rtw_memcpy(&(pmlmeinfo->HT_caps), pIE->data, sizeof(struct HT_caps_element)); + memcpy(&(pmlmeinfo->HT_caps), pIE->data, sizeof(struct HT_caps_element)); pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info = cpu_to_le16(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info); @@ -9256,7 +9256,7 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc) #ifdef CONFIG_IOCTL_CFG80211 if (adapter_wdev_data(padapter)->p2p_enabled && pwdinfo->driver_interface == DRIVER_CFG80211) { if (pmlmepriv->p2p_assoc_req_ie && pmlmepriv->p2p_assoc_req_ie_len > 0) { - _rtw_memcpy(pframe, pmlmepriv->p2p_assoc_req_ie, pmlmepriv->p2p_assoc_req_ie_len); + memcpy(pframe, pmlmepriv->p2p_assoc_req_ie, pmlmepriv->p2p_assoc_req_ie_len); pframe += pmlmepriv->p2p_assoc_req_ie_len; pattrib->pktlen += pmlmepriv->p2p_assoc_req_ie_len; } @@ -9328,7 +9328,7 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc) /* Value: */ /* P2P Device Address */ - _rtw_memcpy(p2pie + p2pielen, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(p2pie + p2pielen, adapter_mac_addr(padapter), ETH_ALEN); p2pielen += ETH_ALEN; /* Config Method */ @@ -9367,7 +9367,7 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc) p2pielen += 2; /* 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; /* P2P Interface */ @@ -9379,12 +9379,12 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc) p2pielen += 2; /* Value: */ - _rtw_memcpy(p2pie + p2pielen, pwdinfo->device_addr, ETH_ALEN); /* P2P Device Address */ + memcpy(p2pie + p2pielen, pwdinfo->device_addr, ETH_ALEN); /* P2P Device Address */ p2pielen += ETH_ALEN; p2pie[p2pielen++] = 1; /* P2P Interface Address Count */ - _rtw_memcpy(p2pie + p2pielen, pwdinfo->device_addr, ETH_ALEN); /* P2P Interface Address List */ + memcpy(p2pie + p2pielen, pwdinfo->device_addr, ETH_ALEN); /* P2P Interface Address List */ p2pielen += ETH_ALEN; pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &pattrib->pktlen); @@ -9493,16 +9493,16 @@ static int _issue_nulldata(_adapter *padapter, unsigned char *da, unsigned int p SetPwrMgt(fctrl); if (get_tofr_ds(fctrl) == 3) { - _rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, da, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr4, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr1, da, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, da, ETH_ALEN); + memcpy(pwlanhdr->addr4, adapter_mac_addr(padapter), ETH_ALEN); a4_shift = ETH_ALEN; pattrib->hdrlen += ETH_ALEN; } else { - _rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr1, da, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); a4_shift = 0; } @@ -9639,16 +9639,16 @@ static int _issue_qos_nulldata(_adapter *padapter, unsigned char *da, u16 tid, u SetMData(fctrl); if (get_tofr_ds(fctrl) == 3) { - _rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, da, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr4, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr1, da, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, da, ETH_ALEN); + memcpy(pwlanhdr->addr4, adapter_mac_addr(padapter), ETH_ALEN); a4_shift = ETH_ALEN; pattrib->hdrlen += ETH_ALEN; } else { - _rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr1, da, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); a4_shift = 0; } @@ -9780,9 +9780,9 @@ static int _issue_deauth(_adapter *padapter, unsigned char *da, unsigned short r fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr1, da, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -9903,9 +9903,9 @@ void issue_action_spct_ch_switch(_adapter *padapter, u8 *ra, u8 new_ch, u8 ch_of fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN); /* RA */ - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); /* TA */ - _rtw_memcpy(pwlanhdr->addr3, ra, ETH_ALEN); /* DA = RA */ + memcpy(pwlanhdr->addr1, ra, ETH_ALEN); /* RA */ + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); /* TA */ + memcpy(pwlanhdr->addr3, ra, ETH_ALEN); /* DA = RA */ SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -9976,11 +9976,11 @@ void issue_action_SA_Query(_adapter *padapter, unsigned char *raddr, unsigned ch *(fctrl) = 0; if (raddr) - _rtw_memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); + memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); else - _rtw_memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -10078,10 +10078,10 @@ static int issue_action_ba(_adapter *padapter, unsigned char *raddr, unsigned ch fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - /* _rtw_memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); */ - _rtw_memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + /* memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); */ + memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -10416,9 +10416,9 @@ void issue_action_BSSCoexistPacket(_adapter *padapter) fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -10566,9 +10566,9 @@ int _issue_action_SM_PS(_adapter *padapter , unsigned char *raddr , u8 NewMimoP fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); /* RA */ - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); /* TA */ - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); /* DA = RA */ + memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); /* RA */ + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); /* TA */ + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); /* DA = RA */ SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -10952,7 +10952,7 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI /* below is to copy the information element */ bssid->IELength = len; - _rtw_memcpy(bssid->IEs, (pframe + sizeof(struct rtw_ieee80211_hdr_3addr)), bssid->IELength); + memcpy(bssid->IEs, (pframe + sizeof(struct rtw_ieee80211_hdr_3addr)), bssid->IELength); /* get the signal strength */ /* bssid->Rssi = precv_frame->u.hdr.attrib.SignalStrength; */ /* 0-100 index. */ @@ -10985,7 +10985,7 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI RTW_INFO("%s()-%d: IE too long (%d) for survey event\n", __FUNCTION__, __LINE__, len); return _FAIL; } - _rtw_memcpy(bssid->Ssid.Ssid, (p + 2), *(p + 1)); + memcpy(bssid->Ssid.Ssid, (p + 2), *(p + 1)); bssid->Ssid.SsidLength = *(p + 1); } else bssid->Ssid.SsidLength = 0; @@ -11005,7 +11005,7 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI RTW_DBG_DUMP("Invalidated Support Rate IE --", p, len+2); return _FAIL; } - _rtw_memcpy(bssid->SupportedRates, (p + 2), len); + memcpy(bssid->SupportedRates, (p + 2), len); i = len; } @@ -11020,7 +11020,7 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI RTW_DBG_DUMP("Invalidated EXT Support Rate IE --", p, len+2); return _FAIL; } - _rtw_memcpy(bssid->SupportedRates + i, (p + 2), len); + memcpy(bssid->SupportedRates + i, (p + 2), len); } /* todo: */ @@ -11053,7 +11053,7 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI /* FIXME */ bssid->InfrastructureMode = Ndis802_11Infrastructure; - _rtw_memcpy(bssid->MacAddress, get_addr2_ptr(pframe), ETH_ALEN); + memcpy(bssid->MacAddress, get_addr2_ptr(pframe), ETH_ALEN); bssid->Privacy = 1; return _SUCCESS; } @@ -11083,17 +11083,17 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI } } - _rtw_memcpy(&bssid->Configuration.BeaconPeriod, rtw_get_beacon_interval_from_ie(bssid->IEs), 2); + memcpy(&bssid->Configuration.BeaconPeriod, rtw_get_beacon_interval_from_ie(bssid->IEs), 2); bssid->Configuration.BeaconPeriod = le32_to_cpu(bssid->Configuration.BeaconPeriod); val16 = rtw_get_capability((WLAN_BSSID_EX *)bssid); if ((val16 & 0x03) == cap_ESS) { bssid->InfrastructureMode = Ndis802_11Infrastructure; - _rtw_memcpy(bssid->MacAddress, get_addr2_ptr(pframe), ETH_ALEN); + memcpy(bssid->MacAddress, get_addr2_ptr(pframe), ETH_ALEN); } else if ((val16 & 0x03) == cap_IBSS){ bssid->InfrastructureMode = Ndis802_11IBSS; - _rtw_memcpy(bssid->MacAddress, GetAddr3Ptr(pframe), ETH_ALEN); + memcpy(bssid->MacAddress, GetAddr3Ptr(pframe), ETH_ALEN); } else if ((val16 & 0x03) == 0x00){ u8 *mesh_id_ie, *mesh_conf_ie; sint mesh_id_ie_len, mesh_conf_ie_len; @@ -11110,7 +11110,7 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI RTW_INFO("Mesh ID too long (%d) for survey event\n", mesh_id_ie_len); return _FAIL; } - _rtw_memcpy(bssid->mesh_id.Ssid, (mesh_id_ie + 2), mesh_id_ie_len); + memcpy(bssid->mesh_id.Ssid, (mesh_id_ie + 2), mesh_id_ie_len); bssid->mesh_id.SsidLength = mesh_id_ie_len; } else bssid->mesh_id.SsidLength = 0; @@ -11125,11 +11125,11 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI } bssid->InfrastructureMode = Ndis802_11_mesh; - _rtw_memcpy(bssid->MacAddress, GetAddr3Ptr(pframe), ETH_ALEN); + memcpy(bssid->MacAddress, GetAddr3Ptr(pframe), ETH_ALEN); } else { /* default cases */ bssid->InfrastructureMode = Ndis802_11IBSS; - _rtw_memcpy(bssid->MacAddress, GetAddr3Ptr(pframe), ETH_ALEN); + memcpy(bssid->MacAddress, GetAddr3Ptr(pframe), ETH_ALEN); } } @@ -11180,7 +11180,7 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI #ifdef CONFIG_RTW_80211K p = rtw_get_ie(bssid->IEs + ie_offset, _EID_RRM_EN_CAP_IE_, &len, bssid->IELength - ie_offset); if (p) - _rtw_memcpy(bssid->PhyInfo.rm_en_cap, (p + 2), *(p + 1)); + memcpy(bssid->PhyInfo.rm_en_cap, (p + 2), *(p + 1)); /* save freerun counter */ bssid->PhyInfo.free_cnt = precv_frame->u.hdr.attrib.free_cnt; @@ -11500,7 +11500,7 @@ static void process_80211d(PADAPTER padapter, WLAN_BSSID_EX *bssid) ie += len; memset(country, 0, 4); - _rtw_memcpy(country, p, 3); + memcpy(country, p, 3); p += 3; RTW_INFO("%s: 802.11d country=%s\n", __FUNCTION__, country); @@ -11535,7 +11535,7 @@ static void process_80211d(PADAPTER padapter, WLAN_BSSID_EX *bssid) if (!chplan_sta) goto done_update_chplan_from_ap; - _rtw_memcpy(chplan_sta, rfctl->channel_set, sizeof(RT_CHANNEL_INFO) * MAX_CHANNEL_NUM); + memcpy(chplan_sta, rfctl->channel_set, sizeof(RT_CHANNEL_INFO) * MAX_CHANNEL_NUM); #ifdef CONFIG_RTW_DEBUG i = 0; RTW_INFO("%s: STA channel plan {", __FUNCTION__); @@ -11887,7 +11887,7 @@ u32 report_join_res(_adapter *padapter, int aid_res, u16 status) pc2h_evt_hdr->seq = atomic_inc_return(&pmlmeext->event_seq); pjoinbss_evt = (struct joinbss_event *)(pevtcmd + sizeof(struct C2HEvent_Header)); - _rtw_memcpy((unsigned char *)(&(pjoinbss_evt->network.network)), &(pmlmeinfo->network), sizeof(WLAN_BSSID_EX)); + memcpy((unsigned char *)(&(pjoinbss_evt->network.network)), &(pmlmeinfo->network), sizeof(WLAN_BSSID_EX)); pjoinbss_evt->network.join_res = pjoinbss_evt->network.aid = aid_res; RTW_INFO("report_join_res(%d, %u)\n", aid_res, status); @@ -11973,8 +11973,8 @@ u32 report_del_sta_event(_adapter *padapter, unsigned char *MacAddr, unsigned sh pc2h_evt_hdr->seq = atomic_inc_return(&pmlmeext->event_seq); pdel_sta_evt = (struct stadel_event *)(pevtcmd + sizeof(struct C2HEvent_Header)); - _rtw_memcpy((unsigned char *)(&(pdel_sta_evt->macaddr)), MacAddr, ETH_ALEN); - _rtw_memcpy((unsigned char *)(pdel_sta_evt->rsvd), (unsigned char *)(&reason), 2); + memcpy((unsigned char *)(&(pdel_sta_evt->macaddr)), MacAddr, ETH_ALEN); + memcpy((unsigned char *)(pdel_sta_evt->rsvd), (unsigned char *)(&reason), 2); psta = rtw_get_stainfo(&padapter->stapriv, MacAddr); if (psta) mac_id = (int)psta->cmn.mac_id; @@ -12050,7 +12050,7 @@ void report_add_sta_event(_adapter *padapter, unsigned char *MacAddr) pc2h_evt_hdr->seq = atomic_inc_return(&pmlmeext->event_seq); padd_sta_evt = (struct stassoc_event *)(pevtcmd + sizeof(struct C2HEvent_Header)); - _rtw_memcpy((unsigned char *)(&(padd_sta_evt->macaddr)), MacAddr, ETH_ALEN); + memcpy((unsigned char *)(&(padd_sta_evt->macaddr)), MacAddr, ETH_ALEN); RTW_INFO("report_add_sta_event: add STA\n"); @@ -12190,7 +12190,7 @@ void update_sta_info(_adapter *padapter, struct sta_info *psta) psta->htpriv.stbc_cap = pmlmepriv->htpriv.stbc_cap; psta->htpriv.beamform_cap = pmlmepriv->htpriv.beamform_cap; - _rtw_memcpy(&psta->htpriv.ht_cap, &pmlmeinfo->HT_caps, sizeof(struct rtw_ieee80211_ht_cap)); + memcpy(&psta->htpriv.ht_cap, &pmlmeinfo->HT_caps, sizeof(struct rtw_ieee80211_ht_cap)); #ifdef CONFIG_BEAMFORMING psta->htpriv.beamform_cap = pmlmepriv->htpriv.beamform_cap; psta->cmn.bf_info.ht_beamform_cap = pmlmepriv->htpriv.beamform_cap; @@ -12223,7 +12223,7 @@ void update_sta_info(_adapter *padapter, struct sta_info *psta) psta->qos_option = _TRUE; #ifdef CONFIG_80211AC_VHT - _rtw_memcpy(&psta->vhtpriv, &pmlmepriv->vhtpriv, sizeof(struct vht_priv)); + memcpy(&psta->vhtpriv, &pmlmepriv->vhtpriv, sizeof(struct vht_priv)); if (psta->vhtpriv.vht_option) { psta->cmn.ra_info.is_vht_enable = _TRUE; #ifdef CONFIG_BEAMFORMING @@ -12706,11 +12706,11 @@ void linked_status_chk_tdls(_adapter *padapter) if (psta->alive_count >= ALIVE_MIN) { if (chk_tdls_peer_sta_is_alive(padapter, psta) == _FALSE) { if (psta->alive_count < ALIVE_MAX) { - _rtw_memcpy(checkalive[num_checkalive].addr, psta->cmn.mac_addr, ETH_ALEN); + memcpy(checkalive[num_checkalive].addr, psta->cmn.mac_addr, ETH_ALEN); checkalive[num_checkalive].psta = psta; num_checkalive++; } else { - _rtw_memcpy(teardown[num_teardown].addr, psta->cmn.mac_addr, ETH_ALEN); + memcpy(teardown[num_teardown].addr, psta->cmn.mac_addr, ETH_ALEN); teardown[num_teardown].psta = psta; num_teardown++; } @@ -12734,7 +12734,7 @@ void linked_status_chk_tdls(_adapter *padapter) if (num_checkalive > 0) { for (i = 0; i < num_checkalive; i++) { - _rtw_memcpy(txmgmt.peer, checkalive[i].addr, ETH_ALEN); + memcpy(txmgmt.peer, checkalive[i].addr, ETH_ALEN); issue_tdls_dis_req(padapter, &txmgmt); issue_tdls_dis_req(padapter, &txmgmt); issue_tdls_dis_req(padapter, &txmgmt); @@ -12745,7 +12745,7 @@ void linked_status_chk_tdls(_adapter *padapter) for (i = 0; i < num_teardown; i++) { RTW_INFO("[%s %d] Send teardown to "MAC_FMT"\n", __FUNCTION__, __LINE__, MAC_ARG(teardown[i].addr)); txmgmt.status_code = _RSON_TDLS_TEAR_TOOFAR_; - _rtw_memcpy(txmgmt.peer, teardown[i].addr, ETH_ALEN); + memcpy(txmgmt.peer, teardown[i].addr, ETH_ALEN); issue_tdls_teardown(padapter, &txmgmt, _FALSE); } } @@ -13205,8 +13205,8 @@ void report_sta_timeout_event(_adapter *padapter, u8 *MacAddr, unsigned short re pc2h_evt_hdr->seq = atomic_inc_return(&pmlmeext->event_seq); pdel_sta_evt = (struct stadel_event *)(pevtcmd + sizeof(struct C2HEvent_Header)); - _rtw_memcpy((unsigned char *)(&(pdel_sta_evt->macaddr)), MacAddr, ETH_ALEN); - _rtw_memcpy((unsigned char *)(pdel_sta_evt->rsvd), (unsigned char *)(&reason), 2); + memcpy((unsigned char *)(&(pdel_sta_evt->macaddr)), MacAddr, ETH_ALEN); + memcpy((unsigned char *)(pdel_sta_evt->rsvd), (unsigned char *)(&reason), 2); psta = rtw_get_stainfo(&padapter->stapriv, MacAddr); @@ -13272,7 +13272,7 @@ void rtw_ft_update_bcn(_adapter *padapter, union recv_frame *precv_frame) /* update bcn keys */ if (rtw_get_bcn_keys(padapter, pframe, len, &recv_beacon) == _TRUE) { RTW_INFO("%s: beacon keys ready\n", __func__); - _rtw_memcpy(&pmlmepriv->cur_beacon_keys, + memcpy(&pmlmepriv->cur_beacon_keys, &recv_beacon, sizeof(recv_beacon)); } else { RTW_ERR("%s: get beacon keys failed\n", __func__); @@ -13447,7 +13447,7 @@ u8 rtw_ft_update_auth_rsp_ies(_adapter *padapter, u8 *pframe, u32 len) /*Not support RIC*/ pft_roam->ft_event.ric_ies = NULL; pft_roam->ft_event.ric_ies_len = 0; - _rtw_memcpy(target_ap_addr, pmlmepriv->assoc_bssid, ETH_ALEN); + memcpy(target_ap_addr, pmlmepriv->assoc_bssid, ETH_ALEN); rtw_ft_report_reassoc_evt(padapter, target_ap_addr); return ret; @@ -13499,9 +13499,9 @@ void rtw_ft_issue_action_req(_adapter *padapter, u8 *pTargetAddr) pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr->frame_ctl = 0; - _rtw_memcpy(pwlanhdr->addr1, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); + memcpy(pwlanhdr->addr1, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -13513,11 +13513,11 @@ void rtw_ft_issue_action_req(_adapter *padapter, u8 *pTargetAddr) pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen)); pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen)); - _rtw_memcpy(pframe, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pframe, adapter_mac_addr(padapter), ETH_ALEN); pframe += ETH_ALEN; pattrib->pktlen += ETH_ALEN; - _rtw_memcpy(pframe, pTargetAddr, ETH_ALEN); + memcpy(pframe, pTargetAddr, ETH_ALEN); pframe += ETH_ALEN; pattrib->pktlen += ETH_ALEN; @@ -13548,13 +13548,13 @@ void rtw_ft_report_evt(_adapter *padapter) ft_evt_parms.ies_len = pft_roam->ft_event.ies_len; ft_evt_parms.ies = rtw_zmalloc(ft_evt_parms.ies_len); 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 goto err_2; ft_evt_parms.target_ap = rtw_zmalloc(ETH_ALEN); if (ft_evt_parms.target_ap) - _rtw_memcpy((void *)ft_evt_parms.target_ap, pnetwork->MacAddress, ETH_ALEN); + memcpy((void *)ft_evt_parms.target_ap, pnetwork->MacAddress, ETH_ALEN); else goto err_1; @@ -13605,7 +13605,7 @@ void rtw_ft_report_reassoc_evt(_adapter *padapter, u8 *pMacAddr) pc2h_evt_hdr->seq = atomic_inc_return(&pmlmeext->event_seq); passoc_sta_evt = (struct stassoc_event *)(pevtcmd + sizeof(struct C2HEvent_Header)); - _rtw_memcpy((unsigned char *)(&(passoc_sta_evt->macaddr)), pMacAddr, ETH_ALEN); + memcpy((unsigned char *)(&(passoc_sta_evt->macaddr)), pMacAddr, ETH_ALEN); rtw_enqueue_cmd(pcmdpriv, pcmd_obj); } @@ -13904,7 +13904,7 @@ u8 createbss_hdl(_adapter *padapter, u8 *pbuf) flush_all_cam_entry(padapter); pdev_network->Length = get_WLAN_BSSID_EX_sz(pdev_network); - _rtw_memcpy(pnetwork, pdev_network, FIELD_OFFSET(WLAN_BSSID_EX, IELength)); + memcpy(pnetwork, pdev_network, FIELD_OFFSET(WLAN_BSSID_EX, IELength)); pnetwork->IELength = pdev_network->IELength; if (pnetwork->IELength > MAX_IE_SZ) { @@ -13912,7 +13912,7 @@ u8 createbss_hdl(_adapter *padapter, u8 *pbuf) goto ibss_post_hdl; } - _rtw_memcpy(pnetwork->IEs, pdev_network->IEs, pnetwork->IELength); + memcpy(pnetwork->IEs, pdev_network->IEs, pnetwork->IELength); start_create_ibss(padapter); } else { rtw_warn_on(1); @@ -13987,7 +13987,7 @@ u8 join_cmd_hdl(_adapter *padapter, u8 *pbuf) pmlmeinfo->ht_vht_received = 0; memset(pmlmeinfo->SupportedRates_infra_ap, 0, NDIS_802_11_LENGTH_RATES_EX); #endif /* ROKU_PRIVATE */ - _rtw_memcpy(pnetwork, pbuf, FIELD_OFFSET(WLAN_BSSID_EX, IELength)); + memcpy(pnetwork, pbuf, FIELD_OFFSET(WLAN_BSSID_EX, IELength)); pnetwork->IELength = ((WLAN_BSSID_EX *)pbuf)->IELength; if (pnetwork->IELength > MAX_IE_SZ) /* Check pbuf->IELength */ @@ -13997,7 +13997,7 @@ u8 join_cmd_hdl(_adapter *padapter, u8 *pbuf) report_join_res(padapter, (-4), WLAN_STATUS_UNSPECIFIED_FAILURE); return H2C_SUCCESS; } - _rtw_memcpy(pnetwork->IEs, ((WLAN_BSSID_EX *)pbuf)->IEs, pnetwork->IELength); + memcpy(pnetwork->IEs, ((WLAN_BSSID_EX *)pbuf)->IEs, pnetwork->IELength); pmlmeinfo->bcn_interval = get_beacon_interval(pnetwork); @@ -14298,7 +14298,7 @@ u8 rtw_scan_sparse(_adapter *adapter, struct rtw_ieee80211_channel *ch, u8 ch_nu if (ch[i].hw_value && (i % scan_division_num) == token ) { if (i != k) - _rtw_memcpy(&ch[k], &ch[i], sizeof(struct rtw_ieee80211_channel)); + memcpy(&ch[k], &ch[i], sizeof(struct rtw_ieee80211_channel)); k++; } } @@ -14410,7 +14410,7 @@ static int rtw_scan_ch_decision(_adapter *padapter, struct rtw_ieee80211_channel break; } - _rtw_memcpy(&out[j], &in[i], sizeof(struct rtw_ieee80211_channel)); + memcpy(&out[j], &in[i], sizeof(struct rtw_ieee80211_channel)); if (rfctl->channel_set[set_idx].ScanType == SCAN_PASSIVE) out[j].flags |= RTW_IEEE80211_CHAN_PASSIVE_SCAN; @@ -14476,7 +14476,7 @@ static void sitesurvey_res_reset(_adapter *adapter, struct sitesurvey_parm *parm ss->ssid_num = 0; for (i = 0; i < RTW_SSID_SCAN_AMOUNT; i++) { if (parm->ssid[i].SsidLength) { - _rtw_memcpy(ss->ssid[i].Ssid, parm->ssid[i].Ssid, IW_ESSID_MAX_SIZE); + memcpy(ss->ssid[i].Ssid, parm->ssid[i].Ssid, IW_ESSID_MAX_SIZE); ss->ssid[i].SsidLength = parm->ssid[i].SsidLength; ss->ssid_num++; } else @@ -15541,8 +15541,8 @@ u8 setkey_hdl(_adapter *padapter, u8 *pbuf) memset(&sta_pparm, 0, sizeof(struct set_stakey_parm)); sta_pparm.algorithm = pparm->algorithm; sta_pparm.keyid = pparm->keyid; - _rtw_memcpy(sta_pparm.key, pparm->key, 16); - _rtw_memcpy(sta_pparm.addr, get_bssid(&padapter->mlmepriv), ETH_ALEN); + memcpy(sta_pparm.key, pparm->key, 16); + memcpy(sta_pparm.addr, get_bssid(&padapter->mlmepriv), ETH_ALEN); set_stakey_hdl(padapter, (u8 *)&sta_pparm); } @@ -15567,8 +15567,8 @@ void rtw_ap_wep_pk_setting(_adapter *adapter, struct sta_info *psta) sta_pparm.algorithm = psecuritypriv->dot11PrivacyAlgrthm; sta_pparm.keyid = keyid; sta_pparm.gk = 0; - _rtw_memcpy(sta_pparm.key, &(psecuritypriv->dot11DefKey[keyid].skey[0]), 16); - _rtw_memcpy(sta_pparm.addr, psta->cmn.mac_addr, ETH_ALEN); + memcpy(sta_pparm.key, &(psecuritypriv->dot11DefKey[keyid].skey[0]), 16); + memcpy(sta_pparm.addr, psta->cmn.mac_addr, ETH_ALEN); RTW_PRINT(FUNC_ADPT_FMT"set WEP - PK with "MAC_FMT" keyid:%u\n" , FUNC_ADPT_ARG(adapter), MAC_ARG(psta->cmn.mac_addr), keyid); @@ -15775,7 +15775,7 @@ u8 set_tx_beacon_cmd(_adapter *padapter) goto exit; } - _rtw_memcpy(&(ptxBeacon_parm->network), &(pmlmeinfo->network), sizeof(WLAN_BSSID_EX)); + memcpy(&(ptxBeacon_parm->network), &(pmlmeinfo->network), sizeof(WLAN_BSSID_EX)); len_diff = update_hidden_ssid( ptxBeacon_parm->network.IEs + _BEACON_IE_OFFSET_ @@ -16082,7 +16082,7 @@ void rtw_join_done_chk_ch(_adapter *adapter, int join_res) rtw_ap_update_bss_chbw(iface, &(mlmeext->mlmext_info.network) , mlmeext->cur_channel, mlmeext->cur_bwmode, mlmeext->cur_ch_offset); - _rtw_memcpy(&(mlme->cur_network.network), &(mlmeext->mlmext_info.network), sizeof(WLAN_BSSID_EX)); + memcpy(&(mlme->cur_network.network), &(mlmeext->mlmext_info.network), sizeof(WLAN_BSSID_EX)); rtw_start_bss_hdl_after_chbw_decided(iface); @@ -16332,12 +16332,12 @@ void rtw_set_external_auth_status(_adapter *padapter, /* convert data to external_auth_params */ params.action = RTW_GET_BE32((u8 *)data); - _rtw_memcpy(¶ms.bssid, (u8 *)data + 4, ETH_ALEN); - _rtw_memcpy(¶ms.ssid.ssid, (u8 *)data + 10, WLAN_SSID_MAXLEN); + memcpy(¶ms.bssid, (u8 *)data + 4, ETH_ALEN); + memcpy(¶ms.ssid.ssid, (u8 *)data + 10, WLAN_SSID_MAXLEN); params.ssid.ssid_len = RTW_GET_BE64((u8 *)data + 42); params.key_mgmt_suite = RTW_GET_BE32((u8 *)data + 58); params.status = RTW_GET_BE16((u8 *)data + 62); - _rtw_memcpy(¶ms.pmkid, (u8 *)data + 64, PMKID_LEN); + memcpy(¶ms.pmkid, (u8 *)data + 64, PMKID_LEN); rtw_cfg80211_external_auth_status(wiphy, dev, ¶ms); #endif /* CONFIG_IOCTL_CFG80211 */ @@ -16522,7 +16522,7 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf) case TDLS_CH_SW_RESP: memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt)); txmgmt.status_code = 0; - _rtw_memcpy(txmgmt.peer, ptdls_sta->cmn.mac_addr, ETH_ALEN); + memcpy(txmgmt.peer, ptdls_sta->cmn.mac_addr, ETH_ALEN); if (ap_sta) rtw_hal_macid_sleep(padapter, ap_sta->cmn.mac_id); @@ -16614,7 +16614,7 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf) /* Send unsolicited channel switch rsp. to peer */ memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt)); txmgmt.status_code = 0; - _rtw_memcpy(txmgmt.peer, ptdls_sta->cmn.mac_addr, ETH_ALEN); + memcpy(txmgmt.peer, ptdls_sta->cmn.mac_addr, ETH_ALEN); issue_tdls_ch_switch_rsp(padapter, &txmgmt, _FALSE); } } @@ -16638,7 +16638,7 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf) case TDLS_TEARDOWN_STA_NO_WAIT: memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt)); txmgmt.status_code = _RSON_TDLS_TEAR_UN_RSN_; - _rtw_memcpy(txmgmt.peer, ptdls_sta->cmn.mac_addr, ETH_ALEN); + memcpy(txmgmt.peer, ptdls_sta->cmn.mac_addr, ETH_ALEN); issue_tdls_teardown(padapter, &txmgmt, (option == TDLS_TEARDOWN_STA) ? _TRUE : _FALSE); @@ -16771,7 +16771,7 @@ int rtw_sae_preprocess(_adapter *adapter, const u8 *buf, u32 len, u8 tx) psta->pauth_frame = rtw_zmalloc(len); if (psta->pauth_frame) { - _rtw_memcpy(psta->pauth_frame, buf, len); + memcpy(psta->pauth_frame, buf, len); psta->auth_len = len; } _exit_critical_bh(&psta->lock, &irqL); diff --git a/core/rtw_mp.c b/core/rtw_mp.c index 2309e0c..b782d56 100644 --- a/core/rtw_mp.c +++ b/core/rtw_mp.c @@ -39,46 +39,6 @@ int rtfloor(float x) #endif #ifdef CONFIG_MP_INCLUDED -u32 read_macreg(_adapter *padapter, u32 addr, u32 sz) -{ - u32 val = 0; - - switch (sz) { - case 1: - val = rtw_read8(padapter, addr); - break; - case 2: - val = rtw_read16(padapter, addr); - break; - case 4: - val = rtw_read32(padapter, addr); - break; - default: - val = 0xffffffff; - break; - } - - return val; - -} - -void write_macreg(_adapter *padapter, u32 addr, u32 val, u32 sz) -{ - switch (sz) { - case 1: - rtw_write8(padapter, addr, (u8)val); - break; - case 2: - rtw_write16(padapter, addr, (u16)val); - break; - case 4: - rtw_write32(padapter, addr, val); - break; - default: - break; - } - -} u32 read_bbreg(_adapter *padapter, u32 addr, u32 bitmask) { @@ -150,10 +110,10 @@ static void _init_mp_priv_(struct mp_priv *pmp_priv) pmp_priv->brx_filter_beacon = _FALSE; 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; - _rtw_memcpy(pnetwork->Ssid.Ssid, "mp_871x", pnetwork->Ssid.SsidLength); + memcpy(pnetwork->Ssid.Ssid, "mp_871x", pnetwork->Ssid.SsidLength); pmp_priv->tx.payload = 2; #ifdef CONFIG_80211N_HT @@ -280,8 +240,8 @@ static void mp_init_xmit_attrib(struct mp_tx *pmptx, PADAPTER padapter) pattrib->ether_type = 0x8712; #if 0 - _rtw_memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); + memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pattrib->ta, pattrib->src, ETH_ALEN); #endif memset(pattrib->dst, 0xFF, ETH_ALEN); @@ -874,11 +834,11 @@ u32 mp_join(PADAPTER padapter, u8 mode) 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[5]); - _rtw_memcpy(bssid.MacAddress, pmppriv->network_macaddr, ETH_ALEN); + memcpy(bssid.MacAddress, pmppriv->network_macaddr, ETH_ALEN); if (mode == WIFI_FW_ADHOC_STATE) { 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.NetworkTypeInUse = Ndis802_11DS; bssid.IELength = 0; @@ -886,7 +846,7 @@ u32 mp_join(PADAPTER padapter, u8 mode) } else if (mode == WIFI_FW_STATION_STATE) { 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.NetworkTypeInUse = Ndis802_11DS; bssid.IELength = 0; @@ -936,10 +896,10 @@ u32 mp_join(PADAPTER padapter, u8 mode) tgt_network->join_res = 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_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(&tgt_network->network, &padapter->registrypriv.dev_network, padapter->registrypriv.dev_network.Length); + memcpy(pnetwork, &padapter->registrypriv.dev_network, padapter->registrypriv.dev_network.Length); rtw_indicate_connect(padapter); _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING); @@ -1431,8 +1391,8 @@ static thread_return mp_xmit_packet_thread(thread_context context) continue; } } - _rtw_memcpy((u8 *)(pxmitframe->buf_addr + TXDESC_OFFSET), pmptx->buf, pmptx->write_size); - _rtw_memcpy(&(pxmitframe->attrib), &(pmptx->attrib), sizeof(struct pkt_attrib)); + memcpy((u8 *)(pxmitframe->buf_addr + TXDESC_OFFSET), pmptx->buf, pmptx->write_size); + memcpy(&(pxmitframe->attrib), &(pmptx->attrib), sizeof(struct pkt_attrib)); rtw_usleep_os(padapter->mppriv.pktInterval); @@ -1464,7 +1424,7 @@ exit: void fill_txdesc_for_mp(PADAPTER padapter, u8 *ptxdesc) { 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) @@ -1474,12 +1434,13 @@ void fill_tx_desc_8188e(PADAPTER padapter) struct tx_desc *desc = (struct tx_desc *)&(pmp_priv->tx.desc); struct pkt_attrib *pattrib = &(pmp_priv->tx.attrib); u32 pkt_size = pattrib->last_txcmdsz; - s32 bmcast = IS_MCAST(pattrib->ra); + bool bmcast; /* offset 0 */ #if !defined(CONFIG_RTL8188E_SDIO) && !defined(CONFIG_PCI_HCI) desc->txdw0 |= cpu_to_le32(OWN | FSG | LSG); desc->txdw0 |= cpu_to_le32(pkt_size & 0x0000FFFF); /* packet size */ desc->txdw0 |= cpu_to_le32(((TXDESC_SIZE + OFFSET_SZ) << OFFSET_SHT) & 0x00FF0000); /* 32 bytes for TX Desc */ + bmcast = is_multicast_ether_addr(pattrib->ra); if (bmcast) desc->txdw0 |= cpu_to_le32(BMC); /* broadcast packet */ @@ -1529,7 +1490,7 @@ void fill_tx_desc_8814a(PADAPTER padapter) struct pkt_attrib *pattrib = &(pmp_priv->tx.attrib); u32 pkt_size = pattrib->last_txcmdsz; - s32 bmcast = IS_MCAST(pattrib->ra); + bool bmcast; u8 offset; /* SET_TX_DESC_FIRST_SEG_8814A(pDesc, 1); */ @@ -1546,7 +1507,7 @@ void fill_tx_desc_8814a(PADAPTER padapter) #else SET_TX_DESC_PKT_OFFSET_8814A(pDesc, 1); #endif - + bmcast = is_multicast_ether_addr(pattrib->ra); if (bmcast) SET_TX_DESC_BMC_8814A(pDesc, 1); @@ -1587,7 +1548,7 @@ void fill_tx_desc_8812a(PADAPTER padapter) struct pkt_attrib *pattrib = &(pmp_priv->tx.attrib); u32 pkt_size = pattrib->last_txcmdsz; - s32 bmcast = IS_MCAST(pattrib->ra); + bool bmcast; u8 data_rate, pwr_status, offset; SET_TX_DESC_FIRST_SEG_8812(pDesc, 1); @@ -1605,6 +1566,7 @@ void fill_tx_desc_8812a(PADAPTER padapter) #else SET_TX_DESC_PKT_OFFSET_8812(pDesc, 1); #endif + bmcast = is_multicast_ether_addr(pattrib->ra); if (bmcast) SET_TX_DESC_BMC_8812(pDesc, 1); @@ -1641,7 +1603,7 @@ void fill_tx_desc_8192e(PADAPTER padapter) struct pkt_attrib *pattrib = &(pmp_priv->tx.attrib); u32 pkt_size = pattrib->last_txcmdsz; - s32 bmcast = IS_MCAST(pattrib->ra); + bool bmcast; u8 data_rate, pwr_status, offset; @@ -1656,7 +1618,7 @@ void fill_tx_desc_8192e(PADAPTER padapter) #else /* 8192EU 8192ES */ SET_TX_DESC_PKT_OFFSET_92E(pDesc, 1); #endif - + bmcast = is_multicast_ether_addr(pattrib->ra); if (bmcast) SET_TX_DESC_BMC_92E(pDesc, 1); @@ -1932,7 +1894,7 @@ void SetPacketTx(PADAPTER padapter) u32 pkt_size, i; struct rtw_ieee80211_hdr *hdr; u8 payload; - s32 bmcast; + bool bmcast; struct pkt_attrib *pattrib; struct mp_priv *pmp_priv; @@ -1946,10 +1908,10 @@ void SetPacketTx(PADAPTER padapter) /* 3 1. update_attrib() */ pattrib = &pmp_priv->tx.attrib; - _rtw_memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); - _rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); - bmcast = IS_MCAST(pattrib->ra); + memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pattrib->ta, pattrib->src, ETH_ALEN); + memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); + bmcast = is_multicast_ether_addr(pattrib->ra); if (bmcast) pattrib->psta = rtw_get_bcmc_stainfo(padapter); else @@ -2046,9 +2008,9 @@ void SetPacketTx(PADAPTER padapter) hdr = (struct rtw_ieee80211_hdr *)pkt_start; set_frame_sub_type(&hdr->frame_ctl, pattrib->subtype); - _rtw_memcpy(hdr->addr1, pattrib->dst, ETH_ALEN); /* DA */ - _rtw_memcpy(hdr->addr2, pattrib->src, ETH_ALEN); /* SA */ - _rtw_memcpy(hdr->addr3, get_bssid(&padapter->mlmepriv), ETH_ALEN); /* RA, BSSID */ + memcpy(hdr->addr1, pattrib->dst, ETH_ALEN); /* DA */ + memcpy(hdr->addr2, pattrib->src, ETH_ALEN); /* SA */ + memcpy(hdr->addr3, get_bssid(&padapter->mlmepriv), ETH_ALEN); /* RA, BSSID */ /* 3 5. make payload */ ptr = pkt_start + pattrib->hdrlen; @@ -2081,7 +2043,7 @@ void SetPacketTx(PADAPTER padapter) pmp_priv->TXradomBuffer[i] = rtw_random32() % 0xFF; /* 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); */ rtw_mfree(pmp_priv->TXradomBuffer, 4096); @@ -3822,15 +3784,15 @@ void VHT_SIG_B_generator( 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}; - _rtw_memcpy(sig_bi, sigb_temp, 26); + memcpy(sig_bi, sigb_temp, 26); } 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}; - _rtw_memcpy(sig_bi, sigb_temp, 27); + memcpy(sig_bi, sigb_temp, 27); } 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}; - _rtw_memcpy(sig_bi, sigb_temp, 29); + memcpy(sig_bi, sigb_temp, 29); } } else { /* Not NDP Sounding*/ bool *sigb_temp[29] = {0}; diff --git a/core/rtw_mp_ioctl.c b/core/rtw_mp_ioctl.c index b956dba..4dbc4ed 100644 --- a/core/rtw_mp_ioctl.c +++ b/core/rtw_mp_ioctl.c @@ -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; - _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; *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) 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; @@ -1465,7 +1465,7 @@ NDIS_STATUS oid_rt_pro_qry_pwrstate_hdl(struct oid_par_priv *poid_par_priv) return NDIS_STATUS_INVALID_LENGTH; *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; @@ -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; pattrib = &pmp_priv->tx.attrib; pattrib->pktlen = pparm->length; - _rtw_memcpy(pattrib->dst, pparm->da, ETH_ALEN); + memcpy(pattrib->dst, pparm->da, ETH_ALEN); SetPacketTx(padapter); } else return NDIS_STATUS_FAILURE; @@ -2418,7 +2418,7 @@ unsigned int mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv) pattrib->nr_frags = 1; pattrib->priority = 0; #ifndef CONFIG_MP_LINUX - if (IS_MCAST(pethhdr->h_dest)) + if (is_multicast_ether_addr(pethhdr->h_dest)) pattrib->mac_id = 4; else pattrib->mac_id = 5; @@ -2436,10 +2436,10 @@ unsigned int mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv) *(fctrl) = 0; set_frame_sub_type(pframe, WIFI_DATA); - _rtw_memcpy(pwlanhdr->addr1, pethhdr->h_dest, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, pethhdr->h_source, ETH_ALEN); + memcpy(pwlanhdr->addr1, pethhdr->h_dest, 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; 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); 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; diff --git a/core/rtw_p2p.c b/core/rtw_p2p.c index 680590b..662bdaf 100644 --- a/core/rtw_p2p.c +++ b/core/rtw_p2p.c @@ -76,11 +76,11 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf) pcur++; /* P2P device address */ - _rtw_memcpy(pcur, psta->dev_addr, ETH_ALEN); + memcpy(pcur, psta->dev_addr, ETH_ALEN); pcur += ETH_ALEN; /* P2P interface address */ - _rtw_memcpy(pcur, psta->cmn.mac_addr, ETH_ALEN); + memcpy(pcur, psta->cmn.mac_addr, ETH_ALEN); pcur += ETH_ALEN; *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); pcur += 2; - _rtw_memcpy(pcur, psta->primary_dev_type, 8); + memcpy(pcur, psta->primary_dev_type, 8); pcur += 8; *pcur = psta->num_of_secdev_type; 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; 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); 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; } @@ -171,9 +171,9 @@ static void issue_group_disc_req(struct wifidirect_info *pwdinfo, u8 *da) fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, pwdinfo->interface_addr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, pwdinfo->interface_addr, ETH_ALEN); + memcpy(pwlanhdr->addr1, da, ETH_ALEN); + memcpy(pwlanhdr->addr2, pwdinfo->interface_addr, ETH_ALEN); + memcpy(pwlanhdr->addr3, pwdinfo->interface_addr, ETH_ALEN); SetSeqNum(pwlanhdr, 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) = 0; - _rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, pwdinfo->device_addr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, pwdinfo->device_addr, ETH_ALEN); + memcpy(pwlanhdr->addr1, da, ETH_ALEN); + memcpy(pwlanhdr->addr2, pwdinfo->device_addr, ETH_ALEN); + memcpy(pwlanhdr->addr3, pwdinfo->device_addr, ETH_ALEN); SetSeqNum(pwlanhdr, 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) = 0; - _rtw_memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN); SetSeqNum(pwlanhdr, 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) = 0; - _rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, pwdinfo->interface_addr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, pwdinfo->interface_addr, ETH_ALEN); + memcpy(pwlanhdr->addr1, da, ETH_ALEN); + memcpy(pwlanhdr->addr2, pwdinfo->interface_addr, ETH_ALEN); + memcpy(pwlanhdr->addr3, pwdinfo->interface_addr, ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -599,7 +599,7 @@ u32 build_beacon_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ 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 memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -711,7 +711,7 @@ u32 build_probe_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ 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 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: */ /* Associated BSSID */ 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 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: 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; } } @@ -1008,7 +1008,7 @@ u32 build_assoc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ 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 memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -1107,7 +1107,7 @@ u32 build_assoc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ 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 memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -1206,7 +1206,7 @@ u32 build_nego_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ 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 memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -1305,7 +1305,7 @@ u32 build_nego_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ 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 memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -1405,7 +1405,7 @@ u32 build_nego_confirm_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ 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 memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -1505,7 +1505,7 @@ u32 build_invitation_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ 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 memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -1618,7 +1618,7 @@ u32 build_invitation_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ 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 memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -1731,7 +1731,7 @@ u32 build_provdisc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ 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 memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -1831,7 +1831,7 @@ u32 build_provdisc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ 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 memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -1973,7 +1973,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* P2P Device Address */ - _rtw_memcpy(p2pie + p2pielen, pwdinfo->device_addr, ETH_ALEN); + memcpy(p2pie + p2pielen, pwdinfo->device_addr, ETH_ALEN); p2pielen += ETH_ALEN; /* Config Method */ @@ -2060,7 +2060,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) p2pielen += 2; /* 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; /* Group Info ATTR */ @@ -2129,7 +2129,7 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 /* Value: */ /* P2P Device Address */ - _rtw_memcpy(p2pie + p2pielen, pwdinfo->device_addr, ETH_ALEN); + memcpy(p2pie + p2pielen, pwdinfo->device_addr, ETH_ALEN); p2pielen += ETH_ALEN; /* Config Method */ @@ -2175,7 +2175,7 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 p2pielen += 2; /* 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; 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; /* Value: */ - _rtw_memcpy(p2pie + p2pielen, pdev_raddr, ETH_ALEN); + memcpy(p2pie + p2pielen, pdev_raddr, ETH_ALEN); p2pielen += ETH_ALEN; - _rtw_memcpy(p2pie + p2pielen, pssid, ussidlen); + memcpy(p2pie + p2pielen, pssid, 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_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; - _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); pattr_content += 2; - _rtw_memcpy(psta->primary_dev_type, pattr_content, 8); + memcpy(psta->primary_dev_type, 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); - _rtw_memcpy(psta->secdev_types_list, pattr_content, len); + memcpy(psta->secdev_types_list, pattr_content, len); 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; - _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); @@ -2521,19 +2521,19 @@ u8 process_p2p_provdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint l uconfig_method = be16_to_cpu(uconfig_method); switch (uconfig_method) { 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; } 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; } 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; } 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; } } @@ -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); 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) - _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 - _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 { 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)) { /* Store the group id information. */ - _rtw_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.go_device_addr, pwdinfo->device_addr, ETH_ALEN); + 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)) { /* Store the group id information. */ - _rtw_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.go_device_addr, pwdinfo->device_addr, ETH_ALEN); + 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; memset(groupid, 0x00, 38); 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); - _rtw_memcpy(pwdinfo->groupid_info.ssid, &groupid[6], attr_contentlen - ETH_ALEN); + memcpy(pwdinfo->groupid_info.go_device_addr, &groupid[0], ETH_ALEN); + memcpy(pwdinfo->groupid_info.ssid, &groupid[6], attr_contentlen - ETH_ALEN); } /* 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); 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_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.go_device_addr, &groupid[0], ETH_ALEN); + memcpy(pwdinfo->groupid_info.ssid, &groupid[6], attr_contentlen - ETH_ALEN); } attr_contentlen = 0; @@ -3078,7 +3078,7 @@ void find_phase_handler(_adapter *padapter) 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_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) 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) - _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->token = dialogToken; 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 ) { 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->rsp_op_ch = op_ch; 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) 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) - _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->token = dialogToken; 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 */ if (attr_contentlen > 2 && (attr_contentlen - 2) % 13 == 0) { 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]; 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; - _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; - _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_num++; @@ -4886,7 +4886,7 @@ u32 rtw_append_beacon_wfd_ie(_adapter *adapter, u8 *pbuf) #ifdef CONFIG_IOCTL_CFG80211 else if (mlme->wfd_beacon_ie && mlme->wfd_beacon_ie_len > 0) { len = mlme->wfd_beacon_ie_len; - _rtw_memcpy(pbuf, mlme->wfd_beacon_ie, len); + memcpy(pbuf, mlme->wfd_beacon_ie, len); } #endif @@ -4914,7 +4914,7 @@ u32 rtw_append_probe_req_wfd_ie(_adapter *adapter, u8 *pbuf) #ifdef CONFIG_IOCTL_CFG80211 else if (mlme->wfd_probe_req_ie && mlme->wfd_probe_req_ie_len > 0) { 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 @@ -4942,7 +4942,7 @@ u32 rtw_append_probe_resp_wfd_ie(_adapter *adapter, u8 *pbuf) #ifdef CONFIG_IOCTL_CFG80211 else if (mlme->wfd_probe_resp_ie && mlme->wfd_probe_resp_ie_len > 0) { 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 @@ -4970,7 +4970,7 @@ u32 rtw_append_assoc_req_wfd_ie(_adapter *adapter, u8 *pbuf) #ifdef CONFIG_IOCTL_CFG80211 else if (mlme->wfd_assoc_req_ie && mlme->wfd_assoc_req_ie_len > 0) { 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 @@ -4998,7 +4998,7 @@ u32 rtw_append_assoc_resp_wfd_ie(_adapter *adapter, u8 *pbuf) #ifdef CONFIG_IOCTL_CFG80211 else if (mlme->wfd_assoc_resp_ie && mlme->wfd_assoc_resp_ie_len > 0) { 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 @@ -5029,9 +5029,9 @@ void rtw_init_wifidirect_addrs(_adapter *padapter, u8 *dev_addr, u8 *iface_addr) /*init device&interface address */ if (dev_addr) - _rtw_memcpy(pwdinfo->device_addr, dev_addr, ETH_ALEN); + memcpy(pwdinfo->device_addr, dev_addr, ETH_ALEN); if (iface_addr) - _rtw_memcpy(pwdinfo->interface_addr, iface_addr, ETH_ALEN); + memcpy(pwdinfo->interface_addr, iface_addr, ETH_ALEN); #endif } @@ -5107,7 +5107,7 @@ void init_wifidirect_info(_adapter *padapter, enum P2P_ROLE role) pwdinfo->support_rate[6] = 0x60; /* 48 */ 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); pwdinfo->device_name_len = 0; diff --git a/core/rtw_recv.c b/core/rtw_recv.c index aa26039..344968e 100644 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -485,7 +485,7 @@ sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe) /* calculate mic code */ if (stainfo != NULL) { - if (IS_MCAST(prxattrib->ra)) { + if (is_multicast_ether_addr(prxattrib->ra)) { /* mickey=&psecuritypriv->dot118021XGrprxmickey.skey[0]; */ /* iv = precvframe->u.hdr.rx_data+prxattrib->hdrlen; */ /* rxdata_key_idx =( ((iv[3])>>6)&0x3) ; */ @@ -529,11 +529,11 @@ sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe) /* double check key_index for some timing issue , */ /* cannot compare with psecuritypriv->dot118021XGrpKeyid also cause timing issue */ - if ((IS_MCAST(prxattrib->ra) == _TRUE) && (prxattrib->key_index != pmlmeinfo->key_index)) + if ((is_multicast_ether_addr(prxattrib->ra) == _TRUE) && (prxattrib->key_index != pmlmeinfo->key_index)) brpt_micerror = _FALSE; if ((prxattrib->bdecrypted == _TRUE) && (brpt_micerror == _TRUE)) { - rtw_handle_tkip_mic_err(adapter, stainfo, (u8)IS_MCAST(prxattrib->ra)); + rtw_handle_tkip_mic_err(adapter, stainfo, (u8)is_multicast_ether_addr(prxattrib->ra)); RTW_INFO(" mic error :prxattrib->bdecrypted=%d\n", prxattrib->bdecrypted); } else { RTW_INFO(" mic error :prxattrib->bdecrypted=%d\n", prxattrib->bdecrypted); @@ -543,7 +543,7 @@ sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe) } else { /* mic checked ok */ - if ((psecuritypriv->bcheck_grpkey == _FALSE) && (IS_MCAST(prxattrib->ra) == _TRUE)) { + if ((psecuritypriv->bcheck_grpkey == _FALSE) && (is_multicast_ether_addr(prxattrib->ra) == _TRUE)) { psecuritypriv->bcheck_grpkey = _TRUE; } } @@ -601,7 +601,7 @@ union recv_frame *decryptor(_adapter *padapter, union recv_frame *precv_frame) if (prxattrib->encrypt && !prxattrib->bdecrypted) { if (GetFrameType(get_recvframe_data(precv_frame)) == WIFI_DATA #ifdef CONFIG_CONCURRENT_MODE - && !IS_MCAST(prxattrib->ra) /* bc/mc packets may use sw decryption for concurrent mode */ + && !is_multicast_ether_addr(prxattrib->ra) /* bc/mc packets may use sw decryption for concurrent mode */ #endif ) psecuritypriv->hw_decrypted = _FALSE; @@ -741,7 +741,7 @@ union recv_frame *portctrl(_adapter *adapter, union recv_frame *precv_frame) /* get ether_type */ ptr = ptr + pfhdr->attrib.hdrlen + pfhdr->attrib.iv_len + LLC_HEADER_SIZE; - _rtw_memcpy(ðer_type, ptr, 2); + memcpy(ðer_type, ptr, 2); ether_type = ntohs((unsigned short)ether_type); if (ether_type == eapol_type) @@ -805,7 +805,7 @@ sint recv_ucast_pn_decache(union recv_frame *precv_frame) /* return _FAIL; */ } else { prxcache->last_tid = tid; - _rtw_memcpy(prxcache->iv[tid], + memcpy(prxcache->iv[tid], (pdata + pattrib->hdrlen), sizeof(prxcache->iv[tid])); } @@ -859,12 +859,12 @@ sint recv_decache(union recv_frame *precv_frame) return _FAIL; if (pattrib->qos) { - if (IS_MCAST(pattrib->ra)) + if (is_multicast_ether_addr(pattrib->ra)) prxseq = &psta->sta_recvpriv.bmc_tid_rxseq[tid]; else prxseq = &psta->sta_recvpriv.rxcache.tid_rxseq[tid]; } else { - if (IS_MCAST(pattrib->ra)) { + if (is_multicast_ether_addr(pattrib->ra)) { prxseq = &psta->sta_recvpriv.nonqos_bmc_rxseq; #ifdef DBG_RX_SEQ RTW_INFO("DBG_RX_SEQ "FUNC_ADPT_FMT" nonqos bmc seq_num:%d\n" @@ -1113,7 +1113,7 @@ void count_rx_stats(_adapter *padapter, union recv_frame *prframe, struct sta_in padapter->mlmepriv.LinkDetectInfo.NumRxOkInPeriod++; - if (!is_broadcast_ether_addr(pattrib->dst) && !IS_MCAST(pattrib->dst)) + if (!is_broadcast_ether_addr(pattrib->dst) && !is_multicast_ether_addr(pattrib->dst)) padapter->mlmepriv.LinkDetectInfo.NumRxUnicastOkInPeriod++; if (sta) @@ -1122,7 +1122,7 @@ void count_rx_stats(_adapter *padapter, union recv_frame *prframe, struct sta_in psta = prframe->u.hdr.psta; if (psta) { - u8 is_ra_bmc = IS_MCAST(pattrib->ra); + u8 is_ra_bmc = is_multicast_ether_addr(pattrib->ra); pstats = &psta->sta_stats; @@ -1175,7 +1175,7 @@ sint sta2sta_data_frame( u8 *mybssid = get_bssid(pmlmepriv); u8 *myhwaddr = adapter_mac_addr(adapter); u8 *sta_addr = pattrib->ta; - sint bmcast = IS_MCAST(pattrib->dst); + sint bmcast = is_multicast_ether_addr(pattrib->dst); #ifdef CONFIG_TDLS struct tdls_info *ptdlsinfo = &adapter->tdlsinfo; @@ -1296,7 +1296,7 @@ sint sta2sta_data_frame( } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) { if (bmcast) { /* For AP mode, if DA == MCAST, then BSSID should be also MCAST */ - if (!IS_MCAST(pattrib->bssid)) { + if (!is_multicast_ether_addr(pattrib->bssid)) { ret = _FAIL; goto exit; } @@ -1309,11 +1309,11 @@ sint sta2sta_data_frame( } } else if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE) { - _rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); + memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN); + memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN); + memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN); + memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); + memcpy(pattrib->ta, pattrib->src, ETH_ALEN); sta_addr = mybssid; } else @@ -1352,7 +1352,7 @@ sint ap2sta_data_frame( struct mlme_priv *pmlmepriv = &adapter->mlmepriv; u8 *mybssid = get_bssid(pmlmepriv); u8 *myhwaddr = adapter_mac_addr(adapter); - sint bmcast = IS_MCAST(pattrib->dst); + sint bmcast = is_multicast_ether_addr(pattrib->dst); if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE) @@ -1424,11 +1424,11 @@ sint ap2sta_data_frame( } else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE) && (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) { - _rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); + memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN); + memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN); + memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN); + memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); + memcpy(pattrib->ta, pattrib->src, ETH_ALEN); *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) && (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) { /* RTW_INFO("%s ,in WIFI_MP_STATE\n",__func__); */ - _rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); + memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN); + memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN); + memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN); + memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); + memcpy(pattrib->ta, pattrib->src, ETH_ALEN); *psta = rtw_get_stainfo(pstapriv, pattrib->bssid); /* get sta_info */ @@ -1758,7 +1758,7 @@ static sint validate_mgmt_protect(_adapter *adapter, union recv_frame *precv_fra ptr = precv_frame->u.hdr.rx_data; type = GetFrameType(ptr); subtype = get_frame_sub_type(ptr); /* bit(7)~bit(2) */ - is_bmc = IS_MCAST(GetAddr1Ptr(ptr)); + is_bmc = is_multicast_ether_addr(GetAddr1Ptr(ptr)); #if DBG_VALIDATE_MGMT_PROTECT if (subtype == WIFI_DEAUTH) { @@ -1892,8 +1892,8 @@ bip_verify: /* set iv and icv length */ SET_ICE_IV_LEN(pattrib->iv_len, pattrib->icv_len, pattrib->encrypt); - _rtw_memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN); + memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN); + memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN); /* actual management data frame body */ 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); /* 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 */ - _rtw_memcpy(ptr + pattrib->hdrlen, mgmt_DATA, data_len); + memcpy(ptr + pattrib->hdrlen, mgmt_DATA, data_len); /* remove the iv and icv length */ pattrib->pkt_len = pattrib->pkt_len - pattrib->iv_len - pattrib->icv_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); - _rtw_memcpy(pattrib->dst, pda, ETH_ALEN); - _rtw_memcpy(pattrib->src, psa, ETH_ALEN); + memcpy(pattrib->dst, pda, 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) { case 0: - _rtw_memcpy(pattrib->ra, pda, ETH_ALEN); - _rtw_memcpy(pattrib->ta, psa, ETH_ALEN); + memcpy(pattrib->ra, pda, ETH_ALEN); + memcpy(pattrib->ta, psa, ETH_ALEN); break; case 1: - _rtw_memcpy(pattrib->ra, pda, ETH_ALEN); - _rtw_memcpy(pattrib->ta, pbssid, ETH_ALEN); + memcpy(pattrib->ra, pda, ETH_ALEN); + memcpy(pattrib->ta, pbssid, ETH_ALEN); break; case 2: - _rtw_memcpy(pattrib->ra, pbssid, ETH_ALEN); - _rtw_memcpy(pattrib->ta, psa, ETH_ALEN); + memcpy(pattrib->ra, pbssid, ETH_ALEN); + memcpy(pattrib->ta, psa, ETH_ALEN); break; case 3: - _rtw_memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN); + memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN); + memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN); break; default: @@ -2072,29 +2072,29 @@ sint validate_recv_data_frame(_adapter *adapter, union recv_frame *precv_frame) switch (pattrib->to_fr_ds) { case 0: - _rtw_memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN); + memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN); + memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN); + memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN); + memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN); + memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN); ret = sta2sta_data_frame(adapter, precv_frame, &psta); break; case 1: - _rtw_memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->src, GetAddr3Ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->bssid, get_addr2_ptr(ptr), ETH_ALEN); + memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN); + memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN); + memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN); + memcpy(pattrib->src, GetAddr3Ptr(ptr), ETH_ALEN); + memcpy(pattrib->bssid, get_addr2_ptr(ptr), ETH_ALEN); ret = ap2sta_data_frame(adapter, precv_frame, &psta); break; case 2: - _rtw_memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->dst, GetAddr3Ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->bssid, GetAddr1Ptr(ptr), ETH_ALEN); + memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN); + memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN); + memcpy(pattrib->dst, GetAddr3Ptr(ptr), ETH_ALEN); + memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN); + memcpy(pattrib->bssid, GetAddr1Ptr(ptr), ETH_ALEN); ret = sta2ap_data_frame(adapter, precv_frame, &psta); break; @@ -2153,7 +2153,7 @@ pre_validate_status_chk: if (ret == _FAIL) goto exit; - if (!IS_MCAST(pattrib->ra)) { + if (!is_multicast_ether_addr(pattrib->ra)) { if (pattrib->qos) precv_frame->u.hdr.preorder_ctrl = &psta->recvreorder_ctrl[pattrib->priority]; @@ -2183,7 +2183,7 @@ pre_validate_status_chk: pattrib->encrypt = psta->dot118021XPrivacy; else #endif /* CONFIG_TDLS */ - GET_ENCRY_ALGO(psecuritypriv, psta, pattrib->encrypt, IS_MCAST(pattrib->ra)); + GET_ENCRY_ALGO(psecuritypriv, psta, pattrib->encrypt, is_multicast_ether_addr(pattrib->ra)); SET_ICE_IV_LEN(pattrib->iv_len, pattrib->icv_len, pattrib->encrypt); @@ -2374,7 +2374,7 @@ sint validate_recv_frame(_adapter *adapter, union recv_frame *precv_frame) /* dump eapol */ rtw_hal_get_def_var(adapter, HAL_DEF_DBG_DUMP_RXPKT, &(bDumpRxPkt)); /* get ether_type */ - _rtw_memcpy(ð_type, ptr + pattrib->hdrlen + pattrib->iv_len + RATTRIB_GET_MCTRL_LEN(pattrib) + LLC_HEADER_SIZE, 2); + memcpy(ð_type, ptr + pattrib->hdrlen + pattrib->iv_len + RATTRIB_GET_MCTRL_LEN(pattrib) + LLC_HEADER_SIZE, 2); eth_type = ntohs((unsigned short) eth_type); if ((bDumpRxPkt == 4) && (eth_type == 0x888e)) dump_rx_packet(ptr); @@ -2441,7 +2441,7 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe) len = precvframe->u.hdr.len - rmv_len; - _rtw_memcpy(ð_type, ptr + rmv_len, 2); + memcpy(ð_type, ptr + rmv_len, 2); eth_type = ntohs((unsigned short)eth_type); /* pattrib->ether_type */ pattrib->eth_type = eth_type; @@ -2458,7 +2458,7 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe) ret = _FAIL; goto exiting; } - _rtw_memcpy(ptr, get_rxmem(precvframe), 24); + memcpy(ptr, get_rxmem(precvframe), 24); ptr += 24; } else { 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) { - _rtw_memcpy(ptr, pattrib->dst, ETH_ALEN); - _rtw_memcpy(ptr + ETH_ALEN, pattrib->src, ETH_ALEN); + memcpy(ptr, pattrib->dst, ETH_ALEN); + memcpy(ptr + ETH_ALEN, pattrib->src, ETH_ALEN); if (!bsnaphdr) { len = htons(len); - _rtw_memcpy(ptr + 12, &len, 2); + memcpy(ptr + 12, &len, 2); } rtw_rframe_set_os_pkt(precvframe); @@ -2540,7 +2540,7 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe) ptr += rmv_len ; - _rtw_memcpy(ð_type, ptr, 2); + memcpy(ð_type, ptr, 2); eth_type = ntohs((unsigned short)eth_type); /* pattrib->ether_type */ 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 */ /* ptr -= 16; */ - /* _rtw_memcpy(ptr, get_rxmem(precvframe), 16); */ + /* memcpy(ptr, get_rxmem(precvframe), 16); */ } else { #ifdef PLATFORM_OS_XP 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 */ 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; } else ptr = recvframe_pull(precvframe, (rmv_len - sizeof(struct ethhdr) + 2)); - _rtw_memcpy(ptr, pattrib->dst, ETH_ALEN); - _rtw_memcpy(ptr + ETH_ALEN, pattrib->src, ETH_ALEN); + memcpy(ptr, pattrib->dst, ETH_ALEN); + memcpy(ptr + ETH_ALEN, pattrib->src, ETH_ALEN); eth_type = htons((unsigned short)eth_type) ; - _rtw_memcpy(ptr + 12, ð_type, 2); + memcpy(ptr + 12, ð_type, 2); exit: @@ -2647,7 +2647,7 @@ static void recvframe_expand_pkt( /* copy data to new pkt */ ptr = skb_put(ppkt, pfhdr->len); if (ptr) - _rtw_memcpy(ptr, pfhdr->rx_data, pfhdr->len); + memcpy(ptr, pfhdr->rx_data, pfhdr->len); 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); /* 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); @@ -2917,11 +2917,11 @@ static int rtw_recv_indicatepkt_check(union recv_frame *rframe, u8 *ehdr_pos, u3 if (ntohs(ehdr->h_proto) == ETH_P_ARP) { if(check_fwstate(pmlmepriv, WIFI_ASOC_STATE) == _TRUE){ - if(ehdr_pos[ETHERNET_HEADER_SIZE+LEN_ARP_OP_HDR] == 2) { + if(ehdr_pos[ETH_HLEN+LEN_ARP_OP_HDR] == 2) { RTW_INFO("%s,[DBG_ARP] Rx ARP RSP Packet with Dst= "MAC_FMT" ;SeqNum = %d !\n", __FUNCTION__, MAC_ARG(pattrib->dst), pattrib->seq_num); - for(i=0;i<(pkt_len -ETHERNET_HEADER_SIZE);i++) - RTW_INFO("0x%x ",ehdr_pos[i+ETHERNET_HEADER_SIZE]); + for(i=0;i<(pkt_len -ETH_HLEN);i++) + RTW_INFO("0x%x ",ehdr_pos[i+ETH_HLEN]); RTW_INFO("\n"); } } @@ -3053,7 +3053,7 @@ int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe) while (a_len > ETH_HLEN) { /* Offset 12 denote 2 mac address */ nSubframe_Length = RTW_GET_BE16(pdata + 12); - if (a_len < (ETHERNET_HEADER_SIZE + nSubframe_Length)) { + if (a_len < (ETH_HLEN + nSubframe_Length)) { RTW_INFO("nRemain_Length is %d and nSubframe_Length is : %d\n", a_len, nSubframe_Length); break; } @@ -3760,7 +3760,7 @@ static sint MPwlanhdr_to_ethhdr(union recv_frame *precvframe) len = precvframe->u.hdr.len - rmv_len; - _rtw_memcpy(ð_type, ptr + rmv_len, 2); + memcpy(ð_type, ptr + rmv_len, 2); eth_type = ntohs((unsigned short)eth_type); /* pattrib->ether_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))); } - _rtw_memcpy(ptr, pattrib->dst, ETH_ALEN); - _rtw_memcpy(ptr + ETH_ALEN, pattrib->src, ETH_ALEN); + memcpy(ptr, pattrib->dst, ETH_ALEN); + memcpy(ptr + ETH_ALEN, pattrib->src, ETH_ALEN); if (!bsnaphdr) { len = htons(len); - _rtw_memcpy(ptr + 12, &len, 2); + memcpy(ptr + 12, &len, 2); } len = htons(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(_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. */ - _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); pbssid = get_hdr_bssid(ptr); - _rtw_memcpy(pattrib->dst, pda, ETH_ALEN); - _rtw_memcpy(pattrib->src, psa, ETH_ALEN); - _rtw_memcpy(pattrib->bssid, pbssid, ETH_ALEN); + memcpy(pattrib->dst, pda, ETH_ALEN); + memcpy(pattrib->src, psa, ETH_ALEN); + memcpy(pattrib->bssid, pbssid, ETH_ALEN); switch (pattrib->to_fr_ds) { case 0: - _rtw_memcpy(pattrib->ra, pda, ETH_ALEN); - _rtw_memcpy(pattrib->ta, psa, ETH_ALEN); + memcpy(pattrib->ra, pda, ETH_ALEN); + memcpy(pattrib->ta, psa, ETH_ALEN); ret = sta2sta_data_frame(padapter, rframe, &psta); break; case 1: - _rtw_memcpy(pattrib->ra, pda, ETH_ALEN); - _rtw_memcpy(pattrib->ta, pbssid, ETH_ALEN); + memcpy(pattrib->ra, pda, ETH_ALEN); + memcpy(pattrib->ta, pbssid, ETH_ALEN); ret = ap2sta_data_frame(padapter, rframe, &psta); break; case 2: - _rtw_memcpy(pattrib->ra, pbssid, ETH_ALEN); - _rtw_memcpy(pattrib->ta, psa, ETH_ALEN); + memcpy(pattrib->ra, pbssid, ETH_ALEN); + memcpy(pattrib->ta, psa, ETH_ALEN); ret = sta2ap_data_frame(padapter, rframe, &psta); break; case 3: - _rtw_memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN); - _rtw_memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN); + memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN); + memcpy(pattrib->ta, get_addr2_ptr(ptr), ETH_ALEN); ret = _FAIL; break; @@ -4341,7 +4341,7 @@ int recv_func_posthandle(_adapter *padapter, union recv_frame *prframe) } #ifdef DBG_RX_BMC_FRAME - if (IS_MCAST(pattrib->ra)) + if (is_multicast_ether_addr(pattrib->ra)) RTW_INFO("%s =>"ADPT_FMT" Rx BC/MC from "MAC_FMT"\n", __func__, ADPT_ARG(padapter), MAC_ARG(pattrib->ta)); #endif @@ -4478,7 +4478,7 @@ int recv_func(_adapter *padapter, union recv_frame *rframe) /* check if need to enqueue into uc_swdec_pending_queue*/ if (check_fwstate(mlmepriv, WIFI_STATION_STATE) && - !IS_MCAST(prxattrib->ra) && prxattrib->encrypt > 0 && + !is_multicast_ether_addr(prxattrib->ra) && prxattrib->encrypt > 0 && (prxattrib->bdecrypted == 0 || psecuritypriv->sw_decrypt == _TRUE) && psecuritypriv->ndisauthtype == Ndis802_11AuthModeWPAPSK && !psecuritypriv->busetkipkey) { @@ -4787,7 +4787,7 @@ void rx_query_phy_status( ta = get_ta(wlanhdr); ra = get_ra(wlanhdr); - is_ra_bmc = IS_MCAST(ra); + is_ra_bmc = is_multicast_ether_addr(ra); if (_rtw_memcmp(adapter_mac_addr(padapter), ta, ETH_ALEN) == _TRUE) { static systime start_time = 0; @@ -4927,7 +4927,7 @@ s32 pre_recv_entry(union recv_frame *precvframe, u8 *pphy_status) s32 ret = _SUCCESS; u8 *pbuf = precvframe->u.hdr.rx_data; u8 *pda = get_ra(pbuf); - u8 ra_is_bmc = IS_MCAST(pda); + u8 ra_is_bmc = is_multicast_ether_addr(pda); _adapter *primary_padapter = precvframe->u.hdr.adapter; #ifdef CONFIG_CONCURRENT_MODE _adapter *iface = NULL; diff --git a/core/rtw_rf.c b/core/rtw_rf.c index d8667bc..65e48fc 100644 --- a/core/rtw_rf.c +++ b/core/rtw_rf.c @@ -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); if (country) - _rtw_memcpy(ent->country, country, 2); + memcpy(ent->country, country, 2); 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); @@ -1061,7 +1061,7 @@ void rtw_txpwr_lmt_add_with_nlen(struct rf_ctl_t *rfctl, const char *regd_name, goto release_lock; _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; diff --git a/core/rtw_rm.c b/core/rtw_rm.c index 8b44f6d..8e4827e 100644 --- a/core/rtw_rm.c +++ b/core/rtw_rm.c @@ -336,9 +336,9 @@ static u8 *build_wlan_hdr(_adapter *padapter, struct xmit_frame *pmgntframe, fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, psta->cmn.mac_addr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, + memcpy(pwlanhdr->addr1, psta->cmn.mac_addr, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)),ETH_ALEN); 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; 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); - _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.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 */ 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)); 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 */ 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)); 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); i = strlen(DBG_BCN_REQ_SSID_NAME); 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); #else /* original */ 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]); #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 */ 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)); 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++]; /* BSSID */ - _rtw_memcpy(&(prm->q.bssid), &pbody[p], 6); + memcpy(&(prm->q.bssid), &pbody[p], 6); p+=6; /* @@ -1617,7 +1617,7 @@ int issue_nb_req(struct rm_obj *prm) sub_ie[0] = 0; /*SSID*/ 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, sub_ie, &pattr->pktlen); @@ -1637,7 +1637,7 @@ int issue_nb_req(struct rm_obj *prm) sub_ie[0] = 0; /*SSID*/ 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); 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) { RTW_INFO("assoc.rm_en_cap="RM_CAP_FMT"\n", 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); } } @@ -1987,7 +1987,7 @@ void RM_IE_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE) { 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)); } diff --git a/core/rtw_rson.c b/core/rtw_rson.c index 0bb7cc2..b8a5b70 100644 --- a/core/rtw_rson.c +++ b/core/rtw_rson.c @@ -254,7 +254,7 @@ u32 rtw_rson_append_ie(_adapter *padapter, unsigned char *pframe, u32 *len) ptr = ori = pframe; *ptr++ = _VENDOR_SPECIFIC_IE_; *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++ = pdvobj->rson_data.ver; *(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.connectible; *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; /* iii = iii % 20; diff --git a/core/rtw_security.c b/core/rtw_security.c index 77fc297..8d8b4cd 100644 --- a/core/rtw_security.c +++ b/core/rtw_security.c @@ -264,8 +264,8 @@ void rtw_wep_encrypt(_adapter *padapter, u8 *pxmitframe) for (curfragnum = 0; curfragnum < pattrib->nr_frags; curfragnum++) { iv = pframe + pattrib->hdrlen; - _rtw_memcpy(&wepkey[0], iv, 3); - _rtw_memcpy(&wepkey[3], &psecuritypriv->dot11DefKey[psecuritypriv->dot11PrivacyKeyIndex].skey[0], keylength); + memcpy(&wepkey[0], iv, 3); + memcpy(&wepkey[3], &psecuritypriv->dot11DefKey[psecuritypriv->dot11PrivacyKeyIndex].skey[0], keylength); payload = pframe + pattrib->iv_len + pattrib->hdrlen; if ((curfragnum + 1) == pattrib->nr_frags) { @@ -320,9 +320,9 @@ void rtw_wep_decrypt(_adapter *padapter, u8 *precvframe) /* keyindex=(iv[3]&0x3); */ keyindex = prxattrib->key_index; keylength = psecuritypriv->dot11DefKeylen[keyindex]; - _rtw_memcpy(&wepkey[0], iv, 3); - /* _rtw_memcpy(&wepkey[3], &psecuritypriv->dot11DefKey[psecuritypriv->dot11PrivacyKeyIndex].skey[0],keylength); */ - _rtw_memcpy(&wepkey[3], &psecuritypriv->dot11DefKey[keyindex].skey[0], keylength); + memcpy(&wepkey[0], iv, 3); + /* memcpy(&wepkey[3], &psecuritypriv->dot11DefKey[psecuritypriv->dot11PrivacyKeyIndex].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; payload = pframe + prxattrib->iv_len + prxattrib->hdrlen; @@ -732,7 +732,7 @@ u32 rtw_tkip_encrypt(_adapter *padapter, u8 *pxmitframe) } */ - if (IS_MCAST(pattrib->ra)) + if (is_multicast_ether_addr(pattrib->ra)) prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey; else { /* prwskey=&stainfo->dot118021x_UncstKey.skey[0]; */ @@ -820,7 +820,7 @@ u32 rtw_tkip_decrypt(_adapter *padapter, u8 *precvframe) stainfo = rtw_get_stainfo(&padapter->stapriv , &prxattrib->ta[0]); if (stainfo != NULL) { - if (IS_MCAST(prxattrib->ra)) { + if (is_multicast_ether_addr(prxattrib->ra)) { static systime start = 0; static u32 no_gkey_bc_cnt = 0; static u32 no_gkey_mc_cnt = 0; @@ -1597,7 +1597,7 @@ u32 rtw_aes_encrypt(_adapter *padapter, u8 *pxmitframe) } */ - if (IS_MCAST(pattrib->ra)) + if (is_multicast_ether_addr(pattrib->ra)) prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey; else { /* prwskey=&stainfo->dot118021x_UncstKey.skey[0]; */ @@ -1767,7 +1767,7 @@ static sint aes_decipher(u8 *key, uint hdrlen, /* start to calculate the mic */ 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]; @@ -1935,7 +1935,7 @@ u32 rtw_aes_decrypt(_adapter *padapter, u8 *precvframe) stainfo = rtw_get_stainfo(&padapter->stapriv , &prxattrib->ta[0]); if (stainfo != NULL) { - if (IS_MCAST(prxattrib->ra)) { + if (is_multicast_ether_addr(prxattrib->ra)) { static systime start = 0; static u32 no_gkey_bc_cnt = 0; static u32 no_gkey_mc_cnt = 0; @@ -2049,7 +2049,7 @@ u32 rtw_BIP_verify(_adapter *padapter, u8 *whdr_pos, sint flen return RTW_RX_HANDLED; /* copy key index */ - _rtw_memcpy(&pkt_keyid, mme + 2, 2); + memcpy(&pkt_keyid, mme + 2, 2); pkt_keyid = le16_to_cpu(pkt_keyid); if (pkt_keyid != keyid) { 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 */ - _rtw_memcpy(&pkt_ipn, mme + 4, 6); + memcpy(&pkt_ipn, mme + 4, 6); pkt_ipn = le64_to_cpu(pkt_ipn); /* BIP packet number should bigger than previous BIP packet */ 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; /* 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 */ 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); /* conscruct AAD, copy frame control field */ - _rtw_memcpy(BIP_AAD, &pwlanhdr->frame_ctl, 2); + memcpy(BIP_AAD, &pwlanhdr->frame_ctl, 2); ClearRetry(BIP_AAD); ClearPwrMgt(BIP_AAD); ClearMData(BIP_AAD); /* 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)) goto BIP_exit; @@ -2220,7 +2220,7 @@ static int sha256_process(struct sha256_state_rtk *md, unsigned char *in, inlen -= block_size; } else { 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; in += 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 */ 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 */ for (i = 0; i < 64; i++) 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); 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 */ for (i = 0; i < 64; i++) k_pad[i] ^= 0x5c; @@ -2452,7 +2452,7 @@ static void sha256_prf(u8 *key, size_t key_len, char *label, pos += SHA256_MAC_LEN; } else { hmac_sha256_vector(key, key_len, 4, addr, len, hash); - _rtw_memcpy(&buf[pos], hash, plen); + memcpy(&buf[pos], hash, plen); break; } 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 /* for AES-SIV */ #define os_memset memset -#define os_memcpy _rtw_memcpy +#define os_memcpy memcpy #define os_malloc rtw_malloc #define bin_clear_free(bin, len) \ 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) { - _rtw_memcpy(data, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(data + ETH_ALEN, psta->cmn.mac_addr, ETH_ALEN); + memcpy(data, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(data + ETH_ALEN, psta->cmn.mac_addr, ETH_ALEN); } else { - _rtw_memcpy(data, psta->cmn.mac_addr, ETH_ALEN); - _rtw_memcpy(data + ETH_ALEN, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(data, psta->cmn.mac_addr, 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)); @@ -3162,24 +3162,24 @@ int wpa_tdls_ftie_mic(u8 *kck, u8 trans_seq, pos = buf; _lnkid = (struct wpa_tdls_lnkid *) lnkid; /* 1) TDLS initiator STA MAC address */ - _rtw_memcpy(pos, _lnkid->init_sta, ETH_ALEN); + memcpy(pos, _lnkid->init_sta, ETH_ALEN); pos += ETH_ALEN; /* 2) TDLS responder STA MAC address */ - _rtw_memcpy(pos, _lnkid->resp_sta, ETH_ALEN); + memcpy(pos, _lnkid->resp_sta, ETH_ALEN); pos += ETH_ALEN; /* 3) Transaction Sequence number */ *pos++ = trans_seq; /* 4) Link Identifier IE */ - _rtw_memcpy(pos, lnkid, 2 + lnkid[1]); + memcpy(pos, lnkid, 2 + lnkid[1]); pos += 2 + lnkid[1]; /* 5) RSN IE */ - _rtw_memcpy(pos, rsnie, 2 + rsnie[1]); + memcpy(pos, rsnie, 2 + rsnie[1]); pos += 2 + rsnie[1]; /* 6) Timeout Interval IE */ - _rtw_memcpy(pos, timeoutie, 2 + timeoutie[1]); + memcpy(pos, timeoutie, 2 + timeoutie[1]); pos += 2 + timeoutie[1]; /* 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; memset(_ftie->mic, 0, TDLS_MIC_LEN); pos += 2 + ftie[1]; @@ -3218,17 +3218,17 @@ int wpa_tdls_teardown_ftie_mic(u8 *kck, u8 *lnkid, u16 reason, pos = buf; /* 1) Link Identifier IE */ - _rtw_memcpy(pos, lnkid, 2 + lnkid[1]); + memcpy(pos, lnkid, 2 + lnkid[1]); pos += 2 + lnkid[1]; /* 2) Reason Code */ - _rtw_memcpy(pos, (u8 *)&reason, 2); + memcpy(pos, (u8 *)&reason, 2); pos += 2; /* 3) Dialog Token */ *pos++ = dialog_token; /* 4) Transaction Sequence number */ *pos++ = trans_seq; /* 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; memset(_ftie->mic, 0, TDLS_MIC_LEN); pos += 2 + ftie[1]; @@ -3260,24 +3260,24 @@ int tdls_verify_mic(u8 *kck, u8 trans_seq, pos = buf; /* 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; /* 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; /* 3) Transaction Sequence number */ *pos++ = trans_seq; /* 4) Link Identifier IE */ - _rtw_memcpy(pos, lnkid, 2 + 18); + memcpy(pos, lnkid, 2 + 18); pos += 2 + 18; /* 5) RSN IE */ - _rtw_memcpy(pos, rsnie, 2 + *(rsnie + 1)); + memcpy(pos, rsnie, 2 + *(rsnie + 1)); pos += 2 + *(rsnie + 1); /* 6) Timeout Interval IE */ - _rtw_memcpy(pos, timeoutie, 2 + *(timeoutie + 1)); + memcpy(pos, timeoutie, 2 + *(timeoutie + 1)); pos += 2 + *(timeoutie + 1); /* 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; tmp_ftie = (u8 *)(pos + 2); memset(tmp_ftie, 0, 16); diff --git a/core/rtw_sta_mgt.c b/core/rtw_sta_mgt.c index 86873d0..6cb3731 100644 --- a/core/rtw_sta_mgt.c +++ b/core/rtw_sta_mgt.c @@ -479,7 +479,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, const u8 *hwaddr) 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); @@ -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. */ for (i = 0; i < 16; i++) { - _rtw_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.rxcache.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])); } @@ -859,7 +859,7 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, const u8 *hwaddr) if (hwaddr == NULL) return NULL; - if (IS_MCAST(hwaddr)) + if (is_multicast_ether_addr(hwaddr)) addr = bc_addr; else addr = hwaddr; @@ -1142,7 +1142,7 @@ struct sta_info *rtw_pre_link_sta_add(struct sta_priv *stapriv, u8 *hwaddr) } if (exist == _FALSE && node) { - _rtw_memcpy(node->addr, hwaddr, ETH_ALEN); + memcpy(node->addr, hwaddr, ETH_ALEN); node->valid = _TRUE; 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++) { if (pre_link_sta_ctl->node[i].valid == _FALSE) 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->num--; j++; diff --git a/core/rtw_tdls.c b/core/rtw_tdls.c index 43d8c67..67926b5 100644 --- a/core/rtw_tdls.c +++ b/core/rtw_tdls.c @@ -130,7 +130,7 @@ void rtw_free_all_tdls_sta(_adapter *padapter, u8 enqueue_cmd) RTW_INFO("Do tear down to "MAC_FMT" by enqueue_cmd = %d\n", MAC_ARG(psta->cmn.mac_addr), enqueue_cmd); - _rtw_memcpy(&(tdls_param.addr), psta->cmn.mac_addr, ETH_ALEN); + memcpy(&(tdls_param.addr), psta->cmn.mac_addr, ETH_ALEN); tdls_param.option = TDLS_TEARDOWN_STA_NO_WAIT; tdls_hdl(padapter, (unsigned char *)&(tdls_param)); @@ -321,9 +321,9 @@ int _issue_nulldata_to_TDLS_peer_STA(_adapter *padapter, unsigned char *da, unsi SetAckpolicy(qc, pattrib->ack_policy); - _rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr1, da, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -430,7 +430,7 @@ void rtw_tdls_process_ht_cap(_adapter *padapter, struct sta_info *ptdls_sta, u8 ptdls_sta->flags |= WLAN_STA_HT; ptdls_sta->flags |= WLAN_STA_WME; - _rtw_memcpy(&ptdls_sta->htpriv.ht_cap, data, sizeof(struct rtw_ieee80211_ht_cap)); + memcpy(&ptdls_sta->htpriv.ht_cap, data, sizeof(struct rtw_ieee80211_ht_cap)); } else { ptdls_sta->flags &= ~WLAN_STA_HT; return; @@ -541,11 +541,11 @@ void rtw_tdls_process_vht_cap(_adapter *padapter, struct sta_info *ptdls_sta, u8 if (data && Length == 12) { ptdls_sta->flags |= WLAN_STA_VHT; - _rtw_memcpy(ptdls_sta->vhtpriv.vht_cap, data, 12); + memcpy(ptdls_sta->vhtpriv.vht_cap, data, 12); #if 0 if (elems.vht_op_mode_notify && elems.vht_op_mode_notify_len == 1) - _rtw_memcpy(&pstat->vhtpriv.vht_op_mode_notify, elems.vht_op_mode_notify, 1); + memcpy(&pstat->vhtpriv.vht_op_mode_notify, elems.vht_op_mode_notify, 1); else /* for Frame without Operating Mode notify ie; default: 80M */ pstat->vhtpriv.vht_op_mode_notify = CHANNEL_WIDTH_80; #else @@ -658,7 +658,7 @@ void rtw_tdls_process_vht_op_mode_notify(_adapter *padapter, struct sta_info *pt u8 vht_mcs_map[2] = {}; rtw_vht_nss_to_mcsmap(target_rxss, vht_mcs_map, ptdls_sta->vhtpriv.vht_mcs_map); - _rtw_memcpy(ptdls_sta->vhtpriv.vht_mcs_map, vht_mcs_map, 2); + memcpy(ptdls_sta->vhtpriv.vht_mcs_map, vht_mcs_map, 2); } } @@ -760,9 +760,9 @@ u8 *rtw_tdls_set_ftie(struct tdls_txmgmt *ptxmgmt, u8 *pframe, struct pkt_attrib return rtw_set_ie(pframe, _FTIE_, len, p + 2, &(pattrib->pktlen)); else { if (ANonce != NULL) - _rtw_memcpy(FTIE.Anonce, ANonce, WPA_NONCE_LEN); + memcpy(FTIE.Anonce, ANonce, WPA_NONCE_LEN); if (SNonce != NULL) - _rtw_memcpy(FTIE.Snonce, SNonce, WPA_NONCE_LEN); + memcpy(FTIE.Snonce, SNonce, WPA_NONCE_LEN); return rtw_set_ie(pframe, _FTIE_, TDLS_FTIE_DATA_LEN, (u8 *)FTIE.data, &(pattrib->pktlen)); @@ -785,9 +785,9 @@ u8 *rtw_tdls_set_timeout_interval(struct tdls_txmgmt *ptxmgmt, u8 *pframe, struc /* Timeout interval */ timeout_itvl[0] = 0x02; if (init == _TRUE) - _rtw_memcpy(timeout_itvl + 1, &timeout_interval, 4); + memcpy(timeout_itvl + 1, &timeout_interval, 4); else - _rtw_memcpy(timeout_itvl + 1, (u8 *)(&ptdls_sta->TDLS_PeerKey_Lifetime), 4); + memcpy(timeout_itvl + 1, (u8 *)(&ptdls_sta->TDLS_PeerKey_Lifetime), 4); return rtw_set_ie(pframe, _TIMEOUT_ITVL_IE_, 5, timeout_itvl, &(pattrib->pktlen)); } @@ -852,7 +852,7 @@ u8 *rtw_tdls_set_capability(_adapter *padapter, u8 *pframe, struct pkt_attrib *p struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; u8 cap_from_ie[2] = {0}; - _rtw_memcpy(cap_from_ie, rtw_get_capability_from_ie(pmlmeinfo->network.IEs), 2); + memcpy(cap_from_ie, rtw_get_capability_from_ie(pmlmeinfo->network.IEs), 2); return rtw_set_fixed_ie(pframe, 2, cap_from_ie, &(pattrib->pktlen)); } @@ -891,14 +891,14 @@ u8 *rtw_tdls_set_linkid(_adapter *padapter, u8 *pframe, struct pkt_attrib *pattr u8 link_id_addr[18] = {0}; - _rtw_memcpy(link_id_addr, get_my_bssid(&(pmlmeinfo->network)), 6); + memcpy(link_id_addr, get_my_bssid(&(pmlmeinfo->network)), 6); if (init == _TRUE) { - _rtw_memcpy((link_id_addr + 6), pattrib->src, 6); - _rtw_memcpy((link_id_addr + 12), pattrib->dst, 6); + memcpy((link_id_addr + 6), pattrib->src, 6); + memcpy((link_id_addr + 12), pattrib->dst, 6); } else { - _rtw_memcpy((link_id_addr + 6), pattrib->dst, 6); - _rtw_memcpy((link_id_addr + 12), pattrib->src, 6); + memcpy((link_id_addr + 6), pattrib->dst, 6); + memcpy((link_id_addr + 12), pattrib->src, 6); } return rtw_set_ie(pframe, _LINK_ID_IE_, 18, link_id_addr, &(pattrib->pktlen)); } @@ -921,8 +921,8 @@ u8 *rtw_tdls_set_ch_sw(u8 *pframe, struct pkt_attrib *pattrib, struct sta_info * u16 switch_timeout = (ptdls_sta->ch_switch_timeout >= TDLS_CH_SWITCH_TIMEOUT * 1000) ? ptdls_sta->ch_switch_timeout : TDLS_CH_SWITCH_TIMEOUT; - _rtw_memcpy(ch_switch_timing, &switch_time, 2); - _rtw_memcpy(ch_switch_timing + 2, &switch_timeout, 2); + memcpy(ch_switch_timing, &switch_time, 2); + memcpy(ch_switch_timing + 2, &switch_timeout, 2); return rtw_set_ie(pframe, _CH_SWITCH_TIMING_, 4, ch_switch_timing, &(pattrib->pktlen)); } @@ -1069,12 +1069,12 @@ u8 *rtw_tdls_set_wmm_params(_adapter *padapter, u8 *pframe, struct pkt_attrib *p u8 wmm_param_ele[24] = {0}; if (&pmlmeinfo->WMM_param) { - _rtw_memcpy(wmm_param_ele, WMM_PARA_OUI, 6); + memcpy(wmm_param_ele, WMM_PARA_OUI, 6); if (_rtw_memcmp(&pmlmeinfo->WMM_param, &wmm_param_ele[6], 18) == _TRUE) /* Use default WMM Param */ - _rtw_memcpy(wmm_param_ele + 6, (u8 *)&TDLS_WMM_PARAM_IE, sizeof(TDLS_WMM_PARAM_IE)); + memcpy(wmm_param_ele + 6, (u8 *)&TDLS_WMM_PARAM_IE, sizeof(TDLS_WMM_PARAM_IE)); else - _rtw_memcpy(wmm_param_ele + 6, (u8 *)&pmlmeinfo->WMM_param, sizeof(pmlmeinfo->WMM_param)); + memcpy(wmm_param_ele + 6, (u8 *)&pmlmeinfo->WMM_param, sizeof(pmlmeinfo->WMM_param)); return rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, 24, wmm_param_ele, &(pattrib->pktlen)); } else return pframe; @@ -1106,7 +1106,7 @@ void rtw_tdls_process_wfd_ie(struct tdls_info *ptdlsinfo, u8 *ptr, u8 length) attr_content = rtw_get_wfd_attr_content(wfd_ie, wfd_ielen, WFD_ATTR_LOCAL_IP_ADDR, NULL, &attr_contentlen); if (attr_content && attr_contentlen) { - _rtw_memcpy(ptdlsinfo->wfd_info->peer_ip_address, (attr_content + 1), 4); + memcpy(ptdlsinfo->wfd_info->peer_ip_address, (attr_content + 1), 4); RTW_INFO("[%s] Peer IP = %02u.%02u.%02u.%02u\n", __FUNCTION__, ptdlsinfo->wfd_info->peer_ip_address[0], ptdlsinfo->wfd_info->peer_ip_address[1], ptdlsinfo->wfd_info->peer_ip_address[2], ptdlsinfo->wfd_info->peer_ip_address[3]); @@ -1140,10 +1140,10 @@ int issue_tunneled_probe_req(_adapter *padapter) pmgntframe->frame_tag = DATA_FRAMETAG; pattrib->ether_type = 0x890d; - _rtw_memcpy(pattrib->dst, baddr, ETH_ALEN); - _rtw_memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); + memcpy(pattrib->dst, baddr, ETH_ALEN); + memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN); + memcpy(pattrib->ta, pattrib->src, ETH_ALEN); update_tdls_attrib(padapter, pattrib); pattrib->qsel = pattrib->priority; @@ -1182,10 +1182,10 @@ int issue_tunneled_probe_rsp(_adapter *padapter, union recv_frame *precv_frame) pmgntframe->frame_tag = DATA_FRAMETAG; pattrib->ether_type = 0x890d; - _rtw_memcpy(pattrib->dst, precv_frame->u.hdr.attrib.src, ETH_ALEN); - _rtw_memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); + memcpy(pattrib->dst, precv_frame->u.hdr.attrib.src, ETH_ALEN); + memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN); + memcpy(pattrib->ta, pattrib->src, ETH_ALEN); update_tdls_attrib(padapter, pattrib); pattrib->qsel = pattrib->priority; @@ -1221,7 +1221,7 @@ int issue_tdls_setup_req(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, int wa if (rtw_tdls_is_setup_allowed(padapter) == _FALSE) goto exit; - if (IS_MCAST(ptxmgmt->peer)) + if (is_multicast_ether_addr(ptxmgmt->peer)) goto exit; ptdls_sta = rtw_get_stainfo(pstapriv, ptxmgmt->peer); @@ -1253,10 +1253,10 @@ int issue_tdls_setup_req(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, int wa pmgntframe->frame_tag = DATA_FRAMETAG; pattrib->ether_type = 0x890d; - _rtw_memcpy(pattrib->dst, ptxmgmt->peer, ETH_ALEN); - _rtw_memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); + memcpy(pattrib->dst, ptxmgmt->peer, ETH_ALEN); + memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN); + memcpy(pattrib->ta, pattrib->src, ETH_ALEN); update_tdls_attrib(padapter, pattrib); @@ -1316,15 +1316,15 @@ int _issue_tdls_teardown(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, struct pmgntframe->frame_tag = DATA_FRAMETAG; pattrib->ether_type = 0x890d; - _rtw_memcpy(pattrib->dst, ptxmgmt->peer, ETH_ALEN); - _rtw_memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pattrib->dst, ptxmgmt->peer, ETH_ALEN); + memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); if (ptxmgmt->status_code == _RSON_TDLS_TEAR_UN_RSN_) - _rtw_memcpy(pattrib->ra, ptxmgmt->peer, ETH_ALEN); + memcpy(pattrib->ra, ptxmgmt->peer, ETH_ALEN); else - _rtw_memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN); + memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); + memcpy(pattrib->ta, pattrib->src, ETH_ALEN); update_tdls_attrib(padapter, pattrib); pattrib->qsel = pattrib->priority; @@ -1397,10 +1397,10 @@ int issue_tdls_dis_req(_adapter *padapter, struct tdls_txmgmt *ptxmgmt) pmgntframe->frame_tag = DATA_FRAMETAG; pattrib->ether_type = 0x890d; - _rtw_memcpy(pattrib->dst, ptxmgmt->peer, ETH_ALEN); - _rtw_memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); + memcpy(pattrib->dst, ptxmgmt->peer, ETH_ALEN); + memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN); + memcpy(pattrib->ta, pattrib->src, ETH_ALEN); update_tdls_attrib(padapter, pattrib); pattrib->qsel = pattrib->priority; @@ -1436,10 +1436,10 @@ int issue_tdls_setup_rsp(_adapter *padapter, struct tdls_txmgmt *ptxmgmt) pmgntframe->frame_tag = DATA_FRAMETAG; pattrib->ether_type = 0x890d; - _rtw_memcpy(pattrib->dst, ptxmgmt->peer, ETH_ALEN); - _rtw_memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pattrib->ra, get_bssid(&(padapter->mlmepriv)), ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); + memcpy(pattrib->dst, ptxmgmt->peer, ETH_ALEN); + memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pattrib->ra, get_bssid(&(padapter->mlmepriv)), ETH_ALEN); + memcpy(pattrib->ta, pattrib->src, ETH_ALEN); update_tdls_attrib(padapter, pattrib); pattrib->qsel = pattrib->priority; @@ -1477,10 +1477,10 @@ int issue_tdls_setup_cfm(_adapter *padapter, struct tdls_txmgmt *ptxmgmt) pmgntframe->frame_tag = DATA_FRAMETAG; pattrib->ether_type = 0x890d; - _rtw_memcpy(pattrib->dst, ptxmgmt->peer, ETH_ALEN); - _rtw_memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pattrib->ra, get_bssid(&padapter->mlmepriv), ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); + memcpy(pattrib->dst, ptxmgmt->peer, ETH_ALEN); + memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pattrib->ra, get_bssid(&padapter->mlmepriv), ETH_ALEN); + memcpy(pattrib->ta, pattrib->src, ETH_ALEN); update_tdls_attrib(padapter, pattrib); pattrib->qsel = pattrib->priority; @@ -1529,12 +1529,12 @@ int issue_tdls_dis_rsp(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, u8 priva *(fctrl) = 0; /* unicast probe request frame */ - _rtw_memcpy(pwlanhdr->addr1, ptxmgmt->peer, ETH_ALEN); - _rtw_memcpy(pattrib->dst, pwlanhdr->addr1, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pattrib->src, pwlanhdr->addr2, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_bssid(&padapter->mlmepriv), ETH_ALEN); - _rtw_memcpy(pattrib->ra, pwlanhdr->addr3, ETH_ALEN); + memcpy(pwlanhdr->addr1, ptxmgmt->peer, ETH_ALEN); + memcpy(pattrib->dst, pwlanhdr->addr1, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pattrib->src, pwlanhdr->addr2, ETH_ALEN); + memcpy(pwlanhdr->addr3, get_bssid(&padapter->mlmepriv), ETH_ALEN); + memcpy(pattrib->ra, pwlanhdr->addr3, ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -1576,10 +1576,10 @@ int issue_tdls_peer_traffic_rsp(_adapter *padapter, struct sta_info *ptdls_sta, pmgntframe->frame_tag = DATA_FRAMETAG; pattrib->ether_type = 0x890d; - _rtw_memcpy(pattrib->dst, ptdls_sta->cmn.mac_addr, ETH_ALEN); - _rtw_memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pattrib->ra, ptdls_sta->cmn.mac_addr, ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); + memcpy(pattrib->dst, ptdls_sta->cmn.mac_addr, ETH_ALEN); + memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pattrib->ra, ptdls_sta->cmn.mac_addr, ETH_ALEN); + memcpy(pattrib->ta, pattrib->src, ETH_ALEN); update_tdls_attrib(padapter, pattrib); pattrib->qsel = pattrib->priority; @@ -1621,10 +1621,10 @@ int issue_tdls_peer_traffic_indication(_adapter *padapter, struct sta_info *ptdl pmgntframe->frame_tag = DATA_FRAMETAG; pattrib->ether_type = 0x890d; - _rtw_memcpy(pattrib->dst, ptdls_sta->cmn.mac_addr, ETH_ALEN); - _rtw_memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); + memcpy(pattrib->dst, ptdls_sta->cmn.mac_addr, ETH_ALEN); + memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN); + memcpy(pattrib->ta, pattrib->src, ETH_ALEN); /* PTI frame's priority should be AC_VO */ pattrib->priority = 7; @@ -1674,10 +1674,10 @@ int issue_tdls_ch_switch_req(_adapter *padapter, struct sta_info *ptdls_sta) pmgntframe->frame_tag = DATA_FRAMETAG; pattrib->ether_type = 0x890d; - _rtw_memcpy(pattrib->dst, ptdls_sta->cmn.mac_addr, ETH_ALEN); - _rtw_memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pattrib->ra, ptdls_sta->cmn.mac_addr, ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); + memcpy(pattrib->dst, ptdls_sta->cmn.mac_addr, ETH_ALEN); + memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pattrib->ra, ptdls_sta->cmn.mac_addr, ETH_ALEN); + memcpy(pattrib->ta, pattrib->src, ETH_ALEN); update_tdls_attrib(padapter, pattrib); pattrib->qsel = pattrib->priority; @@ -1720,10 +1720,10 @@ int issue_tdls_ch_switch_rsp(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, in pmgntframe->frame_tag = DATA_FRAMETAG; pattrib->ether_type = 0x890d; - _rtw_memcpy(pattrib->dst, ptxmgmt->peer, ETH_ALEN); - _rtw_memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pattrib->ra, ptxmgmt->peer, ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); + memcpy(pattrib->dst, ptxmgmt->peer, ETH_ALEN); + memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pattrib->ra, ptxmgmt->peer, ETH_ALEN); + memcpy(pattrib->ta, pattrib->src, ETH_ALEN); update_tdls_attrib(padapter, pattrib); pattrib->qsel = pattrib->priority; @@ -1781,11 +1781,11 @@ int On_TDLS_Dis_Rsp(_adapter *padapter, union recv_frame *precv_frame) /* Record the tdls sta with lowest signal strength */ if (ptdlsinfo->sta_maximum == _TRUE && ptdls_sta->alive_count >= 1) { if (_rtw_memcmp(ptdlsinfo->ss_record.macaddr, empty_addr, ETH_ALEN)) { - _rtw_memcpy(ptdlsinfo->ss_record.macaddr, psa, ETH_ALEN); + memcpy(ptdlsinfo->ss_record.macaddr, psa, ETH_ALEN); ptdlsinfo->ss_record.RxPWDBAll = pattrib->phy_info.rx_pwdb_all; } else { if (ptdlsinfo->ss_record.RxPWDBAll < pattrib->phy_info.rx_pwdb_all) { - _rtw_memcpy(ptdlsinfo->ss_record.macaddr, psa, ETH_ALEN); + memcpy(ptdlsinfo->ss_record.macaddr, psa, ETH_ALEN); ptdlsinfo->ss_record.RxPWDBAll = pattrib->phy_info.rx_pwdb_all; } } @@ -1798,7 +1798,7 @@ int On_TDLS_Dis_Rsp(_adapter *padapter, union recv_frame *precv_frame) goto exit; } else { if (pattrib->phy_info.rx_pwdb_all > ptdlsinfo->ss_record.RxPWDBAll) { - _rtw_memcpy(txmgmt.peer, ptdlsinfo->ss_record.macaddr, ETH_ALEN); + memcpy(txmgmt.peer, ptdlsinfo->ss_record.macaddr, ETH_ALEN); /* issue_tdls_teardown(padapter, ptdlsinfo->ss_record.macaddr, _FALSE); */ } else { ret = _FAIL; @@ -1810,7 +1810,7 @@ int On_TDLS_Dis_Rsp(_adapter *padapter, union recv_frame *precv_frame) if (pattrib->phy_info.rx_pwdb_all + TDLS_SIGNAL_THRESH >= rssi) { RTW_INFO("pattrib->RxPWDBAll=%d, pdmpriv->undecorated_smoothed_pwdb=%d\n", pattrib->phy_info.rx_pwdb_all, rssi); - _rtw_memcpy(txmgmt.peer, psa, ETH_ALEN); + memcpy(txmgmt.peer, psa, ETH_ALEN); issue_tdls_setup_req(padapter, &txmgmt, _FALSE); } } @@ -1911,14 +1911,14 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame, struct switch (pIE->ElementID) { case _SUPPORTEDRATES_IE_: - _rtw_memcpy(supportRate, pIE->data, pIE->Length); + memcpy(supportRate, pIE->data, pIE->Length); supportRateNum = pIE->Length; break; case _COUNTRY_IE_: break; case _EXT_SUPPORTEDRATES_IE_: if (supportRateNum < sizeof(supportRate)) { - _rtw_memcpy(supportRate + supportRateNum, pIE->data, pIE->Length); + memcpy(supportRate + supportRateNum, pIE->data, pIE->Length); supportRateNum += pIE->Length; } break; @@ -1930,7 +1930,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame, struct prsnie = (u8 *)pIE; /* Check CCMP pairwise_cipher presence. */ ppairwise_cipher = prsnie + 10; - _rtw_memcpy(ptdls_sta->TDLS_RSNIE, pIE->data, pIE->Length); + memcpy(ptdls_sta->TDLS_RSNIE, pIE->data, pIE->Length); pairwise_count = *(u16 *)(ppairwise_cipher - 2); for (k = 0; k < pairwise_count; k++) { if (_rtw_memcmp(ppairwise_cipher + 4 * k, RSN_CIPHER_SUITE_CCMP, 4) == _TRUE) @@ -1947,7 +1947,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame, struct break; case _FTIE_: if (prx_pkt_attrib->encrypt) - _rtw_memcpy(SNonce, (ptr + j + 52), 32); + memcpy(SNonce, (ptr + j + 52), 32); break; case _TIMEOUT_ITVL_IE_: if (prx_pkt_attrib->encrypt) @@ -1999,7 +1999,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame, struct ptdls_sta->tdls_sta_state |= TDLS_INITIATOR_STATE; if (prx_pkt_attrib->encrypt) { - _rtw_memcpy(ptdls_sta->SNonce, SNonce, 32); + memcpy(ptdls_sta->SNonce, SNonce, 32); if (timeout_interval <= 300) ptdls_sta->TDLS_PeerKey_Lifetime = TDLS_TPK_RESEND_COUNT; @@ -2009,7 +2009,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame, struct /* Update station supportRate */ ptdls_sta->bssratelen = supportRateNum; - _rtw_memcpy(ptdls_sta->bssrateset, supportRate, supportRateNum); + memcpy(ptdls_sta->bssrateset, supportRate, supportRateNum); /* -2: AP + BC/MC sta, -4: default key */ if (ptdlsinfo->sta_cnt == MAX_ALLOWED_TDLS_STA_NUM) @@ -2022,7 +2022,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame, struct } else goto exit; - _rtw_memcpy(txmgmt.peer, prx_pkt_attrib->src, ETH_ALEN); + memcpy(txmgmt.peer, prx_pkt_attrib->src, ETH_ALEN); if (rtw_tdls_is_driver_setup(padapter)) { issue_tdls_setup_rsp(padapter, &txmgmt); @@ -2075,7 +2075,7 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame, struct - ETH_TYPE_LEN - PAYLOAD_TYPE_LEN; - _rtw_memcpy(&status_code, ptr + 2, 2); + memcpy(&status_code, ptr + 2, 2); if (status_code != 0) { RTW_INFO("[TDLS] %s status_code = %d, free_tdls_sta\n", __FUNCTION__, status_code); @@ -2093,14 +2093,14 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame, struct switch (pIE->ElementID) { case _SUPPORTEDRATES_IE_: - _rtw_memcpy(supportRate, pIE->data, pIE->Length); + memcpy(supportRate, pIE->data, pIE->Length); supportRateNum = pIE->Length; break; case _COUNTRY_IE_: break; case _EXT_SUPPORTEDRATES_IE_: if (supportRateNum < sizeof(supportRate)) { - _rtw_memcpy(supportRate + supportRateNum, pIE->data, pIE->Length); + memcpy(supportRate + supportRateNum, pIE->data, pIE->Length); supportRateNum += pIE->Length; } break; @@ -2110,7 +2110,7 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame, struct prsnie = (u8 *)pIE; /* Check CCMP pairwise_cipher presence. */ ppairwise_cipher = prsnie + 10; - _rtw_memcpy(&pairwise_count, (u16 *)(ppairwise_cipher - 2), 2); + memcpy(&pairwise_count, (u16 *)(ppairwise_cipher - 2), 2); for (k = 0; k < pairwise_count; k++) { if (_rtw_memcmp(ppairwise_cipher + 4 * k, RSN_CIPHER_SUITE_CCMP, 4) == _TRUE) verify_ccmp = 1; @@ -2126,7 +2126,7 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame, struct break; case _FTIE_: pftie = (u8 *)pIE; - _rtw_memcpy(ANonce, (ptr + j + 20), 32); + memcpy(ANonce, (ptr + j + 20), 32); break; case _TIMEOUT_ITVL_IE_: ptimeout_ie = (u8 *)pIE; @@ -2164,8 +2164,8 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame, struct } ptdls_sta->bssratelen = supportRateNum; - _rtw_memcpy(ptdls_sta->bssrateset, supportRate, supportRateNum); - _rtw_memcpy(ptdls_sta->ANonce, ANonce, 32); + memcpy(ptdls_sta->bssrateset, supportRate, supportRateNum); + memcpy(ptdls_sta->ANonce, ANonce, 32); #ifdef CONFIG_WFD rtw_tdls_process_wfd_ie(ptdlsinfo, ptr + FIXED_IE, parsing_length); @@ -2191,7 +2191,7 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame, struct txmgmt.status_code = _STATS_SUCCESSFUL_; if (rtw_tdls_is_driver_setup(padapter) == _TRUE) { - _rtw_memcpy(txmgmt.peer, prx_pkt_attrib->src, ETH_ALEN); + memcpy(txmgmt.peer, prx_pkt_attrib->src, ETH_ALEN); issue_tdls_setup_cfm(padapter, &txmgmt); if (txmgmt.status_code == _STATS_SUCCESSFUL_) { @@ -2246,7 +2246,7 @@ int On_TDLS_Setup_Cfm(_adapter *padapter, union recv_frame *precv_frame, struct - ETH_TYPE_LEN - PAYLOAD_TYPE_LEN; - _rtw_memcpy(&status_code, ptr + 2, 2); + memcpy(&status_code, ptr + 2, 2); if (status_code != 0) { RTW_INFO("[%s] status_code = %d\n, free_tdls_sta", __FUNCTION__, status_code); @@ -2355,7 +2355,7 @@ int On_TDLS_Dis_Req(_adapter *padapter, union recv_frame *precv_frame) memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt)); ptr += prx_pkt_attrib->hdrlen + prx_pkt_attrib->iv_len + LLC_HEADER_SIZE + ETH_TYPE_LEN + PAYLOAD_TYPE_LEN; txmgmt.dialog_token = *(ptr + 2); - _rtw_memcpy(&txmgmt.peer, precv_frame->u.hdr.attrib.src, ETH_ALEN); + memcpy(&txmgmt.peer, precv_frame->u.hdr.attrib.src, ETH_ALEN); txmgmt.action_code = TDLS_DISCOVERY_RESPONSE; parsing_length = ((union recv_frame *)precv_frame)->u.hdr.len - prx_pkt_attrib->hdrlen @@ -2610,7 +2610,7 @@ sint On_TDLS_Ch_Switch_Req(_adapter *padapter, union recv_frame *precv_frame, st _cancel_timer_ex(&ptdls_sta->ch_sw_monitor_timer); if (_rtw_memcmp(pchsw_info->addr, zaddr, ETH_ALEN) == _TRUE) - _rtw_memcpy(pchsw_info->addr, ptdls_sta->cmn.mac_addr, ETH_ALEN); + memcpy(pchsw_info->addr, ptdls_sta->cmn.mac_addr, ETH_ALEN); if (atomic_read(&pchsw_info->chsw_on) == _FALSE) rtw_tdls_cmd(padapter, ptdls_sta->cmn.mac_addr, TDLS_CH_SW_START); @@ -2657,7 +2657,7 @@ sint On_TDLS_Ch_Switch_Rsp(_adapter *padapter, union recv_frame *precv_frame, st - ETH_TYPE_LEN - PAYLOAD_TYPE_LEN; - _rtw_memcpy(&status_code, ptr + 2, 2); + memcpy(&status_code, ptr + 2, 2); if (status_code != 0) { RTW_INFO("[TDLS] %s status_code:%d\n", __func__, status_code); @@ -2675,13 +2675,13 @@ sint On_TDLS_Ch_Switch_Rsp(_adapter *padapter, union recv_frame *precv_frame, st case _LINK_ID_IE_: break; case _CH_SWITCH_TIMING_: - _rtw_memcpy(&switch_time, pIE->data, 2); + memcpy(&switch_time, pIE->data, 2); if (switch_time > ptdls_sta->ch_switch_time) - _rtw_memcpy(&ptdls_sta->ch_switch_time, &switch_time, 2); + memcpy(&ptdls_sta->ch_switch_time, &switch_time, 2); - _rtw_memcpy(&switch_timeout, pIE->data + 2, 2); + memcpy(&switch_timeout, pIE->data + 2, 2); if (switch_timeout > ptdls_sta->ch_switch_timeout) - _rtw_memcpy(&ptdls_sta->ch_switch_timeout, &switch_timeout, 2); + memcpy(&ptdls_sta->ch_switch_timeout, &switch_timeout, 2); break; default: break; @@ -2769,7 +2769,7 @@ void wfd_ie_tdls(_adapter *padapter, u8 *pframe, u32 *pktlen) /* Value: */ /* Associated BSSID */ 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 memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -2786,7 +2786,7 @@ void wfd_ie_tdls(_adapter *padapter, u8 *pframe, u32 *pktlen) wfdie[wfdielen++] = 0x01; /* IPv4 Address */ - _rtw_memcpy(wfdie + wfdielen, pwfd_info->ip_address, 4); + memcpy(wfdie + wfdielen, pwfd_info->ip_address, 4); wfdielen += 4; pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, pktlen); @@ -2808,7 +2808,7 @@ void rtw_build_tdls_setup_req_ies(_adapter *padapter, struct xmit_frame *pxmitfr if (pattrib->encrypt) { for (i = 0; i < 8; i++) { time = rtw_get_current_time(); - _rtw_memcpy(&ptdls_sta->SNonce[4 * i], (u8 *)&time, 4); + memcpy(&ptdls_sta->SNonce[4 * i], (u8 *)&time, 4); } } @@ -2884,7 +2884,7 @@ void rtw_build_tdls_setup_rsp_ies(_adapter *padapter, struct xmit_frame *pxmitfr if (pattrib->encrypt) { for (k = 0; k < 8; k++) { time = rtw_get_current_time(); - _rtw_memcpy(&ptdls_sta->ANonce[4 * k], (u8 *)&time, 4); + memcpy(&ptdls_sta->ANonce[4 * k], (u8 *)&time, 4); } } @@ -3297,7 +3297,7 @@ void _tdls_tpk_timer_hdl(void *FunctionContext) RTW_INFO("[TDLS] %s, Re-Setup TDLS link with "MAC_FMT" since TPK lifetime expires!\n", __FUNCTION__, MAC_ARG(ptdls_sta->cmn.mac_addr)); ptdls_sta->TPK_count = 0; - _rtw_memcpy(txmgmt.peer, ptdls_sta->cmn.mac_addr, ETH_ALEN); + memcpy(txmgmt.peer, ptdls_sta->cmn.mac_addr, ETH_ALEN); issue_tdls_setup_req(ptdls_sta->padapter, &txmgmt, _FALSE); } @@ -3356,7 +3356,7 @@ void _tdls_handshake_timer_hdl(void *FunctionContext) struct tdls_txmgmt txmgmt; memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt)); - _rtw_memcpy(txmgmt.peer, ptdls_sta->cmn.mac_addr, ETH_ALEN); + memcpy(txmgmt.peer, ptdls_sta->cmn.mac_addr, ETH_ALEN); txmgmt.status_code = _RSON_TDLS_TEAR_UN_RSN_; if (ptdls_sta != NULL) { @@ -3377,7 +3377,7 @@ void _tdls_pti_timer_hdl(void *FunctionContext) struct tdls_txmgmt txmgmt; memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt)); - _rtw_memcpy(txmgmt.peer, ptdls_sta->cmn.mac_addr, ETH_ALEN); + memcpy(txmgmt.peer, ptdls_sta->cmn.mac_addr, ETH_ALEN); txmgmt.status_code = _RSON_TDLS_TEAR_TOOFAR_; if (ptdls_sta != NULL) { diff --git a/core/rtw_vht.c b/core/rtw_vht.c index 66a40ec..14ad568 100644 --- a/core/rtw_vht.c +++ b/core/rtw_vht.c @@ -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); 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); } @@ -545,8 +545,8 @@ void VHT_caps_handler_infra_ap(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE /*store information about vht_mcs_set*/ pcap_mcs = GET_VHT_CAPABILITY_ELE_RX_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); - _rtw_memcpy(pvhtpriv->vht_mcs_map_tx_infra_ap, pcap_mcs_tx, 2); + memcpy(pvhtpriv->vht_mcs_map_infra_ap, pcap_mcs, 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); 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; 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); } @@ -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_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); @@ -912,10 +912,10 @@ u32 rtw_build_vht_cap_ie(_adapter *padapter, u8 *pbuf) SET_VHT_CAPABILITY_ELE_LINK_ADAPTION(pcap, 0); 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); - _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 */ bw = hal_largest_bw(padapter, REGSTY_BW_5G(pregistrypriv)); diff --git a/core/rtw_wapi.c b/core/rtw_wapi.c index 31f0f2b..2502f8a 100644 --- a/core/rtw_wapi.c +++ b/core/rtw_wapi.c @@ -163,7 +163,7 @@ WapiGetEntryForCamWrite(_adapter *padapter, u8 *pMacAddr, u8 KID, BOOLEAN IsMsk) pWapiInfo->wapiCamEntry[i].IsUsed = 1; pWapiInfo->wapiCamEntry[i].type = IsMsk; 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; break; } @@ -438,9 +438,9 @@ void rtw_wapi_update_info(_adapter *padapter, union recv_frame *precv_frame) precv_hdr->UserPriority = 0; 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; - _rtw_memcpy((u8 *)precv_hdr->WapiTempPN, pRecvPN, 16); + memcpy((u8 *)precv_hdr->WapiTempPN, pRecvPN, 16); WAPI_TRACE(WAPI_RX, "<========== %s\n", __FUNCTION__); } @@ -512,7 +512,7 @@ u8 rtw_wapi_check_for_drop( WAPI_TRACE(WAPI_RX, "%s: bFind=%d prxb->WapiSrcAddr="MAC_FMT"\n", __FUNCTION__, bFind, MAC_ARG(precv_hdr->WapiSrcAddr)); if (bFind) { - if (IS_MCAST(precv_hdr->attrib.ra)) { + if (is_multicast_ether_addr(precv_hdr->attrib.ra)) { WAPI_TRACE(WAPI_RX, "rtw_wapi_check_for_drop: multicast case\n"); pLastRecvPN = pWapiSta->lastRxMulticastPN; } else { @@ -542,13 +542,13 @@ u8 rtw_wapi_check_for_drop( if (!WapiComparePN(precv_hdr->WapiTempPN, pLastRecvPN)) { WAPI_TRACE(WAPI_RX, "%s: Equal PN!!\n", __FUNCTION__); - if (IS_MCAST(precv_hdr->attrib.ra)) - _rtw_memcpy(pLastRecvPN, WapiAEMultiCastPNInitialValueSrc, 16); + if (is_multicast_ether_addr(precv_hdr->attrib.ra)) + memcpy(pLastRecvPN, WapiAEMultiCastPNInitialValueSrc, 16); else - _rtw_memcpy(pLastRecvPN, WapiAEPNInitialValueSrc, 16); + memcpy(pLastRecvPN, WapiAEPNInitialValueSrc, 16); bDrop = true; } else - _rtw_memcpy(pLastRecvPN, precv_hdr->WapiTempPN, 16); + memcpy(pLastRecvPN, precv_hdr->WapiTempPN, 16); } 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; pframe[0] = _WAPI_IE_; pframe[1] = WapiIELength; - _rtw_memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength); + memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength); pframe += 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; pframe[0] = _WAPI_IE_; pframe[1] = WapiIELength; - _rtw_memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength); + memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength); pframe += 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))) { list_for_each_entry(pWapiBKID, &pWapiInfo->wapiBKIDStoreList, list) { bkidNum++; - _rtw_memcpy(pWapiInfo->wapiIE + WapiIELength + 2, pWapiBKID->bkid, 16); + memcpy(pWapiInfo->wapiIE + WapiIELength + 2, pWapiBKID->bkid, 16); WapiIELength += 16; } } - _rtw_memcpy(pWapiInfo->wapiIE + WapiIELength, &bkidNum, 2); + memcpy(pWapiInfo->wapiIE + WapiIELength, &bkidNum, 2); WapiIELength += 2; pframe[0] = _WAPI_IE_; pframe[1] = WapiIELength; - _rtw_memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength); + memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength); pframe += WapiIELength + 2; pattrib->pktlen += WapiIELength + 2; 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); list_del_init(&pWapiSta->list); list_add_tail(&pWapiSta->list, &pWapiInfo->wapiSTAUsedList); - _rtw_memcpy(pWapiSta->PeerMacAddr, padapter->mlmeextpriv.mlmext_info.network.MacAddress, 6); - _rtw_memcpy(pWapiSta->lastRxMulticastPN, WapiAEMultiCastPNInitialValueSrc, 16); - _rtw_memcpy(pWapiSta->lastRxUnicastPN, WapiAEPNInitialValueSrc, 16); + memcpy(pWapiSta->PeerMacAddr, padapter->mlmeextpriv.mlmext_info.network.MacAddress, 6); + memcpy(pWapiSta->lastRxMulticastPN, WapiAEMultiCastPNInitialValueSrc, 16); + memcpy(pWapiSta->lastRxUnicastPN, WapiAEPNInitialValueSrc, 16); /* For chenk PN error with Qos Data after s3: add by ylb 20111114 */ - _rtw_memcpy(pWapiSta->lastRxUnicastPNBEQueue, WapiAEPNInitialValueSrc, 16); - _rtw_memcpy(pWapiSta->lastRxUnicastPNBKQueue, WapiAEPNInitialValueSrc, 16); - _rtw_memcpy(pWapiSta->lastRxUnicastPNVIQueue, WapiAEPNInitialValueSrc, 16); - _rtw_memcpy(pWapiSta->lastRxUnicastPNVOQueue, WapiAEPNInitialValueSrc, 16); + memcpy(pWapiSta->lastRxUnicastPNBEQueue, WapiAEPNInitialValueSrc, 16); + memcpy(pWapiSta->lastRxUnicastPNBKQueue, WapiAEPNInitialValueSrc, 16); + memcpy(pWapiSta->lastRxUnicastPNVIQueue, WapiAEPNInitialValueSrc, 16); + memcpy(pWapiSta->lastRxUnicastPNVOQueue, WapiAEPNInitialValueSrc, 16); WAPI_TRACE(WAPI_MLME, "<========== %s\n", __FUNCTION__); } @@ -1148,7 +1148,7 @@ void rtw_wapi_get_iv(_adapter *padapter, u8 *pRA, u8 *IV) WAPI_DATA(WAPI_RX, "wapi_get_iv: pra", pRA, 6); - if (IS_MCAST(pRA)) { + if (is_multicast_ether_addr(pRA)) { if (!pWapiInfo->wapiTxMsk.bTxEnable) { WAPI_TRACE(WAPI_ERR, "%s: bTxEnable = 0!!\n", __FUNCTION__); return; @@ -1189,7 +1189,7 @@ void rtw_wapi_get_iv(_adapter *padapter, u8 *pRA, u8 *IV) pWapiExt->Reserved = 0; bPNOverflow = WapiIncreasePN(pWapiSta->lastTxUnicastPN, 2); - _rtw_memcpy(pWapiExt->PN, pWapiSta->lastTxUnicastPN, 16); + memcpy(pWapiExt->PN, pWapiSta->lastTxUnicastPN, 16); } } @@ -1213,7 +1213,7 @@ bool rtw_wapi_drop_for_key_absent(_adapter *padapter, u8 *pRA) if ((!padapter->WapiSupport) || (!pWapiInfo->bWapiEnable)) return true; - if (IS_MCAST(pRA)) { + if (is_multicast_ether_addr(pRA)) { if (!pWapiInfo->wapiTxMsk.bTxEnable) { bDrop = true; WAPI_TRACE(WAPI_RX, "rtw_wapi_drop_for_key_absent: multicast key is absent\n"); @@ -1265,19 +1265,19 @@ void rtw_wapi_set_set_encryption(_adapter *padapter, struct ieee_param *param) if (param->u.crypt.set_tx == 1) { list_for_each_entry(pWapiSta, &pWapiInfo->wapiSTAUsedList, list) { if (_rtw_memcmp(pWapiSta->PeerMacAddr, param->sta_addr, 6)) { - _rtw_memcpy(pWapiSta->lastTxUnicastPN, WapiASUEPNInitialValueSrc, 16); + memcpy(pWapiSta->lastTxUnicastPN, WapiASUEPNInitialValueSrc, 16); pWapiSta->wapiUsk.bSet = true; - _rtw_memcpy(pWapiSta->wapiUsk.dataKey, param->u.crypt.key, 16); - _rtw_memcpy(pWapiSta->wapiUsk.micKey, param->u.crypt.key + 16, 16); + memcpy(pWapiSta->wapiUsk.dataKey, param->u.crypt.key, 16); + memcpy(pWapiSta->wapiUsk.micKey, param->u.crypt.key + 16, 16); pWapiSta->wapiUsk.keyId = param->u.crypt.idx ; pWapiSta->wapiUsk.bTxEnable = true; - _rtw_memcpy(pWapiSta->lastRxUnicastPNBEQueue, WapiAEPNInitialValueSrc, 16); - _rtw_memcpy(pWapiSta->lastRxUnicastPNBKQueue, WapiAEPNInitialValueSrc, 16); - _rtw_memcpy(pWapiSta->lastRxUnicastPNVIQueue, WapiAEPNInitialValueSrc, 16); - _rtw_memcpy(pWapiSta->lastRxUnicastPNVOQueue, WapiAEPNInitialValueSrc, 16); - _rtw_memcpy(pWapiSta->lastRxUnicastPN, WapiAEPNInitialValueSrc, 16); + memcpy(pWapiSta->lastRxUnicastPNBEQueue, WapiAEPNInitialValueSrc, 16); + memcpy(pWapiSta->lastRxUnicastPNBKQueue, WapiAEPNInitialValueSrc, 16); + memcpy(pWapiSta->lastRxUnicastPNVIQueue, WapiAEPNInitialValueSrc, 16); + memcpy(pWapiSta->lastRxUnicastPNVOQueue, WapiAEPNInitialValueSrc, 16); + memcpy(pWapiSta->lastRxUnicastPN, WapiAEPNInitialValueSrc, 16); pWapiSta->wapiUskUpdate.bTxEnable = 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) { if (_rtw_memcmp(pWapiSta->PeerMacAddr, get_bssid(pmlmepriv), 6)) { pWapiSta->wapiMsk.bSet = true; - _rtw_memcpy(pWapiSta->wapiMsk.dataKey, param->u.crypt.key, 16); - _rtw_memcpy(pWapiSta->wapiMsk.micKey, param->u.crypt.key + 16, 16); + memcpy(pWapiSta->wapiMsk.dataKey, param->u.crypt.key, 16); + memcpy(pWapiSta->wapiMsk.micKey, param->u.crypt.key + 16, 16); pWapiSta->wapiMsk.keyId = param->u.crypt.idx ; pWapiSta->wapiMsk.bTxEnable = false; if (!pWapiSta->bSetkeyOk) pWapiSta->bSetkeyOk = true; pWapiSta->bAuthenticateInProgress = false; - _rtw_memcpy(pWapiSta->lastRxMulticastPN, WapiAEMultiCastPNInitialValueSrc, 16); + memcpy(pWapiSta->lastRxMulticastPN, WapiAEMultiCastPNInitialValueSrc, 16); if (psecuritypriv->sw_decrypt == false) { /* set rx broadcast key for ASUE */ diff --git a/core/rtw_wapi_sms4.c b/core/rtw_wapi_sms4.c index 4b7cf95..d96865a 100644 --- a/core/rtw_wapi_sms4.c +++ b/core/rtw_wapi_sms4.c @@ -523,7 +523,7 @@ int SecSMS4HeaderFillIV(_adapter *padapter, u8 *pxmitframe) WAPI_DATA(WAPI_TX, "FillIV - Before Fill IV", pskb->data, pskb->len); /* Address 1 is always receiver's address */ - if (IS_MCAST(pRA)) { + if (is_multicast_ether_addr(pRA)) { if (!pWapiInfo->wapiTxMsk.bTxEnable) { WAPI_TRACE(WAPI_ERR, "%s: bTxEnable = 0!!\n", __FUNCTION__); return -2; @@ -610,7 +610,7 @@ void SecSWSMS4Encryption( pRA = pframe + 4; - if (IS_MCAST(pRA)) { + if (is_multicast_ether_addr(pRA)) { KeyIdx = pWapiInfo->wapiTxMsk.keyId; pIV = pWapiInfo->lastTxMulticastPN; pMicKey = pWapiInfo->wapiTxMsk.micKey; @@ -728,7 +728,7 @@ u8 SecSWSMS4Decryption( return false; } - if (IS_MCAST(pRA)) { + if (is_multicast_ether_addr(pRA)) { WAPI_TRACE(WAPI_RX, "%s: Multicast decryption !!!\n", __FUNCTION__); if (pWapiSta->wapiMsk.keyId == KeyIdx && pWapiSta->wapiMsk.bSet) { pLastRxPN = pWapiSta->lastRxMulticastPN; @@ -821,7 +821,7 @@ u8 SecSWSMS4Decryption( WAPI_TRACE(WAPI_RX, "%s: Check MIC OK!!\n", __FUNCTION__); if (bUseUpdatedKey) { /* delete the old key */ - if (IS_MCAST(pRA)) { + if (is_multicast_ether_addr(pRA)) { WAPI_TRACE(WAPI_API, "%s(): AE use new update MSK!!\n", __FUNCTION__); pWapiSta->wapiMsk.keyId = pWapiSta->wapiMskUpdate.keyId; memcpy(pWapiSta->wapiMsk.dataKey, pWapiSta->wapiMskUpdate.dataKey, 16); diff --git a/core/rtw_wlan_util.c b/core/rtw_wlan_util.c index 0582116..499e5f7 100644 --- a/core/rtw_wlan_util.c +++ b/core/rtw_wlan_util.c @@ -338,7 +338,7 @@ void get_rate_set(_adapter *padapter, unsigned char *pbssrate, int *bssrate_len) memset(supportedrates, 0, NumRates); *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) @@ -675,7 +675,7 @@ __inline u8 *get_my_bssid(WLAN_BSSID_EX *pnetwork) u16 get_beacon_interval(WLAN_BSSID_EX *bss) { 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); @@ -793,7 +793,7 @@ inline void write_cam_from_cache(_adapter *adapter, u8 id) struct sec_cam_ent cache; _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); 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); dvobj->cam_cache[id].ctrl = ctrl; - _rtw_memcpy(dvobj->cam_cache[id].mac, mac, ETH_ALEN); - _rtw_memcpy(dvobj->cam_cache[id].key, key, 16); + memcpy(dvobj->cam_cache[id].mac, mac, ETH_ALEN); + memcpy(dvobj->cam_cache[id].key, key, 16); _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); 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) - _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); @@ -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))) return _FALSE; 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; return _TRUE; @@ -2061,7 +2061,7 @@ void HT_info_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE) return; 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 */ return; } @@ -2153,7 +2153,7 @@ void ERP_IE_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE) return; 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) @@ -2405,13 +2405,13 @@ void rtw_absorb_ssid_ifneed(_adapter *padapter, WLAN_BSSID_EX *bssid, u8 *pframe next_ie = p + 2 + ssid_len_ori; remain_len = snetwork->IELength - (next_ie - snetwork->IEs); 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 - _rtw_memcpy(backupIE, next_ie, remain_len); + memcpy(backupIE, next_ie, remain_len); *(p+1) = bssid->Ssid.SsidLength; - _rtw_memcpy(p+2, bssid->Ssid.Ssid, bssid->Ssid.SsidLength); - _rtw_memcpy(p+2+bssid->Ssid.SsidLength, backupIE, remain_len); + memcpy(p+2, bssid->Ssid.Ssid, bssid->Ssid.SsidLength); + memcpy(p+2+bssid->Ssid.SsidLength, backupIE, remain_len); snetwork->IELength += bssid->Ssid.SsidLength; } _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)) 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; } @@ -2546,7 +2546,7 @@ int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len, struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv; #ifdef DBG_RX_BCN - _rtw_memcpy(pmlmeext->tim, elems.tim, 4); + memcpy(pmlmeext->tim, elems.tim, 4); #endif 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]; - _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'; 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_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; } else { 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)) goto exit; - _rtw_memcpy(&tmp_beacon, cur_beacon, sizeof(tmp_beacon)); + memcpy(&tmp_beacon, cur_beacon, sizeof(tmp_beacon)); /* check fields excluding below */ 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; if (!BCNKEY_VERIFY_WHOLE_RATE_SET) { 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) 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 pmlmepriv->new_beacon_cnts = 0; #endif @@ -3075,11 +3075,11 @@ void update_tx_basic_rate(_adapter *padapter, u8 wirelessmode) 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) - _rtw_memcpy(supported_rates, rtw_basic_rate_mix, 7); + memcpy(supported_rates, rtw_basic_rate_mix, 7); else - _rtw_memcpy(supported_rates, rtw_basic_rate_ofdm, 3); + memcpy(supported_rates, rtw_basic_rate_ofdm, 3); if (wirelessmode & WIRELESS_11B) 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)) { /* 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; } else { - _rtw_memcpy(psta->bssrateset, rtw_basic_rate_ofdm, 3); + memcpy(psta->bssrateset, rtw_basic_rate_ofdm, 3); psta->bssratelen = 3; } } @@ -4196,9 +4196,9 @@ unsigned int setup_beacon_frame(_adapter *padapter, unsigned char *beacon_frame) fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN); + memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN); set_frame_sub_type(pframe, WIFI_BEACON); @@ -4210,13 +4210,13 @@ unsigned int setup_beacon_frame(_adapter *padapter, unsigned char *beacon_frame) len += 8; /* 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; len += 2; /* 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; len += 2; @@ -4448,11 +4448,11 @@ u8 rtw_set_default_pattern(_adapter *adapter) switch (index) { case 0: target = pwrpriv->patterns[index].content; - _rtw_memcpy(target, adapter_mac_addr(adapter), + memcpy(target, adapter_mac_addr(adapter), ETH_ALEN); target += ETH_TYPE_OFFSET; - _rtw_memcpy(target, &ip_protocol, + memcpy(target, &ip_protocol, sizeof(ip_protocol)); /* TCP */ @@ -4461,10 +4461,10 @@ u8 rtw_set_default_pattern(_adapter *adapter) target += (IP_OFFSET - PROTOCOL_OFFSET); - _rtw_memcpy(target, pmlmeinfo->ip_addr, + memcpy(target, pmlmeinfo->ip_addr, RTW_IP_ADDR_LEN); - _rtw_memcpy(pwrpriv->patterns[index].mask, + memcpy(pwrpriv->patterns[index].mask, &unicast_mask, sizeof(unicast_mask)); pwrpriv->patterns[index].len = @@ -4472,21 +4472,21 @@ u8 rtw_set_default_pattern(_adapter *adapter) break; case 1: target = pwrpriv->patterns[index].content; - _rtw_memcpy(target, adapter_mac_addr(adapter), + memcpy(target, adapter_mac_addr(adapter), ETH_ALEN); target += ETH_TYPE_OFFSET; - _rtw_memcpy(target, &ip_protocol, sizeof(ip_protocol)); + memcpy(target, &ip_protocol, sizeof(ip_protocol)); /* ICMP */ target += (PROTOCOL_OFFSET - ETH_TYPE_OFFSET); memset(target, 0x01, 1); target += (IP_OFFSET - PROTOCOL_OFFSET); - _rtw_memcpy(target, pmlmeinfo->ip_addr, + memcpy(target, pmlmeinfo->ip_addr, RTW_IP_ADDR_LEN); - _rtw_memcpy(pwrpriv->patterns[index].mask, + memcpy(pwrpriv->patterns[index].mask, &unicast_mask, sizeof(unicast_mask)); pwrpriv->patterns[index].len = @@ -4498,7 +4498,7 @@ u8 rtw_set_default_pattern(_adapter *adapter) target = pwrpriv->patterns[index].content; target += ETH_TYPE_OFFSET; - _rtw_memcpy(target, &ipv6_protocol, + memcpy(target, &ipv6_protocol, sizeof(ipv6_protocol)); /* ICMPv6 */ @@ -4507,10 +4507,10 @@ u8 rtw_set_default_pattern(_adapter *adapter) memset(target, 0x3a, 1); target += (IPv6_OFFSET - IPv6_PROTOCOL_OFFSET); - _rtw_memcpy(target, pmlmeinfo->ip6_addr, + memcpy(target, pmlmeinfo->ip6_addr, RTW_IPv6_ADDR_LEN); - _rtw_memcpy(pwrpriv->patterns[index].mask, + memcpy(pwrpriv->patterns[index].mask, &icmpv6_mask, sizeof(icmpv6_mask)); pwrpriv->patterns[index].len = IPv6_OFFSET + RTW_IPv6_ADDR_LEN; @@ -4519,21 +4519,21 @@ u8 rtw_set_default_pattern(_adapter *adapter) #endif /*CONFIG_IPV6*/ case 3: target = pwrpriv->patterns[index].content; - _rtw_memcpy(target, &multicast_addr, + memcpy(target, &multicast_addr, sizeof(multicast_addr)); target += ETH_TYPE_OFFSET; - _rtw_memcpy(target, &ip_protocol, sizeof(ip_protocol)); + memcpy(target, &ip_protocol, sizeof(ip_protocol)); /* UDP */ target += (PROTOCOL_OFFSET - ETH_TYPE_OFFSET); memset(target, 0x11, 1); target += (IP_OFFSET - PROTOCOL_OFFSET); - _rtw_memcpy(target, &multicast_ip, + memcpy(target, &multicast_ip, sizeof(multicast_ip)); - _rtw_memcpy(pwrpriv->patterns[index].mask, + memcpy(pwrpriv->patterns[index].mask, &multicast_mask, sizeof(multicast_mask)); 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; 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); pno_ssid_list->node[i].SSID_len = ssid[i].SSID_len; } diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c index 5212fdf..e53f5b8 100644 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -967,7 +967,7 @@ static s32 update_attrib_sec_info(_adapter *padapter, struct pkt_attrib *pattrib sint res = _SUCCESS; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct security_priv *psecuritypriv = &padapter->securitypriv; - sint bmcast = IS_MCAST(pattrib->ra); + bool bmcast = is_multicast_ether_addr(pattrib->ra); memset(pattrib->dot118021x_UncstKey.skey, 0, 16); memset(pattrib->dot11tkiptxmickey.skey, 0, 16); @@ -1048,7 +1048,7 @@ static s32 update_attrib_sec_info(_adapter *padapter, struct pkt_attrib *pattrib 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; @@ -1078,7 +1078,7 @@ static s32 update_attrib_sec_info(_adapter *padapter, struct pkt_attrib *pattrib } 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 && @@ -1309,7 +1309,7 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr struct sta_info *psta = NULL; struct ethhdr etherhdr; - sint bmcast; + bool bmcast; struct sta_priv *pstapriv = &padapter->stapriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct qos_priv *pqospriv = &pmlmepriv->qospriv; @@ -1329,32 +1329,32 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr if (MLME_IS_MESH(padapter)) /* address resolve is done for mesh */ goto get_sta_info; - _rtw_memcpy(pattrib->dst, ðerhdr.h_dest, ETH_ALEN); - _rtw_memcpy(pattrib->src, ðerhdr.h_source, ETH_ALEN); + memcpy(pattrib->dst, ðerhdr.h_dest, ETH_ALEN); + memcpy(pattrib->src, ðerhdr.h_source, ETH_ALEN); if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) || (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) { - _rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); - _rtw_memcpy(pattrib->ta, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); + memcpy(pattrib->ta, adapter_mac_addr(padapter), ETH_ALEN); DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_adhoc); } else if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) { #ifdef CONFIG_TDLS 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 #endif - _rtw_memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN); - _rtw_memcpy(pattrib->ta, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN); + memcpy(pattrib->ta, adapter_mac_addr(padapter), ETH_ALEN); DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_sta); } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { - _rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); - _rtw_memcpy(pattrib->ta, get_bssid(pmlmepriv), ETH_ALEN); + memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); + memcpy(pattrib->ta, get_bssid(pmlmepriv), ETH_ALEN); DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_ap); } else DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_unknown); get_sta_info: - bmcast = IS_MCAST(pattrib->ra); + bmcast = is_multicast_ether_addr(pattrib->ra); if (bmcast) { psta = rtw_get_bcmc_stainfo(padapter); if (psta == NULL) { /* if we cannot get psta => drop the pkt */ @@ -1473,7 +1473,7 @@ get_sta_info: if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) && pattrib->ether_type == ETH_P_ARP && - !IS_MCAST(pattrib->dst)) { + !is_multicast_ether_addr(pattrib->dst)) { rtw_mi_set_scan_deny(padapter, 1000); rtw_mi_scan_abort(padapter, _FALSE); /*rtw_scan_abort_no_wait*/ } @@ -1574,7 +1574,7 @@ static s32 xmitframe_addmic(_adapter *padapter, struct xmit_frame *pxmitframe) struct xmit_priv *pxmitpriv = &padapter->xmitpriv; u8 priority[4] = {0x0, 0x0, 0x0, 0x0}; u8 hw_hdr_offset = 0; - sint bmcst = IS_MCAST(pattrib->ra); + bool bmcst = is_multicast_ether_addr(pattrib->ra); /* if(pattrib->psta) @@ -1677,7 +1677,7 @@ static s32 xmitframe_addmic(_adapter *padapter, struct xmit_frame *pxmitframe) rtw_secgetmic(&micdata, &(mic[0])); /* 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; payload = payload - pattrib->last_txcmdsz + 8; @@ -1742,7 +1742,7 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib) /* struct sta_info *psta; */ - /* sint bmcst = IS_MCAST(pattrib->ra); */ + /* sint bmcst = is_multicast_ether_addr(pattrib->ra); */ /* @@ -1775,9 +1775,9 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib) #ifdef CONFIG_TDLS if (pattrib->direct_link == _TRUE) { /* TDLS data transfer, ToDS=0, FrDs=0 */ - _rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN); + memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); + memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); + memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN); if (pattrib->qos_en) qos_option = _TRUE; @@ -1788,9 +1788,9 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib) /* 1.Data transfer to AP */ /* 2.Arp pkt will relayed by AP */ SetToDs(fctrl); - _rtw_memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, pattrib->ta, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN); + memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN); + memcpy(pwlanhdr->addr2, pattrib->ta, ETH_ALEN); + memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN); if (pqospriv->qos_option) 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)) { /* to_ds = 0, fr_ds = 1; */ SetFrDs(fctrl); - _rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, get_bssid(pmlmepriv), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, pattrib->src, ETH_ALEN); + memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); + memcpy(pwlanhdr->addr2, get_bssid(pmlmepriv), ETH_ALEN); + memcpy(pwlanhdr->addr3, pattrib->src, ETH_ALEN); if (pattrib->qos_en) qos_option = _TRUE; } else if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) || (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) { - _rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, pattrib->ta, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN); + memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); + memcpy(pwlanhdr->addr2, pattrib->ta, ETH_ALEN); + memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN); if (pattrib->qos_en) 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 TDLS_DISCOVERY_REQUEST: SetToDs(fctrl); - _rtw_memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN); + memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN); + memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); + memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN); break; case TDLS_CHANNEL_SWITCH_REQUEST: case TDLS_CHANNEL_SWITCH_RESPONSE: case TDLS_PEER_PSM_RESPONSE: case TDLS_PEER_TRAFFIC_RESPONSE: - _rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN); + memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); + memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); + memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN); tdls_seq = 1; break; case TDLS_TEARDOWN: if (ptxmgmt->status_code == _RSON_TDLS_TEAR_UN_RSN_) { - _rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN); + memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); + memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); + memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN); tdls_seq = 1; } else { SetToDs(fctrl); - _rtw_memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN); + memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN); + memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); + memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN); } break; } @@ -2184,7 +2184,7 @@ s32 rtw_xmit_tdls_coalesce(_adapter *padapter, struct xmit_frame *pxmitframe, st struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct pkt_attrib *pattrib = &pxmitframe->attrib; u8 *pbuf_start; - s32 bmcst = IS_MCAST(pattrib->ra); + bool bmcst = is_multicast_ether_addr(pattrib->ra); s32 res = _SUCCESS; @@ -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; } @@ -2256,7 +2256,7 @@ s32 rtw_xmit_tdls_coalesce(_adapter *padapter, struct xmit_frame *pxmitframe, st if ((pattrib->icv_len > 0) && (pattrib->bswenc)) { pframe += pattrib->pktlen; - _rtw_memcpy(pframe, pattrib->icv, pattrib->icv_len); + memcpy(pframe, pattrib->icv, pattrib->icv_len); pframe += pattrib->icv_len; } @@ -2311,7 +2311,7 @@ s32 check_amsdu(struct xmit_frame *pxmitframe) pattrib = &pxmitframe->attrib; - if (IS_MCAST(pattrib->ra)) + if (is_multicast_ether_addr(pattrib->ra)) ret = _FALSE; if ((pattrib->ether_type == 0x888e) || @@ -2420,7 +2420,7 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra /* adding icv, if necessary... */ 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", 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 if (MLME_IS_MESH(padapter)) { /* 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; - _rtw_memcpy(pframe, pattrib_queue->msa, ETH_ALEN); + memcpy(pframe, pattrib_queue->msa, ETH_ALEN); pframe += ETH_ALEN; len = (u16*)pframe; pframe += 2; @@ -2453,9 +2453,9 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra #endif { /* 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; - _rtw_memcpy(pframe, pattrib_queue->src, ETH_ALEN); + memcpy(pframe, pattrib_queue->src, ETH_ALEN); pframe += ETH_ALEN; len = (u16*)pframe; pframe += 2; @@ -2489,9 +2489,9 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra #ifdef CONFIG_RTW_MESH if (MLME_IS_MESH(padapter)) { /* mDA(6), mSA(6), len(2), mctrl */ - _rtw_memcpy(pframe, pattrib->mda, ETH_ALEN); + memcpy(pframe, pattrib->mda, ETH_ALEN); pframe += ETH_ALEN; - _rtw_memcpy(pframe, pattrib->msa, ETH_ALEN); + memcpy(pframe, pattrib->msa, ETH_ALEN); pframe += ETH_ALEN; len = (u16*)pframe; pframe += 2; @@ -2501,9 +2501,9 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra #endif { /* 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; - _rtw_memcpy(pframe, pattrib->src, ETH_ALEN); + memcpy(pframe, pattrib->src, ETH_ALEN); pframe += ETH_ALEN; len = (u16*)pframe; pframe += 2; @@ -2527,7 +2527,7 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra ((pattrib->bswenc) ? pattrib->icv_len : 0) ; 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; } @@ -2578,7 +2578,7 @@ s32 rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxm u8 *pbuf_start; - s32 bmcst = IS_MCAST(pattrib->ra); + bool bmcst = is_multicast_ether_addr(pattrib->ra); s32 res = _SUCCESS; @@ -2683,7 +2683,7 @@ s32 rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxm } } #endif - _rtw_memcpy(pframe, pattrib->iv, pattrib->iv_len); + memcpy(pframe, pattrib->iv, 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; 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; } @@ -2739,7 +2739,7 @@ s32 rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxm addr = (SIZE_PTR)(pframe); 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); } @@ -2783,7 +2783,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct pkt_attrib *pattrib = &pxmitframe->attrib; u8 *pbuf_start; - s32 bmcst = IS_MCAST(pattrib->ra); + bool bmcst = is_multicast_ether_addr(pattrib->ra); s32 res = _FAIL; u8 *BIP_AAD = NULL; u8 *MGMT_body = NULL; @@ -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); /* conscruct AAD, copy frame control field */ - _rtw_memcpy(BIP_AAD, &pwlanhdr->frame_ctl, 2); + memcpy(BIP_AAD, &pwlanhdr->frame_ctl, 2); ClearRetry(BIP_AAD); ClearPwrMgt(BIP_AAD); ClearMData(BIP_AAD); /* 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 */ - _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 /* 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 /* 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 /*dump all packet after mic ok */ @@ -2977,7 +2977,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame } #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 */ if (pattrib->key_type == IEEE80211W_WRONG_KEY) { @@ -3001,7 +3001,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame #endif /* bakeup original management packet */ - _rtw_memcpy(tmp_buf, pframe, pattrib->pktlen); + memcpy(tmp_buf, pframe, pattrib->pktlen); /* move to data portion */ 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 */ - _rtw_memcpy(pframe, pattrib->iv, pattrib->iv_len); + memcpy(pframe, pattrib->iv, pattrib->iv_len); pframe += pattrib->iv_len; /* 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 */ pframe += pattrib->pktlen - pattrib->hdrlen; /* 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 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; } /* add 8 bytes MIC */ @@ -3926,7 +3926,7 @@ __inline static struct tx_servq *rtw_get_sta_pending #ifdef CONFIG_RTL8711 - if (IS_MCAST(psta->cmn.mac_addr)) { + if (is_multicast_ether_addr(psta->cmn.mac_addr)) { ptxservq = &(psta->sta_xmitpriv.be_q); /* we will use be_q to queue bc/mc frames in BCMC_stainfo */ *ppstapending = &padapter->xmitpriv.bm_pending; } else @@ -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); pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; -// _rtw_memcpy(pframe, (void *)checking, len); +// memcpy(pframe, (void *)checking, len); _rtw_pktfile_read(&pktfile, pframe, len); @@ -4751,7 +4751,7 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p struct sta_info *psta = NULL; struct sta_priv *pstapriv = &padapter->stapriv; struct pkt_attrib *pattrib = &pxmitframe->attrib; - sint bmcst = IS_MCAST(pattrib->ra); + bool bmcst = is_multicast_ether_addr(pattrib->ra); bool update_tim = _FALSE; #ifdef CONFIG_TDLS @@ -5730,8 +5730,8 @@ void rtw_tx_desc_backup(_adapter *padapter, struct xmit_frame *pxmitframe, u8 de pxmit_buf = pxmitframe->pxmitbuf->pbuf; - _rtw_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_desc, pxmit_buf, desc_size); + 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)); diff --git a/hal/hal_btcoex.c b/hal/hal_btcoex.c index c45f72a..58701f1 100644 --- a/hal/hal_btcoex.c +++ b/hal/hal_btcoex.c @@ -245,7 +245,7 @@ void DBG_BT_INFO(u8 *dbgmsg) return; pbuf = pinfo->info + pinfo->len; - _rtw_memcpy(pbuf, dbgmsg, msglen); + memcpy(pbuf, dbgmsg, 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[1] = opcode; if (cmd && size) - _rtw_memcpy(buf + 2, cmd, size); + memcpy(buf + 2, cmd, size); GLBtcBtMpRptWait = _TRUE; GLBtcBtMpRptWiFiOK = _FALSE; @@ -1486,7 +1486,7 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf) u8 dataLen = *pU1Tmp; u8 tmpBuf[BTC_TMP_BUF_SHORT]; if (dataLen) - _rtw_memcpy(tmpBuf, pU1Tmp + 1, dataLen); + memcpy(tmpBuf, pU1Tmp + 1, dataLen); BT_SendEventExtBtInfoControl(padapter, dataLen, &tmpBuf[0]); } #else /* !CONFIG_BT_COEXIST_SOCKET_TRX */ @@ -1500,7 +1500,7 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf) u8 dataLen = *pU1Tmp; u8 tmpBuf[BTC_TMP_BUF_SHORT]; if (dataLen) - _rtw_memcpy(tmpBuf, pU1Tmp + 1, dataLen); + memcpy(tmpBuf, pU1Tmp + 1, dataLen); BT_SendEventExtBtCoexControl(padapter, _FALSE, dataLen, &tmpBuf[0]); } #else /* !CONFIG_BT_COEXIST_SOCKET_TRX */ @@ -2304,7 +2304,7 @@ static COL_H2C_STATUS halbtcoutsrc_check_c2h_ack(PADAPTER Adapter, PCOL_SINGLE_H } /* else */ { - _rtw_memmove(&pH2cRecord->c2h_ack_buf[0], &gl_coex_offload.c2h_ack_buf[req_num], gl_coex_offload.c2h_ack_len[req_num]); + memmove(&pH2cRecord->c2h_ack_buf[0], &gl_coex_offload.c2h_ack_buf[req_num], gl_coex_offload.c2h_ack_len[req_num]); pH2cRecord->c2h_ack_len = gl_coex_offload.c2h_ack_len[req_num]; } @@ -2337,7 +2337,7 @@ COL_H2C_STATUS halbtcoutsrc_CoexH2cProcess(void *pBtCoexist, gl_coex_offload.h2c_req_num++; gl_coex_offload.h2c_req_num %= 16; - _rtw_memmove(&pcol_h2c->buf[0], ph2c_par, h2c_par_len); + memmove(&pcol_h2c->buf[0], ph2c_par, h2c_par_len); col_h2c_len = h2c_par_len + 2; /* 2=sizeof(OPCode, OPCode_version and Request number) */ @@ -2347,7 +2347,7 @@ COL_H2C_STATUS halbtcoutsrc_CoexH2cProcess(void *pBtCoexist, gl_coex_offload.h2c_record[opcode].count++; gl_coex_offload.h2c_record[opcode].h2c_len = col_h2c_len; - _rtw_memmove((PVOID)&gl_coex_offload.h2c_record[opcode].h2c_buf[0], (PVOID)pcol_h2c, col_h2c_len); + memmove((PVOID)&gl_coex_offload.h2c_record[opcode].h2c_buf[0], (PVOID)pcol_h2c, col_h2c_len); h2c_status = halbtcoutsrc_send_h2c(Adapter, pcol_h2c, col_h2c_len); @@ -2617,7 +2617,7 @@ static void BT_CoexOffloadC2hAckCheck(PADAPTER Adapter, u8 *tmpBuf, u8 length) p_c2h_ack = (PCOL_C2H_ACK)tmpBuf; req_num = p_c2h_ack->req_num; - _rtw_memmove(&gl_coex_offload.c2h_ack_buf[req_num][0], tmpBuf, length); + memmove(&gl_coex_offload.c2h_ack_buf[req_num][0], tmpBuf, length); gl_coex_offload.c2h_ack_len[req_num] = length; complete(&gl_coex_offload.c2h_event[req_num]); @@ -2648,13 +2648,13 @@ static void BT_CoexOffloadC2hIndCheck(PADAPTER Adapter, u8 *tmpBuf, u8 length) ind_version = p_c2h_ind->version; ind_length = p_c2h_ind->length; - _rtw_memmove(&gl_coex_offload.c2h_ind_buf[0], tmpBuf, length); + memmove(&gl_coex_offload.c2h_ind_buf[0], tmpBuf, length); gl_coex_offload.c2h_ind_len = length; /* log */ gl_coex_offload.c2h_ind_record[ind_type].count++; gl_coex_offload.c2h_ind_record[ind_type].status[COL_STATUS_C2H_OK]++; - _rtw_memmove(&gl_coex_offload.c2h_ind_record[ind_type].ind_buf[0], tmpBuf, length); + memmove(&gl_coex_offload.c2h_ind_record[ind_type].ind_buf[0], tmpBuf, length); gl_coex_offload.c2h_ind_record[ind_type].ind_len = length; gl_coex_offload.c2h_ind_status[COL_STATUS_C2H_OK]++; @@ -5058,7 +5058,7 @@ void hal_btcoex_BtMpRptNotify(PADAPTER padapter, u8 length, u8 *tmpBuf) GLBtcBtMpRptSeq = seq; GLBtcBtMpRptStatus = status; - _rtw_memcpy(GLBtcBtMpRptRsp, tmpBuf + 3, len); + memcpy(GLBtcBtMpRptRsp, tmpBuf + 3, len); GLBtcBtMpRptRspSize = len; break; @@ -5220,7 +5220,7 @@ u32 hal_btcoex_GetRaMask(PADAPTER padapter) 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) diff --git a/hal/hal_com.c b/hal/hal_com.c index d036fae..825bfba 100644 --- a/hal/hal_com.c +++ b/hal/hal_com.c @@ -1659,7 +1659,7 @@ int c2h_customer_str_rpt_hdl(_adapter *adapter, u8 *data, u8 len) if (dvobj->customer_str_sctx != NULL) { if (dvobj->customer_str_sctx->status != RTW_SCTX_SUBMITTED) RTW_WARN("%s invalid sctx.status:%d\n", __func__, dvobj->customer_str_sctx->status); - _rtw_memcpy(dvobj->customer_str, C2H_CUSTOMER_STR_RPT_BYTE0(data), CUSTOMER_STR_RPT_LEN); + memcpy(dvobj->customer_str, C2H_CUSTOMER_STR_RPT_BYTE0(data), CUSTOMER_STR_RPT_LEN); dvobj->customer_str_sctx->status = RTX_SCTX_CSTR_WAIT_RPT2; } else RTW_WARN("%s sctx not set\n", __func__); @@ -1691,7 +1691,7 @@ int c2h_customer_str_rpt_2_hdl(_adapter *adapter, u8 *data, u8 len) if (dvobj->customer_str_sctx != NULL) { if (dvobj->customer_str_sctx->status != RTX_SCTX_CSTR_WAIT_RPT2) RTW_WARN("%s rpt not ready\n", __func__); - _rtw_memcpy(dvobj->customer_str + CUSTOMER_STR_RPT_LEN, C2H_CUSTOMER_STR_RPT_2_BYTE8(data), CUSTOMER_STR_RPT_2_LEN); + memcpy(dvobj->customer_str + CUSTOMER_STR_RPT_LEN, C2H_CUSTOMER_STR_RPT_2_BYTE8(data), CUSTOMER_STR_RPT_2_LEN); rtw_sctx_done(&dvobj->customer_str_sctx); } else RTW_WARN("%s sctx not set\n", __func__); @@ -1740,7 +1740,7 @@ s32 rtw_hal_customer_str_read(_adapter *adapter, u8 *cs) _enter_critical_mutex(&dvobj->customer_str_mutex, NULL); dvobj->customer_str_sctx = NULL; if (sctx.status == RTW_SCTX_DONE_SUCCESS) - _rtw_memcpy(cs, dvobj->customer_str, RTW_CUSTOMER_STR_LEN); + memcpy(cs, dvobj->customer_str, RTW_CUSTOMER_STR_LEN); else ret = _FAIL; _exit_critical_mutex(&dvobj->customer_str_mutex, NULL); @@ -1757,13 +1757,13 @@ s32 rtw_hal_h2c_customer_str_write(_adapter *adapter, const u8 *cs) s32 ret; SET_H2CCMD_CUSTOMER_STR_W1_EN(h2c_data_w1, 1); - _rtw_memcpy(H2CCMD_CUSTOMER_STR_W1_BYTE0(h2c_data_w1), cs, 6); + memcpy(H2CCMD_CUSTOMER_STR_W1_BYTE0(h2c_data_w1), cs, 6); SET_H2CCMD_CUSTOMER_STR_W2_EN(h2c_data_w2, 1); - _rtw_memcpy(H2CCMD_CUSTOMER_STR_W2_BYTE6(h2c_data_w2), cs + 6, 6); + memcpy(H2CCMD_CUSTOMER_STR_W2_BYTE6(h2c_data_w2), cs + 6, 6); SET_H2CCMD_CUSTOMER_STR_W3_EN(h2c_data_w3, 1); - _rtw_memcpy(H2CCMD_CUSTOMER_STR_W3_BYTE12(h2c_data_w3), cs + 6 + 6, 4); + memcpy(H2CCMD_CUSTOMER_STR_W3_BYTE12(h2c_data_w3), cs + 6 + 6, 4); ret = rtw_hal_fill_h2c_cmd(adapter, H2C_CUSTOMER_STR_W1, H2C_CUSTOMER_STR_W1_LEN, h2c_data_w1); if (ret != _SUCCESS) { @@ -2347,17 +2347,17 @@ void rtw_sec_read_cam_ent(_adapter *adapter, u8 id, u8 *ctrl, u8 *mac, u8 *key) switch (i) { case 0: if (ctrl) - _rtw_memcpy(ctrl, (u8 *)(&rdata), 2); + memcpy(ctrl, (u8 *)(&rdata), 2); if (mac) - _rtw_memcpy(mac, ((u8 *)(&rdata)) + 2, 2); + memcpy(mac, ((u8 *)(&rdata)) + 2, 2); break; case 1: if (mac) - _rtw_memcpy(mac + 2, (u8 *)(&rdata), 4); + memcpy(mac + 2, (u8 *)(&rdata), 4); break; default: if (key) - _rtw_memcpy(key + (i - 2) * 4, (u8 *)(&rdata), 4); + memcpy(key + (i - 2) * 4, (u8 *)(&rdata), 4); break; } } @@ -2565,7 +2565,7 @@ inline u8 rtw_get_mbid_cam_entry_num(_adapter *adapter) static inline void mbid_cam_cache_init(_adapter *adapter, struct mbid_cam_cache *pmbid_cam, u8 *mac_addr) { if (adapter && pmbid_cam && mac_addr) { - _rtw_memcpy(pmbid_cam->mac_addr, mac_addr, ETH_ALEN); + memcpy(pmbid_cam->mac_addr, mac_addr, ETH_ALEN); pmbid_cam->iface_id = adapter->iface_id; } } @@ -4134,7 +4134,7 @@ void rtw_set_p2p_ps_offload_cmd(_adapter *adapter, u8 p2p_ps_state) u8 hw_port = rtw_hal_get_port(adapter); memset(&p2p_ps_para, 0, sizeof(HAL_P2P_PS_PARA)); - _rtw_memcpy((&p2p_ps_para) , &hal->p2p_ps_offload , sizeof(hal->p2p_ps_offload)); + memcpy((&p2p_ps_para) , &hal->p2p_ps_offload , sizeof(hal->p2p_ps_offload)); (&p2p_ps_para)->p2p_port_id = hw_port; (&p2p_ps_para)->p2p_group = 0; @@ -4244,7 +4244,7 @@ void rtw_set_p2p_ps_offload_cmd(_adapter *adapter, u8 p2p_ps_state) if (status == -1) RTW_ERR("%s , rtw_halmac_p2pps fail\n", __func__); } - _rtw_memcpy(&hal->p2p_ps_offload , (&p2p_ps_para) , sizeof(hal->p2p_ps_offload)); + memcpy(&hal->p2p_ps_offload , (&p2p_ps_para) , sizeof(hal->p2p_ps_offload)); } #endif /* RTW_HALMAC */ @@ -4622,9 +4622,9 @@ int rtw_hal_get_rsvd_page(_adapter *adapter, u32 page_offset, rtw_write32(adapter, REG_PKTBUF_DBG_CTRL, offset + i); data_low = rtw_read32(adapter, REG_PKTBUF_DBG_DATA_L); data_high = rtw_read32(adapter, REG_PKTBUF_DBG_DATA_H); - _rtw_memcpy(buffer + (i * 8), + memcpy(buffer + (i * 8), &data_low, sizeof(data_low)); - _rtw_memcpy(buffer + ((i * 8) + 4), + memcpy(buffer + ((i * 8) + 4), &data_high, sizeof(data_high)); } rtw_write8(adapter, REG_PKT_BUFF_ACCESS_CTRL, 0x0); @@ -5015,7 +5015,7 @@ static void rtw_hal_update_gtk_offload_info(_adapter *adapter) return; memset(get_key, 0, sizeof(get_key)); - _rtw_memcpy(&replay_count, + memcpy(&replay_count, paoac_rpt->replay_counter_eapol_key, 8); /*read gtk key index*/ @@ -5052,7 +5052,7 @@ static void rtw_hal_update_gtk_offload_info(_adapter *adapter) if (_rtw_camid_is_gk(adapter, gtk_id)) { _enter_critical_bh(&cam_ctl->lock, &irqL); - _rtw_memcpy(&dvobj->cam_cache[gtk_id].key, + memcpy(&dvobj->cam_cache[gtk_id].key, get_key, 16); _exit_critical_bh(&cam_ctl->lock, &irqL); } else { @@ -5060,24 +5060,24 @@ static void rtw_hal_update_gtk_offload_info(_adapter *adapter) parm_gtk.algorithm = paoac_rpt->security_type; parm_gtk.keyid = gtk_id; - _rtw_memcpy(parm_gtk.key, get_key, 16); + memcpy(parm_gtk.key, get_key, 16); setkey_hdl(adapter, (u8 *)&parm_gtk); } /*update key into related sw variable and sec-cam cache*/ psecuritypriv->dot118021XGrpKeyid = gtk_id; - _rtw_memcpy(&psecuritypriv->dot118021XGrpKey[gtk_id], + memcpy(&psecuritypriv->dot118021XGrpKey[gtk_id], get_key, 16); /* update SW TKIP TX/RX MIC value */ if (psecuritypriv->dot118021XGrpPrivacy == _TKIP_) { offset = RTW_KEK_LEN + RTW_TKIP_MIC_LEN; - _rtw_memcpy( + memcpy( &psecuritypriv->dot118021XGrptxmickey[gtk_id], &(paoac_rpt->group_key[offset]), RTW_TKIP_MIC_LEN); offset = RTW_KEK_LEN; - _rtw_memcpy( + memcpy( &psecuritypriv->dot118021XGrprxmickey[gtk_id], &(paoac_rpt->group_key[offset]), RTW_TKIP_MIC_LEN); @@ -5090,10 +5090,10 @@ static void rtw_hal_update_gtk_offload_info(_adapter *adapter) if (psecuritypriv->dot118021XGrpPrivacy == _AES_) { sz = sizeof(psecuritypriv->iv_seq[0]); for (i = 0 ; i < 4 ; i++) { - _rtw_memcpy(&tmp_iv_hdr, paoac_rpt->rxgtk_iv[i], sz); + memcpy(&tmp_iv_hdr, paoac_rpt->rxgtk_iv[i], sz); tmp_iv_hdr = le64_to_cpu(tmp_iv_hdr); pkt_pn = CCMPH_2_PN(tmp_iv_hdr); - _rtw_memcpy(psecuritypriv->iv_seq[i], &pkt_pn, sz); + memcpy(psecuritypriv->iv_seq[i], &pkt_pn, sz); } } @@ -5169,7 +5169,7 @@ static void rtw_hal_get_aoac_rpt(_adapter *adapter) } memset(paoac_rpt, 0, sizeof(struct aoac_report)); - _rtw_memcpy(paoac_rpt, buffer, sizeof(struct aoac_report)); + memcpy(paoac_rpt, buffer, sizeof(struct aoac_report)); for (i = 0 ; i < 4 ; i++) { tmp = paoac_rpt->replay_counter_eapol_key[i]; @@ -5934,7 +5934,7 @@ static int update_hidden_ssid(u8 *ies, u32 ies_len, u8 hidden_ssid_mode) remain_len = ies_len - (next_ie - ies); ssid_ie[1] = 0; - _rtw_memcpy(ssid_ie + 2, next_ie, remain_len); + memcpy(ssid_ie + 2, next_ie, remain_len); len_diff -= ssid_len_ori; break; @@ -5988,9 +5988,9 @@ static void rtw_hal_construct_P2PBeacon(_adapter *padapter, u8 *pframe, u32 *pLe fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN); + memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN); SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/); /* pmlmeext->mgnt_seq++; */ @@ -6020,20 +6020,20 @@ static void rtw_hal_construct_P2PBeacon(_adapter *padapter, u8 *pframe, u32 *pLe #ifdef CONFIG_IOCTL_CFG80211 if (pwdinfo->driver_interface == DRIVER_CFG80211) { if (pmlmepriv->wps_beacon_ie && pmlmepriv->wps_beacon_ie_len > 0) { - _rtw_memcpy(pframe, cur_network->IEs, wps_offset); + memcpy(pframe, cur_network->IEs, wps_offset); pframe += wps_offset; pktlen += wps_offset; - _rtw_memcpy(pframe, pmlmepriv->wps_beacon_ie, pmlmepriv->wps_beacon_ie_len); + memcpy(pframe, pmlmepriv->wps_beacon_ie, pmlmepriv->wps_beacon_ie_len); pframe += pmlmepriv->wps_beacon_ie_len; pktlen += pmlmepriv->wps_beacon_ie_len; /* copy remainder_ie to pframe */ - _rtw_memcpy(pframe, premainder_ie, remainder_ielen); + memcpy(pframe, premainder_ie, remainder_ielen); pframe += remainder_ielen; pktlen += remainder_ielen; } else { - _rtw_memcpy(pframe, cur_network->IEs, cur_network->IELength); + memcpy(pframe, cur_network->IEs, cur_network->IELength); pframe += cur_network->IELength; pktlen += cur_network->IELength; } @@ -6041,7 +6041,7 @@ static void rtw_hal_construct_P2PBeacon(_adapter *padapter, u8 *pframe, u32 *pLe #endif /* CONFIG_IOCTL_CFG80211 */ { pframe_wscie = pframe + wps_offset; - _rtw_memcpy(pframe, cur_network->IEs, wps_offset + wpsielen); + memcpy(pframe, cur_network->IEs, wps_offset + wpsielen); pframe += (wps_offset + wpsielen); pktlen += (wps_offset + wpsielen); @@ -6079,7 +6079,7 @@ static void rtw_hal_construct_P2PBeacon(_adapter *padapter, u8 *pframe, u32 *pLe insert_len += 2; /* Value: */ - _rtw_memcpy(pframe + insert_len, pwdinfo->device_name, pwdinfo->device_name_len); + memcpy(pframe + insert_len, pwdinfo->device_name, pwdinfo->device_name_len); insert_len += pwdinfo->device_name_len; @@ -6091,7 +6091,7 @@ static void rtw_hal_construct_P2PBeacon(_adapter *padapter, u8 *pframe, u32 *pLe pktlen += insert_len; /* copy remainder_ie to pframe */ - _rtw_memcpy(pframe, premainder_ie, remainder_ielen); + memcpy(pframe, premainder_ie, remainder_ielen); pframe += remainder_ielen; pktlen += remainder_ielen; } @@ -6099,7 +6099,7 @@ static void rtw_hal_construct_P2PBeacon(_adapter *padapter, u8 *pframe, u32 *pLe #endif /* CONFIG_P2P */ { int len_diff; - _rtw_memcpy(pframe, cur_network->IEs, cur_network->IELength); + memcpy(pframe, cur_network->IEs, cur_network->IELength); len_diff = update_hidden_ssid( pframe + _BEACON_IE_OFFSET_ , cur_network->IELength - _BEACON_IE_OFFSET_ @@ -6130,7 +6130,7 @@ static void rtw_hal_construct_P2PBeacon(_adapter *padapter, u8 *pframe, u32 *pLe if (pwdinfo->driver_interface == DRIVER_CFG80211) { len = pmlmepriv->p2p_beacon_ie_len; if (pmlmepriv->p2p_beacon_ie && len > 0) - _rtw_memcpy(pframe, pmlmepriv->p2p_beacon_ie, len); + memcpy(pframe, pmlmepriv->p2p_beacon_ie, len); } else #endif /* CONFIG_IOCTL_CFG80211 */ { @@ -6161,14 +6161,14 @@ static void rtw_hal_construct_P2PBeacon(_adapter *padapter, u8 *pframe, u32 *pLe /* 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; pktlen += 2; /* 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; pktlen += 2; @@ -6267,10 +6267,10 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p /* DA filled by FW */ memset(pwlanhdr->addr1, 0, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, mac, ETH_ALEN); + memcpy(pwlanhdr->addr2, mac, ETH_ALEN); /* Use the device address for BSSID field. */ - _rtw_memcpy(pwlanhdr->addr3, mac, ETH_ALEN); + memcpy(pwlanhdr->addr3, mac, ETH_ALEN); SetSeqNum(pwlanhdr, 0); set_frame_sub_type(fctrl, WIFI_PROBERSP); @@ -6284,7 +6284,7 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p pktlen += 8; /* beacon interval: 2 bytes */ - _rtw_memcpy(pframe, (unsigned char *) &beacon_interval, 2); + memcpy(pframe, (unsigned char *) &beacon_interval, 2); pframe += 2; pktlen += 2; @@ -6293,7 +6293,7 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p capInfo |= cap_ShortPremble; capInfo |= cap_ShortSlot; - _rtw_memcpy(pframe, (unsigned char *) &capInfo, 2); + memcpy(pframe, (unsigned char *) &capInfo, 2); pframe += 2; pktlen += 2; @@ -6312,12 +6312,12 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p if (pwdinfo->driver_interface == DRIVER_CFG80211) { if (pmlmepriv->wps_probe_resp_ie != NULL && pmlmepriv->p2p_probe_resp_ie != NULL) { /* WPS IE */ - _rtw_memcpy(pframe, pmlmepriv->wps_probe_resp_ie, pmlmepriv->wps_probe_resp_ie_len); + memcpy(pframe, pmlmepriv->wps_probe_resp_ie, pmlmepriv->wps_probe_resp_ie_len); pktlen += pmlmepriv->wps_probe_resp_ie_len; pframe += pmlmepriv->wps_probe_resp_ie_len; /* P2P IE */ - _rtw_memcpy(pframe, pmlmepriv->p2p_probe_resp_ie, pmlmepriv->p2p_probe_resp_ie_len); + memcpy(pframe, pmlmepriv->p2p_probe_resp_ie, pmlmepriv->p2p_probe_resp_ie_len); pktlen += pmlmepriv->p2p_probe_resp_ie_len; pframe += pmlmepriv->p2p_probe_resp_ie_len; } @@ -6373,7 +6373,7 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p if (_rtw_memcmp(pmlmepriv->sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN) == _FALSE) { /* Vendor Extension */ - _rtw_memcpy(wpsie + wpsielen, pmlmepriv->sa_ext, L2SDTA_SERVICE_VE_LEN); + memcpy(wpsie + wpsielen, pmlmepriv->sa_ext, L2SDTA_SERVICE_VE_LEN); wpsielen += L2SDTA_SERVICE_VE_LEN; } } @@ -6415,9 +6415,9 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p /* Value: */ if (pwdinfo->external_uuid == 0) { memset(wpsie + wpsielen, 0x0, 16); - _rtw_memcpy(wpsie + wpsielen, mac, ETH_ALEN); + memcpy(wpsie + wpsielen, mac, ETH_ALEN); } else - _rtw_memcpy(wpsie + wpsielen, pwdinfo->uuid, 0x10); + memcpy(wpsie + wpsielen, pwdinfo->uuid, 0x10); wpsielen += 0x10; /* Manufacturer */ @@ -6430,7 +6430,7 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p wpsielen += 2; /* Value: */ - _rtw_memcpy(wpsie + wpsielen, "Realtek", 7); + memcpy(wpsie + wpsielen, "Realtek", 7); wpsielen += 7; /* Model Name */ @@ -6443,7 +6443,7 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p wpsielen += 2; /* Value: */ - _rtw_memcpy(wpsie + wpsielen, "8192CU", 6); + memcpy(wpsie + wpsielen, "8192CU", 6); wpsielen += 6; /* Model Number */ @@ -6468,7 +6468,7 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p wpsielen += 2; /* Value: */ - _rtw_memcpy(wpsie + wpsielen, "123456" , ETH_ALEN); + memcpy(wpsie + wpsielen, "123456" , ETH_ALEN); wpsielen += ETH_ALEN; /* Primary Device Type */ @@ -6503,7 +6503,7 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p wpsielen += 2; /* Value: */ - _rtw_memcpy(wpsie + wpsielen, pwdinfo->device_name, pwdinfo->device_name_len); + memcpy(wpsie + wpsielen, pwdinfo->device_name, pwdinfo->device_name_len); wpsielen += pwdinfo->device_name_len; /* Config Method */ @@ -6592,8 +6592,8 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL /* RA, filled by FW */ memset(pwlanhdr->addr1, 0, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN); SetSeqNum(pwlanhdr, 0); set_frame_sub_type(pframe, WIFI_ACTION); @@ -6784,7 +6784,7 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL p2pielen += 2; /* Value: */ - _rtw_memcpy(p2pie + p2pielen, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(p2pie + p2pielen, adapter_mac_addr(padapter), ETH_ALEN); p2pielen += ETH_ALEN; /* Channel List */ @@ -6871,7 +6871,7 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL /* Value: */ /* P2P Device Address */ - _rtw_memcpy(p2pie + p2pielen, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(p2pie + p2pielen, adapter_mac_addr(padapter), ETH_ALEN); p2pielen += ETH_ALEN; /* Config Method */ @@ -6907,7 +6907,7 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL p2pielen += 2; /* 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; if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) { @@ -6921,11 +6921,11 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL /* Value: */ /* p2P Device Address */ - _rtw_memcpy(p2pie + p2pielen , pwdinfo->device_addr, ETH_ALEN); + memcpy(p2pie + p2pielen , pwdinfo->device_addr, ETH_ALEN); p2pielen += ETH_ALEN; /* SSID */ - _rtw_memcpy(p2pie + p2pielen, pwdinfo->nego_ssid, pwdinfo->nego_ssidlen); + memcpy(p2pie + p2pielen, pwdinfo->nego_ssid, pwdinfo->nego_ssidlen); p2pielen += pwdinfo->nego_ssidlen; } @@ -6991,7 +6991,7 @@ static void rtw_hal_construct_P2PInviteRsp(_adapter *padapter, u8 *pframe, u32 * /* RA fill by FW */ memset(pwlanhdr->addr1, 0, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); /* BSSID fill by FW */ memset(pwlanhdr->addr3, 0, ETH_ALEN); @@ -7095,7 +7095,7 @@ static void rtw_hal_construct_P2PInviteRsp(_adapter *padapter, u8 *pframe, u32 * /* Value: */ /* P2P Device Address for GO */ - _rtw_memcpy(p2pie + p2pielen, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(p2pie + p2pielen, adapter_mac_addr(padapter), ETH_ALEN); p2pielen += ETH_ALEN; } @@ -7236,8 +7236,8 @@ static void rtw_hal_construct_P2PProvisionDisRsp(_adapter *padapter, u8 *pframe, /* RA filled by FW */ memset(pwlanhdr->addr1, 0, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN); SetSeqNum(pwlanhdr, 0); set_frame_sub_type(pframe, WIFI_ACTION); @@ -7399,9 +7399,9 @@ void rtw_hal_construct_beacon(_adapter *padapter, fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN); + memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN); SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/); /* pmlmeext->mgnt_seq++; */ @@ -7415,14 +7415,14 @@ void rtw_hal_construct_beacon(_adapter *padapter, pktlen += 8; /* 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; pktlen += 2; #if 0 /* 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; pktlen += 2; @@ -7430,7 +7430,7 @@ void rtw_hal_construct_beacon(_adapter *padapter, if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE) { /* RTW_INFO("ie len=%d\n", cur_network->IELength); */ pktlen += cur_network->IELength - sizeof(NDIS_802_11_FIXED_IEs); - _rtw_memcpy(pframe, cur_network->IEs + sizeof(NDIS_802_11_FIXED_IEs), pktlen); + memcpy(pframe, cur_network->IEs + sizeof(NDIS_802_11_FIXED_IEs), pktlen); goto _ConstructBeacon; } @@ -7504,10 +7504,10 @@ static void rtw_hal_construct_PSPoll(_adapter *padapter, set_duration(pframe, (pmlmeinfo->aid | 0xc000)); /* BSSID. */ - _rtw_memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); /* TA. */ - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); *pLength = 16; } @@ -7536,9 +7536,9 @@ void rtw_hal_construct_fw_dbg_msg_pkt( fctrl = &pwlanhdr->frame_ctl; *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); SetSeqNum(pwlanhdr, 0); @@ -7580,28 +7580,28 @@ void rtw_hal_construct_NullFunctionData( sta_addr = get_my_bssid(&pmlmeinfo->network); if (NULL == sta_addr) { - _rtw_memcpy(bssid, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(bssid, adapter_mac_addr(padapter), ETH_ALEN); sta_addr = bssid; } switch (cur_network->network.InfrastructureMode) { case Ndis802_11Infrastructure: SetToDs(fctrl); - _rtw_memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, sta_addr, ETH_ALEN); + memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, sta_addr, ETH_ALEN); break; case Ndis802_11APMode: SetFrDs(fctrl); - _rtw_memcpy(pwlanhdr->addr1, sta_addr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr1, sta_addr, ETH_ALEN); + memcpy(pwlanhdr->addr2, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN); break; case Ndis802_11IBSS: default: - _rtw_memcpy(pwlanhdr->addr1, sta_addr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr1, sta_addr, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); break; } @@ -7648,9 +7648,9 @@ void rtw_hal_construct_ProbeRsp(_adapter *padapter, u8 *pframe, u32 *pLength, fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, sta_addr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, mac, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, bssid, ETH_ALEN); + memcpy(pwlanhdr->addr1, sta_addr, ETH_ALEN); + memcpy(pwlanhdr->addr2, mac, ETH_ALEN); + memcpy(pwlanhdr->addr3, bssid, ETH_ALEN); SetSeqNum(pwlanhdr, 0); set_frame_sub_type(fctrl, WIFI_PROBERSP); @@ -7661,7 +7661,7 @@ void rtw_hal_construct_ProbeRsp(_adapter *padapter, u8 *pframe, u32 *pLength, if (cur_network->IELength > MAX_IE_SZ) return; - _rtw_memcpy(pframe, cur_network->IEs, cur_network->IELength); + memcpy(pframe, cur_network->IEs, cur_network->IELength); pframe += cur_network->IELength; pktlen += cur_network->IELength; @@ -7713,7 +7713,7 @@ static void rtw_hal_append_tkip_mic(PADAPTER padapter, payload += 36; - _rtw_memcpy(payload, &(mic[0]), 8); + memcpy(payload, &(mic[0]), 8); } /* * Description: @@ -7752,9 +7752,9 @@ static void rtw_hal_construct_ARPRsp( SetFrameType(fctrl, WIFI_DATA); /* set_frame_sub_type(fctrl, 0); */ SetToDs(fctrl); - _rtw_memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); SetSeqNum(pwlanhdr, 0); set_duration(pwlanhdr, 0); @@ -7806,7 +7806,7 @@ static void rtw_hal_construct_ARPRsp( pARPRspPkt = (u8 *)(pframe + arp_offset); payload = pARPRspPkt; /* Get Payload pointer */ /* LLC header */ - _rtw_memcpy(pARPRspPkt, ARPLLCHeader, 8); + memcpy(pARPRspPkt, ARPLLCHeader, 8); *pLength += 8; /* ARP element */ @@ -7885,11 +7885,11 @@ static void rtw_hal_construct_na_message(_adapter *padapter, /* ------------------------------------------------------------------------- */ SetFrameType(fctrl, WIFI_DATA); SetToDs(fctrl); - _rtw_memcpy(pwlanhdr->addr1, + memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); SetSeqNum(pwlanhdr, 0); @@ -7936,20 +7936,20 @@ static void rtw_hal_construct_na_message(_adapter *padapter, /* LLC header */ val8 = sizeof(ns_hdr); - _rtw_memcpy(p_na_msg, ns_hdr, val8); + memcpy(p_na_msg, ns_hdr, val8); *pLength += val8; p_na_msg += val8; /* IPv6 Header */ /* 1 . Information (4 bytes): 0x60 0x00 0x00 0x00 */ val8 = sizeof(ipv6_info); - _rtw_memcpy(p_na_msg, ipv6_info, val8); + memcpy(p_na_msg, ipv6_info, val8); *pLength += val8; p_na_msg += val8; /* 2 . playload : 0x00 0x20 , NextProt : 0x3a (ICMPv6) HopLim : 0xff */ val8 = sizeof(ipv6_contx); - _rtw_memcpy(p_na_msg, ipv6_contx, val8); + memcpy(p_na_msg, ipv6_contx, val8); *pLength += val8; p_na_msg += val8; @@ -7965,7 +7965,7 @@ static void rtw_hal_construct_na_message(_adapter *padapter, * 4. NAFlag: 0x60 0x00 0x00 0x00 ( Solicited , Override) */ val8 = sizeof(icmpv6_hdr); - _rtw_memcpy(p_na_msg, icmpv6_hdr, val8); + memcpy(p_na_msg, icmpv6_hdr, val8); *pLength += val8; p_na_msg += val8; @@ -8017,12 +8017,12 @@ static void rtw_hal_construct_ndp_info(_adapter *padapter, ndp_info.check_remote_ip = 0; ndp_info.num_of_target_ip = 1; - _rtw_memcpy(&ndp_info.target_link_addr, adapter_mac_addr(padapter), + memcpy(&ndp_info.target_link_addr, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(&ndp_info.target_ipv6_addr, pmlmeinfo->ip6_addr, + memcpy(&ndp_info.target_ipv6_addr, pmlmeinfo->ip6_addr, RTW_IPv6_ADDR_LEN); - _rtw_memcpy(pndp_info, &ndp_info, len); + memcpy(pndp_info, &ndp_info, len); } #endif /* CONFIG_IPV6 */ @@ -8048,10 +8048,10 @@ static void rtw_hal_construct_ProbeReq(_adapter *padapter, u8 *pframe, fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, bc_addr, ETH_ALEN); + memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); + memcpy(pwlanhdr->addr3, bc_addr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, mac, ETH_ALEN); + memcpy(pwlanhdr->addr2, mac, ETH_ALEN); SetSeqNum(pwlanhdr, 0); set_frame_sub_type(pframe, WIFI_PROBEREQ); @@ -8085,31 +8085,31 @@ static void rtw_hal_construct_PNO_info(_adapter *padapter, u8 *pPnoInfoPkt = pframe; pPnoInfoPkt = (u8 *)(pframe + *pLength); - _rtw_memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->ssid_num, 1); + memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->ssid_num, 1); pPnoInfoPkt += 1; - _rtw_memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->hidden_ssid_num, 1); + memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->hidden_ssid_num, 1); pPnoInfoPkt += 3; - _rtw_memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->fast_scan_period, 1); + memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->fast_scan_period, 1); pPnoInfoPkt += 4; - _rtw_memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->fast_scan_iterations, 4); + memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->fast_scan_iterations, 4); pPnoInfoPkt += 4; - _rtw_memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->slow_scan_period, 4); + memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->slow_scan_period, 4); pPnoInfoPkt += 4; - _rtw_memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->ssid_length, MAX_PNO_LIST_COUNT); + memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->ssid_length, MAX_PNO_LIST_COUNT); pPnoInfoPkt += MAX_PNO_LIST_COUNT; - _rtw_memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->ssid_cipher_info, MAX_PNO_LIST_COUNT); + memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->ssid_cipher_info, MAX_PNO_LIST_COUNT); pPnoInfoPkt += MAX_PNO_LIST_COUNT; - _rtw_memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->ssid_channel_info, MAX_PNO_LIST_COUNT); + memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->ssid_channel_info, MAX_PNO_LIST_COUNT); pPnoInfoPkt += MAX_PNO_LIST_COUNT; - _rtw_memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->loc_probe_req, MAX_HIDDEN_AP); + memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->loc_probe_req, MAX_HIDDEN_AP); pPnoInfoPkt += MAX_HIDDEN_AP; @@ -8121,7 +8121,7 @@ static void rtw_hal_construct_PNO_info(_adapter *padapter, pPnoInfoPkt = pframe + 128; for (i = 0; i < pwrctl->pnlo_info->ssid_num ; i++) { - _rtw_memcpy(pPnoInfoPkt, &pwrctl->pno_ssid_list->node[i].SSID, + memcpy(pPnoInfoPkt, &pwrctl->pno_ssid_list->node[i].SSID, pwrctl->pnlo_info->ssid_length[i]); *pLength += WLAN_SSID_MAXLEN; pPnoInfoPkt += WLAN_SSID_MAXLEN; @@ -8138,7 +8138,7 @@ static void rtw_hal_construct_ssid_list(_adapter *padapter, pSSIDListPkt = (u8 *)(pframe + *pLength); for (i = 0; i < pwrctl->pnlo_info->ssid_num ; i++) { - _rtw_memcpy(pSSIDListPkt, &pwrctl->pno_ssid_list->node[i].SSID, + memcpy(pSSIDListPkt, &pwrctl->pno_ssid_list->node[i].SSID, pwrctl->pnlo_info->ssid_length[i]); *pLength += WLAN_SSID_MAXLEN; @@ -8155,47 +8155,47 @@ static void rtw_hal_construct_scan_info(_adapter *padapter, pScanInfoPkt = (u8 *)(pframe + *pLength); - _rtw_memcpy(pScanInfoPkt, &pwrctl->pscan_info->channel_num, 1); + memcpy(pScanInfoPkt, &pwrctl->pscan_info->channel_num, 1); *pLength += 1; pScanInfoPkt += 1; - _rtw_memcpy(pScanInfoPkt, &pwrctl->pscan_info->orig_ch, 1); + memcpy(pScanInfoPkt, &pwrctl->pscan_info->orig_ch, 1); *pLength += 1; pScanInfoPkt += 1; - _rtw_memcpy(pScanInfoPkt, &pwrctl->pscan_info->orig_bw, 1); + memcpy(pScanInfoPkt, &pwrctl->pscan_info->orig_bw, 1); *pLength += 1; pScanInfoPkt += 1; - _rtw_memcpy(pScanInfoPkt, &pwrctl->pscan_info->orig_40_offset, 1); + memcpy(pScanInfoPkt, &pwrctl->pscan_info->orig_40_offset, 1); *pLength += 1; pScanInfoPkt += 1; - _rtw_memcpy(pScanInfoPkt, &pwrctl->pscan_info->orig_80_offset, 1); + memcpy(pScanInfoPkt, &pwrctl->pscan_info->orig_80_offset, 1); *pLength += 1; pScanInfoPkt += 1; - _rtw_memcpy(pScanInfoPkt, &pwrctl->pscan_info->periodScan, 1); + memcpy(pScanInfoPkt, &pwrctl->pscan_info->periodScan, 1); *pLength += 1; pScanInfoPkt += 1; - _rtw_memcpy(pScanInfoPkt, &pwrctl->pscan_info->period_scan_time, 1); + memcpy(pScanInfoPkt, &pwrctl->pscan_info->period_scan_time, 1); *pLength += 1; pScanInfoPkt += 1; - _rtw_memcpy(pScanInfoPkt, &pwrctl->pscan_info->enableRFE, 1); + memcpy(pScanInfoPkt, &pwrctl->pscan_info->enableRFE, 1); *pLength += 1; pScanInfoPkt += 1; - _rtw_memcpy(pScanInfoPkt, &pwrctl->pscan_info->rfe_type, 8); + memcpy(pScanInfoPkt, &pwrctl->pscan_info->rfe_type, 8); *pLength += 8; pScanInfoPkt += 8; for (i = 0 ; i < MAX_SCAN_LIST_COUNT ; i++) { - _rtw_memcpy(pScanInfoPkt, + memcpy(pScanInfoPkt, &pwrctl->pscan_info->ssid_channel_info[i], 4); *pLength += 4; pScanInfoPkt += 4; @@ -8236,13 +8236,13 @@ static void rtw_hal_construct_GTKRsp( /* set_frame_sub_type(fctrl, 0); */ SetToDs(fctrl); - _rtw_memcpy(pwlanhdr->addr1, + memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); SetSeqNum(pwlanhdr, 0); @@ -8289,7 +8289,7 @@ static void rtw_hal_construct_GTKRsp( /* ------------------------------------------------------------------------- */ pGTKRspPkt = (u8 *)(pframe + *pLength); /* LLC header */ - _rtw_memcpy(pGTKRspPkt, LLCHeader, 8); + memcpy(pGTKRspPkt, LLCHeader, 8); *pLength += 8; /* GTK element */ @@ -8301,7 +8301,7 @@ static void rtw_hal_construct_GTKRsp( GTKbody_a[8] = 0x20; /* GTK frame body after LLC, part 1 */ - _rtw_memcpy(pGTKRspPkt, GTKbody_a, 11); + memcpy(pGTKRspPkt, GTKbody_a, 11); *pLength += 11; pGTKRspPkt += 11; /* GTK frame body after LLC, part 2 */ @@ -8346,7 +8346,7 @@ static void rtw_hal_construct_remote_control_info(_adapter *adapter, rtw_get_sec_iv(adapter, cur_dot11rxiv, get_my_bssid(&pmlmeinfo->network)); - _rtw_memcpy(pframe, cur_dot11rxiv, sz); + memcpy(pframe, cur_dot11rxiv, sz); *pLength += sz; pframe += sz; @@ -8359,11 +8359,11 @@ static void rtw_hal_construct_remote_control_info(_adapter *adapter, REMOTE_INFO_CTRL_SET_PTK_EN(cur_dot11rxiv, 1); REMOTE_INFO_CTRL_SET_GTK_EN(cur_dot11rxiv, 1); REMOTE_INFO_CTRL_SET_GTK_IDX(cur_dot11rxiv, id); - _rtw_memcpy(pframe, cur_dot11rxiv, sz); + memcpy(pframe, cur_dot11rxiv, sz); *pLength += sz; pframe += sz; - _rtw_memcpy(pframe, prxcache->iv[tid_id], sz); + memcpy(pframe, prxcache->iv[tid_id], sz); *pLength += sz; pframe += sz; @@ -8378,7 +8378,7 @@ static void rtw_hal_construct_remote_control_info(_adapter *adapter, tmp_key = i; ccmp_hdr = PN_2_CCMPH(ccmp_hdr, tmp_key); *(u64*)cur_dot11rxiv = cpu_to_le64(ccmp_hdr); - _rtw_memcpy(pframe, cur_dot11rxiv, sz); + memcpy(pframe, cur_dot11rxiv, sz); } *pLength += sz; pframe += sz; @@ -8502,8 +8502,8 @@ void rtw_hal_set_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index, RTW_INFO("%s, KEK, KCK download rsvd page all zero\n", __func__); } else { - _rtw_memcpy(kek, psta->kek, RTW_KEK_LEN); - _rtw_memcpy(kck, psta->kck, RTW_KCK_LEN); + memcpy(kek, psta->kek, RTW_KEK_LEN); + memcpy(kck, psta->kck, RTW_KCK_LEN); } /* 3 KEK, KCK */ @@ -8514,25 +8514,25 @@ void rtw_hal_set_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index, struct security_priv *psecpriv = NULL; psecpriv = &adapter->securitypriv; - _rtw_memcpy(pframe + index - tx_desc, + memcpy(pframe + index - tx_desc, &psecpriv->dot11PrivacyAlgrthm, 1); - _rtw_memcpy(pframe + index - tx_desc + 1, + memcpy(pframe + index - tx_desc + 1, &psecpriv->dot118021XGrpPrivacy, 1); - _rtw_memcpy(pframe + index - tx_desc + 2, + memcpy(pframe + index - tx_desc + 2, kck, RTW_KCK_LEN); - _rtw_memcpy(pframe + index - tx_desc + 2 + RTW_KCK_LEN, + memcpy(pframe + index - tx_desc + 2 + RTW_KCK_LEN, kek, RTW_KEK_LEN); CurtPktPageNum = (u8)PageNum(tx_desc + 2 + RTW_KCK_LEN + RTW_KEK_LEN, page_size); } else { - _rtw_memcpy(pframe + index - tx_desc, kck, RTW_KCK_LEN); - _rtw_memcpy(pframe + index - tx_desc + RTW_KCK_LEN, + memcpy(pframe + index - tx_desc, kck, RTW_KCK_LEN); + memcpy(pframe + index - tx_desc + RTW_KCK_LEN, kek, RTW_KEK_LEN); GTKLength = tx_desc + RTW_KCK_LEN + RTW_KEK_LEN; if (psta != NULL && psecuritypriv->dot118021XGrpPrivacy == _TKIP_) { - _rtw_memcpy(pframe + index - tx_desc + 56, + memcpy(pframe + index - tx_desc + 56, &psta->dot11tkiptxmickey, RTW_TKIP_MIC_LEN); GTKLength += RTW_TKIP_MIC_LEN; } @@ -8799,7 +8799,7 @@ static u8 rtw_hal_wow_pattern_generate(_adapter *adapter, u8 idx, struct rtl_wow len = pwrctl->patterns[idx].len; mask = pwrctl->patterns[idx].mask; - _rtw_memcpy(mac_addr, adapter_mac_addr(adapter), ETH_ALEN); + memcpy(mac_addr, adapter_mac_addr(adapter), ETH_ALEN); memset(pwow_pattern, 0, sizeof(struct rtl_wow_pattern)); mask_len = DIV_ROUND_UP(len, 8); @@ -9142,7 +9142,7 @@ static int rtw_hal_set_pattern(_adapter *adapter, u8 *pattern, pmlmeext = &adapter->mlmeextpriv; pmlmeinfo = &pmlmeext->mlmext_info; - _rtw_memcpy(mac_addr, adapter_mac_addr(adapter), ETH_ALEN); + memcpy(mac_addr, adapter_mac_addr(adapter), ETH_ALEN); memset(&wow_pattern, 0, sizeof(struct rtl_wow_pattern)); mask_len = DIV_ROUND_UP(len, 8); @@ -9331,7 +9331,7 @@ void rtw_wow_pattern_read_cam_ent(_adapter *adapter, u8 id, struct rtl_wow_patt context->crc = rdata & 0xFFFF; break; default: - _rtw_memcpy(&context->mask[i], (u8 *)(&rdata), 4); + memcpy(&context->mask[i], (u8 *)(&rdata), 4); break; } } @@ -12527,7 +12527,7 @@ void rtw_store_phy_info(_adapter *padapter, union recv_frame *prframe) /*RTW_INFO("=>%s WIFI_DATA_TYPE or WIFI_QOS_DATA_TYPE\n", __FUNCTION__);*/ if (psta) { - if (IS_MCAST(get_ra(get_recvframe_data(prframe)))) + if (is_multicast_ether_addr(get_ra(get_recvframe_data(prframe)))) psta_dframe_info = &psta->sta_dframe_info_bmc; else psta_dframe_info = &psta->sta_dframe_info; @@ -12818,7 +12818,7 @@ int hal_config_macaddr(_adapter *adapter, bool autoload_fail) /* check hw pg data */ if (hw_addr && rtw_check_invalid_mac_address(hw_addr, _TRUE) == _FALSE) { - _rtw_memcpy(hal_data->EEPROMMACAddr, hw_addr, ETH_ALEN); + memcpy(hal_data->EEPROMMACAddr, hw_addr, ETH_ALEN); goto exit; } @@ -12827,7 +12827,7 @@ bypass_hw_pg: #ifdef CONFIG_EFUSE_CONFIG_FILE /* check wifi mac file */ if (Hal_ReadMACAddrFromFile(adapter, addr) == _SUCCESS) { - _rtw_memcpy(hal_data->EEPROMMACAddr, addr, ETH_ALEN); + memcpy(hal_data->EEPROMMACAddr, addr, ETH_ALEN); goto exit; } #endif @@ -13424,7 +13424,7 @@ void rtw_hal_ch_sw_iqk_info_backup(_adapter *padapter) /* Else, overwrite the oldest record */ for (i = 1; i < MAX_IQK_INFO_BACKUP_CHNL_NUM; i++) - _rtw_memcpy(&(pHalData->iqk_reg_backup[i - 1]), &(pHalData->iqk_reg_backup[i]), sizeof(struct hal_iqk_reg_backup)); + memcpy(&(pHalData->iqk_reg_backup[i - 1]), &(pHalData->iqk_reg_backup[i]), sizeof(struct hal_iqk_reg_backup)); rtw_hal_set_hwreg(padapter, HW_VAR_CH_SW_IQK_INFO_BACKUP, (u8 *)&(pHalData->iqk_reg_backup[MAX_IQK_INFO_BACKUP_CHNL_NUM - 1])); } @@ -14579,7 +14579,7 @@ u8 * rtw_hal_set_8812a_vendor_ie(_adapter *padapter , u8 *pframe ,uint *frlen ) return pframe; memset(vendor_info,0,vender_len); - _rtw_memcpy(vendor_info, REALTEK_OUI, 3); + memcpy(vendor_info, REALTEK_OUI, 3); vendor_info[4] =2; if(pHalData->version_id.CUTVersion > B_CUT_VERSION ) vendor_info[6] = RT_HT_CAP_USE_JAGUAR_CCUT; diff --git a/hal/hal_com_phycfg.c b/hal/hal_com_phycfg.c index 98a8b76..5dd7f27 100644 --- a/hal/hal_com_phycfg.c +++ b/hal/hal_com_phycfg.c @@ -4094,7 +4094,7 @@ phy_ConfigMACWithParaFile( rtStatus = _SUCCESS; pHalData->mac_reg = vzalloc(rlen); 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; } else RTW_INFO("%s mac_reg alloc fail !\n", __FUNCTION__); @@ -4102,7 +4102,7 @@ phy_ConfigMACWithParaFile( } } else { 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; } else RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__); @@ -4173,7 +4173,7 @@ phy_ConfigBBWithParaFile( rtStatus = _SUCCESS; pBuf = vzalloc(rlen); if (pBuf) { - _rtw_memcpy(pBuf, pHalData->para_file_buf, rlen); + memcpy(pBuf, pHalData->para_file_buf, rlen); *pBufLen = rlen; switch (ConfigType) { @@ -4190,7 +4190,7 @@ phy_ConfigBBWithParaFile( } } else { if ((pBufLen != NULL) && (*pBufLen != 0) && (pBuf != NULL)) { - _rtw_memcpy(pHalData->para_file_buf, pBuf, *pBufLen); + memcpy(pHalData->para_file_buf, pBuf, *pBufLen); rtStatus = _SUCCESS; } else RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__); @@ -4479,7 +4479,7 @@ phy_ConfigBBWithPgParaFile( rtStatus = _SUCCESS; pHalData->bb_phy_reg_pg = vzalloc(rlen); 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; } else RTW_INFO("%s bb_phy_reg_pg alloc fail !\n", __FUNCTION__); @@ -4487,7 +4487,7 @@ phy_ConfigBBWithPgParaFile( } } else { 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; } else RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__); @@ -4528,7 +4528,7 @@ phy_ConfigBBWithMpParaFile( rtStatus = _SUCCESS; pHalData->bb_phy_reg_mp = vzalloc(rlen); 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; } else RTW_INFO("%s bb_phy_reg_mp alloc fail !\n", __FUNCTION__); @@ -4536,7 +4536,7 @@ phy_ConfigBBWithMpParaFile( } } else { 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; } else RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__); @@ -4632,7 +4632,7 @@ PHY_ConfigRFWithParaFile( rtStatus = _SUCCESS; pBuf = vzalloc(rlen); if (pBuf) { - _rtw_memcpy(pBuf, pHalData->para_file_buf, rlen); + memcpy(pBuf, pHalData->para_file_buf, rlen); *pBufLen = rlen; switch (eRFPath) { @@ -4652,7 +4652,7 @@ PHY_ConfigRFWithParaFile( } } else { if ((pBufLen != NULL) && (*pBufLen != 0) && (pBuf != NULL)) { - _rtw_memcpy(pHalData->para_file_buf, pBuf, *pBufLen); + memcpy(pHalData->para_file_buf, pBuf, *pBufLen); rtStatus = _SUCCESS; } else RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__); @@ -4831,7 +4831,7 @@ PHY_ConfigRFWithTxPwrTrackParaFile( rtStatus = _SUCCESS; pHalData->rf_tx_pwr_track = vzalloc(rlen); 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; } else RTW_INFO("%s rf_tx_pwr_track alloc fail !\n", __FUNCTION__); @@ -4839,7 +4839,7 @@ PHY_ConfigRFWithTxPwrTrackParaFile( } } else { 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; } else RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__); @@ -5164,7 +5164,7 @@ phy_ParsePowerLimitTableFile( 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'; } @@ -5330,7 +5330,7 @@ PHY_ConfigRFWithPowerLimitTableParaFile( rtStatus = _SUCCESS; pHalData->rf_tx_pwr_lmt = vzalloc(rlen); 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; } else RTW_INFO("%s rf_tx_pwr_lmt alloc fail !\n", __FUNCTION__); @@ -5338,7 +5338,7 @@ PHY_ConfigRFWithPowerLimitTableParaFile( } } else { 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; } else RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__); diff --git a/hal/hal_dm_acs.c b/hal/hal_dm_acs.c index f7ce749..95bc76d 100644 --- a/hal/hal_dm_acs.c +++ b/hal/hal_dm_acs.c @@ -204,7 +204,7 @@ void rtw_acs_get_rst(_adapter *adapter) (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.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", rst, diff --git a/hal/hal_halmac.c b/hal/hal_halmac.c index cb6a1a6..021a4bb 100644 --- a/hal/hal_halmac.c +++ b/hal/hal_halmac.c @@ -210,7 +210,7 @@ static u8 _halmac_sdio_reg_read_n(void *p, u32 offset, u32 size, u8 *data) goto exit; } - _rtw_memcpy(data, pbuf, size); + memcpy(data, pbuf, size); rst = RTW_HALMAC_SUCCESS; exit: 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); if (!pbuf) return; - _rtw_memcpy(pbuf, &val, 1); + memcpy(pbuf, &val, 1); ret = rtw_sdio_write_cmd53(d, offset, pbuf, 1); if (ret == _FAIL) @@ -252,7 +252,7 @@ static void _halmac_sdio_reg_write_16(void *p, u32 offset, u16 val) pbuf = rtw_zmalloc(2); if (!pbuf) return; - _rtw_memcpy(pbuf, &val, 2); + memcpy(pbuf, &val, 2); ret = rtw_sdio_write_cmd53(d, offset, pbuf, 2); if (ret == _FAIL) @@ -274,7 +274,7 @@ static void _halmac_sdio_reg_write_32(void *p, u32 offset, u32 val) pbuf = rtw_zmalloc(4); if (!pbuf) return; - _rtw_memcpy(pbuf, &val, 4); + memcpy(pbuf, &val, 4); ret = rtw_sdio_write_cmd53(d, offset, pbuf, 4); 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) { - _rtw_memcpy(dest, src, size); + memcpy(dest, src, size); return RTW_HALMAC_SUCCESS; } @@ -729,7 +729,7 @@ static u8 _halmac_event_indication(void *p, enum halmac_feature_id feature_id, e cpsz = size; } if (cpsz && indicator->buffer) - _rtw_memcpy(indicator->buffer, buf, cpsz); + memcpy(indicator->buffer, buf, cpsz); rtw_sctx_done(&sctx); @@ -841,7 +841,7 @@ static void _read_register(struct dvobj_priv *d, u32 addr, u32 cnt, u8 *buf) if (i) { val32 = cpu_to_le32(rtw_read32(a, addr & ~0x3)); n = 4 - i; - _rtw_memcpy(buf, ((u8 *)&val32) + i, n); + memcpy(buf, ((u8 *)&val32) + i, n); i = n; cnt -= n; } @@ -862,12 +862,12 @@ static void _read_register(struct dvobj_priv *d, u32 addr, u32 cnt, u8 *buf) break; case 2: val16 = cpu_to_le16(rtw_read16(a, addr+i)); - _rtw_memcpy(&buf[i], &val16, 2); + memcpy(&buf[i], &val16, 2); i += 2; break; case 4: val32 = cpu_to_le32(rtw_read32(a, addr+i)); - _rtw_memcpy(&buf[i], &val32, 4); + memcpy(&buf[i], &val32, 4); i += 4; 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) goto out; - _rtw_memcpy(addr, hwa.addr, 6); + memcpy(addr, hwa.addr, 6); err = 0; 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); 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); 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); memset(&hwa, 0, sizeof(hwa)); - _rtw_memcpy(hwa.addr, addr, 6); + memcpy(hwa.addr, addr, 6); status = api->halmac_cfg_bssid(halmac, port, &hwa); if (status != HALMAC_RET_SUCCESS) 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); port = _hw_port_drv2halmac(hwport); 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); 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) */ 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); rtw_write32(adapter, msgbox_ex_addr, h2c_cmd_ex); /* Write command (byte 0~3) */ 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); 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) err = -1; else - _rtw_memcpy(data, efuse + offset, cnt); + memcpy(data, efuse + offset, cnt); 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; - _rtw_memcpy(pnossid.SSID, ssid, ssid_len); + memcpy(pnossid.SSID, ssid, ssid_len); } 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.my_aid = my_aid; 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, ¶m); 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; if (sounding_sts) - _rtw_memcpy(param.sounding_sts, sounding_sts, 6); + memcpy(param.sounding_sts, sounding_sts, 6); 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) - _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, ¶m); if (status != HALMAC_RET_SUCCESS) diff --git a/hal/hal_hci/hal_usb.c b/hal/hal_hci/hal_usb.c index 1f87797..a082532 100644 --- a/hal/hal_hci/hal_usb.c +++ b/hal/hal_hci/hal_usb.c @@ -244,7 +244,7 @@ void usb_c2h_hisr_hdl(_adapter *adapter, u8 *buf) } else { c2h_evt = rtw_malloc(C2H_REG_LEN); 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) RTW_ERR("%s rtw_cbuf_push fail\n", __func__); } else { @@ -261,18 +261,14 @@ void usb_c2h_hisr_hdl(_adapter *adapter, u8 *buf) int usb_write_async(struct usb_device *udev, u32 addr, void *pdata, u16 len) { u8 request; - u8 requesttype; u16 wvalue; - u16 index; int ret; - requesttype = VENDOR_WRITE;/* write_out */ request = REALTEK_USB_VENQT_CMD_REQ; - index = REALTEK_USB_VENQT_CMD_IDX;/* n/a */ wvalue = (u16)(addr & 0x0000ffff); - ret = _usbctrl_vendorreq_async_write(udev, request, wvalue, index, pdata, len, requesttype); + ret = _usbctrl_vendorreq_async_write(udev, request, wvalue, pdata, len, REALTEK_USB_VENQT_WRITE); return ret; } @@ -329,7 +325,7 @@ u8 usb_read8(struct intf_hdl *pintfhdl, u32 addr) wvalue |= 0x8000; #endif - usbctrl_vendorreq(pintfhdl, wvalue, 0, &data, 1, VENDOR_READ); + usbctrl_vendorreq(pintfhdl, wvalue, &data, 1, REALTEK_USB_VENQT_READ); return data; @@ -346,7 +342,7 @@ u16 usb_read16(struct intf_hdl *pintfhdl, u32 addr) wvalue |= 0x8000; #endif - usbctrl_vendorreq(pintfhdl, wvalue, 0, &data, 2, VENDOR_READ); + usbctrl_vendorreq(pintfhdl, wvalue, &data, 2, REALTEK_USB_VENQT_READ); return data; @@ -364,7 +360,7 @@ u32 usb_read32(struct intf_hdl *pintfhdl, u32 addr) wvalue |= 0x8000; #endif - usbctrl_vendorreq(pintfhdl, wvalue, 0, &data, 4, VENDOR_READ); + usbctrl_vendorreq(pintfhdl, wvalue, &data, 4, REALTEK_USB_VENQT_READ); return data; @@ -380,7 +376,7 @@ int usb_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val) wvalue |= 0x8000; #endif - return usbctrl_vendorreq(pintfhdl, wvalue, 0, &val, 1, VENDOR_WRITE); + return usbctrl_vendorreq(pintfhdl, wvalue, &val, 1, REALTEK_USB_VENQT_WRITE); } @@ -394,7 +390,7 @@ int usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val) wvalue |= 0x8000; #endif - return usbctrl_vendorreq(pintfhdl, wvalue, 0, &val, 2, VENDOR_WRITE); + return usbctrl_vendorreq(pintfhdl, wvalue, &val, 2, REALTEK_USB_VENQT_WRITE); } @@ -408,7 +404,7 @@ int usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val) wvalue |= 0x8000; #endif - return usbctrl_vendorreq(pintfhdl, wvalue, 0, &val, 4, VENDOR_WRITE); + return usbctrl_vendorreq(pintfhdl, wvalue, &val, 4, REALTEK_USB_VENQT_WRITE); } @@ -421,7 +417,7 @@ int usb_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata) return -EINVAL; memcpy(buf, pdata, length); - return usbctrl_vendorreq(pintfhdl, wvalue, 0, buf, (length & 0xffff), VENDOR_WRITE); + return usbctrl_vendorreq(pintfhdl, wvalue, buf, (length & 0xffff), REALTEK_USB_VENQT_WRITE); } diff --git a/hal/hal_mcc.c b/hal/hal_mcc.c index 65a13a8..0555d73 100644 --- a/hal/hal_mcc.c +++ b/hal/hal_mcc.c @@ -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; /* 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; /* attrute ID(1 byte) */ @@ -997,9 +997,9 @@ static void rtw_hal_construct_CTS(PADAPTER padapter, u8 *pframe, u32 *pLength) *(pframe + 3) = 0x78; /* frame recvaddr, length = 6 */ - _rtw_memcpy((pframe + 4), broadcast_addr, ETH_ALEN); - _rtw_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), broadcast_addr, ETH_ALEN); + memcpy((pframe + 4 + ETH_ALEN), adapter_mac_addr(padapter), ETH_ALEN); + memcpy((pframe + 4 + ETH_ALEN*2), adapter_mac_addr(padapter), ETH_ALEN); *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) 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; 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->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)); res = rtw_enqueue_cmd(pcmdpriv, cmdobj); diff --git a/hal/hal_mp.c b/hal/hal_mp.c index fab9814..faab54f 100644 --- a/hal/hal_mp.c +++ b/hal/hal_mp.c @@ -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); 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); } @@ -2278,7 +2278,7 @@ void mpt_ProSetPMacTx(PADAPTER Adapter) u4bTmp = (PMacTxInfo.VHT_SIG_B_CRC << 24) | PMacTxInfo.PacketPeriod; /* for TX interval */ 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); /* 0xb28 - 0xb34 24 byte Probe Request MAC Header*/ diff --git a/hal/led/hal_led.c b/hal/led/hal_led.c index 95d3daa..de21049 100644 --- a/hal/led/hal_led.c +++ b/hal/led/hal_led.c @@ -184,7 +184,7 @@ void rtw_led_control(_adapter *adapter, LED_CTL_MODE ctl) void rtw_led_tx_control(_adapter *adapter, const u8 *da) { #if CONFIG_RTW_SW_LED_TRX_DA_CLASSIFY - if (IS_MCAST(da)) + if (is_multicast_ether_addr(da)) rtw_led_control(adapter, LED_CTL_BMC_TX); else rtw_led_control(adapter, LED_CTL_UC_TX); @@ -196,7 +196,7 @@ void rtw_led_tx_control(_adapter *adapter, const u8 *da) void rtw_led_rx_control(_adapter *adapter, const u8 *da) { #if CONFIG_RTW_SW_LED_TRX_DA_CLASSIFY - if (IS_MCAST(da)) + if (is_multicast_ether_addr(da)) rtw_led_control(adapter, LED_CTL_BMC_RX); else rtw_led_control(adapter, LED_CTL_UC_RX); diff --git a/hal/phydm/phydm_interface.c b/hal/phydm/phydm_interface.c index 028c4b5..40ba9f3 100644 --- a/hal/phydm/phydm_interface.c +++ b/hal/phydm/phydm_interface.c @@ -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) memcpy(dest, src, length); #elif (DM_ODM_SUPPORT_TYPE & ODM_CE) - _rtw_memcpy(dest, src, length); + memcpy(dest, src, length); #elif (DM_ODM_SUPPORT_TYPE & ODM_WIN) PlatformMoveMemory(dest, src, length); #elif (DM_ODM_SUPPORT_TYPE & ODM_IOT) diff --git a/hal/phydm/txbf/haltxbfinterface.c b/hal/phydm/txbf/haltxbfinterface.c index 905b117..7ddeff9 100644 --- a/hal/phydm/txbf/haltxbfinterface.c +++ b/hal/phydm/txbf/haltxbfinterface.c @@ -1056,9 +1056,9 @@ send_fw_ht_ndpa_packet( set_order_bit(pframe); set_frame_sub_type(pframe, WIFI_ACTION_NOACK); - _rtw_memcpy(pwlanhdr->addr1, RA, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr1, RA, ETH_ALEN); + memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); if (pmlmeext->cur_wireless_mode == WIRELESS_11B) a_sifs_time = 10; @@ -1078,7 +1078,7 @@ send_fw_ht_ndpa_packet( SET_HT_CTRL_CSI_STEERING(pframe + 24, 3); SET_HT_CTRL_NDP_ANNOUNCEMENT(pframe + 24, 1); - _rtw_memcpy(pframe + 28, action_hdr, 4); + memcpy(pframe + 28, action_hdr, 4); pattrib->pktlen = 32; @@ -1142,9 +1142,9 @@ send_sw_ht_ndpa_packet( set_order_bit(pframe); set_frame_sub_type(pframe, WIFI_ACTION_NOACK); - _rtw_memcpy(pwlanhdr->addr1, RA, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr1, RA, ETH_ALEN); + memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); if (pmlmeext->cur_wireless_mode == WIRELESS_11B) a_sifs_time = 10; @@ -1164,7 +1164,7 @@ send_sw_ht_ndpa_packet( SET_HT_CTRL_CSI_STEERING(pframe + 24, 3); SET_HT_CTRL_NDP_ANNOUNCEMENT(pframe + 24, 1); - _rtw_memcpy(pframe + 28, action_hdr, 4); + memcpy(pframe + 28, action_hdr, 4); pattrib->pktlen = 32; @@ -1209,7 +1209,7 @@ send_fw_vht_ndpa_packet( /* update attribute */ pattrib = &pmgntframe->attrib; - _rtw_memcpy(pattrib->ra, RA, ETH_ALEN); + memcpy(pattrib->ra, RA, ETH_ALEN); update_mgntframe_attrib(adapter, pattrib); pattrib->qsel = QSLT_BEACON; @@ -1231,8 +1231,8 @@ send_fw_vht_ndpa_packet( set_frame_sub_type(pframe, WIFI_NDPA); - _rtw_memcpy(pwlanhdr->addr1, RA, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN); + memcpy(pwlanhdr->addr1, RA, 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)) a_sifs_time = 16; @@ -1256,7 +1256,7 @@ send_fw_vht_ndpa_packet( else 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)) AID = 0; @@ -1265,7 +1265,7 @@ send_fw_vht_ndpa_packet( sta_info.feedback_type = 0; sta_info.nc_index = 0; - _rtw_memcpy(pframe + 17, (u8 *)&sta_info, 2); + memcpy(pframe + 17, (u8 *)&sta_info, 2); pattrib->pktlen = 19; @@ -1314,7 +1314,7 @@ send_sw_vht_ndpa_packet( /*update attribute*/ pattrib = &pmgntframe->attrib; - _rtw_memcpy(pattrib->ra, RA, ETH_ALEN); + memcpy(pattrib->ra, RA, ETH_ALEN); update_mgntframe_attrib(adapter, pattrib); pattrib->qsel = QSLT_MGNT; pattrib->rate = ndp_tx_rate; @@ -1332,8 +1332,8 @@ send_sw_vht_ndpa_packet( set_frame_sub_type(pframe, WIFI_NDPA); - _rtw_memcpy(pwlanhdr->addr1, RA, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN); + memcpy(pwlanhdr->addr1, RA, 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)) a_sifs_time = 16; @@ -1357,7 +1357,7 @@ send_sw_vht_ndpa_packet( else 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)) AID = 0; @@ -1365,7 +1365,7 @@ send_sw_vht_ndpa_packet( ndpa_sta_info.feedback_type = 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; diff --git a/hal/rtl8192e/rtl8192e_cmd.c b/hal/rtl8192e/rtl8192e_cmd.c index 4c20be3..6a92938 100644 --- a/hal/rtl8192e/rtl8192e_cmd.c +++ b/hal/rtl8192e/rtl8192e_cmd.c @@ -100,10 +100,10 @@ s32 FillH2CCmd_8192E(PADAPTER padapter, u8 ElementID, u32 CmdLen, u8 *pCmdBuffer *(u8 *)(&h2c_cmd) = ElementID; if (CmdLen <= 3) - _rtw_memcpy((u8 *)(&h2c_cmd) + 1, pCmdBuffer, CmdLen); + memcpy((u8 *)(&h2c_cmd) + 1, pCmdBuffer, CmdLen); else { - _rtw_memcpy((u8 *)(&h2c_cmd) + 1, pCmdBuffer, 3); - _rtw_memcpy((u8 *)(&h2c_cmd_ex), pCmdBuffer + 3, CmdLen - 3); + memcpy((u8 *)(&h2c_cmd) + 1, pCmdBuffer, 3); + memcpy((u8 *)(&h2c_cmd_ex), pCmdBuffer + 3, CmdLen - 3); } /* Write Ext command */ diff --git a/hal/rtl8192e/usb/rtl8192eu_xmit.c b/hal/rtl8192e/usb/rtl8192eu_xmit.c index ae49132..ceede6d 100644 --- a/hal/rtl8192e/usb/rtl8192eu_xmit.c +++ b/hal/rtl8192e/usb/rtl8192eu_xmit.c @@ -58,7 +58,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz , u8 ba u8 *ptxdesc = pmem; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - sint bmcst = IS_MCAST(pattrib->ra); + bool bmcst = is_multicast_ether_addr(pattrib->ra); #ifndef CONFIG_USE_USB_BUFFER_ALLOC_TX if (padapter->registrypriv.mp_mode == 0) { @@ -918,7 +918,7 @@ s32 rtl8192eu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt) /* #ifdef PLATFORM_LINUX */ u16 fc; int rc, len, pipe; - unsigned int bmcst, tid, qsel; + bool bmcst, tid, qsel; struct sk_buff *skb, *pxmit_skb; struct urb *urb; unsigned char *pxmitbuf; @@ -937,7 +937,7 @@ s32 rtl8192eu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt) len = skb->len; tx_hdr = (struct rtw_ieee80211_hdr *)(skb->data); fc = le16_to_cpu(tx_hdr->frame_ctl); - bmcst = IS_MCAST(tx_hdr->addr1); + bmcst = is_multicast_ether_addr(tx_hdr->addr1); if ((fc & RTW_IEEE80211_FCTL_FTYPE) != RTW_IEEE80211_FTYPE_MGMT) goto _exit; diff --git a/hal/rtl8192e/usb/usb_ops_linux.c b/hal/rtl8192e/usb/usb_ops_linux.c index 03031bf..81e1b14 100644 --- a/hal/rtl8192e/usb/usb_ops_linux.c +++ b/hal/rtl8192e/usb/usb_ops_linux.c @@ -28,16 +28,16 @@ void interrupt_handler_8192eu(_adapter *padapter, u16 pkt_len, u8 *pbuf) } /* HISR */ - _rtw_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[0]), &(pbuf[USB_INTR_CONTENT_HISR_OFFSET]), 4); + memcpy(&(pHalData->IntArray[1]), &(pbuf[USB_INTR_CONTENT_HISRE_OFFSET]), 4); #if 0 /* DBG */ { u32 hisr = 0 , hisr_ex = 0; - _rtw_memcpy(&hisr, &(pHalData->IntArray[0]), 4); + memcpy(&hisr, &(pHalData->IntArray[0]), 4); 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); 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 if (pHalData->IntArray[0] & IMR_CPWM_88E) { - _rtw_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.state, &(pbuf[USB_INTR_CONTENT_CPWM1_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. */ pwr_rpt.state |= PS_STATE_S2; diff --git a/include/cmd_osdep.h b/include/cmd_osdep.h deleted file mode 100644 index e4ba2b6..0000000 --- a/include/cmd_osdep.h +++ /dev/null @@ -1,26 +0,0 @@ -/****************************************************************************** - * - * Copyright(c) 2007 - 2017 Realtek Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - *****************************************************************************/ -#ifndef __CMD_OSDEP_H_ -#define __CMD_OSDEP_H_ - - -extern sint _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv); -extern sint _rtw_init_evt_priv(struct evt_priv *pevtpriv); -extern void _rtw_free_evt_priv(struct evt_priv *pevtpriv); -extern void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv); -extern sint _rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj, bool to_head); -extern struct cmd_obj *_rtw_dequeue_cmd(_queue *queue); - -#endif diff --git a/include/drv_types.h b/include/drv_types.h index dbb4208..cb9e696 100644 --- a/include/drv_types.h +++ b/include/drv_types.h @@ -62,7 +62,6 @@ typedef struct _ADAPTER _adapter, ADAPTER, *PADAPTER; #endif #include -#include #include #include #include @@ -130,9 +129,6 @@ typedef struct _ADAPTER _adapter, ADAPTER, *PADAPTER; #include #endif /* CONFIG_IOL */ -#include -#include -#include #include #include diff --git a/include/ethernet.h b/include/ethernet.h deleted file mode 100644 index 2bafa4d..0000000 --- a/include/ethernet.h +++ /dev/null @@ -1,36 +0,0 @@ -/****************************************************************************** - * - * Copyright(c) 2007 - 2017 Realtek Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - *****************************************************************************/ -/*! \file */ -#ifndef __INC_ETHERNET_H -#define __INC_ETHERNET_H - -#define ETHERNET_ADDRESS_LENGTH 6 /* !< Ethernet Address Length */ -#define ETHERNET_HEADER_SIZE 14 /* !< Ethernet Header Length */ -#define LLC_HEADER_SIZE 6 /* !< LLC Header Length */ -#define TYPE_LENGTH_FIELD_SIZE 2 /* !< Type/Length Size */ -#define MINIMUM_ETHERNET_PACKET_SIZE 60 /* !< Minimum Ethernet Packet Size */ -#define MAXIMUM_ETHERNET_PACKET_SIZE 1514 /* !< Maximum Ethernet Packet Size */ - -#define RT_ETH_IS_MULTICAST(_pAddr) ((((UCHAR *)(_pAddr))[0]&0x01) != 0) /* !< Is Multicast Address? */ -#define RT_ETH_IS_BROADCAST(_pAddr) (\ - ((UCHAR *)(_pAddr))[0] == 0xff && \ - ((UCHAR *)(_pAddr))[1] == 0xff && \ - ((UCHAR *)(_pAddr))[2] == 0xff && \ - ((UCHAR *)(_pAddr))[3] == 0xff && \ - ((UCHAR *)(_pAddr))[4] == 0xff && \ - ((UCHAR *)(_pAddr))[5] == 0xff) /* !< Is Broadcast Address? */ - - -#endif /* #ifndef __INC_ETHERNET_H */ diff --git a/include/ieee80211.h b/include/ieee80211.h index 6fac3d2..ed2a765 100644 --- a/include/ieee80211.h +++ b/include/ieee80211.h @@ -693,65 +693,6 @@ struct ieee80211_snap_hdr { #define WLAN_GET_SEQ_FRAG(seq) ((seq) & RTW_IEEE80211_SCTL_FRAG) #define WLAN_GET_SEQ_SEQ(seq) ((seq) & RTW_IEEE80211_SCTL_SEQ) -/* Authentication algorithms */ -#define WLAN_AUTH_OPEN 0 -#define WLAN_AUTH_SHARED_KEY 1 -#define WLAN_AUTH_SAE 3 - -#define WLAN_AUTH_CHALLENGE_LEN 128 - -#define WLAN_CAPABILITY_BSS (1<<0) -#define WLAN_CAPABILITY_IBSS (1<<1) -#define WLAN_CAPABILITY_CF_POLLABLE (1<<2) -#define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3) -#define WLAN_CAPABILITY_PRIVACY (1<<4) -#define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5) -#define WLAN_CAPABILITY_PBCC (1<<6) -#define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7) -#define WLAN_CAPABILITY_SHORT_SLOT (1<<10) - -/* Status codes */ -#define WLAN_STATUS_SUCCESS 0 -#define WLAN_STATUS_UNSPECIFIED_FAILURE 1 -#define WLAN_STATUS_CAPS_UNSUPPORTED 10 -#define WLAN_STATUS_REASSOC_NO_ASSOC 11 -#define WLAN_STATUS_ASSOC_DENIED_UNSPEC 12 -#define WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG 13 -#define WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION 14 -#define WLAN_STATUS_CHALLENGE_FAIL 15 -#define WLAN_STATUS_AUTH_TIMEOUT 16 -#define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17 -#define WLAN_STATUS_ASSOC_DENIED_RATES 18 -/* 802.11b */ -#define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19 -#define WLAN_STATUS_ASSOC_DENIED_NOPBCC 20 -#define WLAN_STATUS_ASSOC_DENIED_NOAGILITY 21 - -/* Reason codes */ -#define WLAN_REASON_UNSPECIFIED 1 -#define WLAN_REASON_PREV_AUTH_NOT_VALID 2 -#define WLAN_REASON_DEAUTH_LEAVING 3 -#define WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY 4 -#define WLAN_REASON_DISASSOC_AP_BUSY 5 -#define WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA 6 -#define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7 -#define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8 -#define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9 -#define WLAN_REASON_MESH_PEER_CANCELED 52 -#define WLAN_REASON_MESH_MAX_PEERS 53 -#define WLAN_REASON_MESH_CONFIG 54 -#define WLAN_REASON_MESH_CLOSE 55 -#define WLAN_REASON_MESH_MAX_RETRIES 56 -#define WLAN_REASON_MESH_CONFIRM_TIMEOUT 57 -#define WLAN_REASON_MESH_INVALID_GTK 58 -#define WLAN_REASON_MESH_INCONSISTENT_PARAM 59 -#define WLAN_REASON_MESH_INVALID_SECURITY 60 -#define WLAN_REASON_MESH_PATH_NOPROXY 61 -#define WLAN_REASON_MESH_PATH_NOFORWARD 62 -#define WLAN_REASON_MESH_PATH_DEST_UNREACHABLE 63 -#define WLAN_REASON_MAC_EXISTS_IN_MBSS 64 -#define WLAN_REASON_MESH_CHAN_REGULATORY 65 -#define WLAN_REASON_MESH_CHAN 66 #define WLAN_REASON_SA_QUERY_TIMEOUT 65532 #define WLAN_REASON_ACTIVE_ROAM 65533 #define WLAN_REASON_JOIN_WRONG_CHANNEL 65534 @@ -764,56 +705,6 @@ struct ieee80211_snap_hdr { || reason == WLAN_REASON_SA_QUERY_TIMEOUT \ ) -/* Information Element IDs */ -#define WLAN_EID_SSID 0 -#define WLAN_EID_SUPP_RATES 1 -#define WLAN_EID_FH_PARAMS 2 -#define WLAN_EID_DS_PARAMS 3 -#define WLAN_EID_CF_PARAMS 4 -#define WLAN_EID_TIM 5 -#define WLAN_EID_IBSS_PARAMS 6 -#define WLAN_EID_CHALLENGE 16 -/* EIDs defined by IEEE 802.11h - START */ -#define WLAN_EID_PWR_CONSTRAINT 32 -#define WLAN_EID_PWR_CAPABILITY 33 -#define WLAN_EID_TPC_REQUEST 34 -#define WLAN_EID_TPC_REPORT 35 -#define WLAN_EID_SUPPORTED_CHANNELS 36 -#define WLAN_EID_CHANNEL_SWITCH 37 -#define WLAN_EID_MEASURE_REQUEST 38 -#define WLAN_EID_MEASURE_REPORT 39 -#define WLAN_EID_QUITE 40 -#define WLAN_EID_IBSS_DFS 41 -/* EIDs defined by IEEE 802.11h - END */ -#define WLAN_EID_ERP_INFO 42 -#define WLAN_EID_HT_CAP 45 -#define WLAN_EID_RSN 48 -#define WLAN_EID_EXT_SUPP_RATES 50 -#define WLAN_EID_MOBILITY_DOMAIN 54 -#define WLAN_EID_FAST_BSS_TRANSITION 55 -#define WLAN_EID_TIMEOUT_INTERVAL 56 -#define WLAN_EID_RIC_DATA 57 -#define WLAN_EID_HT_OPERATION 61 -#define WLAN_EID_SECONDARY_CHANNEL_OFFSET 62 -#define WLAN_EID_20_40_BSS_COEXISTENCE 72 -#define WLAN_EID_20_40_BSS_INTOLERANT 73 -#define WLAN_EID_OVERLAPPING_BSS_SCAN_PARAMS 74 -#define WLAN_EID_MMIE 76 -#define WLAN_EID_MESH_CONFIG 113 -#define WLAN_EID_MESH_ID 114 -#define WLAN_EID_MPM 117 -#define WLAN_EID_RANN 126 -#define WLAN_EID_PREQ 130 -#define WLAN_EID_PREP 131 -#define WLAN_EID_PERR 132 -#define WLAN_EID_AMPE 139 -#define WLAN_EID_MIC 140 -#define WLAN_EID_VENDOR_SPECIFIC 221 -#define WLAN_EID_GENERIC (WLAN_EID_VENDOR_SPECIFIC) -#define WLAN_EID_VHT_CAPABILITY 191 -#define WLAN_EID_VHT_OPERATION 192 -#define WLAN_EID_VHT_OP_MODE_NOTIFY 199 - #define IEEE80211_MGMT_HDR_LEN 24 #define IEEE80211_DATA_HDR3_LEN 24 #define IEEE80211_DATA_HDR4_LEN 30 diff --git a/include/ieee80211_ext.h b/include/ieee80211_ext.h deleted file mode 100644 index 94a8e58..0000000 --- a/include/ieee80211_ext.h +++ /dev/null @@ -1,471 +0,0 @@ -/****************************************************************************** - * - * Copyright(c) 2007 - 2017 Realtek Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - *****************************************************************************/ -#ifndef __IEEE80211_EXT_H -#define __IEEE80211_EXT_H - -#include -#include -#include - -#define WMM_OUI_TYPE 2 -#define WMM_OUI_SUBTYPE_INFORMATION_ELEMENT 0 -#define WMM_OUI_SUBTYPE_PARAMETER_ELEMENT 1 -#define WMM_OUI_SUBTYPE_TSPEC_ELEMENT 2 -#define WMM_VERSION 1 - -#define WPA_PROTO_WPA BIT(0) -#define WPA_PROTO_RSN BIT(1) - -#define WPA_KEY_MGMT_IEEE8021X BIT(0) -#define WPA_KEY_MGMT_PSK BIT(1) -#define WPA_KEY_MGMT_NONE BIT(2) -#define WPA_KEY_MGMT_IEEE8021X_NO_WPA BIT(3) -#define WPA_KEY_MGMT_WPA_NONE BIT(4) - - -#define WPA_CAPABILITY_PREAUTH BIT(0) -#define WPA_CAPABILITY_MGMT_FRAME_PROTECTION BIT(6) -#define WPA_CAPABILITY_PEERKEY_ENABLED BIT(9) - - -#define PMKID_LEN 16 - - -#ifdef PLATFORM_LINUX -struct wpa_ie_hdr { - u8 elem_id; - u8 len; - u8 oui[4]; /* 24-bit OUI followed by 8-bit OUI type */ - u8 version[2]; /* little endian */ -} __attribute__((packed)); - -struct rsn_ie_hdr { - u8 elem_id; /* WLAN_EID_RSN */ - u8 len; - u8 version[2]; /* little endian */ -} __attribute__((packed)); - -struct wme_ac_parameter { -#if defined(CONFIG_LITTLE_ENDIAN) - /* byte 1 */ - u8 aifsn:4, - acm:1, - aci:2, - reserved:1; - - /* byte 2 */ - u8 eCWmin:4, - eCWmax:4; -#elif defined(CONFIG_BIG_ENDIAN) - /* byte 1 */ - u8 reserved:1, - aci:2, - acm:1, - aifsn:4; - - /* byte 2 */ - u8 eCWmax:4, - eCWmin:4; -#else -#error "Please fix " -#endif - - /* bytes 3 & 4 */ - u16 txopLimit; -} __attribute__((packed)); - -struct wme_parameter_element { - /* required fields for WME version 1 */ - u8 oui[3]; - u8 oui_type; - u8 oui_subtype; - u8 version; - u8 acInfo; - u8 reserved; - struct wme_ac_parameter ac[4]; - -} __attribute__((packed)); - -#endif - -#ifdef PLATFORM_WINDOWS - -#pragma pack(1) - -struct wpa_ie_hdr { - u8 elem_id; - u8 len; - u8 oui[4]; /* 24-bit OUI followed by 8-bit OUI type */ - u8 version[2]; /* little endian */ -}; - -struct rsn_ie_hdr { - u8 elem_id; /* WLAN_EID_RSN */ - u8 len; - u8 version[2]; /* little endian */ -}; - -#pragma pack() - -#endif - -#define WPA_PUT_LE16(a, val) \ - do { \ - (a)[1] = ((u16) (val)) >> 8; \ - (a)[0] = ((u16) (val)) & 0xff; \ - } while (0) - -#define WPA_PUT_BE32(a, val) \ - do { \ - (a)[0] = (u8) ((((u32) (val)) >> 24) & 0xff); \ - (a)[1] = (u8) ((((u32) (val)) >> 16) & 0xff); \ - (a)[2] = (u8) ((((u32) (val)) >> 8) & 0xff); \ - (a)[3] = (u8) (((u32) (val)) & 0xff); \ - } while (0) - -#define WPA_PUT_LE32(a, val) \ - do { \ - (a)[3] = (u8) ((((u32) (val)) >> 24) & 0xff); \ - (a)[2] = (u8) ((((u32) (val)) >> 16) & 0xff); \ - (a)[1] = (u8) ((((u32) (val)) >> 8) & 0xff); \ - (a)[0] = (u8) (((u32) (val)) & 0xff); \ - } while (0) - -#define RSN_SELECTOR_PUT(a, val) WPA_PUT_BE32((u8 *) (a), (val)) -/* #define RSN_SELECTOR_PUT(a, val) WPA_PUT_LE32((u8 *) (a), (val)) */ - - - -/* Action category code */ -enum ieee80211_category { - WLAN_CATEGORY_SPECTRUM_MGMT = 0, - WLAN_CATEGORY_QOS = 1, - WLAN_CATEGORY_DLS = 2, - WLAN_CATEGORY_BACK = 3, - WLAN_CATEGORY_HT = 7, - WLAN_CATEGORY_WMM = 17, -}; - -/* SPECTRUM_MGMT action code */ -enum ieee80211_spectrum_mgmt_actioncode { - WLAN_ACTION_SPCT_MSR_REQ = 0, - WLAN_ACTION_SPCT_MSR_RPRT = 1, - WLAN_ACTION_SPCT_TPC_REQ = 2, - WLAN_ACTION_SPCT_TPC_RPRT = 3, - WLAN_ACTION_SPCT_CHL_SWITCH = 4, - WLAN_ACTION_SPCT_EXT_CHL_SWITCH = 5, -}; - -/* BACK action code */ -enum ieee80211_back_actioncode { - WLAN_ACTION_ADDBA_REQ = 0, - WLAN_ACTION_ADDBA_RESP = 1, - WLAN_ACTION_DELBA = 2, -}; - -/* HT features action code */ -enum ieee80211_ht_actioncode { - WLAN_ACTION_NOTIFY_CH_WIDTH = 0, - WLAN_ACTION_SM_PS = 1, - WLAN_ACTION_PSPM = 2, - WLAN_ACTION_PCO_PHASE = 3, - WLAN_ACTION_MIMO_CSI_MX = 4, - WLAN_ACTION_MIMO_NONCP_BF = 5, - WLAN_ACTION_MIMP_CP_BF = 6, - WLAN_ACTION_ASEL_INDICATES_FB = 7, - WLAN_ACTION_HI_INFO_EXCHG = 8, -}; - -/* BACK (block-ack) parties */ -enum ieee80211_back_parties { - WLAN_BACK_RECIPIENT = 0, - WLAN_BACK_INITIATOR = 1, - WLAN_BACK_TIMER = 2, -}; - -#ifdef PLATFORM_LINUX - -struct ieee80211_mgmt { - u16 frame_control; - u16 duration; - u8 da[6]; - u8 sa[6]; - u8 bssid[6]; - u16 seq_ctrl; - union { - struct { - u16 auth_alg; - u16 auth_transaction; - u16 status_code; - /* possibly followed by Challenge text */ - u8 variable[0]; - } __attribute__((packed)) auth; - struct { - u16 reason_code; - } __attribute__((packed)) deauth; - struct { - u16 capab_info; - u16 listen_interval; - /* followed by SSID and Supported rates */ - u8 variable[0]; - } __attribute__((packed)) assoc_req; - struct { - u16 capab_info; - u16 status_code; - u16 aid; - /* followed by Supported rates */ - u8 variable[0]; - } __attribute__((packed)) assoc_resp, reassoc_resp; - struct { - u16 capab_info; - u16 listen_interval; - u8 current_ap[6]; - /* followed by SSID and Supported rates */ - u8 variable[0]; - } __attribute__((packed)) reassoc_req; - struct { - u16 reason_code; - } __attribute__((packed)) disassoc; - struct { - __le64 timestamp; - u16 beacon_int; - u16 capab_info; - /* followed by some of SSID, Supported rates, - * FH Params, DS Params, CF Params, IBSS Params, TIM */ - u8 variable[0]; - } __attribute__((packed)) beacon; - struct { - /* only variable items: SSID, Supported rates */ - u8 variable[0]; - } __attribute__((packed)) probe_req; - struct { - __le64 timestamp; - u16 beacon_int; - u16 capab_info; - /* followed by some of SSID, Supported rates, - * FH Params, DS Params, CF Params, IBSS Params */ - u8 variable[0]; - } __attribute__((packed)) probe_resp; - struct { - u8 category; - union { - struct { - u8 action_code; - u8 dialog_token; - u8 status_code; - u8 variable[0]; - } __attribute__((packed)) wme_action; -#if 0 - struct { - u8 action_code; - u8 element_id; - u8 length; - struct ieee80211_channel_sw_ie sw_elem; - } __attribute__((packed)) chan_switch; - struct { - u8 action_code; - u8 dialog_token; - u8 element_id; - u8 length; - struct ieee80211_msrment_ie msr_elem; - } __attribute__((packed)) measurement; -#endif - struct { - u8 action_code; - u8 dialog_token; - u16 capab; - u16 timeout; - u16 start_seq_num; - } __attribute__((packed)) addba_req; - struct { - u8 action_code; - u8 dialog_token; - u16 status; - u16 capab; - u16 timeout; - } __attribute__((packed)) addba_resp; - struct { - u8 action_code; - u16 params; - u16 reason_code; - } __attribute__((packed)) delba; - struct { - u8 action_code; - /* capab_info for open and confirm, - * reason for close - */ - u16 aux; - /* Followed in plink_confirm by status - * code, AID and supported rates, - * and directly by supported rates in - * plink_open and plink_close - */ - u8 variable[0]; - } __attribute__((packed)) plink_action; - struct { - u8 action_code; - u8 variable[0]; - } __attribute__((packed)) mesh_action; - } __attribute__((packed)) u; - } __attribute__((packed)) action; - } __attribute__((packed)) u; -} __attribute__((packed)); - -#endif - - -#ifdef PLATFORM_WINDOWS - -#pragma pack(1) - -struct ieee80211_mgmt { - u16 frame_control; - u16 duration; - u8 da[6]; - u8 sa[6]; - u8 bssid[6]; - u16 seq_ctrl; - union { - struct { - u16 auth_alg; - u16 auth_transaction; - u16 status_code; - /* possibly followed by Challenge text */ - u8 variable[0]; - } auth; - struct { - u16 reason_code; - } deauth; - struct { - u16 capab_info; - u16 listen_interval; - /* followed by SSID and Supported rates */ - u8 variable[0]; - } assoc_req; - struct { - u16 capab_info; - u16 status_code; - u16 aid; - /* followed by Supported rates */ - u8 variable[0]; - } assoc_resp, reassoc_resp; - struct { - u16 capab_info; - u16 listen_interval; - u8 current_ap[6]; - /* followed by SSID and Supported rates */ - u8 variable[0]; - } reassoc_req; - struct { - u16 reason_code; - } disassoc; -#if 0 - struct { - __le64 timestamp; - u16 beacon_int; - u16 capab_info; - /* followed by some of SSID, Supported rates, - * FH Params, DS Params, CF Params, IBSS Params, TIM */ - u8 variable[0]; - } beacon; - struct { - /* only variable items: SSID, Supported rates */ - u8 variable[0]; - } probe_req; - - struct { - __le64 timestamp; - u16 beacon_int; - u16 capab_info; - /* followed by some of SSID, Supported rates, - * FH Params, DS Params, CF Params, IBSS Params */ - u8 variable[0]; - } probe_resp; -#endif - struct { - u8 category; - union { - struct { - u8 action_code; - u8 dialog_token; - u8 status_code; - u8 variable[0]; - } wme_action; - #if 0 - struct{ - u8 action_code; - u8 element_id; - u8 length; - struct ieee80211_channel_sw_ie sw_elem; - } chan_switch; - struct{ - u8 action_code; - u8 dialog_token; - u8 element_id; - u8 length; - struct ieee80211_msrment_ie msr_elem; - } measurement; - #endif - struct { - u8 action_code; - u8 dialog_token; - u16 capab; - u16 timeout; - u16 start_seq_num; - } addba_req; - struct { - u8 action_code; - u8 dialog_token; - u16 status; - u16 capab; - u16 timeout; - } addba_resp; - struct { - u8 action_code; - u16 params; - u16 reason_code; - } delba; - struct { - u8 action_code; - /* capab_info for open and confirm, - * reason for close - */ - u16 aux; - /* Followed in plink_confirm by status - * code, AID and supported rates, - * and directly by supported rates in - * plink_open and plink_close - */ - u8 variable[0]; - } plink_action; - struct { - u8 action_code; - u8 variable[0]; - } mesh_action; - } u; - } action; - } u; -} ; - -#pragma pack() - -#endif - -/* mgmt header + 1 byte category code */ -#define IEEE80211_MIN_ACTION_SIZE FIELD_OFFSET(struct ieee80211_mgmt, u.action.u) - - - -#endif diff --git a/include/if_ether.h b/include/if_ether.h deleted file mode 100644 index a3007c4..0000000 --- a/include/if_ether.h +++ /dev/null @@ -1,106 +0,0 @@ -/****************************************************************************** - * - * Copyright(c) 2007 - 2017 Realtek Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - *****************************************************************************/ - -#ifndef _LINUX_IF_ETHER_H -#define _LINUX_IF_ETHER_H - -/* - * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble - * and FCS/CRC (frame check sequence). - */ - -#define ETH_ALEN 6 /* Octets in one ethernet addr */ -#define ETH_HLEN 14 /* Total octets in header. */ -#define ETH_ZLEN 60 /* Min. octets in frame sans FCS */ -#define ETH_DATA_LEN 1500 /* Max. octets in payload */ -#define ETH_FRAME_LEN 1514 /* Max. octets in frame sans FCS */ - -/* - * These are the defined Ethernet Protocol ID's. - */ - -#define ETH_P_LOOP 0x0060 /* Ethernet Loopback packet */ -#define ETH_P_PUP 0x0200 /* Xerox PUP packet */ -#define ETH_P_PUPAT 0x0201 /* Xerox PUP Addr Trans packet */ -#define ETH_P_IP 0x0800 /* Internet Protocol packet */ -#define ETH_P_X25 0x0805 /* CCITT X.25 */ -#define ETH_P_ARP 0x0806 /* Address Resolution packet */ -#define ETH_P_BPQ 0x08FF /* G8BPQ AX.25 Ethernet Packet [ NOT AN OFFICIALLY REGISTERED ID ] */ -#define ETH_P_IEEEPUP 0x0a00 /* Xerox IEEE802.3 PUP packet */ -#define ETH_P_IEEEPUPAT 0x0a01 /* Xerox IEEE802.3 PUP Addr Trans packet */ -#define ETH_P_DEC 0x6000 /* DEC Assigned proto */ -#define ETH_P_DNA_DL 0x6001 /* DEC DNA Dump/Load */ -#define ETH_P_DNA_RC 0x6002 /* DEC DNA Remote Console */ -#define ETH_P_DNA_RT 0x6003 /* DEC DNA Routing */ -#define ETH_P_LAT 0x6004 /* DEC LAT */ -#define ETH_P_DIAG 0x6005 /* DEC Diagnostics */ -#define ETH_P_CUST 0x6006 /* DEC Customer use */ -#define ETH_P_SCA 0x6007 /* DEC Systems Comms Arch */ -#define ETH_P_RARP 0x8035 /* Reverse Addr Res packet */ -#define ETH_P_ATALK 0x809B /* Appletalk DDP */ -#define ETH_P_AARP 0x80F3 /* Appletalk AARP */ -#define ETH_P_8021Q 0x8100 /* 802.1Q VLAN Extended Header */ -#define ETH_P_IPX 0x8137 /* IPX over DIX */ -#define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */ -#define ETH_P_PPP_DISC 0x8863 /* PPPoE discovery messages */ -#define ETH_P_PPP_SES 0x8864 /* PPPoE session messages */ -#define ETH_P_ATMMPOA 0x884c /* MultiProtocol Over ATM */ -#define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport - * over Ethernet - */ - -/* - * Non DIX types. Won't clash for 1500 types. - */ - -#define ETH_P_802_3 0x0001 /* Dummy type for 802.3 frames */ -#define ETH_P_AX25 0x0002 /* Dummy protocol id for AX.25 */ -#define ETH_P_ALL 0x0003 /* Every packet (be careful!!!) */ -#define ETH_P_802_2 0x0004 /* 802.2 frames */ -#define ETH_P_SNAP 0x0005 /* Internal only */ -#define ETH_P_DDCMP 0x0006 /* DEC DDCMP: Internal only */ -#define ETH_P_WAN_PPP 0x0007 /* Dummy type for WAN PPP frames*/ -#define ETH_P_PPP_MP 0x0008 /* Dummy type for PPP MP frames */ -#define ETH_P_LOCALTALK 0x0009 /* Localtalk pseudo type */ -#define ETH_P_PPPTALK 0x0010 /* Dummy type for Atalk over PPP*/ -#define ETH_P_TR_802_2 0x0011 /* 802.2 frames */ -#define ETH_P_MOBITEX 0x0015 /* Mobitex (kaz@cafe.net) */ -#define ETH_P_CONTROL 0x0016 /* Card specific control frames */ -#define ETH_P_IRDA 0x0017 /* Linux-IrDA */ -#define ETH_P_ECONET 0x0018 /* Acorn Econet */ - -/* - * This is an Ethernet frame header. - */ - -struct ethhdr { - unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ - unsigned char h_source[ETH_ALEN]; /* source ether addr */ - unsigned short h_proto; /* packet type ID field */ -}; - -struct _vlan { - unsigned short h_vlan_TCI; /* Encapsulates priority and VLAN ID */ - unsigned short h_vlan_encapsulated_proto; -}; - - - -#define get_vlan_id(pvlan) ((ntohs((unsigned short)pvlan->h_vlan_TCI)) & 0xfff) -#define get_vlan_priority(pvlan) ((ntohs((unsigned short)pvlan->h_vlan_TCI))>>13) -#define get_vlan_encap_proto(pvlan) (ntohs((unsigned short)pvlan->h_vlan_encapsulated_proto)) - - -#endif /* _LINUX_IF_ETHER_H */ diff --git a/include/ip.h b/include/ip.h deleted file mode 100644 index 4feb98f..0000000 --- a/include/ip.h +++ /dev/null @@ -1,135 +0,0 @@ -/****************************************************************************** - * - * Copyright(c) 2007 - 2017 Realtek Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - *****************************************************************************/ -#ifndef _LINUX_IP_H -#define _LINUX_IP_H - -/* SOL_IP socket options */ - -#define IPTOS_TOS_MASK 0x1E -#define IPTOS_TOS(tos) ((tos)&IPTOS_TOS_MASK) -#define IPTOS_LOWDELAY 0x10 -#define IPTOS_THROUGHPUT 0x08 -#define IPTOS_RELIABILITY 0x04 -#define IPTOS_MINCOST 0x02 - -#define IPTOS_PREC_MASK 0xE0 -#define IPTOS_PREC(tos) ((tos)&IPTOS_PREC_MASK) -#define IPTOS_PREC_NETCONTROL 0xe0 -#define IPTOS_PREC_INTERNETCONTROL 0xc0 -#define IPTOS_PREC_CRITIC_ECP 0xa0 -#define IPTOS_PREC_FLASHOVERRIDE 0x80 -#define IPTOS_PREC_FLASH 0x60 -#define IPTOS_PREC_IMMEDIATE 0x40 -#define IPTOS_PREC_PRIORITY 0x20 -#define IPTOS_PREC_ROUTINE 0x00 - - -/* IP options */ -#define IPOPT_COPY 0x80 -#define IPOPT_CLASS_MASK 0x60 -#define IPOPT_NUMBER_MASK 0x1f - -#define IPOPT_COPIED(o) ((o)&IPOPT_COPY) -#define IPOPT_CLASS(o) ((o)&IPOPT_CLASS_MASK) -#define IPOPT_NUMBER(o) ((o)&IPOPT_NUMBER_MASK) - -#define IPOPT_CONTROL 0x00 -#define IPOPT_RESERVED1 0x20 -#define IPOPT_MEASUREMENT 0x40 -#define IPOPT_RESERVED2 0x60 - -#define IPOPT_END (0 | IPOPT_CONTROL) -#define IPOPT_NOOP (1 | IPOPT_CONTROL) -#define IPOPT_SEC (2 | IPOPT_CONTROL | IPOPT_COPY) -#define IPOPT_LSRR (3 | IPOPT_CONTROL | IPOPT_COPY) -#define IPOPT_TIMESTAMP (4 | IPOPT_MEASUREMENT) -#define IPOPT_RR (7 | IPOPT_CONTROL) -#define IPOPT_SID (8 | IPOPT_CONTROL | IPOPT_COPY) -#define IPOPT_SSRR (9 | IPOPT_CONTROL | IPOPT_COPY) -#define IPOPT_RA (20 | IPOPT_CONTROL | IPOPT_COPY) - -#define IPVERSION 4 -#define MAXTTL 255 -#define IPDEFTTL 64 - -/* struct timestamp, struct route and MAX_ROUTES are removed. - - REASONS: it is clear that nobody used them because: - - MAX_ROUTES value was wrong. - - "struct route" was wrong. - - "struct timestamp" had fatally misaligned bitfields and was completely unusable. - */ - -#define IPOPT_OPTVAL 0 -#define IPOPT_OLEN 1 -#define IPOPT_OFFSET 2 -#define IPOPT_MINOFF 4 -#define MAX_IPOPTLEN 40 -#define IPOPT_NOP IPOPT_NOOP -#define IPOPT_EOL IPOPT_END -#define IPOPT_TS IPOPT_TIMESTAMP - -#define IPOPT_TS_TSONLY 0 /* timestamps only */ -#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */ -#define IPOPT_TS_PRESPEC 3 /* specified modules only */ - -#ifdef PLATFORM_LINUX - -struct ip_options { - __u32 faddr; /* Saved first hop address */ - unsigned char optlen; - unsigned char srr; - unsigned char rr; - unsigned char ts; - unsigned char is_setbyuser:1, /* Set by setsockopt? */ - is_data:1, /* Options in __data, rather than skb */ - is_strictroute:1, /* Strict source route */ - srr_is_hit:1, /* Packet destination addr was our one */ - is_changed:1, /* IP checksum more not valid */ - rr_needaddr:1, /* Need to record addr of outgoing dev */ - ts_needtime:1, /* Need to record timestamp */ - ts_needaddr:1; /* Need to record addr of outgoing dev */ - unsigned char router_alert; - unsigned char __pad1; - unsigned char __pad2; - unsigned char __data[0]; -}; - -#define optlength(opt) (sizeof(struct ip_options) + opt->optlen) -#endif - -struct iphdr { -#if defined(__LITTLE_ENDIAN_BITFIELD) - __u8 ihl:4, - version:4; -#elif defined (__BIG_ENDIAN_BITFIELD) - __u8 version:4, - ihl:4; -#else -#error "Please fix " -#endif - __u8 tos; - __u16 tot_len; - __u16 id; - __u16 frag_off; - __u8 ttl; - __u8 protocol; - __u16 check; - __u32 saddr; - __u32 daddr; - /*The options start here. */ -}; - -#endif /* _LINUX_IP_H */ diff --git a/include/osdep_service.h b/include/osdep_service.h index 8fc0ab2..f229280 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -254,10 +254,7 @@ _pkt *rtw_os_pkt_copy(_pkt *pkt); void *rtw_os_pkt_data(_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 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 u32 rtw_is_list_empty(_list *phead); diff --git a/include/osdep_service_bsd.h b/include/osdep_service_bsd.h index f7399bf..7d5beb5 100644 --- a/include/osdep_service_bsd.h +++ b/include/osdep_service_bsd.h @@ -55,7 +55,6 @@ #include #include #include -#include #include #include @@ -523,10 +522,6 @@ usb_put_dev(struct usb_device *dev) int rtw_usb_submit_urb(struct urb *urb, uint16_t mem_flags); int rtw_usb_unlink_urb(struct urb *urb); int rtw_usb_clear_halt(struct usb_device *dev, struct usb_host_endpoint *uhe); -int rtw_usb_control_msg(struct usb_device *dev, struct usb_host_endpoint *uhe, - uint8_t request, uint8_t requesttype, - uint16_t value, uint16_t index, void *data, - uint16_t size, usb_timeout_t timeout); int rtw_usb_set_interface(struct usb_device *dev, uint8_t iface_no, uint8_t alt_index); int rtw_usb_setup_endpoint(struct usb_device *dev, struct usb_host_endpoint *uhe, usb_size_t bufsize); diff --git a/include/osdep_service_linux.h b/include/osdep_service_linux.h index 2339af4..6a77e53 100644 --- a/include/osdep_service_linux.h +++ b/include/osdep_service_linux.h @@ -50,7 +50,6 @@ #include #include #include /* for struct tasklet_struct */ -#include #include #include #include diff --git a/include/rtw_io.h b/include/rtw_io.h index cafb12d..1beec27 100644 --- a/include/rtw_io.h +++ b/include/rtw_io.h @@ -106,15 +106,11 @@ struct _io_ops { void (*_read_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem); void (*_write_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem); - void (*_sync_irp_protocol_rw)(struct io_queue *pio_q); - u32(*_read_interrupt)(struct intf_hdl *pintfhdl, u32 addr); u32(*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem); u32(*_write_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem); - u32(*_write_scsi)(struct intf_hdl *pintfhdl, u32 cnt, u8 *pmem); - void (*_read_port_cancel)(struct intf_hdl *pintfhdl); void (*_write_port_cancel)(struct intf_hdl *pintfhdl); diff --git a/include/rtw_mlme.h b/include/rtw_mlme.h index 1fae61a..f38fb15 100644 --- a/include/rtw_mlme.h +++ b/include/rtw_mlme.h @@ -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_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_IP_ADDR(_arp, _val) _rtw_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_IP_ADDR(_arp, _val) _rtw_memcpy(_val, ARP_TARGET_IP_ADDR(_arp), RTW_IP_ADDR_LEN) +#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) memcpy(_val, ARP_SENDER_IP_ADDR(_arp), RTW_IP_ADDR_LEN) +#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) 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_IP_ADDR(_arp, _val) _rtw_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_IP_ADDR(_arp, _val) _rtw_memcpy(ARP_TARGET_IP_ADDR(_arp), _val, RTW_IP_ADDR_LEN) +#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) memcpy(ARP_SENDER_IP_ADDR(_arp), _val, RTW_IP_ADDR_LEN) +#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) 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); diff --git a/include/rtw_mp.h b/include/rtw_mp.h index 6dbdd87..da707c4 100644 --- a/include/rtw_mp.h +++ b/include/rtw_mp.h @@ -700,8 +700,6 @@ extern void mp_stop_test(PADAPTER padapter); extern u32 _read_rfreg(PADAPTER padapter, u8 rfpath, u32 addr, u32 bitmask); extern void _write_rfreg(PADAPTER padapter, u8 rfpath, u32 addr, u32 bitmask, u32 val); -extern u32 read_macreg(_adapter *padapter, u32 addr, u32 sz); -extern void write_macreg(_adapter *padapter, u32 addr, u32 val, u32 sz); extern u32 read_bbreg(_adapter *padapter, u32 addr, u32 bitmask); extern void write_bbreg(_adapter *padapter, u32 addr, u32 bitmask, u32 val); extern u32 read_rfreg(PADAPTER padapter, u8 rfpath, u32 addr); diff --git a/include/rtw_recv.h b/include/rtw_recv.h index 3236dd1..a7bd75c 100644 --- a/include/rtw_recv.h +++ b/include/rtw_recv.h @@ -89,6 +89,8 @@ extern u8 rtw_bridge_tunnel_header[]; extern u8 rtw_rfc1042_header[]; +#define LLC_HEADER_SIZE 6 + /* for Rx reordering buffer control */ struct recv_reorder_ctrl { _adapter *padapter; diff --git a/include/usb_ops.h b/include/usb_ops.h index 6d5435d..be74f01 100644 --- a/include/usb_ops.h +++ b/include/usb_ops.h @@ -22,10 +22,6 @@ #define REALTEK_USB_VENQT_CMD_IDX 0x00 #define REALTEK_USB_IN_INT_EP_IDX 1 -enum { - VENDOR_WRITE = 0x00, - VENDOR_READ = 0x01, -}; #define ALIGNMENT_UNIT 16 #define MAX_VENDOR_REQ_CMD_SIZE 254 /* 8188cu SIE Support */ #define MAX_USB_IO_CTL_SIZE (MAX_VENDOR_REQ_CMD_SIZE + ALIGNMENT_UNIT) diff --git a/include/usb_ops_linux.h b/include/usb_ops_linux.h index 9c1aabc..f7bb5be 100644 --- a/include/usb_ops_linux.h +++ b/include/usb_ops_linux.h @@ -59,10 +59,10 @@ void usb_read_port_cancel(struct intf_hdl *pintfhdl); u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem); void usb_write_port_cancel(struct intf_hdl *pintfhdl); -int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u16 value, u16 index, void *pdata, u16 len, u8 requesttype); +int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u16 value, void *pdata, u16 len, u8 requesttype); #ifdef CONFIG_USB_SUPPORT_ASYNC_VDN_REQ int _usbctrl_vendorreq_async_write(struct usb_device *udev, u8 request, - u16 value, u16 index, void *pdata, u16 len, u8 requesttype); + u16 value, void *pdata, u16 len, u8 requesttype); #endif /* CONFIG_USB_SUPPORT_ASYNC_VDN_REQ */ u8 usb_read8(struct intf_hdl *pintfhdl, u32 addr); diff --git a/include/wifi.h b/include/wifi.h index 558e263..f45a0df 100644 --- a/include/wifi.h +++ b/include/wifi.h @@ -150,40 +150,11 @@ enum WIFI_REASON_CODE { }; /* Reason codes (IEEE 802.11-2007, 7.3.1.7, Table 7-22) */ -#if 0 -#define WLAN_REASON_UNSPECIFIED 1 -#define WLAN_REASON_PREV_AUTH_NOT_VALID 2 -#define WLAN_REASON_DEAUTH_LEAVING 3 -#define WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY 4 -#define WLAN_REASON_DISASSOC_AP_BUSY 5 -#define WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA 6 -#define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7 -#define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8 -#define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9 -#endif -/* IEEE 802.11h */ -#define WLAN_REASON_PWR_CAPABILITY_NOT_VALID 10 -#define WLAN_REASON_SUPPORTED_CHANNEL_NOT_VALID 11 -#if 0 -/* IEEE 802.11i */ -#define WLAN_REASON_INVALID_IE 13 -#define WLAN_REASON_MICHAEL_MIC_FAILURE 14 -#define WLAN_REASON_4WAY_HANDSHAKE_TIMEOUT 15 -#define WLAN_REASON_GROUP_KEY_UPDATE_TIMEOUT 16 -#define WLAN_REASON_IE_IN_4WAY_DIFFERS 17 -#define WLAN_REASON_GROUP_CIPHER_NOT_VALID 18 -#define WLAN_REASON_PAIRWISE_CIPHER_NOT_VALID 19 -#define WLAN_REASON_AKMP_NOT_VALID 20 -#define WLAN_REASON_UNSUPPORTED_RSN_IE_VERSION 21 -#define WLAN_REASON_INVALID_RSN_IE_CAPAB 22 -#define WLAN_REASON_IEEE_802_1X_AUTH_FAILED 23 -#define WLAN_REASON_CIPHER_SUITE_REJECTED 24 -#endif enum WIFI_STATUS_CODE { _STATS_SUCCESSFUL_ = 0, _STATS_FAILURE_ = 1, - _STATS_SEC_DISABLED_ = 5, + _STATS_SEC_DISABLED_ = 5, _STATS_NOT_IN_SAME_BSS_ = 7, _STATS_CAP_FAIL_ = 10, _STATS_NO_ASOC_ = 11, @@ -197,58 +168,11 @@ enum WIFI_STATUS_CODE { _STATS_REFUSED_TEMPORARILY_ = 30, _STATS_DECLINE_REQ_ = 37, _STATS_INVALID_PARAMETERS_ = 38, - _STATS_INVALID_RSNIE_ = 72, + _STATS_INVALID_RSNIE_ = 72, }; -/* Status codes (IEEE 802.11-2007, 7.3.1.9, Table 7-23) */ -#if 0 -#define WLAN_STATUS_SUCCESS 0 -#define WLAN_STATUS_UNSPECIFIED_FAILURE 1 -#define WLAN_STATUS_CAPS_UNSUPPORTED 10 -#define WLAN_STATUS_REASSOC_NO_ASSOC 11 -#define WLAN_STATUS_ASSOC_DENIED_UNSPEC 12 -#define WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG 13 -#define WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION 14 -#define WLAN_STATUS_CHALLENGE_FAIL 15 -#define WLAN_STATUS_AUTH_TIMEOUT 16 -#define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17 -#define WLAN_STATUS_ASSOC_DENIED_RATES 18 -#endif -/* entended */ -/* IEEE 802.11b */ -#define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19 -#define WLAN_STATUS_ASSOC_DENIED_NOPBCC 20 -#define WLAN_STATUS_ASSOC_DENIED_NOAGILITY 21 -/* IEEE 802.11h */ -#define WLAN_STATUS_SPEC_MGMT_REQUIRED 22 -#define WLAN_STATUS_PWR_CAPABILITY_NOT_VALID 23 -#define WLAN_STATUS_SUPPORTED_CHANNEL_NOT_VALID 24 -/* IEEE 802.11g */ -#define WLAN_STATUS_ASSOC_DENIED_NO_SHORT_SLOT_TIME 25 -#define WLAN_STATUS_ASSOC_DENIED_NO_ER_PBCC 26 -#define WLAN_STATUS_ASSOC_DENIED_NO_DSSS_OFDM 27 -/* IEEE 802.11w */ -#define WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY 30 -#define WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION 31 -/* IEEE 802.11i */ -#define WLAN_STATUS_INVALID_IE 40 -#define WLAN_STATUS_GROUP_CIPHER_NOT_VALID 41 -#define WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID 42 -#define WLAN_STATUS_AKMP_NOT_VALID 43 -#define WLAN_STATUS_UNSUPPORTED_RSN_IE_VERSION 44 -#define WLAN_STATUS_INVALID_RSN_IE_CAPAB 45 -#define WLAN_STATUS_CIPHER_REJECTED_PER_POLICY 46 -#define WLAN_STATUS_TS_NOT_CREATED 47 -#define WLAN_STATUS_DIRECT_LINK_NOT_ALLOWED 48 -#define WLAN_STATUS_DEST_STA_NOT_PRESENT 49 -#define WLAN_STATUS_DEST_STA_NOT_QOS_STA 50 -#define WLAN_STATUS_ASSOC_DENIED_LISTEN_INT_TOO_LARGE 51 /* IEEE 802.11r */ -#define WLAN_STATUS_INVALID_FT_ACTION_FRAME_COUNT 52 #define WLAN_STATUS_INVALID_PMKID 53 -#define WLAN_STATUS_INVALID_MDIE 54 -#define WLAN_STATUS_INVALID_FTIE 55 - enum WIFI_REG_DOMAIN { DOMAIN_FCC = 1, @@ -440,15 +364,6 @@ enum WIFI_REG_DOMAIN { #define GetAddr4Ptr(pbuf) ((unsigned char *)((SIZE_PTR)(pbuf) + 24)) - -__inline static int IS_MCAST(const u8 *da) -{ - if ((*da) & 0x01) - return _TRUE; - else - return _FALSE; -} - __inline static unsigned char *get_ra(unsigned char *pframe) { unsigned char *ra; diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 0c7f409..411c5f6 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -476,24 +476,24 @@ exit: void rtw_2g_channels_init(struct ieee80211_channel *channels) { - _rtw_memcpy((void *)channels, (void *)rtw_2ghz_channels, sizeof(rtw_2ghz_channels)); + memcpy((void *)channels, (void *)rtw_2ghz_channels, sizeof(rtw_2ghz_channels)); } void rtw_5g_channels_init(struct ieee80211_channel *channels) { - _rtw_memcpy((void *)channels, (void *)rtw_5ghz_a_channels, sizeof(rtw_5ghz_a_channels)); + memcpy((void *)channels, (void *)rtw_5ghz_a_channels, sizeof(rtw_5ghz_a_channels)); } void rtw_2g_rates_init(struct ieee80211_rate *rates) { - _rtw_memcpy(rates, rtw_g_rates, + memcpy(rates, rtw_g_rates, sizeof(struct ieee80211_rate) * RTW_G_RATES_NUM ); } void rtw_5g_rates_init(struct ieee80211_rate *rates) { - _rtw_memcpy(rates, rtw_a_rates, + memcpy(rates, rtw_a_rates, sizeof(struct ieee80211_rate) * RTW_A_RATES_NUM ); } @@ -863,20 +863,20 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net /* pmlmeext->mgnt_seq++; */ if (pnetwork->network.Reserved[0] == BSS_TYPE_BCN) { /* WIFI_BEACON */ - _rtw_memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); + memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); set_frame_sub_type(pbuf, WIFI_BEACON); } else { - _rtw_memcpy(pwlanhdr->addr1, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr1, adapter_mac_addr(padapter), ETH_ALEN); set_frame_sub_type(pbuf, WIFI_PROBERSP); } - _rtw_memcpy(pwlanhdr->addr2, pnetwork->network.MacAddress, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, pnetwork->network.MacAddress, ETH_ALEN); + memcpy(pwlanhdr->addr2, pnetwork->network.MacAddress, ETH_ALEN); + memcpy(pwlanhdr->addr3, pnetwork->network.MacAddress, ETH_ALEN); /* pbuf += sizeof(struct rtw_ieee80211_hdr_3addr); */ len = sizeof(struct rtw_ieee80211_hdr_3addr); - _rtw_memcpy((pbuf + len), pnetwork->network.IEs, pnetwork->network.IELength); + memcpy((pbuf + len), pnetwork->network.IEs, pnetwork->network.IELength); *((u64 *)(pbuf + len)) = cpu_to_le64(notify_timestamp); len += pnetwork->network.IELength; @@ -997,7 +997,7 @@ void rtw_cfg80211_ibss_indicate_connect(_adapter *padapter) if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE) { - _rtw_memcpy(&cur_network->network, pnetwork, sizeof(WLAN_BSSID_EX)); + memcpy(&cur_network->network, pnetwork, sizeof(WLAN_BSSID_EX)); if (cur_network) { if (!rtw_cfg80211_inform_bss(padapter, cur_network)) RTW_INFO(FUNC_ADPT_FMT" inform fail !!\n", FUNC_ADPT_ARG(padapter)); @@ -1324,7 +1324,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa psecuritypriv->dot11PrivacyKeyIndex = wep_key_idx; } - _rtw_memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), param->u.crypt.key, wep_key_len); + memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), param->u.crypt.key, wep_key_len); psecuritypriv->dot11DefKeylen[wep_key_idx] = wep_key_len; @@ -1339,7 +1339,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa if (strcmp(param->u.crypt.alg, "WEP") == 0) { RTW_INFO(FUNC_ADPT_FMT" set WEP TX GTK idx:%u, len:%u\n" , FUNC_ADPT_ARG(padapter), param->u.crypt.idx, param->u.crypt.key_len); - _rtw_memcpy(psecuritypriv->dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); + memcpy(psecuritypriv->dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); psecuritypriv->dot118021XGrpPrivacy = _WEP40_; if (param->u.crypt.key_len == 13) psecuritypriv->dot118021XGrpPrivacy = _WEP104_; @@ -1348,23 +1348,23 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa RTW_INFO(FUNC_ADPT_FMT" set TKIP TX GTK idx:%u, len:%u\n" , FUNC_ADPT_ARG(padapter), param->u.crypt.idx, param->u.crypt.key_len); psecuritypriv->dot118021XGrpPrivacy = _TKIP_; - _rtw_memcpy(psecuritypriv->dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); + memcpy(psecuritypriv->dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); /* set mic key */ - _rtw_memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8); - _rtw_memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8); + memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8); + memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8); psecuritypriv->busetkipkey = _TRUE; } else if (strcmp(param->u.crypt.alg, "CCMP") == 0) { RTW_INFO(FUNC_ADPT_FMT" set CCMP TX GTK idx:%u, len:%u\n" , FUNC_ADPT_ARG(padapter), param->u.crypt.idx, param->u.crypt.key_len); psecuritypriv->dot118021XGrpPrivacy = _AES_; - _rtw_memcpy(psecuritypriv->dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); + memcpy(psecuritypriv->dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); #ifdef CONFIG_IEEE80211W } else if (strcmp(param->u.crypt.alg, "BIP") == 0) { RTW_INFO(FUNC_ADPT_FMT" set TX IGTK idx:%u, len:%u\n" , FUNC_ADPT_ARG(padapter), param->u.crypt.idx, param->u.crypt.key_len); - _rtw_memcpy(padapter->securitypriv.dot11wBIPKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); + memcpy(padapter->securitypriv.dot11wBIPKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); padapter->securitypriv.dot11wBIPKeyid = param->u.crypt.idx; psecuritypriv->dot11wBIPtxpn.val = RTW_GET_LE64(param->u.crypt.seq); padapter->securitypriv.binstallBIPkey = _TRUE; @@ -1401,7 +1401,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa if (psecuritypriv->dot11AuthAlgrthm == dot11AuthAlgrthm_8021X && psta) { /* psk/802_1x */ if (param->u.crypt.set_tx == 1) { /* pairwise key */ - _rtw_memcpy(psta->dot118021x_UncstKey.skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); + memcpy(psta->dot118021x_UncstKey.skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); if (strcmp(param->u.crypt.alg, "WEP") == 0) { RTW_INFO(FUNC_ADPT_FMT" set WEP PTK of "MAC_FMT" idx:%u, len:%u\n" @@ -1417,8 +1417,8 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa , param->u.crypt.idx, param->u.crypt.key_len); psta->dot118021XPrivacy = _TKIP_; /* set mic key */ - _rtw_memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8); - _rtw_memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8); + memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8); + memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8); psecuritypriv->busetkipkey = _TRUE; } else if (strcmp(param->u.crypt.alg, "CCMP") == 0) { @@ -1459,7 +1459,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa , FUNC_ADPT_ARG(padapter), MAC_ARG(psta->cmn.mac_addr) , param->u.crypt.idx, param->u.crypt.key_len); psta->group_privacy = _AES_; - _rtw_memcpy(psta->gtk.skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); + memcpy(psta->gtk.skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); psta->gtk_bmp |= BIT(param->u.crypt.idx); psta->gtk_pn.val = RTW_GET_LE64(param->u.crypt.seq); @@ -1468,7 +1468,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa RTW_INFO(FUNC_ADPT_FMT" set IGTK of "MAC_FMT", idx:%u, len:%u\n" , FUNC_ADPT_ARG(padapter), MAC_ARG(psta->cmn.mac_addr) , param->u.crypt.idx, param->u.crypt.key_len); - _rtw_memcpy(psta->igtk.skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); + memcpy(psta->igtk.skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); psta->igtk_bmp |= BIT(param->u.crypt.idx); psta->igtk_id = param->u.crypt.idx; psta->igtk_pn.val = RTW_GET_LE64(param->u.crypt.seq); @@ -1565,7 +1565,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param psecuritypriv->dot11PrivacyKeyIndex = wep_key_idx; } - _rtw_memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), param->u.crypt.key, wep_key_len); + memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), param->u.crypt.key, wep_key_len); psecuritypriv->dot11DefKeylen[wep_key_idx] = wep_key_len; @@ -1602,10 +1602,10 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param if (param->u.crypt.set_tx == 1) { /* pairwise key */ RTW_INFO(FUNC_ADPT_FMT" set %s PTK idx:%u, len:%u\n" , FUNC_ADPT_ARG(padapter), param->u.crypt.alg, param->u.crypt.idx, param->u.crypt.key_len); - _rtw_memcpy(psta->dot118021x_UncstKey.skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); + memcpy(psta->dot118021x_UncstKey.skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); if (strcmp(param->u.crypt.alg, "TKIP") == 0) { /* set mic key */ - _rtw_memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8); - _rtw_memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8); + memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8); + memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8); padapter->securitypriv.busetkipkey = _FALSE; } psta->dot11txpn.val = RTW_GET_LE64(param->u.crypt.seq); @@ -1620,13 +1620,13 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param if (strcmp(param->u.crypt.alg, "TKIP") == 0 || strcmp(param->u.crypt.alg, "CCMP") == 0) { RTW_INFO(FUNC_ADPT_FMT" set %s GTK idx:%u, len:%u\n" , FUNC_ADPT_ARG(padapter), param->u.crypt.alg, param->u.crypt.idx, param->u.crypt.key_len); - _rtw_memcpy(padapter->securitypriv.dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key, + memcpy(padapter->securitypriv.dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); - _rtw_memcpy(padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8); - _rtw_memcpy(padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8); + memcpy(padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8); + memcpy(padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8); padapter->securitypriv.binstallGrpkey = _TRUE; if (param->u.crypt.idx < 4) - _rtw_memcpy(padapter->securitypriv.iv_seq[param->u.crypt.idx], param->u.crypt.seq, 8); + memcpy(padapter->securitypriv.iv_seq[param->u.crypt.idx], param->u.crypt.seq, 8); padapter->securitypriv.dot118021XGrpKeyid = param->u.crypt.idx; rtw_set_key(padapter, &padapter->securitypriv, param->u.crypt.idx, 1, _TRUE); @@ -1634,7 +1634,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param } else if (strcmp(param->u.crypt.alg, "BIP") == 0) { RTW_INFO(FUNC_ADPT_FMT" set IGTK idx:%u, len:%u\n" , FUNC_ADPT_ARG(padapter), param->u.crypt.idx, param->u.crypt.key_len); - _rtw_memcpy(padapter->securitypriv.dot11wBIPKey[param->u.crypt.idx].skey, param->u.crypt.key, + memcpy(padapter->securitypriv.dot11wBIPKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); psecuritypriv->dot11wBIPKeyid = param->u.crypt.idx; psecuritypriv->dot11wBIPrxpn.val = RTW_GET_LE64(param->u.crypt.seq); @@ -1755,7 +1755,7 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev ret = -ENOTSUPP; goto addkey_end; } - _rtw_memcpy((void *)param->sta_addr, (void *)mac_addr, ETH_ALEN); + memcpy((void *)param->sta_addr, (void *)mac_addr, ETH_ALEN); } else RTW_INFO("mac_addr is null\n"); RTW_INFO("rtw_wx_set_enc_ext: SMS4 case\n"); @@ -1783,14 +1783,14 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev param->u.crypt.idx = key_index; if (params->seq_len && params->seq) { - _rtw_memcpy(param->u.crypt.seq, (u8 *)params->seq, params->seq_len); + memcpy(param->u.crypt.seq, (u8 *)params->seq, params->seq_len); RTW_INFO(FUNC_NDEV_FMT" seq_len:%u, seq:0x%llx\n", FUNC_NDEV_ARG(ndev) , params->seq_len, RTW_GET_LE64(param->u.crypt.seq)); } if (params->key_len && params->key) { param->u.crypt.key_len = params->key_len; - _rtw_memcpy(param->u.crypt.key, (u8 *)params->key, params->key_len); + memcpy(param->u.crypt.key, (u8 *)params->key, params->key_len); } if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE) { @@ -1798,7 +1798,7 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev if (rtw_tdls_is_driver_setup(padapter) == _FALSE && mac_addr) { ptdls_sta = rtw_get_stainfo(&padapter->stapriv, (void *)mac_addr); if (ptdls_sta != NULL && ptdls_sta->tdls_sta_state) { - _rtw_memcpy(ptdls_sta->tpk.tk, params->key, params->key_len); + memcpy(ptdls_sta->tpk.tk, params->key, params->key_len); rtw_tdls_set_key(padapter, ptdls_sta); goto addkey_end; } @@ -1808,7 +1808,7 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev } else if (MLME_IS_AP(padapter) || MLME_IS_MESH(padapter)) { #ifdef CONFIG_AP_MODE if (mac_addr) - _rtw_memcpy(param->sta_addr, (void *)mac_addr, ETH_ALEN); + memcpy(param->sta_addr, (void *)mac_addr, ETH_ALEN); ret = rtw_cfg80211_ap_set_encryption(ndev, param); #endif @@ -2096,15 +2096,15 @@ static int cfg80211_rtw_set_rekey_data(struct wiphy *wiphy, return -1; } - _rtw_memcpy(psta->kek, data->kek, NL80211_KEK_LEN); + memcpy(psta->kek, data->kek, NL80211_KEK_LEN); /*printk("\ncfg80211_rtw_set_rekey_data KEK:"); for(i=0;ikek[i]);*/ - _rtw_memcpy(psta->kck, data->kck, NL80211_KCK_LEN); + memcpy(psta->kck, data->kck, NL80211_KCK_LEN); /*printk("\ncfg80211_rtw_set_rekey_data KCK:"); for(i=0;ikck[i]);*/ - _rtw_memcpy(psta->replay_ctr, data->replay_ctr, NL80211_REPLAY_CTR_LEN); + memcpy(psta->replay_ctr, data->replay_ctr, NL80211_REPLAY_CTR_LEN); psecuritypriv->binstallKCK_KEK = _TRUE; /*printk("\nREPLAY_CTR: "); for(i=0;issids, sizeof(struct cfg80211_ssid)); + memcpy(target_ssid, scan_req->ssids, sizeof(struct cfg80211_ssid)); ret = 1; exit: @@ -2709,7 +2709,7 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(_adapter *padapter, char *buf, in return -EINVAL; } - _rtw_memcpy(pmlmepriv->wps_probe_req_ie, wps_ie, wps_ielen); + memcpy(pmlmepriv->wps_probe_req_ie, wps_ie, wps_ielen); pmlmepriv->wps_probe_req_ie_len = wps_ielen; } @@ -2740,7 +2740,7 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(_adapter *padapter, char *buf, in return -EINVAL; } - _rtw_memcpy(pmlmepriv->p2p_probe_req_ie, p2p_ie, p2p_ielen); + memcpy(pmlmepriv->p2p_probe_req_ie, p2p_ie, p2p_ielen); pmlmepriv->p2p_probe_req_ie_len = p2p_ielen; if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_LISTEN_CH, (u8 *)listen_ch_attr, (uint *) &attr_contentlen) @@ -3168,7 +3168,7 @@ bypass_p2p_chk: #ifdef CONFIG_DEBUG_CFG80211 RTW_INFO("ssid=%s, len=%d\n", ssids[i].ssid, ssids[i].ssid_len); #endif - _rtw_memcpy(&parm.ssid[i].Ssid, ssids[i].ssid, ssids[i].ssid_len); + memcpy(&parm.ssid[i].Ssid, ssids[i].ssid, ssids[i].ssid_len); parm.ssid[i].SsidLength = ssids[i].ssid_len; } parm.ssid_num = i; @@ -3185,12 +3185,12 @@ bypass_p2p_chk: if (request->n_channels == 1) { for (i = 1; i < survey_times_for_one_ch; i++) - _rtw_memcpy(&parm.ch[i], &parm.ch[0], sizeof(struct rtw_ieee80211_channel)); + memcpy(&parm.ch[i], &parm.ch[0], sizeof(struct rtw_ieee80211_channel)); parm.ch_num = survey_times_for_one_ch; } else if (request->n_channels <= 4) { for (j = request->n_channels - 1; j >= 0; j--) for (i = 0; i < survey_times; i++) - _rtw_memcpy(&parm.ch[j * survey_times + i], &parm.ch[j], sizeof(struct rtw_ieee80211_channel)); + memcpy(&parm.ch[j * survey_times + i], &parm.ch[j], sizeof(struct rtw_ieee80211_channel)); parm.ch_num = survey_times * request->n_channels; } @@ -3480,7 +3480,7 @@ static int rtw_cfg80211_set_wpa_ie(_adapter *padapter, u8 *pie, size_t ielen) goto exit; } - _rtw_memcpy(buf, pie , ielen); + memcpy(buf, pie , ielen); RTW_INFO("set wpa_ie(length:%zu):\n", ielen); RTW_INFO_DUMP(NULL, buf, ielen); @@ -3496,7 +3496,7 @@ static int rtw_cfg80211_set_wpa_ie(_adapter *padapter, u8 *pie, size_t ielen) if (rtw_parse_wpa_ie(pwpa, wpa_ielen + 2, &group_cipher, &pairwise_cipher, NULL) == _SUCCESS) { padapter->securitypriv.dot11AuthAlgrthm = dot11AuthAlgrthm_8021X; padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeWPAPSK; - _rtw_memcpy(padapter->securitypriv.supplicant_ie, &pwpa[0], wpa_ielen + 2); + memcpy(padapter->securitypriv.supplicant_ie, &pwpa[0], wpa_ielen + 2); RTW_INFO("got wpa_ie, wpa_ielen:%u\n", wpa_ielen); } @@ -3507,7 +3507,7 @@ static int rtw_cfg80211_set_wpa_ie(_adapter *padapter, u8 *pie, size_t ielen) if (rtw_parse_wpa2_ie(pwpa2, wpa2_ielen + 2, &group_cipher, &pairwise_cipher, NULL, &mfp_opt) == _SUCCESS) { padapter->securitypriv.dot11AuthAlgrthm = dot11AuthAlgrthm_8021X; padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeWPA2PSK; - _rtw_memcpy(padapter->securitypriv.supplicant_ie, &pwpa2[0], wpa2_ielen + 2); + memcpy(padapter->securitypriv.supplicant_ie, &pwpa2[0], wpa2_ielen + 2); RTW_INFO("got wpa2_ie, wpa2_ielen:%u\n", wpa2_ielen); } @@ -3579,7 +3579,7 @@ static int rtw_cfg80211_set_wpa_ie(_adapter *padapter, u8 *pie, size_t ielen) if (wps_ie && wps_ielen > 0) { RTW_INFO("got wps_ie, wps_ielen:%u\n", wps_ielen); padapter->securitypriv.wps_ie_len = wps_ielen < MAX_WPS_IE_LEN ? wps_ielen : MAX_WPS_IE_LEN; - _rtw_memcpy(padapter->securitypriv.wps_ie, wps_ie, padapter->securitypriv.wps_ie_len); + memcpy(padapter->securitypriv.wps_ie, wps_ie, padapter->securitypriv.wps_ie_len); set_fwstate(&padapter->mlmepriv, WIFI_UNDER_WPS); } else _clr_fwstate_(&padapter->mlmepriv, WIFI_UNDER_WPS); @@ -3609,7 +3609,7 @@ static int rtw_cfg80211_set_wpa_ie(_adapter *padapter, u8 *pie, size_t ielen) RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __FUNCTION__, __LINE__); goto exit; } - _rtw_memcpy(pmlmepriv->p2p_assoc_req_ie, p2p_ie, p2p_ielen); + memcpy(pmlmepriv->p2p_assoc_req_ie, p2p_ie, p2p_ielen); pmlmepriv->p2p_assoc_req_ie_len = p2p_ielen; } } @@ -3699,7 +3699,7 @@ static int cfg80211_rtw_join_ibss(struct wiphy *wiphy, struct net_device *ndev, memset(&ndis_ssid, 0, sizeof(NDIS_802_11_SSID)); ndis_ssid.SsidLength = params->ssid_len; - _rtw_memcpy(ndis_ssid.Ssid, (u8 *)params->ssid, params->ssid_len); + memcpy(ndis_ssid.Ssid, (u8 *)params->ssid, params->ssid_len); /* RTW_INFO("ssid=%s, len=%zu\n", ndis_ssid.Ssid, params->ssid_len); */ @@ -3930,7 +3930,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev, memset(&ndis_ssid, 0, sizeof(NDIS_802_11_SSID)); ndis_ssid.SsidLength = sme->ssid_len; - _rtw_memcpy(ndis_ssid.Ssid, (u8 *)sme->ssid, sme->ssid_len); + memcpy(ndis_ssid.Ssid, (u8 *)sme->ssid, sme->ssid_len); RTW_INFO("ssid=%s, len=%zu\n", ndis_ssid.Ssid, sme->ssid_len); @@ -4027,7 +4027,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev, pwep->KeyIndex = wep_key_idx; pwep->KeyIndex |= 0x80000000; - _rtw_memcpy(pwep->KeyMaterial, (void *)sme->key, pwep->KeyLength); + memcpy(pwep->KeyMaterial, (void *)sme->key, pwep->KeyLength); if (rtw_set_802_11_add_wep(padapter, pwep) == (u8)_FAIL) ret = -EOPNOTSUPP ; @@ -4082,7 +4082,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev, pwdev_priv->connect_req = (struct cfg80211_connect_params *)rtw_malloc(sizeof(*pwdev_priv->connect_req)); if (pwdev_priv->connect_req) - _rtw_memcpy(pwdev_priv->connect_req, sme, sizeof(*pwdev_priv->connect_req)); + memcpy(pwdev_priv->connect_req, sme, sizeof(*pwdev_priv->connect_req)); else RTW_WARN(FUNC_NDEV_FMT" alloc connect_req fail\n", FUNC_NDEV_ARG(ndev)); @@ -4225,7 +4225,7 @@ static void _rtw_set_pmksa(struct net_device *ndev, /* BSSID is matched, the same AP => rewrite with new PMKID. */ RTW_INFO("BSSID("MAC_FMT") exists in the PMKList.\n", MAC_ARG(bssid)); - _rtw_memcpy(psecuritypriv->PMKIDList[index].PMKID, pmkid, WLAN_PMKID_LEN); + memcpy(psecuritypriv->PMKIDList[index].PMKID, pmkid, WLAN_PMKID_LEN); psecuritypriv->PMKIDList[index].bUsed = _TRUE; psecuritypriv->PMKIDIndex = index + 1; blInserted = _TRUE; @@ -4238,8 +4238,8 @@ static void _rtw_set_pmksa(struct net_device *ndev, RTW_INFO("Use the new entry index = %d for this PMKID.\n", psecuritypriv->PMKIDIndex); - _rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, bssid, ETH_ALEN); - _rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pmkid, WLAN_PMKID_LEN); + memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, bssid, ETH_ALEN); + memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pmkid, WLAN_PMKID_LEN); psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = _TRUE; psecuritypriv->PMKIDIndex++ ; @@ -4410,9 +4410,9 @@ void rtw_cfg80211_indicate_sta_disassoc(_adapter *padapter, const u8 *da, unsign fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, da, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr1, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr2, da, ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -4582,7 +4582,7 @@ dump: pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; - _rtw_memcpy(pframe, (void *)buf, len); + memcpy(pframe, (void *)buf, len); pattrib->pktlen = len; #ifdef CONFIG_P2P @@ -4702,7 +4702,7 @@ static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name, struct ne goto out; *ndev = pwdev_priv->pmon_ndev = mon_ndev; - _rtw_memcpy(pwdev_priv->ifname_mon, name, IFNAMSIZ + 1); + memcpy(pwdev_priv->ifname_mon, name, IFNAMSIZ + 1); out: if (ret && mon_wdev) { @@ -4902,14 +4902,14 @@ static int rtw_add_beacon(_adapter *adapter, const u8 *head, size_t head_len, co return -ENOMEM; - /* _rtw_memcpy(&pstapriv->max_num_sta, param->u.bcn_ie.reserved, 2); */ + /* memcpy(&pstapriv->max_num_sta, param->u.bcn_ie.reserved, 2); */ /* if((pstapriv->max_num_sta>NUM_STA) || (pstapriv->max_num_sta<=0)) */ /* pstapriv->max_num_sta = NUM_STA; */ - _rtw_memcpy(pbuf, (void *)head + 24, head_len - 24); /* 24=beacon header len. */ - _rtw_memcpy(pbuf + head_len - 24, (void *)tail, tail_len); + memcpy(pbuf, (void *)head + 24, head_len - 24); /* 24=beacon header len. */ + memcpy(pbuf + head_len - 24, (void *)tail, tail_len); len = head_len + tail_len - 24; @@ -5050,9 +5050,9 @@ static int cfg80211_rtw_start_ap(struct wiphy *wiphy, struct net_device *ndev, settings->ssid, settings->ssid_len, pbss_network->Ssid.Ssid, pbss_network->Ssid.SsidLength); - _rtw_memcpy(pbss_network->Ssid.Ssid, (void *)settings->ssid, settings->ssid_len); + memcpy(pbss_network->Ssid.Ssid, (void *)settings->ssid, settings->ssid_len); pbss_network->Ssid.SsidLength = settings->ssid_len; - _rtw_memcpy(pbss_network_ext->Ssid.Ssid, (void *)settings->ssid, settings->ssid_len); + memcpy(pbss_network_ext->Ssid.Ssid, (void *)settings->ssid, settings->ssid_len); pbss_network_ext->Ssid.SsidLength = settings->ssid_len; if (0) @@ -5695,7 +5695,7 @@ release_plink_ctl: u8 sta_addr[ETH_ALEN]; u8 updated = _FALSE; - _rtw_memcpy(sta_addr, del_sta->cmn.mac_addr, ETH_ALEN); + memcpy(sta_addr, del_sta->cmn.mac_addr, ETH_ALEN); updated = ap_free_sta(adapter, del_sta, 0, 0, 1); rtw_mesh_expire_peer(stapriv->padapter, sta_addr); @@ -5774,10 +5774,10 @@ static int cfg80211_rtw_dump_station(struct wiphy *wiphy, struct net_device *nde } if (psta) - _rtw_memcpy(mac, psta->cmn.mac_addr, ETH_ALEN); + memcpy(mac, psta->cmn.mac_addr, ETH_ALEN); #ifdef CONFIG_RTW_MESH else - _rtw_memcpy(mac, plink->addr, ETH_ALEN); + memcpy(mac, plink->addr, ETH_ALEN); #endif sinfo->filled = 0; @@ -6313,8 +6313,8 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf, RTW_INFO("[%s] In\n", __FUNCTION__); /* prepare for building provision_request frame */ - _rtw_memcpy(pwdinfo->tx_prov_disc_info.peerIFAddr, GetAddr1Ptr(buf), ETH_ALEN); - _rtw_memcpy(pwdinfo->tx_prov_disc_info.peerDevAddr, GetAddr1Ptr(buf), ETH_ALEN); + memcpy(pwdinfo->tx_prov_disc_info.peerIFAddr, GetAddr1Ptr(buf), ETH_ALEN); + memcpy(pwdinfo->tx_prov_disc_info.peerDevAddr, GetAddr1Ptr(buf), ETH_ALEN); pwdinfo->tx_prov_disc_info.wps_config_method_request = WPS_CM_PUSH_BUTTON; @@ -6374,9 +6374,9 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf, fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, pwdinfo->tx_prov_disc_info.peerDevAddr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, pwdinfo->tx_prov_disc_info.peerDevAddr, ETH_ALEN); + memcpy(pwlanhdr->addr1, pwdinfo->tx_prov_disc_info.peerDevAddr, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, pwdinfo->tx_prov_disc_info.peerDevAddr, ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -6418,7 +6418,7 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf, /* Value: */ /* Device Capability Bitmap, 1 byte */ /* Group Capability Bitmap, 1 byte */ - _rtw_memcpy(p2p_ie + p2pielen, &capability, 2); + memcpy(p2p_ie + p2pielen, &capability, 2); p2pielen += 2; @@ -6434,7 +6434,7 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf, p2pielen += 2; /* Value: */ - _rtw_memcpy(p2p_ie + p2pielen, devinfo_content, devinfo_contentlen); + memcpy(p2p_ie + p2pielen, devinfo_content, devinfo_contentlen); p2pielen += devinfo_contentlen; @@ -6520,7 +6520,7 @@ static s32 cfg80211_rtw_update_ft_ies(struct wiphy *wiphy, p = (u8 *)ftie->ie; if (ftie->ie_len <= sizeof(pft_roam->updated_ft_ies)) { _enter_critical_bh(&pmlmepriv->lock, &irqL); - _rtw_memcpy(pft_roam->updated_ft_ies, ftie->ie, ftie->ie_len); + memcpy(pft_roam->updated_ft_ies, ftie->ie, ftie->ie_len); pft_roam->updated_ft_ies_len = ftie->ie_len; _exit_critical_bh(&pmlmepriv->lock, &irqL); } else { @@ -6560,9 +6560,9 @@ void rtw_cfg80211_external_auth_request(_adapter *padapter, union recv_frame *rf #if (KERNEL_VERSION(4, 17, 0) <= LINUX_VERSION_CODE) params.action = EXTERNAL_AUTH_START; - _rtw_memcpy(params.bssid, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); + memcpy(params.bssid, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); params.ssid.ssid_len = pmlmeinfo->network.Ssid.SsidLength; - _rtw_memcpy(params.ssid.ssid, pmlmeinfo->network.Ssid.Ssid, + memcpy(params.ssid.ssid, pmlmeinfo->network.Ssid.Ssid, pmlmeinfo->network.Ssid.SsidLength); params.key_mgmt_suite = 0x8ac0f00; @@ -6571,14 +6571,14 @@ void rtw_cfg80211_external_auth_request(_adapter *padapter, union recv_frame *rf #elif (KERNEL_VERSION(2, 6, 37) <= LINUX_VERSION_CODE) set_frame_sub_type(frame, WIFI_AUTH); - _rtw_memcpy(frame + 4, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); - _rtw_memcpy(frame + 10, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(frame + 16, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); + memcpy(frame + 4, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); + memcpy(frame + 10, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(frame + 16, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); RTW_PUT_LE32((frame + 18), 0x8ac0f00); if (pmlmeinfo->network.Ssid.SsidLength) { *(frame + 23) = pmlmeinfo->network.Ssid.SsidLength; - _rtw_memcpy(frame + 24, pmlmeinfo->network.Ssid.Ssid, + memcpy(frame + 24, pmlmeinfo->network.Ssid.Ssid, pmlmeinfo->network.Ssid.SsidLength); frame_len = 24 + pmlmeinfo->network.Ssid.SsidLength; } @@ -6746,7 +6746,7 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, pcfg80211_wdinfo->ro_ch_wdev = wdev; pcfg80211_wdinfo->remain_on_ch_cookie = *cookie; rtw_cfg80211_set_last_ro_ch_time(padapter); - _rtw_memcpy(&pcfg80211_wdinfo->remain_on_ch_channel, channel, sizeof(struct ieee80211_channel)); + memcpy(&pcfg80211_wdinfo->remain_on_ch_channel, channel, sizeof(struct ieee80211_channel)); #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)) pcfg80211_wdinfo->remain_on_ch_type = channel_type; #endif @@ -6890,7 +6890,7 @@ int rtw_pd_iface_alloc(struct wiphy *wiphy, const char *name, struct wireless_de wdev->wiphy = wiphy; wdev->iftype = NL80211_IFTYPE_P2P_DEVICE; - _rtw_memcpy(wdev->address, adapter_mac_addr(primary_adpt), ETH_ALEN); + memcpy(wdev->address, adapter_mac_addr(primary_adpt), ETH_ALEN); wiphy_data->pd_wdev = wdev; *pd_wdev = wdev; @@ -7102,7 +7102,7 @@ issue_mgmt_frame: pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; - _rtw_memcpy(pframe, (void *)buf, len); + memcpy(pframe, (void *)buf, len); pattrib->pktlen = len; pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; @@ -7592,7 +7592,7 @@ static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, } memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt)); - _rtw_memcpy(txmgmt.peer, peer, ETH_ALEN); + memcpy(txmgmt.peer, peer, ETH_ALEN); txmgmt.action_code = action_code; txmgmt.dialog_token = dialog_token; txmgmt.status_code = status_code; @@ -7602,7 +7602,7 @@ static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, ret = -ENOMEM; goto bad; } - _rtw_memcpy(txmgmt.buf, (void *)buf, txmgmt.len); + memcpy(txmgmt.buf, (void *)buf, txmgmt.len); /* Debug purpose */ #if 1 @@ -7679,7 +7679,7 @@ static int cfg80211_rtw_tdls_oper(struct wiphy *wiphy, memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt)); if (peer) - _rtw_memcpy(txmgmt.peer, peer, ETH_ALEN); + memcpy(txmgmt.peer, peer, ETH_ALEN); if (rtw_tdls_is_driver_setup(padapter)) { /* these two cases are done by driver itself */ @@ -7926,7 +7926,7 @@ void dump_mesh_config(void *sel, const struct mesh_config *conf) static void rtw_cfg80211_mesh_info_set_profile(struct rtw_mesh_info *minfo, const struct mesh_setup *setup) { - _rtw_memcpy(minfo->mesh_id, setup->mesh_id, setup->mesh_id_len); + memcpy(minfo->mesh_id, setup->mesh_id, setup->mesh_id_len); minfo->mesh_id_len = setup->mesh_id_len; minfo->mesh_pp_id = setup->path_sel_proto; minfo->mesh_pm_id = setup->path_metric; @@ -8207,12 +8207,12 @@ u8 *rtw_cfg80211_construct_mesh_beacon_ies(struct wiphy *wiphy, _adapter *adapte memset(ht_cap, 0, HT_CAP_IE_LEN); memset(ht_op, 0, HT_OP_IE_LEN); - /* WLAN_EID_HT_CAP */ + /* WLAN_EID_HT_CAPABILITY */ RTW_PUT_LE16(HT_CAP_ELE_CAP_INFO(ht_cap), sta_ht_cap->cap); SET_HT_CAP_ELE_MAX_AMPDU_LEN_EXP(ht_cap, sta_ht_cap->ampdu_factor); SET_HT_CAP_ELE_MIN_MPDU_S_SPACE(ht_cap, sta_ht_cap->ampdu_density); - _rtw_memcpy(HT_CAP_ELE_SUP_MCS_SET(ht_cap), &sta_ht_cap->mcs, 16); - c = rtw_set_ie(c, WLAN_EID_HT_CAP, HT_CAP_IE_LEN, ht_cap, NULL); + memcpy(HT_CAP_ELE_SUP_MCS_SET(ht_cap), &sta_ht_cap->mcs, 16); + c = rtw_set_ie(c, WLAN_EID_HT_CAPABILITY, HT_CAP_IE_LEN, ht_cap, NULL); /* WLAN_EID_HT_OPERATION */ SET_HT_OP_ELE_PRI_CHL(ht_op, ch); @@ -8246,8 +8246,8 @@ u8 *rtw_cfg80211_construct_mesh_beacon_ies(struct wiphy *wiphy, _adapter *adapte memset(vht_op, 0, VHT_OP_IE_LEN); /* WLAN_EID_VHT_CAPABILITY */ - _rtw_memcpy(vht_cap, &sta_vht_cap->cap, 4); - _rtw_memcpy(vht_cap + 4, &sta_vht_cap->vht_mcs, 8); + memcpy(vht_cap, &sta_vht_cap->cap, 4); + memcpy(vht_cap + 4, &sta_vht_cap->vht_mcs, 8); c = rtw_set_ie(c, WLAN_EID_VHT_CAPABILITY, VHT_CAP_IE_LEN, vht_cap, NULL); /* WLAN_EID_VHT_OPERATION */ @@ -8577,7 +8577,7 @@ static void rtw_cfg80211_mpath_set_pinfo(struct rtw_mesh_path *mpath, u8 *next_h struct sta_info *next_hop_sta = rtw_rcu_dereference(mpath->next_hop); if (next_hop_sta) - _rtw_memcpy(next_hop, next_hop_sta->cmn.mac_addr, ETH_ALEN); + memcpy(next_hop, next_hop_sta->cmn.mac_addr, ETH_ALEN); else memset(next_hop, 0, ETH_ALEN); @@ -8650,7 +8650,7 @@ static int cfg80211_rtw_dump_mpath(struct wiphy *wiphy, struct net_device *dev, goto exit; } - _rtw_memcpy(dst, mpath->dst, ETH_ALEN); + memcpy(dst, mpath->dst, ETH_ALEN); rtw_cfg80211_mpath_set_pinfo(mpath, next_hop, pinfo); exit: @@ -8662,7 +8662,7 @@ exit: #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) static void rtw_cfg80211_mpp_set_pinfo(struct rtw_mesh_path *mpath, u8 *mpp, struct mpath_info *pinfo) { - _rtw_memcpy(mpp, mpath->mpp, ETH_ALEN); + memcpy(mpp, mpath->mpp, ETH_ALEN); memset(pinfo, 0, sizeof(*pinfo)); pinfo->generation = mpath->adapter->mesh_info.mpp_paths_generation; @@ -8704,7 +8704,7 @@ static int cfg80211_rtw_dump_mpp(struct wiphy *wiphy, struct net_device *dev, in goto exit; } - _rtw_memcpy(dst, mpath->dst, ETH_ALEN); + memcpy(dst, mpath->dst, ETH_ALEN); rtw_cfg80211_mpp_set_pinfo(mpath, mpp, pinfo); exit: @@ -8821,7 +8821,7 @@ int cfg80211_rtw_resume(struct wiphy *wiphy) { rtw_init_sitesurvey_parm(padapter, &parm); for (i=0;ipnlo_info->ssid_num && i < RTW_SSID_SCAN_AMOUNT; i++) { len = pwrpriv->pno_ssid_list->node[i].SSID_len; - _rtw_memcpy(&parm.ssid[i].Ssid, pwrpriv->pno_ssid_list->node[i].SSID, len); + memcpy(&parm.ssid[i].Ssid, pwrpriv->pno_ssid_list->node[i].SSID, len); parm.ssid[i].SsidLength = len; } parm.ssid_num = pwrpriv->pnlo_info->ssid_num; @@ -8886,7 +8886,7 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *ndev, char *buf, } - _rtw_memcpy(pmlmepriv->wps_beacon_ie, wps_ie, wps_ielen); + memcpy(pmlmepriv->wps_beacon_ie, wps_ie, wps_ielen); pmlmepriv->wps_beacon_ie_len = wps_ielen; update_beacon(padapter, _VENDOR_SPECIFIC_IE_, wps_oui, _TRUE); @@ -8917,7 +8917,7 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *ndev, char *buf, } - _rtw_memcpy(pmlmepriv->p2p_beacon_ie, p2p_ie, p2p_ielen); + memcpy(pmlmepriv->p2p_beacon_ie, p2p_ie, p2p_ielen); pmlmepriv->p2p_beacon_ie_len = p2p_ielen; } @@ -9017,7 +9017,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu #endif } - _rtw_memcpy(pmlmepriv->wps_probe_resp_ie, wps_ie, wps_ielen); + memcpy(pmlmepriv->wps_probe_resp_ie, wps_ie, wps_ielen); pmlmepriv->wps_probe_resp_ie_len = wps_ielen; } @@ -9064,7 +9064,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu return -EINVAL; } - _rtw_memcpy(pmlmepriv->p2p_probe_resp_ie, p2p_ie, p2p_ielen); + memcpy(pmlmepriv->p2p_probe_resp_ie, p2p_ie, p2p_ielen); pmlmepriv->p2p_probe_resp_ie_len = p2p_ielen; } else { if (pmlmepriv->p2p_go_probe_resp_ie) { @@ -9080,7 +9080,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu return -EINVAL; } - _rtw_memcpy(pmlmepriv->p2p_go_probe_resp_ie, p2p_ie, p2p_ielen); + memcpy(pmlmepriv->p2p_go_probe_resp_ie, p2p_ie, p2p_ielen); pmlmepriv->p2p_go_probe_resp_ie_len = p2p_ielen; } @@ -9134,7 +9134,7 @@ static int rtw_cfg80211_set_assoc_resp_wpsp2pie(struct net_device *net, char *bu RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __FUNCTION__, __LINE__); return -EINVAL; } - _rtw_memcpy(pmlmepriv->wps_assoc_resp_ie, ie, ie_len); + memcpy(pmlmepriv->wps_assoc_resp_ie, ie, ie_len); pmlmepriv->wps_assoc_resp_ie_len = ie_len; } @@ -9153,7 +9153,7 @@ static int rtw_cfg80211_set_assoc_resp_wpsp2pie(struct net_device *net, char *bu RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __FUNCTION__, __LINE__); return -EINVAL; } - _rtw_memcpy(pmlmepriv->p2p_assoc_resp_ie, ie, ie_len); + memcpy(pmlmepriv->p2p_assoc_resp_ie, ie, ie_len); pmlmepriv->p2p_assoc_resp_ie_len = ie_len; } @@ -9332,8 +9332,8 @@ static void rtw_cfg80211_init_vht_capab(_adapter *padapter sta_vht_cap->vht_supported = 1; - _rtw_memcpy(&sta_vht_cap->cap, vht_cap_ie + 2, 4); - _rtw_memcpy(&sta_vht_cap->vht_mcs, vht_cap_ie + 2 + 4, 8); + memcpy(&sta_vht_cap->cap, vht_cap_ie + 2, 4); + memcpy(&sta_vht_cap->vht_mcs, vht_cap_ie + 2 + 4, 8); } #endif /* defined(CONFIG_80211AC_VHT) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) */ @@ -9380,7 +9380,7 @@ void rtw_cfg80211_init_wiphy(_adapter *padapter) #endif /* copy mac_addr to wiphy */ - _rtw_memcpy(wiphy->perm_addr, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(wiphy->perm_addr, adapter_mac_addr(padapter), ETH_ALEN); } @@ -9800,7 +9800,7 @@ void rtw_cfg80211_external_auth_status(struct wiphy *wiphy, struct net_device *d if ((psta->auth_len != 0) && (psta->pauth_frame != NULL)) { buf = rtw_zmalloc(psta->auth_len); if (buf) { - _rtw_memcpy(buf, psta->pauth_frame, psta->auth_len); + memcpy(buf, psta->pauth_frame, psta->auth_len); len = psta->auth_len; } diff --git a/os_dep/linux/ioctl_linux.c b/os_dep/linux/ioctl_linux.c index 1ed6bcc..04b23a9 100644 --- a/os_dep/linux/ioctl_linux.c +++ b/os_dep/linux/ioctl_linux.c @@ -79,7 +79,7 @@ static void indicate_wx_custom_event(_adapter *padapter, char *msg) if (!buff) return; - _rtw_memcpy(buff, msg, strlen(msg)); + memcpy(buff, msg, strlen(msg)); memset(&wrqu, 0, sizeof(wrqu)); wrqu.data.length = strlen(msg); @@ -143,9 +143,9 @@ void rtw_indicate_wx_assoc_event(_adapter *padapter) wrqu.ap_addr.sa_family = ARPHRD_ETHER; if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE) - _rtw_memcpy(wrqu.ap_addr.sa_data, pnetwork->MacAddress, ETH_ALEN); + memcpy(wrqu.ap_addr.sa_data, pnetwork->MacAddress, ETH_ALEN); else - _rtw_memcpy(wrqu.ap_addr.sa_data, pmlmepriv->cur_network.network.MacAddress, ETH_ALEN); + memcpy(wrqu.ap_addr.sa_data, pmlmepriv->cur_network.network.MacAddress, ETH_ALEN); RTW_PRINT("assoc success\n"); #ifndef CONFIG_IOCTL_CFG80211 @@ -281,7 +281,7 @@ static inline char *iwe_stream_mac_addr_proess(_adapter *padapter, iwe->cmd = SIOCGIWAP; iwe->u.ap_addr.sa_family = ARPHRD_ETHER; - _rtw_memcpy(iwe->u.ap_addr.sa_data, pnetwork->network.MacAddress, ETH_ALEN); + memcpy(iwe->u.ap_addr.sa_data, pnetwork->network.MacAddress, ETH_ALEN); start = iwe_stream_add_event(info, start, stop, iwe, IW_EV_ADDR_LEN); return start; } @@ -318,9 +318,9 @@ static inline char *iwe_stream_mode_process(_adapter *padapter, char *start, char *stop, struct iw_event *iwe, u16 cap) { /* Add mode */ - if (cap & (WLAN_CAPABILITY_IBSS | WLAN_CAPABILITY_BSS)) { + if (cap & (WLAN_CAPABILITY_IBSS | WLAN_CAPABILITY_ESS)) { iwe->cmd = SIOCGIWMODE; - if (cap & WLAN_CAPABILITY_BSS) + if (cap & WLAN_CAPABILITY_ESS) iwe->u.mode = IW_MODE_MASTER; else iwe->u.mode = IW_MODE_ADHOC; @@ -428,7 +428,7 @@ static inline char *iwe_stream_rate_process(_adapter *padapter, struct rtw_ieee80211_ht_cap *pht_capie; ht_cap = _TRUE; pht_capie = (struct rtw_ieee80211_ht_cap *)(p + 2); - _rtw_memcpy(&mcs_rate , pht_capie->supp_mcs_set, 2); + memcpy(&mcs_rate , pht_capie->supp_mcs_set, 2); bw_40MHz = (pht_capie->cap_info & IEEE80211_HT_CAP_SUP_WIDTH_20_40) ? 1 : 0; short_GI = (pht_capie->cap_info & (IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_40)) ? 1 : 0; } @@ -447,7 +447,7 @@ static inline char *iwe_stream_rate_process(_adapter *padapter, else short_GI = GET_VHT_CAPABILITY_ELE_SHORT_GI80M(p + 2); - _rtw_memcpy(mcs_map, GET_VHT_CAPABILITY_ELE_TX_MCS(p + 2), 2); + memcpy(mcs_map, GET_VHT_CAPABILITY_ELE_TX_MCS(p + 2), 2); vht_highest_rate = rtw_get_vht_highest_rate(mcs_map); vht_data_rate = rtw_vht_mcs_to_data_rate(CHANNEL_WIDTH_80, short_GI, vht_highest_rate); @@ -733,7 +733,7 @@ static char *translate_scan(_adapter *padapter, if (pnetwork->network.Reserved[0] == BSS_TYPE_PROB_REQ) /* Probe Request */ cap = 0; else { - _rtw_memcpy((u8 *)&cap, rtw_get_capability_from_ie(pnetwork->network.IEs), 2); + memcpy((u8 *)&cap, rtw_get_capability_from_ie(pnetwork->network.IEs), 2); cap = le16_to_cpu(cap); } @@ -865,7 +865,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, psecuritypriv->dot11PrivacyKeyIndex = wep_key_idx; } - _rtw_memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), param->u.crypt.key, wep_key_len); + memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), param->u.crypt.key, wep_key_len); psecuritypriv->dot11DefKeylen[wep_key_idx] = wep_key_len; @@ -895,10 +895,10 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, if (param->u.crypt.set_tx == 1) { /* pairwise key */ RTW_INFO(FUNC_ADPT_FMT" set %s PTK idx:%u, len:%u\n" , FUNC_ADPT_ARG(padapter), param->u.crypt.alg, param->u.crypt.idx, param->u.crypt.key_len); - _rtw_memcpy(psta->dot118021x_UncstKey.skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); + memcpy(psta->dot118021x_UncstKey.skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); if (strcmp(param->u.crypt.alg, "TKIP") == 0) { /* set mic key */ - _rtw_memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8); - _rtw_memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8); + memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8); + memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8); padapter->securitypriv.busetkipkey = _FALSE; } psta->dot11txpn.val = RTW_GET_LE64(param->u.crypt.seq); @@ -910,16 +910,16 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, if (strcmp(param->u.crypt.alg, "TKIP") == 0 || strcmp(param->u.crypt.alg, "CCMP") == 0) { RTW_INFO(FUNC_ADPT_FMT" set %s GTK idx:%u, len:%u\n" , FUNC_ADPT_ARG(padapter), param->u.crypt.alg, param->u.crypt.idx, param->u.crypt.key_len); - _rtw_memcpy(padapter->securitypriv.dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key, + memcpy(padapter->securitypriv.dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); /* only TKIP group key need to install this */ if (param->u.crypt.key_len > 16) { - _rtw_memcpy(padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8); - _rtw_memcpy(padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8); + memcpy(padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8); + memcpy(padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8); } padapter->securitypriv.binstallGrpkey = _TRUE; if (param->u.crypt.idx < 4) - _rtw_memcpy(padapter->securitypriv.iv_seq[param->u.crypt.idx], param->u.crypt.seq, 8); + memcpy(padapter->securitypriv.iv_seq[param->u.crypt.idx], param->u.crypt.seq, 8); padapter->securitypriv.dot118021XGrpKeyid = param->u.crypt.idx; rtw_set_key(padapter, &padapter->securitypriv, param->u.crypt.idx, 1, _TRUE); @@ -927,7 +927,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, } else if (strcmp(param->u.crypt.alg, "BIP") == 0) { RTW_INFO(FUNC_ADPT_FMT" set IGTK idx:%u, len:%u\n" , FUNC_ADPT_ARG(padapter), param->u.crypt.idx, param->u.crypt.key_len); - _rtw_memcpy(padapter->securitypriv.dot11wBIPKey[param->u.crypt.idx].skey, param->u.crypt.key, + memcpy(padapter->securitypriv.dot11wBIPKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); psecuritypriv->dot11wBIPKeyid = param->u.crypt.idx; psecuritypriv->dot11wBIPrxpn.val = RTW_GET_LE64(param->u.crypt.seq); @@ -999,7 +999,7 @@ static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen) goto exit; } - _rtw_memcpy(buf, pie , ielen); + memcpy(buf, pie , ielen); /* dump */ { @@ -1018,13 +1018,13 @@ static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen) if (rtw_parse_wpa_ie(buf, ielen, &group_cipher, &pairwise_cipher, NULL) == _SUCCESS) { padapter->securitypriv.dot11AuthAlgrthm = dot11AuthAlgrthm_8021X; padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeWPAPSK; - _rtw_memcpy(padapter->securitypriv.supplicant_ie, &buf[0], ielen); + memcpy(padapter->securitypriv.supplicant_ie, &buf[0], ielen); } if (rtw_parse_wpa2_ie(buf, ielen, &group_cipher, &pairwise_cipher, NULL, &mfp_opt) == _SUCCESS) { padapter->securitypriv.dot11AuthAlgrthm = dot11AuthAlgrthm_8021X; padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeWPA2PSK; - _rtw_memcpy(padapter->securitypriv.supplicant_ie, &buf[0], ielen); + memcpy(padapter->securitypriv.supplicant_ie, &buf[0], ielen); } if (group_cipher == 0) @@ -1098,7 +1098,7 @@ static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen) padapter->securitypriv.wps_ie_len = ((buf[cnt + 1] + 2) < MAX_WPS_IE_LEN) ? (buf[cnt + 1] + 2) : MAX_WPS_IE_LEN; - _rtw_memcpy(padapter->securitypriv.wps_ie, &buf[cnt], padapter->securitypriv.wps_ie_len); + memcpy(padapter->securitypriv.wps_ie, &buf[cnt], padapter->securitypriv.wps_ie_len); set_fwstate(&padapter->mlmepriv, WIFI_UNDER_WPS); @@ -1422,7 +1422,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev, If cmd is IW_PMKSA_REMOVE, it means the wpa_supplicant wants to remove a PMKID / BSSID from driver. #endif - _rtw_memcpy(strIssueBssid, pPMK->bssid.sa_data, ETH_ALEN); + memcpy(strIssueBssid, pPMK->bssid.sa_data, ETH_ALEN); if (pPMK->cmd == IW_PMKSA_ADD) { RTW_INFO("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n"); if (_rtw_memcmp(strIssueBssid, strZeroMacAddress, ETH_ALEN) == _TRUE) @@ -1438,7 +1438,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev, RTW_INFO("[rtw_wx_set_pmkid] BSSID exists in the PMKList.\n"); - _rtw_memcpy(psecuritypriv->PMKIDList[j].PMKID, pPMK->pmkid, IW_PMKID_LEN); + memcpy(psecuritypriv->PMKIDList[j].PMKID, pPMK->pmkid, IW_PMKID_LEN); psecuritypriv->PMKIDList[j].bUsed = _TRUE; psecuritypriv->PMKIDIndex = j + 1; blInserted = _TRUE; @@ -1451,8 +1451,8 @@ static int rtw_wx_set_pmkid(struct net_device *dev, RTW_INFO("[rtw_wx_set_pmkid] Use the new entry index = %d for this PMKID.\n", psecuritypriv->PMKIDIndex); - _rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, strIssueBssid, ETH_ALEN); - _rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pPMK->pmkid, IW_PMKID_LEN); + memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, strIssueBssid, ETH_ALEN); + memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pPMK->pmkid, IW_PMKID_LEN); psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = _TRUE; psecuritypriv->PMKIDIndex++ ; @@ -1796,7 +1796,7 @@ static int rtw_wx_get_wap(struct net_device *dev, ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) == _TRUE) || ((check_fwstate(pmlmepriv, WIFI_AP_STATE)) == _TRUE)) - _rtw_memcpy(wrqu->ap_addr.sa_data, pcur_bss->MacAddress, ETH_ALEN); + memcpy(wrqu->ap_addr.sa_data, pcur_bss->MacAddress, ETH_ALEN); else memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN); @@ -1986,7 +1986,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a, int len = min((int)req->essid_len, IW_ESSID_MAX_SIZE); rtw_init_sitesurvey_parm(padapter, &parm); - _rtw_memcpy(&parm.ssid[0].Ssid, &req->essid, len); + memcpy(&parm.ssid[0].Ssid, &req->essid, len); parm.ssid[0].SsidLength = len; parm.ssid_num = 1; @@ -2030,7 +2030,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a, if (sec_len > 0 && sec_len <= len) { parm.ssid[ssid_index].SsidLength = sec_len; - _rtw_memcpy(&parm.ssid[ssid_index].Ssid, pos, sec_len); + memcpy(&parm.ssid[ssid_index].Ssid, pos, sec_len); /* RTW_INFO("%s COMBO_SCAN with specific parm.ssid:%s, %d\n", __FUNCTION__ */ /* , parm.ssid[ssid_index].Ssid, parm.ssid[ssid_index].SsidLength); */ @@ -2309,7 +2309,7 @@ static int rtw_wx_set_essid(struct net_device *dev, memset(&ndis_ssid, 0, sizeof(NDIS_802_11_SSID)); ndis_ssid.SsidLength = len; - _rtw_memcpy(ndis_ssid.Ssid, extra, len); + memcpy(ndis_ssid.Ssid, extra, len); src_ssid = ndis_ssid.Ssid; _enter_critical_bh(&queue->lock, &irqL); @@ -2396,7 +2396,7 @@ static int rtw_wx_get_essid(struct net_device *dev, wrqu->essid.length = len; - _rtw_memcpy(extra, pcur_bss->Ssid.Ssid, len); + memcpy(extra, pcur_bss->Ssid.Ssid, len); wrqu->essid.flags = 1; } else { @@ -2745,7 +2745,7 @@ static int rtw_wx_set_enc(struct net_device *dev, wep.KeyIndex |= 0x80000000; - _rtw_memcpy(wep.KeyMaterial, keybuf, wep.KeyLength); + memcpy(wep.KeyMaterial, keybuf, wep.KeyLength); if (rtw_set_802_11_add_wep(padapter, &wep) == _FALSE) { if (rf_on == pwrpriv->rf_pwrstate) @@ -2809,7 +2809,7 @@ static int rtw_wx_get_enc(struct net_device *dev, erq->length = padapter->securitypriv.dot11DefKeylen[key]; if (erq->length) { - _rtw_memcpy(keybuf, padapter->securitypriv.dot11DefKey[key].skey, padapter->securitypriv.dot11DefKeylen[key]); + memcpy(keybuf, padapter->securitypriv.dot11DefKey[key].skey, padapter->securitypriv.dot11DefKeylen[key]); erq->flags |= IW_ENCODE_ENABLED; @@ -3067,7 +3067,7 @@ static int rtw_wx_set_enc_ext(struct net_device *dev, #ifndef CONFIG_IOCTL_CFG80211 case IW_ENCODE_ALG_SM4: alg_name = "SMS4"; - _rtw_memcpy(param->sta_addr, pext->addr.sa_data, ETH_ALEN); + memcpy(param->sta_addr, pext->addr.sa_data, ETH_ALEN); RTW_INFO("rtw_wx_set_enc_ext: SMS4 case\n"); break; #endif @@ -3099,17 +3099,17 @@ static int rtw_wx_set_enc_ext(struct net_device *dev, #ifdef CONFIG_WAPI_SUPPORT #ifndef CONFIG_IOCTL_CFG80211 if (pext->alg == IW_ENCODE_ALG_SM4) - _rtw_memcpy(param->u.crypt.seq, pext->rx_seq, 16); + memcpy(param->u.crypt.seq, pext->rx_seq, 16); else #endif /* CONFIG_IOCTL_CFG80211 */ #endif /* CONFIG_WAPI_SUPPORT */ - _rtw_memcpy(param->u.crypt.seq, pext->rx_seq, 8); + memcpy(param->u.crypt.seq, pext->rx_seq, 8); } if (pext->key_len) { param->u.crypt.key_len = pext->key_len; - /* _rtw_memcpy(param + 1, pext + 1, pext->key_len); */ - _rtw_memcpy(param->u.crypt.key, pext + 1, pext->key_len); + /* memcpy(param + 1, pext + 1, pext->key_len); */ + memcpy(param->u.crypt.key, pext + 1, pext->key_len); } if (pencoding->flags & IW_ENCODE_DISABLED) { @@ -3138,7 +3138,7 @@ static int rtw_wx_get_nick(struct net_device *dev, if (extra) { wrqu->data.length = 14; wrqu->data.flags = 1; - _rtw_memcpy(extra, "", 14); + memcpy(extra, "", 14); } /* rtw_signal_process(pid, SIGUSR1); */ /* for test */ @@ -3881,7 +3881,7 @@ static int rtw_p2p_set_go_nego_ssid(struct net_device *dev, struct wifidirect_info *pwdinfo = &(padapter->wdinfo); RTW_INFO("[%s] ssid = %s, len = %zu\n", __FUNCTION__, extra, strlen(extra)); - _rtw_memcpy(pwdinfo->nego_ssid, extra, strlen(extra)); + memcpy(pwdinfo->nego_ssid, extra, strlen(extra)); pwdinfo->nego_ssidlen = strlen(extra); return ret; @@ -4005,7 +4005,7 @@ static int rtw_p2p_profilefound(struct net_device *dev, pwdinfo->profileinfo[pwdinfo->profileindex].peermac[jj] = key_2char2num(extra[kk], extra[kk + 1]); /* pwdinfo->profileinfo[pwdinfo->profileindex].ssidlen = ( extra[18] - '0' ) * 10 + ( extra[19] - '0' ); */ - /* _rtw_memcpy( pwdinfo->profileinfo[pwdinfo->profileindex].ssid, &extra[20], pwdinfo->profileinfo[pwdinfo->profileindex].ssidlen ); */ + /* memcpy( pwdinfo->profileinfo[pwdinfo->profileindex].ssid, &extra[20], pwdinfo->profileinfo[pwdinfo->profileindex].ssidlen ); */ pwdinfo->profileindex++; } } @@ -4027,7 +4027,7 @@ static int rtw_p2p_setDN(struct net_device *dev, RTW_INFO("[%s] %s %d\n", __FUNCTION__, extra, wrqu->data.length - 1); memset(pwdinfo->device_name, 0x00, WPS_MAX_DEVICE_NAME_LEN); - _rtw_memcpy(pwdinfo->device_name, extra, wrqu->data.length - 1); + memcpy(pwdinfo->device_name, extra, wrqu->data.length - 1); pwdinfo->device_name_len = wrqu->data.length - 1; return ret; @@ -4274,7 +4274,7 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev, sprintf(attr_content_str, "\n\nM=0000"); wrqu->data.length = strlen(attr_content_str); - _rtw_memcpy(extra, attr_content_str, wrqu->data.length); + memcpy(extra, attr_content_str, wrqu->data.length); return ret; @@ -4417,7 +4417,7 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev, } wrqu->data.length = strlen(go_devadd_str); - _rtw_memcpy(extra, go_devadd_str, wrqu->data.length); + memcpy(extra, go_devadd_str, wrqu->data.length); return ret; @@ -4472,7 +4472,7 @@ static int rtw_p2p_get_device_type(struct net_device *dev, if (dev_type_len) { u16 type = 0; - _rtw_memcpy(&type, dev_type, 2); + memcpy(&type, dev_type, 2); type = be16_to_cpu(type); sprintf(dev_type_str, "\n\nN=%.2d", type); blnMatch = 1; @@ -4491,7 +4491,7 @@ static int rtw_p2p_get_device_type(struct net_device *dev, sprintf(dev_type_str, "\n\nN=00"); wrqu->data.length = strlen(dev_type_str); - _rtw_memcpy(extra, dev_type_str, wrqu->data.length); + memcpy(extra, dev_type_str, wrqu->data.length); return ret; @@ -4561,7 +4561,7 @@ static int rtw_p2p_get_device_name(struct net_device *dev, sprintf(dev_name_str, "\n\nN=0000"); wrqu->data.length = strlen(dev_name_str); - _rtw_memcpy(extra, dev_name_str, wrqu->data.length); + memcpy(extra, dev_name_str, wrqu->data.length); return ret; @@ -4642,7 +4642,7 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev, } wrqu->data.length = strlen(inv_proc_str); - _rtw_memcpy(extra, inv_proc_str, wrqu->data.length); + memcpy(extra, inv_proc_str, wrqu->data.length); return ret; @@ -4731,7 +4731,7 @@ static int rtw_p2p_connect(struct net_device *dev, memset(&pwdinfo->groupid_info, 0x00, sizeof(struct group_id_info)); pwdinfo->nego_req_info.peer_channel_num[0] = uintPeerChannel; - _rtw_memcpy(pwdinfo->nego_req_info.peerDevAddr, pnetwork->network.MacAddress, ETH_ALEN); + memcpy(pwdinfo->nego_req_info.peerDevAddr, pnetwork->network.MacAddress, ETH_ALEN); pwdinfo->nego_req_info.benable = _TRUE; _cancel_timer_ex(&pwdinfo->restore_p2p_state_timer); @@ -4925,7 +4925,7 @@ static int rtw_p2p_invite_req(struct net_device *dev, /* Store the GO's ssid */ pinvite_req_info->ssidlen = wrqu->data.length - 36; - _rtw_memcpy(pinvite_req_info->go_ssid, &extra[36], (u32) pinvite_req_info->ssidlen); + memcpy(pinvite_req_info->go_ssid, &extra[36], (u32) pinvite_req_info->ssidlen); pinvite_req_info->benable = _TRUE; pinvite_req_info->peer_ch = uintPeerChannel; @@ -5444,17 +5444,17 @@ static int rtw_p2p_prov_disc(struct net_device *dev, if (rtw_mi_check_status(padapter, MI_LINKED)) _cancel_timer_ex(&pwdinfo->ap_p2p_switch_timer); #endif /* CONFIG_CONCURRENT_MODE */ - _rtw_memcpy(pwdinfo->tx_prov_disc_info.peerIFAddr, pnetwork->network.MacAddress, ETH_ALEN); - _rtw_memcpy(pwdinfo->tx_prov_disc_info.peerDevAddr, peerMAC, ETH_ALEN); + memcpy(pwdinfo->tx_prov_disc_info.peerIFAddr, pnetwork->network.MacAddress, ETH_ALEN); + memcpy(pwdinfo->tx_prov_disc_info.peerDevAddr, peerMAC, ETH_ALEN); pwdinfo->tx_prov_disc_info.peer_channel_num[0] = (u16) uintPeerChannel; pwdinfo->tx_prov_disc_info.benable = _TRUE; rtw_p2p_set_pre_state(pwdinfo, rtw_p2p_state(pwdinfo)); rtw_p2p_set_state(pwdinfo, P2P_STATE_TX_PROVISION_DIS_REQ); if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_CLIENT)) - _rtw_memcpy(&pwdinfo->tx_prov_disc_info.ssid, &pnetwork->network.Ssid, sizeof(NDIS_802_11_SSID)); + memcpy(&pwdinfo->tx_prov_disc_info.ssid, &pnetwork->network.Ssid, sizeof(NDIS_802_11_SSID)); else if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_DEVICE) || rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) { - _rtw_memcpy(pwdinfo->tx_prov_disc_info.ssid.Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN); + memcpy(pwdinfo->tx_prov_disc_info.ssid.Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN); pwdinfo->tx_prov_disc_info.ssid.SsidLength = P2P_WILDCARD_SSID_LEN; } @@ -6941,7 +6941,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, pwep->KeyIndex = wep_key_idx; - _rtw_memcpy(pwep->KeyMaterial, param->u.crypt.key, pwep->KeyLength); + memcpy(pwep->KeyMaterial, param->u.crypt.key, pwep->KeyLength); if (param->u.crypt.set_tx) { RTW_INFO("wep, set_tx=1\n"); @@ -6959,7 +6959,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, psecuritypriv->dot11PrivacyKeyIndex = wep_key_idx; - _rtw_memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), pwep->KeyMaterial, pwep->KeyLength); + memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), pwep->KeyMaterial, pwep->KeyLength); psecuritypriv->dot11DefKeylen[wep_key_idx] = pwep->KeyLength; @@ -6970,7 +6970,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, /* don't update "psecuritypriv->dot11PrivacyAlgrthm" and */ /* "psecuritypriv->dot11PrivacyKeyIndex=keyid", but can rtw_set_key to cam */ - _rtw_memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), pwep->KeyMaterial, pwep->KeyLength); + memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), pwep->KeyMaterial, pwep->KeyLength); psecuritypriv->dot11DefKeylen[wep_key_idx] = pwep->KeyLength; @@ -6987,7 +6987,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, if (strcmp(param->u.crypt.alg, "WEP") == 0) { RTW_INFO(FUNC_ADPT_FMT" set WEP TX GTK idx:%u, len:%u\n" , FUNC_ADPT_ARG(padapter), param->u.crypt.idx, param->u.crypt.key_len); - _rtw_memcpy(psecuritypriv->dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); + memcpy(psecuritypriv->dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); psecuritypriv->dot118021XGrpPrivacy = _WEP40_; if (param->u.crypt.key_len == 13) psecuritypriv->dot118021XGrpPrivacy = _WEP104_; @@ -6996,23 +6996,23 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, RTW_INFO(FUNC_ADPT_FMT" set TKIP TX GTK idx:%u, len:%u\n" , FUNC_ADPT_ARG(padapter), param->u.crypt.idx, param->u.crypt.key_len); psecuritypriv->dot118021XGrpPrivacy = _TKIP_; - _rtw_memcpy(psecuritypriv->dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); + memcpy(psecuritypriv->dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); /* set mic key */ - _rtw_memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8); - _rtw_memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8); + memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8); + memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8); psecuritypriv->busetkipkey = _TRUE; } else if (strcmp(param->u.crypt.alg, "CCMP") == 0) { RTW_INFO(FUNC_ADPT_FMT" set CCMP TX GTK idx:%u, len:%u\n" , FUNC_ADPT_ARG(padapter), param->u.crypt.idx, param->u.crypt.key_len); psecuritypriv->dot118021XGrpPrivacy = _AES_; - _rtw_memcpy(psecuritypriv->dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); + memcpy(psecuritypriv->dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); #ifdef CONFIG_IEEE80211W } else if (strcmp(param->u.crypt.alg, "BIP") == 0) { RTW_INFO(FUNC_ADPT_FMT" set TX IGTK idx:%u, len:%u\n" , FUNC_ADPT_ARG(padapter), param->u.crypt.idx, param->u.crypt.key_len); - _rtw_memcpy(padapter->securitypriv.dot11wBIPKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); + memcpy(padapter->securitypriv.dot11wBIPKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); psecuritypriv->dot11wBIPKeyid = param->u.crypt.idx; psecuritypriv->dot11wBIPtxpn.val = RTW_GET_LE64(param->u.crypt.seq); psecuritypriv->binstallBIPkey = _TRUE; @@ -7049,7 +7049,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, if (psecuritypriv->dot11AuthAlgrthm == dot11AuthAlgrthm_8021X && psta) { /* psk/802_1x */ if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { if (param->u.crypt.set_tx == 1) { - _rtw_memcpy(psta->dot118021x_UncstKey.skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); + memcpy(psta->dot118021x_UncstKey.skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); if (strcmp(param->u.crypt.alg, "WEP") == 0) { RTW_INFO(FUNC_ADPT_FMT" set WEP PTK of "MAC_FMT" idx:%u, len:%u\n" @@ -7065,8 +7065,8 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, , param->u.crypt.idx, param->u.crypt.key_len); psta->dot118021XPrivacy = _TKIP_; /* set mic key */ - _rtw_memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8); - _rtw_memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8); + memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8); + memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8); psecuritypriv->busetkipkey = _TRUE; } else if (strcmp(param->u.crypt.alg, "CCMP") == 0) { @@ -7133,7 +7133,7 @@ static int rtw_set_beacon(struct net_device *dev, struct ieee_param *param, int if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE) return -EINVAL; - _rtw_memcpy(&pstapriv->max_num_sta, param->u.bcn_ie.reserved, 2); + memcpy(&pstapriv->max_num_sta, param->u.bcn_ie.reserved, 2); if ((pstapriv->max_num_sta > NUM_STA) || (pstapriv->max_num_sta <= 0)) pstapriv->max_num_sta = NUM_STA; @@ -7206,7 +7206,7 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param) psta->cmn.aid = param->u.add_sta.aid;/* aid=1~2007 */ - _rtw_memcpy(psta->bssrateset, param->u.add_sta.tx_supp_rates, 16); + memcpy(psta->bssrateset, param->u.add_sta.tx_supp_rates, 16); /* check wmm cap. */ @@ -7226,7 +7226,7 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param) (WLAN_STA_HT & flags)) { psta->htpriv.ht_option = _TRUE; psta->qos_option = 1; - _rtw_memcpy((void *)&psta->htpriv.ht_cap, (void *)¶m->u.add_sta.ht_cap, sizeof(struct rtw_ieee80211_ht_cap)); + memcpy((void *)&psta->htpriv.ht_cap, (void *)¶m->u.add_sta.ht_cap, sizeof(struct rtw_ieee80211_ht_cap)); } else psta->htpriv.ht_option = _FALSE; @@ -7355,10 +7355,10 @@ static int rtw_ioctl_get_sta_data(struct net_device *dev, struct ieee_param *par (psta->ht_20mhz_set << 5)); psta_data->tx_supp_rates_len = psta->bssratelen; - _rtw_memcpy(psta_data->tx_supp_rates, psta->bssrateset, psta->bssratelen); + memcpy(psta_data->tx_supp_rates, psta->bssrateset, psta->bssratelen); #ifdef CONFIG_80211N_HT if(padapter->registrypriv.ht_enable && is_supported_ht(padapter->registrypriv.wireless_mode)) - _rtw_memcpy(&psta_data->ht_cap, &psta->htpriv.ht_cap, sizeof(struct rtw_ieee80211_ht_cap)); + memcpy(&psta_data->ht_cap, &psta->htpriv.ht_cap, sizeof(struct rtw_ieee80211_ht_cap)); #endif /* CONFIG_80211N_HT */ psta_data->rx_pkts = psta->sta_stats.rx_data_pkts; psta_data->rx_bytes = psta->sta_stats.rx_bytes; @@ -7396,7 +7396,7 @@ static int rtw_get_sta_wpaie(struct net_device *dev, struct ieee_param *param) psta = rtw_get_stainfo(pstapriv, param->sta_addr); if (psta) { - if ((psta->wpa_ie[0] == WLAN_EID_RSN) || (psta->wpa_ie[0] == WLAN_EID_GENERIC)) { + if ((psta->wpa_ie[0] == WLAN_EID_RSN) || (psta->wpa_ie[0] == WLAN_EID_VENDOR_SPECIFIC)) { int wpa_ie_len; int copy_len; @@ -7406,7 +7406,7 @@ static int rtw_get_sta_wpaie(struct net_device *dev, struct ieee_param *param) param->u.wpa_ie.len = copy_len; - _rtw_memcpy(param->u.wpa_ie.reserved, psta->wpa_ie, copy_len); + memcpy(param->u.wpa_ie.reserved, psta->wpa_ie, copy_len); } else { /* ret = -1; */ RTW_INFO("sta's wpa_ie is NONE\n"); @@ -7448,7 +7448,7 @@ static int rtw_set_wps_beacon(struct net_device *dev, struct ieee_param *param, return -EINVAL; } - _rtw_memcpy(pmlmepriv->wps_beacon_ie, param->u.bcn_ie.buf, ie_len); + memcpy(pmlmepriv->wps_beacon_ie, param->u.bcn_ie.buf, ie_len); update_beacon(padapter, _VENDOR_SPECIFIC_IE_, wps_oui, _TRUE); @@ -7488,7 +7488,7 @@ static int rtw_set_wps_probe_resp(struct net_device *dev, struct ieee_param *par RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __FUNCTION__, __LINE__); return -EINVAL; } - _rtw_memcpy(pmlmepriv->wps_probe_resp_ie, param->u.bcn_ie.buf, ie_len); + memcpy(pmlmepriv->wps_probe_resp_ie, param->u.bcn_ie.buf, ie_len); } @@ -7524,7 +7524,7 @@ static int rtw_set_wps_assoc_resp(struct net_device *dev, struct ieee_param *par return -EINVAL; } - _rtw_memcpy(pmlmepriv->wps_assoc_resp_ie, param->u.bcn_ie.buf, ie_len); + memcpy(pmlmepriv->wps_assoc_resp_ie, param->u.bcn_ie.buf, ie_len); } @@ -7560,7 +7560,7 @@ static int rtw_set_hidden_ssid(struct net_device *dev, struct ieee_param *param, WLAN_BSSID_EX *pbss_network = &mlmepriv->cur_network.network; WLAN_BSSID_EX *pbss_network_ext = &mlmeinfo->network; - _rtw_memcpy(ssid, ssid_ie + 2, ssid_len); + memcpy(ssid, ssid_ie + 2, ssid_len); ssid[ssid_len] = 0x0; if (0) @@ -7569,9 +7569,9 @@ static int rtw_set_hidden_ssid(struct net_device *dev, struct ieee_param *param, pbss_network->Ssid.Ssid, pbss_network->Ssid.SsidLength, pbss_network_ext->Ssid.Ssid, pbss_network_ext->Ssid.SsidLength); - _rtw_memcpy(pbss_network->Ssid.Ssid, (void *)ssid, ssid_len); + memcpy(pbss_network->Ssid.Ssid, (void *)ssid, ssid_len); pbss_network->Ssid.SsidLength = ssid_len; - _rtw_memcpy(pbss_network_ext->Ssid.Ssid, (void *)ssid, ssid_len); + memcpy(pbss_network_ext->Ssid.Ssid, (void *)ssid, ssid_len); pbss_network_ext->Ssid.SsidLength = ssid_len; if (0) @@ -7822,7 +7822,7 @@ static int rtw_wx_set_priv(struct net_device *dev, return -ENOMEM; } - _rtw_memcpy(ext_dbg, ext, len); + memcpy(ext_dbg, ext, len); #endif /* added for wps2.0 @20110524 */ @@ -7852,7 +7852,7 @@ static int rtw_wx_set_priv(struct net_device *dev, } - _rtw_memcpy(pmlmepriv->wps_probe_req_ie, probereq_wpsie, cp_sz); + memcpy(pmlmepriv->wps_probe_req_ie, probereq_wpsie, cp_sz); pmlmepriv->wps_probe_req_ie_len = cp_sz; } @@ -9022,7 +9022,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, rtw_efuse_mask_array(padapter, mask_buf); if (padapter->registrypriv.bFileMaskEfuse == _TRUE) - _rtw_memcpy(mask_buf, maskfileBuffer, mask_len); + memcpy(mask_buf, maskfileBuffer, mask_len); sprintf(extra, "\n"); pextra = extra + strlen(extra); @@ -9554,7 +9554,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, rtw_read8(padapter, EFUSE_CTRL); BTEfuse_PowerSwitch(padapter, 1, _FALSE); #endif /* RTW_HALMAC */ - _rtw_memcpy(pEfuseHal->BTEfuseModifiedMap, pEfuseHal->fakeBTEfuseModifiedMap, EFUSE_BT_MAX_MAP_LEN); + memcpy(pEfuseHal->BTEfuseModifiedMap, pEfuseHal->fakeBTEfuseModifiedMap, EFUSE_BT_MAX_MAP_LEN); if (rtw_BT_efuse_map_write(padapter, 0x00, EFUSE_BT_MAX_MAP_LEN, pEfuseHal->fakeBTEfuseModifiedMap) == _FAIL) { RTW_INFO("%s: rtw_BT_efuse_map_write error!\n", __FUNCTION__); @@ -9739,7 +9739,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, rtw_hal_read_chip_info(padapter); /* set mac addr*/ rtw_macaddr_cfg(adapter_mac_addr(padapter), get_hal_mac_addr(padapter)); - _rtw_memcpy(padapter->pnetdev->dev_addr, get_hal_mac_addr(padapter), ETH_ALEN); /* set mac addr to net_device */ + memcpy(padapter->pnetdev->dev_addr, get_hal_mac_addr(padapter), ETH_ALEN); /* set mac addr to net_device */ #ifdef CONFIG_P2P rtw_init_wifidirect_addrs(padapter, adapter_mac_addr(padapter), adapter_mac_addr(padapter)); @@ -11250,7 +11250,7 @@ static int rtw_widi_set_probe_request(struct net_device *dev, if (pbuf) { if (copy_from_user(pbuf, wrqu->data.pointer, wrqu->data.length)) ret = -EFAULT; - /* _rtw_memcpy(pbuf, wrqu->data.pointer, wrqu->data.length); */ + /* memcpy(pbuf, wrqu->data.pointer, wrqu->data.length); */ if (wrqu->data.flags == 0) intel_widi_wk_cmd(padapter, INTEL_WIDI_ISSUE_PROB_WK, pbuf, sizeof(l2_msg_t)); @@ -11387,11 +11387,11 @@ static s32 createpseudoadhoc(PADAPTER padapter) passoc_ssid = &pmlmepriv->assoc_ssid; memset(passoc_ssid, 0, sizeof(NDIS_802_11_SSID)); passoc_ssid->SsidLength = sizeof(ssid) - 1; - _rtw_memcpy(passoc_ssid->Ssid, ssid, passoc_ssid->SsidLength); + memcpy(passoc_ssid->Ssid, ssid, passoc_ssid->SsidLength); pdev_network = &padapter->registrypriv.dev_network; pibss = padapter->registrypriv.dev_network.MacAddress; - _rtw_memcpy(&pdev_network->Ssid, passoc_ssid, sizeof(NDIS_802_11_SSID)); + memcpy(&pdev_network->Ssid, passoc_ssid, sizeof(NDIS_802_11_SSID)); rtw_update_registrypriv_dev_network(padapter); rtw_generate_random_ibss(pibss); @@ -11426,7 +11426,7 @@ static s32 createpseudoadhoc(PADAPTER padapter) /* 3 join psudo AdHoc */ pcur_network->join_res = 1; pcur_network->aid = psta->cmn.aid = 1; - _rtw_memcpy(&pcur_network->network, pdev_network, get_WLAN_BSSID_EX_sz(pdev_network)); + memcpy(&pcur_network->network, pdev_network, get_WLAN_BSSID_EX_sz(pdev_network)); /* set msr to WIFI_FW_ADHOC_STATE */ padapter->hw_port = HW_PORT0; @@ -11447,7 +11447,7 @@ static struct xmit_frame *createloopbackpkt(PADAPTER padapter, u32 size) struct tx_desc *desc; u8 *pkt_start, *pkt_end, *ptr; struct rtw_ieee80211_hdr *hdr; - s32 bmcast; + bool bmcast; _irqL irqL; @@ -11483,10 +11483,10 @@ static struct xmit_frame *createloopbackpkt(PADAPTER padapter, u32 size) memset(pattrib, 0, sizeof(struct pkt_attrib)); pattrib->ether_type = 0x8723; - _rtw_memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); + memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pattrib->ta, pattrib->src, ETH_ALEN); memset(pattrib->dst, 0xFF, ETH_ALEN); - _rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); + memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); /* pattrib->dhcp_pkt = 0; * pattrib->pktlen = 0; */ @@ -11502,7 +11502,7 @@ static struct xmit_frame *createloopbackpkt(PADAPTER padapter, u32 size) pattrib->bswenc = _FALSE; pattrib->qos_en = _FALSE; - bmcast = IS_MCAST(pattrib->ra); + bmcast = is_multicast_ether_addr(pattrib->ra); if (bmcast) pattrib->psta = rtw_get_bcmc_stainfo(padapter); else @@ -11553,9 +11553,9 @@ static struct xmit_frame *createloopbackpkt(PADAPTER padapter, u32 size) /* 3 5.1. make wlan header, make_wlanhdr() */ hdr = (struct rtw_ieee80211_hdr *)pkt_start; set_frame_sub_type(&hdr->frame_ctl, pattrib->subtype); - _rtw_memcpy(hdr->addr1, pattrib->dst, ETH_ALEN); /* DA */ - _rtw_memcpy(hdr->addr2, pattrib->src, ETH_ALEN); /* SA */ - _rtw_memcpy(hdr->addr3, get_bssid(&padapter->mlmepriv), ETH_ALEN); /* RA, BSSID */ + memcpy(hdr->addr1, pattrib->dst, ETH_ALEN); /* DA */ + memcpy(hdr->addr2, pattrib->src, ETH_ALEN); /* SA */ + memcpy(hdr->addr3, get_bssid(&padapter->mlmepriv), ETH_ALEN); /* RA, BSSID */ /* 3 5.2. make payload */ ptr = pkt_start + pattrib->hdrlen; @@ -11600,14 +11600,14 @@ static void printdata(u8 *pbuf, u32 len) #else /* CONFIG_LITTLE_ENDIAN */ #if 0 val = 0; - _rtw_memcpy(&val, pbuf + i, len - i); + memcpy(&val, pbuf + i, len - i); printk("%8X", val); #else u8 str[9]; u8 n; val = 0; n = len - i; - _rtw_memcpy(&val, pbuf + i, n); + memcpy(&val, pbuf + i, n); sprintf(str, "%08X", val); n = (4 - n) * 2; printk("%8s", str + n); @@ -11720,7 +11720,7 @@ thread_return lbk_thread(thread_context context) } ploopback->txsize = TXDESC_SIZE + pxmitframe->attrib.last_txcmdsz; - _rtw_memcpy(ploopback->txbuf, pxmitframe->buf_addr, ploopback->txsize); + memcpy(ploopback->txbuf, pxmitframe->buf_addr, ploopback->txsize); ff_hwaddr = rtw_get_ff_hwaddr(pxmitframe); cnt++; RTW_INFO("%s: wirte port cnt=%d size=%d\n", __func__, cnt, ploopback->txsize); @@ -11786,7 +11786,7 @@ static void loopbackTest(PADAPTER padapter, u32 cnt, u32 size, u8 *pmsg) break; msleep(1); } while (1); - _rtw_memcpy(pmsg, ploopback->msg, len + 1); + memcpy(pmsg, ploopback->msg, len + 1); freeLoopback(padapter); return; @@ -12399,7 +12399,7 @@ static int _rtw_ioctl_wext_private(struct net_device *dev, union iwreq_data *wrq union iwreq_data wdata; - _rtw_memcpy(&wdata, wrq_data, sizeof(wdata)); + memcpy(&wdata, wrq_data, sizeof(wdata)); input_len = wdata.data.length; if (!input_len) @@ -12553,7 +12553,7 @@ static int _rtw_ioctl_wext_private(struct net_device *dev, union iwreq_data *wrq wdata.data.length = priv_args[k].set_args & IW_PRIV_SIZE_MASK; /* Fetch string */ - _rtw_memcpy(buffer, ptr, wdata.data.length); + memcpy(buffer, ptr, wdata.data.length); } else { wdata.data.length = 1; buffer[0] = '\0'; @@ -12585,7 +12585,7 @@ static int _rtw_ioctl_wext_private(struct net_device *dev, union iwreq_data *wrq /* First case : all SET args fit within wrq */ if (offset) wdata.mode = subcmd; - _rtw_memcpy(wdata.name + offset, buffer, IFNAMSIZ - offset); + memcpy(wdata.name + offset, buffer, IFNAMSIZ - offset); } else { if ((priv_args[k].set_args == 0) && (priv_args[k].get_args & IW_PRIV_SIZE_FIXED) && @@ -12666,7 +12666,7 @@ static int _rtw_ioctl_wext_private(struct net_device *dev, union iwreq_data *wrq err = -E2BIG; goto exit; } - _rtw_memcpy(output + output_len, str, len); + memcpy(output + output_len, str, len); } break; @@ -12680,13 +12680,13 @@ static int _rtw_ioctl_wext_private(struct net_device *dev, union iwreq_data *wrq err = -E2BIG; goto exit; } - _rtw_memcpy(output + output_len, str, len); + memcpy(output + output_len, str, len); } break; case IW_PRIV_TYPE_CHAR: /* Display args */ - _rtw_memcpy(output, extra, n); + memcpy(output, extra, n); break; default: diff --git a/os_dep/linux/ioctl_mp.c b/os_dep/linux/ioctl_mp.c index 4463795..af92b7e 100644 --- a/os_dep/linux/ioctl_mp.c +++ b/os_dep/linux/ioctl_mp.c @@ -84,7 +84,7 @@ int rtw_mp_write_reg(struct net_device *dev, *pnext = 0; /*addr = simple_strtoul(pch, &ptmp, 16); memset(buf, '\0', sizeof(buf)); - _rtw_memcpy(buf, pch, pnext-pch); + memcpy(buf, pch, pnext-pch); ret = kstrtoul(buf, 16, &addr);*/ ret = sscanf(pch, "%x", &addr); if (addr > 0x3FFF) @@ -2154,7 +2154,7 @@ int rtw_mp_hwtx(struct net_device *dev, return -EFAULT; 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); if (pMptCtx->PMacTxInfo.bEnPMacTx == 1 && pmp_priv->mode != MP_ON) { diff --git a/os_dep/linux/mlme_linux.c b/os_dep/linux/mlme_linux.c index 27d4a0a..2098c19 100644 --- a/os_dep/linux/mlme_linux.c +++ b/os_dep/linux/mlme_linux.c @@ -114,7 +114,7 @@ void rtw_reset_securitypriv(_adapter *adapter) 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; backupTKIPCountermeasure = adapter->securitypriv.btkip_countermeasure; backupTKIPcountermeasure_time = adapter->securitypriv.btkip_countermeasure_time; @@ -122,7 +122,7 @@ void rtw_reset_securitypriv(_adapter *adapter) /* Added by Albert 2009/02/18 */ /* 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.btkip_countermeasure = backupTKIPCountermeasure; 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; - _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"); @@ -269,7 +269,7 @@ void rtw_indicate_sta_disassoc_event(_adapter *padapter, struct sta_info *psta) 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"); @@ -404,7 +404,7 @@ int hostapd_mode_init(_adapter *padapter) mac[4] = 0x11; mac[5] = 0x12; - _rtw_memcpy(pnetdev->dev_addr, mac, ETH_ALEN); + memcpy(pnetdev->dev_addr, mac, ETH_ALEN); rtw_netif_carrier_off(pnetdev); diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index fee8204..01612b3 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -900,7 +900,7 @@ uint loadparam(_adapter *padapter) /* registry_par->hci = (u8)hci; */ 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->channel = (u8)rtw_channel; @@ -1011,7 +1011,7 @@ uint loadparam(_adapter *padapter) RTW_ERR("%s discard rtw_country_code not in alpha2\n", __func__); memset(registry_par->alpha2, 0xFF, 2); } 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; 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; } - _rtw_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(adapter_mac_addr(padapter), sa->sa_data, ETH_ALEN); /* set mac addr to adapter */ + memcpy(pnetdev->dev_addr, sa->sa_data, ETH_ALEN); /* set mac addr to net_device */ #if 0 if (rtw_is_hw_init_completed(padapter)) { @@ -1366,7 +1366,7 @@ u16 rtw_recv_select_queue(struct sk_buff *skb) u32 priority; u8 *pdata = skb->data; - _rtw_memcpy(ð_type, pdata + (ETH_ALEN << 1), 2); + memcpy(ð_type, pdata + (ETH_ALEN << 1), 2); switch (eth_type) { case htons(ETH_P_IP): @@ -1696,7 +1696,7 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name) /* alloc netdev 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 */ @@ -2639,7 +2639,7 @@ int _netdev_vir_if_open(struct net_device *pnetdev) if (primary_padapter->bup == _FALSE) 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. @@ -2647,13 +2647,13 @@ int _netdev_vir_if_open(struct net_device *pnetdev) */ 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 rtw_mbid_camid_alloc(padapter, adapter_mac_addr(padapter)); #endif 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*/ @@ -2812,7 +2812,7 @@ _adapter *rtw_drv_add_vir_if(_adapter *primary_padapter, if (loadparam(padapter) != _SUCCESS) goto free_adapter; - _rtw_memcpy(padapter, primary_padapter, sizeof(_adapter)); + memcpy(padapter, primary_padapter, sizeof(_adapter)); /* */ padapter->bup = _FALSE; @@ -2850,7 +2850,7 @@ _adapter *rtw_drv_add_vir_if(_adapter *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. @@ -2860,7 +2860,7 @@ _adapter *rtw_drv_add_vir_if(_adapter *primary_padapter, if (padapter->iface_id > IFACE_ID1) 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*/ #ifdef CONFIG_MI_WITH_MBSSID_CAM 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) { case NETDEV_UP: - _rtw_memcpy(pmlmeinfo->ip_addr, &ifa->ifa_address, + memcpy(pmlmeinfo->ip_addr, &ifa->ifa_address, RTW_IP_ADDR_LEN); RTW_DBG("%s[%s]: up IP: %pI4\n", __func__, ifa->ifa_label, pmlmeinfo->ip_addr); @@ -3044,7 +3044,7 @@ static int rtw_inet6addr_notifier_call(struct notifier_block *nb, #ifdef CONFIG_WOWLAN pwrctl->wowlan_ns_offload_en = _TRUE; #endif - _rtw_memcpy(pmlmeinfo->ip6_addr, &inet6_ifa->addr, + memcpy(pmlmeinfo->ip6_addr, &inet6_ifa->addr, RTW_IPv6_ADDR_LEN); RTW_DBG("%s: up IPv6 addrs: %pI6\n", __func__, pmlmeinfo->ip6_addr); @@ -3402,7 +3402,7 @@ int _netdev_open(struct net_device *pnetdev) rtw_mbid_camid_alloc(padapter, adapter_mac_addr(padapter)); #endif 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 */ rtw_clr_surprise_removed(padapter); @@ -4160,7 +4160,7 @@ static int arp_query(unsigned char *haddr, u32 paddr, if (neighbor_entry != NULL) { neighbor_entry->used = jiffies; 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; } 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[2] = (gw_addr & 0xff0000) >> 16; 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 IP:\t" IP_FMT "\n", __FUNCTION__, IP_ARG(pmlmepriv->gw_ip)); } else diff --git a/os_dep/linux/recv_linux.c b/os_dep/linux/recv_linux.c index 63a3cfe..ad3e27f 100644 --- a/os_dep/linux/recv_linux.c +++ b/os_dep/linux/recv_linux.c @@ -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; 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. */ - _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; } else { #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) { skb_reserve(sub_skb, 14); data_ptr = (u8 *)skb_put(sub_skb, msdu_len); - _rtw_memcpy(data_ptr, msdu, msdu_len); + memcpy(data_ptr, msdu, msdu_len); } else #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 */ skb_pull(sub_skb, SNAP_SIZE); - _rtw_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), sa, ETH_ALEN); + memcpy(skb_push(sub_skb, ETH_ALEN), da, ETH_ALEN); } else { /* Leave Ethernet header part of hdr and full payload */ u16 len; len = htons(sub_skb->len); - _rtw_memcpy(skb_push(sub_skb, 2), &len, 2); - _rtw_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, 2), &len, 2); + memcpy(skb_push(sub_skb, ETH_ALEN), sa, ETH_ALEN); + memcpy(skb_push(sub_skb, ETH_ALEN), da, ETH_ALEN); } return sub_skb; @@ -442,7 +442,7 @@ void rtw_os_recv_indicate_pkt(_adapter *padapter, _pkt *pkt, union recv_frame *r _pkt *pskb2 = NULL; struct sta_info *psta = NULL; struct sta_priv *pstapriv = &padapter->stapriv; - int bmcast = IS_MCAST(ehdr->h_dest); + bool bmcast = is_multicast_ether_addr(ehdr->h_dest); /* RTW_INFO("bmcast=%d\n", bmcast); */ @@ -590,7 +590,7 @@ void rtw_handle_tkip_mic_err(_adapter *padapter, struct sta_info *sta, u8 bgroup ev.flags |= IW_MICFAILURE_PAIRWISE; 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)); wrqu.data.length = sizeof(ev); diff --git a/os_dep/linux/rtw_android.c b/os_dep/linux/rtw_android.c index 93c4f77..1bb2fde 100644 --- a/os_dep/linux/rtw_android.c +++ b/os_dep/linux/rtw_android.c @@ -415,7 +415,7 @@ int rtw_android_get_p2p_dev_addr(struct net_device *net, char *command, int tota int bytes_written = 0; /* 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; 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" */ 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; /* printk("supplicant KEK: "); @@ -546,13 +546,13 @@ int rtw_gtk_offload(struct net_device *net, u8 *cmd_ptr) printk(" %02x ", psta->kek[i]); 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; /* for(i=0;ikck[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; /* printk("\nREPLAY_CTR: "); */ diff --git a/os_dep/linux/rtw_cfgvendor.c b/os_dep/linux/rtw_cfgvendor.c index 08e768d..da94074 100644 --- a/os_dep/linux/rtw_cfgvendor.c +++ b/os_dep/linux/rtw_cfgvendor.c @@ -1358,7 +1358,7 @@ void rtw_cfgvendor_rssi_monitor_evt(_adapter *padapter) { data.version = RSSI_MONITOR_EVT_VERSION; 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); @@ -1476,7 +1476,7 @@ static int rtw_cfgvendor_logger_get_ring_status(struct wiphy *wiphy, 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; /* Alloc the SKB for vendor_event */ 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); switch (type) { 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)); break; default: diff --git a/os_dep/linux/usb_ops_linux.c b/os_dep/linux/usb_ops_linux.c index b05978c..8b0bdd7 100644 --- a/os_dep/linux/usb_ops_linux.c +++ b/os_dep/linux/usb_ops_linux.c @@ -23,7 +23,7 @@ struct rtw_async_write_data { struct usb_ctrlrequest dr; }; -int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u16 value, u16 index, void *pdata, u16 len, u8 requesttype) +int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u16 value, void *pdata, u16 len, u8 requesttype) { _adapter *padapter = pintfhdl->padapter; struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter); @@ -34,7 +34,6 @@ int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u16 value, u16 index, void *pda #ifdef CONFIG_USB_VENDOR_REQ_BUFFER_DYNAMIC_ALLOCATE u32 tmp_buflen = 0; #endif - u8 reqtype; u8 *pIo_buf; int vendorreq_times = 0; @@ -94,29 +93,30 @@ int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u16 value, u16 index, void *pda goto release_mutex; } - while (++vendorreq_times <= MAX_USBCTRL_VENDORREQ_TIMES) { - memset(pIo_buf, 0, len); + if (requesttype == REALTEK_USB_VENQT_READ) + pipe = usb_rcvctrlpipe(udev, 0);/* read_in */ + else + pipe = usb_sndctrlpipe(udev, 0);/* write_out */ - if (requesttype == 0x01) { - pipe = usb_rcvctrlpipe(udev, 0);/* read_in */ - reqtype = REALTEK_USB_VENQT_READ; + while (++vendorreq_times <= MAX_USBCTRL_VENDORREQ_TIMES) { + + if (requesttype == REALTEK_USB_VENQT_READ) { + memset(pIo_buf, 0, len); } else { - pipe = usb_sndctrlpipe(udev, 0);/* write_out */ - 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, requesttype, value, REALTEK_USB_VENQT_CMD_IDX, pIo_buf, len, RTW_USB_CONTROL_MSG_TIMEOUT); if (status == len) { /* Success this control transfer. */ rtw_reset_continual_io_error(pdvobjpriv); - if (requesttype == 0x01) { + if (requesttype == REALTEK_USB_VENQT_READ) { /* 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 */ RTW_INFO("reg 0x%x, usb %s %u fail, status:%d value=0x%x, vendorreq_times:%d\n" - , value, (requesttype == 0x01) ? "read" : "write" , len, status, *(u32 *)pdata, vendorreq_times); + , value, (requesttype == REALTEK_USB_VENQT_READ) ? "read" : "write" , len, status, *(u32 *)pdata, vendorreq_times); if (status < 0) { if (status == (-ESHUTDOWN) || status == -ENODEV) @@ -133,7 +133,7 @@ int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u16 value, u16 index, void *pda if (status > 0) { if (requesttype == 0x01) { /* 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); } } } @@ -165,15 +165,11 @@ int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u16 value, u16 index, void *pda if (current_reg_sec == REG_ON_SEC) { unsigned int t_pipe = usb_sndctrlpipe(udev, 0);/* write_out */ - u8 t_reqtype = REALTEK_USB_VENQT_WRITE; u8 t_len = 1; - u8 t_req = 0x05; u16 t_reg = 0; - u16 t_index = 0; - t_reg = 0x4e0; - status = usb_control_msg(udev, t_pipe, t_req, t_reqtype, t_reg, t_index, pIo_buf, t_len, RTW_USB_CONTROL_MSG_TIMEOUT); + status = usb_control_msg(udev, t_pipe, REALTEK_USB_VENQT_CMD_REQ, REALTEK_USB_VENQT_WRITE, t_reg, REALTEK_USB_VENQT_CMD_IDX, pIo_buf, t_len, RTW_USB_CONTROL_MSG_TIMEOUT); if (status == t_len) rtw_reset_continual_io_error(pdvobjpriv); @@ -208,22 +204,19 @@ static void _usbctrl_vendorreq_async_callback(struct urb *urb, struct pt_regs *r } int _usbctrl_vendorreq_async_write(struct usb_device *udev, u8 request, - u16 value, u16 index, void *pdata, u16 len, u8 requesttype) + u16 value, void *pdata, u16 len, u8 requesttype) { int rc; unsigned int pipe; - u8 reqtype; struct usb_ctrlrequest *dr; struct urb *urb; struct rtw_async_write_data *buf; - if (requesttype == VENDOR_READ) { + if (requesttype == REALTEK_USB_VENQT_READ) { pipe = usb_rcvctrlpipe(udev, 0);/* read_in */ - reqtype = REALTEK_USB_VENQT_READ; } else { pipe = usb_sndctrlpipe(udev, 0);/* write_out */ - reqtype = REALTEK_USB_VENQT_WRITE; } buf = (struct rtl819x_async_write_data *)rtw_zmalloc(sizeof(*buf)); @@ -241,13 +234,13 @@ int _usbctrl_vendorreq_async_write(struct usb_device *udev, u8 request, dr = &buf->dr; - dr->bRequestType = reqtype; + dr->bRequestType = requesttype; dr->bRequest = request; dr->wValue = cpu_to_le16(value); - dr->wIndex = cpu_to_le16(index); + dr->wIndex = cpu_to_le16(REALTEK_USB_VENQT_CMD_IDX); 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, _usbctrl_vendorreq_async_callback, buf); diff --git a/os_dep/linux/xmit_linux.c b/os_dep/linux/xmit_linux.c index ebbf1f0..9248901 100644 --- a/os_dep/linux/xmit_linux.c +++ b/os_dep/linux/xmit_linux.c @@ -421,7 +421,7 @@ int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb) newskb = rtw_skb_copy(skb); 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); if (res < 0) { DBG_COUNTER(padapter->tx_logs.os_tx_m2u_entry_err_xmit); diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index 010eae3..f0377a5 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -792,32 +792,6 @@ inline u32 rtw_os_pkt_len(_pkt *pkt) #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) -{ -#if defined(PLATFORM_LINUX) - memmove(dst, src, sz); -#else - #error "TBD\n" -#endif -} - int _rtw_memcmp(const void *dst, const void *src, u32 sz) { @@ -2028,7 +2002,7 @@ int rtw_change_ifname(_adapter *padapter, const char *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) ret = register_netdev(pnetdev); @@ -2181,7 +2155,7 @@ void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len) dup = rtw_malloc(src_len); if (dup) { dup_len = src_len; - _rtw_memcpy(dup, src, dup_len); + memcpy(dup, src, dup_len); } keep_ori: @@ -2343,7 +2317,7 @@ int map_readN(const struct map_t *map, u16 offset, u16 len, u8 *buf) c_len = seg->sa + seg->len - offset; } - _rtw_memcpy(c_dst, c_src, c_len); + memcpy(c_dst, c_src, c_len); } exit: @@ -2413,7 +2387,7 @@ int rtw_blacklist_add(_queue *blist, const u8 *addr, u32 timeout_ms) if (exist == _FALSE) { ent = rtw_malloc(sizeof(struct blacklist_ent)); if (ent) { - _rtw_memcpy(ent->addr, addr, ETH_ALEN); + memcpy(ent->addr, addr, ETH_ALEN); ent->exp_time = rtw_get_current_time() + rtw_ms_to_systime(timeout_ms); rtw_list_insert_tail(&ent->list, head);