mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-09 14:53:05 +00:00
rtl8188eu: Replace wrapper for memset
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
529328fd3d
commit
9b5b5c4e12
32 changed files with 292 additions and 298 deletions
|
@ -172,7 +172,7 @@ static void issue_group_disc_req(struct wifidirect_info *pwdinfo, u8 *da)
|
|||
pattrib = &pmgntframe->attrib;
|
||||
update_mgntframe_attrib(padapter, pattrib);
|
||||
|
||||
_rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||
|
||||
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
|
||||
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
|
||||
|
@ -233,7 +233,7 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s
|
|||
pattrib = &pmgntframe->attrib;
|
||||
update_mgntframe_attrib(padapter, pattrib);
|
||||
|
||||
_rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||
|
||||
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
|
||||
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
|
||||
|
@ -312,7 +312,7 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8* raddr,
|
|||
pattrib = &pmgntframe->attrib;
|
||||
update_mgntframe_attrib(padapter, pattrib);
|
||||
|
||||
_rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||
|
||||
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
|
||||
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
|
||||
|
@ -403,7 +403,7 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
|
|||
pattrib = &pmgntframe->attrib;
|
||||
update_mgntframe_attrib(padapter, pattrib);
|
||||
|
||||
_rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||
|
||||
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
|
||||
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
|
||||
|
@ -588,7 +588,7 @@ u32 build_beacon_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
}
|
||||
else
|
||||
{
|
||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
}
|
||||
|
||||
wfdielen += ETH_ALEN;
|
||||
|
@ -701,7 +701,7 @@ u32 build_probe_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
}
|
||||
else
|
||||
{
|
||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
}
|
||||
|
||||
wfdielen += ETH_ALEN;
|
||||
|
@ -859,7 +859,7 @@ u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 tunnel
|
|||
}
|
||||
else
|
||||
{
|
||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
}
|
||||
|
||||
wfdielen += ETH_ALEN;
|
||||
|
@ -981,7 +981,7 @@ u32 build_assoc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
}
|
||||
else
|
||||
{
|
||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
}
|
||||
|
||||
wfdielen += ETH_ALEN;
|
||||
|
@ -1079,7 +1079,7 @@ u32 build_assoc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
}
|
||||
else
|
||||
{
|
||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
}
|
||||
|
||||
wfdielen += ETH_ALEN;
|
||||
|
@ -1177,7 +1177,7 @@ u32 build_nego_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
}
|
||||
else
|
||||
{
|
||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
}
|
||||
|
||||
wfdielen += ETH_ALEN;
|
||||
|
@ -1275,7 +1275,7 @@ u32 build_nego_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
}
|
||||
else
|
||||
{
|
||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
}
|
||||
|
||||
wfdielen += ETH_ALEN;
|
||||
|
@ -1374,7 +1374,7 @@ u32 build_nego_confirm_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
}
|
||||
else
|
||||
{
|
||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
}
|
||||
|
||||
wfdielen += ETH_ALEN;
|
||||
|
@ -1473,7 +1473,7 @@ u32 build_invitation_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
}
|
||||
else
|
||||
{
|
||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
}
|
||||
|
||||
wfdielen += ETH_ALEN;
|
||||
|
@ -1586,7 +1586,7 @@ u32 build_invitation_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
}
|
||||
else
|
||||
{
|
||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
}
|
||||
|
||||
wfdielen += ETH_ALEN;
|
||||
|
@ -1699,7 +1699,7 @@ u32 build_provdisc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
}
|
||||
else
|
||||
{
|
||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
}
|
||||
|
||||
wfdielen += ETH_ALEN;
|
||||
|
@ -1798,7 +1798,7 @@ u32 build_provdisc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
}
|
||||
else
|
||||
{
|
||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||
}
|
||||
|
||||
wfdielen += ETH_ALEN;
|
||||
|
@ -2800,7 +2800,7 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe
|
|||
{
|
||||
if ( attr_contentlen != ETH_ALEN )
|
||||
{
|
||||
_rtw_memset( pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN );
|
||||
memset( pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2971,7 +2971,7 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram
|
|||
{
|
||||
if ( attr_contentlen != ETH_ALEN )
|
||||
{
|
||||
_rtw_memset( pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN );
|
||||
memset( pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3095,7 +3095,7 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram
|
|||
|
||||
// Try to get the group id information if peer is GO
|
||||
attr_contentlen = 0;
|
||||
_rtw_memset( groupid, 0x00, 38 );
|
||||
memset( groupid, 0x00, 38 );
|
||||
if ( rtw_get_p2p_attr_content( p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, groupid, &attr_contentlen) )
|
||||
{
|
||||
memcpy( pwdinfo->groupid_info.go_device_addr, &groupid[0], ETH_ALEN );
|
||||
|
@ -3193,7 +3193,7 @@ u8 process_p2p_group_negotation_confirm( struct wifidirect_info *pwdinfo, u8 *pf
|
|||
|
||||
// Try to get the group id information
|
||||
attr_contentlen = 0;
|
||||
_rtw_memset( groupid, 0x00, 38 );
|
||||
memset( groupid, 0x00, 38 );
|
||||
if ( rtw_get_p2p_attr_content( p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, groupid, &attr_contentlen) )
|
||||
{
|
||||
DBG_871X( "[%s] Ssid = %s, ssidlen = %zu\n", __FUNCTION__, &groupid[ETH_ALEN], strlen(&groupid[ETH_ALEN]) );
|
||||
|
@ -3242,7 +3242,7 @@ static void find_phase_handler( struct adapter* padapter )
|
|||
u8 _status = 0;
|
||||
|
||||
|
||||
_rtw_memset((unsigned char*)&ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||
memset((unsigned char*)&ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||
memcpy(ssid.Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN );
|
||||
ssid.SsidLength = P2P_WILDCARD_SSID_LEN;
|
||||
|
||||
|
@ -3585,7 +3585,7 @@ static u8 *dump_p2p_attr_ch_list(u8 *p2p_ie, uint p2p_ielen, u8 *buf, u32 buf_le
|
|||
|
||||
attr_contentlen -= 3;
|
||||
|
||||
_rtw_memset(ch_list, 0, 40);
|
||||
memset(ch_list, 0, 40);
|
||||
|
||||
while (attr_contentlen>0) {
|
||||
num_of_ch = *(pattr_temp+1);
|
||||
|
@ -3925,7 +3925,7 @@ void rtw_init_cfg80211_wifidirect_info( struct adapter* padapter)
|
|||
{
|
||||
struct cfg80211_wifidirect_info *pcfg80211_wdinfo = &padapter->cfg80211_wdinfo;
|
||||
|
||||
_rtw_memset(pcfg80211_wdinfo, 0x00, sizeof(struct cfg80211_wifidirect_info) );
|
||||
memset(pcfg80211_wdinfo, 0x00, sizeof(struct cfg80211_wifidirect_info) );
|
||||
|
||||
_init_timer( &pcfg80211_wdinfo->remain_on_ch_timer, padapter->pnetdev, ro_ch_timer_process, padapter );
|
||||
}
|
||||
|
@ -4315,8 +4315,8 @@ int rtw_init_wifi_display_info(struct adapter* padapter)
|
|||
pwfd_info->wfd_pc = false;
|
||||
|
||||
// Used in TDLS
|
||||
_rtw_memset( pwfd_info->ip_address, 0x00, 4 );
|
||||
_rtw_memset( pwfd_info->peer_ip_address, 0x00, 4 );
|
||||
memset( pwfd_info->ip_address, 0x00, 4 );
|
||||
memset( pwfd_info->peer_ip_address, 0x00, 4 );
|
||||
return res;
|
||||
|
||||
}
|
||||
|
@ -4397,32 +4397,32 @@ void init_wifidirect_info( struct adapter* padapter, enum P2P_ROLE role)
|
|||
|
||||
memcpy( ( void* ) pwdinfo->p2p_wildcard_ssid, "DIRECT-", 7 );
|
||||
|
||||
_rtw_memset( pwdinfo->device_name, 0x00, WPS_MAX_DEVICE_NAME_LEN );
|
||||
memset( pwdinfo->device_name, 0x00, WPS_MAX_DEVICE_NAME_LEN );
|
||||
pwdinfo->device_name_len = 0;
|
||||
|
||||
_rtw_memset( &pwdinfo->invitereq_info, 0x00, sizeof( struct tx_invite_req_info ) );
|
||||
memset( &pwdinfo->invitereq_info, 0x00, sizeof( struct tx_invite_req_info ) );
|
||||
pwdinfo->invitereq_info.token = 3; // Token used for P2P invitation request frame.
|
||||
|
||||
_rtw_memset( &pwdinfo->inviteresp_info, 0x00, sizeof( struct tx_invite_resp_info ) );
|
||||
memset( &pwdinfo->inviteresp_info, 0x00, sizeof( struct tx_invite_resp_info ) );
|
||||
pwdinfo->inviteresp_info.token = 0;
|
||||
|
||||
pwdinfo->profileindex = 0;
|
||||
_rtw_memset( &pwdinfo->profileinfo[ 0 ], 0x00, sizeof( struct profile_info ) * P2P_MAX_PERSISTENT_GROUP_NUM );
|
||||
memset( &pwdinfo->profileinfo[ 0 ], 0x00, sizeof( struct profile_info ) * P2P_MAX_PERSISTENT_GROUP_NUM );
|
||||
|
||||
rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_NONE);
|
||||
|
||||
pwdinfo->listen_dwell = ( u8 ) (( rtw_get_current_time() % 3 ) + 1);
|
||||
//DBG_8192C( "[%s] listen_dwell time is %d00ms\n", __FUNCTION__, pwdinfo->listen_dwell );
|
||||
|
||||
_rtw_memset( &pwdinfo->tx_prov_disc_info, 0x00, sizeof( struct tx_provdisc_req_info ) );
|
||||
memset( &pwdinfo->tx_prov_disc_info, 0x00, sizeof( struct tx_provdisc_req_info ) );
|
||||
pwdinfo->tx_prov_disc_info.wps_config_method_request = WPS_CM_NONE;
|
||||
|
||||
_rtw_memset( &pwdinfo->nego_req_info, 0x00, sizeof( struct tx_nego_req_info ) );
|
||||
memset( &pwdinfo->nego_req_info, 0x00, sizeof( struct tx_nego_req_info ) );
|
||||
|
||||
pwdinfo->device_password_id_for_nego = WPS_DPID_PBC;
|
||||
pwdinfo->negotiation_dialog_token = 1;
|
||||
|
||||
_rtw_memset( pwdinfo->nego_ssid, 0x00, WLAN_SSID_MAXLEN );
|
||||
memset( pwdinfo->nego_ssid, 0x00, WLAN_SSID_MAXLEN );
|
||||
pwdinfo->nego_ssidlen = 0;
|
||||
|
||||
pwdinfo->ui_got_wps_info = P2P_NO_WPSINFO;
|
||||
|
@ -4433,11 +4433,11 @@ void init_wifidirect_info( struct adapter* padapter, enum P2P_ROLE role)
|
|||
pwdinfo->supported_wps_cm = WPS_CONFIG_METHOD_DISPLAY | WPS_CONFIG_METHOD_PBC | WPS_CONFIG_METHOD_KEYPAD;
|
||||
#endif //CONFIG_WFD
|
||||
pwdinfo->channel_list_attr_len = 0;
|
||||
_rtw_memset( pwdinfo->channel_list_attr, 0x00, 100 );
|
||||
memset( pwdinfo->channel_list_attr, 0x00, 100 );
|
||||
|
||||
_rtw_memset( pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, 0x00, 4 );
|
||||
_rtw_memset( pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, '0', 3 );
|
||||
_rtw_memset( &pwdinfo->groupid_info, 0x00, sizeof( struct group_id_info ) );
|
||||
memset( pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, 0x00, 4 );
|
||||
memset( pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, '0', 3 );
|
||||
memset( &pwdinfo->groupid_info, 0x00, sizeof( struct group_id_info ) );
|
||||
|
||||
// Commented by Kurt 20130319
|
||||
// For WiDi purpose: Use CFG80211 interface but controled WFD/RDS frame by driver itself.
|
||||
|
@ -4448,8 +4448,8 @@ void init_wifidirect_info( struct adapter* padapter, enum P2P_ROLE role)
|
|||
#endif //CONFIG_IOCTL_CFG80211
|
||||
|
||||
pwdinfo->wfd_tdls_enable = 0;
|
||||
_rtw_memset( pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN );
|
||||
_rtw_memset( pwdinfo->p2p_peer_device_addr, 0x00, ETH_ALEN );
|
||||
memset( pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN );
|
||||
memset( pwdinfo->p2p_peer_device_addr, 0x00, ETH_ALEN );
|
||||
|
||||
pwdinfo->rx_invitereq_info.operation_ch[0] = 0;
|
||||
pwdinfo->rx_invitereq_info.operation_ch[1] = 0; // Used to indicate the scan end in site survey function
|
||||
|
@ -4657,7 +4657,7 @@ int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role)
|
|||
rtw_p2p_set_state(pwdinfo, P2P_STATE_NONE);
|
||||
rtw_p2p_set_pre_state(pwdinfo, P2P_STATE_NONE);
|
||||
rtw_p2p_set_role(pwdinfo, P2P_ROLE_DISABLE);
|
||||
_rtw_memset(&pwdinfo->rx_prov_disc_info, 0x00, sizeof(struct rx_provdisc_req_info));
|
||||
memset(&pwdinfo->rx_prov_disc_info, 0x00, sizeof(struct rx_provdisc_req_info));
|
||||
}
|
||||
|
||||
rtw_hal_set_odm_var(padapter,HAL_ODM_P2P_STATE,NULL,false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue