From 92b97f0a6769c7e360a271840b3f439bea83b8fc Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Mon, 17 Dec 2018 21:50:56 -0600 Subject: [PATCH] rtl8188eu: Remove wrappers around memcpy() and memmove() Signed-off-by: Larry Finger --- core/rtw_ap.c | 52 ++--- core/rtw_beamforming.c | 86 +++---- core/rtw_btcoex.c | 10 +- core/rtw_cmd.c | 66 +++--- core/rtw_debug.c | 6 +- core/rtw_efuse.c | 8 +- core/rtw_ieee80211.c | 66 +++--- core/rtw_ioctl_set.c | 40 ++-- core/rtw_iol.c | 2 +- core/rtw_mi.c | 4 +- core/rtw_mlme.c | 60 ++--- core/rtw_mlme_ext.c | 454 ++++++++++++++++++------------------ core/rtw_mp.c | 42 ++-- core/rtw_p2p.c | 148 ++++++------ core/rtw_recv.c | 136 +++++------ core/rtw_security.c | 70 +++--- core/rtw_sta_mgt.c | 8 +- core/rtw_tdls.c | 212 ++++++++--------- core/rtw_wlan_util.c | 78 +++---- core/rtw_xmit.c | 118 +++++----- hal/hal_btcoex.c | 18 +- hal/hal_com.c | 258 ++++++++++---------- hal/hal_com_phycfg.c | 28 +-- hal/hal_intf.c | 2 +- hal/hal_mcc.c | 12 +- hal/hal_usb.c | 4 +- hal/phydm/phydm_interface.c | 2 +- hal/rtl8188e_cmd.c | 40 ++-- hal/rtl8188e_hal_init.c | 10 +- hal/rtl8188eu_xmit.c | 2 +- hal/usb_ops_linux.c | 8 +- include/osdep_service.h | 4 - os_dep/ioctl_cfg80211.c | 206 ++++++++-------- os_dep/ioctl_linux.c | 236 +++++++++---------- os_dep/ioctl_mp.c | 2 +- os_dep/mlme_linux.c | 10 +- os_dep/os_intfs.c | 30 +-- os_dep/osdep_service.c | 16 +- os_dep/recv_linux.c | 16 +- os_dep/rtw_android.c | 8 +- os_dep/usb_ops_linux.c | 8 +- os_dep/xmit_linux.c | 2 +- 42 files changed, 1287 insertions(+), 1301 deletions(-) diff --git a/core/rtw_ap.c b/core/rtw_ap.c index f97d944..ca641e6 100644 --- a/core/rtw_ap.c +++ b/core/rtw_ap.c @@ -106,7 +106,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); } *dst_ie++ = _TIM_IE_; @@ -134,13 +134,13 @@ static void update_BCNTIM(_adapter *padapter) pvb = le16_to_cpu(tim_bitmap_le); *dst_ie++ = pvb; } else if (tim_ielen == 5) { - _rtw_memcpy(dst_ie, &tim_bitmap_le, 2); + memcpy(dst_ie, &tim_bitmap_le, 2); dst_ie += 2; } /*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); } @@ -195,18 +195,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); } @@ -238,12 +238,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); } @@ -841,7 +841,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); /* HT related cap */ if (phtpriv_ap->ht_option) { @@ -869,7 +869,7 @@ 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)); psta->state |= WIFI_AP_STATE; /* Aries, add,fix bug of flush_cam_entry at STOP AP mode , 0724 */ } @@ -1263,7 +1263,7 @@ chbw_decision: , &ch_to_set, &bw_to_set, &offset_to_set, &chbw_allow); /* let pnetwork_mlmeext == pnetwork_mlme. */ - _rtw_memcpy(pnetwork_mlmeext, pnetwork, pnetwork->Length); + memcpy(pnetwork_mlmeext, pnetwork, pnetwork->Length); rtw_start_bss_hdl_after_chbw_decided(padapter); @@ -1422,7 +1422,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) @@ -1434,7 +1434,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 */ @@ -1450,10 +1450,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 } @@ -1472,14 +1472,14 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len) /* get supported rates */ p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SUPPORTEDRATES_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_)); if (p != NULL) { - _rtw_memcpy(supportRate, p + 2, ie_len); + memcpy(supportRate, p + 2, ie_len); supportRateNum = ie_len; } /* get ext_supported rates */ p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _EXT_SUPPORTEDRATES_IE_, &ie_len, pbss_network->IELength - _BEACON_IE_OFFSET_); if (p != NULL) { - _rtw_memcpy(supportRate + supportRateNum, p + 2, ie_len); + memcpy(supportRate + supportRateNum, p + 2, ie_len); supportRateNum += ie_len; } @@ -1617,7 +1617,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_CAP_AMPDU_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 */ { @@ -1677,7 +1677,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)); @@ -1877,7 +1877,7 @@ int rtw_acl_add_sta(_adapter *adapter, 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)); @@ -1967,9 +1967,9 @@ u8 rtw_ap_set_pairwise_key(_adapter *padapter, struct sta_info *psta) psetstakey_para->algorithm = (u8)psta->dot118021XPrivacy; - _rtw_memcpy(psetstakey_para->addr, psta->hwaddr, ETH_ALEN); + memcpy(psetstakey_para->addr, psta->hwaddr, ETH_ALEN); - _rtw_memcpy(psetstakey_para->key, &psta->dot118021x_UncstKey, 16); + memcpy(psetstakey_para->key, &psta->dot118021x_UncstKey, 16); res = rtw_enqueue_cmd(pcmdpriv, ph2c); @@ -2026,7 +2026,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; @@ -2403,16 +2403,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; diff --git a/core/rtw_beamforming.c b/core/rtw_beamforming.c index aa834bf..1b32b1f 100644 --- a/core/rtw_beamforming.c +++ b/core/rtw_beamforming.c @@ -200,11 +200,11 @@ static u8 _send_ht_ndpa_packet(PADAPTER adapter, u8 *ra, 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); @@ -215,7 +215,7 @@ static u8 _send_ht_ndpa_packet(PADAPTER adapter, u8 *ra, 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; @@ -296,10 +296,10 @@ static u8 _send_vht_ndpa_packet(PADAPTER adapter, u8 *ra, u16 aid, CHANNEL_WIDTH 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; @@ -307,7 +307,7 @@ static u8 _send_vht_ndpa_packet(PADAPTER adapter, u8 *ra, u16 aid, CHANNEL_WIDTH info->sounding_sequence = 0; else info->sounding_sequence++; - _rtw_memcpy(pframe + 16, &sequence, 1); + memcpy(pframe + 16, &sequence, 1); /* STA Info */ /* @@ -321,7 +321,7 @@ static u8 _send_vht_ndpa_packet(PADAPTER adapter, u8 *ra, u16 aid, CHANNEL_WIDTH 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; @@ -413,10 +413,10 @@ static u8 _send_vht_mu_ndpa_packet(PADAPTER adapter, 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; @@ -424,7 +424,7 @@ static u8 _send_vht_mu_ndpa_packet(PADAPTER adapter, 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; @@ -437,7 +437,7 @@ static u8 _send_vht_mu_ndpa_packet(PADAPTER adapter, 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; } @@ -494,10 +494,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; @@ -984,7 +984,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->hwaddr, ETH_ALEN); + memcpy(bfer->mac_addr, sta->hwaddr, ETH_ALEN); bfer->cap = bf_cap; bfer->state = BEAMFORM_ENTRY_HW_STATE_ADD_INIT; bfer->NumofSoundingDim = sounding_dim; @@ -1045,9 +1045,9 @@ static u8 _bfer_set_entry_gid(PADAPTER adapter, u8 *addr, u8 *gid, u8 *position) } /* Parsing Membership Status Array */ - _rtw_memcpy(bfer->gid_valid, gid, 8); + memcpy(bfer->gid_valid, gid, 8); /* Parsing User Position Array */ - _rtw_memcpy(bfer->user_position, position, 16); + memcpy(bfer->user_position, position, 16); /* Config HW GID table */ rtw_bf_cmd(adapter, BEAMFORMING_CTRL_SET_GID_TABLE, (u8*)&bfer, sizeof(struct beamformer_entry *), 1); @@ -1178,7 +1178,7 @@ static struct beamformee_entry *_bfee_add_entry(PADAPTER adapter, sta->txbf_gid = bfee->g_id; sta->txbf_paid = bfee->p_aid; - _rtw_memcpy(bfee->mac_addr, sta->hwaddr, ETH_ALEN); + memcpy(bfee->mac_addr, sta->hwaddr, ETH_ALEN); bfee->txbf = false; bfee->sounding = false; bfee->sound_period = 40; @@ -1684,18 +1684,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; @@ -1840,7 +1840,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; @@ -2037,7 +2037,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 */ @@ -2175,9 +2175,9 @@ bool issue_ht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, CHANNEL_WIDTH bw, u8 qidx 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; @@ -2197,7 +2197,7 @@ bool issue_ht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, CHANNEL_WIDTH bw, u8 qidx 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; @@ -2251,9 +2251,9 @@ bool issue_ht_ndpa_packet(PADAPTER Adapter, u8 *ra, CHANNEL_WIDTH bw, u8 qidx) 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; @@ -2273,7 +2273,7 @@ bool issue_ht_ndpa_packet(PADAPTER Adapter, u8 *ra, CHANNEL_WIDTH bw, u8 qidx) 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; @@ -2337,8 +2337,8 @@ bool issue_vht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, CHANNEL_WIDTH b 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; @@ -2362,7 +2362,7 @@ bool issue_vht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, CHANNEL_WIDTH b 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; @@ -2370,7 +2370,7 @@ bool issue_vht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, CHANNEL_WIDTH b 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; @@ -2423,8 +2423,8 @@ bool issue_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, CHANNEL_WIDTH bw, 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; @@ -2448,7 +2448,7 @@ bool issue_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, CHANNEL_WIDTH bw, 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; @@ -2457,7 +2457,7 @@ bool issue_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, CHANNEL_WIDTH bw, 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; @@ -2885,7 +2885,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; @@ -3052,7 +3052,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_btcoex.c b/core/rtw_btcoex.c index 09cc61a..3430600 100644 --- a/core/rtw_btcoex.c +++ b/core/rtw_btcoex.c @@ -516,7 +516,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)); @@ -595,7 +595,7 @@ u8 rtw_btcoex_parse_BT_info_notify_cmd(_adapter *padapter, u8 *pcmd, u16 cmdlen) /* return _FAIL; */ } else { 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 @@ -1273,7 +1273,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); switch (parse_res) { @@ -1560,7 +1560,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; @@ -1598,7 +1598,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 8ea0a48..857e18a 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -661,7 +661,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; @@ -896,7 +896,7 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num, int i; for (i = 0; i < ssid_num && i < RTW_SSID_SCAN_AMOUNT; i++) { if (ssid[i].SsidLength) { - _rtw_memcpy(&psurveyPara->ssid[i], &ssid[i], sizeof(NDIS_802_11_SSID)); + memcpy(&psurveyPara->ssid[i], &ssid[i], sizeof(NDIS_802_11_SSID)); psurveyPara->ssid_num++; if (0) RTW_INFO(FUNC_ADPT_FMT" ssid:(%s, %d)\n", FUNC_ADPT_ARG(padapter), @@ -910,7 +910,7 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num, int i; for (i = 0; i < ch_num && i < RTW_CHANNEL_SCAN_AMOUNT; i++) { if (ch[i].hw_value && !(ch[i].flags & RTW_IEEE80211_CHAN_DISABLED)) { - _rtw_memcpy(&psurveyPara->ch[i], &ch[i], sizeof(struct rtw_ieee80211_channel)); + memcpy(&psurveyPara->ch[i], &ch[i], sizeof(struct rtw_ieee80211_channel)); psurveyPara->ch_num++; if (0) RTW_INFO(FUNC_ADPT_FMT" ch:%u\n", FUNC_ADPT_ARG(padapter), @@ -970,10 +970,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: @@ -1005,7 +1005,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: @@ -1413,15 +1413,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 */ @@ -1430,7 +1430,7 @@ 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); psecnetwork->IELength = rtw_restruct_sec_ie(padapter, &pnetwork->network.IEs[0], &psecnetwork->IEs[0], pnetwork->network.IELength); @@ -1477,7 +1477,7 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork) ) { ptmp = rtw_get_ie(&pnetwork->network.IEs[12], _MDIE_, &tmp_len, pnetwork->network.IELength-12); if (ptmp) { - _rtw_memcpy(&pftpriv->mdid, ptmp+2, 2); + memcpy(&pftpriv->mdid, ptmp+2, 2); pftpriv->ft_cap = *(ptmp+4); RTW_INFO("FT: Target AP "MAC_FMT" MDID=(0x%2x), capacity=(0x%2x)\n", MAC_ARG(pnetwork->network.MacAddress), pftpriv->mdid, pftpriv->ft_cap); @@ -1602,7 +1602,7 @@ u8 rtw_setstakey_cmd(_adapter *padapter, struct sta_info *sta, u8 key_type, bool goto exit; } - _rtw_memcpy(psetstakey_para->addr, sta->hwaddr, ETH_ALEN); + memcpy(psetstakey_para->addr, sta->hwaddr, ETH_ALEN); if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) psetstakey_para->algorithm = (unsigned char) psecuritypriv->dot11PrivacyAlgrthm; @@ -1610,12 +1610,12 @@ 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); 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 */ @@ -1697,7 +1697,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->hwaddr, ETH_ALEN); + memcpy(psetstakey_para->addr, sta->hwaddr, ETH_ALEN); psetstakey_para->algorithm = _NO_PRIVACY_; @@ -1733,7 +1733,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: @@ -1812,7 +1812,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); @@ -1845,7 +1845,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)); @@ -1882,7 +1882,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; @@ -2267,7 +2267,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)); @@ -2401,7 +2401,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++; @@ -3118,7 +3118,7 @@ static u8 _p2p_roch_cmd(_adapter *adapter, u64 cookie, 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; } @@ -3731,7 +3731,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)); @@ -3776,7 +3776,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)); @@ -3945,7 +3945,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)); @@ -4018,7 +4018,7 @@ static 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; @@ -4139,10 +4139,10 @@ static u8 session_tracker_cmd(_adapter *adapter, u8 cmd, struct sta_info *sta, u 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; @@ -4616,11 +4616,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))); _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING); _exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); diff --git a/core/rtw_debug.c b/core/rtw_debug.c index 7dcd863..2f595f7 100644 --- a/core/rtw_debug.c +++ b/core/rtw_debug.c @@ -937,7 +937,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)); } @@ -4170,7 +4170,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->mac_id][0], psta->hwaddr, ETH_ALEN); + memcpy(&mac_addr[psta->mac_id][0], psta->hwaddr, ETH_ALEN); } } _exit_critical_bh(&pstapriv->sta_hash_lock, &irqL); @@ -4258,7 +4258,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->mac_id][0], psta->hwaddr, ETH_ALEN); + memcpy(&mac_addr[psta->mac_id][0], psta->hwaddr, ETH_ALEN); } } _exit_critical_bh(&pstapriv->sta_hash_lock, &irqL); diff --git a/core/rtw_efuse.c b/core/rtw_efuse.c index 2d5f8d1..fc8f6e4 100644 --- a/core/rtw_efuse.c +++ b/core/rtw_efuse.c @@ -769,7 +769,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 (data[idx] != map[addr + idx]) { word_en &= ~BIT(i >> 1); @@ -852,7 +852,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); @@ -1469,7 +1469,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; @@ -1524,7 +1524,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/rtw_ieee80211.c b/core/rtw_ieee80211.c index ba618c8..dfbe504 100644 --- a/core/rtw_ieee80211.c +++ b/core/rtw_ieee80211.c @@ -185,7 +185,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; } @@ -205,7 +205,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); *frlen = *frlen + (len + 2); @@ -326,7 +326,7 @@ u8 *rtw_get_ie_ex(u8 *in_ie, uint in_len, u8 eid, u8 *oui, u8 oui_len, u8 *ie, u 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; @@ -372,7 +372,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; @@ -392,7 +392,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: @@ -400,15 +400,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; } @@ -523,7 +523,7 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit) if (memcmp((pbuf + 2), wpa_oui_type, sizeof(wpa_oui_type))) goto check_next_ie; /* check version... */ - _rtw_memcpy((u8 *)&leval16, (pbuf + 6), sizeof(val16)); + memcpy((u8 *)&leval16, (pbuf + 6), sizeof(val16)); val16 = le16_to_cpu(leval16); if (val16 != 0x0001) @@ -760,7 +760,7 @@ int rtw_get_wapi_ie(u8 *in_ie, uint in_len, u8 *wapi_ie, u16 *wapi_len) if (authmode == _WAPI_IE_ && (!memcmp(&in_ie[cnt + 6], wapi_oui1, 4) || !memcmp(&in_ie[cnt + 6], wapi_oui2, 4))) { 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; @@ -799,7 +799,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_) && (!memcmp(&in_ie[cnt + 2], &wpa_oui[0], 4))) { 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 */ @@ -807,7 +807,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 */ @@ -902,7 +902,7 @@ u8 *rtw_get_wps_ie(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; @@ -953,7 +953,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; @@ -990,7 +990,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; @@ -1392,7 +1392,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; } @@ -1415,7 +1415,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)); } @@ -1702,7 +1702,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) { @@ -1710,7 +1710,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_ && !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; } @@ -1790,7 +1790,7 @@ u8 *rtw_get_p2p_ie(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; @@ -1848,7 +1848,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; @@ -1883,7 +1883,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; @@ -1904,7 +1904,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; @@ -1935,7 +1935,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; @@ -1976,7 +1976,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; @@ -2046,7 +2046,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; @@ -2134,7 +2134,7 @@ u8 *rtw_get_wfd_ie(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; @@ -2192,7 +2192,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; @@ -2227,7 +2227,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; @@ -2262,7 +2262,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; @@ -2303,7 +2303,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; @@ -2372,7 +2372,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; @@ -2484,7 +2484,7 @@ void rtw_get_bcn_info(struct wlan_network *pnetwork) unsigned int len; unsigned char *p; - _rtw_memcpy((u8 *)&le_cap, rtw_get_capability_from_ie(pnetwork->network.IEs), 2); + memcpy((u8 *)&le_cap, rtw_get_capability_from_ie(pnetwork->network.IEs), 2); cap = le16_to_cpu(le_cap); if (cap & WLAN_CAPABILITY_PRIVACY) { bencrypt = 1; diff --git a/core/rtw_ioctl_set.c b/core/rtw_ioctl_set.c index 2494afc..cdafe18 100644 --- a/core/rtw_ioctl_set.c +++ b/core/rtw_ioctl_set.c @@ -131,7 +131,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); @@ -224,7 +224,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) ) @@ -319,7 +319,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) ) @@ -380,12 +380,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; @@ -571,7 +571,7 @@ u8 rtw_set_802_11_add_wep(_adapter *padapter, NDIS_802_11_WEP *wep) break; } - _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; @@ -767,8 +767,8 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key) wep->KeyIndex = keyindex ; wep->KeyLength = key->KeyLength; - _rtw_memcpy(wep->KeyMaterial, key->KeyMaterial, key->KeyLength); - _rtw_memcpy(&(padapter->securitypriv.dot11DefKey[keyindex].skey[0]), key->KeyMaterial, key->KeyLength); + memcpy(wep->KeyMaterial, key->KeyMaterial, key->KeyLength); + memcpy(&(padapter->securitypriv.dot11DefKey[keyindex].skey[0]), key->KeyMaterial, key->KeyLength); padapter->securitypriv.dot11DefKeylen[keyindex] = key->KeyLength; padapter->securitypriv.dot11PrivacyKeyIndex = keyindex; @@ -783,10 +783,10 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key) /* SetRSC */ if (bgroup ) { NDIS_802_11_KEY_RSC keysrc = key->KeyRSC & 0x00FFFFFFFFFFFFULL; - _rtw_memcpy(&padapter->securitypriv.dot11Grprxpn, &keysrc, 8); + memcpy(&padapter->securitypriv.dot11Grprxpn, &keysrc, 8); } else { NDIS_802_11_KEY_RSC keysrc = key->KeyRSC & 0x00FFFFFFFFFFFFULL; - _rtw_memcpy(&padapter->securitypriv.dot11Grptxpn, &keysrc, 8); + memcpy(&padapter->securitypriv.dot11Grptxpn, &keysrc, 8); } } @@ -809,17 +809,17 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key) memset(&padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)], 0, 16); if ((key->KeyIndex & 0x10000000)) { - _rtw_memcpy(&padapter->securitypriv.dot118021XGrptxmickey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial + 16, 8); - _rtw_memcpy(&padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial + 24, 8); + memcpy(&padapter->securitypriv.dot118021XGrptxmickey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial + 16, 8); + memcpy(&padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial + 24, 8); } else { - _rtw_memcpy(&padapter->securitypriv.dot118021XGrptxmickey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial + 24, 8); - _rtw_memcpy(&padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial + 16, 8); + memcpy(&padapter->securitypriv.dot118021XGrptxmickey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial + 24, 8); + memcpy(&padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial + 16, 8); } /* set group key by index */ - _rtw_memcpy(&padapter->securitypriv.dot118021XGrpKey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial, key->KeyLength); + memcpy(&padapter->securitypriv.dot118021XGrpKey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial, key->KeyLength); key->KeyIndex = key->KeyIndex & 0x03; @@ -843,7 +843,7 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key) if (stainfo != NULL) { memset(&stainfo->dot118021x_UncstKey, 0, 16); /* clear keybuffer */ - _rtw_memcpy(&stainfo->dot118021x_UncstKey, key->KeyMaterial, 16); + memcpy(&stainfo->dot118021x_UncstKey, key->KeyMaterial, 16); if (encryptionalgo == _TKIP_) { padapter->securitypriv.busetkipkey = false; @@ -852,12 +852,12 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key) /* if TKIP, save the Receive/Transmit MIC key in KeyMaterial[128-255] */ if ((key->KeyIndex & 0x10000000)) { - _rtw_memcpy(&stainfo->dot11tkiptxmickey, key->KeyMaterial + 16, 8); - _rtw_memcpy(&stainfo->dot11tkiprxmickey, key->KeyMaterial + 24, 8); + memcpy(&stainfo->dot11tkiptxmickey, key->KeyMaterial + 16, 8); + memcpy(&stainfo->dot11tkiprxmickey, key->KeyMaterial + 24, 8); } else { - _rtw_memcpy(&stainfo->dot11tkiptxmickey, key->KeyMaterial + 24, 8); - _rtw_memcpy(&stainfo->dot11tkiprxmickey, key->KeyMaterial + 16, 8); + memcpy(&stainfo->dot11tkiptxmickey, key->KeyMaterial + 24, 8); + memcpy(&stainfo->dot11tkiprxmickey, key->KeyMaterial + 16, 8); } diff --git a/core/rtw_iol.c b/core/rtw_iol.c index 4f2799b..83c2b52 100644 --- a/core/rtw_iol.c +++ b/core/rtw_iol.c @@ -73,7 +73,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 ca8302e..acadbba 100644 --- a/core/rtw_mi.c +++ b/core/rtw_mi.c @@ -223,7 +223,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); @@ -1128,7 +1128,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 35d43c4..ed6374c 100644 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -239,7 +239,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; } @@ -546,7 +546,7 @@ u16 rtw_get_capability(WLAN_BSSID_EX *bss) { __le16 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); } @@ -663,9 +663,9 @@ 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 *)&le_tmp, rtw_get_capability_from_ie(src->IEs), 2); + memcpy((u8 *)&le_tmp, rtw_get_capability_from_ie(src->IEs), 2); s_cap = le16_to_cpu(le_tmp); - _rtw_memcpy((u8 *)&le_tmp, rtw_get_capability_from_ie(dst->IEs), 2); + memcpy((u8 *)&le_tmp, rtw_get_capability_from_ie(dst->IEs), 2); d_cap = le16_to_cpu(le_tmp); #ifdef CONFIG_P2P @@ -811,7 +811,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; @@ -926,7 +926,7 @@ void 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; @@ -953,7 +953,7 @@ void 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(); @@ -1110,11 +1110,11 @@ void rtw_survey_event_callback(_adapter *adapter, u8 *pbuf) struct wlan_network *ibss_wlan = NULL; unsigned long 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; } @@ -1192,7 +1192,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); @@ -1679,7 +1679,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_rate_mask(padapter, psta); psta->wireless_mode = pmlmeext->cur_wireless_mode; @@ -1776,10 +1776,10 @@ static void rtw_joinbss_update_network(_adapter *padapter, struct wlan_network * /* 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; @@ -2149,7 +2149,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; @@ -2299,13 +2299,13 @@ void rtw_ft_reassoc_event_callback(_adapter *padapter, u8 *pbuf) ft_evt_parms.ies_len = pftpriv->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, pftpriv->ft_event.ies, ft_evt_parms.ies_len); + memcpy((void *)ft_evt_parms.ies, pftpriv->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; @@ -2492,10 +2492,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); @@ -3326,20 +3326,20 @@ 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); psetkeyparm->grpkey = 1; break; case _AES_: keylen = 16; - _rtw_memcpy(&psetkeyparm->key, &psecuritypriv->dot118021XGrpKey[keyid], keylen); + memcpy(&psetkeyparm->key, &psecuritypriv->dot118021XGrpKey[keyid], keylen); psetkeyparm->grpkey = 1; break; default: @@ -3486,7 +3486,7 @@ static int rtw_append_pmkid(_adapter *adapter, int iEntry, u8 *ie, uint ie_len) RTW_PUT_LE16(&ie[ie_len], 1); ie_len += 2; - _rtw_memcpy(&ie[ie_len], &sec->PMKIDList[iEntry].PMKID, 16); + memcpy(&ie[ie_len], &sec->PMKIDList[iEntry].PMKID, 16); ie_len += 16; ie[13] += 18;/* PMKID length = 2+16 */ @@ -3534,7 +3534,7 @@ sint rtw_restruct_sec_ie(_adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_len) /* copy fixed ie only */ - _rtw_memcpy(out_ie, in_ie, 12); + memcpy(out_ie, in_ie, 12); ielength = 12; if ((ndisauthmode == Ndis802_11AuthModeWPA) || (ndisauthmode == Ndis802_11AuthModeWPAPSK)) authmode = _WPA_IE_ID_; @@ -3542,12 +3542,12 @@ sint rtw_restruct_sec_ie(_adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_len) authmode = _WPA2_IE_ID_; if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS)) { - _rtw_memcpy(out_ie + ielength, psecuritypriv->wps_ie, psecuritypriv->wps_ie_len); + memcpy(out_ie + ielength, 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[ielength], &psecuritypriv->supplicant_ie[0], psecuritypriv->supplicant_ie[1] + 2); + memcpy(&out_ie[ielength], &psecuritypriv->supplicant_ie[0], psecuritypriv->supplicant_ie[1] + 2); /* debug for CONFIG_IEEE80211W { int jj; @@ -3584,9 +3584,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; @@ -3883,7 +3883,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)); @@ -4258,7 +4258,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 4a2be1b..a1a8021 100755 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -996,10 +996,10 @@ void init_mlme_default_rate_set(_adapter *padapter) unsigned char mixed_basicrate[NumRates] = {_1M_RATE_, _2M_RATE_, _5M_RATE_, _11M_RATE_, _6M_RATE_, _12M_RATE_, _24M_RATE_, 0xff,}; unsigned char supported_mcs_set[16] = {0xff, 0xff, 0xff, 0x00, 0x00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; - _rtw_memcpy(pmlmeext->datarate, mixed_datarate, NumRates); - _rtw_memcpy(pmlmeext->basicrate, mixed_basicrate, NumRates); + memcpy(pmlmeext->datarate, mixed_datarate, NumRates); + memcpy(pmlmeext->basicrate, mixed_basicrate, NumRates); - _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)); } static void init_mlme_ext_priv_value(_adapter *padapter) @@ -1606,7 +1606,7 @@ _continue: unsigned char *sa_addr = get_sa(pframe); RTW_INFO("%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 @@ -1918,7 +1918,7 @@ unsigned int OnBeacon(_adapter *padapter, union recv_frame *precv_frame) /* update bcn keys */ if (rtw_get_bcn_keys(padapter, pframe, len, &recv_beacon)) { RTW_INFO("%s: beacon keys ready\n", __func__); - _rtw_memcpy(&pmlmepriv->cur_beacon_keys, + memcpy(&pmlmepriv->cur_beacon_keys, &recv_beacon, sizeof(recv_beacon)); pmlmepriv->new_beacon_cnts = 0; } else { @@ -2055,7 +2055,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 */ @@ -2306,7 +2306,7 @@ auth_fail: pstat = &stat; memset((char *)pstat, '\0', sizeof(stat)); pstat->auth_seq = 2; - _rtw_memcpy(pstat->hwaddr, sa, 6); + memcpy(pstat->hwaddr, sa, 6); #ifdef CONFIG_NATIVEAP_MLME issue_auth(padapter, pstat, (unsigned short)status); @@ -2373,7 +2373,7 @@ unsigned int OnAuthClient(_adapter *padapter, union recv_frame *precv_frame) 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); @@ -2413,7 +2413,7 @@ unsigned int OnAuthClient(_adapter *padapter, union recv_frame *precv_frame) /*Not support RIC*/ pftpriv->ft_event.ric_ies = NULL; pftpriv->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); report_ft_reassoc_event(padapter, target_ap_addr); return _SUCCESS; } @@ -2558,7 +2558,7 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame) status = _STATS_FAILURE_; goto OnAssocReqFail; } - _rtw_memcpy(pstat->bssrateset, rate_set, rate_num); + memcpy(pstat->bssrateset, rate_set, rate_num); pstat->bssratelen = rate_num; UpdateBrateTblForSoftAP(pstat->bssrateset, pstat->bssratelen); @@ -2685,7 +2685,7 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame) if (copy_len > 0) - _rtw_memcpy(pstat->wpa_ie, wpa_ie - 2, copy_len); + memcpy(pstat->wpa_ie, wpa_ie - 2, copy_len); } @@ -2761,7 +2761,7 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame) pstat->flags |= WLAN_STA_WME; - _rtw_memcpy(&pstat->htpriv.ht_cap, elems.ht_capabilities, sizeof(struct rtw_ieee80211_ht_cap)); + memcpy(&pstat->htpriv.ht_cap, elems.ht_capabilities, sizeof(struct rtw_ieee80211_ht_cap)); } else pstat->flags &= ~WLAN_STA_HT; @@ -2915,7 +2915,7 @@ bypass_ht_chk: 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); @@ -3738,7 +3738,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); @@ -3873,9 +3873,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++; @@ -4051,7 +4051,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; @@ -4153,7 +4153,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 */ @@ -4189,7 +4189,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; @@ -4284,9 +4284,9 @@ static void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, 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++; @@ -4353,11 +4353,11 @@ static void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, /* We have to get peer_req_cm from here. */ if (!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); @@ -4493,7 +4493,7 @@ static void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, 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 */ @@ -4594,7 +4594,7 @@ static void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, /* 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 */ @@ -4630,7 +4630,7 @@ static void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, 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)) { @@ -4644,11 +4644,11 @@ static void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, /* 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; } @@ -4709,9 +4709,9 @@ static 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++; @@ -4880,11 +4880,11 @@ static 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; } @@ -4946,9 +4946,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++; @@ -5045,7 +5045,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; } @@ -5144,11 +5144,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; @@ -5164,7 +5164,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 */ @@ -5198,7 +5198,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); @@ -5258,9 +5258,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++; @@ -5362,7 +5362,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; } @@ -5509,9 +5509,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++; @@ -5649,11 +5649,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++; @@ -5668,7 +5668,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; @@ -5677,7 +5677,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; @@ -5696,12 +5696,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; } @@ -5757,7 +5757,7 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) if (!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; } } @@ -5799,9 +5799,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 */ @@ -5814,7 +5814,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 */ @@ -5827,7 +5827,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 */ @@ -5852,7 +5852,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 */ @@ -5887,7 +5887,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 */ @@ -5976,20 +5976,20 @@ static 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++; @@ -6009,12 +6009,12 @@ static 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; } @@ -6055,9 +6055,9 @@ static 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 */ @@ -6084,7 +6084,7 @@ static 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 */ @@ -6387,7 +6387,7 @@ static 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 (!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); @@ -6550,7 +6550,7 @@ static 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 */ @@ -6578,7 +6578,7 @@ static 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; @@ -6661,7 +6661,7 @@ static 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", __func__); 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. */ @@ -6855,7 +6855,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); pftpriv->ft_action_len = frame_len; - _rtw_memcpy(pftpriv->ft_action, pframe, rtw_min(frame_len, RTW_MAX_FTIE_SZ)); + memcpy(pftpriv->ft_action, pframe, rtw_min(frame_len, RTW_MAX_FTIE_SZ)); ret = _SUCCESS; break; case RTW_WLAN_ACTION_FT_REQUEST: @@ -6927,7 +6927,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); @@ -6938,7 +6938,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: @@ -7239,8 +7239,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); #ifdef CONFIG_BEAMFORMING sta = pattrib->psta; @@ -7351,7 +7351,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; @@ -7376,7 +7376,7 @@ u32 rtw_build_vendor_ie(_adapter *padapter , unsigned char *pframe , u8 mgmt_fra 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]; } @@ -7444,9 +7444,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++; */ @@ -7476,20 +7476,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; } @@ -7497,7 +7497,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); @@ -7535,7 +7535,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; @@ -7547,7 +7547,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; } @@ -7555,7 +7555,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_ @@ -7586,7 +7586,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 */ { @@ -7623,14 +7623,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; @@ -7743,9 +7743,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++; @@ -7774,24 +7774,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; } @@ -7820,10 +7820,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; @@ -7842,14 +7842,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; @@ -7898,7 +7898,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 */ { @@ -7940,10 +7940,10 @@ void issue_probersp(_adapter *padapter, unsigned char *da, u8 is_valid_p2p_probe psta->pid, MAC_ARG(psta->hwaddr), 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); } @@ -8001,15 +8001,15 @@ static int _issue_probereq(_adapter *padapter, NDIS_802_11_SSID *pssid, u8 *da, 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); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; @@ -8037,7 +8037,7 @@ static int _issue_probereq(_adapter *padapter, NDIS_802_11_SSID *pssid, u8 *da, 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 */ @@ -8168,9 +8168,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->hwaddr, 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->hwaddr, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN); /* setting auth algo number */ @@ -8201,9 +8201,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 /*For Fast BSS Transition */ @@ -8340,9 +8340,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->hwaddr, 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->hwaddr, 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); @@ -8381,7 +8381,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 */ @@ -8393,7 +8393,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); } @@ -8402,7 +8402,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); } @@ -8415,7 +8415,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); } @@ -8429,7 +8429,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 && !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); @@ -8448,7 +8448,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; @@ -8462,7 +8462,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); @@ -8549,9 +8549,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++; @@ -8566,11 +8566,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; @@ -8579,13 +8579,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) { - _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; } @@ -8714,7 +8714,7 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc) case EID_HTCapability: if (padapter->mlmepriv.htpriv.ht_option) { 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)); pframe = rtw_set_ie(pframe, EID_HTCapability, pIE->Length , (u8 *)(&(pmlmeinfo->HT_caps)), &(pattrib->pktlen)); } } @@ -8745,7 +8745,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; } @@ -8817,7 +8817,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 */ @@ -8856,7 +8856,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 */ @@ -8868,12 +8868,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); @@ -8894,7 +8894,7 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc) if (rtw_chk_ft_flags(padapter, RTW_FT_SUPPORTED)) { u8 mdieval[3] = {0}; - _rtw_memcpy(mdieval, &(pftpriv->mdid), 2); + memcpy(mdieval, &(pftpriv->mdid), 2); mdieval[2] = pftpriv->ft_cap; pframe = rtw_set_ie(pframe, _MDIE_, 3, mdieval, &(pattrib->pktlen)); } @@ -8988,9 +8988,9 @@ static int _issue_nulldata(_adapter *padapter, unsigned char *da, unsigned int p if (power_mode) SetPwrMgt(fctrl); - _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++; @@ -9182,9 +9182,9 @@ static int _issue_qos_nulldata(_adapter *padapter, unsigned char *da, u16 tid, i 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++; @@ -9306,9 +9306,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++; @@ -9433,9 +9433,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++; @@ -9506,11 +9506,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++; @@ -9606,10 +9606,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++; @@ -9940,9 +9940,9 @@ static 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++; @@ -10089,9 +10089,9 @@ static int _issue_action_SM_PS(_adapter *padapter , unsigned char *raddr , u8 N 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++; @@ -10396,7 +10396,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. */ @@ -10419,7 +10419,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", __func__, __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; @@ -10434,7 +10434,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", __func__, __LINE__, len); return _FAIL; } - _rtw_memcpy(bssid->SupportedRates, (p + 2), len); + memcpy(bssid->SupportedRates, (p + 2), len); i = len; } @@ -10444,7 +10444,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", __func__, __LINE__, len); return _FAIL; } - _rtw_memcpy(bssid->SupportedRates + i, (p + 2), len); + memcpy(bssid->SupportedRates + i, (p + 2), len); } /* todo: */ @@ -10470,7 +10470,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; } @@ -10500,16 +10500,16 @@ 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); val16 = rtw_get_capability((WLAN_BSSID_EX *)bssid); if (val16 & BIT(0)) { bssid->InfrastructureMode = Ndis802_11Infrastructure; - _rtw_memcpy(bssid->MacAddress, get_addr2_ptr(pframe), ETH_ALEN); + memcpy(bssid->MacAddress, get_addr2_ptr(pframe), ETH_ALEN); } else { bssid->InfrastructureMode = Ndis802_11IBSS; - _rtw_memcpy(bssid->MacAddress, GetAddr3Ptr(pframe), ETH_ALEN); + memcpy(bssid->MacAddress, GetAddr3Ptr(pframe), ETH_ALEN); } if (val16 & BIT(4)) @@ -10856,7 +10856,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", __func__, country); @@ -10887,7 +10887,7 @@ static void process_80211d(PADAPTER padapter, WLAN_BSSID_EX *bssid) _RTW_INFO("}\n"); #endif - _rtw_memcpy(chplan_sta, pmlmeext->channel_set, sizeof(chplan_sta)); + memcpy(chplan_sta, pmlmeext->channel_set, sizeof(chplan_sta)); #ifdef CONFIG_RTW_DEBUG i = 0; RTW_INFO("%s: STA channel plan {", __func__); @@ -11206,7 +11206,7 @@ u32 report_join_res(_adapter *padapter, int res) 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 = res; RTW_INFO("report_join_res(%d)\n", res); @@ -11293,8 +11293,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->mac_id; @@ -11370,7 +11370,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"); @@ -11509,7 +11509,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)); } else { psta->htpriv.ht_option = false; @@ -12009,11 +12009,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->hwaddr, ETH_ALEN); + memcpy(checkalive[num_checkalive].addr, psta->hwaddr, ETH_ALEN); checkalive[num_checkalive].psta = psta; num_checkalive++; } else { - _rtw_memcpy(teardown[num_teardown].addr, psta->hwaddr, ETH_ALEN); + memcpy(teardown[num_teardown].addr, psta->hwaddr, ETH_ALEN); teardown[num_teardown].psta = psta; num_teardown++; } @@ -12037,7 +12037,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); @@ -12048,7 +12048,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", __func__, __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); } } @@ -12456,8 +12456,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); @@ -12575,9 +12575,9 @@ void issue_action_ft_request(_adapter *padapter, u8 *pTargetAddr) 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++; @@ -12589,11 +12589,11 @@ void issue_action_ft_request(_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; @@ -12635,13 +12635,13 @@ void report_ft_event(_adapter *padapter) ft_evt_parms.ies_len = pftpriv->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, pftpriv->ft_event.ies, ft_evt_parms.ies_len); + memcpy((void *)ft_evt_parms.ies, pftpriv->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; @@ -12695,7 +12695,7 @@ void report_ft_reassoc_event(_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); } #endif @@ -12909,7 +12909,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) { @@ -12917,7 +12917,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); @@ -12988,7 +12988,7 @@ u8 join_cmd_hdl(_adapter *padapter, u8 *pbuf) /* pmlmeinfo->assoc_AP_vendor = HT_IOT_PEER_MAX; */ pmlmeinfo->VHT_enable = 0; - _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 */ @@ -12998,7 +12998,7 @@ u8 join_cmd_hdl(_adapter *padapter, u8 *pbuf) report_join_res(padapter, (-4)); 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); @@ -13242,7 +13242,7 @@ static u8 rtw_scan_sparse(_adapter *adapter, struct rtw_ieee80211_channel *ch, u 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++; } } @@ -13289,7 +13289,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 (pmlmeext->channel_set[set_idx].ScanType == SCAN_PASSIVE) out[j].flags |= RTW_IEEE80211_CHAN_PASSIVE_SCAN; @@ -13351,7 +13351,7 @@ static void sitesurvey_res_reset(_adapter *adapter, struct sitesurvey_parm *parm 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; } else ss->ssid[i].SsidLength = 0; @@ -14214,8 +14214,8 @@ u8 setkey_hdl(_adapter *padapter, u8 *pbuf) 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); } @@ -14239,8 +14239,8 @@ void rtw_ap_wep_pk_setting(_adapter *adapter, struct sta_info *psta) if ((psecuritypriv->key_mask & BIT(keyid)) && (keyid == psecuritypriv->dot11PrivacyKeyIndex)) { sta_pparm.algorithm = psecuritypriv->dot11PrivacyAlgrthm; sta_pparm.keyid = keyid; - _rtw_memcpy(sta_pparm.key, &(psecuritypriv->dot11DefKey[keyid].skey[0]), 16); - _rtw_memcpy(sta_pparm.addr, psta->hwaddr, ETH_ALEN); + memcpy(sta_pparm.key, &(psecuritypriv->dot11DefKey[keyid].skey[0]), 16); + memcpy(sta_pparm.addr, psta->hwaddr, ETH_ALEN); RTW_PRINT(FUNC_ADPT_FMT"set WEP - PK with "MAC_FMT" keyid:%u\n" , FUNC_ADPT_ARG(adapter), MAC_ARG(psta->hwaddr), keyid); @@ -14441,7 +14441,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_ @@ -14713,7 +14713,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); } @@ -15111,7 +15111,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->hwaddr, ETH_ALEN); + memcpy(txmgmt.peer, ptdls_sta->hwaddr, ETH_ALEN); issue_nulldata(padapter, NULL, 1, 3, 3); @@ -15193,7 +15193,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->hwaddr, ETH_ALEN); + memcpy(txmgmt.peer, ptdls_sta->hwaddr, ETH_ALEN); issue_tdls_ch_switch_rsp(padapter, &txmgmt, false); } } @@ -15215,7 +15215,7 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf) case TDLS_TEARDOWN_STA: memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt)); txmgmt.status_code = 0; - _rtw_memcpy(txmgmt.peer, ptdls_sta->hwaddr, ETH_ALEN); + memcpy(txmgmt.peer, ptdls_sta->hwaddr, ETH_ALEN); issue_tdls_teardown(padapter, &txmgmt, true); break; diff --git a/core/rtw_mp.c b/core/rtw_mp.c index 1e59501..e123298 100644 --- a/core/rtw_mp.c +++ b/core/rtw_mp.c @@ -148,10 +148,10 @@ static void _init_mp_priv_(struct mp_priv *pmp_priv) pmp_priv->bloadefusemap = 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; pmp_priv->tx.attrib.ht_en = 1; @@ -535,11 +535,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; @@ -547,7 +547,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; @@ -597,10 +597,10 @@ u32 mp_join(PADAPTER padapter, u8 mode) tgt_network->join_res = 1; tgt_network->aid = psta->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); @@ -928,8 +928,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); @@ -960,7 +960,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); } static void fill_tx_desc_8188e(PADAPTER padapter) @@ -1041,9 +1041,9 @@ 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); + 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_MCAST(pattrib->ra); if (bmcast) { pattrib->mac_id = 1; @@ -1083,9 +1083,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; @@ -1118,7 +1118,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); @@ -2548,15 +2548,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_p2p.c b/core/rtw_p2p.c index 98105f7..7cb0e62 100644 --- a/core/rtw_p2p.c +++ b/core/rtw_p2p.c @@ -83,11 +83,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->hwaddr, ETH_ALEN); + memcpy(pcur, psta->hwaddr, ETH_ALEN); pcur += ETH_ALEN; *pcur = psta->dev_cap; @@ -97,13 +97,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) { @@ -115,7 +115,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; } @@ -178,9 +178,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++; @@ -238,9 +238,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++; @@ -316,9 +316,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++; @@ -406,9 +406,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++; @@ -593,7 +593,7 @@ u32 build_beacon_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ if (check_fwstate(pmlmepriv, _FW_LINKED)) - _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); @@ -705,7 +705,7 @@ u32 build_probe_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ if (check_fwstate(pmlmepriv, _FW_LINKED)) - _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); @@ -840,7 +840,7 @@ u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 tunnel /* Value: */ /* Associated BSSID */ if (check_fwstate(pmlmepriv, _FW_LINKED)) - _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); @@ -905,7 +905,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; } } @@ -994,7 +994,7 @@ u32 build_assoc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ if (check_fwstate(pmlmepriv, _FW_LINKED)) - _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); @@ -1093,7 +1093,7 @@ u32 build_assoc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ if (check_fwstate(pmlmepriv, _FW_LINKED)) - _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); @@ -1192,7 +1192,7 @@ u32 build_nego_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ if (check_fwstate(pmlmepriv, _FW_LINKED)) - _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); @@ -1291,7 +1291,7 @@ u32 build_nego_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ if (check_fwstate(pmlmepriv, _FW_LINKED)) - _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); @@ -1391,7 +1391,7 @@ u32 build_nego_confirm_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ if (check_fwstate(pmlmepriv, _FW_LINKED)) - _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); @@ -1491,7 +1491,7 @@ u32 build_invitation_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ if (check_fwstate(pmlmepriv, _FW_LINKED)) - _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); @@ -1604,7 +1604,7 @@ u32 build_invitation_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ if (check_fwstate(pmlmepriv, _FW_LINKED)) - _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); @@ -1717,7 +1717,7 @@ u32 build_provdisc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ if (check_fwstate(pmlmepriv, _FW_LINKED)) - _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); @@ -1817,7 +1817,7 @@ u32 build_provdisc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Value: */ /* Associated BSSID */ if (check_fwstate(pmlmepriv, _FW_LINKED)) - _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); @@ -1959,7 +1959,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 */ @@ -2046,7 +2046,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 */ @@ -2115,7 +2115,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 */ @@ -2161,7 +2161,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)) { @@ -2178,10 +2178,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; } @@ -2357,16 +2357,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(&be_tmp, pattr_content, 2);/* Config Methods */ + memcpy(&be_tmp, pattr_content, 2);/* Config Methods */ psta->config_methods = be16_to_cpu(be_tmp); pattr_content += 2; - _rtw_memcpy(psta->primary_dev_type, pattr_content, 8); + memcpy(psta->primary_dev_type, pattr_content, 8); pattr_content += 8; @@ -2382,7 +2382,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); } @@ -2395,7 +2395,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); @@ -2509,19 +2509,19 @@ u8 process_p2p_provdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint l uconfig_method = be16_to_cpu(be_tmp); 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(be_tmp); 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", __func__); @@ -2689,8 +2689,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); } } @@ -2883,8 +2883,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); } } @@ -2954,8 +2954,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 */ @@ -3035,8 +3035,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", __func__, &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; @@ -3080,7 +3080,7 @@ static void find_phase_handler(_adapter *padapter) memset((unsigned char *)&ssid, 0, sizeof(NDIS_802_11_SSID)); - _rtw_memcpy(ssid.Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN); + memcpy(ssid.Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN); ssid.SsidLength = P2P_WILDCARD_SSID_LEN; rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH); @@ -3894,9 +3894,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; @@ -3951,7 +3951,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) && !memcmp(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->status = (status == -1) ? 0xff : status; nego_info->rsp_op_ch = op_ch; nego_info->rsp_intent = intent; @@ -4048,9 +4048,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; @@ -4376,17 +4376,17 @@ void process_p2p_ps_ie(PADAPTER padapter, u8 *IEs, u32 IELength) /* NoA length should be n*(13) + 2 */ if (attr_contentlen > 2) { while (noa_offset < attr_contentlen) { - /* _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++; @@ -4797,7 +4797,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 @@ -4825,7 +4825,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 @@ -4853,7 +4853,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 @@ -4881,7 +4881,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 @@ -4909,7 +4909,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 @@ -4955,9 +4955,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 } @@ -5032,7 +5032,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 df25f59..2159686 100755 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -702,7 +702,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(&be_tmp, ptr, 2); + memcpy(&be_tmp, ptr, 2); ether_type = ntohs(be_tmp); if (ether_type == eapol_type) @@ -796,7 +796,7 @@ sint recv_ucast_pn_decache(union recv_frame *precv_frame, struct stainfo_rxcache if (!VALID_PN_CHK(pkt_pn, curr_pn)) { /* return _FAIL; */ } else - _rtw_memcpy(prxcache->iv[tid], (pdata + pattrib->hdrlen), sizeof(prxcache->iv[tid])); + memcpy(prxcache->iv[tid], (pdata + pattrib->hdrlen), sizeof(prxcache->iv[tid])); } return _SUCCESS; @@ -1252,11 +1252,11 @@ sint sta2sta_data_frame( } } else if (check_fwstate(pmlmepriv, WIFI_MP_STATE)) { - _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 @@ -1378,11 +1378,11 @@ sint ap2sta_data_frame( } else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE)) && (check_fwstate(pmlmepriv, _FW_LINKED))) { - _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 */ @@ -1491,11 +1491,11 @@ bypass_deauth7: } else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE)) && (check_fwstate(pmlmepriv, _FW_LINKED))) { /* 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 */ @@ -1711,30 +1711,30 @@ static sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_ 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: @@ -1779,33 +1779,33 @@ sint validate_recv_data_frame(_adapter *adapter, union recv_frame *precv_frame) goto exit; } - _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); ret = sta2sta_data_frame(adapter, precv_frame, &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(adapter, precv_frame, &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(adapter, precv_frame, &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; @@ -1939,8 +1939,8 @@ static sint validate_80211w_mgmt(_adapter *adapter, union recv_frame *precv_fram pattrib->hdrlen = sizeof(struct rtw_ieee80211_hdr_3addr); /* 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; mgmt_DATA = rtw_zmalloc(data_len); @@ -1950,9 +1950,9 @@ static sint validate_80211w_mgmt(_adapter *adapter, union recv_frame *precv_fram } 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); @@ -2183,7 +2183,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 + LLC_HEADER_SIZE, 2); + memcpy(ð_type, ptr + pattrib->hdrlen + pattrib->iv_len + LLC_HEADER_SIZE, 2); eth_type = ntohs((unsigned short) eth_type); if ((bDumpRxPkt == 4) && (eth_type == 0x888e)) dump_rx_packet(ptr); @@ -2249,7 +2249,7 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe) len = precvframe->u.hdr.len - rmv_len; - _rtw_memcpy(&be_tmp, ptr + rmv_len, 2); + memcpy(&be_tmp, ptr + rmv_len, 2); eth_type = ntohs(be_tmp); /* pattrib->ether_type */ pattrib->eth_type = cpu_to_le16(eth_type); @@ -2297,7 +2297,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))); @@ -2308,12 +2308,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) { be_tmp = htons(len); - _rtw_memcpy(ptr + 12, &be_tmp, 2); + memcpy(ptr + 12, &be_tmp, 2); } } @@ -2387,7 +2387,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, cpu_to_le16(pnfhdr->len)); @@ -3120,30 +3120,30 @@ static sint MPwlanhdr_to_ethhdr(union recv_frame *precvframe) rmv_len = pattrib->hdrlen + pattrib->iv_len + (bsnaphdr ? SNAP_SIZE : 0); len = precvframe->u.hdr.len - rmv_len; - _rtw_memcpy(&be_tmp, ptr + rmv_len, 2); + memcpy(&be_tmp, ptr + rmv_len, 2); eth_type = ntohs((__be16)be_tmp); /* pattrib->ether_type */ pattrib->eth_type = cpu_to_le16(eth_type); 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) { be_tmp = htons(len); - _rtw_memcpy(ptr + 12, &be_tmp, 2); + memcpy(ptr + 12, &be_tmp, 2); } be_tmp = htons(le16_to_cpu(pattrib->seq_num)); /* RTW_INFO("wlan seq = %d ,seq_num =%x\n",len,pattrib->seq_num); */ - _rtw_memcpy(ptr + 12, &be_tmp, 2); + memcpy(ptr + 12, &be_tmp, 2); if (adapter->mppriv.bRTWSmbCfg) { /* if(!memcmp(mcastheadermac, pattrib->dst, 3)) */ /* SimpleConfig Dest. */ - /* _rtw_memcpy(ptr+ETH_ALEN, pattrib->bssid, ETH_ALEN); */ + /* memcpy(ptr+ETH_ALEN, pattrib->bssid, ETH_ALEN); */ if (!memcmp(mcastheadermac, pattrib->bssid, 3)) /* SimpleConfig Dest. */ - _rtw_memcpy(ptr, pattrib->bssid, ETH_ALEN); + memcpy(ptr, pattrib->bssid, ETH_ALEN); } @@ -3199,34 +3199,34 @@ static 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; diff --git a/core/rtw_security.c b/core/rtw_security.c index bc9325b..73f24a6 100644 --- a/core/rtw_security.c +++ b/core/rtw_security.c @@ -268,8 +268,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) { @@ -324,9 +324,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; @@ -1777,7 +1777,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]; @@ -2032,7 +2032,7 @@ u32 rtw_BIP_verify(_adapter *padapter, u8 *precvframe) /* mapping to wlan header */ pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; /* save the frame body + MME */ - _rtw_memcpy(BIP_AAD + BIP_AAD_SIZE, pframe + WLAN_HDR_A3_LEN, pattrib->pkt_len - WLAN_HDR_A3_LEN); + memcpy(BIP_AAD + BIP_AAD_SIZE, pframe + WLAN_HDR_A3_LEN, pattrib->pkt_len - WLAN_HDR_A3_LEN); /* find MME IE pointer */ p = rtw_get_ie(BIP_AAD + BIP_AAD_SIZE, _MME_IE_, &len, pattrib->pkt_len - WLAN_HDR_A3_LEN); /* Baron */ @@ -2040,7 +2040,7 @@ u32 rtw_BIP_verify(_adapter *padapter, u8 *precvframe) u16 keyid = 0; u64 temp_ipn = 0; /* save packet number */ - _rtw_memcpy(&temp_ipn, p + 4, 6); + memcpy(&temp_ipn, p + 4, 6); temp_ipn = le64_to_cpu(temp_ipn); /* BIP packet number should bigger than previous BIP packet */ if (temp_ipn < pmlmeext->mgnt_80211w_IPN_rx) { @@ -2048,7 +2048,7 @@ u32 rtw_BIP_verify(_adapter *padapter, u8 *precvframe) goto BIP_exit; } /* copy key index */ - _rtw_memcpy(&keyid, p + 2, 2); + memcpy(&keyid, p + 2, 2); keyid = le16_to_cpu(keyid); if (keyid != padapter->securitypriv.dot11wBIPKeyid) { RTW_INFO("BIP key index error!\n"); @@ -2058,12 +2058,12 @@ u32 rtw_BIP_verify(_adapter *padapter, u8 *precvframe) memset(p + 2 + len - 8, 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(padapter->securitypriv.dot11wBIPKey[padapter->securitypriv.dot11wBIPKeyid].skey , BIP_AAD, ori_len, mic)) @@ -2173,7 +2173,7 @@ static int sha256_process(struct sha256_state *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; @@ -2327,7 +2327,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; @@ -2342,7 +2342,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; @@ -2397,7 +2397,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++; @@ -2835,13 +2835,13 @@ void wpa_tdls_generate_tpk(_adapter *padapter, void * sta) */ if (os_memcmp(adapter_mac_addr(padapter), psta->hwaddr, ETH_ALEN) < 0) { - _rtw_memcpy(data, adapter_mac_addr(padapter), ETH_ALEN); - _rtw_memcpy(data + ETH_ALEN, psta->hwaddr, ETH_ALEN); + memcpy(data, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(data + ETH_ALEN, psta->hwaddr, ETH_ALEN); } else { - _rtw_memcpy(data, psta->hwaddr, ETH_ALEN); - _rtw_memcpy(data + ETH_ALEN, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(data, psta->hwaddr, 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)); @@ -2878,24 +2878,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]; @@ -2934,17 +2934,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]; @@ -2976,24 +2976,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 44ee801..49f17c7 100644 --- a/core/rtw_sta_mgt.c +++ b/core/rtw_sta_mgt.c @@ -474,7 +474,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr) psta->padapter = pstapriv->padapter; - _rtw_memcpy(psta->hwaddr, hwaddr, ETH_ALEN); + memcpy(psta->hwaddr, hwaddr, ETH_ALEN); index = wifi_mac_hash(hwaddr); @@ -499,7 +499,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, 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); + memcpy(&psta->sta_recvpriv.rxcache.tid_rxseq[i], &wRxSeqInitialValue, 2); memset(&psta->sta_recvpriv.rxcache.iv[i], 0, sizeof(psta->sta_recvpriv.rxcache.iv[i])); } @@ -1035,7 +1035,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++; } @@ -1120,7 +1120,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 9589ac4..ac1d769 100644 --- a/core/rtw_tdls.c +++ b/core/rtw_tdls.c @@ -192,9 +192,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++; @@ -317,7 +317,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; @@ -462,9 +462,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_ , 82, (u8 *)FTIE.mic_ctrl, &(pattrib->pktlen)); } } @@ -485,9 +485,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)); } @@ -552,7 +552,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)); } @@ -588,13 +588,13 @@ u8 *rtw_tdls_set_linkid(u8 *pframe, struct pkt_attrib *pattrib, u8 init) { u8 link_id_addr[18] = {0}; if (init == true) { - _rtw_memcpy(link_id_addr, pattrib->ra, 6); - _rtw_memcpy((link_id_addr + 6), pattrib->src, 6); - _rtw_memcpy((link_id_addr + 12), pattrib->dst, 6); + memcpy(link_id_addr, pattrib->ra, 6); + memcpy((link_id_addr + 6), pattrib->src, 6); + memcpy((link_id_addr + 12), pattrib->dst, 6); } else { - _rtw_memcpy(link_id_addr, pattrib->ra, 6); - _rtw_memcpy((link_id_addr + 6), pattrib->dst, 6); - _rtw_memcpy((link_id_addr + 12), pattrib->src, 6); + memcpy(link_id_addr, pattrib->ra, 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)); } @@ -617,8 +617,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)); } @@ -745,12 +745,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 (!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; @@ -782,7 +782,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", __func__, 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]); @@ -816,10 +816,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; @@ -858,10 +858,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; @@ -906,10 +906,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); @@ -990,10 +990,10 @@ int _issue_tdls_teardown(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, u8 wai 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; @@ -1056,10 +1056,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; @@ -1095,10 +1095,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; @@ -1136,10 +1136,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; @@ -1188,12 +1188,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++; @@ -1235,10 +1235,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->hwaddr, 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->hwaddr, 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; @@ -1280,10 +1280,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->hwaddr, 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->hwaddr, 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; @@ -1333,10 +1333,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->hwaddr, 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->hwaddr, 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; @@ -1379,10 +1379,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; @@ -1437,11 +1437,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 (!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.RxPWDBAll; } else { if (ptdlsinfo->ss_record.RxPWDBAll < pattrib->phy_info.RxPWDBAll) { - _rtw_memcpy(ptdlsinfo->ss_record.macaddr, psa, ETH_ALEN); + memcpy(ptdlsinfo->ss_record.macaddr, psa, ETH_ALEN); ptdlsinfo->ss_record.RxPWDBAll = pattrib->phy_info.RxPWDBAll; } } @@ -1454,7 +1454,7 @@ int On_TDLS_Dis_Rsp(_adapter *padapter, union recv_frame *precv_frame) goto exit; } else { if (pattrib->phy_info.RxPWDBAll > 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; @@ -1467,7 +1467,7 @@ int On_TDLS_Dis_Rsp(_adapter *padapter, union recv_frame *precv_frame) if (pattrib->phy_info.RxPWDBAll + TDLS_SIGNAL_THRESH >= undecorated_smoothed_pwdb) { RTW_INFO("pattrib->RxPWDBAll=%d, pdmpriv->undecorated_smoothed_pwdb=%d\n", pattrib->phy_info.RxPWDBAll, undecorated_smoothed_pwdb); - _rtw_memcpy(txmgmt.peer, psa, ETH_ALEN); + memcpy(txmgmt.peer, psa, ETH_ALEN); issue_tdls_setup_req(padapter, &txmgmt, false); } } @@ -1559,14 +1559,14 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame) 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; @@ -1578,7 +1578,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame) 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 (!memcmp(ppairwise_cipher + 4 * k, RSN_CIPHER_SUITE_CCMP, 4) == true) @@ -1595,7 +1595,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame) 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) @@ -1638,7 +1638,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame) 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; @@ -1648,7 +1648,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame) /* Update station supportRate */ ptdls_sta->bssratelen = supportRateNum; - _rtw_memcpy(ptdls_sta->bssrateset, supportRate, supportRateNum); + memcpy(ptdls_sta->bssrateset, supportRate, supportRateNum); if (!(ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE)) ptdlsinfo->sta_cnt++; @@ -1663,7 +1663,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame) } 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); @@ -1723,7 +1723,7 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame) - PAYLOAD_TYPE_LEN - FIXED_IE; - _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", __func__, status_code); @@ -1740,14 +1740,14 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame) 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; @@ -1757,7 +1757,7 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame) 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 (!memcmp(ppairwise_cipher + 4 * k, RSN_CIPHER_SUITE_CCMP, 4) == true) verify_ccmp = 1; @@ -1773,7 +1773,7 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame) 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; @@ -1798,8 +1798,8 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame) } 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); @@ -1829,7 +1829,7 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame) } 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_) { @@ -1893,7 +1893,7 @@ int On_TDLS_Setup_Cfm(_adapter *padapter, union recv_frame *precv_frame) - PAYLOAD_TYPE_LEN - FIXED_IE; - _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", __func__, status_code); @@ -1990,7 +1990,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 @@ -2258,10 +2258,10 @@ sint On_TDLS_Ch_Switch_Req(_adapter *padapter, union recv_frame *precv_frame) /* Todo: check status */ txmgmt.status_code = 0; - _rtw_memcpy(txmgmt.peer, psa, ETH_ALEN); + memcpy(txmgmt.peer, psa, ETH_ALEN); if (!memcmp(pchsw_info->addr, zaddr, ETH_ALEN) == true) - _rtw_memcpy(pchsw_info->addr, ptdls_sta->hwaddr, ETH_ALEN); + memcpy(pchsw_info->addr, ptdls_sta->hwaddr, ETH_ALEN); if (ATOMIC_READ(&pchsw_info->chsw_on) == false) rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_CH_SW_START); @@ -2319,7 +2319,7 @@ sint On_TDLS_Ch_Switch_Rsp(_adapter *padapter, union recv_frame *precv_frame) - PAYLOAD_TYPE_LEN - FIXED_IE; - _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); @@ -2337,13 +2337,13 @@ sint On_TDLS_Ch_Switch_Rsp(_adapter *padapter, union recv_frame *precv_frame) 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; @@ -2429,7 +2429,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); @@ -2446,7 +2446,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); @@ -2469,7 +2469,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); } } @@ -2537,7 +2537,7 @@ void rtw_build_tdls_setup_rsp_ies(_adapter *padapter, struct xmit_frame *pxmitfr if (pattrib->encrypt && ptdls_sta != NULL) { 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); } } @@ -2924,7 +2924,7 @@ void _tdls_tpk_timer_hdl(void *FunctionContext) if (ptdls_sta->TPK_count >= (ptdls_sta->TDLS_PeerKey_Lifetime - 3)) { RTW_INFO("[TDLS] %s, Re-Setup TDLS link with "MAC_FMT" since TPK lifetime expires!\n", __func__, MAC_ARG(ptdls_sta->hwaddr)); ptdls_sta->TPK_count = 0; - _rtw_memcpy(txmgmt.peer, ptdls_sta->hwaddr, ETH_ALEN); + memcpy(txmgmt.peer, ptdls_sta->hwaddr, ETH_ALEN); issue_tdls_setup_req(ptdls_sta->padapter, &txmgmt, false); } @@ -2983,7 +2983,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->hwaddr, ETH_ALEN); + memcpy(txmgmt.peer, ptdls_sta->hwaddr, ETH_ALEN); txmgmt.status_code = _RSON_TDLS_TEAR_UN_RSN_; if (ptdls_sta != NULL) { @@ -3002,7 +3002,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->hwaddr, ETH_ALEN); + memcpy(txmgmt.peer, ptdls_sta->hwaddr, ETH_ALEN); txmgmt.status_code = _RSON_TDLS_TEAR_TOOFAR_; if (ptdls_sta != NULL) { diff --git a/core/rtw_wlan_util.c b/core/rtw_wlan_util.c index 25338c1..f81fc96 100644 --- a/core/rtw_wlan_util.c +++ b/core/rtw_wlan_util.c @@ -372,7 +372,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) @@ -770,7 +770,7 @@ __inline u8 *get_my_bssid(WLAN_BSSID_EX *pnetwork) u16 get_beacon_interval(WLAN_BSSID_EX *bss) { __le16 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); } @@ -887,7 +887,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); @@ -901,8 +901,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); } @@ -1409,10 +1409,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); @@ -1568,7 +1568,7 @@ int WMM_param_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE) if (!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; } @@ -1998,7 +1998,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); return; } @@ -2043,7 +2043,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) @@ -2196,7 +2196,7 @@ int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len, /* Checking for channel */ if (elems.ds_params && elems.ds_params_len == sizeof(recv_beacon->bcn_channel)) - _rtw_memcpy(&recv_beacon->bcn_channel, elems.ds_params, + memcpy(&recv_beacon->bcn_channel, elems.ds_params, sizeof(recv_beacon->bcn_channel)); else if (pht_info) /* In 5G, some ap do not have DSSET IE checking HT info for channel */ @@ -2212,7 +2212,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; } else ; /* means hidden ssid */ @@ -2242,7 +2242,7 @@ void rtw_dump_bcn_keys(struct beacon_keys *recv_beacon) char *p; 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_INFO("%s: ssid = %s\n", __func__, ssid); @@ -2283,7 +2283,7 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len) /* don't care hidden ssid, use current beacon ssid directly */ if (recv_beacon.ssid_len == 0) { - _rtw_memcpy(recv_beacon.ssid, pmlmepriv->cur_beacon_keys.ssid, + memcpy(recv_beacon.ssid, pmlmepriv->cur_beacon_keys.ssid, pmlmepriv->cur_beacon_keys.ssid_len); recv_beacon.ssid_len = pmlmepriv->cur_beacon_keys.ssid_len; } @@ -2409,7 +2409,7 @@ void process_csa_ie(_adapter *padapter, u8 *pframe, uint pkt_len) switch (pIE->ElementID) { case _CH_SWTICH_ANNOUNCE_: padapter->mlmepriv.handle_dfs = true; - _rtw_memcpy(&new_ch_no, pIE->data + 1, 1); + memcpy(&new_ch_no, pIE->data + 1, 1); rtw_set_csa_cmd(padapter, new_ch_no); break; default: @@ -2681,11 +2681,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); @@ -2898,10 +2898,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; } } @@ -2920,13 +2920,13 @@ int rtw_ies_get_supported_rate(u8 *ies, uint ies_len, u8 *rate_set, u8 *rate_num if (ie == NULL) goto ext_rate; - _rtw_memcpy(rate_set, ie + 2, ie_len); + memcpy(rate_set, ie + 2, ie_len); *rate_num = ie_len; ext_rate: ie = rtw_get_ie(ies, _EXT_SUPPORTEDRATES_IE_, &ie_len, ies_len); if (ie) { - _rtw_memcpy(rate_set + *rate_num, ie + 2, ie_len); + memcpy(rate_set + *rate_num, ie + 2, ie_len); *rate_num += ie_len; } @@ -3575,7 +3575,7 @@ void rtw_get_current_ip_address(PADAPTER padapter, u8 *pcurrentip) ipaddress[3] = my_ifa_list->ifa_address >> 24; RTW_INFO("%s: %d.%d.%d.%d ==========\n", __func__, ipaddress[0], ipaddress[1], ipaddress[2], ipaddress[3]); - _rtw_memcpy(pcurrentip, ipaddress, 4); + memcpy(pcurrentip, ipaddress, 4); } } } @@ -3704,43 +3704,43 @@ u8 rtw_set_default_pattern(_adapter *adapter) for (index = 0 ; index < DEFAULT_PATTERN_NUM ; index++) { switch (index) { case 0: - _rtw_memcpy(pwrpriv->patterns[index].content, + memcpy(pwrpriv->patterns[index].content, adapter_mac_addr(adapter), ETH_ALEN); - _rtw_memcpy(pwrpriv->patterns[index].content + ETH_TYPE_OFFSET, + memcpy(pwrpriv->patterns[index].content + ETH_TYPE_OFFSET, &ip_protocol, sizeof(ip_protocol)); - _rtw_memcpy(pwrpriv->patterns[index].content + PROTOCOL_OFFSET, + memcpy(pwrpriv->patterns[index].content + PROTOCOL_OFFSET, &tcp_protocol, sizeof(tcp_protocol)); - _rtw_memcpy(pwrpriv->patterns[index].content + IP_OFFSET, + memcpy(pwrpriv->patterns[index].content + IP_OFFSET, ¤tip, sizeof(currentip)); - _rtw_memcpy(pwrpriv->patterns[index].mask, + memcpy(pwrpriv->patterns[index].mask, &unicast_mask, sizeof(unicast_mask)); pwrpriv->patterns[index].len = IP_OFFSET + sizeof(currentip); break; case 1: - _rtw_memcpy(pwrpriv->patterns[index].content, + memcpy(pwrpriv->patterns[index].content, adapter_mac_addr(adapter), ETH_ALEN); - _rtw_memcpy(pwrpriv->patterns[index].content + ETH_TYPE_OFFSET, + memcpy(pwrpriv->patterns[index].content + ETH_TYPE_OFFSET, &ip_protocol, sizeof(ip_protocol)); - _rtw_memcpy(pwrpriv->patterns[index].content + PROTOCOL_OFFSET, + memcpy(pwrpriv->patterns[index].content + PROTOCOL_OFFSET, &icmp_protocol, sizeof(icmp_protocol)); - _rtw_memcpy(pwrpriv->patterns[index].content + IP_OFFSET, + memcpy(pwrpriv->patterns[index].content + IP_OFFSET, ¤tip, sizeof(currentip)); - _rtw_memcpy(pwrpriv->patterns[index].mask, + memcpy(pwrpriv->patterns[index].mask, &unicast_mask, sizeof(unicast_mask)); pwrpriv->patterns[index].len = IP_OFFSET + sizeof(currentip); break; case 2: - _rtw_memcpy(pwrpriv->patterns[index].content, &multicast_addr, + memcpy(pwrpriv->patterns[index].content, &multicast_addr, sizeof(multicast_addr)); - _rtw_memcpy(pwrpriv->patterns[index].content + ETH_TYPE_OFFSET, + memcpy(pwrpriv->patterns[index].content + ETH_TYPE_OFFSET, &ip_protocol, sizeof(ip_protocol)); - _rtw_memcpy(pwrpriv->patterns[index].content + PROTOCOL_OFFSET, + memcpy(pwrpriv->patterns[index].content + PROTOCOL_OFFSET, &udp_protocol, sizeof(udp_protocol)); - _rtw_memcpy(pwrpriv->patterns[index].content + IP_OFFSET, + memcpy(pwrpriv->patterns[index].content + IP_OFFSET, &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 = IP_OFFSET + sizeof(multicast_ip); @@ -4011,7 +4011,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 71066ef..30d1fa7 100644 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -966,7 +966,7 @@ static s32 update_attrib_sec_info(_adapter *padapter, struct pkt_attrib *pattrib else 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; @@ -996,7 +996,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 && ((padapter->securitypriv.sw_encrypt) || (psecuritypriv->hw_decrypted == false))) { @@ -1181,26 +1181,26 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr pattrib->ether_type = ntohs(etherhdr.h_proto); - _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)) || (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))) { - _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)) - _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); @@ -1499,7 +1499,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; @@ -1593,9 +1593,9 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib) #ifdef CONFIG_TDLS if (pattrib->direct_link) { /* 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; @@ -1606,9 +1606,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; @@ -1616,17 +1616,17 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib) } else if ((check_fwstate(pmlmepriv, WIFI_AP_STATE))) { /* 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)) || (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))) { - _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; @@ -1860,30 +1860,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; } @@ -2003,7 +2003,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; } @@ -2018,7 +2018,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; } @@ -2176,7 +2176,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? RT_TRACE(_module_rtl871x_xmit_c_, _drv_notice_, ("rtw_xmitframe_coalesce: keyid=%d pattrib->iv[3]=%.2x pframe=%.2x %.2x %.2x %.2x\n", @@ -2197,10 +2197,10 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra /* 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; @@ -2233,10 +2233,10 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra /* 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; @@ -2260,7 +2260,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; } @@ -2383,7 +2383,7 @@ s32 rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxm /* adding icv, if necessary... */ if (pattrib->iv_len) { - _rtw_memcpy(pframe, pattrib->iv, pattrib->iv_len); + memcpy(pframe, pattrib->iv, pattrib->iv_len); pframe += pattrib->iv_len; @@ -2408,7 +2408,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; } @@ -2428,7 +2428,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); } @@ -2509,7 +2509,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame /* octent 0 and 1 is key index ,BIP keyid is 4 or 5, LSB only need octent 0 */ MME[0] = padapter->securitypriv.dot11wBIPKeyid; /* copy packet number */ - _rtw_memcpy(&MME[2], &pmlmeext->mgnt_80211w_IPN, 6); + memcpy(&MME[2], &pmlmeext->mgnt_80211w_IPN, 6); /* increase the packet number */ pmlmeext->mgnt_80211w_IPN++; @@ -2520,21 +2520,21 @@ 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); /* calculate mic */ if (omac1_aes_128(padapter->securitypriv.dot11wBIPKey[padapter->securitypriv.dot11wBIPKeyid].skey , BIP_AAD, BIP_AAD_SIZE + frame_body_len, mic)) goto xmitframe_coalesce_fail; /* 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); } else { /* unicast mgmt frame TX */ /* start to encrypt mgmt frame */ if (subtype == WIFI_DEAUTH || subtype == WIFI_DISASSOC || @@ -2573,7 +2573,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame RTW_INFO("=======\n"); }*/ 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); /* To use wrong key */ if (pattrib->key_type == IEEE80211W_WRONG_KEY) { @@ -2582,7 +2582,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame } /* bakeup original management packet */ - _rtw_memcpy(tmp_buf, pframe, pattrib->pktlen); + memcpy(tmp_buf, pframe, pattrib->pktlen); /* move to data portion */ pframe += pattrib->hdrlen; @@ -2600,17 +2600,17 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame goto xmitframe_coalesce_fail; } /* 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 */ pattrib->pktlen += pattrib->iv_len; 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 */ @@ -3825,7 +3825,7 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev) pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; - _rtw_memcpy(pframe, (void *)buf, len); + memcpy(pframe, (void *)buf, len); pattrib->pktlen = len; @@ -3866,7 +3866,7 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev) pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; - _rtw_memcpy(pframe, (void *)buf, len); + memcpy(pframe, (void *)buf, len); pattrib->pktlen = len; diff --git a/hal/hal_btcoex.c b/hal/hal_btcoex.c index ae2ae35..66e1503 100644 --- a/hal/hal_btcoex.c +++ b/hal/hal_btcoex.c @@ -246,7 +246,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; } @@ -589,7 +589,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 = 1; GLBtcBtMpRptWiFiOK = 0; @@ -1191,7 +1191,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 */ @@ -1205,7 +1205,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 */ @@ -1685,7 +1685,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]; } @@ -1718,7 +1718,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) */ @@ -1728,7 +1728,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((void *)&gl_coex_offload.h2c_record[opcode].h2c_buf[0], (void *)pcol_h2c, col_h2c_len); + memmove((void *)&gl_coex_offload.h2c_record[opcode].h2c_buf[0], (void *)pcol_h2c, col_h2c_len); h2c_status = halbtcoutsrc_send_h2c(Adapter, pcol_h2c, col_h2c_len); @@ -3339,7 +3339,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; _rtw_up_sema(&GLBtcBtMpRptSema); } @@ -3482,7 +3482,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 3501b06..6397d43 100644 --- a/hal/hal_com.c +++ b/hal/hal_com.c @@ -1599,7 +1599,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__); @@ -1631,7 +1631,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__); @@ -1680,7 +1680,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); @@ -1697,13 +1697,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) { @@ -1974,17 +1974,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; } } @@ -2171,7 +2171,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; } } @@ -3151,9 +3151,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); @@ -3451,7 +3451,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]; @@ -3484,7 +3484,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*/ @@ -3501,7 +3501,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 { @@ -3509,24 +3509,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); @@ -4176,7 +4176,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; @@ -4230,9 +4230,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++; */ @@ -4262,20 +4262,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; } @@ -4283,7 +4283,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); @@ -4321,7 +4321,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; @@ -4333,7 +4333,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; } @@ -4341,7 +4341,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_ @@ -4357,7 +4357,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 */ { @@ -4388,14 +4388,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; @@ -4493,10 +4493,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); @@ -4510,7 +4510,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; @@ -4519,7 +4519,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; @@ -4538,12 +4538,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; } @@ -4599,7 +4599,7 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p if (!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; } } @@ -4641,9 +4641,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 */ @@ -4656,7 +4656,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 */ @@ -4669,7 +4669,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 */ @@ -4694,7 +4694,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 */ @@ -4729,7 +4729,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 */ @@ -4806,8 +4806,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); @@ -4998,7 +4998,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 */ @@ -5100,7 +5100,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 */ @@ -5136,7 +5136,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)) { @@ -5150,11 +5150,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; } @@ -5208,7 +5208,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); @@ -5316,8 +5316,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); @@ -5453,9 +5453,9 @@ static 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++; */ @@ -5469,13 +5469,13 @@ static 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; /* 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; @@ -5483,7 +5483,7 @@ static 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; } @@ -5555,10 +5555,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; } @@ -5594,21 +5594,21 @@ void rtw_hal_construct_NullFunctionData( 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, StaAddr, ETH_ALEN); + memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, StaAddr, ETH_ALEN); break; case Ndis802_11APMode: SetFrDs(fctrl); - _rtw_memcpy(pwlanhdr->addr1, StaAddr, 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, StaAddr, 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, StaAddr, 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, StaAddr, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); break; } @@ -5653,9 +5653,9 @@ static void rtw_hal_construct_ProbeRsp(_adapter *padapter, u8 *pframe, u32 *pLen fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; - _rtw_memcpy(pwlanhdr->addr1, StaAddr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, mac, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, bssid, ETH_ALEN); + memcpy(pwlanhdr->addr1, StaAddr, ETH_ALEN); + memcpy(pwlanhdr->addr2, mac, ETH_ALEN); + memcpy(pwlanhdr->addr3, bssid, ETH_ALEN); SetSeqNum(pwlanhdr, 0); set_frame_sub_type(fctrl, WIFI_PROBERSP); @@ -5666,7 +5666,7 @@ static void rtw_hal_construct_ProbeRsp(_adapter *padapter, u8 *pframe, u32 *pLen 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; @@ -5718,7 +5718,7 @@ static void rtw_hal_append_tkip_mic(PADAPTER padapter, payload += 36; - _rtw_memcpy(payload, &(mic[0]), 8); + memcpy(payload, &(mic[0]), 8); } /* * Description: @@ -5757,9 +5757,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); @@ -5811,7 +5811,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 */ @@ -5871,10 +5871,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); @@ -5908,31 +5908,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; @@ -5944,7 +5944,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; @@ -5961,7 +5961,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; @@ -5978,47 +5978,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; @@ -6059,13 +6059,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); @@ -6112,7 +6112,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 */ @@ -6124,7 +6124,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 */ @@ -6196,7 +6196,7 @@ void rtw_hal_set_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index, RTW_INFO("LocRemoteCtrlInfo: %d\n", rsvd_page_loc->LocRemoteCtrlInfo); - _rtw_memcpy(pframe + index - tx_desc, cur_dot11txpn, _AES_IV_LEN_); + memcpy(pframe + index - tx_desc, cur_dot11txpn, _AES_IV_LEN_); CurtPktPageNum = (u8)PageNum(_AES_IV_LEN_, page_size); @@ -6214,8 +6214,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 */ @@ -6226,25 +6226,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; } @@ -6439,7 +6439,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); @@ -6782,7 +6782,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); @@ -6971,7 +6971,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; } } @@ -9319,7 +9319,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; } @@ -9328,7 +9328,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 @@ -9830,7 +9830,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])); } diff --git a/hal/hal_com_phycfg.c b/hal/hal_com_phycfg.c index 0513da4..dc71d12 100644 --- a/hal/hal_com_phycfg.c +++ b/hal/hal_com_phycfg.c @@ -3967,7 +3967,7 @@ phy_ConfigMACWithParaFile( rtStatus = _SUCCESS; pHalData->mac_reg = rtw_zvmalloc(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", __func__); @@ -3975,7 +3975,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", __func__); @@ -4046,7 +4046,7 @@ phy_ConfigBBWithParaFile( rtStatus = _SUCCESS; pBuf = rtw_zvmalloc(rlen); if (pBuf) { - _rtw_memcpy(pBuf, pHalData->para_file_buf, rlen); + memcpy(pBuf, pHalData->para_file_buf, rlen); *pBufLen = rlen; switch (ConfigType) { @@ -4063,7 +4063,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", __func__); @@ -4424,7 +4424,7 @@ phy_ConfigBBWithPgParaFile( rtStatus = _SUCCESS; pHalData->bb_phy_reg_pg = rtw_zvmalloc(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", __func__); @@ -4432,7 +4432,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", __func__); @@ -4473,7 +4473,7 @@ phy_ConfigBBWithMpParaFile( rtStatus = _SUCCESS; pHalData->bb_phy_reg_mp = rtw_zvmalloc(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", __func__); @@ -4481,7 +4481,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", __func__); @@ -4577,7 +4577,7 @@ PHY_ConfigRFWithParaFile( rtStatus = _SUCCESS; pBuf = rtw_zvmalloc(rlen); if (pBuf) { - _rtw_memcpy(pBuf, pHalData->para_file_buf, rlen); + memcpy(pBuf, pHalData->para_file_buf, rlen); *pBufLen = rlen; switch (eRFPath) { @@ -4594,7 +4594,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", __func__); @@ -4772,7 +4772,7 @@ PHY_ConfigRFWithTxPwrTrackParaFile( rtStatus = _SUCCESS; pHalData->rf_tx_pwr_track = rtw_zvmalloc(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", __func__); @@ -4780,7 +4780,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", __func__); @@ -5089,7 +5089,7 @@ PHY_ConfigRFWithPowerLimitTableParaFile( rtStatus = _SUCCESS; pHalData->rf_tx_pwr_lmt = rtw_zvmalloc(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", __func__); @@ -5097,7 +5097,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", __func__); diff --git a/hal/hal_intf.c b/hal/hal_intf.c index 6e250dd..7cde539 100644 --- a/hal/hal_intf.c +++ b/hal/hal_intf.c @@ -367,7 +367,7 @@ s32 rtw_hal_mgnt_xmit(_adapter *padapter, struct xmit_frame *pmgntframe) subtype = get_frame_sub_type(pframe); /* bit(7)~bit(2) */ /* pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; */ - /* _rtw_memcpy(pmgntframe->attrib.ra, pwlanhdr->addr1, ETH_ALEN); */ + /* memcpy(pmgntframe->attrib.ra, pwlanhdr->addr1, ETH_ALEN); */ #ifdef CONFIG_IEEE80211W if (padapter->securitypriv.binstallBIPkey == true && (subtype == WIFI_DEAUTH || subtype == WIFI_DISASSOC || diff --git a/hal/hal_mcc.c b/hal/hal_mcc.c index 5512119..ee8cae0 100644 --- a/hal/hal_mcc.c +++ b/hal/hal_mcc.c @@ -86,7 +86,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]; /* 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) */ @@ -508,9 +508,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; } @@ -551,7 +551,7 @@ u8 rtw_hal_dl_mcc_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 *index, pmlmeext = &iface->mlmeextpriv; pmlmeinfo = &pmlmeext->mlmext_info; - _rtw_memcpy(bssid, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); + memcpy(bssid, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); rtw_hal_construct_NullFunctionData(iface , &pframe[*index], &len, bssid, false, 0, 0, false); rtw_hal_fill_fake_txdesc(iface, &pframe[*index-tx_desc], @@ -1852,7 +1852,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; diff --git a/hal/hal_usb.c b/hal/hal_usb.c index bfc11c4..cb4278d 100644 --- a/hal/hal_usb.c +++ b/hal/hal_usb.c @@ -203,7 +203,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 { @@ -428,7 +428,7 @@ int usb_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata) wvalue = (u16)(addr & 0x0000ffff); len = length; - _rtw_memcpy(buf, pdata, len); + memcpy(buf, pdata, len); ret = usbctrl_vendorreq(pintfhdl, request, wvalue, index, buf, len, requesttype); diff --git a/hal/phydm/phydm_interface.c b/hal/phydm/phydm_interface.c index c191163..bc79567 100644 --- a/hal/phydm/phydm_interface.c +++ b/hal/phydm/phydm_interface.c @@ -196,7 +196,7 @@ odm_move_memory( u32 length ) { - _rtw_memcpy(p_dest, p_src, length); + memcpy(p_dest, p_src, length); } void odm_memory_set( diff --git a/hal/rtl8188e_cmd.c b/hal/rtl8188e_cmd.c index 4a89693..0b3b218 100644 --- a/hal/rtl8188e_cmd.c +++ b/hal/rtl8188e_cmd.c @@ -104,11 +104,11 @@ s32 FillH2CCmd_88E(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); + memcpy((u8 *)(&h2c_cmd) + 1, pCmdBuffer, 3); ext_cmd_len = CmdLen - 3; - _rtw_memcpy((u8 *)(&h2c_cmd_ex), pCmdBuffer + 3, ext_cmd_len); + memcpy((u8 *)(&h2c_cmd_ex), pCmdBuffer + 3, ext_cmd_len); /* Write Ext command */ msgbox_ex_addr = REG_HMEBOX_EXT_0 + (h2c_box_num * RTL88E_EX_MESSAGE_BOX_SIZE); @@ -324,9 +324,9 @@ static void ConstructBeacon(_adapter *padapter, u8 *pframe, u32 *pLength) 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++; */ @@ -340,13 +340,13 @@ static void ConstructBeacon(_adapter *padapter, u8 *pframe, u32 *pLength) 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; /* 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; @@ -354,7 +354,7 @@ static void ConstructBeacon(_adapter *padapter, u8 *pframe, u32 *pLength) 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; } @@ -425,10 +425,10 @@ static void ConstructPSPoll(_adapter *padapter, u8 *pframe, u32 *pLength) 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; } @@ -464,21 +464,21 @@ static void ConstructNullFunctionData( 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, StaAddr, ETH_ALEN); + memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, StaAddr, ETH_ALEN); break; case Ndis802_11APMode: SetFrDs(fctrl); - _rtw_memcpy(pwlanhdr->addr1, StaAddr, 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, StaAddr, 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, StaAddr, 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, StaAddr, ETH_ALEN); + memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); break; } diff --git a/hal/rtl8188e_hal_init.c b/hal/rtl8188e_hal_init.c index bdf48c3..4395672 100644 --- a/hal/rtl8188e_hal_init.c +++ b/hal/rtl8188e_hal_init.c @@ -316,12 +316,12 @@ static void efuse_read_phymap_from_txpktbuf( RTW_INFO("%s len:%u, lenbak:%u, aaa:%u, aaabak:%u\n", __func__, len, lenbak, aaa, aaabak); - _rtw_memcpy(pos, ((u8 *)&lo32) + 2, (limit >= count + 2) ? 2 : limit - count); + memcpy(pos, ((u8 *)&lo32) + 2, (limit >= count + 2) ? 2 : limit - count); count += (limit >= count + 2) ? 2 : limit - count; pos = content + count; } else { - _rtw_memcpy(pos, ((u8 *)&lo32), (limit >= count + 4) ? 4 : limit - count); + memcpy(pos, ((u8 *)&lo32), (limit >= count + 4) ? 4 : limit - count); count += (limit >= count + 4) ? 4 : limit - count; pos = content + count; @@ -329,7 +329,7 @@ static void efuse_read_phymap_from_txpktbuf( } if (limit > count && len - 2 > count) { - _rtw_memcpy(pos, (u8 *)&hi32, (limit >= count + 4) ? 4 : limit - count); + memcpy(pos, (u8 *)&hi32, (limit >= count + 4) ? 4 : limit - count); count += (limit >= count + 4) ? 4 : limit - count; pos = content + count; } @@ -468,10 +468,10 @@ void rtw_IOL_cmd_tx_pkt_buf_dump(ADAPTER *Adapter, int data_len) rstatus = (reg_140 = rtw_read32(Adapter, REG_PKTBUF_DBG_CTRL) & BIT24); if (rstatus) { fifo_data = rtw_read32(Adapter, REG_PKTBUF_DBG_DATA_L); - _rtw_memcpy(pbuf + (addr * 8), &fifo_data , 4); + memcpy(pbuf + (addr * 8), &fifo_data , 4); fifo_data = rtw_read32(Adapter, REG_PKTBUF_DBG_DATA_H); - _rtw_memcpy(pbuf + (addr * 8 + 4), &fifo_data, 4); + memcpy(pbuf + (addr * 8 + 4), &fifo_data, 4); } rtw_usleep_os(2); diff --git a/hal/rtl8188eu_xmit.c b/hal/rtl8188eu_xmit.c index 5f4ae41..0241551 100644 --- a/hal/rtl8188eu_xmit.c +++ b/hal/rtl8188eu_xmit.c @@ -1244,7 +1244,7 @@ s32 rtl8188eu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt) /* */ skb_put(pxmit_skb, len + TXDESC_SIZE); pxmitbuf = pxmitbuf + TXDESC_SIZE; - _rtw_memcpy(pxmitbuf, skb->data, len); + memcpy(pxmitbuf, skb->data, len); /* RTW_INFO("mgnt_xmit, len=%x\n", pxmit_skb->len); */ diff --git a/hal/usb_ops_linux.c b/hal/usb_ops_linux.c index 4315a51..d2782f1 100644 --- a/hal/usb_ops_linux.c +++ b/hal/usb_ops_linux.c @@ -35,13 +35,13 @@ void interrupt_handler_8188eu(_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); #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/osdep_service.h b/include/osdep_service.h index cea0d43..430d17a 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -254,10 +254,6 @@ void _rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *addr, dma_a extern void *rtw_malloc2d(int h, int w, size_t size); extern void rtw_mfree2d(void *pbuf, int h, int w, int size); -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_init_listhead(_list *list); extern u32 rtw_is_list_empty(_list *phead); extern void rtw_list_insert_head(_list *plist, _list *phead); diff --git a/os_dep/ioctl_cfg80211.c b/os_dep/ioctl_cfg80211.c index be5a83e..5000813 100644 --- a/os_dep/ioctl_cfg80211.c +++ b/os_dep/ioctl_cfg80211.c @@ -189,28 +189,28 @@ static struct ieee80211_channel rtw_5ghz_a_channels[] = { static void rtw_2g_channels_init(struct ieee80211_channel *channels) { - _rtw_memcpy((void *)channels, (void *)rtw_2ghz_channels, + memcpy((void *)channels, (void *)rtw_2ghz_channels, sizeof(struct ieee80211_channel) * RTW_2G_CHANNELS_NUM ); } static void rtw_5g_channels_init(struct ieee80211_channel *channels) { - _rtw_memcpy((void *)channels, (void *)rtw_5ghz_a_channels, + memcpy((void *)channels, (void *)rtw_5ghz_a_channels, sizeof(struct ieee80211_channel) * RTW_5G_CHANNELS_NUM ); } static 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 ); } static 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 ); } @@ -477,20 +477,20 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net /* pmlmeext->mgnt_seq++; */ if (pnetwork->network.Reserved[0] == 1) { /* 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); *((__le64 *)(pbuf + len)) = cpu_to_le64(notify_timestamp); len += pnetwork->network.IELength; @@ -600,7 +600,7 @@ void rtw_cfg80211_ibss_indicate_connect(_adapter *padapter) if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) ) { - _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)); @@ -927,7 +927,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; @@ -943,7 +943,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("%s, set group_key, WEP\n", __func__); - _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) @@ -954,12 +954,12 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa 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)); /* DEBUG_ERR("set key length :param->u.crypt.key_len=%d\n", 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; @@ -968,7 +968,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa 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) { @@ -976,7 +976,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa RTW_INFO("BIP key_len=%d , index=%d\n", param->u.crypt.key_len, param->u.crypt.idx); /* save the IGTK key, length 16 bytes */ - _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)); /* RTW_INFO("IGTK key below:\n"); for(no=0;no<16;no++) printk(" %02x ", padapter->securitypriv.dot11wBIPKey[param->u.crypt.idx].skey[no]); @@ -1016,7 +1016,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 (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { 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("%s, set pairwise key, WEP\n", __func__); @@ -1031,8 +1031,8 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa /* DEBUG_ERR("set key length :param->u.crypt.key_len=%d\n", param->u.crypt.key_len); */ /* 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; @@ -1055,7 +1055,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa } else { /* group key??? */ if (strcmp(param->u.crypt.alg, "WEP") == 0) { - _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) @@ -1063,19 +1063,19 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa } else if (strcmp(param->u.crypt.alg, "TKIP") == 0) { 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)); /* DEBUG_ERR("set key length :param->u.crypt.key_len=%d\n", 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) { 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)); } else psecuritypriv->dot118021XGrpPrivacy = _NO_PRIVACY_; @@ -1177,7 +1177,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; @@ -1216,12 +1216,12 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param RTW_INFO("%s, : param->u.crypt.set_tx ==1\n", __func__); - _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 */ /* DEBUG_ERR(("\nset key length :param->u.crypt.key_len=%d\n", param->u.crypt.key_len)); */ - _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; /* _set_timer(&padapter->securitypriv.tkip_timer, 50); */ @@ -1236,13 +1236,13 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param rtw_setstakey_cmd(padapter, psta, UNICAST_KEY, true); } else { /* group key */ if (strcmp(param->u.crypt.alg, "TKIP") == 0 || strcmp(param->u.crypt.alg, "CCMP") == 0) { - _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); /* DEBUG_ERR((" param->u.crypt.key_len=%d\n", param->u.crypt.key_len)); */ RTW_INFO(" ~~~~set sta key:groupkey\n"); @@ -1255,7 +1255,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param int no; /* RTW_INFO("BIP key_len=%d , index=%d @@@@@@@@@@@@@@@@@@\n", param->u.crypt.key_len, param->u.crypt.idx); */ /* save the IGTK key, length 16 bytes */ - _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)); /*RTW_INFO("IGTK key below:\n"); for(no=0;no<16;no++) @@ -1304,19 +1304,19 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param if (param->u.crypt.set_tx == 1) { list_for_each_entry(pWapiSta, &pWapiInfo->wapiSTAUsedList, list) { if (!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; @@ -1330,15 +1330,15 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param list_for_each_entry(pWapiSta, &pWapiInfo->wapiSTAUsedList, list) { if (!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 */ @@ -1427,7 +1427,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"); @@ -1453,11 +1453,11 @@ 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); 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) ) { @@ -1465,7 +1465,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; } @@ -1476,7 +1476,7 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev, } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) ) { #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, param_len); #endif @@ -1594,15 +1594,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: @@ -2044,7 +2044,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; } @@ -2075,7 +2075,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) @@ -2386,7 +2386,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy #ifdef CONFIG_DEBUG_CFG80211 RTW_INFO("ssid=%s, len=%d\n", ssids[i].ssid, ssids[i].ssid_len); #endif - _rtw_memcpy(ssid[i].Ssid, ssids[i].ssid, ssids[i].ssid_len); + memcpy(ssid[i].Ssid, ssids[i].ssid, ssids[i].ssid_len); ssid[i].SsidLength = ssids[i].ssid_len; } @@ -2402,13 +2402,13 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy if (request->n_channels == 1) { for (i = 1; i < survey_times_for_one_ch; i++) - _rtw_memcpy(&ch[i], &ch[0], sizeof(struct rtw_ieee80211_channel)); + memcpy(&ch[i], &ch[0], sizeof(struct rtw_ieee80211_channel)); pch = ch; chan_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(&ch[j * survey_times + i], &ch[j], sizeof(struct rtw_ieee80211_channel)); + memcpy(&ch[j * survey_times + i], &ch[j], sizeof(struct rtw_ieee80211_channel)); pch = ch; chan_num = survey_times * request->n_channels; } else { @@ -2648,7 +2648,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); /* dump */ { @@ -2669,7 +2669,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); } @@ -2680,7 +2680,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) == _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); } @@ -2745,7 +2745,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); @@ -2775,7 +2775,7 @@ static int rtw_cfg80211_set_wpa_ie(_adapter *padapter, u8 *pie, size_t ielen) RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __func__, __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; } } @@ -2873,7 +2873,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); */ @@ -3026,7 +3026,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); @@ -3121,7 +3121,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 ; @@ -3300,7 +3300,7 @@ static int cfg80211_rtw_set_pmksa(struct wiphy *wiphy, /* BSSID is matched, the same AP => rewrite with new PMKID. */ RTW_INFO(FUNC_NDEV_FMT" BSSID exists in the PMKList.\n", FUNC_NDEV_ARG(ndev)); - _rtw_memcpy(psecuritypriv->PMKIDList[index].PMKID, (u8 *)pmksa->pmkid, WLAN_PMKID_LEN); + memcpy(psecuritypriv->PMKIDList[index].PMKID, (u8 *)pmksa->pmkid, WLAN_PMKID_LEN); psecuritypriv->PMKIDList[index].bUsed = true; psecuritypriv->PMKIDIndex = index + 1; blInserted = true; @@ -3313,8 +3313,8 @@ static int cfg80211_rtw_set_pmksa(struct wiphy *wiphy, RTW_INFO(FUNC_NDEV_FMT" Use the new entry index = %d for this PMKID.\n", FUNC_NDEV_ARG(ndev), psecuritypriv->PMKIDIndex); - _rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, (u8 *)pmksa->bssid, ETH_ALEN); - _rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, (u8 *)pmksa->pmkid, WLAN_PMKID_LEN); + memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, (u8 *)pmksa->bssid, ETH_ALEN); + memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, (u8 *)pmksa->pmkid, WLAN_PMKID_LEN); psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = true; psecuritypriv->PMKIDIndex++ ; @@ -3450,9 +3450,9 @@ void rtw_cfg80211_indicate_sta_disassoc(_adapter *padapter, unsigned char *da, u 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++; @@ -3612,7 +3612,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 @@ -3738,7 +3738,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) { @@ -3930,14 +3930,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; @@ -4053,9 +4053,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) @@ -4314,7 +4314,7 @@ static int cfg80211_rtw_dump_station(struct wiphy *wiphy, struct net_device *nde ret = -ENOENT; goto exit; } - _rtw_memcpy(mac, psta->hwaddr, ETH_ALEN); + memcpy(mac, psta->hwaddr, ETH_ALEN); sinfo->filled = 0; sinfo->filled |= STATION_INFO_SIGNAL; sinfo->signal = psta->rssi; @@ -4695,8 +4695,8 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf, RTW_INFO("[%s] In\n", __func__); /* 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; @@ -4751,9 +4751,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++; @@ -4795,7 +4795,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; @@ -4811,7 +4811,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; @@ -4889,7 +4889,7 @@ static s32 cfg80211_rtw_update_ft_ies(struct wiphy *wiphy, p = (u8 *)ftie->ie; if (ftie->ie_len <= sizeof(pftpriv->updated_ft_ies)) { _enter_critical_bh(&pmlmepriv->lock, &irqL); - _rtw_memcpy(pftpriv->updated_ft_ies, ftie->ie, ftie->ie_len); + memcpy(pftpriv->updated_ft_ies, ftie->ie, ftie->ie_len); pftpriv->updated_ft_ies_len = ftie->ie_len; _exit_critical_bh(&pmlmepriv->lock, &irqL); } else { @@ -5070,7 +5070,7 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, pcfg80211_wdinfo->ro_ch_wdev = wdev; pcfg80211_wdinfo->remain_on_ch_cookie = *cookie; pcfg80211_wdinfo->last_ro_ch_time = rtw_get_current_time(); - _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 @@ -5260,7 +5260,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; @@ -5486,7 +5486,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; @@ -5845,7 +5845,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; @@ -5855,7 +5855,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 */ RTW_INFO("%s %d\n", __func__, __LINE__); @@ -5925,7 +5925,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 */ @@ -6067,7 +6067,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); @@ -6098,7 +6098,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; } @@ -6197,7 +6197,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; } @@ -6245,7 +6245,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) { @@ -6261,7 +6261,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; } @@ -6315,7 +6315,7 @@ static int rtw_cfg80211_set_assoc_resp_wpsp2pie(struct net_device *net, char *bu RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __func__, __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; } @@ -6334,7 +6334,7 @@ static int rtw_cfg80211_set_assoc_resp_wpsp2pie(struct net_device *net, char *bu RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __func__, __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; } @@ -6530,7 +6530,7 @@ void rtw_cfg80211_init_wiphy(_adapter *padapter) rtw_regd_init(padapter); /* 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); } diff --git a/os_dep/ioctl_linux.c b/os_dep/ioctl_linux.c index 2cf0b95..0b654cc 100644 --- a/os_dep/ioctl_linux.c +++ b/os_dep/ioctl_linux.c @@ -131,7 +131,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); @@ -230,9 +230,9 @@ void rtw_indicate_wx_assoc_event(_adapter *padapter) wrqu.ap_addr.sa_family = ARPHRD_ETHER; if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) - _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_INFO("assoc success\n"); #ifndef CONFIG_IOCTL_CFG80211 @@ -368,7 +368,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; } @@ -496,7 +496,7 @@ static inline char *iwe_stream_rate_process(_adapter *padapter, 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 = (le16_to_cpu(pht_capie->cap_info) & IEEE80211_HT_CAP_SUP_WIDTH) ? 1 : 0; short_GI = (le16_to_cpu(pht_capie->cap_info) & (IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_40)) ? 1 : 0; } @@ -779,7 +779,7 @@ static char *translate_scan(_adapter *padapter, start = iwe_stream_essid_proess(padapter, info, pnetwork, start, stop, &iwe); start = iwe_stream_protocol_process(padapter, info, pnetwork, start, stop, &iwe); if (pnetwork->network.Reserved[0] != 2) { /* Probe Request */ - _rtw_memcpy((u8 *)&le_tmp, rtw_get_capability_from_ie(pnetwork->network.IEs), 2); + memcpy((u8 *)&le_tmp, rtw_get_capability_from_ie(pnetwork->network.IEs), 2); cap = le16_to_cpu(le_tmp); } @@ -911,7 +911,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; @@ -938,12 +938,12 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, psta->dot118021XPrivacy = padapter->securitypriv.dot11PrivacyAlgrthm; 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, "TKIP") == 0) { /* set mic key */ /* DEBUG_ERR(("\nset key length :param->u.crypt.key_len=%d\n", param->u.crypt.key_len)); */ - _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; /* _set_timer(&padapter->securitypriv.tkip_timer, 50); */ @@ -958,17 +958,17 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, } else { /* group key */ if (strcmp(param->u.crypt.alg, "TKIP") == 0 || strcmp(param->u.crypt.alg, "CCMP") == 0) { - _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; /* DEBUG_ERR((" param->u.crypt.key_len=%d\n", param->u.crypt.key_len)); */ 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); RTW_INFO(" ~~~~set sta key:groupkey\n"); padapter->securitypriv.dot118021XGrpKeyid = param->u.crypt.idx; @@ -980,7 +980,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, int no; /* printk("BIP key_len=%d , index=%d @@@@@@@@@@@@@@@@@@\n", param->u.crypt.key_len, param->u.crypt.idx); */ /* save the IGTK key, length 16 bytes */ - _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)); /*printk("IGTK key below:\n"); for(no=0;no<16;no++) @@ -1027,19 +1027,19 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, if (param->u.crypt.set_tx == 1) { list_for_each_entry(pWapiSta, &pWapiInfo->wapiSTAUsedList, list) { if (!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; @@ -1053,15 +1053,15 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, list_for_each_entry(pWapiSta, &pWapiInfo->wapiSTAUsedList, list) { if (!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 */ @@ -1106,7 +1106,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 */ { @@ -1128,13 +1128,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) == _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) @@ -1201,7 +1201,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); @@ -1508,7 +1508,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev, u8 strZeroMacAddress[ETH_ALEN] = { 0x00 }; u8 strIssueBssid[ETH_ALEN] = { 0x00 }; - _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 (!memcmp(strIssueBssid, strZeroMacAddress, ETH_ALEN) ) @@ -1524,7 +1524,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; @@ -1537,8 +1537,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++ ; @@ -1871,7 +1871,7 @@ static int rtw_wx_get_wap(struct net_device *dev, ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) ) || ((check_fwstate(pmlmepriv, WIFI_AP_STATE)) )) - _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); @@ -2009,7 +2009,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a, if (wrqu->data.flags & IW_SCAN_THIS_ESSID) { int len = min((int)req->essid_len, IW_ESSID_MAX_SIZE); - _rtw_memcpy(ssid[0].Ssid, req->essid, len); + memcpy(ssid[0].Ssid, req->essid, len); ssid[0].SsidLength = len; RTW_INFO("IW_SCAN_THIS_ESSID, ssid=%s, len=%d\n", req->essid, req->essid_len); @@ -2050,7 +2050,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a, if (sec_len > 0 && sec_len <= len) { ssid[ssid_index].SsidLength = sec_len; - _rtw_memcpy(ssid[ssid_index].Ssid, pos, ssid[ssid_index].SsidLength); + memcpy(ssid[ssid_index].Ssid, pos, ssid[ssid_index].SsidLength); /* RTW_INFO("%s COMBO_SCAN with specific ssid:%s, %d\n", __func__ */ /* , ssid[ssid_index].Ssid, ssid[ssid_index].SsidLength); */ ssid_index++; @@ -2296,7 +2296,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); @@ -2372,7 +2372,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 { @@ -2698,7 +2698,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) @@ -2762,7 +2762,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; @@ -3017,7 +3017,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 @@ -3049,17 +3049,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) { @@ -3088,7 +3088,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 */ @@ -3383,7 +3383,7 @@ static int rtw_drvext_hdl(struct net_device *dev, struct iw_request_info *info, ret = 0; if (bset == 0x00) {/* query info */ - /* _rtw_memcpy(p->pointer, pparmbuf, len); */ + /* memcpy(p->pointer, pparmbuf, len); */ if (copy_to_user(p->pointer, pparmbuf, len)) ret = -EFAULT; } @@ -3856,7 +3856,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", __func__, 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; @@ -3980,7 +3980,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++; } } @@ -4002,7 +4002,7 @@ static int rtw_p2p_setDN(struct net_device *dev, RTW_INFO("[%s] %s %d\n", __func__, 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; @@ -4256,7 +4256,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; @@ -4402,7 +4402,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; @@ -4458,7 +4458,7 @@ static int rtw_p2p_get_device_type(struct net_device *dev, u16 type; __be16 be_tmp; - _rtw_memcpy(&be_tmp, dev_type, 2); + memcpy(&be_tmp, dev_type, 2); type = be16_to_cpu(be_tmp); sprintf(dev_type_str, "\n\nN=%.2d", type); blnMatch = 1; @@ -4477,7 +4477,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; @@ -4547,7 +4547,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; @@ -4628,7 +4628,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; @@ -4718,7 +4718,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); @@ -4915,7 +4915,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; @@ -5470,17 +5470,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; } @@ -6883,7 +6883,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"); @@ -6901,7 +6901,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; @@ -6912,7 +6912,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; @@ -6929,7 +6929,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, if (strcmp(param->u.crypt.alg, "WEP") == 0) { RTW_INFO("%s, set group_key, WEP\n", __func__); - _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) @@ -6940,12 +6940,12 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, 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)); /* DEBUG_ERR("set key length :param->u.crypt.key_len=%d\n", 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; @@ -6954,7 +6954,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, 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) { @@ -6962,7 +6962,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, RTW_INFO("BIP key_len=%d , index=%d\n", param->u.crypt.key_len, param->u.crypt.idx); /* save the IGTK key, length 16 bytes */ - _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)); /* RTW_INFO("IGTK key below:\n"); for(no=0;no<16;no++) printk(" %02x ", padapter->securitypriv.dot11wBIPKey[param->u.crypt.idx].skey[no]); @@ -7002,7 +7002,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("%s, set pairwise key, WEP\n", __func__); @@ -7017,8 +7017,8 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, /* DEBUG_ERR("set key length :param->u.crypt.key_len=%d\n", param->u.crypt.key_len); */ /* 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; @@ -7041,7 +7041,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, } else { /* group key??? */ if (strcmp(param->u.crypt.alg, "WEP") == 0) { - _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) @@ -7049,19 +7049,19 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, } else if (strcmp(param->u.crypt.alg, "TKIP") == 0) { 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)); /* DEBUG_ERR("set key length :param->u.crypt.key_len=%d\n", 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) { 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)); } else psecuritypriv->dot118021XGrpPrivacy = _NO_PRIVACY_; @@ -7108,7 +7108,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; @@ -7170,7 +7170,7 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param) psta->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. */ @@ -7186,7 +7186,7 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param) if (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; @@ -7295,8 +7295,8 @@ 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); - _rtw_memcpy(&psta_data->ht_cap, &psta->htpriv.ht_cap, sizeof(struct rtw_ieee80211_ht_cap)); + memcpy(psta_data->tx_supp_rates, psta->bssrateset, psta->bssratelen); + memcpy(&psta_data->ht_cap, &psta->htpriv.ht_cap, sizeof(struct rtw_ieee80211_ht_cap)); psta_data->rx_pkts = psta->sta_stats.rx_data_pkts; psta_data->rx_bytes = psta->sta_stats.rx_bytes; psta_data->rx_drops = psta->sta_stats.rx_drops; @@ -7341,7 +7341,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"); @@ -7384,7 +7384,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); @@ -7424,7 +7424,7 @@ static int rtw_set_wps_probe_resp(struct net_device *dev, struct ieee_param *par RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __func__, __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); } @@ -7460,7 +7460,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); } @@ -7496,7 +7496,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) @@ -7505,9 +7505,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) @@ -7756,7 +7756,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 */ @@ -7786,7 +7786,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; } @@ -8819,7 +8819,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, rtw_efuse_mask_array(padapter, mask_buf); if (padapter->registrypriv.bFileMaskEfuse ) - _rtw_memcpy(mask_buf, maskfileBuffer, mask_len); + memcpy(mask_buf, maskfileBuffer, mask_len); sprintf(extra, "\n"); for (i = 0; i < mask_len; i++) @@ -9303,7 +9303,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", __func__); @@ -9460,7 +9460,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)); @@ -10142,7 +10142,7 @@ static int rtw_tdls_enable(struct net_device *dev, plist = get_next(plist); if (psta->tdls_sta_state != TDLS_STATE_NONE) - _rtw_memcpy(tdls_sta[index], psta->hwaddr, ETH_ALEN); + memcpy(tdls_sta[index], psta->hwaddr, ETH_ALEN); } } _exit_critical_bh(&pstapriv->sta_hash_lock, &irqL); @@ -10151,7 +10151,7 @@ static int rtw_tdls_enable(struct net_device *dev, if (memcmp(tdls_sta[index], empty_hwaddr, ETH_ALEN)) { RTW_INFO("issue tear down to "MAC_FMT"\n", MAC_ARG(tdls_sta[index])); txmgmt.status_code = _RSON_TDLS_TEAR_UN_RSN_; - _rtw_memcpy(txmgmt.peer, tdls_sta[index], ETH_ALEN); + memcpy(txmgmt.peer, tdls_sta[index], ETH_ALEN); issue_tdls_teardown(padapter, &txmgmt, true); } } @@ -10966,7 +10966,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)); @@ -11055,11 +11055,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); @@ -11088,7 +11088,7 @@ static s32 createpseudoadhoc(PADAPTER padapter) /* 3 join psudo AdHoc */ pcur_network->join_res = 1; pcur_network->aid = psta->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; @@ -11144,10 +11144,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; */ @@ -11205,9 +11205,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; @@ -11254,7 +11254,7 @@ static void printdata(u8 *pbuf, u32 len) 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); @@ -11366,7 +11366,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); @@ -11432,7 +11432,7 @@ static void loopbackTest(PADAPTER padapter, u32 cnt, u32 size, u8 *pmsg) break; rtw_msleep_os(1); } while (1); - _rtw_memcpy(pmsg, ploopback->msg, len + 1); + memcpy(pmsg, ploopback->msg, len + 1); freeLoopback(padapter); return; @@ -12035,7 +12035,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) @@ -12184,7 +12184,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'; @@ -12216,7 +12216,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) && @@ -12297,7 +12297,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; @@ -12311,13 +12311,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/ioctl_mp.c b/os_dep/ioctl_mp.c index 037bcb5..91af4ab 100644 --- a/os_dep/ioctl_mp.c +++ b/os_dep/ioctl_mp.c @@ -67,7 +67,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) diff --git a/os_dep/mlme_linux.c b/os_dep/mlme_linux.c index 69e4324..41fe5af 100644 --- a/os_dep/mlme_linux.c +++ b/os_dep/mlme_linux.c @@ -242,7 +242,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; @@ -255,7 +255,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; @@ -550,7 +550,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->hwaddr, ETH_ALEN); + memcpy(wrqu.addr.sa_data, psta->hwaddr, ETH_ALEN); RTW_INFO("+rtw_indicate_sta_assoc_event\n"); @@ -577,7 +577,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->hwaddr, ETH_ALEN); + memcpy(wrqu.addr.sa_data, psta->hwaddr, ETH_ALEN); RTW_INFO("+rtw_indicate_sta_disassoc_event\n"); @@ -710,7 +710,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); netif_carrier_off(pnetdev); diff --git a/os_dep/os_intfs.c b/os_dep/os_intfs.c index 81277f8..0925148 100644 --- a/os_dep/os_intfs.c +++ b/os_dep/os_intfs.c @@ -672,7 +672,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; @@ -757,7 +757,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); @@ -962,8 +962,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 */ rtw_ps_deny(padapter, PS_DENY_IOCTL); LeaveAllPowerSaveModeDirect(padapter); /* leave PS mode for guaranteeing to access hw register successfully */ @@ -1063,7 +1063,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): @@ -1344,7 +1344,7 @@ static 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 */ @@ -2212,7 +2212,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. @@ -2220,13 +2220,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*/ @@ -2370,7 +2370,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; @@ -2408,7 +2408,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. @@ -2418,7 +2418,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)); @@ -2725,7 +2725,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); @@ -3330,7 +3330,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); @@ -3383,7 +3383,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, 6); + memcpy(pmlmepriv->gw_mac_addr, gw_mac, 6); RTW_INFO("%s Gateway Mac:\t" MAC_FMT "\n", __func__, MAC_ARG(pmlmepriv->gw_mac_addr)); RTW_INFO("%s Gateway IP:\t" IP_FMT "\n", __func__, IP_ARG(pmlmepriv->gw_ip)); } else diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index 271567e..9cb37ca 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -693,16 +693,6 @@ void rtw_mfree2d(void *pbuf, int h, int w, int size) rtw_mfree((u8 *)pbuf, h * sizeof(void *) + w * h * size); } -void _rtw_memcpy(void *dst, const void *src, u32 sz) -{ - memcpy(dst, src, sz); -} - -inline void _rtw_memmove(void *dst, const void *src, u32 sz) -{ - memmove(dst, src, sz); -} - void _rtw_init_listhead(_list *list) { INIT_LIST_HEAD(list); @@ -1494,7 +1484,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); @@ -1577,7 +1567,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: @@ -1739,7 +1729,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: diff --git a/os_dep/recv_linux.c b/os_dep/recv_linux.c index 1b4eae3..005ac28 100644 --- a/os_dep/recv_linux.c +++ b/os_dep/recv_linux.c @@ -94,7 +94,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 { #ifdef CONFIG_USE_USB_BUFFER_ALLOC_RX @@ -271,7 +271,7 @@ _pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, u16 nSubframe_Length, u8 if (sub_skb) { skb_reserve(sub_skb, 12); data_ptr = (u8 *)skb_put(sub_skb, nSubframe_Length); - _rtw_memcpy(data_ptr, (pdata + ETH_HLEN), nSubframe_Length); + memcpy(data_ptr, (pdata + ETH_HLEN), nSubframe_Length); } else #endif /* CONFIG_SKB_COPY */ { @@ -294,15 +294,15 @@ _pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, u16 nSubframe_Length, u8 !memcmp(sub_skb->data, rtw_bridge_tunnel_header, SNAP_SIZE))) { /* remove RFC1042 or Bridge-Tunnel encapsulation and replace EtherType */ skb_pull(sub_skb, SNAP_SIZE); - _rtw_memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->src, ETH_ALEN); - _rtw_memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->dst, ETH_ALEN); + memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->src, ETH_ALEN); + memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->dst, ETH_ALEN); } else { __be16 len; /* Leave Ethernet header part of hdr and full payload */ len = htons(sub_skb->len); - _rtw_memcpy(skb_push(sub_skb, 2), &len, 2); - _rtw_memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->src, ETH_ALEN); - _rtw_memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->dst, ETH_ALEN); + memcpy(skb_push(sub_skb, 2), &len, 2); + memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->src, ETH_ALEN); + memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->dst, ETH_ALEN); } return sub_skb; @@ -535,7 +535,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->hwaddr, ETH_ALEN); + memcpy(ev.src_addr.sa_data, sta->hwaddr, ETH_ALEN); memset(&wrqu, 0x00, sizeof(wrqu)); wrqu.data.length = sizeof(ev); diff --git a/os_dep/rtw_android.c b/os_dep/rtw_android.c index f2e908f..dc77c4b 100644 --- a/os_dep/rtw_android.c +++ b/os_dep/rtw_android.c @@ -417,7 +417,7 @@ static int rtw_android_get_p2p_dev_addr(struct net_device *net, char *command, i 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; @@ -540,7 +540,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: "); @@ -548,13 +548,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/usb_ops_linux.c b/os_dep/usb_ops_linux.c index e44ac38..344e921 100644 --- a/os_dep/usb_ops_linux.c +++ b/os_dep/usb_ops_linux.c @@ -97,7 +97,7 @@ int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u16 inde } 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 = rtw_usb_control_msg(udev, pipe, request, reqtype, value, index, pIo_buf, len, RTW_USB_CONTROL_MSG_TIMEOUT); @@ -106,7 +106,7 @@ int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u16 inde rtw_reset_continual_io_error(pdvobjpriv); 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); } } else { /* error cases */ RTW_INFO("reg 0x%x, usb %s %u fail, status:%d value=0x%x, vendorreq_times:%d\n" @@ -127,7 +127,7 @@ int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u16 inde 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); } } } @@ -209,7 +209,7 @@ int _usbctrl_vendorreq_async_write(struct usb_device *udev, u8 request, dr->wIndex = cpu_to_le16(index); 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/xmit_linux.c b/os_dep/xmit_linux.c index 89506c4..d7c91c1 100644 --- a/os_dep/xmit_linux.c +++ b/os_dep/xmit_linux.c @@ -387,7 +387,7 @@ int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb) newskb = rtw_skb_copy(skb); if (newskb) { - _rtw_memcpy(newskb->data, psta->hwaddr, 6); + memcpy(newskb->data, psta->hwaddr, 6); res = rtw_xmit(padapter, &newskb); if (res < 0) { DBG_COUNTER(padapter->tx_logs.os_tx_m2u_entry_err_xmit);