mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-24 05:23:40 +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
|
@ -547,7 +547,7 @@ 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);
|
||||||
|
@ -674,7 +674,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;
|
||||||
|
@ -887,7 +887,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)
|
||||||
/* 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)
|
||||||
|
|
||||||
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)
|
||||||
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;
|
||||||
|
|
||||||
|
|
|
@ -884,7 +884,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));
|
||||||
|
|
||||||
|
|
|
@ -561,7 +561,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 */
|
||||||
|
|
||||||
|
@ -617,7 +617,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);
|
||||||
|
@ -653,7 +653,7 @@ u8 rtw_BT_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 */
|
||||||
|
|
||||||
|
@ -711,7 +711,7 @@ u8 rtw_BT_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);
|
||||||
|
@ -839,7 +839,7 @@ void EFUSE_ShadowMapUpdate(
|
||||||
EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, pseudo);
|
EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, pseudo);
|
||||||
|
|
||||||
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, pseudo);
|
Efuse_ReadAllMap(pAdapter, efuseType, pEEPROM->efuse_eeprom_data, pseudo);
|
||||||
} /* EFUSE_ShadowMapUpdate */
|
} /* EFUSE_ShadowMapUpdate */
|
||||||
|
|
|
@ -337,7 +337,7 @@ exit:
|
||||||
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:
|
||||||
|
@ -956,7 +956,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;
|
||||||
|
@ -1332,9 +1332,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 {
|
||||||
|
@ -1358,7 +1358,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,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);
|
||||||
|
@ -591,7 +591,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)
|
||||||
|
@ -853,9 +853,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);
|
||||||
|
@ -915,7 +915,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);
|
||||||
|
|
||||||
|
@ -970,7 +970,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 {
|
||||||
|
@ -978,7 +978,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 {
|
||||||
|
|
|
@ -70,7 +70,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 = rtw_zvmalloc(MAX_BSS_CNT * (sizeof(struct wlan_network)));
|
pbuf = rtw_zvmalloc(MAX_BSS_CNT * (sizeof(struct wlan_network)));
|
||||||
|
|
||||||
|
@ -823,7 +823,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);
|
||||||
|
@ -1076,11 +1076,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 */
|
||||||
/* When doing the WPS, the wps_ie_len won't equal to 0 */
|
/* When doing the WPS, the wps_ie_len won't equal to 0 */
|
||||||
|
@ -1495,7 +1495,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);
|
||||||
|
@ -1783,7 +1783,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;
|
||||||
|
@ -1821,7 +1821,7 @@ int rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, in
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
_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;
|
||||||
|
@ -2158,7 +2158,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 = cpu_to_le16(IEEE80211_HT_CAP_SUP_WIDTH |
|
ht_capie.cap_info = cpu_to_le16(IEEE80211_HT_CAP_SUP_WIDTH |
|
||||||
IEEE80211_HT_CAP_SGI_20 |
|
IEEE80211_HT_CAP_SGI_20 |
|
||||||
|
|
|
@ -252,7 +252,7 @@ static void init_mlme_ext_priv_value(struct adapter *padapter)
|
||||||
pmlmeinfo->enc_algo = _NO_PRIVACY_;
|
pmlmeinfo->enc_algo = _NO_PRIVACY_;
|
||||||
pmlmeinfo->authModeToggle = 0;
|
pmlmeinfo->authModeToggle = 0;
|
||||||
|
|
||||||
_rtw_memset(pmlmeinfo->chg_txt, 0, 128);
|
memset(pmlmeinfo->chg_txt, 0, 128);
|
||||||
|
|
||||||
pmlmeinfo->slotTime = SHORT_SLOT_TIME;
|
pmlmeinfo->slotTime = SHORT_SLOT_TIME;
|
||||||
pmlmeinfo->preamble_mode = PREAMBLE_AUTO;
|
pmlmeinfo->preamble_mode = PREAMBLE_AUTO;
|
||||||
|
@ -324,7 +324,7 @@ static u8 init_channel_set(struct adapter *padapter, u8 ChannelPlan, struct rt_c
|
||||||
u8 b2_4GBand = false;
|
u8 b2_4GBand = false;
|
||||||
u8 Index2G = 0;
|
u8 Index2G = 0;
|
||||||
|
|
||||||
_rtw_memset(channel_set, 0, sizeof(struct rt_channel_info) * MAX_CHANNEL_NUM);
|
memset(channel_set, 0, sizeof(struct rt_channel_info) * MAX_CHANNEL_NUM);
|
||||||
|
|
||||||
if (ChannelPlan >= RT_CHANNEL_DOMAIN_MAX && ChannelPlan != RT_CHANNEL_DOMAIN_REALTEK_DEFINE) {
|
if (ChannelPlan >= RT_CHANNEL_DOMAIN_MAX && ChannelPlan != RT_CHANNEL_DOMAIN_REALTEK_DEFINE) {
|
||||||
DBG_88E("ChannelPlan ID %x error !!!!!\n", ChannelPlan);
|
DBG_88E("ChannelPlan ID %x error !!!!!\n", ChannelPlan);
|
||||||
|
@ -908,7 +908,7 @@ auth_fail:
|
||||||
rtw_free_stainfo(padapter , pstat);
|
rtw_free_stainfo(padapter , pstat);
|
||||||
|
|
||||||
pstat = &stat;
|
pstat = &stat;
|
||||||
_rtw_memset((char *)pstat, '\0', sizeof(stat));
|
memset((char *)pstat, '\0', sizeof(stat));
|
||||||
pstat->auth_seq = 2;
|
pstat->auth_seq = 2;
|
||||||
memcpy(pstat->hwaddr, sa, 6);
|
memcpy(pstat->hwaddr, sa, 6);
|
||||||
|
|
||||||
|
@ -1137,7 +1137,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
pstat->wpa2_group_cipher = 0;
|
pstat->wpa2_group_cipher = 0;
|
||||||
pstat->wpa_pairwise_cipher = 0;
|
pstat->wpa_pairwise_cipher = 0;
|
||||||
pstat->wpa2_pairwise_cipher = 0;
|
pstat->wpa2_pairwise_cipher = 0;
|
||||||
_rtw_memset(pstat->wpa_ie, 0, sizeof(pstat->wpa_ie));
|
memset(pstat->wpa_ie, 0, sizeof(pstat->wpa_ie));
|
||||||
if ((psecuritypriv->wpa_psk & BIT(1)) && elems.rsn_ie) {
|
if ((psecuritypriv->wpa_psk & BIT(1)) && elems.rsn_ie) {
|
||||||
int group_cipher = 0, pairwise_cipher = 0;
|
int group_cipher = 0, pairwise_cipher = 0;
|
||||||
|
|
||||||
|
@ -1304,7 +1304,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* save HT capabilities in the sta object */
|
/* save HT capabilities in the sta object */
|
||||||
_rtw_memset(&pstat->htpriv.ht_cap, 0, sizeof(struct rtw_ieee80211_ht_cap));
|
memset(&pstat->htpriv.ht_cap, 0, sizeof(struct rtw_ieee80211_ht_cap));
|
||||||
if (elems.ht_capabilities && elems.ht_capabilities_len >= sizeof(struct rtw_ieee80211_ht_cap)) {
|
if (elems.ht_capabilities && elems.ht_capabilities_len >= sizeof(struct rtw_ieee80211_ht_cap)) {
|
||||||
pstat->flags |= WLAN_STA_HT;
|
pstat->flags |= WLAN_STA_HT;
|
||||||
|
|
||||||
|
@ -1861,7 +1861,7 @@ void issue_p2p_GO_request(struct adapter *padapter, 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;
|
||||||
|
@ -2199,7 +2199,7 @@ static void issue_p2p_GO_response(struct adapter *padapter, u8 *raddr, u8 *frame
|
||||||
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;
|
||||||
|
@ -2232,7 +2232,7 @@ static void issue_p2p_GO_response(struct adapter *padapter, u8 *raddr, u8 *frame
|
||||||
rtw_get_wps_attr_content(wpsie, wpsielen, WPS_ATTR_DEVICE_PWID, (u8 *)&be_tmp, &wps_devicepassword_id_len);
|
rtw_get_wps_attr_content(wpsie, wpsielen, WPS_ATTR_DEVICE_PWID, (u8 *)&be_tmp, &wps_devicepassword_id_len);
|
||||||
wps_devicepassword_id = be16_to_cpu(be_tmp);
|
wps_devicepassword_id = be16_to_cpu(be_tmp);
|
||||||
|
|
||||||
_rtw_memset(wpsie, 0x00, 255);
|
memset(wpsie, 0x00, 255);
|
||||||
wpsielen = 0;
|
wpsielen = 0;
|
||||||
|
|
||||||
/* WPS Section */
|
/* WPS Section */
|
||||||
|
@ -2558,7 +2558,7 @@ static void issue_p2p_GO_confirm(struct adapter *padapter, u8 *raddr, u8 result)
|
||||||
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;
|
||||||
|
@ -2721,7 +2721,7 @@ void issue_p2p_invitation_request(struct adapter *padapter, 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;
|
||||||
|
@ -2969,7 +2969,7 @@ void issue_p2p_invitation_response(struct adapter *padapter, u8 *raddr, u8 dialo
|
||||||
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;
|
||||||
|
@ -3163,7 +3163,7 @@ void issue_p2p_provision_request(struct adapter *padapter, u8 *pssid, u8 ussidle
|
||||||
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;
|
||||||
|
@ -3275,7 +3275,7 @@ void issue_probersp_p2p(struct adapter *padapter, unsigned char *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;
|
||||||
|
@ -3523,7 +3523,7 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack)
|
||||||
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;
|
||||||
|
@ -3894,7 +3894,7 @@ static unsigned int on_action_public_p2p(union recv_frame *precv_frame)
|
||||||
switch (frame_body[6]) { /* OUI Subtype */
|
switch (frame_body[6]) { /* OUI Subtype */
|
||||||
case P2P_GO_NEGO_REQ:
|
case P2P_GO_NEGO_REQ:
|
||||||
DBG_88E("[%s] Got GO Nego Req Frame\n", __func__);
|
DBG_88E("[%s] Got GO Nego Req Frame\n", __func__);
|
||||||
_rtw_memset(&pwdinfo->groupid_info, 0x00, sizeof(struct group_id_info));
|
memset(&pwdinfo->groupid_info, 0x00, sizeof(struct group_id_info));
|
||||||
|
|
||||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_RX_PROVISION_DIS_REQ))
|
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_RX_PROVISION_DIS_REQ))
|
||||||
rtw_p2p_set_state(pwdinfo, rtw_p2p_pre_state(pwdinfo));
|
rtw_p2p_set_state(pwdinfo, rtw_p2p_pre_state(pwdinfo));
|
||||||
|
@ -3994,7 +3994,7 @@ static unsigned int on_action_public_p2p(union recv_frame *precv_frame)
|
||||||
if (invitation_flag & P2P_INVITATION_FLAGS_PERSISTENT) {
|
if (invitation_flag & P2P_INVITATION_FLAGS_PERSISTENT) {
|
||||||
/* Re-invoke the persistent group. */
|
/* Re-invoke the persistent group. */
|
||||||
|
|
||||||
_rtw_memset(&group_id, 0x00, sizeof(struct group_id_info));
|
memset(&group_id, 0x00, sizeof(struct group_id_info));
|
||||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, (u8 *)&group_id, &attr_contentlen);
|
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, (u8 *)&group_id, &attr_contentlen);
|
||||||
if (attr_contentlen) {
|
if (attr_contentlen) {
|
||||||
if (_rtw_memcmp(group_id.go_device_addr, myid(&padapter->eeprompriv), ETH_ALEN)) {
|
if (_rtw_memcmp(group_id.go_device_addr, myid(&padapter->eeprompriv), ETH_ALEN)) {
|
||||||
|
@ -4042,7 +4042,7 @@ static unsigned int on_action_public_p2p(union recv_frame *precv_frame)
|
||||||
} else {
|
} else {
|
||||||
/* Received the invitation to join a P2P group. */
|
/* Received the invitation to join a P2P group. */
|
||||||
|
|
||||||
_rtw_memset(&group_id, 0x00, sizeof(struct group_id_info));
|
memset(&group_id, 0x00, sizeof(struct group_id_info));
|
||||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, (u8 *)&group_id, &attr_contentlen);
|
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, (u8 *)&group_id, &attr_contentlen);
|
||||||
if (attr_contentlen) {
|
if (attr_contentlen) {
|
||||||
if (_rtw_memcmp(group_id.go_device_addr, myid(&padapter->eeprompriv), ETH_ALEN)) {
|
if (_rtw_memcmp(group_id.go_device_addr, myid(&padapter->eeprompriv), ETH_ALEN)) {
|
||||||
|
@ -4332,7 +4332,7 @@ void update_mgntframe_attrib(struct adapter *padapter, struct pkt_attrib *pattri
|
||||||
{
|
{
|
||||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||||
|
|
||||||
_rtw_memset((u8 *)(pattrib), 0, sizeof(struct pkt_attrib));
|
memset((u8 *)(pattrib), 0, sizeof(struct pkt_attrib));
|
||||||
|
|
||||||
pattrib->hdrlen = 24;
|
pattrib->hdrlen = 24;
|
||||||
pattrib->nr_frags = 1;
|
pattrib->nr_frags = 1;
|
||||||
|
@ -4435,7 +4435,7 @@ static int update_hidden_ssid(u8 *ies, u32 ies_len, u8 hidden_ssid_mode)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
_rtw_memset(&ssid_ie[2], 0, ssid_len_ori);
|
memset(&ssid_ie[2], 0, ssid_len_ori);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -4477,7 +4477,7 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
|
||||||
update_mgntframe_attrib(padapter, pattrib);
|
update_mgntframe_attrib(padapter, pattrib);
|
||||||
pattrib->qsel = 0x10;
|
pattrib->qsel = 0x10;
|
||||||
|
|
||||||
_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;
|
||||||
|
@ -4702,7 +4702,7 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
|
||||||
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;
|
||||||
|
@ -4857,7 +4857,7 @@ static int _issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *ps
|
||||||
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;
|
||||||
|
@ -4993,7 +4993,7 @@ void issue_auth(struct adapter *padapter, struct sta_info *psta, unsigned short
|
||||||
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;
|
||||||
|
@ -5132,7 +5132,7 @@ void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_i
|
||||||
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;
|
||||||
|
@ -5270,7 +5270,7 @@ void issue_assocreq(struct adapter *padapter)
|
||||||
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;
|
||||||
|
|
||||||
|
@ -5600,7 +5600,7 @@ static int _issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned
|
||||||
update_mgntframe_attrib(padapter, pattrib);
|
update_mgntframe_attrib(padapter, pattrib);
|
||||||
pattrib->retry_ctrl = false;
|
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;
|
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
|
||||||
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
|
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
|
||||||
|
@ -5715,7 +5715,7 @@ static int _issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16
|
||||||
pattrib->ack_policy = 0;
|
pattrib->ack_policy = 0;
|
||||||
pattrib->mdata = 0;
|
pattrib->mdata = 0;
|
||||||
|
|
||||||
_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;
|
||||||
|
@ -5840,7 +5840,7 @@ static int _issue_deauth(struct adapter *padapter, unsigned char *da, unsigned s
|
||||||
update_mgntframe_attrib(padapter, pattrib);
|
update_mgntframe_attrib(padapter, pattrib);
|
||||||
pattrib->retry_ctrl = false;
|
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;
|
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
|
||||||
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
|
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
|
||||||
|
@ -5940,7 +5940,7 @@ void issue_action_spct_ch_switch (struct adapter *padapter, u8 *ra, u8 new_ch, u
|
||||||
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;
|
||||||
|
@ -6010,7 +6010,7 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch
|
||||||
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;
|
||||||
|
@ -6149,7 +6149,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
|
||||||
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;
|
||||||
|
@ -6181,7 +6181,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
_rtw_memset(ICS, 0, sizeof(ICS));
|
memset(ICS, 0, sizeof(ICS));
|
||||||
if (pmlmepriv->num_sta_no_ht > 0) {
|
if (pmlmepriv->num_sta_no_ht > 0) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -6510,7 +6510,7 @@ u8 collect_bss_info(struct adapter *padapter, union recv_frame *precv_frame, str
|
||||||
if (len > MAX_IE_SZ)
|
if (len > MAX_IE_SZ)
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
|
|
||||||
_rtw_memset(bssid, 0, sizeof(struct wlan_bssid_ex));
|
memset(bssid, 0, sizeof(struct wlan_bssid_ex));
|
||||||
|
|
||||||
subtype = GetFrameSubType(pframe);
|
subtype = GetFrameSubType(pframe);
|
||||||
|
|
||||||
|
@ -6561,7 +6561,7 @@ u8 collect_bss_info(struct adapter *padapter, union recv_frame *precv_frame, str
|
||||||
bssid->Ssid.SsidLength = 0;
|
bssid->Ssid.SsidLength = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memset(bssid->SupportedRates, 0, NDIS_802_11_LENGTH_RATES_EX);
|
memset(bssid->SupportedRates, 0, NDIS_802_11_LENGTH_RATES_EX);
|
||||||
|
|
||||||
/* checking rate info... */
|
/* checking rate info... */
|
||||||
i = 0;
|
i = 0;
|
||||||
|
@ -6858,7 +6858,7 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid
|
||||||
p = ie;
|
p = ie;
|
||||||
ie += len;
|
ie += len;
|
||||||
|
|
||||||
_rtw_memset(country, 0, 4);
|
memset(country, 0, 4);
|
||||||
memcpy(country, p, 3);
|
memcpy(country, p, 3);
|
||||||
p += 3;
|
p += 3;
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_,
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_,
|
||||||
|
@ -6883,7 +6883,7 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid
|
||||||
|
|
||||||
memcpy(chplan_sta, pmlmeext->channel_set, sizeof(chplan_sta));
|
memcpy(chplan_sta, pmlmeext->channel_set, sizeof(chplan_sta));
|
||||||
|
|
||||||
_rtw_memset(pmlmeext->channel_set, 0, sizeof(pmlmeext->channel_set));
|
memset(pmlmeext->channel_set, 0, sizeof(pmlmeext->channel_set));
|
||||||
chplan_new = pmlmeext->channel_set;
|
chplan_new = pmlmeext->channel_set;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
|
@ -7954,7 +7954,7 @@ static int rtw_scan_ch_decision(struct adapter *padapter, struct rtw_ieee80211_c
|
||||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||||
|
|
||||||
/* clear out first */
|
/* clear out first */
|
||||||
_rtw_memset(out, 0, sizeof(struct rtw_ieee80211_channel)*out_num);
|
memset(out, 0, sizeof(struct rtw_ieee80211_channel)*out_num);
|
||||||
|
|
||||||
/* acquire channels from in */
|
/* acquire channels from in */
|
||||||
j = 0;
|
j = 0;
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
/* 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,7 @@ 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)); */
|
/* 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 +454,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);
|
||||||
|
|
||||||
|
@ -695,7 +695,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;
|
||||||
|
|
||||||
|
@ -768,7 +768,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");
|
||||||
|
@ -899,7 +899,7 @@ u32 mp_query_psd(struct adapter *pAdapter, u8 *data)
|
||||||
sscanf(data, "pts =%d, start =%d, stop =%d", &psd_pts, &psd_start, &psd_stop);
|
sscanf(data, "pts =%d, start =%d, stop =%d", &psd_pts, &psd_start, &psd_stop);
|
||||||
}
|
}
|
||||||
|
|
||||||
_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) {
|
||||||
|
|
|
@ -151,7 +151,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;
|
||||||
|
@ -210,7 +210,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;
|
||||||
|
@ -280,7 +280,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;
|
||||||
|
@ -359,7 +359,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;
|
||||||
|
@ -1176,7 +1176,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)) {
|
||||||
|
@ -1279,7 +1279,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. */
|
||||||
|
@ -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 */
|
/* 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);
|
||||||
|
@ -1435,7 +1435,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);
|
||||||
|
@ -1477,7 +1477,7 @@ static void find_phase_handler(struct adapter *padapter)
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
struct ndis_802_11_ssid ssid;
|
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);
|
memcpy(ssid.Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN);
|
||||||
ssid.SsidLength = 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);
|
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) ((rtw_get_current_time() % 3) + 1);
|
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;
|
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 */
|
||||||
|
@ -1991,7 +1991,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);
|
||||||
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);
|
||||||
|
|
||||||
|
|
|
@ -1129,13 +1129,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;
|
||||||
|
@ -1328,13 +1328,13 @@ static int aes_decipher(u8 *key, uint hdrlen,
|
||||||
|
|
||||||
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 @@
|
||||||
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
|
||||||
{
|
{
|
||||||
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)
|
||||||
|
|
||||||
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)
|
||||||
|
@ -1374,7 +1374,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);
|
||||||
|
|
|
@ -42,7 +42,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);
|
||||||
|
@ -822,7 +822,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);
|
||||||
|
|
||||||
|
@ -1399,7 +1399,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)
|
||||||
|
|
||||||
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 = rtw_read8(adapter, REG_C2HEVT_MSG_NORMAL);
|
*buf = rtw_read8(adapter, REG_C2HEVT_MSG_NORMAL);
|
||||||
*(buf+1) = rtw_read8(adapter, REG_C2HEVT_MSG_NORMAL + 1);
|
*(buf+1) = rtw_read8(adapter, REG_C2HEVT_MSG_NORMAL + 1);
|
||||||
|
|
|
@ -150,7 +150,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);
|
||||||
|
|
||||||
|
@ -701,7 +701,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");
|
||||||
|
|
|
@ -57,7 +57,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;
|
||||||
|
|
||||||
|
@ -214,7 +214,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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -293,7 +293,7 @@ static s32 iol_read_efuse(struct adapter *padapter, u8 txpktbuf_bndy, u16 offset
|
||||||
u16 size = 512;
|
u16 size = 512;
|
||||||
|
|
||||||
rtw_write8(padapter, REG_TDECTRL+1, txpktbuf_bndy);
|
rtw_write8(padapter, REG_TDECTRL+1, txpktbuf_bndy);
|
||||||
_rtw_memset(physical_map, 0xFF, 512);
|
memset(physical_map, 0xFF, 512);
|
||||||
rtw_write8(padapter, REG_PKT_BUFF_ACCESS_CTRL, TXPKT_BUF_SELECT);
|
rtw_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)
|
||||||
|
@ -1118,7 +1118,7 @@ static u8 Hal_EfuseWordEnableDataWrite(struct adapter *pAdapter, u16 efuse_addr,
|
||||||
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;
|
||||||
|
@ -1268,8 +1268,8 @@ static int hal_EfusePgPacketRead_8188e(struct adapter *pAdapter, u8 offset, u8 *
|
||||||
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. */
|
||||||
|
@ -1367,7 +1367,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, bPseudoTest)) {
|
if (Efuse_PgPacketRead(pAdapter, pFixPkt->offset, originaldata, bPseudoTest)) {
|
||||||
/* check if data exist */
|
/* check if data exist */
|
||||||
|
@ -1675,7 +1675,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);
|
||||||
|
@ -2010,7 +2010,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++) {
|
||||||
|
|
|
@ -84,7 +84,7 @@ void update_recvframe_attrib_88e(union recv_frame *precvframe, struct recv_stat
|
||||||
report.rxdw5 = prxstat->rxdw5;
|
report.rxdw5 = prxstat->rxdw5;
|
||||||
|
|
||||||
pattrib = &precvframe->u.hdr.attrib;
|
pattrib = &precvframe->u.hdr.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; */
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,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);
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,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; */
|
||||||
|
@ -196,7 +196,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);
|
||||||
|
|
|
@ -61,7 +61,7 @@ static int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u
|
||||||
}
|
}
|
||||||
|
|
||||||
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 */
|
||||||
|
@ -691,7 +691,7 @@ void rtl8188eu_xmit_tasklet(void *priv)
|
||||||
void rtl8188eu_set_intf_ops(struct _io_ops *pops)
|
void rtl8188eu_set_intf_ops(struct _io_ops *pops)
|
||||||
{
|
{
|
||||||
|
|
||||||
_rtw_memset((u8 *)pops, 0, sizeof(struct _io_ops));
|
memset((u8 *)pops, 0, sizeof(struct _io_ops));
|
||||||
pops->_read8 = &usb_read8;
|
pops->_read8 = &usb_read8;
|
||||||
pops->_read16 = &usb_read16;
|
pops->_read16 = &usb_read16;
|
||||||
pops->_read32 = &usb_read32;
|
pops->_read32 = &usb_read32;
|
||||||
|
|
|
@ -258,9 +258,7 @@ void _rtw_mfree(u8 *pbuf, u32 sz);
|
||||||
void *rtw_malloc2d(int h, int w, int size);
|
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);
|
|
||||||
int _rtw_memcmp(void *dst, void *src, u32 sz);
|
int _rtw_memcmp(void *dst, void *src, 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);
|
||||||
|
|
|
@ -148,7 +148,7 @@ void indicate_wx_scan_complete_event(struct adapter *padapter)
|
||||||
{
|
{
|
||||||
union iwreq_data wrqu;
|
union iwreq_data wrqu;
|
||||||
|
|
||||||
_rtw_memset(&wrqu, 0, sizeof(union iwreq_data));
|
memset(&wrqu, 0, sizeof(union iwreq_data));
|
||||||
wireless_send_event(padapter->pnetdev, SIOCGIWSCAN, &wrqu, NULL);
|
wireless_send_event(padapter->pnetdev, SIOCGIWSCAN, &wrqu, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ void rtw_indicate_wx_assoc_event(struct adapter *padapter)
|
||||||
union iwreq_data wrqu;
|
union iwreq_data wrqu;
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
|
|
||||||
_rtw_memset(&wrqu, 0, sizeof(union iwreq_data));
|
memset(&wrqu, 0, sizeof(union iwreq_data));
|
||||||
|
|
||||||
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
|
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
|
||||||
|
|
||||||
|
@ -171,10 +171,10 @@ void rtw_indicate_wx_disassoc_event(struct adapter *padapter)
|
||||||
{
|
{
|
||||||
union iwreq_data wrqu;
|
union iwreq_data wrqu;
|
||||||
|
|
||||||
_rtw_memset(&wrqu, 0, sizeof(union iwreq_data));
|
memset(&wrqu, 0, sizeof(union iwreq_data));
|
||||||
|
|
||||||
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
|
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
|
||||||
_rtw_memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN);
|
memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN);
|
||||||
|
|
||||||
DBG_88E_LEVEL(_drv_always_, "indicate disassoc\n");
|
DBG_88E_LEVEL(_drv_always_, "indicate disassoc\n");
|
||||||
wireless_send_event(padapter->pnetdev, SIOCGIWAP, &wrqu, NULL);
|
wireless_send_event(padapter->pnetdev, SIOCGIWAP, &wrqu, NULL);
|
||||||
|
@ -360,33 +360,33 @@ static char *translate_scan(struct adapter *padapter,
|
||||||
|
|
||||||
if (wpa_len > 0) {
|
if (wpa_len > 0) {
|
||||||
p = buf;
|
p = buf;
|
||||||
_rtw_memset(buf, 0, MAX_WPA_IE_LEN);
|
memset(buf, 0, MAX_WPA_IE_LEN);
|
||||||
p += sprintf(p, "wpa_ie =");
|
p += sprintf(p, "wpa_ie =");
|
||||||
for (i = 0; i < wpa_len; i++)
|
for (i = 0; i < wpa_len; i++)
|
||||||
p += sprintf(p, "%02x", wpa_ie[i]);
|
p += sprintf(p, "%02x", wpa_ie[i]);
|
||||||
|
|
||||||
_rtw_memset(&iwe, 0, sizeof(iwe));
|
memset(&iwe, 0, sizeof(iwe));
|
||||||
iwe.cmd = IWEVCUSTOM;
|
iwe.cmd = IWEVCUSTOM;
|
||||||
iwe.u.data.length = strlen(buf);
|
iwe.u.data.length = strlen(buf);
|
||||||
start = iwe_stream_add_point(info, start, stop, &iwe, buf);
|
start = iwe_stream_add_point(info, start, stop, &iwe, buf);
|
||||||
|
|
||||||
_rtw_memset(&iwe, 0, sizeof(iwe));
|
memset(&iwe, 0, sizeof(iwe));
|
||||||
iwe.cmd = IWEVGENIE;
|
iwe.cmd = IWEVGENIE;
|
||||||
iwe.u.data.length = wpa_len;
|
iwe.u.data.length = wpa_len;
|
||||||
start = iwe_stream_add_point(info, start, stop, &iwe, wpa_ie);
|
start = iwe_stream_add_point(info, start, stop, &iwe, wpa_ie);
|
||||||
}
|
}
|
||||||
if (rsn_len > 0) {
|
if (rsn_len > 0) {
|
||||||
p = buf;
|
p = buf;
|
||||||
_rtw_memset(buf, 0, MAX_WPA_IE_LEN);
|
memset(buf, 0, MAX_WPA_IE_LEN);
|
||||||
p += sprintf(p, "rsn_ie =");
|
p += sprintf(p, "rsn_ie =");
|
||||||
for (i = 0; i < rsn_len; i++)
|
for (i = 0; i < rsn_len; i++)
|
||||||
p += sprintf(p, "%02x", rsn_ie[i]);
|
p += sprintf(p, "%02x", rsn_ie[i]);
|
||||||
_rtw_memset(&iwe, 0, sizeof(iwe));
|
memset(&iwe, 0, sizeof(iwe));
|
||||||
iwe.cmd = IWEVCUSTOM;
|
iwe.cmd = IWEVCUSTOM;
|
||||||
iwe.u.data.length = strlen(buf);
|
iwe.u.data.length = strlen(buf);
|
||||||
start = iwe_stream_add_point(info, start, stop, &iwe, buf);
|
start = iwe_stream_add_point(info, start, stop, &iwe, buf);
|
||||||
|
|
||||||
_rtw_memset(&iwe, 0, sizeof(iwe));
|
memset(&iwe, 0, sizeof(iwe));
|
||||||
iwe.cmd = IWEVGENIE;
|
iwe.cmd = IWEVGENIE;
|
||||||
iwe.u.data.length = rsn_len;
|
iwe.u.data.length = rsn_len;
|
||||||
start = iwe_stream_add_point(info, start, stop, &iwe, rsn_ie);
|
start = iwe_stream_add_point(info, start, stop, &iwe, rsn_ie);
|
||||||
|
@ -522,7 +522,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
|
||||||
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_err_, (" wpa_set_encryption: pwep allocate fail !!!\n"));
|
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_err_, (" wpa_set_encryption: pwep allocate fail !!!\n"));
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
_rtw_memset(pwep, 0, wep_total_len);
|
memset(pwep, 0, wep_total_len);
|
||||||
pwep->KeyLength = wep_key_len;
|
pwep->KeyLength = wep_key_len;
|
||||||
pwep->Length = wep_total_len;
|
pwep->Length = wep_total_len;
|
||||||
if (wep_key_len == 13) {
|
if (wep_key_len == 13) {
|
||||||
|
@ -975,14 +975,14 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
|
||||||
for (j = 0; j < NUM_PMKID_CACHE; j++) {
|
for (j = 0; j < NUM_PMKID_CACHE; j++) {
|
||||||
if (!memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN)) {
|
if (!memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN)) {
|
||||||
/* BSSID is matched, the same AP => Remove this PMKID information and reset it. */
|
/* BSSID is matched, the same AP => Remove this PMKID information and reset it. */
|
||||||
_rtw_memset(psecuritypriv->PMKIDList[j].Bssid, 0x00, ETH_ALEN);
|
memset(psecuritypriv->PMKIDList[j].Bssid, 0x00, ETH_ALEN);
|
||||||
psecuritypriv->PMKIDList[j].bUsed = false;
|
psecuritypriv->PMKIDList[j].bUsed = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (pPMK->cmd == IW_PMKSA_FLUSH) {
|
} else if (pPMK->cmd == IW_PMKSA_FLUSH) {
|
||||||
DBG_88E("[rtw_wx_set_pmkid] IW_PMKSA_FLUSH!\n");
|
DBG_88E("[rtw_wx_set_pmkid] IW_PMKSA_FLUSH!\n");
|
||||||
_rtw_memset(&psecuritypriv->PMKIDList[0], 0x00, sizeof(struct rt_pmkid_list) * NUM_PMKID_CACHE);
|
memset(&psecuritypriv->PMKIDList[0], 0x00, sizeof(struct rt_pmkid_list) * NUM_PMKID_CACHE);
|
||||||
psecuritypriv->PMKIDIndex = 0;
|
psecuritypriv->PMKIDIndex = 0;
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
}
|
||||||
|
@ -1015,7 +1015,7 @@ static int rtw_wx_get_range(struct net_device *dev,
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_wx_get_range. cmd_code =%x\n", info->cmd));
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_wx_get_range. cmd_code =%x\n", info->cmd));
|
||||||
|
|
||||||
wrqu->data.length = sizeof(*range);
|
wrqu->data.length = sizeof(*range);
|
||||||
_rtw_memset(range, 0, sizeof(*range));
|
memset(range, 0, sizeof(*range));
|
||||||
|
|
||||||
/* Let's try to keep this struct in the same order as in
|
/* Let's try to keep this struct in the same order as in
|
||||||
* linux/include/wireless.h
|
* linux/include/wireless.h
|
||||||
|
@ -1187,7 +1187,7 @@ static int rtw_wx_get_wap(struct net_device *dev,
|
||||||
|
|
||||||
wrqu->ap_addr.sa_family = ARPHRD_ETHER;
|
wrqu->ap_addr.sa_family = ARPHRD_ETHER;
|
||||||
|
|
||||||
_rtw_memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN);
|
memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN);
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_wx_get_wap\n"));
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_wx_get_wap\n"));
|
||||||
|
|
||||||
|
@ -1198,7 +1198,7 @@ static int rtw_wx_get_wap(struct net_device *dev,
|
||||||
((check_fwstate(pmlmepriv, WIFI_AP_STATE)) == true))
|
((check_fwstate(pmlmepriv, WIFI_AP_STATE)) == true))
|
||||||
memcpy(wrqu->ap_addr.sa_data, pcur_bss->MacAddress, ETH_ALEN);
|
memcpy(wrqu->ap_addr.sa_data, pcur_bss->MacAddress, ETH_ALEN);
|
||||||
else
|
else
|
||||||
_rtw_memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN);
|
memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1304,7 +1304,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_88EU_P2P */
|
#endif /* CONFIG_88EU_P2P */
|
||||||
|
|
||||||
_rtw_memset(ssid, 0, sizeof(struct ndis_802_11_ssid)*RTW_SSID_SCAN_AMOUNT);
|
memset(ssid, 0, sizeof(struct ndis_802_11_ssid)*RTW_SSID_SCAN_AMOUNT);
|
||||||
|
|
||||||
if (wrqu->data.length == sizeof(struct iw_scan_req)) {
|
if (wrqu->data.length == sizeof(struct iw_scan_req)) {
|
||||||
struct iw_scan_req *req = (struct iw_scan_req *)extra;
|
struct iw_scan_req *req = (struct iw_scan_req *)extra;
|
||||||
|
@ -1519,7 +1519,7 @@ static int rtw_wx_set_essid(struct net_device *dev,
|
||||||
if (wrqu->essid.length != 33)
|
if (wrqu->essid.length != 33)
|
||||||
DBG_88E("ssid =%s, len =%d\n", extra, wrqu->essid.length);
|
DBG_88E("ssid =%s, len =%d\n", extra, wrqu->essid.length);
|
||||||
|
|
||||||
_rtw_memset(&ndis_ssid, 0, sizeof(struct ndis_802_11_ssid));
|
memset(&ndis_ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||||
ndis_ssid.SsidLength = len;
|
ndis_ssid.SsidLength = len;
|
||||||
memcpy(ndis_ssid.Ssid, extra, len);
|
memcpy(ndis_ssid.Ssid, extra, len);
|
||||||
src_ssid = ndis_ssid.Ssid;
|
src_ssid = ndis_ssid.Ssid;
|
||||||
|
@ -1833,7 +1833,7 @@ static int rtw_wx_set_enc(struct net_device *dev,
|
||||||
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
|
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
|
||||||
DBG_88E("+rtw_wx_set_enc, flags = 0x%x\n", erq->flags);
|
DBG_88E("+rtw_wx_set_enc, flags = 0x%x\n", erq->flags);
|
||||||
|
|
||||||
_rtw_memset(&wep, 0, sizeof(struct ndis_802_11_wep));
|
memset(&wep, 0, sizeof(struct ndis_802_11_wep));
|
||||||
|
|
||||||
key = erq->flags & IW_ENCODE_INDEX;
|
key = erq->flags & IW_ENCODE_INDEX;
|
||||||
|
|
||||||
|
@ -2126,10 +2126,10 @@ static int rtw_wx_set_enc_ext(struct net_device *dev,
|
||||||
if (param == NULL)
|
if (param == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
_rtw_memset(param, 0, param_len);
|
memset(param, 0, param_len);
|
||||||
|
|
||||||
param->cmd = IEEE_CMD_SET_ENCRYPTION;
|
param->cmd = IEEE_CMD_SET_ENCRYPTION;
|
||||||
_rtw_memset(param->sta_addr, 0xff, ETH_ALEN);
|
memset(param->sta_addr, 0xff, ETH_ALEN);
|
||||||
|
|
||||||
switch (pext->alg) {
|
switch (pext->alg) {
|
||||||
case IW_ENCODE_ALG_NONE:
|
case IW_ENCODE_ALG_NONE:
|
||||||
|
@ -2886,7 +2886,7 @@ static int rtw_p2p_profilefound(struct net_device *dev,
|
||||||
if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) {
|
if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) {
|
||||||
if (extra[0] == '0') {
|
if (extra[0] == '0') {
|
||||||
/* Remove all the profile information of wifidirect_info structure. */
|
/* Remove all the profile information of wifidirect_info structure. */
|
||||||
_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);
|
||||||
pwdinfo->profileindex = 0;
|
pwdinfo->profileindex = 0;
|
||||||
} else {
|
} else {
|
||||||
if (pwdinfo->profileindex >= P2P_MAX_PERSISTENT_GROUP_NUM) {
|
if (pwdinfo->profileindex >= P2P_MAX_PERSISTENT_GROUP_NUM) {
|
||||||
|
@ -2918,7 +2918,7 @@ static int rtw_p2p_setDN(struct net_device *dev,
|
||||||
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
||||||
|
|
||||||
DBG_88E("[%s] %s %d\n", __func__, extra, wrqu->data.length - 1);
|
DBG_88E("[%s] %s %d\n", __func__, extra, wrqu->data.length - 1);
|
||||||
_rtw_memset(pwdinfo->device_name, 0x00, WPS_MAX_DEVICE_NAME_LEN);
|
memset(pwdinfo->device_name, 0x00, WPS_MAX_DEVICE_NAME_LEN);
|
||||||
memcpy(pwdinfo->device_name, extra, wrqu->data.length - 1);
|
memcpy(pwdinfo->device_name, extra, wrqu->data.length - 1);
|
||||||
pwdinfo->device_name_len = wrqu->data.length - 1;
|
pwdinfo->device_name_len = wrqu->data.length - 1;
|
||||||
|
|
||||||
|
@ -3193,7 +3193,7 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev,
|
||||||
/* The P2P Device ID attribute is included in the Beacon frame. */
|
/* The P2P Device ID attribute is included in the Beacon frame. */
|
||||||
/* The P2P Device Info attribute is included in the probe response frame. */
|
/* The P2P Device Info attribute is included in the probe response frame. */
|
||||||
|
|
||||||
_rtw_memset(attr_content, 0x00, 100);
|
memset(attr_content, 0x00, 100);
|
||||||
if (rtw_get_p2p_attr_content(p2pie, p2pielen, P2P_ATTR_DEVICE_ID, attr_content, &attr_contentlen)) {
|
if (rtw_get_p2p_attr_content(p2pie, p2pielen, P2P_ATTR_DEVICE_ID, attr_content, &attr_contentlen)) {
|
||||||
/* Handle the P2P Device ID attribute of Beacon first */
|
/* Handle the P2P Device ID attribute of Beacon first */
|
||||||
blnMatch = 1;
|
blnMatch = 1;
|
||||||
|
@ -3509,8 +3509,8 @@ static int rtw_p2p_connect(struct net_device *dev,
|
||||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
||||||
|
|
||||||
if (uintPeerChannel) {
|
if (uintPeerChannel) {
|
||||||
_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));
|
||||||
_rtw_memset(&pwdinfo->groupid_info, 0x00, sizeof(struct group_id_info));
|
memset(&pwdinfo->groupid_info, 0x00, sizeof(struct group_id_info));
|
||||||
|
|
||||||
pwdinfo->nego_req_info.peer_channel_num[0] = uintPeerChannel;
|
pwdinfo->nego_req_info.peer_channel_num[0] = uintPeerChannel;
|
||||||
memcpy(pwdinfo->nego_req_info.peerDevAddr, pnetwork->network.MacAddress, ETH_ALEN);
|
memcpy(pwdinfo->nego_req_info.peerDevAddr, pnetwork->network.MacAddress, ETH_ALEN);
|
||||||
|
@ -3572,11 +3572,11 @@ static int rtw_p2p_invite_req(struct net_device *dev,
|
||||||
} else {
|
} else {
|
||||||
/* Reset the content of struct tx_invite_req_info */
|
/* Reset the content of struct tx_invite_req_info */
|
||||||
pinvite_req_info->benable = false;
|
pinvite_req_info->benable = false;
|
||||||
_rtw_memset(pinvite_req_info->go_bssid, 0x00, ETH_ALEN);
|
memset(pinvite_req_info->go_bssid, 0x00, ETH_ALEN);
|
||||||
_rtw_memset(pinvite_req_info->go_ssid, 0x00, WLAN_SSID_MAXLEN);
|
memset(pinvite_req_info->go_ssid, 0x00, WLAN_SSID_MAXLEN);
|
||||||
pinvite_req_info->ssidlen = 0x00;
|
pinvite_req_info->ssidlen = 0x00;
|
||||||
pinvite_req_info->operating_ch = pwdinfo->operating_channel;
|
pinvite_req_info->operating_ch = pwdinfo->operating_channel;
|
||||||
_rtw_memset(pinvite_req_info->peer_macaddr, 0x00, ETH_ALEN);
|
memset(pinvite_req_info->peer_macaddr, 0x00, ETH_ALEN);
|
||||||
pinvite_req_info->token = 3;
|
pinvite_req_info->token = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3709,9 +3709,9 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
|
||||||
return ret;
|
return ret;
|
||||||
} else {
|
} else {
|
||||||
/* Reset the content of struct tx_provdisc_req_info excluded the wps_config_method_request. */
|
/* Reset the content of struct tx_provdisc_req_info excluded the wps_config_method_request. */
|
||||||
_rtw_memset(pwdinfo->tx_prov_disc_info.peerDevAddr, 0x00, ETH_ALEN);
|
memset(pwdinfo->tx_prov_disc_info.peerDevAddr, 0x00, ETH_ALEN);
|
||||||
_rtw_memset(pwdinfo->tx_prov_disc_info.peerIFAddr, 0x00, ETH_ALEN);
|
memset(pwdinfo->tx_prov_disc_info.peerIFAddr, 0x00, ETH_ALEN);
|
||||||
_rtw_memset(&pwdinfo->tx_prov_disc_info.ssid, 0x00, sizeof(struct ndis_802_11_ssid));
|
memset(&pwdinfo->tx_prov_disc_info.ssid, 0x00, sizeof(struct ndis_802_11_ssid));
|
||||||
pwdinfo->tx_prov_disc_info.peer_channel_num[0] = 0;
|
pwdinfo->tx_prov_disc_info.peer_channel_num[0] = 0;
|
||||||
pwdinfo->tx_prov_disc_info.peer_channel_num[1] = 0;
|
pwdinfo->tx_prov_disc_info.peer_channel_num[1] = 0;
|
||||||
pwdinfo->tx_prov_disc_info.benable = false;
|
pwdinfo->tx_prov_disc_info.benable = false;
|
||||||
|
@ -4845,7 +4845,7 @@ static int set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid)
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memset(psetkeyparm, 0, sizeof(struct setkey_parm));
|
memset(psetkeyparm, 0, sizeof(struct setkey_parm));
|
||||||
|
|
||||||
psetkeyparm->keyid = (u8)keyid;
|
psetkeyparm->keyid = (u8)keyid;
|
||||||
|
|
||||||
|
@ -4960,7 +4960,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param,
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memset(pwep, 0, wep_total_len);
|
memset(pwep, 0, wep_total_len);
|
||||||
|
|
||||||
pwep->KeyLength = wep_key_len;
|
pwep->KeyLength = wep_key_len;
|
||||||
pwep->Length = wep_total_len;
|
pwep->Length = wep_total_len;
|
||||||
|
@ -6496,9 +6496,9 @@ static int rtw_mp_read_reg(struct net_device *dev,
|
||||||
kfree(input);
|
kfree(input);
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
_rtw_memset(data, 0, 20);
|
memset(data, 0, 20);
|
||||||
_rtw_memset(tmp, 0, 20);
|
memset(tmp, 0, 20);
|
||||||
_rtw_memset(extra, 0, wrqu->length);
|
memset(extra, 0, wrqu->length);
|
||||||
|
|
||||||
pch = input;
|
pch = input;
|
||||||
pnext = strpbrk(pch, ",.-");
|
pnext = strpbrk(pch, ",.-");
|
||||||
|
@ -6624,7 +6624,7 @@ static int rtw_mp_read_reg(struct net_device *dev,
|
||||||
if (data > 0xFFFFF)
|
if (data > 0xFFFFF)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
_rtw_memset(extra, 0, wrqu->length);
|
memset(extra, 0, wrqu->length);
|
||||||
|
|
||||||
write_rfreg(padapter, path, addr, data);
|
write_rfreg(padapter, path, addr, data);
|
||||||
|
|
||||||
|
@ -6669,7 +6669,7 @@ static int rtw_mp_read_rf(struct net_device *dev,
|
||||||
if (addr > 0xFF)
|
if (addr > 0xFF)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
_rtw_memset(extra, 0, wrqu->length);
|
memset(extra, 0, wrqu->length);
|
||||||
|
|
||||||
sprintf(data, "%08x", read_rfreg(padapter, path, addr));
|
sprintf(data, "%08x", read_rfreg(padapter, path, addr));
|
||||||
/* add read data format blank */
|
/* add read data format blank */
|
||||||
|
@ -6900,7 +6900,7 @@ static int rtw_mp_ant_rx(struct net_device *dev,
|
||||||
kfree(input);
|
kfree(input);
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
_rtw_memset(extra, 0, wrqu->length);
|
memset(extra, 0, wrqu->length);
|
||||||
|
|
||||||
sprintf(extra, "switch Rx antenna to %s", input);
|
sprintf(extra, "switch Rx antenna to %s", input);
|
||||||
|
|
||||||
|
@ -6950,7 +6950,7 @@ static int rtw_mp_ctx(struct net_device *dev,
|
||||||
stop = strncmp(extra, "stop", 4);
|
stop = strncmp(extra, "stop", 4);
|
||||||
sscanf(extra, "count =%d, pkt", &count);
|
sscanf(extra, "count =%d, pkt", &count);
|
||||||
|
|
||||||
_rtw_memset(extra, '\0', sizeof(*extra));
|
memset(extra, '\0', sizeof(*extra));
|
||||||
|
|
||||||
if (stop == 0) {
|
if (stop == 0) {
|
||||||
bStartTest = 0; /* To set Stop */
|
bStartTest = 0; /* To set Stop */
|
||||||
|
@ -6990,7 +6990,7 @@ static int rtw_mp_ctx(struct net_device *dev,
|
||||||
pmp_priv->tx.payload = 2;
|
pmp_priv->tx.payload = 2;
|
||||||
pattrib = &pmp_priv->tx.attrib;
|
pattrib = &pmp_priv->tx.attrib;
|
||||||
pattrib->pktlen = 1500;
|
pattrib->pktlen = 1500;
|
||||||
_rtw_memset(pattrib->dst, 0xFF, ETH_ALEN);
|
memset(pattrib->dst, 0xFF, ETH_ALEN);
|
||||||
SetPacketTx(padapter);
|
SetPacketTx(padapter);
|
||||||
} else {
|
} else {
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
@ -7118,7 +7118,7 @@ static int rtw_mp_trx_query(struct net_device *dev,
|
||||||
rxok = padapter->mppriv.rx_pktcount;
|
rxok = padapter->mppriv.rx_pktcount;
|
||||||
rxfail = padapter->mppriv.rx_crcerrpktcount;
|
rxfail = padapter->mppriv.rx_crcerrpktcount;
|
||||||
|
|
||||||
_rtw_memset(extra, '\0', 128);
|
memset(extra, '\0', 128);
|
||||||
|
|
||||||
sprintf(extra, "Tx OK:%d, Tx Fail:%d, Rx OK:%d, CRC error:%d ", txok, txfail, rxok, rxfail);
|
sprintf(extra, "Tx OK:%d, Tx Fail:%d, Rx OK:%d, CRC error:%d ", txok, txfail, rxok, rxfail);
|
||||||
|
|
||||||
|
@ -7143,7 +7143,7 @@ static int rtw_mp_pwrtrk(struct net_device *dev,
|
||||||
kfree(input);
|
kfree(input);
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
_rtw_memset(extra, 0, wrqu->length);
|
memset(extra, 0, wrqu->length);
|
||||||
|
|
||||||
enable = 1;
|
enable = 1;
|
||||||
if (wrqu->length > 1) {/* not empty string */
|
if (wrqu->length > 1) {/* not empty string */
|
||||||
|
|
|
@ -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],
|
||||||
|
@ -139,7 +139,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;
|
||||||
|
@ -147,7 +147,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;
|
||||||
|
|
|
@ -123,11 +123,6 @@ int _rtw_memcmp(void *dst, void *src, u32 sz)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
||||||
|
|
|
@ -103,7 +103,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
|
||||||
|
@ -111,7 +111,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);
|
||||||
|
|
Loading…
Reference in a new issue