mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-02-08 15:42:50 +00:00
rtl8188eu: Replace wrapper for memset
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
529328fd3d
commit
9b5b5c4e12
32 changed files with 292 additions and 298 deletions
|
@ -729,7 +729,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));
|
||||||
|
|
||||||
//psta->dot118021XPrivacy = _NO_PRIVACY_;//!!! remove it, because it has been set before this.
|
//psta->dot118021XPrivacy = _NO_PRIVACY_;//!!! remove it, because it has been set before this.
|
||||||
|
|
||||||
|
@ -891,7 +891,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));
|
||||||
|
|
||||||
|
|
||||||
//add ratid
|
//add ratid
|
||||||
|
@ -1169,7 +1169,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);
|
||||||
|
|
||||||
|
@ -1195,7 +1195,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
||||||
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(NDIS_802_11_SSID));
|
memset(&pbss_network->Ssid, 0, sizeof(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;
|
||||||
}
|
}
|
||||||
|
@ -1210,7 +1210,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)
|
||||||
|
@ -2528,7 +2528,7 @@ void stop_ap_mode(struct adapter *padapter)
|
||||||
//_rtw_spinlock_free(&pmlmepriv->bcn_update_lock);
|
//_rtw_spinlock_free(&pmlmepriv->bcn_update_lock);
|
||||||
|
|
||||||
//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;
|
||||||
|
|
||||||
|
|
|
@ -1213,7 +1213,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));
|
||||||
|
|
||||||
|
|
|
@ -727,7 +727,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);
|
memset(newdata, 0xFF, PGPKT_DATA_SIZE);
|
||||||
i = addr & 0x7; // index of one package
|
i = addr & 0x7; // index of one package
|
||||||
j = 0; // index of new package
|
j = 0; // index of new package
|
||||||
idx = 0; // data index
|
idx = 0; // data index
|
||||||
|
@ -785,7 +785,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
|
||||||
i = 0;
|
i = 0;
|
||||||
j = 0;
|
j = 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);
|
||||||
|
@ -825,7 +825,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);
|
memset(newdata, 0xFF, PGPKT_DATA_SIZE);
|
||||||
i = addr & 0x7; // index of one package
|
i = addr & 0x7; // index of one package
|
||||||
j = 0; // index of new package
|
j = 0; // index of new package
|
||||||
idx = 0; // data index
|
idx = 0; // data index
|
||||||
|
@ -886,7 +886,7 @@ u8 rtw_BT_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data
|
||||||
i = 0;
|
i = 0;
|
||||||
j = 0;
|
j = 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);
|
||||||
|
@ -1094,7 +1094,7 @@ void EFUSE_ShadowMapUpdate(
|
||||||
|
|
||||||
if (pEEPROM->bautoload_fail_flag == true)
|
if (pEEPROM->bautoload_fail_flag == true)
|
||||||
{
|
{
|
||||||
_rtw_memset(pEEPROM->efuse_eeprom_data, 0xFF, mapLen);
|
memset(pEEPROM->efuse_eeprom_data, 0xFF, mapLen);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1203,23 +1203,23 @@ Efuse_InitSomeVar(
|
||||||
{
|
{
|
||||||
u8 i;
|
u8 i;
|
||||||
|
|
||||||
_rtw_memset((void *)&fakeEfuseContent[0], 0xff, EFUSE_MAX_HW_SIZE);
|
memset((void *)&fakeEfuseContent[0], 0xff, EFUSE_MAX_HW_SIZE);
|
||||||
_rtw_memset((void *)&fakeEfuseInitMap[0], 0xff, EFUSE_MAX_MAP_LEN);
|
memset((void *)&fakeEfuseInitMap[0], 0xff, EFUSE_MAX_MAP_LEN);
|
||||||
_rtw_memset((void *)&fakeEfuseModifiedMap[0], 0xff, EFUSE_MAX_MAP_LEN);
|
memset((void *)&fakeEfuseModifiedMap[0], 0xff, EFUSE_MAX_MAP_LEN);
|
||||||
|
|
||||||
for(i=0; i<EFUSE_MAX_BT_BANK; i++)
|
for(i=0; i<EFUSE_MAX_BT_BANK; i++)
|
||||||
{
|
{
|
||||||
_rtw_memset((void *)&BTEfuseContent[i][0], EFUSE_MAX_HW_SIZE, 0xff);
|
memset((void *)&BTEfuseContent[i][0], EFUSE_MAX_HW_SIZE, 0xff);
|
||||||
}
|
}
|
||||||
_rtw_memset((void *)&BTEfuseInitMap[0], 0xff, EFUSE_BT_MAX_MAP_LEN);
|
memset((void *)&BTEfuseInitMap[0], 0xff, EFUSE_BT_MAX_MAP_LEN);
|
||||||
_rtw_memset((void *)&BTEfuseModifiedMap[0], 0xff, EFUSE_BT_MAX_MAP_LEN);
|
memset((void *)&BTEfuseModifiedMap[0], 0xff, EFUSE_BT_MAX_MAP_LEN);
|
||||||
|
|
||||||
for(i=0; i<EFUSE_MAX_BT_BANK; i++)
|
for(i=0; i<EFUSE_MAX_BT_BANK; i++)
|
||||||
{
|
{
|
||||||
_rtw_memset((void *)&fakeBTEfuseContent[i][0], 0xff, EFUSE_MAX_HW_SIZE);
|
memset((void *)&fakeBTEfuseContent[i][0], 0xff, EFUSE_MAX_HW_SIZE);
|
||||||
}
|
}
|
||||||
_rtw_memset((void *)&fakeBTEfuseInitMap[0], 0xff, EFUSE_BT_MAX_MAP_LEN);
|
memset((void *)&fakeBTEfuseInitMap[0], 0xff, EFUSE_BT_MAX_MAP_LEN);
|
||||||
_rtw_memset((void *)&fakeBTEfuseModifiedMap[0], 0xff, EFUSE_BT_MAX_MAP_LEN);
|
memset((void *)&fakeBTEfuseModifiedMap[0], 0xff, EFUSE_BT_MAX_MAP_LEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE
|
#ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE
|
||||||
|
|
|
@ -358,7 +358,7 @@ 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)
|
||||||
{
|
{
|
||||||
|
@ -1165,7 +1165,7 @@ ParseRes 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;
|
||||||
|
@ -1693,9 +1693,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;
|
||||||
}
|
}
|
||||||
|
@ -1724,7 +1724,7 @@ void rtw_WLAN_BSSID_EX_remove_p2p_attr(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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,7 +158,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(NDIS_802_11_SSID));
|
memset(&pdev_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||||
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
||||||
|
|
||||||
rtw_update_registrypriv_dev_network(padapter);
|
rtw_update_registrypriv_dev_network(padapter);
|
||||||
|
@ -774,7 +774,7 @@ u8 rtw_set_802_11_remove_wep(struct adapter* padapter, u32 keyindex){
|
||||||
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,true);
|
res=rtw_set_key(padapter,psecuritypriv,keyindex, 0,true);
|
||||||
|
|
||||||
|
@ -1050,9 +1050,9 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, NDIS_802_11_KEY *key){
|
||||||
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))
|
||||||
{
|
{
|
||||||
|
@ -1109,7 +1109,7 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, NDIS_802_11_KEY *key){
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
|
@ -1186,7 +1186,7 @@ u8 rtw_set_802_11_remove_key(struct adapter* padapter, NDIS_802_11_REMOVE_KEY *k
|
||||||
//NdisZeroMemory(Adapter->MgntInfo.SecurityInfo.KeyBuf[keyIndex], MAX_WEP_KEY_LEN);
|
//NdisZeroMemory(Adapter->MgntInfo.SecurityInfo.KeyBuf[keyIndex], MAX_WEP_KEY_LEN);
|
||||||
//Adapter->MgntInfo.SecurityInfo.KeyLen[keyIndex] = 0;
|
//Adapter->MgntInfo.SecurityInfo.KeyLen[keyIndex] = 0;
|
||||||
|
|
||||||
_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.
|
||||||
|
|
||||||
|
@ -1198,7 +1198,7 @@ u8 rtw_set_802_11_remove_key(struct adapter* padapter, NDIS_802_11_REMOVE_KEY *k
|
||||||
encryptionalgo=stainfo->dot118021XPrivacy;
|
encryptionalgo=stainfo->dot118021XPrivacy;
|
||||||
|
|
||||||
// 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.
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ sint _rtw_init_mlme_priv (struct adapter* padapter)
|
||||||
;
|
;
|
||||||
|
|
||||||
// We don't need to memset padapter->XXX to zero, because adapter is allocated by rtw_zvmalloc().
|
// We don't need to memset padapter->XXX to zero, because adapter is allocated by rtw_zvmalloc().
|
||||||
//_rtw_memset((u8 *)pmlmepriv, 0, sizeof(struct mlme_priv));
|
//memset((u8 *)pmlmepriv, 0, sizeof(struct mlme_priv));
|
||||||
|
|
||||||
pmlmepriv->nic_hdl = (u8 *)padapter;
|
pmlmepriv->nic_hdl = (u8 *)padapter;
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ sint _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(NDIS_802_11_SSID));
|
memset(&pmlmepriv->assoc_ssid,0,sizeof(NDIS_802_11_SSID));
|
||||||
|
|
||||||
pbuf = rtw_zvmalloc(MAX_BSS_CNT * (sizeof(struct wlan_network)));
|
pbuf = rtw_zvmalloc(MAX_BSS_CNT * (sizeof(struct wlan_network)));
|
||||||
|
|
||||||
|
@ -1138,7 +1138,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(NDIS_802_11_SSID));
|
memset(&pdev_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||||
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
||||||
|
|
||||||
rtw_update_registrypriv_dev_network(adapter);
|
rtw_update_registrypriv_dev_network(adapter);
|
||||||
|
@ -1181,7 +1181,7 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
#ifdef CONFIG_INTEL_WIDI
|
#ifdef CONFIG_INTEL_WIDI
|
||||||
if(adapter->mlmepriv.widi_state == INTEL_WIDI_STATE_ROAMING)
|
if(adapter->mlmepriv.widi_state == INTEL_WIDI_STATE_ROAMING)
|
||||||
{
|
{
|
||||||
_rtw_memset(pmlmepriv->sa_ext, 0x00, L2SDTA_SERVICE_VE_LEN);
|
memset(pmlmepriv->sa_ext, 0x00, L2SDTA_SERVICE_VE_LEN);
|
||||||
intel_widi_wk_cmd(adapter, INTEL_WIDI_LISTEN_WK, NULL);
|
intel_widi_wk_cmd(adapter, INTEL_WIDI_LISTEN_WK, NULL);
|
||||||
DBG_871X("change to widi listen\n");
|
DBG_871X("change to widi listen\n");
|
||||||
}
|
}
|
||||||
|
@ -1423,7 +1423,7 @@ void rtw_indicate_connect(struct adapter *padapter)
|
||||||
#ifdef CONFIG_INTEL_WIDI
|
#ifdef CONFIG_INTEL_WIDI
|
||||||
if(padapter->mlmepriv.widi_state == INTEL_WIDI_STATE_ROAMING)
|
if(padapter->mlmepriv.widi_state == INTEL_WIDI_STATE_ROAMING)
|
||||||
{
|
{
|
||||||
_rtw_memset(pmlmepriv->sa_ext, 0x00, L2SDTA_SERVICE_VE_LEN);
|
memset(pmlmepriv->sa_ext, 0x00, L2SDTA_SERVICE_VE_LEN);
|
||||||
intel_widi_wk_cmd(padapter, INTEL_WIDI_LISTEN_WK, NULL);
|
intel_widi_wk_cmd(padapter, INTEL_WIDI_LISTEN_WK, NULL);
|
||||||
DBG_871X("change to widi listen\n");
|
DBG_871X("change to widi listen\n");
|
||||||
}
|
}
|
||||||
|
@ -1571,16 +1571,16 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, str
|
||||||
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));
|
||||||
#ifdef CONFIG_IEEE80211W
|
#ifdef CONFIG_IEEE80211W
|
||||||
_rtw_memset((u8 *)&psta->dot11wtxpn, 0, sizeof (union pn48));
|
memset((u8 *)&psta->dot11wtxpn, 0, sizeof (union pn48));
|
||||||
#endif //CONFIG_IEEE80211W
|
#endif //CONFIG_IEEE80211W
|
||||||
_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
|
||||||
|
@ -2171,7 +2171,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(NDIS_802_11_SSID));
|
memset(&pdev_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||||
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
||||||
|
|
||||||
rtw_update_registrypriv_dev_network(adapter);
|
rtw_update_registrypriv_dev_network(adapter);
|
||||||
|
@ -2258,7 +2258,7 @@ void _rtw_join_timeout_handler (struct adapter *adapter)
|
||||||
#ifdef CONFIG_INTEL_WIDI
|
#ifdef CONFIG_INTEL_WIDI
|
||||||
if(adapter->mlmepriv.widi_state == INTEL_WIDI_STATE_ROAMING)
|
if(adapter->mlmepriv.widi_state == INTEL_WIDI_STATE_ROAMING)
|
||||||
{
|
{
|
||||||
_rtw_memset(pmlmepriv->sa_ext, 0x00, L2SDTA_SERVICE_VE_LEN);
|
memset(pmlmepriv->sa_ext, 0x00, L2SDTA_SERVICE_VE_LEN);
|
||||||
intel_widi_wk_cmd(adapter, INTEL_WIDI_LISTEN_WK, NULL);
|
intel_widi_wk_cmd(adapter, INTEL_WIDI_LISTEN_WK, NULL);
|
||||||
DBG_871X("change to widi listen\n");
|
DBG_871X("change to widi listen\n");
|
||||||
}
|
}
|
||||||
|
@ -2645,7 +2645,7 @@ sint rtw_set_auth(struct adapter * adapter,struct security_priv *psecuritypriv)
|
||||||
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_;
|
||||||
|
@ -2686,7 +2686,7 @@ sint rtw_set_key(struct adapter * adapter,struct security_priv *psecuritypriv,si
|
||||||
res= _FAIL;
|
res= _FAIL;
|
||||||
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;
|
||||||
|
@ -3124,7 +3124,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 |IEEE80211_HT_CAP_SGI_20 |
|
ht_capie.cap_info = cpu_to_le16(IEEE80211_HT_CAP_SUP_WIDTH |IEEE80211_HT_CAP_SGI_20 |
|
||||||
IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_TX_STBC |
|
IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_TX_STBC |
|
||||||
|
|
|
@ -355,7 +355,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;
|
||||||
|
@ -438,7 +438,7 @@ static u8 init_channel_set(struct adapter* padapter, u8 ChannelPlan, RT_CHANNEL_
|
||||||
u8 b5GBand = false, b2_4GBand = false;
|
u8 b5GBand = false, b2_4GBand = false;
|
||||||
u8 Index2G = 0, Index5G=0;
|
u8 Index2G = 0, Index5G=0;
|
||||||
|
|
||||||
_rtw_memset(channel_set, 0, sizeof(RT_CHANNEL_INFO)*MAX_CHANNEL_NUM);
|
memset(channel_set, 0, sizeof(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)
|
||||||
{
|
{
|
||||||
|
@ -542,7 +542,7 @@ int init_mlme_ext_priv(struct adapter* padapter)
|
||||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||||
|
|
||||||
// We don't need to memset padapter->XXX to zero, because adapter is allocated by rtw_zvmalloc().
|
// We don't need to memset padapter->XXX to zero, because adapter is allocated by rtw_zvmalloc().
|
||||||
//_rtw_memset((u8 *)pmlmeext, 0, sizeof(struct mlme_ext_priv));
|
//memset((u8 *)pmlmeext, 0, sizeof(struct mlme_ext_priv));
|
||||||
|
|
||||||
pmlmeext->padapter = padapter;
|
pmlmeext->padapter = padapter;
|
||||||
|
|
||||||
|
@ -1363,7 +1363,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);
|
||||||
|
|
||||||
|
@ -1647,7 +1647,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;
|
||||||
|
@ -1852,7 +1852,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
|
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
/* 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;
|
||||||
|
@ -2661,7 +2661,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;
|
||||||
|
@ -3049,7 +3049,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;
|
||||||
|
@ -3082,7 +3082,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
|
||||||
|
@ -3462,7 +3462,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;
|
||||||
|
@ -3729,7 +3729,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;
|
||||||
|
@ -4001,7 +4001,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;
|
||||||
|
@ -4213,7 +4213,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;
|
||||||
|
@ -4349,7 +4349,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;
|
||||||
|
@ -4512,7 +4512,7 @@ void issue_probersp_p2p(struct adapter *padapter, unsigned char *da)
|
||||||
|
|
||||||
// Value:
|
// Value:
|
||||||
if (pwdinfo->external_uuid == 0) {
|
if (pwdinfo->external_uuid == 0) {
|
||||||
_rtw_memset( wpsie + wpsielen, 0x0, 16 );
|
memset( wpsie + wpsielen, 0x0, 16 );
|
||||||
memcpy( wpsie + wpsielen, myid( &padapter->eeprompriv ), ETH_ALEN );
|
memcpy( wpsie + wpsielen, myid( &padapter->eeprompriv ), ETH_ALEN );
|
||||||
} else {
|
} else {
|
||||||
memcpy( wpsie + wpsielen, pwdinfo->uuid, 0x10 );
|
memcpy( wpsie + wpsielen, pwdinfo->uuid, 0x10 );
|
||||||
|
@ -4694,7 +4694,7 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack)
|
||||||
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;
|
||||||
|
@ -4795,7 +4795,7 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack)
|
||||||
|
|
||||||
// Value:
|
// Value:
|
||||||
if (pwdinfo->external_uuid == 0) {
|
if (pwdinfo->external_uuid == 0) {
|
||||||
_rtw_memset( wpsie + wpsielen, 0x0, 16 );
|
memset( wpsie + wpsielen, 0x0, 16 );
|
||||||
memcpy( wpsie + wpsielen, myid( &padapter->eeprompriv ), ETH_ALEN );
|
memcpy( wpsie + wpsielen, myid( &padapter->eeprompriv ), ETH_ALEN );
|
||||||
} else {
|
} else {
|
||||||
memcpy( wpsie + wpsielen, pwdinfo->uuid, 0x10 );
|
memcpy( wpsie + wpsielen, pwdinfo->uuid, 0x10 );
|
||||||
|
@ -5140,7 +5140,7 @@ static unsigned int on_action_public_p2p(union recv_frame *precv_frame)
|
||||||
case P2P_GO_NEGO_REQ:
|
case P2P_GO_NEGO_REQ:
|
||||||
{
|
{
|
||||||
DBG_871X( "[%s] Got GO Nego Req Frame\n", __FUNCTION__);
|
DBG_871X( "[%s] Got GO Nego Req Frame\n", __FUNCTION__);
|
||||||
_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))
|
||||||
{
|
{
|
||||||
|
@ -5268,7 +5268,7 @@ static unsigned int on_action_public_p2p(union recv_frame *precv_frame)
|
||||||
DBG_871X( "[%s] Malloc p2p ie fail\n", __FUNCTION__);
|
DBG_871X( "[%s] Malloc p2p ie fail\n", __FUNCTION__);
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
_rtw_memset(merged_p2pie, 0x00, merged_p2p_ielen);
|
memset(merged_p2pie, 0x00, merged_p2p_ielen);
|
||||||
|
|
||||||
merged_p2p_ielen = rtw_p2p_merge_ies(frame_body + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_, merged_p2pie);
|
merged_p2p_ielen = rtw_p2p_merge_ies(frame_body + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_, merged_p2pie);
|
||||||
|
|
||||||
|
@ -5295,7 +5295,7 @@ static unsigned int on_action_public_p2p(union recv_frame *precv_frame)
|
||||||
{
|
{
|
||||||
// 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( merged_p2pie, merged_p2p_ielen, P2P_ATTR_GROUP_ID, ( u8* ) &group_id, &attr_contentlen);
|
rtw_get_p2p_attr_content( merged_p2pie, merged_p2p_ielen, P2P_ATTR_GROUP_ID, ( u8* ) &group_id, &attr_contentlen);
|
||||||
if ( attr_contentlen )
|
if ( attr_contentlen )
|
||||||
{
|
{
|
||||||
|
@ -5371,7 +5371,7 @@ static unsigned int on_action_public_p2p(union recv_frame *precv_frame)
|
||||||
{
|
{
|
||||||
// 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( merged_p2pie, merged_p2p_ielen, P2P_ATTR_GROUP_ID, ( u8* ) &group_id, &attr_contentlen);
|
rtw_get_p2p_attr_content( merged_p2pie, merged_p2p_ielen, P2P_ATTR_GROUP_ID, ( u8* ) &group_id, &attr_contentlen);
|
||||||
if ( attr_contentlen )
|
if ( attr_contentlen )
|
||||||
{
|
{
|
||||||
|
@ -5818,7 +5818,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;
|
||||||
|
@ -5954,7 +5954,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;
|
||||||
|
@ -6002,7 +6002,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;
|
||||||
|
@ -6317,7 +6317,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;
|
||||||
|
@ -6564,7 +6564,7 @@ static int _issue_probereq(struct adapter *padapter, NDIS_802_11_SSID *pssid, u8
|
||||||
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;
|
||||||
|
@ -6708,7 +6708,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;
|
||||||
|
@ -7020,7 +7020,7 @@ void issue_assocreq(struct adapter *padapter)
|
||||||
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;
|
||||||
|
@ -7463,7 +7463,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;
|
||||||
|
@ -7593,7 +7593,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;
|
||||||
|
@ -7733,7 +7733,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;
|
||||||
|
@ -7845,7 +7845,7 @@ void issue_action_spct_ch_switch(struct adapter *padapter, u8 *ra, u8 new_ch, 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;
|
||||||
|
@ -7914,7 +7914,7 @@ void issue_action_SA_Query(struct adapter *padapter, unsigned char *raddr, unsig
|
||||||
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;
|
||||||
|
@ -8000,7 +8000,7 @@ static void issue_action_BA(struct adapter *padapter, unsigned char *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;
|
||||||
|
@ -8168,7 +8168,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;
|
||||||
|
@ -8204,7 +8204,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;
|
||||||
|
@ -8715,7 +8715,7 @@ u8 collect_bss_info(struct adapter *padapter, union recv_frame *precv_frame, WLA
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memset(bssid, 0, sizeof(WLAN_BSSID_EX));
|
memset(bssid, 0, sizeof(WLAN_BSSID_EX));
|
||||||
|
|
||||||
subtype = GetFrameSubType(pframe);
|
subtype = GetFrameSubType(pframe);
|
||||||
|
|
||||||
|
@ -8774,7 +8774,7 @@ u8 collect_bss_info(struct adapter *padapter, union recv_frame *precv_frame, WLA
|
||||||
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;
|
||||||
|
@ -9200,7 +9200,7 @@ static void process_80211d(struct adapter *padapter, 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_,
|
||||||
|
@ -9246,7 +9246,7 @@ static void process_80211d(struct adapter *padapter, WLAN_BSSID_EX *bssid)
|
||||||
DBG_871X("}\n");
|
DBG_871X("}\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_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 = j = k = 0;
|
i = j = k = 0;
|
||||||
|
@ -10678,7 +10678,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;
|
||||||
|
@ -10715,7 +10715,7 @@ static int rtw_scan_ch_decision(struct adapter *padapter, struct rtw_ieee80211_c
|
||||||
if (padapter->setband == GHZ_24) { // 2.4G
|
if (padapter->setband == GHZ_24) { // 2.4G
|
||||||
for (i=0; i < j ; i++) {
|
for (i=0; i < j ; i++) {
|
||||||
if (out[i].hw_value > 35)
|
if (out[i].hw_value > 35)
|
||||||
_rtw_memset(&out[i], 0 , sizeof(struct rtw_ieee80211_channel));
|
memset(&out[i], 0 , sizeof(struct rtw_ieee80211_channel));
|
||||||
else
|
else
|
||||||
scan_ch_num++;
|
scan_ch_num++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,7 +172,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;
|
||||||
|
@ -233,7 +233,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;
|
||||||
|
@ -312,7 +312,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;
|
||||||
|
@ -403,7 +403,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;
|
||||||
|
@ -588,7 +588,7 @@ u32 build_beacon_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
wfdielen += ETH_ALEN;
|
wfdielen += ETH_ALEN;
|
||||||
|
@ -701,7 +701,7 @@ u32 build_probe_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
wfdielen += ETH_ALEN;
|
wfdielen += ETH_ALEN;
|
||||||
|
@ -859,7 +859,7 @@ u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 tunnel
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
wfdielen += ETH_ALEN;
|
wfdielen += ETH_ALEN;
|
||||||
|
@ -981,7 +981,7 @@ u32 build_assoc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
wfdielen += ETH_ALEN;
|
wfdielen += ETH_ALEN;
|
||||||
|
@ -1079,7 +1079,7 @@ u32 build_assoc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
wfdielen += ETH_ALEN;
|
wfdielen += ETH_ALEN;
|
||||||
|
@ -1177,7 +1177,7 @@ u32 build_nego_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
wfdielen += ETH_ALEN;
|
wfdielen += ETH_ALEN;
|
||||||
|
@ -1275,7 +1275,7 @@ u32 build_nego_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
wfdielen += ETH_ALEN;
|
wfdielen += ETH_ALEN;
|
||||||
|
@ -1374,7 +1374,7 @@ u32 build_nego_confirm_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
wfdielen += ETH_ALEN;
|
wfdielen += ETH_ALEN;
|
||||||
|
@ -1473,7 +1473,7 @@ u32 build_invitation_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
wfdielen += ETH_ALEN;
|
wfdielen += ETH_ALEN;
|
||||||
|
@ -1586,7 +1586,7 @@ u32 build_invitation_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
wfdielen += ETH_ALEN;
|
wfdielen += ETH_ALEN;
|
||||||
|
@ -1699,7 +1699,7 @@ u32 build_provdisc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
wfdielen += ETH_ALEN;
|
wfdielen += ETH_ALEN;
|
||||||
|
@ -1798,7 +1798,7 @@ u32 build_provdisc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
wfdielen += ETH_ALEN;
|
wfdielen += ETH_ALEN;
|
||||||
|
@ -2800,7 +2800,7 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe
|
||||||
{
|
{
|
||||||
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 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2971,7 +2971,7 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram
|
||||||
{
|
{
|
||||||
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 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3095,7 +3095,7 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram
|
||||||
|
|
||||||
// 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 );
|
||||||
|
@ -3193,7 +3193,7 @@ u8 process_p2p_group_negotation_confirm( struct wifidirect_info *pwdinfo, u8 *pf
|
||||||
|
|
||||||
// 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_871X( "[%s] Ssid = %s, ssidlen = %zu\n", __FUNCTION__, &groupid[ETH_ALEN], strlen(&groupid[ETH_ALEN]) );
|
DBG_871X( "[%s] Ssid = %s, ssidlen = %zu\n", __FUNCTION__, &groupid[ETH_ALEN], strlen(&groupid[ETH_ALEN]) );
|
||||||
|
@ -3242,7 +3242,7 @@ static void find_phase_handler( struct adapter* padapter )
|
||||||
u8 _status = 0;
|
u8 _status = 0;
|
||||||
|
|
||||||
|
|
||||||
_rtw_memset((unsigned char*)&ssid, 0, sizeof(NDIS_802_11_SSID));
|
memset((unsigned char*)&ssid, 0, sizeof(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;
|
||||||
|
|
||||||
|
@ -3585,7 +3585,7 @@ static u8 *dump_p2p_attr_ch_list(u8 *p2p_ie, uint p2p_ielen, u8 *buf, u32 buf_le
|
||||||
|
|
||||||
attr_contentlen -= 3;
|
attr_contentlen -= 3;
|
||||||
|
|
||||||
_rtw_memset(ch_list, 0, 40);
|
memset(ch_list, 0, 40);
|
||||||
|
|
||||||
while (attr_contentlen>0) {
|
while (attr_contentlen>0) {
|
||||||
num_of_ch = *(pattr_temp+1);
|
num_of_ch = *(pattr_temp+1);
|
||||||
|
@ -3925,7 +3925,7 @@ void rtw_init_cfg80211_wifidirect_info( struct adapter* padapter)
|
||||||
{
|
{
|
||||||
struct cfg80211_wifidirect_info *pcfg80211_wdinfo = &padapter->cfg80211_wdinfo;
|
struct cfg80211_wifidirect_info *pcfg80211_wdinfo = &padapter->cfg80211_wdinfo;
|
||||||
|
|
||||||
_rtw_memset(pcfg80211_wdinfo, 0x00, sizeof(struct cfg80211_wifidirect_info) );
|
memset(pcfg80211_wdinfo, 0x00, sizeof(struct cfg80211_wifidirect_info) );
|
||||||
|
|
||||||
_init_timer( &pcfg80211_wdinfo->remain_on_ch_timer, padapter->pnetdev, ro_ch_timer_process, padapter );
|
_init_timer( &pcfg80211_wdinfo->remain_on_ch_timer, padapter->pnetdev, ro_ch_timer_process, padapter );
|
||||||
}
|
}
|
||||||
|
@ -4315,8 +4315,8 @@ int rtw_init_wifi_display_info(struct adapter* padapter)
|
||||||
pwfd_info->wfd_pc = false;
|
pwfd_info->wfd_pc = false;
|
||||||
|
|
||||||
// Used in TDLS
|
// Used in TDLS
|
||||||
_rtw_memset( pwfd_info->ip_address, 0x00, 4 );
|
memset( pwfd_info->ip_address, 0x00, 4 );
|
||||||
_rtw_memset( pwfd_info->peer_ip_address, 0x00, 4 );
|
memset( pwfd_info->peer_ip_address, 0x00, 4 );
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4397,32 +4397,32 @@ void init_wifidirect_info( struct adapter* padapter, enum P2P_ROLE role)
|
||||||
|
|
||||||
memcpy( ( void* ) pwdinfo->p2p_wildcard_ssid, "DIRECT-", 7 );
|
memcpy( ( void* ) 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);
|
||||||
//DBG_8192C( "[%s] listen_dwell time is %d00ms\n", __FUNCTION__, pwdinfo->listen_dwell );
|
//DBG_8192C( "[%s] listen_dwell time is %d00ms\n", __FUNCTION__, pwdinfo->listen_dwell );
|
||||||
|
|
||||||
_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;
|
||||||
|
@ -4433,11 +4433,11 @@ void init_wifidirect_info( struct adapter* padapter, enum P2P_ROLE role)
|
||||||
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;
|
||||||
#endif //CONFIG_WFD
|
#endif //CONFIG_WFD
|
||||||
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 ) );
|
||||||
|
|
||||||
// Commented by Kurt 20130319
|
// Commented by Kurt 20130319
|
||||||
// For WiDi purpose: Use CFG80211 interface but controled WFD/RDS frame by driver itself.
|
// For WiDi purpose: Use CFG80211 interface but controled WFD/RDS frame by driver itself.
|
||||||
|
@ -4448,8 +4448,8 @@ void init_wifidirect_info( struct adapter* padapter, enum P2P_ROLE role)
|
||||||
#endif //CONFIG_IOCTL_CFG80211
|
#endif //CONFIG_IOCTL_CFG80211
|
||||||
|
|
||||||
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
|
||||||
|
@ -4657,7 +4657,7 @@ int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role)
|
||||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_NONE);
|
rtw_p2p_set_state(pwdinfo, P2P_STATE_NONE);
|
||||||
rtw_p2p_set_pre_state(pwdinfo, P2P_STATE_NONE);
|
rtw_p2p_set_pre_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);
|
||||||
|
|
|
@ -47,7 +47,7 @@ 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));
|
||||||
|
|
||||||
_rtw_spinlock_init(&psta_recvpriv->lock);
|
_rtw_spinlock_init(&psta_recvpriv->lock);
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ sint _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter)
|
||||||
;
|
;
|
||||||
|
|
||||||
// We don't need to memset padapter->XXX to zero, because adapter is allocated by rtw_zvmalloc().
|
// We don't need to memset padapter->XXX to zero, because adapter is allocated by rtw_zvmalloc().
|
||||||
//_rtw_memset((unsigned char *)precvpriv, 0, sizeof (struct recv_priv));
|
//memset((unsigned char *)precvpriv, 0, sizeof (struct recv_priv));
|
||||||
|
|
||||||
_rtw_spinlock_init(&precvpriv->lock);
|
_rtw_spinlock_init(&precvpriv->lock);
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ sint _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter)
|
||||||
res= _FAIL;
|
res= _FAIL;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
//_rtw_memset(precvpriv->pallocated_frame_buf, 0, NR_RECVFRAME * sizeof(union recv_frame) + RXFRAME_ALIGN_SZ);
|
//memset(precvpriv->pallocated_frame_buf, 0, NR_RECVFRAME * sizeof(union recv_frame) + RXFRAME_ALIGN_SZ);
|
||||||
|
|
||||||
precvpriv->precv_frame_buf = (u8 *)N_BYTE_ALIGMENT((SIZE_PTR)(precvpriv->pallocated_frame_buf), RXFRAME_ALIGN_SZ);
|
precvpriv->precv_frame_buf = (u8 *)N_BYTE_ALIGMENT((SIZE_PTR)(precvpriv->pallocated_frame_buf), RXFRAME_ALIGN_SZ);
|
||||||
//precvpriv->precv_frame_buf = precvpriv->pallocated_frame_buf + RXFRAME_ALIGN_SZ -
|
//precvpriv->precv_frame_buf = precvpriv->pallocated_frame_buf + RXFRAME_ALIGN_SZ -
|
||||||
|
|
|
@ -1404,13 +1404,13 @@ static sint aes_cipher(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);
|
||||||
|
|
||||||
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;
|
||||||
|
@ -1722,13 +1722,13 @@ static sint 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
|
||||||
|
|
||||||
|
@ -2097,7 +2097,7 @@ u32 rtw_BIP_verify(struct adapter *padapter, u8 *precvframe)
|
||||||
goto BIP_exit;
|
goto BIP_exit;
|
||||||
}
|
}
|
||||||
//clear the MIC field of MME to zero
|
//clear the MIC field of MME to zero
|
||||||
_rtw_memset(p+2+len-8, 0, 8);
|
memset(p+2+len-8, 0, 8);
|
||||||
|
|
||||||
//conscruct AAD, copy frame control field
|
//conscruct AAD, copy frame control field
|
||||||
memcpy(BIP_AAD, &pwlanhdr->frame_ctl, 2);
|
memcpy(BIP_AAD, &pwlanhdr->frame_ctl, 2);
|
||||||
|
@ -2386,7 +2386,7 @@ static void hmac_sha256_vector(u8 *key, size_t key_len, size_t num_elem,
|
||||||
* and text is the data being protected */
|
* and text is the data being protected */
|
||||||
|
|
||||||
/* start out by storing key in ipad */
|
/* start out by storing key in ipad */
|
||||||
_rtw_memset(k_pad, 0, sizeof(k_pad));
|
memset(k_pad, 0, sizeof(k_pad));
|
||||||
memcpy(k_pad, key, key_len);
|
memcpy(k_pad, key, key_len);
|
||||||
/* XOR key with ipad values */
|
/* XOR key with ipad values */
|
||||||
for (i = 0; i < 64; i++)
|
for (i = 0; i < 64; i++)
|
||||||
|
@ -2401,7 +2401,7 @@ static void hmac_sha256_vector(u8 *key, size_t key_len, size_t num_elem,
|
||||||
}
|
}
|
||||||
sha256_vector(1 + num_elem, _addr, _len, mac);
|
sha256_vector(1 + num_elem, _addr, _len, mac);
|
||||||
|
|
||||||
_rtw_memset(k_pad, 0, sizeof(k_pad));
|
memset(k_pad, 0, sizeof(k_pad));
|
||||||
memcpy(k_pad, key, key_len);
|
memcpy(k_pad, key, key_len);
|
||||||
/* XOR key with opad values */
|
/* XOR key with opad values */
|
||||||
for (i = 0; i < 64; i++)
|
for (i = 0; i < 64; i++)
|
||||||
|
@ -2761,7 +2761,7 @@ static void gf_mulx(u8 *pad)
|
||||||
|
|
||||||
static void aes_encrypt_deinit(void *ctx)
|
static void aes_encrypt_deinit(void *ctx)
|
||||||
{
|
{
|
||||||
_rtw_memset(ctx, 0, AES_PRIV_SIZE);
|
memset(ctx, 0, AES_PRIV_SIZE);
|
||||||
rtw_mfree(ctx, AES_PRIV_SIZE);
|
rtw_mfree(ctx, AES_PRIV_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2790,7 +2790,7 @@ static int omac1_aes_128_vector(u8 *key, size_t num_elem,
|
||||||
ctx = aes_encrypt_init(key, 16);
|
ctx = aes_encrypt_init(key, 16);
|
||||||
if (ctx == NULL)
|
if (ctx == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
_rtw_memset(cbc, 0, AES_BLOCK_SIZE);
|
memset(cbc, 0, AES_BLOCK_SIZE);
|
||||||
|
|
||||||
total_len = 0;
|
total_len = 0;
|
||||||
for (e = 0; e < num_elem; e++)
|
for (e = 0; e < num_elem; e++)
|
||||||
|
@ -2815,7 +2815,7 @@ static int omac1_aes_128_vector(u8 *key, size_t num_elem,
|
||||||
left -= AES_BLOCK_SIZE;
|
left -= AES_BLOCK_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memset(pad, 0, AES_BLOCK_SIZE);
|
memset(pad, 0, AES_BLOCK_SIZE);
|
||||||
aes_128_encrypt(ctx, pad, pad);
|
aes_128_encrypt(ctx, pad, pad);
|
||||||
gf_mulx(pad);
|
gf_mulx(pad);
|
||||||
|
|
||||||
|
@ -2955,7 +2955,7 @@ int wpa_tdls_ftie_mic(u8 *kck, u8 trans_seq,
|
||||||
/* 7) FTIE, with the MIC field of the FTIE set to 0 */
|
/* 7) FTIE, with the MIC field of the FTIE set to 0 */
|
||||||
memcpy(pos, ftie, 2 + ftie[1]);
|
memcpy(pos, ftie, 2 + ftie[1]);
|
||||||
_ftie = (struct wpa_tdls_ftie *) pos;
|
_ftie = (struct wpa_tdls_ftie *) pos;
|
||||||
_rtw_memset(_ftie->mic, 0, TDLS_MIC_LEN);
|
memset(_ftie->mic, 0, TDLS_MIC_LEN);
|
||||||
pos += 2 + ftie[1];
|
pos += 2 + ftie[1];
|
||||||
|
|
||||||
ret = omac1_aes_128(kck, buf, pos - buf, mic);
|
ret = omac1_aes_128(kck, buf, pos - buf, mic);
|
||||||
|
@ -3006,7 +3006,7 @@ int tdls_verify_mic(u8 *kck, u8 trans_seq,
|
||||||
memcpy(pos, ftie, 2 + *(ftie+1));
|
memcpy(pos, ftie, 2 + *(ftie+1));
|
||||||
pos += 2;
|
pos += 2;
|
||||||
tmp_ftie = (u8 *) (pos+2);
|
tmp_ftie = (u8 *) (pos+2);
|
||||||
_rtw_memset(tmp_ftie, 0, 16);
|
memset(tmp_ftie, 0, 16);
|
||||||
pos += *(ftie+1);
|
pos += *(ftie+1);
|
||||||
|
|
||||||
ret = omac1_aes_128(kck, buf, pos - buf, mic);
|
ret = omac1_aes_128(kck, buf, pos - buf, mic);
|
||||||
|
|
|
@ -35,7 +35,7 @@ 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));
|
||||||
|
|
||||||
_rtw_spinlock_init(&psta->lock);
|
_rtw_spinlock_init(&psta->lock);
|
||||||
_rtw_init_listhead(&psta->list);
|
_rtw_init_listhead(&psta->list);
|
||||||
|
@ -159,7 +159,7 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv)
|
||||||
pstapriv->expire_to = 60;// 60*2 = 120 sec = 2 min, expire after no any traffic.
|
pstapriv->expire_to = 60;// 60*2 = 120 sec = 2 min, expire after no any traffic.
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_ATMEL_RC_PATCH
|
#ifdef CONFIG_ATMEL_RC_PATCH
|
||||||
_rtw_memset( pstapriv->atmel_rc_pattern, 0, ETH_ALEN);
|
memset( pstapriv->atmel_rc_pattern, 0, ETH_ALEN);
|
||||||
#endif
|
#endif
|
||||||
pstapriv->max_num_sta = NUM_STA;
|
pstapriv->max_num_sta = NUM_STA;
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ void rtw_free_tdls_info(struct tdls_info *ptdlsinfo)
|
||||||
_rtw_spinlock_free(&ptdlsinfo->cmd_lock);
|
_rtw_spinlock_free(&ptdlsinfo->cmd_lock);
|
||||||
_rtw_spinlock_free(&ptdlsinfo->hdl_lock);
|
_rtw_spinlock_free(&ptdlsinfo->hdl_lock);
|
||||||
|
|
||||||
_rtw_memset(ptdlsinfo, 0, sizeof(struct tdls_info) );
|
memset(ptdlsinfo, 0, sizeof(struct tdls_info) );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ void issue_nulldata_to_TDLS_peer_STA(_adapter *padapter, struct sta_info *ptdls_
|
||||||
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;
|
||||||
|
@ -258,7 +258,7 @@ void free_tdls_sta(_adapter *padapter, struct sta_info *ptdls_sta)
|
||||||
if( ptdlsinfo->sta_cnt < (NUM_STA - 2) ) // -2: AP + BC/MC sta
|
if( ptdlsinfo->sta_cnt < (NUM_STA - 2) ) // -2: AP + BC/MC sta
|
||||||
{
|
{
|
||||||
ptdlsinfo->sta_maximum = false;
|
ptdlsinfo->sta_maximum = false;
|
||||||
_rtw_memset( &ptdlsinfo->ss_record, 0x00, sizeof(struct tdls_ss_record) );
|
memset( &ptdlsinfo->ss_record, 0x00, sizeof(struct tdls_ss_record) );
|
||||||
}
|
}
|
||||||
//ready to clear cam
|
//ready to clear cam
|
||||||
if(ptdls_sta->mac_id!=0){
|
if(ptdls_sta->mac_id!=0){
|
||||||
|
@ -301,7 +301,7 @@ void rtw_tdls_set_key(_adapter *adapter, struct rx_pkt_attrib *prx_pkt_attrib, s
|
||||||
void rtw_tdls_process_ht_cap(_adapter *adapter, struct sta_info *ptdls_sta, u8 *data, u8 Length)
|
void rtw_tdls_process_ht_cap(_adapter *adapter, struct sta_info *ptdls_sta, u8 *data, u8 Length)
|
||||||
{
|
{
|
||||||
/* save HT capabilities in the sta object */
|
/* save HT capabilities in the sta object */
|
||||||
_rtw_memset(&ptdls_sta->htpriv.ht_cap, 0, sizeof(struct rtw_ieee80211_ht_cap));
|
memset(&ptdls_sta->htpriv.ht_cap, 0, sizeof(struct rtw_ieee80211_ht_cap));
|
||||||
if (data && Length >= sizeof(struct rtw_ieee80211_ht_cap) )
|
if (data && Length >= sizeof(struct rtw_ieee80211_ht_cap) )
|
||||||
{
|
{
|
||||||
ptdls_sta->flags |= WLAN_STA_HT;
|
ptdls_sta->flags |= WLAN_STA_HT;
|
||||||
|
@ -354,7 +354,7 @@ u8 *rtw_tdls_set_ht_cap(_adapter *padapter, u8 *pframe, struct pkt_attrib *pattr
|
||||||
u8 rf_type;
|
u8 rf_type;
|
||||||
|
|
||||||
//HT capabilities
|
//HT capabilities
|
||||||
_rtw_memset(&ht_capie, 0, sizeof(struct rtw_ieee80211_ht_cap));
|
memset(&ht_capie, 0, sizeof(struct rtw_ieee80211_ht_cap));
|
||||||
|
|
||||||
ht_capie.cap_info = IEEE80211_HT_CAP_SUP_WIDTH |IEEE80211_HT_CAP_SGI_20 |IEEE80211_HT_CAP_SM_PS |
|
ht_capie.cap_info = IEEE80211_HT_CAP_SUP_WIDTH |IEEE80211_HT_CAP_SGI_20 |IEEE80211_HT_CAP_SM_PS |
|
||||||
IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_TX_STBC |IEEE80211_HT_CAP_DSSSCCK40;
|
IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_TX_STBC |IEEE80211_HT_CAP_DSSSCCK40;
|
||||||
|
@ -435,7 +435,7 @@ void rtw_tdls_process_wfd_ie(struct tdls_info *ptdlsinfo, u8 *ptr, u8 length)
|
||||||
DBG_871X( "[%s] Peer PORT NUM = %d\n", __FUNCTION__, ptdlsinfo->wfd_info->peer_rtsp_ctrlport );
|
DBG_871X( "[%s] Peer PORT NUM = %d\n", __FUNCTION__, ptdlsinfo->wfd_info->peer_rtsp_ctrlport );
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memset( attr_content, 0x00, 10);
|
memset( attr_content, 0x00, 10);
|
||||||
attr_contentlen = 0;
|
attr_contentlen = 0;
|
||||||
rtw_get_wfd_attr_content( wfd_ie, wfd_ielen, WFD_ATTR_LOCAL_IP_ADDR, attr_content, &attr_contentlen);
|
rtw_get_wfd_attr_content( wfd_ie, wfd_ielen, WFD_ATTR_LOCAL_IP_ADDR, attr_content, &attr_contentlen);
|
||||||
if ( attr_contentlen )
|
if ( attr_contentlen )
|
||||||
|
@ -838,7 +838,7 @@ void issue_tdls_dis_rsp(_adapter *padapter, union recv_frame *precv_frame, u8 di
|
||||||
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;
|
||||||
|
@ -1993,7 +1993,7 @@ void wfd_ie_tdls(_adapter * padapter, u8 *pframe, u32 *pktlen )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_rtw_memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
memset( wfdie + wfdielen, 0x00, ETH_ALEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Local IP Address ATTR
|
// Local IP Address ATTR
|
||||||
|
@ -2102,9 +2102,9 @@ void rtw_build_tdls_setup_req_ies(_adapter * padapter, struct xmit_frame * pxmit
|
||||||
|
|
||||||
if(pattrib->encrypt){
|
if(pattrib->encrypt){
|
||||||
//FTIE
|
//FTIE
|
||||||
_rtw_memset(pframe, 0, 84); //All fields except SNonce shall be set to 0
|
memset(pframe, 0, 84); //All fields except SNonce shall be set to 0
|
||||||
_rtw_memset(pframe, _FTIE_, 1); //version
|
memset(pframe, _FTIE_, 1); //version
|
||||||
_rtw_memset((pframe+1), 82, 1); //length
|
memset((pframe+1), 82, 1); //length
|
||||||
memcpy((pframe+52), ptdls_sta->SNonce, 32);
|
memcpy((pframe+52), ptdls_sta->SNonce, 32);
|
||||||
pframe += 84;
|
pframe += 84;
|
||||||
pattrib->pktlen += 84;
|
pattrib->pktlen += 84;
|
||||||
|
@ -2244,9 +2244,9 @@ void rtw_build_tdls_setup_rsp_ies(_adapter * padapter, struct xmit_frame * pxmit
|
||||||
//FTIE
|
//FTIE
|
||||||
pftie = pframe;
|
pftie = pframe;
|
||||||
pftie_mic = pframe+4;
|
pftie_mic = pframe+4;
|
||||||
_rtw_memset(pframe, 0, 84); //All fields except SNonce shall be set to 0
|
memset(pframe, 0, 84); //All fields except SNonce shall be set to 0
|
||||||
_rtw_memset(pframe, _FTIE_, 1); //version
|
memset(pframe, _FTIE_, 1); //version
|
||||||
_rtw_memset((pframe+1), 82, 1); //length
|
memset((pframe+1), 82, 1); //length
|
||||||
memcpy((pframe+20), ptdls_sta->ANonce, 32);
|
memcpy((pframe+20), ptdls_sta->ANonce, 32);
|
||||||
memcpy((pframe+52), ptdls_sta->SNonce, 32);
|
memcpy((pframe+52), ptdls_sta->SNonce, 32);
|
||||||
pframe += 84;
|
pframe += 84;
|
||||||
|
@ -2326,9 +2326,9 @@ void rtw_build_tdls_setup_cfm_ies(_adapter * padapter, struct xmit_frame * pxmit
|
||||||
//FTIE
|
//FTIE
|
||||||
pftie = pframe;
|
pftie = pframe;
|
||||||
pftie_mic = pframe+4;
|
pftie_mic = pframe+4;
|
||||||
_rtw_memset(pframe, 0, 84); //All fields except SNonce shall be set to 0
|
memset(pframe, 0, 84); //All fields except SNonce shall be set to 0
|
||||||
_rtw_memset(pframe, _FTIE_, 1); //version
|
memset(pframe, _FTIE_, 1); //version
|
||||||
_rtw_memset((pframe+1), 82, 1); //length
|
memset((pframe+1), 82, 1); //length
|
||||||
memcpy((pframe+20), ptdls_sta->ANonce, 32);
|
memcpy((pframe+20), ptdls_sta->ANonce, 32);
|
||||||
memcpy((pframe+52), ptdls_sta->SNonce, 32);
|
memcpy((pframe+52), ptdls_sta->SNonce, 32);
|
||||||
pframe += 84;
|
pframe += 84;
|
||||||
|
@ -2479,9 +2479,9 @@ void rtw_build_tdls_dis_rsp_ies(_adapter * padapter, struct xmit_frame * pxmitfr
|
||||||
|
|
||||||
if(pattrib->encrypt){
|
if(pattrib->encrypt){
|
||||||
//FTIE
|
//FTIE
|
||||||
_rtw_memset(pframe, 0, 84); //All fields shall be set to 0
|
memset(pframe, 0, 84); //All fields shall be set to 0
|
||||||
_rtw_memset(pframe, _FTIE_, 1); //version
|
memset(pframe, _FTIE_, 1); //version
|
||||||
_rtw_memset((pframe+1), 82, 1); //length
|
memset((pframe+1), 82, 1); //length
|
||||||
pframe += 84;
|
pframe += 84;
|
||||||
pattrib->pktlen += 84;
|
pattrib->pktlen += 84;
|
||||||
|
|
||||||
|
|
|
@ -299,7 +299,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);
|
||||||
}
|
}
|
||||||
|
@ -1824,7 +1824,7 @@ void update_tx_basic_rate(struct adapter *padapter, u8 wirelessmode)
|
||||||
return;
|
return;
|
||||||
#endif //CONFIG_INTEL_WIDI
|
#endif //CONFIG_INTEL_WIDI
|
||||||
|
|
||||||
_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);
|
||||||
|
@ -2257,7 +2257,7 @@ void rtw_get_sec_iv(struct adapter *padapter, u8*pcur_dot11txpn, u8 *StaAddr)
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
struct security_priv *psecpriv = &padapter->securitypriv;
|
struct security_priv *psecpriv = &padapter->securitypriv;
|
||||||
|
|
||||||
_rtw_memset(pcur_dot11txpn, 0, 8);
|
memset(pcur_dot11txpn, 0, 8);
|
||||||
if(NULL == StaAddr)
|
if(NULL == StaAddr)
|
||||||
return;
|
return;
|
||||||
psta = rtw_get_stainfo(&padapter->stapriv, StaAddr);
|
psta = rtw_get_stainfo(&padapter->stapriv, StaAddr);
|
||||||
|
|
|
@ -48,7 +48,7 @@ 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));
|
||||||
|
|
||||||
_rtw_spinlock_init(&psta_xmitpriv->lock);
|
_rtw_spinlock_init(&psta_xmitpriv->lock);
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
|
||||||
;
|
;
|
||||||
|
|
||||||
// We don't need to memset padapter->XXX to zero, because adapter is allocated by rtw_zvmalloc().
|
// We don't need to memset padapter->XXX to zero, because adapter is allocated by rtw_zvmalloc().
|
||||||
//_rtw_memset((unsigned char *)pxmitpriv, 0, sizeof(struct xmit_priv));
|
//memset((unsigned char *)pxmitpriv, 0, sizeof(struct xmit_priv));
|
||||||
|
|
||||||
_rtw_spinlock_init(&pxmitpriv->lock);
|
_rtw_spinlock_init(&pxmitpriv->lock);
|
||||||
_rtw_spinlock_init(&pxmitpriv->lock_sctx);
|
_rtw_spinlock_init(&pxmitpriv->lock_sctx);
|
||||||
|
@ -1147,7 +1147,7 @@ s32 rtw_make_wlanhdr (struct adapter *padapter , u8 *hdr, struct pkt_attrib *pat
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memset(hdr, 0, WLANHDR_OFFSET);
|
memset(hdr, 0, WLANHDR_OFFSET);
|
||||||
|
|
||||||
SetFrameSubType(fctrl, pattrib->subtype);
|
SetFrameSubType(fctrl, pattrib->subtype);
|
||||||
|
|
||||||
|
@ -1451,7 +1451,7 @@ s32 rtw_make_tdls_wlanhdr (struct adapter *padapter , u8 *hdr, struct pkt_attrib
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
_rtw_memset(hdr, 0, WLANHDR_OFFSET);
|
memset(hdr, 0, WLANHDR_OFFSET);
|
||||||
|
|
||||||
SetFrameSubType(fctrl, pattrib->subtype);
|
SetFrameSubType(fctrl, pattrib->subtype);
|
||||||
|
|
||||||
|
@ -1946,7 +1946,7 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, _pkt *pkt, struct xmit
|
||||||
int frame_body_len;
|
int frame_body_len;
|
||||||
u8 mic[16];
|
u8 mic[16];
|
||||||
|
|
||||||
_rtw_memset(MME, 0, 18);
|
memset(MME, 0, 18);
|
||||||
|
|
||||||
//other types doesn't need the BIP
|
//other types doesn't need the BIP
|
||||||
if(GetFrameSubType(pframe) != WIFI_DEAUTH && GetFrameSubType(pframe) != WIFI_DISASSOC)
|
if(GetFrameSubType(pframe) != WIFI_DEAUTH && GetFrameSubType(pframe) != WIFI_DISASSOC)
|
||||||
|
@ -2424,7 +2424,7 @@ static void rtw_init_xmitframe(struct xmit_frame *pxframe)
|
||||||
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;
|
||||||
|
|
|
@ -348,7 +348,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);
|
||||||
|
|
|
@ -193,7 +193,7 @@ u8 rtl8188e_set_raid_cmd(struct adapter*padapter, u32 mask)
|
||||||
if(pHalData->fw_ractrl == true){
|
if(pHalData->fw_ractrl == true){
|
||||||
__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);
|
||||||
|
|
||||||
|
@ -634,7 +634,7 @@ static void ConstructARPResponse(
|
||||||
|
|
||||||
if(EncryptionHeadOverhead > 0)
|
if(EncryptionHeadOverhead > 0)
|
||||||
{
|
{
|
||||||
_rtw_memset(&(pframe[*pLength]), 0,EncryptionHeadOverhead);
|
memset(&(pframe[*pLength]), 0,EncryptionHeadOverhead);
|
||||||
*pLength += EncryptionHeadOverhead;
|
*pLength += EncryptionHeadOverhead;
|
||||||
//SET_80211_HDR_WEP(pARPRspPkt, 1); //Suggested by CCW.
|
//SET_80211_HDR_WEP(pARPRspPkt, 1); //Suggested by CCW.
|
||||||
SetPrivacy(fctrl);
|
SetPrivacy(fctrl);
|
||||||
|
@ -1115,7 +1115,7 @@ void rtl8188e_set_p2p_ps_offload_cmd(struct adapter* padapter, u8 p2p_ps_state)
|
||||||
{
|
{
|
||||||
case P2P_PS_DISABLE:
|
case P2P_PS_DISABLE:
|
||||||
DBG_8192C("P2P_PS_DISABLE \n");
|
DBG_8192C("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_8192C("P2P_PS_ENABLE \n");
|
DBG_8192C("P2P_PS_ENABLE \n");
|
||||||
|
|
|
@ -146,7 +146,7 @@ static void Init_ODM_ComInfo_88E(struct adapter *Adapter)
|
||||||
//
|
//
|
||||||
// Init Value
|
// Init Value
|
||||||
//
|
//
|
||||||
_rtw_memset(pDM_Odm,0,sizeof(pDM_Odm));
|
memset(pDM_Odm, 0, sizeof(*pDM_Odm));
|
||||||
|
|
||||||
pDM_Odm->Adapter = Adapter;
|
pDM_Odm->Adapter = Adapter;
|
||||||
|
|
||||||
|
@ -379,7 +379,7 @@ void rtl8188e_init_dm_priv(IN struct adapter *Adapter)
|
||||||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter);
|
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter);
|
||||||
struct dm_priv *pdmpriv = &pHalData->dmpriv;
|
struct dm_priv *pdmpriv = &pHalData->dmpriv;
|
||||||
PDM_ODM_T podmpriv = &pHalData->odmpriv;
|
PDM_ODM_T podmpriv = &pHalData->odmpriv;
|
||||||
_rtw_memset(pdmpriv, 0, sizeof(struct dm_priv));
|
memset(pdmpriv, 0, sizeof(struct dm_priv));
|
||||||
//_rtw_spinlock_init(&(pHalData->odm_stainfo_lock));
|
//_rtw_spinlock_init(&(pHalData->odm_stainfo_lock));
|
||||||
Init_ODM_ComInfo_88E(Adapter);
|
Init_ODM_ComInfo_88E(Adapter);
|
||||||
#ifdef CONFIG_SW_ANTENNA_DIVERSITY
|
#ifdef CONFIG_SW_ANTENNA_DIVERSITY
|
||||||
|
|
|
@ -386,7 +386,7 @@ static s32 iol_read_efuse(
|
||||||
|
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
///reg_0x106 = rtw_read8(padapter, REG_PKT_BUFF_ACCESS_CTRL);
|
///reg_0x106 = rtw_read8(padapter, REG_PKT_BUFF_ACCESS_CTRL);
|
||||||
//DBG_871X("%s reg_0x106:0x%02x, write 0x%02x\n", __FUNCTION__, reg_0x106, 0x69);
|
//DBG_871X("%s reg_0x106:0x%02x, write 0x%02x\n", __FUNCTION__, reg_0x106, 0x69);
|
||||||
|
@ -1139,7 +1139,7 @@ static bool efuse_read_phymap(
|
||||||
//
|
//
|
||||||
// Refresh efuse init map as all 0xFF.
|
// Refresh efuse init map as all 0xFF.
|
||||||
//
|
//
|
||||||
_rtw_memset(pbuf, 0xFF, limit);
|
memset(pbuf, 0xFF, limit);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1673,7 +1673,7 @@ Hal_EfuseWordEnableDataWrite( IN struct adapter *pAdapter,
|
||||||
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);
|
||||||
//RT_TRACE(COMP_EFUSE, DBG_LOUD, ("word_en = %x efuse_addr=%x\n", word_en, efuse_addr));
|
//RT_TRACE(COMP_EFUSE, DBG_LOUD, ("word_en = %x efuse_addr=%x\n", word_en, efuse_addr));
|
||||||
|
|
||||||
if(!(word_en&BIT0))
|
if(!(word_en&BIT0))
|
||||||
|
@ -1895,8 +1895,8 @@ hal_EfusePgPacketRead_8188e(
|
||||||
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);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -2044,7 +2044,7 @@ hal_EfuseFixHeaderProcess(
|
||||||
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
|
||||||
|
@ -2493,7 +2493,7 @@ hal_EfuseConstructPGPkt(
|
||||||
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_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);
|
||||||
|
@ -3040,7 +3040,7 @@ Hal_ReadPowerValueFromPROM_8188E(
|
||||||
u32 rfPath, eeAddr=EEPROM_TX_PWR_INX_88E, group,TxCount=0;
|
u32 rfPath, eeAddr=EEPROM_TX_PWR_INX_88E, group,TxCount=0;
|
||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||||
|
|
||||||
_rtw_memset(pwrInfo24G, 0, sizeof(TxPowerInfo24G));
|
memset(pwrInfo24G, 0, sizeof(TxPowerInfo24G));
|
||||||
|
|
||||||
if(AutoLoadFail)
|
if(AutoLoadFail)
|
||||||
{
|
{
|
||||||
|
|
|
@ -200,7 +200,7 @@ void update_recvframe_attrib_88e(
|
||||||
prxreport = (PRXREPORT)&report;
|
prxreport = (PRXREPORT)&report;
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,7 @@ InsertEMContent_8188E(
|
||||||
u32 dwtmp=0;
|
u32 dwtmp=0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_rtw_memset(VirtualAddress, 0, EARLY_MODE_INFO_SIZE);
|
memset(VirtualAddress, 0, EARLY_MODE_INFO_SIZE);
|
||||||
if(pEMInfo->EMPktNum==0)
|
if(pEMInfo->EMPktNum==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -247,7 +247,7 @@ void UpdateEarlyModeInfo8188E(struct xmit_priv *pxmitpriv,struct xmit_buf *pxmit
|
||||||
offset = pxmitpriv->agg_pkt[index].offset;
|
offset = pxmitpriv->agg_pkt[index].offset;
|
||||||
pktlen = pxmitpriv->agg_pkt[index].pkt_len;
|
pktlen = pxmitpriv->agg_pkt[index].pkt_len;
|
||||||
|
|
||||||
_rtw_memset(&eminfo,0,sizeof(struct EMInfo));
|
memset(&eminfo,0,sizeof(struct EMInfo));
|
||||||
if( pframe->agg_num > EARLY_MODE_MAX_PKT_NUM){
|
if( pframe->agg_num > EARLY_MODE_MAX_PKT_NUM){
|
||||||
if(node_num_0 > EARLY_MODE_MAX_PKT_NUM){
|
if(node_num_0 > EARLY_MODE_MAX_PKT_NUM){
|
||||||
eminfo.EMPktNum = EARLY_MODE_MAX_PKT_NUM;
|
eminfo.EMPktNum = EARLY_MODE_MAX_PKT_NUM;
|
||||||
|
@ -284,7 +284,7 @@ void UpdateEarlyModeInfo8188E(struct xmit_priv *pxmitpriv,struct xmit_buf *pxmit
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
_rtw_memset(pxmitpriv->agg_pkt,0,sizeof(struct agg_pkt_info)*MAX_AGG_PKT_NUM);
|
memset(pxmitpriv->agg_pkt,0,sizeof(struct agg_pkt_info)*MAX_AGG_PKT_NUM);
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -95,7 +95,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_PTR)(precvpriv->pallocated_recv_buf), 4);
|
precvpriv->precv_buf = (u8 *)N_BYTE_ALIGMENT((SIZE_PTR)(precvpriv->pallocated_recv_buf), 4);
|
||||||
//precvpriv->precv_buf = precvpriv->pallocated_recv_buf + 4 -
|
//precvpriv->precv_buf = precvpriv->pallocated_recv_buf + 4 -
|
||||||
|
|
|
@ -89,7 +89,7 @@ void rtl8188e_fill_fake_txdesc(
|
||||||
|
|
||||||
// Clear all status
|
// Clear all status
|
||||||
ptxdesc = (struct tx_desc*)pDesc;
|
ptxdesc = (struct tx_desc*)pDesc;
|
||||||
_rtw_memset(pDesc, 0, TXDESC_SIZE);
|
memset(pDesc, 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;
|
||||||
|
@ -246,7 +246,7 @@ if (padapter->registrypriv.mp_mode == 0)
|
||||||
}
|
}
|
||||||
#endif // CONFIG_USE_USB_BUFFER_ALLOC_TX
|
#endif // CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||||
|
|
||||||
_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);
|
||||||
|
@ -1222,7 +1222,7 @@ s32 rtl8188eu_hostap_mgnt_xmit_entry(struct adapter *padapter, _pkt *pkt)
|
||||||
|
|
||||||
// ----- fill tx desc -----
|
// ----- fill tx desc -----
|
||||||
ptxdesc = (struct tx_desc *)pxmitbuf;
|
ptxdesc = (struct tx_desc *)pxmitbuf;
|
||||||
_rtw_memset(ptxdesc, 0, sizeof(*ptxdesc));
|
memset(ptxdesc, 0, sizeof(*ptxdesc));
|
||||||
|
|
||||||
//offset 0
|
//offset 0
|
||||||
ptxdesc->txdw0 |= cpu_to_le32(len&0x0000ffff);
|
ptxdesc->txdw0 |= cpu_to_le32(len&0x0000ffff);
|
||||||
|
|
|
@ -2168,8 +2168,8 @@ Hal_ReadMACAddrFromFile_8188EU(
|
||||||
u8 null_mac_addr[ETH_ALEN] = {0, 0, 0,0, 0, 0};
|
u8 null_mac_addr[ETH_ALEN] = {0, 0, 0,0, 0, 0};
|
||||||
u8 multi_mac_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
u8 multi_mac_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
||||||
|
|
||||||
_rtw_memset(source_addr, 0, 18);
|
memset(source_addr, 0, 18);
|
||||||
_rtw_memset(pEEPROM->mac_addr, 0, ETH_ALEN);
|
memset(pEEPROM->mac_addr, 0, ETH_ALEN);
|
||||||
|
|
||||||
fp = filp_open("/data/wifimac.txt", O_RDWR, 0644);
|
fp = filp_open("/data/wifimac.txt", O_RDWR, 0644);
|
||||||
if (IS_ERR(fp)) {
|
if (IS_ERR(fp)) {
|
||||||
|
|
|
@ -89,7 +89,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)
|
||||||
{
|
{
|
||||||
|
@ -1337,7 +1337,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;
|
||||||
|
|
|
@ -39,7 +39,7 @@ struct rtw_wdev_invit_info {
|
||||||
#define rtw_wdev_invit_info_init(invit_info) \
|
#define rtw_wdev_invit_info_init(invit_info) \
|
||||||
do { \
|
do { \
|
||||||
(invit_info)->state = 0xff; \
|
(invit_info)->state = 0xff; \
|
||||||
_rtw_memset((invit_info)->peer_mac, 0, ETH_ALEN); \
|
memset((invit_info)->peer_mac, 0, ETH_ALEN); \
|
||||||
(invit_info)->active = 0xff; \
|
(invit_info)->active = 0xff; \
|
||||||
(invit_info)->token = 0; \
|
(invit_info)->token = 0; \
|
||||||
(invit_info)->flags = 0x00; \
|
(invit_info)->flags = 0x00; \
|
||||||
|
@ -65,7 +65,7 @@ struct rtw_wdev_nego_info {
|
||||||
#define rtw_wdev_nego_info_init(nego_info) \
|
#define rtw_wdev_nego_info_init(nego_info) \
|
||||||
do { \
|
do { \
|
||||||
(nego_info)->state = 0xff; \
|
(nego_info)->state = 0xff; \
|
||||||
_rtw_memset((nego_info)->peer_mac, 0, ETH_ALEN); \
|
memset((nego_info)->peer_mac, 0, ETH_ALEN); \
|
||||||
(nego_info)->active = 0xff; \
|
(nego_info)->active = 0xff; \
|
||||||
(nego_info)->token = 0; \
|
(nego_info)->token = 0; \
|
||||||
(nego_info)->status = 0xff; \
|
(nego_info)->status = 0xff; \
|
||||||
|
|
|
@ -574,7 +574,6 @@ void* rtw_malloc2d(int h, int w, int size);
|
||||||
void rtw_mfree2d(void *pbuf, int h, int w, int size);
|
void rtw_mfree2d(void *pbuf, int h, int w, int size);
|
||||||
|
|
||||||
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(_list *list);
|
void _rtw_init_listhead(_list *list);
|
||||||
u32 rtw_is_list_empty(_list *phead);
|
u32 rtw_is_list_empty(_list *phead);
|
||||||
|
|
|
@ -848,7 +848,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;
|
||||||
if (is_wep_enc(alg))
|
if (is_wep_enc(alg))
|
||||||
|
@ -1514,10 +1514,10 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
if (param == NULL)
|
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 (params->cipher) {
|
switch (params->cipher) {
|
||||||
case IW_AUTH_CIPHER_NONE:
|
case IW_AUTH_CIPHER_NONE:
|
||||||
|
@ -2233,7 +2233,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
|
||||||
#endif //CONFIG_P2P
|
#endif //CONFIG_P2P
|
||||||
|
|
||||||
|
|
||||||
_rtw_memset(ssid, 0, sizeof(NDIS_802_11_SSID)*RTW_SSID_SCAN_AMOUNT);
|
memset(ssid, 0, sizeof(NDIS_802_11_SSID)*RTW_SSID_SCAN_AMOUNT);
|
||||||
//parsing request ssids, n_ssids
|
//parsing request ssids, n_ssids
|
||||||
for (i = 0; i < request->n_ssids && i < RTW_SSID_SCAN_AMOUNT; i++) {
|
for (i = 0; i < request->n_ssids && i < RTW_SSID_SCAN_AMOUNT; i++) {
|
||||||
#ifdef CONFIG_DEBUG_CFG80211
|
#ifdef CONFIG_DEBUG_CFG80211
|
||||||
|
@ -2244,7 +2244,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
|
||||||
}
|
}
|
||||||
|
|
||||||
/* parsing channels, n_channels */
|
/* parsing channels, n_channels */
|
||||||
_rtw_memset(ch, 0, sizeof(struct rtw_ieee80211_channel)*RTW_CHANNEL_SCAN_AMOUNT);
|
memset(ch, 0, sizeof(struct rtw_ieee80211_channel)*RTW_CHANNEL_SCAN_AMOUNT);
|
||||||
for (i=0;i<request->n_channels && i<RTW_CHANNEL_SCAN_AMOUNT;i++) {
|
for (i=0;i<request->n_channels && i<RTW_CHANNEL_SCAN_AMOUNT;i++) {
|
||||||
#ifdef CONFIG_DEBUG_CFG80211
|
#ifdef CONFIG_DEBUG_CFG80211
|
||||||
DBG_871X(FUNC_ADPT_FMT CHAN_FMT"\n", FUNC_ADPT_ARG(padapter), CHAN_ARG(request->channels[i]));
|
DBG_871X(FUNC_ADPT_FMT CHAN_FMT"\n", FUNC_ADPT_ARG(padapter), CHAN_ARG(request->channels[i]));
|
||||||
|
@ -2710,7 +2710,7 @@ static int cfg80211_rtw_join_ibss(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memset(&ndis_ssid, 0, sizeof(NDIS_802_11_SSID));
|
memset(&ndis_ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||||
ndis_ssid.SsidLength = params->ssid_len;
|
ndis_ssid.SsidLength = params->ssid_len;
|
||||||
memcpy(ndis_ssid.Ssid, (void *)params->ssid, params->ssid_len);
|
memcpy(ndis_ssid.Ssid, (void *)params->ssid, params->ssid_len);
|
||||||
|
|
||||||
|
@ -2812,7 +2812,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memset(&ndis_ssid, 0, sizeof(NDIS_802_11_SSID));
|
memset(&ndis_ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||||
ndis_ssid.SsidLength = sme->ssid_len;
|
ndis_ssid.SsidLength = sme->ssid_len;
|
||||||
memcpy(ndis_ssid.Ssid, (void *)sme->ssid, sme->ssid_len);
|
memcpy(ndis_ssid.Ssid, (void *)sme->ssid, sme->ssid_len);
|
||||||
|
|
||||||
|
@ -2906,7 +2906,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
goto exit;
|
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;
|
||||||
|
@ -3127,8 +3127,8 @@ static int cfg80211_rtw_del_pmksa(struct wiphy *wiphy,
|
||||||
{
|
{
|
||||||
if( _rtw_memcmp( psecuritypriv->PMKIDList[index].Bssid, (void *)pmksa->bssid, ETH_ALEN) ==true )
|
if( _rtw_memcmp( psecuritypriv->PMKIDList[index].Bssid, (void *)pmksa->bssid, ETH_ALEN) ==true )
|
||||||
{ // BSSID is matched, the same AP => Remove this PMKID information and reset it.
|
{ // BSSID is matched, the same AP => Remove this PMKID information and reset it.
|
||||||
_rtw_memset( psecuritypriv->PMKIDList[index].Bssid, 0x00, ETH_ALEN );
|
memset( psecuritypriv->PMKIDList[index].Bssid, 0x00, ETH_ALEN );
|
||||||
_rtw_memset( psecuritypriv->PMKIDList[index].PMKID, 0x00, WLAN_PMKID_LEN );
|
memset( psecuritypriv->PMKIDList[index].PMKID, 0x00, WLAN_PMKID_LEN );
|
||||||
psecuritypriv->PMKIDList[index].bUsed = false;
|
psecuritypriv->PMKIDList[index].bUsed = false;
|
||||||
bMatched = true;
|
bMatched = true;
|
||||||
break;
|
break;
|
||||||
|
@ -3153,7 +3153,7 @@ static int cfg80211_rtw_flush_pmksa(struct wiphy *wiphy,
|
||||||
|
|
||||||
DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(netdev));
|
DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(netdev));
|
||||||
|
|
||||||
_rtw_memset( &psecuritypriv->PMKIDList[ 0 ], 0x00, sizeof( RT_PMKID_LIST ) * NUM_PMKID_CACHE );
|
memset( &psecuritypriv->PMKIDList[ 0 ], 0x00, sizeof( RT_PMKID_LIST ) * NUM_PMKID_CACHE );
|
||||||
psecuritypriv->PMKIDIndex = 0;
|
psecuritypriv->PMKIDIndex = 0;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -3408,7 +3408,7 @@ dump:
|
||||||
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;
|
||||||
|
|
||||||
|
@ -4211,8 +4211,8 @@ void rtw_cfg80211_issue_p2p_provision_request(struct adapter *padapter, const u8
|
||||||
}
|
}
|
||||||
|
|
||||||
//start to build provision_request frame
|
//start to build provision_request frame
|
||||||
_rtw_memset(wpsie, 0, sizeof(wpsie));
|
memset(wpsie, 0, sizeof(wpsie));
|
||||||
_rtw_memset(p2p_ie, 0, sizeof(p2p_ie));
|
memset(p2p_ie, 0, sizeof(p2p_ie));
|
||||||
p2p_ielen = 0;
|
p2p_ielen = 0;
|
||||||
|
|
||||||
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
||||||
|
@ -4222,7 +4222,7 @@ void rtw_cfg80211_issue_p2p_provision_request(struct adapter *padapter, const u8
|
||||||
pattrib = &pmgntframe->attrib;
|
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;
|
||||||
|
@ -4531,7 +4531,7 @@ static int _cfg80211_rtw_mgmt_tx(struct adapter *padapter, u8 tx_ch, const u8 *b
|
||||||
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;
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,7 @@ static void indicate_wx_custom_event(struct adapter *padapter, char *msg)
|
||||||
|
|
||||||
memcpy(buff, msg, strlen(msg));
|
memcpy(buff, msg, strlen(msg));
|
||||||
|
|
||||||
_rtw_memset(&wrqu,0,sizeof(wrqu));
|
memset(&wrqu,0,sizeof(wrqu));
|
||||||
wrqu.data.length = strlen(msg);
|
wrqu.data.length = strlen(msg);
|
||||||
|
|
||||||
DBG_871X("%s %s\n", __FUNCTION__, buff);
|
DBG_871X("%s %s\n", __FUNCTION__, buff);
|
||||||
|
@ -165,13 +165,13 @@ static void request_wps_pbc_event(struct adapter *padapter)
|
||||||
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, "WPS_PBC_START.request=TRUE");
|
p+=sprintf(p, "WPS_PBC_START.request=TRUE");
|
||||||
|
|
||||||
_rtw_memset(&wrqu,0,sizeof(wrqu));
|
memset(&wrqu,0,sizeof(wrqu));
|
||||||
|
|
||||||
wrqu.data.length = p-buff;
|
wrqu.data.length = p-buff;
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ void indicate_wx_scan_complete_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));
|
||||||
|
|
||||||
//DBG_871X("+rtw_indicate_wx_scan_complete_event\n");
|
//DBG_871X("+rtw_indicate_wx_scan_complete_event\n");
|
||||||
#ifndef CONFIG_IOCTL_CFG80211
|
#ifndef CONFIG_IOCTL_CFG80211
|
||||||
|
@ -213,7 +213,7 @@ void rtw_indicate_wx_assoc_event(struct adapter *padapter)
|
||||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||||
WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network));
|
WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network));
|
||||||
|
|
||||||
_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;
|
||||||
|
|
||||||
|
@ -232,10 +232,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);
|
||||||
|
|
||||||
#ifndef CONFIG_IOCTL_CFG80211
|
#ifndef CONFIG_IOCTL_CFG80211
|
||||||
DBG_871X_LEVEL(_drv_always_, "indicate disassoc\n");
|
DBG_871X_LEVEL(_drv_always_, "indicate disassoc\n");
|
||||||
|
@ -521,18 +521,18 @@ 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);
|
||||||
|
@ -540,17 +540,17 @@ static char *translate_scan(struct adapter *padapter,
|
||||||
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);
|
||||||
|
@ -598,8 +598,8 @@ static char *translate_scan(struct adapter *padapter,
|
||||||
u16 wapi_len=0;
|
u16 wapi_len=0;
|
||||||
u16 i;
|
u16 i;
|
||||||
|
|
||||||
_rtw_memset(buf_wapi, 0, MAX_WAPI_IE_LEN);
|
memset(buf_wapi, 0, MAX_WAPI_IE_LEN);
|
||||||
_rtw_memset(wapi_ie, 0, MAX_WAPI_IE_LEN);
|
memset(wapi_ie, 0, MAX_WAPI_IE_LEN);
|
||||||
|
|
||||||
out_len_wapi=rtw_get_wapi_ie(pnetwork->network.IEs ,pnetwork->network.IELength,wapi_ie,&wapi_len);
|
out_len_wapi=rtw_get_wapi_ie(pnetwork->network.IEs ,pnetwork->network.IELength,wapi_ie,&wapi_len);
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_wx_get_scan: ssid=%s\n",pnetwork->network.Ssid.Ssid));
|
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_wx_get_scan: ssid=%s\n",pnetwork->network.Ssid.Ssid));
|
||||||
|
@ -612,18 +612,18 @@ static char *translate_scan(struct adapter *padapter,
|
||||||
if (wapi_len > 0)
|
if (wapi_len > 0)
|
||||||
{
|
{
|
||||||
p=buf_wapi;
|
p=buf_wapi;
|
||||||
_rtw_memset(buf_wapi, 0, MAX_WAPI_IE_LEN);
|
memset(buf_wapi, 0, MAX_WAPI_IE_LEN);
|
||||||
p += sprintf(p, "wapi_ie=");
|
p += sprintf(p, "wapi_ie=");
|
||||||
for (i = 0; i < wapi_len; i++) {
|
for (i = 0; i < wapi_len; i++) {
|
||||||
p += sprintf(p, "%02x", wapi_ie[i]);
|
p += sprintf(p, "%02x", wapi_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_wapi);
|
iwe.u.data.length = strlen(buf_wapi);
|
||||||
start = iwe_stream_add_point(info, start, stop, &iwe,buf_wapi);
|
start = iwe_stream_add_point(info, start, stop, &iwe,buf_wapi);
|
||||||
|
|
||||||
_rtw_memset(&iwe, 0, sizeof(iwe));
|
memset(&iwe, 0, sizeof(iwe));
|
||||||
iwe.cmd =IWEVGENIE;
|
iwe.cmd =IWEVGENIE;
|
||||||
iwe.u.data.length = wapi_len;
|
iwe.u.data.length = wapi_len;
|
||||||
start = iwe_stream_add_point(info, start, stop, &iwe, wapi_ie);
|
start = iwe_stream_add_point(info, start, stop, &iwe, wapi_ie);
|
||||||
|
@ -681,9 +681,9 @@ static char *translate_scan(struct adapter *padapter,
|
||||||
int len;
|
int len;
|
||||||
p = buf;
|
p = buf;
|
||||||
pos = pnetwork->network.Reserved;
|
pos = pnetwork->network.Reserved;
|
||||||
_rtw_memset(buf, 0, MAX_WPA_IE_LEN);
|
memset(buf, 0, MAX_WPA_IE_LEN);
|
||||||
p += sprintf(p, "fm=%02X%02X", pos[1], pos[0]);
|
p += sprintf(p, "fm=%02X%02X", pos[1], pos[0]);
|
||||||
_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);
|
||||||
|
@ -826,7 +826,7 @@ static int wpa_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;
|
||||||
|
@ -1534,7 +1534,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
|
||||||
{
|
{
|
||||||
if( _rtw_memcmp( psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN) ==true )
|
if( _rtw_memcmp( psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN) ==true )
|
||||||
{ // 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;
|
||||||
}
|
}
|
||||||
|
@ -1543,7 +1543,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
|
||||||
else if ( pPMK->cmd == IW_PMKSA_FLUSH )
|
else if ( pPMK->cmd == IW_PMKSA_FLUSH )
|
||||||
{
|
{
|
||||||
DBG_871X( "[rtw_wx_set_pmkid] IW_PMKSA_FLUSH!\n" );
|
DBG_871X( "[rtw_wx_set_pmkid] IW_PMKSA_FLUSH!\n" );
|
||||||
_rtw_memset( &psecuritypriv->PMKIDList[ 0 ], 0x00, sizeof( RT_PMKID_LIST ) * NUM_PMKID_CACHE );
|
memset( &psecuritypriv->PMKIDList[ 0 ], 0x00, sizeof( RT_PMKID_LIST ) * NUM_PMKID_CACHE );
|
||||||
psecuritypriv->PMKIDIndex = 0;
|
psecuritypriv->PMKIDIndex = 0;
|
||||||
intReturn = true;
|
intReturn = true;
|
||||||
}
|
}
|
||||||
|
@ -1593,7 +1593,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
|
||||||
|
@ -1800,7 +1800,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"));
|
||||||
|
|
||||||
|
@ -1815,7 +1815,7 @@ static int rtw_wx_get_wap(struct net_device *dev,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_rtw_memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN);
|
memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
;
|
;
|
||||||
|
@ -1958,7 +1958,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
|
||||||
}
|
}
|
||||||
#endif //CONFIG_P2P
|
#endif //CONFIG_P2P
|
||||||
|
|
||||||
_rtw_memset(ssid, 0, sizeof(NDIS_802_11_SSID)*RTW_SSID_SCAN_AMOUNT);
|
memset(ssid, 0, sizeof(NDIS_802_11_SSID)*RTW_SSID_SCAN_AMOUNT);
|
||||||
|
|
||||||
#if WIRELESS_EXT >= 17
|
#if WIRELESS_EXT >= 17
|
||||||
if (wrqu->data.length == sizeof(struct iw_scan_req))
|
if (wrqu->data.length == sizeof(struct iw_scan_req))
|
||||||
|
@ -2263,7 +2263,7 @@ static int rtw_wx_set_essid(struct net_device *dev,
|
||||||
if( wrqu->essid.length != 33 )
|
if( wrqu->essid.length != 33 )
|
||||||
DBG_871X("ssid=%s, len=%d\n", extra, wrqu->essid.length);
|
DBG_871X("ssid=%s, len=%d\n", extra, wrqu->essid.length);
|
||||||
|
|
||||||
_rtw_memset(&ndis_ssid, 0, sizeof(NDIS_802_11_SSID));
|
memset(&ndis_ssid, 0, sizeof(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;
|
||||||
|
@ -2603,7 +2603,7 @@ static int rtw_wx_set_enc(struct net_device *dev,
|
||||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
||||||
DBG_871X("+rtw_wx_set_enc, flags=0x%x\n", erq->flags);
|
DBG_871X("+rtw_wx_set_enc, flags=0x%x\n", erq->flags);
|
||||||
|
|
||||||
_rtw_memset(&wep, 0, sizeof(NDIS_802_11_WEP));
|
memset(&wep, 0, sizeof(NDIS_802_11_WEP));
|
||||||
|
|
||||||
key = erq->flags & IW_ENCODE_INDEX;
|
key = erq->flags & IW_ENCODE_INDEX;
|
||||||
|
|
||||||
|
@ -3027,10 +3027,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) {
|
||||||
|
@ -4012,7 +4012,7 @@ static int rtw_p2p_profilefound(struct net_device *dev,
|
||||||
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
|
||||||
|
@ -4054,7 +4054,7 @@ static int rtw_p2p_setDN(struct net_device *dev,
|
||||||
|
|
||||||
|
|
||||||
DBG_871X( "[%s] %s %d\n", __FUNCTION__, extra, wrqu->data.length -1 );
|
DBG_871X( "[%s] %s %d\n", __FUNCTION__, 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;
|
||||||
|
|
||||||
|
@ -4442,7 +4442,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
|
||||||
|
@ -4683,7 +4683,7 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev,
|
||||||
{
|
{
|
||||||
while (p2pie)
|
while (p2pie)
|
||||||
{
|
{
|
||||||
//_rtw_memset( attr_content, 0x00, 2);
|
//memset( attr_content, 0x00, 2);
|
||||||
if (rtw_get_p2p_attr_content(p2pie, p2pielen, P2P_ATTR_CAPABILITY, attr_content, &attr_contentlen))
|
if (rtw_get_p2p_attr_content(p2pie, p2pielen, P2P_ATTR_CAPABILITY, attr_content, &attr_contentlen))
|
||||||
{
|
{
|
||||||
// Handle the P2P capability attribute
|
// Handle the P2P capability attribute
|
||||||
|
@ -4792,8 +4792,8 @@ static int rtw_p2p_connect(struct net_device *dev,
|
||||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||||
|
|
||||||
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 );
|
||||||
|
@ -4870,11 +4870,11 @@ static int rtw_p2p_invite_req(struct net_device *dev,
|
||||||
{
|
{
|
||||||
// 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5485,9 +5485,9 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
|
||||||
#endif //CONFIG_INTEL_WIDI
|
#endif //CONFIG_INTEL_WIDI
|
||||||
|
|
||||||
// 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( NDIS_802_11_SSID ) );
|
memset( &pwdinfo->tx_prov_disc_info.ssid, 0x00, sizeof( 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;
|
||||||
|
@ -7046,7 +7046,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;
|
||||||
if (is_wep_enc(alg))
|
if (is_wep_enc(alg))
|
||||||
|
@ -7193,7 +7193,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;
|
||||||
|
@ -9505,7 +9505,7 @@ static int rtw_tdls_enable(struct net_device *dev,
|
||||||
|
|
||||||
printk( "[%s] %s %d\n", __FUNCTION__, extra, wrqu->data.length -1 );
|
printk( "[%s] %s %d\n", __FUNCTION__, extra, wrqu->data.length -1 );
|
||||||
|
|
||||||
_rtw_memset(tdls_sta, 0x00, sizeof(tdls_sta));
|
memset(tdls_sta, 0x00, sizeof(tdls_sta));
|
||||||
|
|
||||||
if ( extra[ 0 ] == '0' )
|
if ( extra[ 0 ] == '0' )
|
||||||
{
|
{
|
||||||
|
@ -10131,7 +10131,7 @@ static s32 initLoopback(struct adapter *padapter)
|
||||||
ploopback->bstop = true;
|
ploopback->bstop = true;
|
||||||
ploopback->cnt = 0;
|
ploopback->cnt = 0;
|
||||||
ploopback->size = 300;
|
ploopback->size = 300;
|
||||||
_rtw_memset(ploopback->msg, 0, sizeof(ploopback->msg));
|
memset(ploopback->msg, 0, sizeof(ploopback->msg));
|
||||||
|
|
||||||
padapter->ploopback = ploopback;
|
padapter->ploopback = ploopback;
|
||||||
}
|
}
|
||||||
|
@ -10185,7 +10185,7 @@ static s32 createpseudoadhoc(struct adapter *padapter)
|
||||||
if (err == false) return _FAIL;
|
if (err == false) return _FAIL;
|
||||||
|
|
||||||
passoc_ssid = &pmlmepriv->assoc_ssid;
|
passoc_ssid = &pmlmepriv->assoc_ssid;
|
||||||
_rtw_memset(passoc_ssid, 0, sizeof(NDIS_802_11_SSID));
|
memset(passoc_ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||||
passoc_ssid->SsidLength = sizeof(ssid) - 1;
|
passoc_ssid->SsidLength = sizeof(ssid) - 1;
|
||||||
memcpy(passoc_ssid->Ssid, ssid, passoc_ssid->SsidLength);
|
memcpy(passoc_ssid->Ssid, ssid, passoc_ssid->SsidLength);
|
||||||
|
|
||||||
|
@ -10271,12 +10271,12 @@ static struct xmit_frame* createloopbackpkt(struct adapter *padapter, u32 size)
|
||||||
pattrib = &pframe->attrib;
|
pattrib = &pframe->attrib;
|
||||||
|
|
||||||
// init xmitframe attribute
|
// init xmitframe attribute
|
||||||
_rtw_memset(pattrib, 0, sizeof(struct pkt_attrib));
|
memset(pattrib, 0, sizeof(struct pkt_attrib));
|
||||||
|
|
||||||
pattrib->ether_type = 0x8723;
|
pattrib->ether_type = 0x8723;
|
||||||
memcpy(pattrib->src, padapter->eeprompriv.mac_addr, ETH_ALEN);
|
memcpy(pattrib->src, padapter->eeprompriv.mac_addr, ETH_ALEN);
|
||||||
memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
|
memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
|
||||||
_rtw_memset(pattrib->dst, 0xFF, ETH_ALEN);
|
memset(pattrib->dst, 0xFF, ETH_ALEN);
|
||||||
memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
|
memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
|
||||||
// pattrib->pctrl = 0;
|
// pattrib->pctrl = 0;
|
||||||
// pattrib->dhcp_pkt = 0;
|
// pattrib->dhcp_pkt = 0;
|
||||||
|
@ -10307,7 +10307,7 @@ static struct xmit_frame* createloopbackpkt(struct adapter *padapter, u32 size)
|
||||||
|
|
||||||
//2 4. fill TX descriptor
|
//2 4. fill TX descriptor
|
||||||
desc = (struct tx_desc*)pframe->buf_addr;
|
desc = (struct tx_desc*)pframe->buf_addr;
|
||||||
_rtw_memset(desc, 0, TXDESC_SIZE);
|
memset(desc, 0, TXDESC_SIZE);
|
||||||
|
|
||||||
fill_default_txdesc(pframe, (u8*)desc);
|
fill_default_txdesc(pframe, (u8*)desc);
|
||||||
|
|
||||||
|
@ -10513,9 +10513,9 @@ thread_return lbk_thread(thread_context context)
|
||||||
fail++;
|
fail++;
|
||||||
|
|
||||||
ploopback->txsize = 0;
|
ploopback->txsize = 0;
|
||||||
_rtw_memset(ploopback->txbuf, 0, 0x8000);
|
memset(ploopback->txbuf, 0, 0x8000);
|
||||||
ploopback->rxsize = 0;
|
ploopback->rxsize = 0;
|
||||||
_rtw_memset(ploopback->rxbuf, 0, 0x8000);
|
memset(ploopback->rxbuf, 0, 0x8000);
|
||||||
|
|
||||||
freeloopbackpkt(padapter, pxmitframe);
|
freeloopbackpkt(padapter, pxmitframe);
|
||||||
pxmitframe = NULL;
|
pxmitframe = NULL;
|
||||||
|
|
|
@ -208,7 +208,7 @@ void rtw_reset_securitypriv( struct adapter *adapter )
|
||||||
// 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( &backupPMKIDList[ 0 ], 0x00, sizeof( RT_PMKID_LIST ) * NUM_PMKID_CACHE );
|
memset( &backupPMKIDList[ 0 ], 0x00, sizeof( RT_PMKID_LIST ) * NUM_PMKID_CACHE );
|
||||||
|
|
||||||
memcpy( &backupPMKIDList[ 0 ], &adapter->securitypriv.PMKIDList[ 0 ], sizeof( RT_PMKID_LIST ) * NUM_PMKID_CACHE );
|
memcpy( &backupPMKIDList[ 0 ], &adapter->securitypriv.PMKIDList[ 0 ], sizeof( RT_PMKID_LIST ) * NUM_PMKID_CACHE );
|
||||||
backupPMKIDIndex = adapter->securitypriv.PMKIDIndex;
|
backupPMKIDIndex = adapter->securitypriv.PMKIDIndex;
|
||||||
|
@ -218,7 +218,7 @@ void rtw_reset_securitypriv( struct adapter *adapter )
|
||||||
//reset RX BIP packet number
|
//reset RX BIP packet number
|
||||||
pmlmeext->mgnt_80211w_IPN_rx = 0;
|
pmlmeext->mgnt_80211w_IPN_rx = 0;
|
||||||
#endif //CONFIG_IEEE80211W
|
#endif //CONFIG_IEEE80211W
|
||||||
_rtw_memset((unsigned char *)&adapter->securitypriv, 0, sizeof (struct security_priv));
|
memset((unsigned char *)&adapter->securitypriv, 0, sizeof (struct security_priv));
|
||||||
//_init_timer(&(adapter->securitypriv.tkip_timer),adapter->pnetdev, rtw_use_tkipkey_handler, adapter);
|
//_init_timer(&(adapter->securitypriv.tkip_timer),adapter->pnetdev, rtw_use_tkipkey_handler, adapter);
|
||||||
|
|
||||||
// Added by Albert 2009/02/18
|
// Added by Albert 2009/02/18
|
||||||
|
@ -294,7 +294,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);
|
||||||
|
|
||||||
_rtw_memset(buff,0,IW_CUSTOM_MAX);
|
memset(buff,0,IW_CUSTOM_MAX);
|
||||||
|
|
||||||
p=buff;
|
p=buff;
|
||||||
|
|
||||||
|
@ -309,7 +309,7 @@ void rtw_report_sec_ie(struct adapter *adapter,u8 authmode,u8 *sec_ie)
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
|
|
|
@ -978,7 +978,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
|
||||||
_rtw_spinlock_init(&padapter->security_key_mutex);
|
_rtw_spinlock_init(&padapter->security_key_mutex);
|
||||||
|
|
||||||
// We don't need to memset padapter->XXX to zero, because adapter is allocated by rtw_zvmalloc().
|
// We don't need to memset padapter->XXX to zero, because adapter is allocated by rtw_zvmalloc().
|
||||||
//_rtw_memset((unsigned char *)&padapter->securitypriv, 0, sizeof (struct security_priv));
|
//memset((unsigned char *)&padapter->securitypriv, 0, sizeof (struct security_priv));
|
||||||
|
|
||||||
//_init_timer(&(padapter->securitypriv.tkip_timer), padapter->pifp, rtw_use_tkipkey_handler, padapter);
|
//_init_timer(&(padapter->securitypriv.tkip_timer), padapter->pifp, rtw_use_tkipkey_handler, padapter);
|
||||||
|
|
||||||
|
|
|
@ -579,11 +579,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(_list *list)
|
void _rtw_init_listhead(_list *list)
|
||||||
{
|
{
|
||||||
INIT_LIST_HEAD(list);
|
INIT_LIST_HEAD(list);
|
||||||
|
|
|
@ -178,7 +178,7 @@ void rtw_handle_tkip_mic_err(struct adapter *padapter,u8 bgroup)
|
||||||
NULL, GFP_ATOMIC);
|
NULL, GFP_ATOMIC);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_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;
|
||||||
|
@ -191,7 +191,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 );
|
||||||
|
|
||||||
#ifndef CONFIG_IOCTL_CFG80211
|
#ifndef CONFIG_IOCTL_CFG80211
|
||||||
|
@ -232,7 +232,7 @@ void rtw_hostapd_mlme_rx(struct adapter *padapter, union recv_frame *precv_frame
|
||||||
skb_reset_mac_header(skb);
|
skb_reset_mac_header(skb);
|
||||||
|
|
||||||
//skb_pull(skb, 24);
|
//skb_pull(skb, 24);
|
||||||
_rtw_memset(skb->cb, 0, sizeof(skb->cb));
|
memset(skb->cb, 0, sizeof(skb->cb));
|
||||||
|
|
||||||
rtw_netif_rx(pmgnt_netdev, skb);
|
rtw_netif_rx(pmgnt_netdev, skb);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue