Commit 1ce39848 authored by navin patidar's avatar navin patidar Committed by Greg Kroah-Hartman

staging: rtl8188eu: Remove function _rtw_memset()

Signed-off-by: default avatarnavin patidar <navin.patidar@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 56ed3914
...@@ -548,7 +548,7 @@ static void update_bmc_sta(struct adapter *padapter) ...@@ -548,7 +548,7 @@ static void update_bmc_sta(struct adapter *padapter)
psta->ieee8021x_blocked = 0; 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));
/* prepare for add_RATid */ /* prepare for add_RATid */
supportRateNum = rtw_get_rateset_len((u8 *)&pcur_network->SupportedRates); supportRateNum = rtw_get_rateset_len((u8 *)&pcur_network->SupportedRates);
...@@ -671,7 +671,7 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta) ...@@ -671,7 +671,7 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)
/* todo: init other variables */ /* 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));
spin_lock_bh(&psta->lock); spin_lock_bh(&psta->lock);
psta->state |= _FW_LINKED; psta->state |= _FW_LINKED;
...@@ -886,7 +886,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len) ...@@ -886,7 +886,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
pbss_network->IELength = len; pbss_network->IELength = len;
_rtw_memset(ie, 0, MAX_IE_SZ); memset(ie, 0, MAX_IE_SZ);
memcpy(ie, pbuf, pbss_network->IELength); memcpy(ie, pbuf, pbss_network->IELength);
...@@ -908,7 +908,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len) ...@@ -908,7 +908,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
/* SSID */ /* SSID */
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SSID_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_)); p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SSID_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
if (p && ie_len > 0) { if (p && ie_len > 0) {
_rtw_memset(&pbss_network->Ssid, 0, sizeof(struct ndis_802_11_ssid)); memset(&pbss_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
memcpy(pbss_network->Ssid.Ssid, (p + 2), ie_len); memcpy(pbss_network->Ssid.Ssid, (p + 2), ie_len);
pbss_network->Ssid.SsidLength = ie_len; pbss_network->Ssid.SsidLength = ie_len;
} }
...@@ -922,7 +922,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len) ...@@ -922,7 +922,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
pbss_network->Configuration.DSConfig = channel; 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 */ /* get supported rates */
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SUPPORTEDRATES_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_)); p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SUPPORTEDRATES_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
if (p != NULL) { if (p != NULL) {
...@@ -1934,7 +1934,7 @@ void stop_ap_mode(struct adapter *padapter) ...@@ -1934,7 +1934,7 @@ void stop_ap_mode(struct adapter *padapter)
pmlmeext->bstart_bss = false; pmlmeext->bstart_bss = false;
/* reset and init security priv , this can refine with rtw_reset_securitypriv */ /* 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.ndisauthtype = Ndis802_11AuthModeOpen;
padapter->securitypriv.ndisencryptstatus = Ndis802_11WEPDisabled; padapter->securitypriv.ndisencryptstatus = Ndis802_11WEPDisabled;
......
...@@ -878,7 +878,7 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork) ...@@ -878,7 +878,7 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork)
goto exit; goto exit;
} }
_rtw_memset(psecnetwork, 0, t_len); memset(psecnetwork, 0, t_len);
memcpy(psecnetwork, &pnetwork->network, get_wlan_bssid_ex_sz(&pnetwork->network)); memcpy(psecnetwork, &pnetwork->network, get_wlan_bssid_ex_sz(&pnetwork->network));
......
...@@ -304,7 +304,7 @@ static s32 iol_read_efuse(struct adapter *padapter, u8 txpktbuf_bndy, u16 offset ...@@ -304,7 +304,7 @@ static s32 iol_read_efuse(struct adapter *padapter, u8 txpktbuf_bndy, u16 offset
u16 size = 512; u16 size = 512;
usb_write8(padapter, REG_TDECTRL+1, txpktbuf_bndy); usb_write8(padapter, REG_TDECTRL+1, txpktbuf_bndy);
_rtw_memset(physical_map, 0xFF, 512); memset(physical_map, 0xFF, 512);
usb_write8(padapter, REG_PKT_BUFF_ACCESS_CTRL, TXPKT_BUF_SELECT); usb_write8(padapter, REG_PKT_BUFF_ACCESS_CTRL, TXPKT_BUF_SELECT);
status = iol_execute(padapter, CMD_READ_EFUSE_MAP); status = iol_execute(padapter, CMD_READ_EFUSE_MAP);
if (status == _SUCCESS) if (status == _SUCCESS)
...@@ -395,7 +395,7 @@ u8 Efuse_WordEnableDataWrite(struct adapter *pAdapter, u16 efuse_addr, u8 word_e ...@@ -395,7 +395,7 @@ u8 Efuse_WordEnableDataWrite(struct adapter *pAdapter, u16 efuse_addr, u8 word_e
u8 badworden = 0x0F; u8 badworden = 0x0F;
u8 tmpdata[8]; u8 tmpdata[8];
_rtw_memset((void *)tmpdata, 0xff, PGPKT_DATA_SIZE); memset((void *)tmpdata, 0xff, PGPKT_DATA_SIZE);
if (!(word_en&BIT0)) { if (!(word_en&BIT0)) {
tmpaddr = start_addr; tmpaddr = start_addr;
...@@ -501,8 +501,8 @@ int Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data) ...@@ -501,8 +501,8 @@ int Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data)
if (offset > max_section) if (offset > max_section)
return false; return false;
_rtw_memset((void *)data, 0xff, sizeof(u8)*PGPKT_DATA_SIZE); memset((void *)data, 0xff, sizeof(u8)*PGPKT_DATA_SIZE);
_rtw_memset((void *)tmpdata, 0xff, sizeof(u8)*PGPKT_DATA_SIZE); memset((void *)tmpdata, 0xff, sizeof(u8)*PGPKT_DATA_SIZE);
/* <Roger_TODO> Efuse has been pre-programmed dummy 5Bytes at the end of Efuse by CP. */ /* <Roger_TODO> Efuse has been pre-programmed dummy 5Bytes at the end of Efuse by CP. */
/* Skip dummy parts to prevent unexpected data read from Efuse. */ /* Skip dummy parts to prevent unexpected data read from Efuse. */
...@@ -573,7 +573,7 @@ static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, st ...@@ -573,7 +573,7 @@ static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, st
u16 efuse_addr = *pAddr; u16 efuse_addr = *pAddr;
u32 PgWriteSuccess = 0; u32 PgWriteSuccess = 0;
_rtw_memset((void *)originaldata, 0xff, 8); memset((void *)originaldata, 0xff, 8);
if (Efuse_PgPacketRead(pAdapter, pFixPkt->offset, originaldata)) { if (Efuse_PgPacketRead(pAdapter, pFixPkt->offset, originaldata)) {
/* check if data exist */ /* check if data exist */
...@@ -868,7 +868,7 @@ hal_EfusePgCheckAvailableAddr( ...@@ -868,7 +868,7 @@ hal_EfusePgCheckAvailableAddr(
static void hal_EfuseConstructPGPkt(u8 offset, u8 word_en, u8 *pData, struct pgpkt *pTargetPkt) static void hal_EfuseConstructPGPkt(u8 offset, u8 word_en, u8 *pData, struct pgpkt *pTargetPkt)
{ {
_rtw_memset((void *)pTargetPkt->data, 0xFF, sizeof(u8)*8); memset((void *)pTargetPkt->data, 0xFF, sizeof(u8)*8);
pTargetPkt->offset = offset; pTargetPkt->offset = offset;
pTargetPkt->word_en = word_en; pTargetPkt->word_en = word_en;
efuse_WordEnableDataRead(word_en, pData, pTargetPkt->data); efuse_WordEnableDataRead(word_en, pData, pTargetPkt->data);
...@@ -1095,7 +1095,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data) ...@@ -1095,7 +1095,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
offset = (addr >> 3); offset = (addr >> 3);
word_en = 0xF; word_en = 0xF;
_rtw_memset(newdata, 0xFF, PGPKT_DATA_SIZE + 1); memset(newdata, 0xFF, PGPKT_DATA_SIZE + 1);
i = addr & 0x7; /* index of one package */ i = addr & 0x7; /* index of one package */
idx = 0; /* data index */ idx = 0; /* data index */
...@@ -1151,7 +1151,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data) ...@@ -1151,7 +1151,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
offset++; offset++;
i = 0; i = 0;
word_en = 0xF; word_en = 0xF;
_rtw_memset(newdata, 0xFF, PGPKT_DATA_SIZE); memset(newdata, 0xFF, PGPKT_DATA_SIZE);
} while (1); } while (1);
Efuse_PowerSwitch(padapter, true, false); Efuse_PowerSwitch(padapter, true, false);
...@@ -1236,7 +1236,7 @@ void EFUSE_ShadowMapUpdate( ...@@ -1236,7 +1236,7 @@ void EFUSE_ShadowMapUpdate(
EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen); EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen);
if (pEEPROM->bautoload_fail_flag) if (pEEPROM->bautoload_fail_flag)
_rtw_memset(pEEPROM->efuse_eeprom_data, 0xFF, mapLen); memset(pEEPROM->efuse_eeprom_data, 0xFF, mapLen);
else else
Efuse_ReadAllMap(pAdapter, efuseType, pEEPROM->efuse_eeprom_data); Efuse_ReadAllMap(pAdapter, efuseType, pEEPROM->efuse_eeprom_data);
} }
......
...@@ -334,7 +334,7 @@ int rtw_ies_remove_ie(u8 *ies, uint *ies_len, uint offset, u8 eid, u8 *oui, u8 o ...@@ -334,7 +334,7 @@ int rtw_ies_remove_ie(u8 *ies, uint *ies_len, uint offset, u8 eid, u8 *oui, u8 o
void rtw_set_supported_rate(u8 *SupportedRates, uint mode) void rtw_set_supported_rate(u8 *SupportedRates, uint mode)
{ {
_rtw_memset(SupportedRates, 0, NDIS_802_11_LENGTH_RATES_EX); memset(SupportedRates, 0, NDIS_802_11_LENGTH_RATES_EX);
switch (mode) { switch (mode) {
case WIRELESS_11B: case WIRELESS_11B:
...@@ -957,7 +957,7 @@ enum parse_res rtw_ieee802_11_parse_elems(u8 *start, uint len, ...@@ -957,7 +957,7 @@ enum parse_res rtw_ieee802_11_parse_elems(u8 *start, uint len,
u8 *pos = start; u8 *pos = start;
int unknown = 0; int unknown = 0;
_rtw_memset(elems, 0, sizeof(*elems)); memset(elems, 0, sizeof(*elems));
while (left >= 2) { while (left >= 2) {
u8 id, elen; u8 id, elen;
...@@ -1333,9 +1333,9 @@ static uint rtw_p2p_attr_remove(u8 *ie, uint ielen_ori, u8 attr_id) ...@@ -1333,9 +1333,9 @@ static uint rtw_p2p_attr_remove(u8 *ie, uint ielen_ori, u8 attr_id)
u8 *next_attr = target_attr+target_attr_len; u8 *next_attr = target_attr+target_attr_len;
uint remain_len = ielen-(next_attr-ie); uint remain_len = ielen-(next_attr-ie);
_rtw_memset(target_attr, 0, target_attr_len); memset(target_attr, 0, target_attr_len);
memcpy(target_attr, next_attr, remain_len); memcpy(target_attr, next_attr, remain_len);
_rtw_memset(target_attr+remain_len, 0, target_attr_len); memset(target_attr+remain_len, 0, target_attr_len);
*(ie+1) -= target_attr_len; *(ie+1) -= target_attr_len;
ielen -= target_attr_len; ielen -= target_attr_len;
} else { } else {
...@@ -1359,7 +1359,7 @@ void rtw_wlan_bssid_ex_remove_p2p_attr(struct wlan_bssid_ex *bss_ex, u8 attr_id) ...@@ -1359,7 +1359,7 @@ void rtw_wlan_bssid_ex_remove_p2p_attr(struct wlan_bssid_ex *bss_ex, u8 attr_id)
uint remain_len = bss_ex->IELength-(next_ie_ori-bss_ex->IEs); uint remain_len = bss_ex->IELength-(next_ie_ori-bss_ex->IEs);
memcpy(next_ie, next_ie_ori, remain_len); memcpy(next_ie, next_ie_ori, remain_len);
_rtw_memset(next_ie+remain_len, 0, p2p_ielen_ori-p2p_ielen); memset(next_ie+remain_len, 0, p2p_ielen_ori-p2p_ielen);
bss_ex->IELength -= p2p_ielen_ori-p2p_ielen; bss_ex->IELength -= p2p_ielen_ori-p2p_ielen;
} }
} }
......
...@@ -126,7 +126,7 @@ u8 rtw_do_join(struct adapter *padapter) ...@@ -126,7 +126,7 @@ u8 rtw_do_join(struct adapter *padapter)
pibss = padapter->registrypriv.dev_network.MacAddress; pibss = padapter->registrypriv.dev_network.MacAddress;
_rtw_memset(&pdev_network->Ssid, 0, sizeof(struct ndis_802_11_ssid)); memset(&pdev_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid)); memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid));
rtw_update_registrypriv_dev_network(padapter); rtw_update_registrypriv_dev_network(padapter);
...@@ -605,7 +605,7 @@ u8 rtw_set_802_11_remove_wep(struct adapter *padapter, u32 keyindex) ...@@ -605,7 +605,7 @@ u8 rtw_set_802_11_remove_wep(struct adapter *padapter, u32 keyindex)
int res; int res;
struct security_priv *psecuritypriv = &(padapter->securitypriv); struct security_priv *psecuritypriv = &(padapter->securitypriv);
if (keyindex < 4) { if (keyindex < 4) {
_rtw_memset(&psecuritypriv->dot11DefKey[keyindex], 0, 16); memset(&psecuritypriv->dot11DefKey[keyindex], 0, 16);
res = rtw_set_key(padapter, psecuritypriv, keyindex, 0); res = rtw_set_key(padapter, psecuritypriv, keyindex, 0);
psecuritypriv->dot11DefKeylen[keyindex] = 0; psecuritypriv->dot11DefKeylen[keyindex] = 0;
if (res == _FAIL) if (res == _FAIL)
...@@ -869,9 +869,9 @@ u8 rtw_set_802_11_add_key(struct adapter *padapter, struct ndis_802_11_key *key) ...@@ -869,9 +869,9 @@ u8 rtw_set_802_11_add_key(struct adapter *padapter, struct ndis_802_11_key *key)
ret = _FAIL; ret = _FAIL;
goto exit; goto exit;
} }
_rtw_memset(&padapter->securitypriv.dot118021XGrpKey[(u8)((key->KeyIndex) & 0x03)], 0, 16); memset(&padapter->securitypriv.dot118021XGrpKey[(u8)((key->KeyIndex) & 0x03)], 0, 16);
_rtw_memset(&padapter->securitypriv.dot118021XGrptxmickey[(u8)((key->KeyIndex) & 0x03)], 0, 16); memset(&padapter->securitypriv.dot118021XGrptxmickey[(u8)((key->KeyIndex) & 0x03)], 0, 16);
_rtw_memset(&padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)], 0, 16); memset(&padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)], 0, 16);
if ((key->KeyIndex & 0x10000000)) { if ((key->KeyIndex & 0x10000000)) {
memcpy(&padapter->securitypriv.dot118021XGrptxmickey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial + 16, 8); memcpy(&padapter->securitypriv.dot118021XGrptxmickey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial + 16, 8);
...@@ -931,7 +931,7 @@ u8 rtw_set_802_11_add_key(struct adapter *padapter, struct ndis_802_11_key *key) ...@@ -931,7 +931,7 @@ u8 rtw_set_802_11_add_key(struct adapter *padapter, struct ndis_802_11_key *key)
stainfo = rtw_get_stainfo(&padapter->stapriv, pbssid); stainfo = rtw_get_stainfo(&padapter->stapriv, pbssid);
if (stainfo != NULL) { if (stainfo != NULL) {
_rtw_memset(&stainfo->dot118021x_UncstKey, 0, 16);/* clear keybuffer */ memset(&stainfo->dot118021x_UncstKey, 0, 16);/* clear keybuffer */
memcpy(&stainfo->dot118021x_UncstKey, key->KeyMaterial, 16); memcpy(&stainfo->dot118021x_UncstKey, key->KeyMaterial, 16);
...@@ -988,7 +988,7 @@ u8 rtw_set_802_11_remove_key(struct adapter *padapter, struct ndis_802_11_remove ...@@ -988,7 +988,7 @@ u8 rtw_set_802_11_remove_key(struct adapter *padapter, struct ndis_802_11_remove
if (bgroup) { if (bgroup) {
/* clear group key by index */ /* clear group key by index */
_rtw_memset(&padapter->securitypriv.dot118021XGrpKey[keyIndex], 0, 16); memset(&padapter->securitypriv.dot118021XGrpKey[keyIndex], 0, 16);
/* \todo Send a H2C Command to Firmware for removing this Key in CAM Entry. */ /* \todo Send a H2C Command to Firmware for removing this Key in CAM Entry. */
} else { } else {
...@@ -996,7 +996,7 @@ u8 rtw_set_802_11_remove_key(struct adapter *padapter, struct ndis_802_11_remove ...@@ -996,7 +996,7 @@ u8 rtw_set_802_11_remove_key(struct adapter *padapter, struct ndis_802_11_remove
stainfo = rtw_get_stainfo(&padapter->stapriv, pbssid); stainfo = rtw_get_stainfo(&padapter->stapriv, pbssid);
if (stainfo) { if (stainfo) {
/* clear key by BSSID */ /* clear key by BSSID */
_rtw_memset(&stainfo->dot118021x_UncstKey, 0, 16); memset(&stainfo->dot118021x_UncstKey, 0, 16);
/* \todo Send a H2C Command to Firmware for disable this Key in CAM Entry. */ /* \todo Send a H2C Command to Firmware for disable this Key in CAM Entry. */
} else { } else {
......
...@@ -59,7 +59,7 @@ int _rtw_init_mlme_priv(struct adapter *padapter) ...@@ -59,7 +59,7 @@ int _rtw_init_mlme_priv(struct adapter *padapter)
set_scanned_network_val(pmlmepriv, 0); set_scanned_network_val(pmlmepriv, 0);
_rtw_memset(&pmlmepriv->assoc_ssid, 0, sizeof(struct ndis_802_11_ssid)); memset(&pmlmepriv->assoc_ssid, 0, sizeof(struct ndis_802_11_ssid));
pbuf = vzalloc(MAX_BSS_CNT * (sizeof(struct wlan_network))); pbuf = vzalloc(MAX_BSS_CNT * (sizeof(struct wlan_network)));
...@@ -754,7 +754,7 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf) ...@@ -754,7 +754,7 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("switching to adhoc master\n")); RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("switching to adhoc master\n"));
_rtw_memset(&pdev_network->Ssid, 0, sizeof(struct ndis_802_11_ssid)); memset(&pdev_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid)); memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid));
rtw_update_registrypriv_dev_network(adapter); rtw_update_registrypriv_dev_network(adapter);
...@@ -1000,11 +1000,11 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, str ...@@ -1000,11 +1000,11 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, str
padapter->securitypriv.bgrpkey_handshake = false; padapter->securitypriv.bgrpkey_handshake = false;
psta->ieee8021x_blocked = true; psta->ieee8021x_blocked = true;
psta->dot118021XPrivacy = padapter->securitypriv.dot11PrivacyAlgrthm; psta->dot118021XPrivacy = padapter->securitypriv.dot11PrivacyAlgrthm;
_rtw_memset((u8 *)&psta->dot118021x_UncstKey, 0, sizeof(union Keytype)); memset((u8 *)&psta->dot118021x_UncstKey, 0, sizeof(union Keytype));
_rtw_memset((u8 *)&psta->dot11tkiprxmickey, 0, sizeof(union Keytype)); memset((u8 *)&psta->dot11tkiprxmickey, 0, sizeof(union Keytype));
_rtw_memset((u8 *)&psta->dot11tkiptxmickey, 0, sizeof(union Keytype)); memset((u8 *)&psta->dot11tkiptxmickey, 0, sizeof(union Keytype));
_rtw_memset((u8 *)&psta->dot11txpn, 0, sizeof(union pn48)); memset((u8 *)&psta->dot11txpn, 0, sizeof(union pn48));
_rtw_memset((u8 *)&psta->dot11rxpn, 0, sizeof(union pn48)); memset((u8 *)&psta->dot11rxpn, 0, sizeof(union pn48));
} }
/* /*
* Commented by Albert 2012/07/21 * Commented by Albert 2012/07/21
...@@ -1419,7 +1419,7 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf) ...@@ -1419,7 +1419,7 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
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));
_rtw_memset(&pdev_network->Ssid, 0, sizeof(struct ndis_802_11_ssid)); memset(&pdev_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid)); memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid));
rtw_update_registrypriv_dev_network(adapter); rtw_update_registrypriv_dev_network(adapter);
...@@ -1681,7 +1681,7 @@ int rtw_set_auth(struct adapter *adapter, struct security_priv *psecuritypriv) ...@@ -1681,7 +1681,7 @@ int rtw_set_auth(struct adapter *adapter, struct security_priv *psecuritypriv)
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
_rtw_memset(psetauthparm, 0, sizeof(struct setauth_parm)); memset(psetauthparm, 0, sizeof(struct setauth_parm));
psetauthparm->mode = (unsigned char)psecuritypriv->dot11AuthAlgrthm; psetauthparm->mode = (unsigned char)psecuritypriv->dot11AuthAlgrthm;
pcmd->cmdcode = _SetAuth_CMD_; pcmd->cmdcode = _SetAuth_CMD_;
pcmd->parmbuf = (unsigned char *)psetauthparm; pcmd->parmbuf = (unsigned char *)psetauthparm;
...@@ -1716,7 +1716,7 @@ int rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, in ...@@ -1716,7 +1716,7 @@ int rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, in
goto err_free_cmd; goto err_free_cmd;
} }
_rtw_memset(psetkeyparm, 0, sizeof(struct setkey_parm)); memset(psetkeyparm, 0, sizeof(struct setkey_parm));
if (psecuritypriv->dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) { if (psecuritypriv->dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) {
psetkeyparm->algorithm = (unsigned char)psecuritypriv->dot118021XGrpPrivacy; psetkeyparm->algorithm = (unsigned char)psecuritypriv->dot118021XGrpPrivacy;
...@@ -2050,7 +2050,7 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_ ...@@ -2050,7 +2050,7 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_
out_len = *pout_len; out_len = *pout_len;
_rtw_memset(&ht_capie, 0, sizeof(struct rtw_ieee80211_ht_cap)); memset(&ht_capie, 0, sizeof(struct rtw_ieee80211_ht_cap));
ht_capie.cap_info = IEEE80211_HT_CAP_SUP_WIDTH | ht_capie.cap_info = IEEE80211_HT_CAP_SUP_WIDTH |
IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_20 |
......
...@@ -97,7 +97,7 @@ static void _init_mp_priv_(struct mp_priv *pmp_priv) ...@@ -97,7 +97,7 @@ static void _init_mp_priv_(struct mp_priv *pmp_priv)
{ {
struct wlan_bssid_ex *pnetwork; struct wlan_bssid_ex *pnetwork;
_rtw_memset(pmp_priv, 0, sizeof(struct mp_priv)); memset(pmp_priv, 0, sizeof(struct mp_priv));
pmp_priv->mode = MP_OFF; pmp_priv->mode = MP_OFF;
...@@ -138,12 +138,12 @@ static void mp_init_xmit_attrib(struct mp_tx *pmptx, struct adapter *padapter) ...@@ -138,12 +138,12 @@ static void mp_init_xmit_attrib(struct mp_tx *pmptx, struct adapter *padapter)
/* init xmitframe attribute */ /* init xmitframe attribute */
pattrib = &pmptx->attrib; pattrib = &pmptx->attrib;
_rtw_memset(pattrib, 0, sizeof(struct pkt_attrib)); memset(pattrib, 0, sizeof(struct pkt_attrib));
desc = &pmptx->desc; desc = &pmptx->desc;
_rtw_memset(desc, 0, TXDESC_SIZE); memset(desc, 0, TXDESC_SIZE);
pattrib->ether_type = 0x8712; pattrib->ether_type = 0x8712;
_rtw_memset(pattrib->dst, 0xFF, ETH_ALEN); memset(pattrib->dst, 0xFF, ETH_ALEN);
pattrib->ack_policy = 0; pattrib->ack_policy = 0;
pattrib->hdrlen = WLAN_HDR_A3_LEN; pattrib->hdrlen = WLAN_HDR_A3_LEN;
pattrib->subtype = WIFI_DATA; pattrib->subtype = WIFI_DATA;
...@@ -362,7 +362,6 @@ s32 mp_start_test(struct adapter *padapter) ...@@ -362,7 +362,6 @@ s32 mp_start_test(struct adapter *padapter)
mpt_ProStartTest(padapter); mpt_ProStartTest(padapter);
/* 3 1. initialize a new struct wlan_bssid_ex */ /* 3 1. initialize a new struct wlan_bssid_ex */
/* _rtw_memset(&bssid, 0, sizeof(struct wlan_bssid_ex)); */
memcpy(bssid.MacAddress, pmppriv->network_macaddr, ETH_ALEN); memcpy(bssid.MacAddress, pmppriv->network_macaddr, ETH_ALEN);
bssid.Ssid.SsidLength = strlen("mp_pseudo_adhoc"); bssid.Ssid.SsidLength = strlen("mp_pseudo_adhoc");
memcpy(bssid.Ssid.Ssid, (u8 *)"mp_pseudo_adhoc", bssid.Ssid.SsidLength); memcpy(bssid.Ssid.Ssid, (u8 *)"mp_pseudo_adhoc", bssid.Ssid.SsidLength);
...@@ -454,7 +453,7 @@ void mp_stop_test(struct adapter *padapter) ...@@ -454,7 +453,7 @@ void mp_stop_test(struct adapter *padapter)
pmlmepriv->fw_state = pmppriv->prev_fw_state; /* WIFI_STATION_STATE; */ pmlmepriv->fw_state = pmppriv->prev_fw_state; /* WIFI_STATION_STATE; */
/* flush the cur_network */ /* flush the cur_network */
_rtw_memset(tgt_network, 0, sizeof(struct wlan_network)); memset(tgt_network, 0, sizeof(struct wlan_network));
_clr_fwstate_(pmlmepriv, WIFI_MP_STATE); _clr_fwstate_(pmlmepriv, WIFI_MP_STATE);
...@@ -697,7 +696,7 @@ void SetPacketTx(struct adapter *padapter) ...@@ -697,7 +696,7 @@ void SetPacketTx(struct adapter *padapter)
ptr = pmp_priv->tx.buf; ptr = pmp_priv->tx.buf;
desc = &(pmp_priv->tx.desc); desc = &(pmp_priv->tx.desc);
_rtw_memset(desc, 0, TXDESC_SIZE); memset(desc, 0, TXDESC_SIZE);
pkt_start = ptr; pkt_start = ptr;
pkt_end = pkt_start + pkt_size; pkt_end = pkt_start + pkt_size;
...@@ -770,7 +769,7 @@ void SetPacketTx(struct adapter *padapter) ...@@ -770,7 +769,7 @@ void SetPacketTx(struct adapter *padapter)
break; break;
} }
_rtw_memset(ptr, payload, pkt_end - ptr); memset(ptr, payload, pkt_end - ptr);
/* 3 6. start thread */ /* 3 6. start thread */
pmp_priv->tx.PktTxThread = kthread_run(mp_xmit_packet_thread, pmp_priv, "RTW_MP_THREAD"); pmp_priv->tx.PktTxThread = kthread_run(mp_xmit_packet_thread, pmp_priv, "RTW_MP_THREAD");
...@@ -905,7 +904,7 @@ u32 mp_query_psd(struct adapter *pAdapter, u8 *data) ...@@ -905,7 +904,7 @@ u32 mp_query_psd(struct adapter *pAdapter, u8 *data)
return 0; return 0;
} }
_rtw_memset(data, '\0', sizeof(*data)); memset(data, '\0', sizeof(*data));
i = psd_start; i = psd_start;
while (i < psd_stop) { while (i < psd_stop) {
......
...@@ -153,7 +153,7 @@ static void issue_group_disc_req(struct wifidirect_info *pwdinfo, u8 *da) ...@@ -153,7 +153,7 @@ static void issue_group_disc_req(struct wifidirect_info *pwdinfo, u8 *da)
pattrib = &pmgntframe->attrib; pattrib = &pmgntframe->attrib;
update_mgntframe_attrib(padapter, pattrib); 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; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
...@@ -212,7 +212,7 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s ...@@ -212,7 +212,7 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s
pattrib = &pmgntframe->attrib; pattrib = &pmgntframe->attrib;
update_mgntframe_attrib(padapter, pattrib); 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; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
...@@ -283,7 +283,7 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr, ...@@ -283,7 +283,7 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr,
pattrib = &pmgntframe->attrib; pattrib = &pmgntframe->attrib;
update_mgntframe_attrib(padapter, pattrib); 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; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
...@@ -362,7 +362,7 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 ...@@ -362,7 +362,7 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
pattrib = &pmgntframe->attrib; pattrib = &pmgntframe->attrib;
update_mgntframe_attrib(padapter, pattrib); 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; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
...@@ -1197,7 +1197,7 @@ u8 process_p2p_group_negotation_req(struct wifidirect_info *pwdinfo, u8 *pframe, ...@@ -1197,7 +1197,7 @@ u8 process_p2p_group_negotation_req(struct wifidirect_info *pwdinfo, u8 *pframe,
attr_contentlen = 0; 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 (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) 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)) { if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CH_LIST, ch_content, &ch_cnt)) {
...@@ -1300,7 +1300,7 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe ...@@ -1300,7 +1300,7 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe
attr_contentlen = 0; 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 (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) 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. */ /* Try to get the peer's intent and tie breaker value. */
...@@ -1392,7 +1392,7 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe ...@@ -1392,7 +1392,7 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe
/* Try to get the group id information if peer is GO */ /* Try to get the group id information if peer is GO */
attr_contentlen = 0; 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)) { 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.go_device_addr, &groupid[0], ETH_ALEN);
memcpy(pwdinfo->groupid_info.ssid, &groupid[6], attr_contentlen - ETH_ALEN); memcpy(pwdinfo->groupid_info.ssid, &groupid[6], attr_contentlen - ETH_ALEN);
...@@ -1456,7 +1456,7 @@ u8 process_p2p_group_negotation_confirm(struct wifidirect_info *pwdinfo, u8 *pfr ...@@ -1456,7 +1456,7 @@ u8 process_p2p_group_negotation_confirm(struct wifidirect_info *pwdinfo, u8 *pfr
/* Try to get the group id information */ /* Try to get the group id information */
attr_contentlen = 0; 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)) { 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])); 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); memcpy(pwdinfo->groupid_info.go_device_addr, &groupid[0], ETH_ALEN);
...@@ -1499,7 +1499,7 @@ static void find_phase_handler(struct adapter *padapter) ...@@ -1499,7 +1499,7 @@ static void find_phase_handler(struct adapter *padapter)
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
_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); memcpy(ssid.Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN);
ssid.SsidLength = P2P_WILDCARD_SSID_LEN; ssid.SsidLength = P2P_WILDCARD_SSID_LEN;
...@@ -1930,44 +1930,44 @@ void init_wifidirect_info(struct adapter *padapter, enum P2P_ROLE role) ...@@ -1930,44 +1930,44 @@ void init_wifidirect_info(struct adapter *padapter, enum P2P_ROLE role)
memcpy(pwdinfo->p2p_wildcard_ssid, "DIRECT-", 7); 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; 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. */ 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->inviteresp_info.token = 0;
pwdinfo->profileindex = 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); rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_NONE);
pwdinfo->listen_dwell = (u8) ((jiffies % 3) + 1); pwdinfo->listen_dwell = (u8) ((jiffies % 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; 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->device_password_id_for_nego = WPS_DPID_PBC;
pwdinfo->negotiation_dialog_token = 1; 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->nego_ssidlen = 0;
pwdinfo->ui_got_wps_info = P2P_NO_WPSINFO; 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->supported_wps_cm = WPS_CONFIG_METHOD_DISPLAY | WPS_CONFIG_METHOD_PBC | WPS_CONFIG_METHOD_KEYPAD;
pwdinfo->channel_list_attr_len = 0; 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); 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); 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->groupid_info, 0x00, sizeof(struct group_id_info));
pwdinfo->wfd_tdls_enable = 0; pwdinfo->wfd_tdls_enable = 0;
_rtw_memset(pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN); memset(pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN);
_rtw_memset(pwdinfo->p2p_peer_device_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[0] = 0;
pwdinfo->rx_invitereq_info.operation_ch[1] = 0; /* Used to indicate the scan end in site survey function */ pwdinfo->rx_invitereq_info.operation_ch[1] = 0; /* Used to indicate the scan end in site survey function */
...@@ -2015,7 +2015,7 @@ int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role) ...@@ -2015,7 +2015,7 @@ int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role)
reset_ch_sitesurvey_timer_process2(padapter); reset_ch_sitesurvey_timer_process2(padapter);
rtw_p2p_set_state(pwdinfo, P2P_STATE_NONE); rtw_p2p_set_state(pwdinfo, P2P_STATE_NONE);
rtw_p2p_set_role(pwdinfo, P2P_ROLE_DISABLE); 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); rtw_hal_set_odm_var(padapter, HAL_ODM_P2P_STATE, NULL, false);
......
...@@ -46,7 +46,7 @@ void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS); ...@@ -46,7 +46,7 @@ void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS);
void _rtw_init_sta_recv_priv(struct sta_recv_priv *psta_recvpriv) void _rtw_init_sta_recv_priv(struct sta_recv_priv *psta_recvpriv)
{ {
_rtw_memset((u8 *)psta_recvpriv, 0, sizeof (struct sta_recv_priv)); memset((u8 *)psta_recvpriv, 0, sizeof (struct sta_recv_priv));
spin_lock_init(&psta_recvpriv->lock); spin_lock_init(&psta_recvpriv->lock);
......
...@@ -1081,13 +1081,13 @@ static int aes_cipher(u8 *key, uint hdrlen, u8 *pframe, uint plen) ...@@ -1081,13 +1081,13 @@ static int aes_cipher(u8 *key, uint hdrlen, u8 *pframe, uint plen)
frsubtype = frsubtype>>4; frsubtype = frsubtype>>4;
_rtw_memset((void *)mic_iv, 0, 16); memset((void *)mic_iv, 0, 16);
_rtw_memset((void *)mic_header1, 0, 16); memset((void *)mic_header1, 0, 16);
_rtw_memset((void *)mic_header2, 0, 16); memset((void *)mic_header2, 0, 16);
_rtw_memset((void *)ctr_preload, 0, 16); memset((void *)ctr_preload, 0, 16);
_rtw_memset((void *)chain_buffer, 0, 16); memset((void *)chain_buffer, 0, 16);
_rtw_memset((void *)aes_out, 0, 16); memset((void *)aes_out, 0, 16);
_rtw_memset((void *)padded_buffer, 0, 16); memset((void *)padded_buffer, 0, 16);
if ((hdrlen == WLAN_HDR_A3_LEN) || (hdrlen == WLAN_HDR_A3_QOS_LEN)) if ((hdrlen == WLAN_HDR_A3_LEN) || (hdrlen == WLAN_HDR_A3_QOS_LEN))
a4_exists = 0; a4_exists = 0;
...@@ -1279,13 +1279,13 @@ static int aes_decipher(u8 *key, uint hdrlen, ...@@ -1279,13 +1279,13 @@ static int aes_decipher(u8 *key, uint hdrlen,
uint frsubtype = GetFrameSubType(pframe); uint frsubtype = GetFrameSubType(pframe);
frsubtype = frsubtype>>4; frsubtype = frsubtype>>4;
_rtw_memset((void *)mic_iv, 0, 16); memset((void *)mic_iv, 0, 16);
_rtw_memset((void *)mic_header1, 0, 16); memset((void *)mic_header1, 0, 16);
_rtw_memset((void *)mic_header2, 0, 16); memset((void *)mic_header2, 0, 16);
_rtw_memset((void *)ctr_preload, 0, 16); memset((void *)ctr_preload, 0, 16);
_rtw_memset((void *)chain_buffer, 0, 16); memset((void *)chain_buffer, 0, 16);
_rtw_memset((void *)aes_out, 0, 16); memset((void *)aes_out, 0, 16);
_rtw_memset((void *)padded_buffer, 0, 16); memset((void *)padded_buffer, 0, 16);
/* start to decrypt the payload */ /* start to decrypt the payload */
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
static void _rtw_init_stainfo(struct sta_info *psta) static void _rtw_init_stainfo(struct sta_info *psta)
{ {
_rtw_memset((u8 *)psta, 0, sizeof (struct sta_info)); memset((u8 *)psta, 0, sizeof (struct sta_info));
spin_lock_init(&psta->lock); spin_lock_init(&psta->lock);
_rtw_init_listhead(&psta->list); _rtw_init_listhead(&psta->list);
......
...@@ -239,7 +239,7 @@ void get_rate_set(struct adapter *padapter, unsigned char *pbssrate, int *bssrat ...@@ -239,7 +239,7 @@ void get_rate_set(struct adapter *padapter, unsigned char *pbssrate, int *bssrat
{ {
unsigned char supportedrates[NumRates]; unsigned char supportedrates[NumRates];
_rtw_memset(supportedrates, 0, NumRates); memset(supportedrates, 0, NumRates);
*bssrate_len = ratetbl2rateset(padapter, supportedrates); *bssrate_len = ratetbl2rateset(padapter, supportedrates);
memcpy(pbssrate, supportedrates, *bssrate_len); memcpy(pbssrate, supportedrates, *bssrate_len);
} }
...@@ -541,7 +541,7 @@ void flush_all_cam_entry(struct adapter *padapter) ...@@ -541,7 +541,7 @@ void flush_all_cam_entry(struct adapter *padapter)
rtw_hal_set_hwreg(padapter, HW_VAR_CAM_INVALID_ALL, NULL); rtw_hal_set_hwreg(padapter, HW_VAR_CAM_INVALID_ALL, NULL);
_rtw_memset((u8 *)(pmlmeinfo->FW_sta_info), 0, sizeof(pmlmeinfo->FW_sta_info)); memset((u8 *)(pmlmeinfo->FW_sta_info), 0, sizeof(pmlmeinfo->FW_sta_info));
} }
int WMM_param_handler(struct adapter *padapter, struct ndis_802_11_var_ie *pIE) int WMM_param_handler(struct adapter *padapter, struct ndis_802_11_var_ie *pIE)
...@@ -1366,7 +1366,7 @@ void update_tx_basic_rate(struct adapter *padapter, u8 wirelessmode) ...@@ -1366,7 +1366,7 @@ void update_tx_basic_rate(struct adapter *padapter, u8 wirelessmode)
if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
return; return;
#endif /* CONFIG_88EU_P2P */ #endif /* CONFIG_88EU_P2P */
_rtw_memset(supported_rates, 0, NDIS_802_11_LENGTH_RATES_EX); memset(supported_rates, 0, NDIS_802_11_LENGTH_RATES_EX);
if ((wirelessmode & WIRELESS_11B) && (wirelessmode == WIRELESS_11B)) if ((wirelessmode & WIRELESS_11B) && (wirelessmode == WIRELESS_11B))
memcpy(supported_rates, rtw_basic_rate_cck, 4); memcpy(supported_rates, rtw_basic_rate_cck, 4);
......
...@@ -38,7 +38,7 @@ static void _init_txservq(struct tx_servq *ptxservq) ...@@ -38,7 +38,7 @@ static void _init_txservq(struct tx_servq *ptxservq)
void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv) void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv)
{ {
_rtw_memset((unsigned char *)psta_xmitpriv, 0, sizeof (struct sta_xmit_priv)); memset((unsigned char *)psta_xmitpriv, 0, sizeof (struct sta_xmit_priv));
spin_lock_init(&psta_xmitpriv->lock); spin_lock_init(&psta_xmitpriv->lock);
_init_txservq(&psta_xmitpriv->be_q); _init_txservq(&psta_xmitpriv->be_q);
_init_txservq(&psta_xmitpriv->bk_q); _init_txservq(&psta_xmitpriv->bk_q);
...@@ -800,7 +800,7 @@ s32 rtw_make_wlanhdr (struct adapter *padapter , u8 *hdr, struct pkt_attrib *pat ...@@ -800,7 +800,7 @@ s32 rtw_make_wlanhdr (struct adapter *padapter , u8 *hdr, struct pkt_attrib *pat
} }
} }
_rtw_memset(hdr, 0, WLANHDR_OFFSET); memset(hdr, 0, WLANHDR_OFFSET);
SetFrameSubType(fctrl, pattrib->subtype); SetFrameSubType(fctrl, pattrib->subtype);
...@@ -1390,7 +1390,7 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* _queue *pf ...@@ -1390,7 +1390,7 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* _queue *pf
pxframe->buf_addr = NULL; pxframe->buf_addr = NULL;
pxframe->pxmitbuf = NULL; pxframe->pxmitbuf = NULL;
_rtw_memset(&pxframe->attrib, 0, sizeof(struct pkt_attrib)); memset(&pxframe->attrib, 0, sizeof(struct pkt_attrib));
/* pxframe->attrib.psta = NULL; */ /* pxframe->attrib.psta = NULL; */
pxframe->frame_tag = DATA_FRAMETAG; pxframe->frame_tag = DATA_FRAMETAG;
......
...@@ -350,7 +350,7 @@ s32 c2h_evt_read(struct adapter *adapter, u8 *buf) ...@@ -350,7 +350,7 @@ s32 c2h_evt_read(struct adapter *adapter, u8 *buf)
c2h_evt = (struct c2h_evt_hdr *)buf; c2h_evt = (struct c2h_evt_hdr *)buf;
_rtw_memset(c2h_evt, 0, 16); memset(c2h_evt, 0, 16);
*buf = usb_read8(adapter, REG_C2HEVT_MSG_NORMAL); *buf = usb_read8(adapter, REG_C2HEVT_MSG_NORMAL);
*(buf+1) = usb_read8(adapter, REG_C2HEVT_MSG_NORMAL + 1); *(buf+1) = usb_read8(adapter, REG_C2HEVT_MSG_NORMAL + 1);
......
...@@ -153,7 +153,7 @@ u8 rtl8188e_set_raid_cmd(struct adapter *adapt, u32 mask) ...@@ -153,7 +153,7 @@ u8 rtl8188e_set_raid_cmd(struct adapter *adapt, u32 mask)
if (haldata->fw_ractrl) { if (haldata->fw_ractrl) {
__le32 lmask; __le32 lmask;
_rtw_memset(buf, 0, 3); memset(buf, 0, 3);
lmask = cpu_to_le32(mask); lmask = cpu_to_le32(mask);
memcpy(buf, &lmask, 3); memcpy(buf, &lmask, 3);
...@@ -700,7 +700,7 @@ void rtl8188e_set_p2p_ps_offload_cmd(struct adapter *adapt, u8 p2p_ps_state) ...@@ -700,7 +700,7 @@ void rtl8188e_set_p2p_ps_offload_cmd(struct adapter *adapt, u8 p2p_ps_state)
switch (p2p_ps_state) { switch (p2p_ps_state) {
case P2P_PS_DISABLE: case P2P_PS_DISABLE:
DBG_88E("P2P_PS_DISABLE\n"); DBG_88E("P2P_PS_DISABLE\n");
_rtw_memset(p2p_ps_offload, 0, 1); memset(p2p_ps_offload, 0, 1);
break; break;
case P2P_PS_ENABLE: case P2P_PS_ENABLE:
DBG_88E("P2P_PS_ENABLE\n"); DBG_88E("P2P_PS_ENABLE\n");
......
...@@ -53,7 +53,7 @@ static void Init_ODM_ComInfo_88E(struct adapter *Adapter) ...@@ -53,7 +53,7 @@ static void Init_ODM_ComInfo_88E(struct adapter *Adapter)
u8 cut_ver, fab_ver; u8 cut_ver, fab_ver;
/* Init Value */ /* Init Value */
_rtw_memset(dm_odm, 0, sizeof(*dm_odm)); memset(dm_odm, 0, sizeof(*dm_odm));
dm_odm->Adapter = Adapter; dm_odm->Adapter = Adapter;
...@@ -198,7 +198,7 @@ void rtl8188e_init_dm_priv(struct adapter *Adapter) ...@@ -198,7 +198,7 @@ void rtl8188e_init_dm_priv(struct adapter *Adapter)
struct dm_priv *pdmpriv = &hal_data->dmpriv; struct dm_priv *pdmpriv = &hal_data->dmpriv;
struct odm_dm_struct *podmpriv = &hal_data->odmpriv; struct odm_dm_struct *podmpriv = &hal_data->odmpriv;
_rtw_memset(pdmpriv, 0, sizeof(struct dm_priv)); memset(pdmpriv, 0, sizeof(struct dm_priv));
Init_ODM_ComInfo_88E(Adapter); Init_ODM_ComInfo_88E(Adapter);
ODM_InitDebugSetting(podmpriv); ODM_InitDebugSetting(podmpriv);
} }
......
...@@ -741,7 +741,7 @@ static void Hal_ReadPowerValueFromPROM_8188E(struct txpowerinfo24g *pwrInfo24G, ...@@ -741,7 +741,7 @@ static void Hal_ReadPowerValueFromPROM_8188E(struct txpowerinfo24g *pwrInfo24G,
{ {
u32 rfPath, eeAddr = EEPROM_TX_PWR_INX_88E, group, TxCount = 0; u32 rfPath, eeAddr = EEPROM_TX_PWR_INX_88E, group, TxCount = 0;
_rtw_memset(pwrInfo24G, 0, sizeof(struct txpowerinfo24g)); memset(pwrInfo24G, 0, sizeof(struct txpowerinfo24g));
if (AutoLoadFail) { if (AutoLoadFail) {
for (rfPath = 0; rfPath < MAX_RF_PATH; rfPath++) { for (rfPath = 0; rfPath < MAX_RF_PATH; rfPath++) {
......
...@@ -86,7 +86,7 @@ void update_recvframe_attrib_88e(struct recv_frame *precvframe, ...@@ -86,7 +86,7 @@ void update_recvframe_attrib_88e(struct recv_frame *precvframe,
report.rxdw5 = prxstat->rxdw5; report.rxdw5 = prxstat->rxdw5;
pattrib = &precvframe->attrib; pattrib = &precvframe->attrib;
_rtw_memset(pattrib, 0, sizeof(struct rx_pkt_attrib)); memset(pattrib, 0, sizeof(struct rx_pkt_attrib));
pattrib->crc_err = (u8)((le32_to_cpu(report.rxdw0) >> 14) & 0x1);/* u8)prxreport->crc32; */ pattrib->crc_err = (u8)((le32_to_cpu(report.rxdw0) >> 14) & 0x1);/* u8)prxreport->crc32; */
......
...@@ -47,7 +47,7 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter) ...@@ -47,7 +47,7 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter)
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("alloc recv_buf fail!\n")); RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("alloc recv_buf fail!\n"));
goto exit; goto exit;
} }
_rtw_memset(precvpriv->pallocated_recv_buf, 0, NR_RECVBUFF * sizeof(struct recv_buf) + 4); memset(precvpriv->pallocated_recv_buf, 0, NR_RECVBUFF * sizeof(struct recv_buf) + 4);
precvpriv->precv_buf = (u8 *)N_BYTE_ALIGMENT((size_t)(precvpriv->pallocated_recv_buf), 4); precvpriv->precv_buf = (u8 *)N_BYTE_ALIGMENT((size_t)(precvpriv->pallocated_recv_buf), 4);
......
...@@ -68,7 +68,7 @@ void rtl8188e_fill_fake_txdesc(struct adapter *adapt, u8 *desc, u32 BufferLen, u ...@@ -68,7 +68,7 @@ void rtl8188e_fill_fake_txdesc(struct adapter *adapt, u8 *desc, u32 BufferLen, u
/* Clear all status */ /* Clear all status */
ptxdesc = (struct tx_desc *)desc; ptxdesc = (struct tx_desc *)desc;
_rtw_memset(desc, 0, TXDESC_SIZE); memset(desc, 0, TXDESC_SIZE);
/* offset 0 */ /* offset 0 */
ptxdesc->txdw0 |= cpu_to_le32(OWN | FSG | LSG); /* own, bFirstSeg, bLastSeg; */ ptxdesc->txdw0 |= cpu_to_le32(OWN | FSG | LSG); /* own, bFirstSeg, bLastSeg; */
...@@ -192,7 +192,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bag ...@@ -192,7 +192,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bag
} }
} }
_rtw_memset(ptxdesc, 0, sizeof(struct tx_desc)); memset(ptxdesc, 0, sizeof(struct tx_desc));
/* 4 offset 0 */ /* 4 offset 0 */
ptxdesc->txdw0 |= cpu_to_le32(OWN | FSG | LSG); ptxdesc->txdw0 |= cpu_to_le32(OWN | FSG | LSG);
......
...@@ -199,7 +199,6 @@ void *rtw_malloc2d(int h, int w, int size); ...@@ -199,7 +199,6 @@ void *rtw_malloc2d(int h, int w, int size);
void rtw_mfree2d(void *pbuf, int h, int w, int size); void rtw_mfree2d(void *pbuf, int h, int w, int size);
void _rtw_memcpy(void *dec, void *sour, u32 sz); void _rtw_memcpy(void *dec, void *sour, u32 sz);
void _rtw_memset(void *pbuf, int c, u32 sz);
void _rtw_init_listhead(struct list_head *list); void _rtw_init_listhead(struct list_head *list);
u32 rtw_is_list_empty(struct list_head *phead); u32 rtw_is_list_empty(struct list_head *phead);
......
...@@ -85,12 +85,12 @@ void rtw_reset_securitypriv(struct adapter *adapter) ...@@ -85,12 +85,12 @@ void rtw_reset_securitypriv(struct adapter *adapter)
/* We have to backup the PMK information for WiFi PMK Caching test item. */ /* We have to backup the PMK information for WiFi PMK Caching test item. */
/* Backup the btkip_countermeasure information. */ /* Backup the btkip_countermeasure information. */
/* When the countermeasure is trigger, the driver have to disconnect with AP for 60 seconds. */ /* When the countermeasure is trigger, the driver have to disconnect with AP for 60 seconds. */
_rtw_memset(&backup_pmkid[0], 0x00, sizeof(struct rt_pmkid_list) * NUM_PMKID_CACHE); memset(&backup_pmkid[0], 0x00, sizeof(struct rt_pmkid_list) * NUM_PMKID_CACHE);
memcpy(&backup_pmkid[0], &adapter->securitypriv.PMKIDList[0], sizeof(struct rt_pmkid_list) * NUM_PMKID_CACHE); memcpy(&backup_pmkid[0], &adapter->securitypriv.PMKIDList[0], sizeof(struct rt_pmkid_list) * NUM_PMKID_CACHE);
backup_index = adapter->securitypriv.PMKIDIndex; backup_index = adapter->securitypriv.PMKIDIndex;
backup_counter = adapter->securitypriv.btkip_countermeasure; backup_counter = adapter->securitypriv.btkip_countermeasure;
backup_time = adapter->securitypriv.btkip_countermeasure_time; backup_time = adapter->securitypriv.btkip_countermeasure_time;
_rtw_memset((unsigned char *)&adapter->securitypriv, 0, sizeof(struct security_priv)); memset((unsigned char *)&adapter->securitypriv, 0, sizeof(struct security_priv));
/* Restore the PMK information to securitypriv structure for the following connection. */ /* Restore the PMK information to securitypriv structure for the following connection. */
memcpy(&adapter->securitypriv.PMKIDList[0], memcpy(&adapter->securitypriv.PMKIDList[0],
...@@ -137,7 +137,7 @@ void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie) ...@@ -137,7 +137,7 @@ void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)
buff = rtw_malloc(IW_CUSTOM_MAX); buff = rtw_malloc(IW_CUSTOM_MAX);
if (!buff) if (!buff)
return; return;
_rtw_memset(buff, 0, IW_CUSTOM_MAX); memset(buff, 0, IW_CUSTOM_MAX);
p = buff; p = buff;
p += sprintf(p, "ASSOCINFO(ReqIEs ="); p += sprintf(p, "ASSOCINFO(ReqIEs =");
len = sec_ie[1]+2; len = sec_ie[1]+2;
...@@ -145,7 +145,7 @@ void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie) ...@@ -145,7 +145,7 @@ void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)
for (i = 0; i < len; i++) for (i = 0; i < len; i++)
p += sprintf(p, "%02x", sec_ie[i]); p += sprintf(p, "%02x", sec_ie[i]);
p += sprintf(p, ")"); p += sprintf(p, ")");
_rtw_memset(&wrqu, 0, sizeof(wrqu)); memset(&wrqu, 0, sizeof(wrqu));
wrqu.data.length = p-buff; wrqu.data.length = p-buff;
wrqu.data.length = (wrqu.data.length < IW_CUSTOM_MAX) ? wrqu.data.length = (wrqu.data.length < IW_CUSTOM_MAX) ?
wrqu.data.length : IW_CUSTOM_MAX; wrqu.data.length : IW_CUSTOM_MAX;
......
...@@ -94,11 +94,6 @@ void rtw_mfree2d(void *pbuf, int h, int w, int size) ...@@ -94,11 +94,6 @@ void rtw_mfree2d(void *pbuf, int h, int w, int size)
kfree(pbuf); kfree(pbuf);
} }
void _rtw_memset(void *pbuf, int c, u32 sz)
{
memset(pbuf, c, sz);
}
void _rtw_init_listhead(struct list_head *list) void _rtw_init_listhead(struct list_head *list)
{ {
INIT_LIST_HEAD(list); INIT_LIST_HEAD(list);
......
...@@ -73,7 +73,7 @@ void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup) ...@@ -73,7 +73,7 @@ void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup)
} }
} }
_rtw_memset(&ev, 0x00, sizeof(ev)); memset(&ev, 0x00, sizeof(ev));
if (bgroup) if (bgroup)
ev.flags |= IW_MICFAILURE_GROUP; ev.flags |= IW_MICFAILURE_GROUP;
else else
...@@ -81,7 +81,7 @@ void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup) ...@@ -81,7 +81,7 @@ void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup)
ev.src_addr.sa_family = ARPHRD_ETHER; ev.src_addr.sa_family = ARPHRD_ETHER;
memcpy(ev.src_addr.sa_data, &pmlmepriv->assoc_bssid[0], ETH_ALEN); memcpy(ev.src_addr.sa_data, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
_rtw_memset(&wrqu, 0x00, sizeof(wrqu)); memset(&wrqu, 0x00, sizeof(wrqu));
wrqu.data.length = sizeof(ev); wrqu.data.length = sizeof(ev);
wireless_send_event(padapter->pnetdev, IWEVMICHAELMICFAILURE, wireless_send_event(padapter->pnetdev, IWEVMICHAELMICFAILURE,
&wrqu, (char *)&ev); &wrqu, (char *)&ev);
......
...@@ -261,7 +261,7 @@ static int usbctrl_vendorreq(struct adapter *adapt, u8 request, u16 value, u16 i ...@@ -261,7 +261,7 @@ static int usbctrl_vendorreq(struct adapter *adapt, u8 request, u16 value, u16 i
} }
while (++vendorreq_times <= MAX_USBCTRL_VENDORREQ_TIMES) { while (++vendorreq_times <= MAX_USBCTRL_VENDORREQ_TIMES) {
_rtw_memset(pIo_buf, 0, len); memset(pIo_buf, 0, len);
if (requesttype == 0x01) { if (requesttype == 0x01) {
pipe = usb_rcvctrlpipe(udev, 0);/* read_in */ pipe = usb_rcvctrlpipe(udev, 0);/* read_in */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment