mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-06-23 08:34:20 +00:00
rtl8188eu: Remove wrapper for memset()
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
4e305e82d0
commit
545d963a9e
27 changed files with 195 additions and 202 deletions
|
@ -151,7 +151,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;
|
||||
|
@ -210,7 +210,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;
|
||||
|
@ -280,7 +280,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;
|
||||
|
@ -359,7 +359,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;
|
||||
|
@ -1176,7 +1176,7 @@ u8 process_p2p_group_negotation_req(struct wifidirect_info *pwdinfo, u8 *pframe,
|
|||
attr_contentlen = 0;
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_INTENTED_IF_ADDR, pwdinfo->p2p_peer_interface_addr, &attr_contentlen)) {
|
||||
if (attr_contentlen != ETH_ALEN)
|
||||
_rtw_memset(pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN);
|
||||
memset(pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN);
|
||||
}
|
||||
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CH_LIST, ch_content, &ch_cnt)) {
|
||||
|
@ -1279,7 +1279,7 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe
|
|||
attr_contentlen = 0;
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_INTENTED_IF_ADDR, pwdinfo->p2p_peer_interface_addr, &attr_contentlen)) {
|
||||
if (attr_contentlen != ETH_ALEN)
|
||||
_rtw_memset(pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN);
|
||||
memset(pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN);
|
||||
}
|
||||
|
||||
/* Try to get the peer's intent and tie breaker value. */
|
||||
|
@ -1371,7 +1371,7 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe
|
|||
|
||||
/* 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);
|
||||
memcpy(pwdinfo->groupid_info.ssid, &groupid[6], attr_contentlen - ETH_ALEN);
|
||||
|
@ -1435,7 +1435,7 @@ u8 process_p2p_group_negotation_confirm(struct wifidirect_info *pwdinfo, u8 *pfr
|
|||
|
||||
/* 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_88E("[%s] Ssid = %s, ssidlen = %zu\n", __func__, &groupid[ETH_ALEN], strlen(&groupid[ETH_ALEN]));
|
||||
memcpy(pwdinfo->groupid_info.go_device_addr, &groupid[0], ETH_ALEN);
|
||||
|
@ -1477,7 +1477,7 @@ static void find_phase_handler(struct adapter *padapter)
|
|||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct ndis_802_11_ssid ssid;
|
||||
|
||||
_rtw_memset((unsigned char *)&ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||
memset((unsigned char *)&ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||
memcpy(ssid.Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN);
|
||||
ssid.SsidLength = P2P_WILDCARD_SSID_LEN;
|
||||
|
||||
|
@ -1906,44 +1906,44 @@ void init_wifidirect_info(struct adapter *padapter, enum P2P_ROLE role)
|
|||
|
||||
memcpy(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);
|
||||
|
||||
_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;
|
||||
pwdinfo->supported_wps_cm = WPS_CONFIG_METHOD_DISPLAY | WPS_CONFIG_METHOD_PBC | WPS_CONFIG_METHOD_KEYPAD;
|
||||
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));
|
||||
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 */
|
||||
|
@ -1991,7 +1991,7 @@ int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role)
|
|||
reset_ch_sitesurvey_timer_process2(padapter);
|
||||
rtw_p2p_set_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