rtl8188eu: Replace wrapper for memset

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2015-02-19 14:58:09 -06:00
parent 529328fd3d
commit 9b5b5c4e12
32 changed files with 292 additions and 298 deletions

View file

@ -848,7 +848,7 @@ static int set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid)
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))
@ -1514,10 +1514,10 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev,
if (param == NULL)
return -1;
_rtw_memset(param, 0, param_len);
memset(param, 0, param_len);
param->cmd = IEEE_CMD_SET_ENCRYPTION;
_rtw_memset(param->sta_addr, 0xff, ETH_ALEN);
memset(param->sta_addr, 0xff, ETH_ALEN);
switch (params->cipher) {
case IW_AUTH_CIPHER_NONE:
@ -2233,7 +2233,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
#endif //CONFIG_P2P
_rtw_memset(ssid, 0, sizeof(NDIS_802_11_SSID)*RTW_SSID_SCAN_AMOUNT);
memset(ssid, 0, sizeof(NDIS_802_11_SSID)*RTW_SSID_SCAN_AMOUNT);
//parsing request ssids, n_ssids
for (i = 0; i < request->n_ssids && i < RTW_SSID_SCAN_AMOUNT; i++) {
#ifdef CONFIG_DEBUG_CFG80211
@ -2244,7 +2244,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
}
/* parsing channels, n_channels */
_rtw_memset(ch, 0, sizeof(struct rtw_ieee80211_channel)*RTW_CHANNEL_SCAN_AMOUNT);
memset(ch, 0, sizeof(struct rtw_ieee80211_channel)*RTW_CHANNEL_SCAN_AMOUNT);
for (i=0;i<request->n_channels && i<RTW_CHANNEL_SCAN_AMOUNT;i++) {
#ifdef CONFIG_DEBUG_CFG80211
DBG_871X(FUNC_ADPT_FMT CHAN_FMT"\n", FUNC_ADPT_ARG(padapter), CHAN_ARG(request->channels[i]));
@ -2710,7 +2710,7 @@ static int cfg80211_rtw_join_ibss(struct wiphy *wiphy, struct net_device *ndev,
goto exit;
}
_rtw_memset(&ndis_ssid, 0, sizeof(NDIS_802_11_SSID));
memset(&ndis_ssid, 0, sizeof(NDIS_802_11_SSID));
ndis_ssid.SsidLength = params->ssid_len;
memcpy(ndis_ssid.Ssid, (void *)params->ssid, params->ssid_len);
@ -2812,7 +2812,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
goto exit;
}
_rtw_memset(&ndis_ssid, 0, sizeof(NDIS_802_11_SSID));
memset(&ndis_ssid, 0, sizeof(NDIS_802_11_SSID));
ndis_ssid.SsidLength = sme->ssid_len;
memcpy(ndis_ssid.Ssid, (void *)sme->ssid, sme->ssid_len);
@ -2906,7 +2906,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
goto exit;
}
_rtw_memset(pwep, 0, wep_total_len);
memset(pwep, 0, wep_total_len);
pwep->KeyLength = wep_key_len;
pwep->Length = wep_total_len;
@ -3127,8 +3127,8 @@ static int cfg80211_rtw_del_pmksa(struct wiphy *wiphy,
{
if( _rtw_memcmp( psecuritypriv->PMKIDList[index].Bssid, (void *)pmksa->bssid, ETH_ALEN) ==true )
{ // BSSID is matched, the same AP => Remove this PMKID information and reset it.
_rtw_memset( psecuritypriv->PMKIDList[index].Bssid, 0x00, ETH_ALEN );
_rtw_memset( psecuritypriv->PMKIDList[index].PMKID, 0x00, WLAN_PMKID_LEN );
memset( psecuritypriv->PMKIDList[index].Bssid, 0x00, ETH_ALEN );
memset( psecuritypriv->PMKIDList[index].PMKID, 0x00, WLAN_PMKID_LEN );
psecuritypriv->PMKIDList[index].bUsed = false;
bMatched = true;
break;
@ -3153,7 +3153,7 @@ static int cfg80211_rtw_flush_pmksa(struct wiphy *wiphy,
DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(netdev));
_rtw_memset( &psecuritypriv->PMKIDList[ 0 ], 0x00, sizeof( RT_PMKID_LIST ) * NUM_PMKID_CACHE );
memset( &psecuritypriv->PMKIDList[ 0 ], 0x00, sizeof( RT_PMKID_LIST ) * NUM_PMKID_CACHE );
psecuritypriv->PMKIDIndex = 0;
return 0;
@ -3408,7 +3408,7 @@ dump:
update_mgntframe_attrib(padapter, pattrib);
pattrib->retry_ctrl = false;
_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;
@ -4211,8 +4211,8 @@ void rtw_cfg80211_issue_p2p_provision_request(struct adapter *padapter, const u8
}
//start to build provision_request frame
_rtw_memset(wpsie, 0, sizeof(wpsie));
_rtw_memset(p2p_ie, 0, sizeof(p2p_ie));
memset(wpsie, 0, sizeof(wpsie));
memset(p2p_ie, 0, sizeof(p2p_ie));
p2p_ielen = 0;
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
@ -4222,7 +4222,7 @@ void rtw_cfg80211_issue_p2p_provision_request(struct adapter *padapter, const 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;
@ -4531,7 +4531,7 @@ static int _cfg80211_rtw_mgmt_tx(struct adapter *padapter, u8 tx_ch, const u8 *b
update_mgntframe_attrib(padapter, pattrib);
pattrib->retry_ctrl = false;
_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;