Remove wrapper for memset()

Link: 545d963a9e (diff-16d649c4743131c1aae5f812af5596dae6423bb63eaaf2990b8c89c9a681a913)
This commit is contained in:
Carlos Garcés
2021-10-11 12:07:17 +02:00
parent 76f68bbfcf
commit cf246719f1
58 changed files with 621 additions and 642 deletions

View File

@@ -639,7 +639,7 @@ void expire_timeout_chk(_adapter *padapter)
#endif
char del_asoc_list[NUM_STA];
_rtw_memset(del_asoc_list, NUM_STA, NUM_STA);
memset(del_asoc_list, NUM_STA, NUM_STA);
#ifdef CONFIG_ACTIVE_KEEP_ALIVE_CHECK
if (pmlmeext->active_keep_alive_check) {
@@ -990,7 +990,7 @@ void update_bmc_sta(_adapter *padapter)
psta->ieee8021x_blocked = 0;
_rtw_memset((void *)&psta->sta_stats, 0, sizeof(struct stainfo_stats));
memset((void *)&psta->sta_stats, 0, sizeof(struct stainfo_stats));
/* psta->dot118021XPrivacy = _NO_PRIVACY_; */ /* !!! remove it, because it has been set before this. */
@@ -1170,7 +1170,7 @@ void update_sta_info_apmode(_adapter *padapter, struct sta_info *psta)
/* todo: init other variables */
_rtw_memset((void *)&psta->sta_stats, 0, sizeof(struct stainfo_stats));
memset((void *)&psta->sta_stats, 0, sizeof(struct stainfo_stats));
/* add ratid */
@@ -1933,7 +1933,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
pbss_network->IELength = len;
_rtw_memset(ie, 0, MAX_IE_SZ);
memset(ie, 0, MAX_IE_SZ);
_rtw_memcpy(ie, pbuf, pbss_network->IELength);
@@ -1966,7 +1966,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
/* SSID */
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SSID_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
if (p && ie_len > 0) {
_rtw_memset(&pbss_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
memset(&pbss_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
_rtw_memcpy(pbss_network->Ssid.Ssid, (p + 2), ie_len);
pbss_network->Ssid.SsidLength = ie_len;
#ifdef CONFIG_P2P
@@ -1980,7 +1980,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
if (MLME_IS_MESH(padapter)) {
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, WLAN_EID_MESH_ID, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
if (p && ie_len > 0) {
_rtw_memset(&pbss_network->mesh_id, 0, sizeof(NDIS_802_11_SSID));
memset(&pbss_network->mesh_id, 0, sizeof(NDIS_802_11_SSID));
_rtw_memcpy(pbss_network->mesh_id.Ssid, (p + 2), ie_len);
pbss_network->mesh_id.SsidLength = ie_len;
}
@@ -1997,7 +1997,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
pbss_network->Configuration.DSConfig = channel;
_rtw_memset(supportRate, 0, NDIS_802_11_LENGTH_RATES_EX);
memset(supportRate, 0, NDIS_802_11_LENGTH_RATES_EX);
/* get supported rates */
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SUPPORTEDRATES_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
if (p != NULL) {
@@ -2782,7 +2782,7 @@ static int rtw_ap_set_key(_adapter *padapter, u8 *key, u8 alg, int keyid, u8 set
goto exit;
}
_rtw_memset(psetkeyparm, 0, sizeof(struct setkey_parm));
memset(psetkeyparm, 0, sizeof(struct setkey_parm));
psetkeyparm->keyid = (u8)keyid;
if (is_wep_enc(alg))
@@ -4154,7 +4154,7 @@ void start_ap_mode(_adapter *padapter)
pmlmepriv->sw_to_20mhz = 0;
#endif
_rtw_memset(pmlmepriv->ext_capab_ie_data, 0, sizeof(pmlmepriv->ext_capab_ie_data));
memset(pmlmepriv->ext_capab_ie_data, 0, sizeof(pmlmepriv->ext_capab_ie_data));
pmlmepriv->ext_capab_ie_len = 0;
#ifdef CONFIG_CONCURRENT_MODE
@@ -4221,7 +4221,7 @@ void stop_ap_mode(_adapter *padapter)
padapter->netif_up = _FALSE;
/* reset and init security priv , this can refine with rtw_reset_securitypriv */
_rtw_memset((unsigned char *)&padapter->securitypriv, 0, sizeof(struct security_priv));
memset((unsigned char *)&padapter->securitypriv, 0, sizeof(struct security_priv));
padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeOpen;
padapter->securitypriv.ndisencryptstatus = Ndis802_11WEPDisabled;
@@ -5197,7 +5197,7 @@ u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct
sta->wpa2_group_cipher = 0;
sta->wpa_pairwise_cipher = 0;
sta->wpa2_pairwise_cipher = 0;
_rtw_memset(sta->wpa_ie, 0, sizeof(sta->wpa_ie));
memset(sta->wpa_ie, 0, sizeof(sta->wpa_ie));
if ((sec->wpa_psk & BIT(1)) && elems->rsn_ie) {
wpa_ie = elems->rsn_ie;
@@ -5422,7 +5422,7 @@ void rtw_ap_parse_sta_ht_ie(_adapter *adapter, struct sta_info *sta, struct rtw_
goto exit;
/* save HT capabilities in the sta object */
_rtw_memset(&sta->htpriv.ht_cap, 0, sizeof(struct rtw_ieee80211_ht_cap));
memset(&sta->htpriv.ht_cap, 0, sizeof(struct rtw_ieee80211_ht_cap));
if (elems->ht_capabilities && elems->ht_capabilities_len >= sizeof(struct rtw_ieee80211_ht_cap)) {
sta->flags |= WLAN_STA_HT;
sta->flags |= WLAN_STA_WME;
@@ -5449,7 +5449,7 @@ void rtw_ap_parse_sta_vht_ie(_adapter *adapter, struct sta_info *sta, struct rtw
if (mlme->vhtpriv.vht_option == _FALSE)
goto exit;
_rtw_memset(&sta->vhtpriv, 0, sizeof(struct vht_priv));
memset(&sta->vhtpriv, 0, sizeof(struct vht_priv));
if (elems->vht_capabilities && elems->vht_capabilities_len == VHT_CAP_IE_LEN) {
sta->flags |= WLAN_STA_VHT;
_rtw_memcpy(sta->vhtpriv.vht_cap, elems->vht_capabilities, VHT_CAP_IE_LEN);