mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +00:00
rtl8188eu: Change _FALSE and _TRUE to false and true
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
3d0ee1321a
commit
9cef34aa09
69 changed files with 2493 additions and 3604 deletions
228
core/rtw_ap.c
228
core/rtw_ap.c
|
@ -46,7 +46,7 @@ void init_mlme_ap_info(_adapter *padapter)
|
|||
//for ACL
|
||||
_rtw_init_queue(&pacl_list->acl_node_q);
|
||||
|
||||
//pmlmeext->bstart_bss = _FALSE;
|
||||
//pmlmeext->bstart_bss = false;
|
||||
|
||||
start_ap_mode(padapter);
|
||||
}
|
||||
|
@ -62,8 +62,8 @@ void free_mlme_ap_info(_adapter *padapter)
|
|||
|
||||
//stop_ap_mode(padapter);
|
||||
|
||||
pmlmepriv->update_bcn = _FALSE;
|
||||
pmlmeext->bstart_bss = _FALSE;
|
||||
pmlmepriv->update_bcn = false;
|
||||
pmlmeext->bstart_bss = false;
|
||||
|
||||
rtw_sta_flush(padapter);
|
||||
|
||||
|
@ -95,7 +95,7 @@ static void update_BCNTIM(_adapter *padapter)
|
|||
|
||||
//update TIM IE
|
||||
//if (pstapriv->tim_bitmap)
|
||||
if (_TRUE)
|
||||
if (true)
|
||||
{
|
||||
u8 *p, *dst_ie, *premainder_ie=NULL, *pbackup_remainder_ie=NULL;
|
||||
u16 tim_bitmap_le;
|
||||
|
@ -206,7 +206,7 @@ static void update_BCNTIM(_adapter *padapter)
|
|||
void rtw_add_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *data, u8 len)
|
||||
{
|
||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
||||
u8 bmatch = _FALSE;
|
||||
u8 bmatch = false;
|
||||
u8 *pie = pnetwork->IEs;
|
||||
u8 *p, *dst_ie, *premainder_ie=NULL, *pbackup_remainder_ie=NULL;
|
||||
u32 i, offset, ielen, ie_offset, remainder_ielen = 0;
|
||||
|
@ -223,7 +223,7 @@ void rtw_add_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *d
|
|||
{
|
||||
p = (u8 *)pIE;
|
||||
ielen = pIE->Length;
|
||||
bmatch = _TRUE;
|
||||
bmatch = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -316,7 +316,7 @@ void rtw_remove_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index)
|
|||
u8 chk_sta_is_alive(struct sta_info *psta);
|
||||
u8 chk_sta_is_alive(struct sta_info *psta)
|
||||
{
|
||||
u8 ret = _FALSE;
|
||||
u8 ret = false;
|
||||
#ifdef DBG_EXPIRATION_CHK
|
||||
DBG_88E("sta:"MAC_FMT", rssi:%d, rx:"STA_PKTS_FMT", expire_to:%u, %s%ssq_len:%u\n"
|
||||
, MAC_ARG(psta->hwaddr)
|
||||
|
@ -335,7 +335,7 @@ u8 chk_sta_is_alive(struct sta_info *psta)
|
|||
}
|
||||
else
|
||||
{
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
}
|
||||
|
||||
sta_update_last_rx_pkts(psta);
|
||||
|
@ -361,12 +361,12 @@ void expire_timeout_chk(_adapter *padapter)
|
|||
|
||||
//check auth_queue
|
||||
#ifdef DBG_EXPIRATION_CHK
|
||||
if (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == false) {
|
||||
DBG_88E(FUNC_NDEV_FMT" auth_list, cnt:%u\n"
|
||||
, FUNC_NDEV_ARG(padapter->pnetdev), pstapriv->auth_list_cnt);
|
||||
}
|
||||
#endif
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, auth_list);
|
||||
plist = get_next(plist);
|
||||
|
@ -406,12 +406,12 @@ void expire_timeout_chk(_adapter *padapter)
|
|||
|
||||
//check asoc_queue
|
||||
#ifdef DBG_EXPIRATION_CHK
|
||||
if (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == false) {
|
||||
DBG_88E(FUNC_NDEV_FMT" asoc_list, cnt:%u\n"
|
||||
, FUNC_NDEV_ARG(padapter->pnetdev), pstapriv->asoc_list_cnt);
|
||||
}
|
||||
#endif
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
|
||||
plist = get_next(plist);
|
||||
|
@ -472,7 +472,7 @@ void expire_timeout_chk(_adapter *padapter)
|
|||
|
||||
//to update bcn with tim_bitmap for this station
|
||||
pstapriv->tim_bitmap |= BIT(psta->aid);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, false);
|
||||
|
||||
if (!pmlmeext->active_keep_alive_check)
|
||||
continue;
|
||||
|
@ -495,7 +495,7 @@ void expire_timeout_chk(_adapter *padapter)
|
|||
pstapriv->asoc_list_cnt--;
|
||||
|
||||
DBG_88E("asoc expire "MAC_FMT", state=0x%x\n", MAC_ARG(psta->hwaddr), psta->state);
|
||||
updated = ap_free_sta(padapter, psta, _TRUE, WLAN_REASON_DEAUTH_LEAVING);
|
||||
updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -557,7 +557,7 @@ if (chk_alive_num) {
|
|||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
updated = ap_free_sta(padapter, psta, _TRUE, WLAN_REASON_DEAUTH_LEAVING);
|
||||
updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
|
||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
|
||||
}
|
||||
|
@ -575,7 +575,7 @@ void add_RATid(_adapter *padapter, struct sta_info *psta, u8 rssi_level)
|
|||
int i;
|
||||
u8 rf_type;
|
||||
u32 init_rate=0;
|
||||
unsigned char sta_band = 0, raid, shortGIrate = _FALSE;
|
||||
unsigned char sta_band = 0, raid, shortGIrate = false;
|
||||
unsigned char limit;
|
||||
unsigned int tx_ra_bitmap=0;
|
||||
struct ht_priv *psta_ht = NULL;
|
||||
|
@ -646,7 +646,7 @@ void add_RATid(_adapter *padapter, struct sta_info *psta, u8 rssi_level)
|
|||
|
||||
arg |= BIT(7);//support entry 2~31
|
||||
|
||||
if (shortGIrate==_TRUE)
|
||||
if (shortGIrate==true)
|
||||
arg |= BIT(5);
|
||||
|
||||
tx_ra_bitmap |= ((raid<<28)&0xf0000000);
|
||||
|
@ -661,7 +661,7 @@ void add_RATid(_adapter *padapter, struct sta_info *psta, u8 rssi_level)
|
|||
rtw_hal_add_ra_tid(padapter, tx_ra_bitmap, arg, rssi_level);
|
||||
|
||||
|
||||
if (shortGIrate==_TRUE)
|
||||
if (shortGIrate==true)
|
||||
init_rate |= BIT(6);
|
||||
|
||||
//set ra_id, init_rate
|
||||
|
@ -695,7 +695,7 @@ static void update_bmc_sta(_adapter *padapter)
|
|||
|
||||
psta->qos_option = 0;
|
||||
#ifdef CONFIG_80211N_HT
|
||||
psta->htpriv.ht_option = _FALSE;
|
||||
psta->htpriv.ht_option = false;
|
||||
#endif //CONFIG_80211N_HT
|
||||
|
||||
psta->ieee8021x_blocked = 0;
|
||||
|
@ -737,9 +737,9 @@ static void update_bmc_sta(_adapter *padapter)
|
|||
|
||||
//DBG_88E("Add id %d val %08x to ratr for bmc sta\n", psta->aid, tx_ra_bitmap);
|
||||
//ap mode
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, _TRUE);
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, true);
|
||||
|
||||
//if (pHalData->fw_ractrl == _TRUE)
|
||||
//if (pHalData->fw_ractrl == true)
|
||||
{
|
||||
u8 arg = 0;
|
||||
|
||||
|
@ -747,7 +747,7 @@ static void update_bmc_sta(_adapter *padapter)
|
|||
|
||||
arg |= BIT(7);
|
||||
|
||||
//if (shortGIrate==_TRUE)
|
||||
//if (shortGIrate==true)
|
||||
// arg |= BIT(5);
|
||||
|
||||
tx_ra_bitmap |= ((raid<<28)&0xf0000000);
|
||||
|
@ -805,12 +805,12 @@ void update_sta_info_apmode(_adapter *padapter, struct sta_info *psta)
|
|||
DBG_88E("%s\n",__func__);
|
||||
|
||||
//ap mode
|
||||
rtw_hal_set_odm_var(padapter,HAL_ODM_STA_INFO,psta,_TRUE);
|
||||
rtw_hal_set_odm_var(padapter,HAL_ODM_STA_INFO,psta,true);
|
||||
|
||||
if (psecuritypriv->dot11AuthAlgrthm==dot11AuthAlgrthm_8021X)
|
||||
psta->ieee8021x_blocked = _TRUE;
|
||||
psta->ieee8021x_blocked = true;
|
||||
else
|
||||
psta->ieee8021x_blocked = _FALSE;
|
||||
psta->ieee8021x_blocked = false;
|
||||
|
||||
|
||||
//update sta's cap
|
||||
|
@ -827,7 +827,7 @@ void update_sta_info_apmode(_adapter *padapter, struct sta_info *psta)
|
|||
//check if sta support s Short GI
|
||||
if ((phtpriv_sta->ht_cap.cap_info & phtpriv_ap->ht_cap.cap_info) & cpu_to_le16(IEEE80211_HT_CAP_SGI_20|IEEE80211_HT_CAP_SGI_40))
|
||||
{
|
||||
phtpriv_sta->sgi = _TRUE;
|
||||
phtpriv_sta->sgi = true;
|
||||
}
|
||||
|
||||
// bwmode
|
||||
|
@ -839,14 +839,14 @@ void update_sta_info_apmode(_adapter *padapter, struct sta_info *psta)
|
|||
|
||||
}
|
||||
|
||||
psta->qos_option = _TRUE;
|
||||
psta->qos_option = true;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
phtpriv_sta->ampdu_enable = _FALSE;
|
||||
phtpriv_sta->ampdu_enable = false;
|
||||
|
||||
phtpriv_sta->sgi = _FALSE;
|
||||
phtpriv_sta->sgi = false;
|
||||
phtpriv_sta->bwmode = HT_CHANNEL_WIDTH_20;
|
||||
phtpriv_sta->ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
|
||||
}
|
||||
|
@ -954,28 +954,28 @@ static void start_bss_network(_adapter *padapter, u8 *pbuf)
|
|||
//and at first time the security ie ( RSN/WPA IE) will not include in beacon.
|
||||
if (NULL == rtw_get_wps_ie(pnetwork->IEs+_FIXED_IE_LENGTH_, pnetwork->IELength-_FIXED_IE_LENGTH_, NULL, NULL))
|
||||
{
|
||||
pmlmeext->bstart_bss = _TRUE;
|
||||
pmlmeext->bstart_bss = true;
|
||||
}
|
||||
|
||||
//todo: update wmm, ht cap
|
||||
//pmlmeinfo->WMM_enable;
|
||||
//pmlmeinfo->HT_enable;
|
||||
if (pmlmepriv->qospriv.qos_option)
|
||||
pmlmeinfo->WMM_enable = _TRUE;
|
||||
pmlmeinfo->WMM_enable = true;
|
||||
#ifdef CONFIG_80211N_HT
|
||||
if (pmlmepriv->htpriv.ht_option)
|
||||
{
|
||||
pmlmeinfo->WMM_enable = _TRUE;
|
||||
pmlmeinfo->HT_enable = _TRUE;
|
||||
//pmlmeinfo->HT_info_enable = _TRUE;
|
||||
//pmlmeinfo->HT_caps_enable = _TRUE;
|
||||
pmlmeinfo->WMM_enable = true;
|
||||
pmlmeinfo->HT_enable = true;
|
||||
//pmlmeinfo->HT_info_enable = true;
|
||||
//pmlmeinfo->HT_caps_enable = true;
|
||||
|
||||
update_hw_ht_param(padapter);
|
||||
}
|
||||
#endif //#CONFIG_80211N_HT
|
||||
|
||||
|
||||
if (pmlmepriv->cur_network.join_res != _TRUE) //setting only at first time
|
||||
if (pmlmepriv->cur_network.join_res != true) //setting only at first time
|
||||
{
|
||||
//WEP Key will be set before this function, do not clear CAM.
|
||||
if ((psecuritypriv->dot11PrivacyAlgrthm != _WEP40_) && (psecuritypriv->dot11PrivacyAlgrthm != _WEP104_))
|
||||
|
@ -1014,7 +1014,7 @@ static void start_bss_network(_adapter *padapter, u8 *pbuf)
|
|||
UpdateBrateTbl(padapter, pnetwork->SupportedRates);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_BASIC_RATE, pnetwork->SupportedRates);
|
||||
|
||||
if (pmlmepriv->cur_network.join_res != _TRUE) //setting only at first time
|
||||
if (pmlmepriv->cur_network.join_res != true) //setting only at first time
|
||||
{
|
||||
//u32 initialgain;
|
||||
|
||||
|
@ -1023,7 +1023,7 @@ static void start_bss_network(_adapter *padapter, u8 *pbuf)
|
|||
|
||||
//disable dynamic functions, such as high power, DIG
|
||||
//Save_DM_Func_Flag(padapter);
|
||||
//Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _FALSE);
|
||||
//Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, false);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->adapter_type > PRIMARY_ADAPTER)
|
||||
|
@ -1033,7 +1033,7 @@ static void start_bss_network(_adapter *padapter, u8 *pbuf)
|
|||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
|
||||
//turn on all dynamic functions on PRIMARY_ADAPTER, dynamic functions only runs at PRIMARY_ADAPTER
|
||||
Switch_DM_Func(pbuddy_adapter, DYNAMIC_ALL_FUNC_ENABLE, _TRUE);
|
||||
Switch_DM_Func(pbuddy_adapter, DYNAMIC_ALL_FUNC_ENABLE, true);
|
||||
|
||||
//rtw_hal_set_hwreg(pbuddy_adapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain));
|
||||
}
|
||||
|
@ -1042,7 +1042,7 @@ static void start_bss_network(_adapter *padapter, u8 *pbuf)
|
|||
#endif
|
||||
{
|
||||
//turn on all dynamic functions
|
||||
Switch_DM_Func(padapter, DYNAMIC_ALL_FUNC_ENABLE, _TRUE);
|
||||
Switch_DM_Func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true);
|
||||
|
||||
//rtw_hal_set_hwreg(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain));
|
||||
}
|
||||
|
@ -1092,7 +1092,7 @@ static void start_bss_network(_adapter *padapter, u8 *pbuf)
|
|||
{
|
||||
set_channel_bwmode(padapter, cur_channel, cur_ch_offset, cur_bwmode);
|
||||
}
|
||||
else if (check_buddy_fwstate(padapter, _FW_LINKED)==_TRUE)//only second adapter can enter AP Mode
|
||||
else if (check_buddy_fwstate(padapter, _FW_LINKED)==true)//only second adapter can enter AP Mode
|
||||
{
|
||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
|
@ -1194,9 +1194,9 @@ static void start_bss_network(_adapter *padapter, u8 *pbuf)
|
|||
pwdinfo->p2p_group_ssid_len = pnetwork->Ssid.SsidLength;
|
||||
#endif //CONFIG_P2P
|
||||
|
||||
if (_TRUE == pmlmeext->bstart_bss)
|
||||
if (true == pmlmeext->bstart_bss)
|
||||
{
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, false);
|
||||
|
||||
#ifndef CONFIG_INTERRUPT_BASED_TXBCN //other case will tx beacon when bcn interrupt coming in.
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
|
@ -1214,7 +1214,7 @@ static void start_bss_network(_adapter *padapter, u8 *pbuf)
|
|||
//update bc/mc sta_info
|
||||
update_bmc_sta(padapter);
|
||||
|
||||
//pmlmeext->bstart_bss = _TRUE;
|
||||
//pmlmeext->bstart_bss = true;
|
||||
|
||||
}
|
||||
|
||||
|
@ -1225,7 +1225,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
|||
u8 *pHT_caps_ie=NULL;
|
||||
u8 *pHT_info_ie=NULL;
|
||||
struct sta_info *psta = NULL;
|
||||
u16 cap, ht_cap=_FALSE;
|
||||
u16 cap, ht_cap=false;
|
||||
uint ie_len = 0;
|
||||
int group_cipher, pairwise_cipher;
|
||||
u8 channel, network_type, supportRate[NDIS_802_11_LENGTH_RATES_EX];
|
||||
|
@ -1254,7 +1254,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
|||
|
||||
DBG_88E("%s, len=%d\n", __func__, len);
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true)
|
||||
return _FAIL;
|
||||
|
||||
|
||||
|
@ -1429,7 +1429,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
|||
pHT_caps_ie=p;
|
||||
|
||||
|
||||
ht_cap = _TRUE;
|
||||
ht_cap = true;
|
||||
network_type |= WIRELESS_11_24N;
|
||||
|
||||
|
||||
|
@ -1486,24 +1486,24 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
|||
pmlmepriv->cur_network.network_type = network_type;
|
||||
|
||||
#ifdef CONFIG_80211N_HT
|
||||
pmlmepriv->htpriv.ht_option = _FALSE;
|
||||
pmlmepriv->htpriv.ht_option = false;
|
||||
|
||||
if ( (psecuritypriv->wpa2_pairwise_cipher&WPA_CIPHER_TKIP) ||
|
||||
(psecuritypriv->wpa_pairwise_cipher&WPA_CIPHER_TKIP))
|
||||
{
|
||||
//todo:
|
||||
//ht_cap = _FALSE;
|
||||
//ht_cap = false;
|
||||
}
|
||||
|
||||
//ht_cap
|
||||
if (pregistrypriv->ht_enable && ht_cap==_TRUE)
|
||||
if (pregistrypriv->ht_enable && ht_cap==true)
|
||||
{
|
||||
pmlmepriv->htpriv.ht_option = _TRUE;
|
||||
pmlmepriv->htpriv.ht_option = true;
|
||||
pmlmepriv->qospriv.qos_option = 1;
|
||||
|
||||
if (pregistrypriv->ampdu_enable==1)
|
||||
{
|
||||
pmlmepriv->htpriv.ampdu_enable = _TRUE;
|
||||
pmlmepriv->htpriv.ampdu_enable = true;
|
||||
}
|
||||
|
||||
HT_caps_handler(padapter, (PNDIS_802_11_VARIABLE_IEs)pHT_caps_ie);
|
||||
|
@ -1532,7 +1532,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
|||
psta->state |= WIFI_AP_STATE; //Aries, add,fix bug of flush_cam_entry at STOP AP mode , 0724
|
||||
rtw_indicate_connect( padapter);
|
||||
|
||||
pmlmepriv->cur_network.join_res = _TRUE;//for check if already set beacon
|
||||
pmlmepriv->cur_network.join_res = true;//for check if already set beacon
|
||||
|
||||
//update bc/mc sta_info
|
||||
//update_bmc_sta(padapter);
|
||||
|
@ -1555,7 +1555,7 @@ int rtw_acl_add_sta(_adapter *padapter, u8 *addr)
|
|||
{
|
||||
_irqL irqL;
|
||||
_list *plist, *phead;
|
||||
u8 added = _FALSE;
|
||||
u8 added = false;
|
||||
int i, ret=0;
|
||||
struct rtw_wlan_acl_node *paclnode;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
|
@ -1573,16 +1573,16 @@ int rtw_acl_add_sta(_adapter *padapter, u8 *addr)
|
|||
phead = get_list_head(pacl_node_q);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
paclnode = LIST_CONTAINOR(plist, struct rtw_wlan_acl_node, list);
|
||||
plist = get_next(plist);
|
||||
|
||||
if (_rtw_memcmp(paclnode->addr, addr, ETH_ALEN))
|
||||
{
|
||||
if (paclnode->valid == _TRUE)
|
||||
if (paclnode->valid == true)
|
||||
{
|
||||
added = _TRUE;
|
||||
added = true;
|
||||
DBG_88E("%s, sta has been added\n", __func__);
|
||||
break;
|
||||
}
|
||||
|
@ -1592,7 +1592,7 @@ int rtw_acl_add_sta(_adapter *padapter, u8 *addr)
|
|||
_exit_critical_bh(&(pacl_node_q->lock), &irqL);
|
||||
|
||||
|
||||
if (added == _TRUE)
|
||||
if (added == true)
|
||||
return ret;
|
||||
|
||||
|
||||
|
@ -1602,13 +1602,13 @@ int rtw_acl_add_sta(_adapter *padapter, u8 *addr)
|
|||
{
|
||||
paclnode = &pacl_list->aclnode[i];
|
||||
|
||||
if (paclnode->valid == _FALSE)
|
||||
if (paclnode->valid == false)
|
||||
{
|
||||
_rtw_init_listhead(&paclnode->list);
|
||||
|
||||
_rtw_memcpy(paclnode->addr, addr, ETH_ALEN);
|
||||
|
||||
paclnode->valid = _TRUE;
|
||||
paclnode->valid = true;
|
||||
|
||||
rtw_list_insert_tail(&paclnode->list, get_list_head(pacl_node_q));
|
||||
|
||||
|
@ -1642,16 +1642,16 @@ int rtw_acl_remove_sta(_adapter *padapter, u8 *addr)
|
|||
phead = get_list_head(pacl_node_q);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
paclnode = LIST_CONTAINOR(plist, struct rtw_wlan_acl_node, list);
|
||||
plist = get_next(plist);
|
||||
|
||||
if (_rtw_memcmp(paclnode->addr, addr, ETH_ALEN))
|
||||
{
|
||||
if (paclnode->valid == _TRUE)
|
||||
if (paclnode->valid == true)
|
||||
{
|
||||
paclnode->valid = _FALSE;
|
||||
paclnode->valid = false;
|
||||
|
||||
rtw_list_delete(&paclnode->list);
|
||||
|
||||
|
@ -1846,7 +1846,7 @@ void update_beacon(_adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
|
|||
pmlmeext = &(padapter->mlmeextpriv);
|
||||
//pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
||||
if (_FALSE == pmlmeext->bstart_bss)
|
||||
if (false == pmlmeext->bstart_bss)
|
||||
return;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->bcn_update_lock, &irqL);
|
||||
|
@ -1899,7 +1899,7 @@ void update_beacon(_adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
|
|||
break;
|
||||
}
|
||||
|
||||
pmlmepriv->update_bcn = _TRUE;
|
||||
pmlmepriv->update_bcn = true;
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->bcn_update_lock, &irqL);
|
||||
|
||||
|
@ -1940,7 +1940,7 @@ static int rtw_ht_operation_update(_adapter *padapter)
|
|||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
struct ht_priv *phtpriv_ap = &pmlmepriv->htpriv;
|
||||
|
||||
if (pmlmepriv->htpriv.ht_option == _TRUE)
|
||||
if (pmlmepriv->htpriv.ht_option == true)
|
||||
return 0;
|
||||
|
||||
//if (!iface->conf->ieee80211n || iface->conf->ht_op_mode_fixed)
|
||||
|
@ -2009,7 +2009,7 @@ static int rtw_ht_operation_update(_adapter *padapter)
|
|||
void associated_clients_update(_adapter *padapter, u8 updated)
|
||||
{
|
||||
//update associcated stations cap.
|
||||
if (updated == _TRUE)
|
||||
if (updated == true)
|
||||
{
|
||||
_irqL irqL;
|
||||
_list *phead, *plist;
|
||||
|
@ -2022,7 +2022,7 @@ void associated_clients_update(_adapter *padapter, u8 updated)
|
|||
plist = get_next(phead);
|
||||
|
||||
//check asoc_queue
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
|
||||
|
||||
|
@ -2040,7 +2040,7 @@ void associated_clients_update(_adapter *padapter, u8 updated)
|
|||
/* called > TSR LEVEL for USB or SDIO Interface*/
|
||||
void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
||||
{
|
||||
u8 beacon_updated = _FALSE;
|
||||
u8 beacon_updated = false;
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
|
||||
|
@ -2055,8 +2055,8 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
|||
if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
|
||||
(pmlmepriv->num_sta_no_short_preamble == 1))
|
||||
{
|
||||
beacon_updated = _TRUE;
|
||||
update_beacon(padapter, 0xFF, NULL, _TRUE);
|
||||
beacon_updated = true;
|
||||
update_beacon(padapter, 0xFF, NULL, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2072,8 +2072,8 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
|||
if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
|
||||
(pmlmepriv->num_sta_no_short_preamble == 0))
|
||||
{
|
||||
beacon_updated = _TRUE;
|
||||
update_beacon(padapter, 0xFF, NULL, _TRUE);
|
||||
beacon_updated = true;
|
||||
update_beacon(padapter, 0xFF, NULL, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2089,8 +2089,8 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
|||
|
||||
if (pmlmepriv->num_sta_non_erp == 1)
|
||||
{
|
||||
beacon_updated = _TRUE;
|
||||
update_beacon(padapter, _ERPINFO_IE_, NULL, _TRUE);
|
||||
beacon_updated = true;
|
||||
update_beacon(padapter, _ERPINFO_IE_, NULL, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2105,8 +2105,8 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
|||
|
||||
if (pmlmepriv->num_sta_non_erp == 0)
|
||||
{
|
||||
beacon_updated = _TRUE;
|
||||
update_beacon(padapter, _ERPINFO_IE_, NULL, _TRUE);
|
||||
beacon_updated = true;
|
||||
update_beacon(padapter, _ERPINFO_IE_, NULL, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2123,8 +2123,8 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
|||
if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
|
||||
(pmlmepriv->num_sta_no_short_slot_time == 1))
|
||||
{
|
||||
beacon_updated = _TRUE;
|
||||
update_beacon(padapter, 0xFF, NULL, _TRUE);
|
||||
beacon_updated = true;
|
||||
update_beacon(padapter, 0xFF, NULL, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2140,8 +2140,8 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
|||
if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
|
||||
(pmlmepriv->num_sta_no_short_slot_time == 0))
|
||||
{
|
||||
beacon_updated = _TRUE;
|
||||
update_beacon(padapter, 0xFF, NULL, _TRUE);
|
||||
beacon_updated = true;
|
||||
update_beacon(padapter, 0xFF, NULL, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2189,7 +2189,7 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
|||
psta->no_ht_set = 1;
|
||||
pmlmepriv->num_sta_no_ht++;
|
||||
}
|
||||
if (pmlmepriv->htpriv.ht_option == _TRUE) {
|
||||
if (pmlmepriv->htpriv.ht_option == true) {
|
||||
DBG_88E("%s STA " MAC_FMT
|
||||
" - no HT, num of non-HT stations %d\n",
|
||||
__func__, MAC_ARG(psta->hwaddr),
|
||||
|
@ -2199,8 +2199,8 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
|||
|
||||
if (rtw_ht_operation_update(padapter) > 0)
|
||||
{
|
||||
update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, _TRUE);
|
||||
update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, false);
|
||||
update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, true);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_80211N_HT */
|
||||
|
@ -2214,7 +2214,7 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
|||
|
||||
u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta)
|
||||
{
|
||||
u8 beacon_updated = _FALSE;
|
||||
u8 beacon_updated = false;
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
|
||||
|
@ -2227,8 +2227,8 @@ u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta)
|
|||
if (pmlmeext->cur_wireless_mode > WIRELESS_11B
|
||||
&& pmlmepriv->num_sta_no_short_preamble == 0)
|
||||
{
|
||||
beacon_updated = _TRUE;
|
||||
update_beacon(padapter, 0xFF, NULL, _TRUE);
|
||||
beacon_updated = true;
|
||||
update_beacon(padapter, 0xFF, NULL, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2237,8 +2237,8 @@ u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta)
|
|||
pmlmepriv->num_sta_non_erp--;
|
||||
if (pmlmepriv->num_sta_non_erp == 0)
|
||||
{
|
||||
beacon_updated = _TRUE;
|
||||
update_beacon(padapter, _ERPINFO_IE_, NULL, _TRUE);
|
||||
beacon_updated = true;
|
||||
update_beacon(padapter, _ERPINFO_IE_, NULL, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2248,8 +2248,8 @@ u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta)
|
|||
if (pmlmeext->cur_wireless_mode > WIRELESS_11B
|
||||
&& pmlmepriv->num_sta_no_short_slot_time == 0)
|
||||
{
|
||||
beacon_updated = _TRUE;
|
||||
update_beacon(padapter, 0xFF, NULL, _TRUE);
|
||||
beacon_updated = true;
|
||||
update_beacon(padapter, 0xFF, NULL, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2272,8 +2272,8 @@ u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta)
|
|||
|
||||
if (rtw_ht_operation_update(padapter) > 0)
|
||||
{
|
||||
update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, _TRUE);
|
||||
update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, false);
|
||||
update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, true);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_80211N_HT */
|
||||
|
@ -2290,7 +2290,7 @@ u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta)
|
|||
u8 ap_free_sta(_adapter *padapter, struct sta_info *psta, bool active, u16 reason)
|
||||
{
|
||||
_irqL irqL;
|
||||
u8 beacon_updated = _FALSE;
|
||||
u8 beacon_updated = false;
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
|
@ -2308,14 +2308,14 @@ u8 ap_free_sta(_adapter *padapter, struct sta_info *psta, bool active, u16 reaso
|
|||
psta->htpriv.candidate_tid_bitmap = 0x0;//reset
|
||||
#endif //CONFIG_80211N_HT
|
||||
|
||||
if (active == _TRUE)
|
||||
if (active == true)
|
||||
issue_deauth(padapter, psta->hwaddr, reason);
|
||||
|
||||
//report_del_sta_event(padapter, psta->hwaddr, reason);
|
||||
|
||||
//clear cam entry / key
|
||||
//clear_cam_entry(padapter, (psta->mac_id + 3));
|
||||
rtw_clearstakey_cmd(padapter, (u8*)psta, (u8)(psta->mac_id + 3), _TRUE);
|
||||
rtw_clearstakey_cmd(padapter, (u8*)psta, (u8)(psta->mac_id + 3), true);
|
||||
|
||||
|
||||
_enter_critical_bh(&psta->lock, &irqL);
|
||||
|
@ -2372,7 +2372,7 @@ int rtw_ap_inform_ch_switch (_adapter *padapter, u8 new_ch, u8 ch_offset)
|
|||
plist = get_next(phead);
|
||||
|
||||
/* for each sta in asoc_queue */
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
|
||||
plist = get_next(plist);
|
||||
|
@ -2409,7 +2409,7 @@ int rtw_sta_flush(_adapter *padapter)
|
|||
plist = get_next(phead);
|
||||
|
||||
//free sta asoc_queue
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
|
||||
|
||||
|
@ -2419,7 +2419,7 @@ int rtw_sta_flush(_adapter *padapter)
|
|||
pstapriv->asoc_list_cnt--;
|
||||
|
||||
//_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
ap_free_sta(padapter, psta, _TRUE, WLAN_REASON_DEAUTH_LEAVING);
|
||||
ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
|
||||
//_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
|
@ -2427,7 +2427,7 @@ int rtw_sta_flush(_adapter *padapter)
|
|||
|
||||
issue_deauth(padapter, bc_addr, WLAN_REASON_DEAUTH_LEAVING);
|
||||
|
||||
associated_clients_update(padapter, _TRUE);
|
||||
associated_clients_update(padapter, true);
|
||||
|
||||
return ret;
|
||||
|
||||
|
@ -2454,16 +2454,16 @@ void sta_info_update(_adapter *padapter, struct sta_info *psta)
|
|||
//update 802.11n ht cap.
|
||||
if (WLAN_STA_HT&flags)
|
||||
{
|
||||
psta->htpriv.ht_option = _TRUE;
|
||||
psta->htpriv.ht_option = true;
|
||||
psta->qos_option = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
psta->htpriv.ht_option = _FALSE;
|
||||
psta->htpriv.ht_option = false;
|
||||
}
|
||||
|
||||
if (pmlmepriv->htpriv.ht_option == _FALSE)
|
||||
psta->htpriv.ht_option = _FALSE;
|
||||
if (pmlmepriv->htpriv.ht_option == false)
|
||||
psta->htpriv.ht_option = false;
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -2490,10 +2490,10 @@ void start_ap_mode(_adapter *padapter)
|
|||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
||||
|
||||
pmlmepriv->update_bcn = _FALSE;
|
||||
pmlmepriv->update_bcn = false;
|
||||
|
||||
//init_mlme_ap_info(padapter);
|
||||
pmlmeext->bstart_bss = _FALSE;
|
||||
pmlmeext->bstart_bss = false;
|
||||
|
||||
pmlmepriv->num_sta_non_erp = 0;
|
||||
|
||||
|
@ -2507,9 +2507,9 @@ void start_ap_mode(_adapter *padapter)
|
|||
#endif //CONFIG_80211N_HT
|
||||
pmlmepriv->num_sta_ht_20mhz = 0;
|
||||
|
||||
pmlmepriv->olbc = _FALSE;
|
||||
pmlmepriv->olbc = false;
|
||||
|
||||
pmlmepriv->olbc_ht = _FALSE;
|
||||
pmlmepriv->olbc_ht = false;
|
||||
|
||||
#ifdef CONFIG_80211N_HT
|
||||
pmlmepriv->ht_op_mode = 0;
|
||||
|
@ -2533,7 +2533,7 @@ void start_ap_mode(_adapter *padapter)
|
|||
for (i = 0; i < NUM_ACL; i++)
|
||||
{
|
||||
_rtw_init_listhead(&pacl_list->aclnode[i].list);
|
||||
pacl_list->aclnode[i].valid = _FALSE;
|
||||
pacl_list->aclnode[i].valid = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2550,8 +2550,8 @@ void stop_ap_mode(_adapter *padapter)
|
|||
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
||||
_queue *pacl_node_q =&pacl_list->acl_node_q;
|
||||
|
||||
pmlmepriv->update_bcn = _FALSE;
|
||||
pmlmeext->bstart_bss = _FALSE;
|
||||
pmlmepriv->update_bcn = false;
|
||||
pmlmeext->bstart_bss = false;
|
||||
//_rtw_spinlock_free(&pmlmepriv->bcn_update_lock);
|
||||
|
||||
//reset and init security priv , this can refine with rtw_reset_securitypriv
|
||||
|
@ -2563,14 +2563,14 @@ void stop_ap_mode(_adapter *padapter)
|
|||
_enter_critical_bh(&(pacl_node_q->lock), &irqL);
|
||||
phead = get_list_head(pacl_node_q);
|
||||
plist = get_next(phead);
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
paclnode = LIST_CONTAINOR(plist, struct rtw_wlan_acl_node, list);
|
||||
plist = get_next(plist);
|
||||
|
||||
if (paclnode->valid == _TRUE)
|
||||
if (paclnode->valid == true)
|
||||
{
|
||||
paclnode->valid = _FALSE;
|
||||
paclnode->valid = false;
|
||||
|
||||
rtw_list_delete(&paclnode->list);
|
||||
|
||||
|
|
116
core/rtw_cmd.c
116
core/rtw_cmd.c
|
@ -145,7 +145,7 @@ exit:
|
|||
|
||||
#ifdef CONFIG_C2H_WK
|
||||
_init_workitem(&pevtpriv->c2h_wk, c2h_wk_callback, NULL);
|
||||
pevtpriv->c2h_wk_alive = _FALSE;
|
||||
pevtpriv->c2h_wk_alive = false;
|
||||
pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN+1);
|
||||
#endif
|
||||
|
||||
|
@ -304,7 +304,7 @@ _func_exit_;
|
|||
int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj);
|
||||
int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
|
||||
{
|
||||
u8 bAllow = _FALSE; //set to _TRUE to allow enqueuing cmd when hw_init_completed is _FALSE
|
||||
u8 bAllow = false; //set to true to allow enqueuing cmd when hw_init_completed is false
|
||||
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
//To decide allow or not
|
||||
|
@ -318,17 +318,17 @@ int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
|
|||
if (pdrvextra_cmd_parm->ec_id == POWER_SAVING_CTRL_WK_CID)
|
||||
{
|
||||
//DBG_88E("==>enqueue POWER_SAVING_CTRL_WK_CID\n");
|
||||
bAllow = _TRUE;
|
||||
bAllow = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (cmd_obj->cmdcode == GEN_CMD_CODE(_SetChannelPlan))
|
||||
bAllow = _TRUE;
|
||||
bAllow = true;
|
||||
|
||||
if ( (pcmdpriv->padapter->hw_init_completed ==_FALSE && bAllow == _FALSE)
|
||||
|| pcmdpriv->cmdthd_running== _FALSE //com_thread not running
|
||||
if ( (pcmdpriv->padapter->hw_init_completed ==false && bAllow == false)
|
||||
|| pcmdpriv->cmdthd_running== false //com_thread not running
|
||||
)
|
||||
{
|
||||
//DBG_88E("%s:%s: drop cmdcode:%u, hw_init_completed:%u, cmdthd_running:%u\n", caller_func, __func__,
|
||||
|
@ -441,7 +441,7 @@ _func_enter_;
|
|||
pcmdbuf = pcmdpriv->cmd_buf;
|
||||
prspbuf = pcmdpriv->rsp_buf;
|
||||
|
||||
pcmdpriv->cmdthd_running=_TRUE;
|
||||
pcmdpriv->cmdthd_running=true;
|
||||
_rtw_up_sema(&pcmdpriv->terminate_cmdthread_sema);
|
||||
|
||||
RT_TRACE(_module_rtl871x_cmd_c_,_drv_info_,("start r871x rtw_cmd_thread !!!!\n"));
|
||||
|
@ -451,7 +451,7 @@ _func_enter_;
|
|||
if (_rtw_down_sema(&pcmdpriv->cmd_queue_sema) == _FAIL)
|
||||
break;
|
||||
|
||||
if ((padapter->bDriverStopped == _TRUE)||(padapter->bSurpriseRemoved == _TRUE))
|
||||
if ((padapter->bDriverStopped == true)||(padapter->bSurpriseRemoved == true))
|
||||
{
|
||||
DBG_88E("%s: DriverStopped(%d) SurpriseRemoved(%d) break at line %d\n",
|
||||
__func__, padapter->bDriverStopped, padapter->bSurpriseRemoved, __LINE__);
|
||||
|
@ -468,7 +468,7 @@ _func_enter_;
|
|||
#endif
|
||||
|
||||
_next:
|
||||
if ((padapter->bDriverStopped == _TRUE)||(padapter->bSurpriseRemoved== _TRUE))
|
||||
if ((padapter->bDriverStopped == true)||(padapter->bSurpriseRemoved== true))
|
||||
{
|
||||
DBG_88E("%s: DriverStopped(%d) SurpriseRemoved(%d) break at line %d\n",
|
||||
__func__, padapter->bDriverStopped, padapter->bSurpriseRemoved, __LINE__);
|
||||
|
@ -541,7 +541,7 @@ post_process:
|
|||
goto _next;
|
||||
|
||||
}
|
||||
pcmdpriv->cmdthd_running=_FALSE;
|
||||
pcmdpriv->cmdthd_running=false;
|
||||
|
||||
|
||||
// free all cmd_obj resources
|
||||
|
@ -700,13 +700,13 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num,
|
|||
_func_enter_;
|
||||
|
||||
#ifdef CONFIG_LPS
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE){
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true){
|
||||
rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_SCAN, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_P2P_PS
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
|
||||
p2p_ps_wk_cmd(padapter, P2P_PS_SCAN, 1);
|
||||
}
|
||||
#endif //CONFIG_P2P_PS
|
||||
|
@ -721,7 +721,7 @@ _func_enter_;
|
|||
return _FAIL;
|
||||
}
|
||||
|
||||
rtw_free_network_queue(padapter, _FALSE);
|
||||
rtw_free_network_queue(padapter, false);
|
||||
|
||||
RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("%s: flush network queue\n", __func__));
|
||||
|
||||
|
@ -1049,7 +1049,7 @@ void rtw_getbbrfreg_cmdrsp_callback(_adapter* padapter, struct cmd_obj *pcmd)
|
|||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
padapter->mppriv.workparam.bcompleted= _TRUE;
|
||||
padapter->mppriv.workparam.bcompleted= true;
|
||||
#endif
|
||||
_func_exit_;
|
||||
}
|
||||
|
@ -1063,7 +1063,7 @@ void rtw_readtssi_cmdrsp_callback(_adapter* padapter, struct cmd_obj *pcmd)
|
|||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
padapter->mppriv.workparam.bcompleted= _TRUE;
|
||||
padapter->mppriv.workparam.bcompleted= true;
|
||||
#endif
|
||||
|
||||
_func_exit_;
|
||||
|
@ -1195,7 +1195,7 @@ _func_enter_;
|
|||
|
||||
|
||||
//for hidden ap to set fw_state here
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) != _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) != true)
|
||||
{
|
||||
switch (ndis_network_mode)
|
||||
{
|
||||
|
@ -1247,7 +1247,7 @@ _func_enter_;
|
|||
// If not, we have to copy the connecting AP's MAC address to it so that
|
||||
// the driver just has the bssid information for PMKIDList searching.
|
||||
|
||||
if ( pmlmepriv->assoc_by_bssid == _FALSE )
|
||||
if ( pmlmepriv->assoc_by_bssid == false )
|
||||
{
|
||||
_rtw_memcpy( &pmlmepriv->assoc_bssid[ 0 ], &pnetwork->network.MacAddress[ 0 ], ETH_ALEN );
|
||||
}
|
||||
|
@ -1275,7 +1275,7 @@ _func_enter_;
|
|||
}
|
||||
|
||||
#ifdef CONFIG_80211N_HT
|
||||
phtpriv->ht_option = _FALSE;
|
||||
phtpriv->ht_option = false;
|
||||
if (pregistrypriv->ht_enable)
|
||||
{
|
||||
// Added by Albert 2010/06/23
|
||||
|
@ -1393,14 +1393,14 @@ _func_enter_;
|
|||
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c==NULL){
|
||||
res= _FALSE;
|
||||
res= false;
|
||||
goto exit;
|
||||
}
|
||||
psetop = (struct setopmode_parm*)rtw_zmalloc(sizeof(struct setopmode_parm));
|
||||
|
||||
if (psetop==NULL){
|
||||
rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj));
|
||||
res=_FALSE;
|
||||
res=false;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
@ -1465,10 +1465,10 @@ _func_enter_;
|
|||
#endif //CONFIG_TDLS
|
||||
psetstakey_para->algorithm =(unsigned char) psecuritypriv->dot11PrivacyAlgrthm;
|
||||
}else{
|
||||
GET_ENCRY_ALGO(psecuritypriv, sta, psetstakey_para->algorithm, _FALSE);
|
||||
GET_ENCRY_ALGO(psecuritypriv, sta, psetstakey_para->algorithm, false);
|
||||
}
|
||||
|
||||
if (unicast_key == _TRUE) {
|
||||
if (unicast_key == true) {
|
||||
#ifdef CONFIG_TDLS
|
||||
if ((sta->tdls_sta_state&TDLS_LINKED_STATE)==TDLS_LINKED_STATE)
|
||||
_rtw_memcpy(&psetstakey_para->key, sta->tpk.tk, 16);
|
||||
|
@ -1480,7 +1480,7 @@ _func_enter_;
|
|||
}
|
||||
|
||||
//jeff: set this becasue at least sw key is ready
|
||||
padapter->securitypriv.busetkipkey=_TRUE;
|
||||
padapter->securitypriv.busetkipkey=true;
|
||||
|
||||
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
||||
|
||||
|
@ -1993,8 +1993,8 @@ static void traffic_status_watchdog(_adapter *padapter)
|
|||
#ifdef CONFIG_LPS
|
||||
u8 bEnterPS;
|
||||
#endif
|
||||
u8 bBusyTraffic = _FALSE, bTxBusyTraffic = _FALSE, bRxBusyTraffic = _FALSE;
|
||||
u8 bHigherBusyTraffic = _FALSE, bHigherBusyRxTraffic = _FALSE, bHigherBusyTxTraffic = _FALSE;
|
||||
u8 bBusyTraffic = false, bTxBusyTraffic = false, bRxBusyTraffic = false;
|
||||
u8 bHigherBusyTraffic = false, bHigherBusyRxTraffic = false, bHigherBusyTxTraffic = false;
|
||||
#ifdef CONFIG_FTP_PROTECT
|
||||
u16 bPktCount = 0;
|
||||
#endif
|
||||
|
@ -2006,7 +2006,7 @@ static void traffic_status_watchdog(_adapter *padapter)
|
|||
//
|
||||
// Determine if our traffic is busy now
|
||||
//
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED)== _TRUE)
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED)== true)
|
||||
/*&& !MgntInitAdapterInProgress(pMgntInfo)*/)
|
||||
{
|
||||
|
||||
|
@ -2018,24 +2018,24 @@ static void traffic_status_watchdog(_adapter *padapter)
|
|||
pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > 100 )
|
||||
#endif // !CONFIG_BT_COEXIST
|
||||
{
|
||||
bBusyTraffic = _TRUE;
|
||||
bBusyTraffic = true;
|
||||
|
||||
if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > pmlmepriv->LinkDetectInfo.NumTxOkInPeriod)
|
||||
bRxBusyTraffic = _TRUE;
|
||||
bRxBusyTraffic = true;
|
||||
else
|
||||
bTxBusyTraffic = _TRUE;
|
||||
bTxBusyTraffic = true;
|
||||
}
|
||||
|
||||
// Higher Tx/Rx data.
|
||||
if ( pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > 4000 ||
|
||||
pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > 4000 )
|
||||
{
|
||||
bHigherBusyTraffic = _TRUE;
|
||||
bHigherBusyTraffic = true;
|
||||
|
||||
if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > pmlmepriv->LinkDetectInfo.NumTxOkInPeriod)
|
||||
bHigherBusyRxTraffic = _TRUE;
|
||||
bHigherBusyRxTraffic = true;
|
||||
else
|
||||
bHigherBusyTxTraffic = _TRUE;
|
||||
bHigherBusyTxTraffic = true;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FTP_PROTECT
|
||||
|
@ -2064,7 +2064,7 @@ static void traffic_status_watchdog(_adapter *padapter)
|
|||
|
||||
#ifdef CONFIG_LPS
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if (BT_1Ant(padapter) == _FALSE)
|
||||
if (BT_1Ant(padapter) == false)
|
||||
#endif
|
||||
{
|
||||
// check traffic for powersaving.
|
||||
|
@ -2072,11 +2072,11 @@ static void traffic_status_watchdog(_adapter *padapter)
|
|||
(pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod > 2) )
|
||||
{
|
||||
//DBG_88E("Tx = %d, Rx = %d\n",pmlmepriv->LinkDetectInfo.NumTxOkInPeriod,pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod);
|
||||
bEnterPS= _FALSE;
|
||||
bEnterPS= false;
|
||||
}
|
||||
else
|
||||
{
|
||||
bEnterPS= _TRUE;
|
||||
bEnterPS= true;
|
||||
}
|
||||
|
||||
// LeisurePS only work in infra mode.
|
||||
|
@ -2119,7 +2119,7 @@ void dynamic_chk_wk_hdl(_adapter *padapter, u8 *pbuf, int sz)
|
|||
|
||||
#ifdef CONFIG_ACTIVE_KEEP_ALIVE_CHECK
|
||||
#ifdef CONFIG_AP_MODE
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||
{
|
||||
expire_timeout_chk(padapter);
|
||||
}
|
||||
|
@ -2130,7 +2130,7 @@ void dynamic_chk_wk_hdl(_adapter *padapter, u8 *pbuf, int sz)
|
|||
rtw_hal_sreset_xmit_status_check(padapter);
|
||||
#endif
|
||||
|
||||
//if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING|_FW_UNDER_SURVEY)==_FALSE)
|
||||
//if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING|_FW_UNDER_SURVEY)==false)
|
||||
{
|
||||
linked_status_chk(padapter);
|
||||
traffic_status_watchdog(padapter);
|
||||
|
@ -2159,8 +2159,8 @@ void lps_ctrl_wk_hdl(_adapter *padapter, u8 lps_ctrl_type)
|
|||
|
||||
_func_enter_;
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)
|
||||
|| (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE))
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)
|
||||
|| (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -2170,11 +2170,11 @@ _func_enter_;
|
|||
case LPS_CTRL_SCAN:
|
||||
//DBG_88E("LPS_CTRL_SCAN\n");
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
BT_WifiScanNotify(padapter, _TRUE);
|
||||
if (BT_1Ant(padapter) == _FALSE)
|
||||
BT_WifiScanNotify(padapter, true);
|
||||
if (BT_1Ant(padapter) == false)
|
||||
#endif
|
||||
{
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
{ //connect
|
||||
LPS_Leave(padapter);
|
||||
}
|
||||
|
@ -2199,7 +2199,7 @@ _func_enter_;
|
|||
mstatus = 0;//disconnect
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
BT_WifiMediaStatusNotify(padapter, mstatus);
|
||||
if (BT_1Ant(padapter) == _FALSE)
|
||||
if (BT_1Ant(padapter) == false)
|
||||
#endif
|
||||
{
|
||||
LPS_Leave(padapter);
|
||||
|
@ -2211,7 +2211,7 @@ _func_enter_;
|
|||
pwrpriv->DelayLPSLastTimeStamp = rtw_get_current_time();
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
BT_SpecialPacketNotify(padapter);
|
||||
if (BT_1Ant(padapter) == _FALSE)
|
||||
if (BT_1Ant(padapter) == false)
|
||||
#endif
|
||||
{
|
||||
LPS_Leave(padapter);
|
||||
|
@ -2221,7 +2221,7 @@ _func_enter_;
|
|||
//DBG_88E("LPS_CTRL_LEAVE\n");
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
BT_LpsLeave(padapter);
|
||||
if (BT_1Ant(padapter) == _FALSE)
|
||||
if (BT_1Ant(padapter) == false)
|
||||
#endif
|
||||
{
|
||||
LPS_Leave(padapter);
|
||||
|
@ -2340,14 +2340,14 @@ u8 rtw_antenna_select_cmd(_adapter*padapter, u8 antenna,u8 enqueue)
|
|||
struct cmd_obj *ph2c;
|
||||
struct drvextra_cmd_parm *pdrvextra_cmd_parm;
|
||||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||
u8 bSupportAntDiv = _FALSE;
|
||||
u8 bSupportAntDiv = false;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
_func_enter_;
|
||||
rtw_hal_get_def_var(padapter, HAL_DEF_IS_SUPPORT_ANT_DIV, &(bSupportAntDiv));
|
||||
if (_FALSE == bSupportAntDiv ) return res;
|
||||
if (false == bSupportAntDiv ) return res;
|
||||
|
||||
if (_TRUE == enqueue)
|
||||
if (true == enqueue)
|
||||
{
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c==NULL){
|
||||
|
@ -2495,7 +2495,7 @@ static void rtw_chk_hi_queue_hdl(_adapter *padapter)
|
|||
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &val);
|
||||
|
||||
while (_FALSE == val)
|
||||
while (false == val)
|
||||
{
|
||||
rtw_msleep_os(100);
|
||||
|
||||
|
@ -2512,7 +2512,7 @@ static void rtw_chk_hi_queue_hdl(_adapter *padapter)
|
|||
pstapriv->tim_bitmap &= ~BIT(0);
|
||||
pstapriv->sta_dz_bitmap &= ~BIT(0);
|
||||
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, false);
|
||||
}
|
||||
else //re check again
|
||||
{
|
||||
|
@ -2601,14 +2601,14 @@ static s32 c2h_evt_hdl(_adapter *adapter, struct c2h_evt_hdr *c2h_evt, c2h_id_fi
|
|||
if (c2h_evt_read(adapter, buf) == _SUCCESS) {
|
||||
c2h_evt = (struct c2h_evt_hdr *)buf;
|
||||
|
||||
if (filter && filter(c2h_evt->id) == _FALSE)
|
||||
if (filter && filter(c2h_evt->id) == false)
|
||||
goto exit;
|
||||
|
||||
ret = rtw_hal_c2h_handler(adapter, c2h_evt);
|
||||
}
|
||||
} else {
|
||||
|
||||
if (filter && filter(c2h_evt->id) == _FALSE)
|
||||
if (filter && filter(c2h_evt->id) == false)
|
||||
goto exit;
|
||||
|
||||
ret = rtw_hal_c2h_handler(adapter, c2h_evt);
|
||||
|
@ -2625,7 +2625,7 @@ static void c2h_wk_callback(_workitem *work)
|
|||
struct c2h_evt_hdr *c2h_evt;
|
||||
c2h_id_filter ccx_id_filter = rtw_hal_c2h_id_filter_ccx(adapter);
|
||||
|
||||
evtpriv->c2h_wk_alive = _TRUE;
|
||||
evtpriv->c2h_wk_alive = true;
|
||||
|
||||
while (!rtw_cbuf_empty(evtpriv->c2h_queue)) {
|
||||
if ((c2h_evt = (struct c2h_evt_hdr *)rtw_cbuf_pop(evtpriv->c2h_queue)) != NULL) {
|
||||
|
@ -2646,7 +2646,7 @@ static void c2h_wk_callback(_workitem *work)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (ccx_id_filter(c2h_evt->id) == _TRUE) {
|
||||
if (ccx_id_filter(c2h_evt->id) == true) {
|
||||
/* Handle CCX report here */
|
||||
rtw_hal_c2h_handler(adapter, c2h_evt);
|
||||
rtw_mfree((u8*)c2h_evt, 16);
|
||||
|
@ -2656,7 +2656,7 @@ static void c2h_wk_callback(_workitem *work)
|
|||
}
|
||||
}
|
||||
|
||||
evtpriv->c2h_wk_alive = _FALSE;
|
||||
evtpriv->c2h_wk_alive = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -2886,7 +2886,7 @@ _func_enter_;
|
|||
|
||||
pnetwork->Length = get_WLAN_BSSID_EX_sz(pnetwork);
|
||||
_rtw_memcpy(&(pwlan->network), pnetwork, pnetwork->Length);
|
||||
//pwlan->fixed = _TRUE;
|
||||
//pwlan->fixed = true;
|
||||
|
||||
//rtw_list_insert_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue);
|
||||
|
||||
|
@ -2960,7 +2960,7 @@ _func_enter_;
|
|||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE) && (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == _TRUE))
|
||||
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) && (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true))
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||
|
||||
set_fwstate(pmlmepriv, _FW_LINKED);
|
||||
|
@ -2980,7 +2980,7 @@ _func_enter_;
|
|||
rtw_free_cmd_obj(pcmd);
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
padapter->mppriv.workparam.bcompleted=_TRUE;
|
||||
padapter->mppriv.workparam.bcompleted=true;
|
||||
#endif
|
||||
|
||||
_func_exit_;
|
||||
|
|
|
@ -978,7 +978,7 @@ int proc_get_all_sta_info(char *page, char **start,
|
|||
phead = &(pstapriv->sta_hash[i]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
|
||||
|
|
|
@ -63,14 +63,14 @@ Efuse_Read1ByteFromFakeContent(
|
|||
{
|
||||
if (Offset >= EFUSE_MAX_HW_SIZE)
|
||||
{
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
//DbgPrint("Read fake content, offset = %d\n", Offset);
|
||||
if (fakeEfuseBank == 0)
|
||||
*Value = fakeEfuseContent[Offset];
|
||||
else
|
||||
*Value = fakeBTEfuseContent[fakeEfuseBank-1][Offset];
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -86,7 +86,7 @@ Efuse_Write1ByteToFakeContent(
|
|||
{
|
||||
if (Offset >= EFUSE_MAX_HW_SIZE)
|
||||
{
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
if (fakeEfuseBank == 0)
|
||||
fakeEfuseContent[Offset] = Value;
|
||||
|
@ -94,7 +94,7 @@ Efuse_Write1ByteToFakeContent(
|
|||
{
|
||||
fakeBTEfuseContent[fakeEfuseBank-1][Offset] = Value;
|
||||
}
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
@ -305,7 +305,7 @@ EFUSE_Read1Byte(
|
|||
u32 k=0;
|
||||
u16 contentLen=0;
|
||||
|
||||
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI , TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&contentLen, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI , TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&contentLen, false);
|
||||
|
||||
if (Address < contentLen) //E-fuse 512Byte
|
||||
{
|
||||
|
@ -376,7 +376,7 @@ EFUSE_Write1Byte(
|
|||
u16 contentLen=0;
|
||||
|
||||
//RT_TRACE(COMP_EFUSE, DBG_LOUD, ("Addr=%x Data =%x\n", Address, Value));
|
||||
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI , TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&contentLen, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI , TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&contentLen, false);
|
||||
|
||||
if ( Address < contentLen) //E-fuse 512Byte
|
||||
{
|
||||
|
@ -442,12 +442,12 @@ efuse_OneByteRead(
|
|||
if (tmpidx<100)
|
||||
{
|
||||
*data=rtw_read8(pAdapter, EFUSE_CTRL);
|
||||
bResult = _TRUE;
|
||||
bResult = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
*data = 0xff;
|
||||
bResult = _FALSE;
|
||||
bResult = false;
|
||||
}
|
||||
return bResult;
|
||||
}
|
||||
|
@ -487,11 +487,11 @@ efuse_OneByteWrite(
|
|||
|
||||
if (tmpidx<100)
|
||||
{
|
||||
bResult = _TRUE;
|
||||
bResult = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
bResult = _FALSE;
|
||||
bResult = false;
|
||||
}
|
||||
|
||||
return bResult;
|
||||
|
@ -600,12 +600,12 @@ Efuse_WordEnableDataWrite( PADAPTER pAdapter,
|
|||
|
||||
static u8 efuse_read8(PADAPTER padapter, u16 address, u8 *value)
|
||||
{
|
||||
return efuse_OneByteRead(padapter,address, value, _FALSE);
|
||||
return efuse_OneByteRead(padapter,address, value, false);
|
||||
}
|
||||
|
||||
static u8 efuse_write8(PADAPTER padapter, u16 address, u8 *value)
|
||||
{
|
||||
return efuse_OneByteWrite(padapter,address, *value, _FALSE);
|
||||
return efuse_OneByteWrite(padapter,address, *value, false);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -618,20 +618,20 @@ u8 rtw_efuse_access(PADAPTER padapter, u8 bWrite, u16 start_addr, u16 cnts, u8 *
|
|||
u8 res = _FAIL ;
|
||||
u8 (*rw8)(PADAPTER, u16, u8*);
|
||||
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&real_content_len, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&real_content_len, false);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
|
||||
|
||||
if (start_addr > real_content_len)
|
||||
return _FAIL;
|
||||
|
||||
if (_TRUE == bWrite) {
|
||||
if (true == bWrite) {
|
||||
if ((start_addr + cnts) > max_available_size)
|
||||
return _FAIL;
|
||||
rw8 = &efuse_write8;
|
||||
} else
|
||||
rw8 = &efuse_read8;
|
||||
|
||||
Efuse_PowerSwitch(padapter, bWrite, _TRUE);
|
||||
Efuse_PowerSwitch(padapter, bWrite, true);
|
||||
|
||||
// e-fuse one byte read / write
|
||||
for (i = 0; i < cnts; i++) {
|
||||
|
@ -644,7 +644,7 @@ u8 rtw_efuse_access(PADAPTER padapter, u8 bWrite, u16 start_addr, u16 cnts, u8 *
|
|||
if (_FAIL == res) break;
|
||||
}
|
||||
|
||||
Efuse_PowerSwitch(padapter, bWrite, _FALSE);
|
||||
Efuse_PowerSwitch(padapter, bWrite, false);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -652,15 +652,15 @@ u8 rtw_efuse_access(PADAPTER padapter, u8 bWrite, u16 start_addr, u16 cnts, u8 *
|
|||
u16 efuse_GetMaxSize(PADAPTER padapter)
|
||||
{
|
||||
u16 max_size;
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI , TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_size, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI , TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_size, false);
|
||||
return max_size;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
u8 efuse_GetCurrentSize(PADAPTER padapter, u16 *size)
|
||||
{
|
||||
Efuse_PowerSwitch(padapter, _FALSE, _TRUE);
|
||||
*size = Efuse_GetCurrentSize(padapter, EFUSE_WIFI, _FALSE);
|
||||
Efuse_PowerSwitch(padapter, _FALSE, _FALSE);
|
||||
Efuse_PowerSwitch(padapter, false, true);
|
||||
*size = Efuse_GetCurrentSize(padapter, EFUSE_WIFI, false);
|
||||
Efuse_PowerSwitch(padapter, false, false);
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
@ -669,16 +669,16 @@ u8 rtw_efuse_map_read(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
{
|
||||
u16 mapLen=0;
|
||||
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
|
||||
|
||||
if ((addr + cnts) > mapLen)
|
||||
return _FAIL;
|
||||
|
||||
Efuse_PowerSwitch(padapter, _FALSE, _TRUE);
|
||||
Efuse_PowerSwitch(padapter, false, true);
|
||||
|
||||
efuse_ReadEFuse(padapter, EFUSE_WIFI, addr, cnts, data, _FALSE);
|
||||
efuse_ReadEFuse(padapter, EFUSE_WIFI, addr, cnts, data, false);
|
||||
|
||||
Efuse_PowerSwitch(padapter, _FALSE, _FALSE);
|
||||
Efuse_PowerSwitch(padapter, false, false);
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
@ -687,16 +687,16 @@ u8 rtw_BT_efuse_map_read(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
{
|
||||
u16 mapLen=0;
|
||||
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
|
||||
|
||||
if ((addr + cnts) > mapLen)
|
||||
return _FAIL;
|
||||
|
||||
Efuse_PowerSwitch(padapter, _FALSE, _TRUE);
|
||||
Efuse_PowerSwitch(padapter, false, true);
|
||||
|
||||
efuse_ReadEFuse(padapter, EFUSE_BT, addr, cnts, data, _FALSE);
|
||||
efuse_ReadEFuse(padapter, EFUSE_BT, addr, cnts, data, false);
|
||||
|
||||
Efuse_PowerSwitch(padapter, _FALSE, _FALSE);
|
||||
Efuse_PowerSwitch(padapter, false, false);
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
@ -710,7 +710,7 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
u8 ret = _SUCCESS;
|
||||
u16 mapLen=0;
|
||||
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
|
||||
|
||||
if ((addr + cnts) > mapLen)
|
||||
return _FAIL;
|
||||
|
@ -723,7 +723,7 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
ret = rtw_efuse_map_read(padapter, 0, mapLen, map);
|
||||
if (ret == _FAIL) goto exit;
|
||||
|
||||
Efuse_PowerSwitch(padapter, _TRUE, _TRUE);
|
||||
Efuse_PowerSwitch(padapter, true, true);
|
||||
|
||||
offset = (addr >> 3);
|
||||
word_en = 0xF;
|
||||
|
@ -768,7 +768,7 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
}
|
||||
|
||||
if (word_en != 0xF) {
|
||||
ret = Efuse_PgPacketWrite(padapter, offset, word_en, newdata, _FALSE);
|
||||
ret = Efuse_PgPacketWrite(padapter, offset, word_en, newdata, false);
|
||||
DBG_88E("offset=%x\n",offset);
|
||||
DBG_88E("word_en=%x\n",word_en);
|
||||
|
||||
|
@ -788,7 +788,7 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
_rtw_memset(newdata, 0xFF, PGPKT_DATA_SIZE);
|
||||
} while (1);
|
||||
|
||||
Efuse_PowerSwitch(padapter, _TRUE, _FALSE);
|
||||
Efuse_PowerSwitch(padapter, true, false);
|
||||
|
||||
exit:
|
||||
|
||||
|
@ -808,7 +808,7 @@ u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
u8 ret = _SUCCESS;
|
||||
u16 mapLen=0;
|
||||
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
|
||||
|
||||
if ((addr + cnts) > mapLen)
|
||||
return _FAIL;
|
||||
|
@ -821,7 +821,7 @@ u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
ret = rtw_BT_efuse_map_read(padapter, 0, mapLen, map);
|
||||
if (ret == _FAIL) goto exit;
|
||||
|
||||
Efuse_PowerSwitch(padapter, _TRUE, _TRUE);
|
||||
Efuse_PowerSwitch(padapter, true, true);
|
||||
|
||||
offset = (addr >> 3);
|
||||
word_en = 0xF;
|
||||
|
@ -876,7 +876,7 @@ u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
}
|
||||
DBG_88E("\n");
|
||||
|
||||
ret = Efuse_PgPacketWrite_BT(padapter, offset, word_en, newdata, _FALSE);
|
||||
ret = Efuse_PgPacketWrite_BT(padapter, offset, word_en, newdata, false);
|
||||
if (ret == _FAIL) break;
|
||||
}
|
||||
|
||||
|
@ -889,7 +889,7 @@ u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
_rtw_memset(newdata, 0xFF, PGPKT_DATA_SIZE);
|
||||
} while (1);
|
||||
|
||||
Efuse_PowerSwitch(padapter, _TRUE, _FALSE);
|
||||
Efuse_PowerSwitch(padapter, true, false);
|
||||
|
||||
exit:
|
||||
|
||||
|
@ -929,13 +929,13 @@ Efuse_ReadAllMap(
|
|||
{
|
||||
u16 mapLen=0;
|
||||
|
||||
Efuse_PowerSwitch(pAdapter,_FALSE, _TRUE);
|
||||
Efuse_PowerSwitch(pAdapter,false, true);
|
||||
|
||||
EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, bPseudoTest);
|
||||
|
||||
efuse_ReadEFuse(pAdapter, efuseType, 0, mapLen, Efuse, bPseudoTest);
|
||||
|
||||
Efuse_PowerSwitch(pAdapter,_FALSE, _FALSE);
|
||||
Efuse_PowerSwitch(pAdapter,false, false);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
@ -1092,7 +1092,7 @@ void EFUSE_ShadowMapUpdate(
|
|||
|
||||
EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, bPseudoTest);
|
||||
|
||||
if (pEEPROM->bautoload_fail_flag == _TRUE)
|
||||
if (pEEPROM->bautoload_fail_flag == true)
|
||||
{
|
||||
_rtw_memset(pEEPROM->efuse_eeprom_data, 0xFF, mapLen);
|
||||
}
|
||||
|
@ -1228,7 +1228,7 @@ Efuse_InitSomeVar(
|
|||
|
||||
int isAdaptorInfoFileValid(void)
|
||||
{
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
int storeAdaptorInfoFile(char *path, struct eeprom_priv * eeprom_priv)
|
||||
|
|
|
@ -88,11 +88,11 @@ uint rtw_is_cckrates_included(u8 *rate)
|
|||
{
|
||||
if ( (((rate[i]) & 0x7f) == 2) || (((rate[i]) & 0x7f) == 4) ||
|
||||
(((rate[i]) & 0x7f) == 11) || (((rate[i]) & 0x7f) == 22) )
|
||||
return _TRUE;
|
||||
return true;
|
||||
i++;
|
||||
}
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
uint rtw_is_cckratesonly_included(u8 *rate)
|
||||
|
@ -105,12 +105,12 @@ uint rtw_is_cckratesonly_included(u8 *rate)
|
|||
if ( (((rate[i]) & 0x7f) != 2) && (((rate[i]) & 0x7f) != 4) &&
|
||||
(((rate[i]) & 0x7f) != 11) && (((rate[i]) & 0x7f) != 22) )
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
@ -118,16 +118,16 @@ int rtw_check_network_type(unsigned char *rate, int ratelen, int channel)
|
|||
{
|
||||
if (channel > 14)
|
||||
{
|
||||
if ((rtw_is_cckrates_included(rate)) == _TRUE)
|
||||
if ((rtw_is_cckrates_included(rate)) == true)
|
||||
return WIRELESS_INVALID;
|
||||
else
|
||||
return WIRELESS_11A;
|
||||
}
|
||||
else // could be pure B, pure G, or B/G
|
||||
{
|
||||
if ((rtw_is_cckratesonly_included(rate)) == _TRUE)
|
||||
if ((rtw_is_cckratesonly_included(rate)) == true)
|
||||
return WIRELESS_11B;
|
||||
else if ((rtw_is_cckrates_included(rate)) == _TRUE)
|
||||
else if ((rtw_is_cckrates_included(rate)) == true)
|
||||
return WIRELESS_11BG;
|
||||
else
|
||||
return WIRELESS_11G;
|
||||
|
@ -285,7 +285,7 @@ u8 *rtw_get_ie_ex(u8 *in_ie, uint in_len, u8 eid, u8 *oui, u8 oui_len, u8 *ie, u
|
|||
while (cnt<in_len)
|
||||
{
|
||||
if (eid == in_ie[cnt]
|
||||
&& ( !oui || _rtw_memcmp(&in_ie[cnt+2], oui, oui_len) == _TRUE))
|
||||
&& ( !oui || _rtw_memcmp(&in_ie[cnt+2], oui, oui_len) == true))
|
||||
{
|
||||
target_ie = &in_ie[cnt];
|
||||
|
||||
|
@ -481,7 +481,7 @@ _func_enter_;
|
|||
#ifdef CONFIG_80211N_HT
|
||||
//HT Cap.
|
||||
if (((pregistrypriv->wireless_mode&WIRELESS_11_5N)||(pregistrypriv->wireless_mode&WIRELESS_11_24N))
|
||||
&& (pregistrypriv->ht_enable==_TRUE))
|
||||
&& (pregistrypriv->ht_enable==true))
|
||||
{
|
||||
//todo:
|
||||
}
|
||||
|
@ -512,7 +512,7 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
|
|||
if (pbuf) {
|
||||
|
||||
//check if oui matches...
|
||||
if (_rtw_memcmp((pbuf + 2), wpa_oui_type, sizeof (wpa_oui_type)) == _FALSE) {
|
||||
if (_rtw_memcmp((pbuf + 2), wpa_oui_type, sizeof (wpa_oui_type)) == false) {
|
||||
|
||||
goto check_next_ie;
|
||||
}
|
||||
|
@ -561,15 +561,15 @@ unsigned char *rtw_get_wpa2_ie(unsigned char *pie, int *rsn_ie_len, int limit)
|
|||
|
||||
int rtw_get_wpa_cipher_suite(u8 *s)
|
||||
{
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_NONE, WPA_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_NONE, WPA_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_NONE;
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_WEP40, WPA_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_WEP40, WPA_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_WEP40;
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_TKIP, WPA_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_TKIP, WPA_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_TKIP;
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_CCMP, WPA_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_CCMP, WPA_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_CCMP;
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_WEP104, WPA_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_WEP104, WPA_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_WEP104;
|
||||
|
||||
return 0;
|
||||
|
@ -577,15 +577,15 @@ int rtw_get_wpa_cipher_suite(u8 *s)
|
|||
|
||||
int rtw_get_wpa2_cipher_suite(u8 *s)
|
||||
{
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_NONE, RSN_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_NONE, RSN_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_NONE;
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_WEP40, RSN_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_WEP40, RSN_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_WEP40;
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_TKIP, RSN_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_TKIP, RSN_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_TKIP;
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_CCMP, RSN_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_CCMP, RSN_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_CCMP;
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_WEP104, RSN_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_WEP104, RSN_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_WEP104;
|
||||
|
||||
return 0;
|
||||
|
@ -606,7 +606,7 @@ int rtw_parse_wpa_ie(u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwis
|
|||
|
||||
|
||||
if ((*wpa_ie != _WPA_IE_ID_) || (*(wpa_ie+1) != (u8)(wpa_ie_len - 2)) ||
|
||||
(_rtw_memcmp(wpa_ie+2, RTW_WPA_OUI_TYPE, WPA_SELECTOR_LEN) != _TRUE) )
|
||||
(_rtw_memcmp(wpa_ie+2, RTW_WPA_OUI_TYPE, WPA_SELECTOR_LEN) != true) )
|
||||
{
|
||||
return _FAIL;
|
||||
}
|
||||
|
@ -771,8 +771,8 @@ _func_enter_;
|
|||
authmode=in_ie[cnt];
|
||||
|
||||
//if (authmode==_WAPI_IE_)
|
||||
if (authmode==_WAPI_IE_ && (_rtw_memcmp(&in_ie[cnt+6], wapi_oui1,4)==_TRUE ||
|
||||
_rtw_memcmp(&in_ie[cnt+6], wapi_oui2,4)==_TRUE))
|
||||
if (authmode==_WAPI_IE_ && (_rtw_memcmp(&in_ie[cnt+6], wapi_oui1,4)==true ||
|
||||
_rtw_memcmp(&in_ie[cnt+6], wapi_oui2,4)==true))
|
||||
{
|
||||
if (wapi_ie) {
|
||||
_rtw_memcpy(wapi_ie, &in_ie[cnt],in_ie[cnt+1]+2);
|
||||
|
@ -818,7 +818,7 @@ _func_enter_;
|
|||
{
|
||||
authmode=in_ie[cnt];
|
||||
|
||||
if ((authmode==_WPA_IE_ID_)&&(_rtw_memcmp(&in_ie[cnt+2], &wpa_oui[0],4)==_TRUE))
|
||||
if ((authmode==_WPA_IE_ID_)&&(_rtw_memcmp(&in_ie[cnt+2], &wpa_oui[0],4)==true))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("\n rtw_get_wpa_ie: sec_idx=%d in_ie[cnt+1]+2=%d\n",sec_idx,in_ie[cnt+1]+2));
|
||||
|
||||
|
@ -870,18 +870,18 @@ _func_exit_;
|
|||
|
||||
u8 rtw_is_wps_ie(u8 *ie_ptr, uint *wps_ielen)
|
||||
{
|
||||
u8 match = _FALSE;
|
||||
u8 match = false;
|
||||
u8 eid, wps_oui[4]={0x0,0x50,0xf2,0x04};
|
||||
|
||||
if (ie_ptr == NULL) return match;
|
||||
|
||||
eid = ie_ptr[0];
|
||||
|
||||
if ((eid==_WPA_IE_ID_)&&(_rtw_memcmp(&ie_ptr[2], wps_oui, 4)==_TRUE))
|
||||
if ((eid==_WPA_IE_ID_)&&(_rtw_memcmp(&ie_ptr[2], wps_oui, 4)==true))
|
||||
{
|
||||
//DBG_88E("==> found WPS_IE.....\n");
|
||||
*wps_ielen = ie_ptr[1]+2;
|
||||
match=_TRUE;
|
||||
match=true;
|
||||
}
|
||||
return match;
|
||||
}
|
||||
|
@ -913,7 +913,7 @@ u8 *rtw_get_wps_ie(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen)
|
|||
{
|
||||
eid = in_ie[cnt];
|
||||
|
||||
if ((eid==_WPA_IE_ID_)&&(_rtw_memcmp(&in_ie[cnt+2], wps_oui, 4)==_TRUE))
|
||||
if ((eid==_WPA_IE_ID_)&&(_rtw_memcmp(&in_ie[cnt+2], wps_oui, 4)==true))
|
||||
{
|
||||
wpsie_ptr = &in_ie[cnt];
|
||||
|
||||
|
@ -957,7 +957,7 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 *buf_att
|
|||
*len_attr = 0;
|
||||
|
||||
if ( ( wps_ie[0] != _VENDOR_SPECIFIC_IE_ ) ||
|
||||
( _rtw_memcmp( wps_ie + 2, wps_oui , 4 ) != _TRUE ) )
|
||||
( _rtw_memcmp( wps_ie + 2, wps_oui , 4 ) != true ) )
|
||||
{
|
||||
return attr_ptr;
|
||||
}
|
||||
|
@ -1423,7 +1423,7 @@ u8 *rtw_get_p2p_ie(u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen)
|
|||
#endif
|
||||
return NULL;
|
||||
}
|
||||
if ( ( eid == _VENDOR_SPECIFIC_IE_ ) && ( _rtw_memcmp( &in_ie[cnt+2], p2p_oui, 4) == _TRUE ) )
|
||||
if ( ( eid == _VENDOR_SPECIFIC_IE_ ) && ( _rtw_memcmp( &in_ie[cnt+2], p2p_oui, 4) == true ) )
|
||||
{
|
||||
p2p_ie_ptr = in_ie + cnt;
|
||||
|
||||
|
@ -1472,7 +1472,7 @@ u8 *rtw_get_p2p_attr(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id ,u8 *buf_attr
|
|||
*len_attr = 0;
|
||||
|
||||
if ( !p2p_ie || ( p2p_ie[0] != _VENDOR_SPECIFIC_IE_ ) ||
|
||||
( _rtw_memcmp( p2p_ie + 2, p2p_oui , 4 ) != _TRUE ) )
|
||||
( _rtw_memcmp( p2p_ie + 2, p2p_oui , 4 ) != true ) )
|
||||
{
|
||||
return attr_ptr;
|
||||
}
|
||||
|
@ -1622,7 +1622,7 @@ int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
|
|||
u8 eid, wfd_oui[4]={0x50,0x6F,0x9A,0x0A};
|
||||
|
||||
|
||||
match=_FALSE;
|
||||
match=false;
|
||||
|
||||
if ( in_len < 0 )
|
||||
{
|
||||
|
@ -1633,7 +1633,7 @@ int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
|
|||
{
|
||||
eid = in_ie[cnt];
|
||||
|
||||
if ( ( eid == _VENDOR_SPECIFIC_IE_ ) && ( _rtw_memcmp( &in_ie[cnt+2], wfd_oui, 4) == _TRUE ) )
|
||||
if ( ( eid == _VENDOR_SPECIFIC_IE_ ) && ( _rtw_memcmp( &in_ie[cnt+2], wfd_oui, 4) == true ) )
|
||||
{
|
||||
if ( wfd_ie != NULL )
|
||||
{
|
||||
|
@ -1655,7 +1655,7 @@ int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
|
|||
|
||||
cnt += in_ie[ cnt + 1 ] + 2;
|
||||
|
||||
match = _TRUE;
|
||||
match = true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
@ -1665,7 +1665,7 @@ int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
|
|||
|
||||
}
|
||||
|
||||
if ( match == _TRUE )
|
||||
if ( match == true )
|
||||
{
|
||||
match = cnt;
|
||||
}
|
||||
|
@ -1683,10 +1683,10 @@ int rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id ,u8 *
|
|||
u8 attr_id, wfd_oui[4]={0x50,0x6F,0x9A,0x0A};
|
||||
|
||||
|
||||
match=_FALSE;
|
||||
match=false;
|
||||
|
||||
if ( ( wfd_ie[ 0 ] != _VENDOR_SPECIFIC_IE_ ) ||
|
||||
( _rtw_memcmp( wfd_ie + 2, wfd_oui , 4 ) != _TRUE ) )
|
||||
( _rtw_memcmp( wfd_ie + 2, wfd_oui , 4 ) != true ) )
|
||||
{
|
||||
return( match );
|
||||
}
|
||||
|
@ -1709,7 +1709,7 @@ int rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id ,u8 *
|
|||
|
||||
cnt += attrlen + 3;
|
||||
|
||||
match = _TRUE;
|
||||
match = true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
@ -1947,7 +1947,7 @@ int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8* category, u8 *act
|
|||
!= (RTW_IEEE80211_FTYPE_MGMT|RTW_IEEE80211_STYPE_ACTION)
|
||||
)
|
||||
{
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
c = frame_body[0];
|
||||
|
@ -1964,7 +1964,7 @@ int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8* category, u8 *act
|
|||
if (action)
|
||||
*action = a;
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static const char *_action_public_str[] = {
|
||||
|
|
|
@ -251,7 +251,7 @@ void _rtw_read_mem(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
|
|||
|
||||
_func_enter_;
|
||||
|
||||
if ( (adapter->bDriverStopped ==_TRUE) || (adapter->bSurpriseRemoved == _TRUE))
|
||||
if ( (adapter->bDriverStopped ==true) || (adapter->bSurpriseRemoved == true))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_io_c_, _drv_info_, ("rtw_read_mem:bDriverStopped(%d) OR bSurpriseRemoved(%d)", adapter->bDriverStopped, adapter->bSurpriseRemoved));
|
||||
return;
|
||||
|
@ -291,7 +291,7 @@ void _rtw_read_port(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
|
|||
|
||||
_func_enter_;
|
||||
|
||||
if ( (adapter->bDriverStopped ==_TRUE) || (adapter->bSurpriseRemoved == _TRUE))
|
||||
if ( (adapter->bDriverStopped ==true) || (adapter->bSurpriseRemoved == true))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_io_c_, _drv_info_, ("rtw_read_port:bDriverStopped(%d) OR bSurpriseRemoved(%d)", adapter->bDriverStopped, adapter->bSurpriseRemoved));
|
||||
return;
|
||||
|
@ -403,10 +403,10 @@ bool match_read_sniff_ranges(u16 addr, u16 len)
|
|||
int i;
|
||||
for (i = 0; i<read_sniff_num; i++) {
|
||||
if (addr + len > read_sniff_ranges[i][0] && addr <= read_sniff_ranges[i][1])
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool match_write_sniff_ranges(u16 addr, u16 len)
|
||||
|
@ -414,10 +414,10 @@ bool match_write_sniff_ranges(u16 addr, u16 len)
|
|||
int i;
|
||||
for (i = 0; i<write_sniff_num; i++) {
|
||||
if (addr + len > write_sniff_ranges[i][0] && addr <= write_sniff_ranges[i][1])
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
u8 dbg_rtw_read8(_adapter *adapter, u32 addr, const char *caller, const int line)
|
||||
|
|
|
@ -71,13 +71,13 @@ query_802_11_capability(
|
|||
{
|
||||
_rtw_memcpy( pucAuthEncryptionSupported, (u8*)szAuthEnc, sizeof (szAuthEnc) );
|
||||
*pulOutLen = pCap->Length;
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
*pulOutLen = 0;
|
||||
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("_query_802_11_capability(): szAuthEnc size is too large.\n"));
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ u8 query_802_11_association_information( _adapter *padapter,PNDIS_802_11_ASSOCIA
|
|||
|
||||
pAssocInfo->OffsetRequestIEs = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION);
|
||||
|
||||
if (check_fwstate( pmlmepriv, _FW_UNDER_LINKING|_FW_LINKED)==_TRUE)
|
||||
if (check_fwstate( pmlmepriv, _FW_UNDER_LINKING|_FW_LINKED)==true)
|
||||
{
|
||||
|
||||
if (psecuritypriv->ndisauthtype>=Ndis802_11AuthModeWPA2)
|
||||
|
@ -155,7 +155,7 @@ u8 query_802_11_association_information( _adapter *padapter,PNDIS_802_11_ASSOCIA
|
|||
// Association Response related information
|
||||
//------------------------------------------------------
|
||||
|
||||
if (check_fwstate( pmlmepriv, _FW_LINKED)==_TRUE)
|
||||
if (check_fwstate( pmlmepriv, _FW_LINKED)==true)
|
||||
{
|
||||
tgt_network =&(pmlmepriv->cur_network);
|
||||
if (tgt_network!=NULL){
|
||||
|
@ -190,6 +190,6 @@ u8 query_802_11_association_information( _adapter *padapter,PNDIS_802_11_ASSOCIA
|
|||
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("\n exit query_802_11_association_information\n"));
|
||||
_func_exit_;
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -44,19 +44,19 @@ extern void indicate_wx_scan_complete_event(_adapter *padapter);
|
|||
( \
|
||||
( (addr[0] == 0xff) && (addr[1] == 0xff) && \
|
||||
(addr[2] == 0xff) && (addr[3] == 0xff) && \
|
||||
(addr[4] == 0xff) && (addr[5] == 0xff) ) ? _TRUE : _FALSE \
|
||||
(addr[4] == 0xff) && (addr[5] == 0xff) ) ? true : false \
|
||||
)
|
||||
|
||||
u8 rtw_validate_ssid(NDIS_802_11_SSID *ssid)
|
||||
{
|
||||
u8 i;
|
||||
u8 ret=_TRUE;
|
||||
u8 ret=true;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
if (ssid->SsidLength > 32) {
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("ssid length >32\n"));
|
||||
ret= _FALSE;
|
||||
ret= false;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ _func_enter_;
|
|||
//wifi, printable ascii code must be supported
|
||||
if (!( (ssid->Ssid[i] >= 0x20) && (ssid->Ssid[i] <= 0x7e) )){
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("ssid has nonprintabl ascii\n"));
|
||||
ret= _FALSE;
|
||||
ret= false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -101,9 +101,9 @@ _func_enter_;
|
|||
|
||||
pmlmepriv->pscanned = plist;
|
||||
|
||||
pmlmepriv->to_join = _TRUE;
|
||||
pmlmepriv->to_join = true;
|
||||
|
||||
if (_rtw_queue_empty(queue)== _TRUE)
|
||||
if (_rtw_queue_empty(queue)== true)
|
||||
{
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||
|
@ -111,7 +111,7 @@ _func_enter_;
|
|||
//when set_ssid/set_bssid for rtw_do_join(), but scanning queue is empty
|
||||
//we try to issue sitesurvey firstly
|
||||
|
||||
if (pmlmepriv->LinkDetectInfo.bBusyTraffic==_FALSE
|
||||
if (pmlmepriv->LinkDetectInfo.bBusyTraffic==false
|
||||
#ifdef CONFIG_LAYER2_ROAMING
|
||||
|| pmlmepriv->to_roaming >0
|
||||
#endif
|
||||
|
@ -120,13 +120,13 @@ _func_enter_;
|
|||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_do_join(): site survey if scanned_queue is empty\n."));
|
||||
// submit site_survey_cmd
|
||||
if (_SUCCESS!=(ret=rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0)) ) {
|
||||
pmlmepriv->to_join = _FALSE;
|
||||
pmlmepriv->to_join = false;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("rtw_do_join(): site survey return error\n."));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pmlmepriv->to_join = _FALSE;
|
||||
pmlmepriv->to_join = false;
|
||||
ret = _FAIL;
|
||||
}
|
||||
|
||||
|
@ -138,12 +138,12 @@ _func_enter_;
|
|||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
if ((select_ret=rtw_select_and_join_from_scanned_queue(pmlmepriv))==_SUCCESS)
|
||||
{
|
||||
pmlmepriv->to_join = _FALSE;
|
||||
pmlmepriv->to_join = false;
|
||||
_set_timer(&pmlmepriv->assoc_timer, MAX_JOIN_TIMEOUT);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)==_TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)==true)
|
||||
{
|
||||
// submit createbss_cmd to change to a ADHOC_MASTER
|
||||
|
||||
|
@ -164,11 +164,11 @@ _func_enter_;
|
|||
if (rtw_createbss_cmd(padapter)!=_SUCCESS)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("***Error=>do_goin: rtw_createbss_cmd status FAIL***\n "));
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pmlmepriv->to_join = _FALSE;
|
||||
pmlmepriv->to_join = false;
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("***Error=> rtw_select_and_join_from_scanned_queue FAIL under STA_Mode***\n "));
|
||||
|
||||
|
@ -180,21 +180,21 @@ _func_enter_;
|
|||
|
||||
//when set_ssid/set_bssid for rtw_do_join(), but there are no desired bss in scanning queue
|
||||
//we try to issue sitesurvey firstly
|
||||
if (pmlmepriv->LinkDetectInfo.bBusyTraffic==_FALSE
|
||||
if (pmlmepriv->LinkDetectInfo.bBusyTraffic==false
|
||||
#ifdef CONFIG_LAYER2_ROAMING
|
||||
|| pmlmepriv->to_roaming >0
|
||||
#endif
|
||||
)
|
||||
{
|
||||
if ( _SUCCESS!=(ret=rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0)) ){
|
||||
pmlmepriv->to_join = _FALSE;
|
||||
pmlmepriv->to_join = false;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("do_join(): site survey return error\n."));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = _FAIL;
|
||||
pmlmepriv->to_join = _FALSE;
|
||||
pmlmepriv->to_join = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -265,12 +265,12 @@ _func_enter_;
|
|||
|
||||
_func_exit_;
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
u8 set_802_11_test(_adapter* padapter, NDIS_802_11_TEST *test)
|
||||
{
|
||||
u8 ret=_TRUE;
|
||||
u8 ret=true;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -287,7 +287,7 @@ _func_enter_;
|
|||
break;
|
||||
|
||||
default:
|
||||
ret=_FALSE;
|
||||
ret=false;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -328,33 +328,33 @@ _func_enter_;
|
|||
|
||||
|
||||
DBG_88E("Set BSSID under fw_state=0x%08x\n", get_fwstate(pmlmepriv));
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
|
||||
goto handle_tkip_countermeasure;
|
||||
} else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == _TRUE) {
|
||||
} else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true) {
|
||||
goto release_mlme_lock;
|
||||
}
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE) == true)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("set_bssid: _FW_LINKED||WIFI_ADHOC_MASTER_STATE\n"));
|
||||
|
||||
if (_rtw_memcmp(&pmlmepriv->cur_network.network.MacAddress, bssid, ETH_ALEN) == _TRUE)
|
||||
if (_rtw_memcmp(&pmlmepriv->cur_network.network.MacAddress, bssid, ETH_ALEN) == true)
|
||||
{
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _FALSE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == false)
|
||||
goto release_mlme_lock;//it means driver is in WIFI_ADHOC_MASTER_STATE, we needn't create bss again.
|
||||
} else {
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("Set BSSID not the same bssid\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("set_bssid="MAC_FMT"\n", MAC_ARG(bssid) ));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("cur_bssid="MAC_FMT"\n", MAC_ARG(pmlmepriv->cur_network.network.MacAddress) ));
|
||||
|
||||
rtw_disassoc_cmd(padapter, 0, _TRUE);
|
||||
rtw_disassoc_cmd(padapter, 0, true);
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
rtw_indicate_disconnect(padapter);
|
||||
|
||||
rtw_free_assoc_resources(padapter, 1);
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) {
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) {
|
||||
_clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
|
||||
set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
|
||||
}
|
||||
|
@ -365,12 +365,12 @@ handle_tkip_countermeasure:
|
|||
//should we add something here...?
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
if (padapter->securitypriv.btkip_countermeasure == _TRUE) {
|
||||
if (padapter->securitypriv.btkip_countermeasure == true) {
|
||||
cur_time = rtw_get_current_time();
|
||||
|
||||
if ( (cur_time - padapter->securitypriv.btkip_countermeasure_time) > 60 * HZ )
|
||||
{
|
||||
padapter->securitypriv.btkip_countermeasure = _FALSE;
|
||||
padapter->securitypriv.btkip_countermeasure = false;
|
||||
padapter->securitypriv.btkip_countermeasure_time = 0;
|
||||
}
|
||||
else
|
||||
|
@ -382,10 +382,10 @@ handle_tkip_countermeasure:
|
|||
#endif
|
||||
|
||||
_rtw_memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN);
|
||||
pmlmepriv->assoc_by_bssid=_TRUE;
|
||||
pmlmepriv->assoc_by_bssid=true;
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE) {
|
||||
pmlmepriv->to_join = _TRUE;
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
|
||||
pmlmepriv->to_join = true;
|
||||
}
|
||||
else {
|
||||
status = rtw_do_join(padapter);
|
||||
|
@ -417,9 +417,9 @@ _func_enter_;
|
|||
DBG_88E_LEVEL(_drv_info_, "set ssid [%s] fw_state=0x%08x\n",
|
||||
ssid->Ssid, get_fwstate(pmlmepriv));
|
||||
|
||||
if (padapter->hw_init_completed==_FALSE){
|
||||
if (padapter->hw_init_completed==false){
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
|
||||
("set_ssid: hw_init_completed==_FALSE=>exit!!!\n"));
|
||||
("set_ssid: hw_init_completed==false=>exit!!!\n"));
|
||||
status = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -427,37 +427,37 @@ _func_enter_;
|
|||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
DBG_88E("Set SSID under fw_state=0x%08x\n", get_fwstate(pmlmepriv));
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
|
||||
goto handle_tkip_countermeasure;
|
||||
} else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == _TRUE) {
|
||||
} else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true) {
|
||||
goto release_mlme_lock;
|
||||
}
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE) == true)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
|
||||
("set_ssid: _FW_LINKED||WIFI_ADHOC_MASTER_STATE\n"));
|
||||
|
||||
if ((pmlmepriv->assoc_ssid.SsidLength == ssid->SsidLength) &&
|
||||
(_rtw_memcmp(&pmlmepriv->assoc_ssid.Ssid, ssid->Ssid, ssid->SsidLength) == _TRUE))
|
||||
(_rtw_memcmp(&pmlmepriv->assoc_ssid.Ssid, ssid->Ssid, ssid->SsidLength) == true))
|
||||
{
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _FALSE))
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == false))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
|
||||
("Set SSID is the same ssid, fw_state=0x%08x\n",
|
||||
get_fwstate(pmlmepriv)));
|
||||
|
||||
if (rtw_is_same_ibss(padapter, pnetwork) == _FALSE)
|
||||
if (rtw_is_same_ibss(padapter, pnetwork) == false)
|
||||
{
|
||||
//if in WIFI_ADHOC_MASTER_STATE | WIFI_ADHOC_STATE, create bss or rejoin again
|
||||
rtw_disassoc_cmd(padapter, 0, _TRUE);
|
||||
rtw_disassoc_cmd(padapter, 0, true);
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
rtw_indicate_disconnect(padapter);
|
||||
|
||||
rtw_free_assoc_resources(padapter, 1);
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) {
|
||||
_clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
|
||||
set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
|
||||
}
|
||||
|
@ -479,14 +479,14 @@ _func_enter_;
|
|||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("set_ssid=[%s] len=0x%x\n", ssid->Ssid, (unsigned int)ssid->SsidLength));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("assoc_ssid=[%s] len=0x%x\n", pmlmepriv->assoc_ssid.Ssid, (unsigned int)pmlmepriv->assoc_ssid.SsidLength));
|
||||
|
||||
rtw_disassoc_cmd(padapter, 0, _TRUE);
|
||||
rtw_disassoc_cmd(padapter, 0, true);
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
rtw_indicate_disconnect(padapter);
|
||||
|
||||
rtw_free_assoc_resources(padapter, 1);
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) {
|
||||
_clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
|
||||
set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
|
||||
}
|
||||
|
@ -495,11 +495,11 @@ _func_enter_;
|
|||
|
||||
handle_tkip_countermeasure:
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
if (padapter->securitypriv.btkip_countermeasure==_TRUE)
|
||||
if (padapter->securitypriv.btkip_countermeasure==true)
|
||||
{
|
||||
LARGE_INTEGER sys_time;
|
||||
u32 diff_time,cur_time ;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid:padapter->securitypriv.btkip_countermeasure==_TRUE\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid:padapter->securitypriv.btkip_countermeasure==true\n"));
|
||||
NdisGetCurrentSystemTime(&sys_time);
|
||||
cur_time=(u32)(sys_time.QuadPart/10); // In micro-second.
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid:cur_time=0x%x\n",cur_time));
|
||||
|
@ -509,7 +509,7 @@ handle_tkip_countermeasure:
|
|||
|
||||
if (diff_time > 60000000) {
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid(): countermeasure time >60s.\n"));
|
||||
padapter->securitypriv.btkip_countermeasure=_FALSE;
|
||||
padapter->securitypriv.btkip_countermeasure=false;
|
||||
// Update MIC error time.
|
||||
padapter->securitypriv.btkip_countermeasure_time=0;
|
||||
} else {
|
||||
|
@ -522,12 +522,12 @@ handle_tkip_countermeasure:
|
|||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
if (padapter->securitypriv.btkip_countermeasure == _TRUE) {
|
||||
if (padapter->securitypriv.btkip_countermeasure == true) {
|
||||
cur_time = rtw_get_current_time();
|
||||
|
||||
if ( (cur_time - padapter->securitypriv.btkip_countermeasure_time) > 60 * HZ )
|
||||
{
|
||||
padapter->securitypriv.btkip_countermeasure = _FALSE;
|
||||
padapter->securitypriv.btkip_countermeasure = false;
|
||||
padapter->securitypriv.btkip_countermeasure_time = 0;
|
||||
}
|
||||
else
|
||||
|
@ -539,17 +539,17 @@ handle_tkip_countermeasure:
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_VALIDATE_SSID
|
||||
if (rtw_validate_ssid(ssid) == _FALSE) {
|
||||
if (rtw_validate_ssid(ssid) == false) {
|
||||
status = _FAIL;
|
||||
goto release_mlme_lock;
|
||||
}
|
||||
#endif
|
||||
|
||||
_rtw_memcpy(&pmlmepriv->assoc_ssid, ssid, sizeof(NDIS_802_11_SSID));
|
||||
pmlmepriv->assoc_by_bssid=_FALSE;
|
||||
pmlmepriv->assoc_by_bssid=false;
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE) {
|
||||
pmlmepriv->to_join = _TRUE;
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
|
||||
pmlmepriv->to_join = true;
|
||||
}
|
||||
else {
|
||||
status = rtw_do_join(padapter);
|
||||
|
@ -599,16 +599,16 @@ _func_enter_;
|
|||
#endif
|
||||
}
|
||||
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED)== _TRUE) ||(*pold_state==Ndis802_11IBSS))
|
||||
rtw_disassoc_cmd(padapter, 0, _TRUE);
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED)== true) ||(*pold_state==Ndis802_11IBSS))
|
||||
rtw_disassoc_cmd(padapter, 0, true);
|
||||
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED)== _TRUE) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)== _TRUE) )
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED)== true) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)== true) )
|
||||
rtw_free_assoc_resources(padapter, 1);
|
||||
|
||||
if ((*pold_state == Ndis802_11Infrastructure) ||(*pold_state == Ndis802_11IBSS))
|
||||
{
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
{
|
||||
rtw_indicate_disconnect(padapter); //will clr Linked_state; before this function, we must have chked whether issue dis-assoc_cmd or not
|
||||
}
|
||||
|
@ -652,7 +652,7 @@ _func_enter_;
|
|||
|
||||
_func_exit_;
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -665,11 +665,11 @@ _func_enter_;
|
|||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("MgntActrtw_set_802_11_disassociate: rtw_indicate_disconnect\n"));
|
||||
|
||||
rtw_disassoc_cmd(padapter, 0, _TRUE);
|
||||
rtw_disassoc_cmd(padapter, 0, true);
|
||||
rtw_indicate_disconnect(padapter);
|
||||
rtw_free_assoc_resources(padapter, 1);
|
||||
rtw_pwr_wakeup(padapter);
|
||||
|
@ -679,40 +679,40 @@ _func_enter_;
|
|||
|
||||
_func_exit_;
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
u8 rtw_set_802_11_bssid_list_scan(_adapter* padapter, NDIS_802_11_SSID *pssid, int ssid_max_num)
|
||||
{
|
||||
_irqL irqL;
|
||||
struct mlme_priv *pmlmepriv= &padapter->mlmepriv;
|
||||
u8 res=_TRUE;
|
||||
u8 res=true;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("+rtw_set_802_11_bssid_list_scan(), fw_state=%x\n", get_fwstate(pmlmepriv)));
|
||||
|
||||
if (padapter == NULL) {
|
||||
res=_FALSE;
|
||||
res=false;
|
||||
goto exit;
|
||||
}
|
||||
if (padapter->hw_init_completed==_FALSE){
|
||||
res = _FALSE;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n===rtw_set_802_11_bssid_list_scan:hw_init_completed==_FALSE===\n"));
|
||||
if (padapter->hw_init_completed==false){
|
||||
res = false;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n===rtw_set_802_11_bssid_list_scan:hw_init_completed==false===\n"));
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if ((check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == _TRUE) ||
|
||||
(pmlmepriv->LinkDetectInfo.bBusyTraffic == _TRUE))
|
||||
if ((check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true) ||
|
||||
(pmlmepriv->LinkDetectInfo.bBusyTraffic == true))
|
||||
{
|
||||
// Scan or linking is in progress, do nothing.
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("rtw_set_802_11_bssid_list_scan fail since fw_state = %x\n", get_fwstate(pmlmepriv)));
|
||||
res = _TRUE;
|
||||
res = true;
|
||||
|
||||
if (check_fwstate(pmlmepriv, (_FW_UNDER_SURVEY|_FW_UNDER_LINKING))== _TRUE){
|
||||
if (check_fwstate(pmlmepriv, (_FW_UNDER_SURVEY|_FW_UNDER_LINKING))== true){
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n###_FW_UNDER_SURVEY|_FW_UNDER_LINKING\n\n"));
|
||||
} else {
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n###pmlmepriv->sitesurveyctrl.traffic_busy==_TRUE\n\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n###pmlmepriv->sitesurveyctrl.traffic_busy==true\n\n"));
|
||||
}
|
||||
} else {
|
||||
if (rtw_is_scan_deny(padapter)) {
|
||||
|
@ -759,9 +759,9 @@ _func_enter_;
|
|||
res=rtw_set_auth(padapter,psecuritypriv);
|
||||
|
||||
if (res==_SUCCESS)
|
||||
ret=_TRUE;
|
||||
ret=true;
|
||||
else
|
||||
ret=_FALSE;
|
||||
ret=false;
|
||||
|
||||
_func_exit_;
|
||||
|
||||
|
@ -778,14 +778,14 @@ u8 rtw_set_802_11_add_wep(_adapter* padapter, NDIS_802_11_WEP *wep){
|
|||
|
||||
_func_enter_;
|
||||
|
||||
bdefaultkey=(wep->KeyIndex & 0x40000000) > 0 ? _FALSE : _TRUE; //for ???
|
||||
btransmitkey= (wep->KeyIndex & 0x80000000) > 0 ? _TRUE : _FALSE; //for ???
|
||||
bdefaultkey=(wep->KeyIndex & 0x40000000) > 0 ? false : true; //for ???
|
||||
btransmitkey= (wep->KeyIndex & 0x80000000) > 0 ? true : false; //for ???
|
||||
keyid=wep->KeyIndex & 0x3fffffff;
|
||||
|
||||
if (keyid>4)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("MgntActrtw_set_802_11_add_wep:keyid>4=>fail\n"));
|
||||
ret=_FALSE;
|
||||
ret=false;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
@ -823,7 +823,7 @@ _func_enter_;
|
|||
res=rtw_set_key(padapter,psecuritypriv, keyid, 1);
|
||||
|
||||
if (res==_FAIL)
|
||||
ret= _FALSE;
|
||||
ret= false;
|
||||
exit:
|
||||
|
||||
_func_exit_;
|
||||
|
@ -840,7 +840,7 @@ _func_enter_;
|
|||
|
||||
if (keyindex >= 0x80000000 || padapter == NULL){
|
||||
|
||||
ret=_FALSE;
|
||||
ret=false;
|
||||
goto exit;
|
||||
|
||||
}
|
||||
|
@ -880,8 +880,8 @@ u8 rtw_set_802_11_add_key(_adapter* padapter, NDIS_802_11_KEY *key){
|
|||
uint encryptionalgo;
|
||||
u8 * pbssid;
|
||||
struct sta_info *stainfo;
|
||||
u8 bgroup = _FALSE;
|
||||
u8 bgrouptkey = _FALSE;//can be remove later
|
||||
u8 bgroup = false;
|
||||
u8 bgrouptkey = false;//can be remove later
|
||||
u8 ret=_SUCCESS;
|
||||
|
||||
_func_enter_;
|
||||
|
@ -933,10 +933,10 @@ _func_enter_;
|
|||
}
|
||||
|
||||
// check BSSID
|
||||
if (IS_MAC_ADDRESS_BROADCAST(key->BSSID) == _TRUE){
|
||||
if (IS_MAC_ADDRESS_BROADCAST(key->BSSID) == true){
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("MacAddr_isBcst(key->BSSID)\n"));
|
||||
ret= _FALSE;
|
||||
ret= false;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
@ -967,7 +967,7 @@ _func_enter_;
|
|||
goto exit;
|
||||
}
|
||||
|
||||
bgroup = _FALSE;
|
||||
bgroup = false;
|
||||
|
||||
// Check the pairwise key. Added by Annie, 2005-07-06.
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("------------------------------------------\n"));
|
||||
|
@ -1017,7 +1017,7 @@ _func_enter_;
|
|||
|
||||
}
|
||||
|
||||
if ((check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE)==_TRUE) && (IS_MAC_ADDRESS_BROADCAST(key->BSSID) == _FALSE)) {
|
||||
if ((check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE)==true) && (IS_MAC_ADDRESS_BROADCAST(key->BSSID) == false)) {
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,(" IBSS but BSSID is not Broadcast Address.\n"));
|
||||
ret= _FAIL;
|
||||
goto exit;
|
||||
|
@ -1046,15 +1046,15 @@ _func_enter_;
|
|||
}
|
||||
|
||||
if (key->KeyIndex & 0x8000000) {//error ??? 0x8000_0000
|
||||
bgrouptkey = _TRUE;
|
||||
bgrouptkey = true;
|
||||
}
|
||||
|
||||
if ((check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE)==_TRUE)&&(check_fwstate(&padapter->mlmepriv, _FW_LINKED)==_TRUE))
|
||||
if ((check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE)==true)&&(check_fwstate(&padapter->mlmepriv, _FW_LINKED)==true))
|
||||
{
|
||||
bgrouptkey = _TRUE;
|
||||
bgrouptkey = true;
|
||||
}
|
||||
|
||||
bgroup = _TRUE;
|
||||
bgroup = true;
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("------------------------------------------\n") );
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("[Group Key set]\n") );
|
||||
|
@ -1097,7 +1097,7 @@ _func_enter_;
|
|||
if (key->KeyIndex & 0x20000000){
|
||||
// SetRSC
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("OID_802_11_ADD_KEY: +++++ SetRSC+++++\n"));
|
||||
if (bgroup == _TRUE)
|
||||
if (bgroup == true)
|
||||
{
|
||||
NDIS_802_11_KEY_RSC keysrc=key->KeyRSC & 0x00FFFFFFFFFFFFULL;
|
||||
_rtw_memcpy(&padapter->securitypriv.dot11Grprxpn, &keysrc, 8);
|
||||
|
@ -1112,11 +1112,11 @@ _func_enter_;
|
|||
|
||||
// Indicate this key idx is used for TX
|
||||
// Save the key in KeyMaterial
|
||||
if (bgroup == _TRUE) // Group transmit key
|
||||
if (bgroup == true) // Group transmit key
|
||||
{
|
||||
int res;
|
||||
|
||||
if (bgrouptkey == _TRUE)
|
||||
if (bgrouptkey == true)
|
||||
{
|
||||
padapter->securitypriv.dot118021XGrpKeyid=(u8)key->KeyIndex;
|
||||
}
|
||||
|
@ -1162,9 +1162,9 @@ _func_enter_;
|
|||
|
||||
key->KeyIndex=key->KeyIndex & 0x03;
|
||||
|
||||
padapter->securitypriv.binstallGrpkey=_TRUE;
|
||||
padapter->securitypriv.binstallGrpkey=true;
|
||||
|
||||
padapter->securitypriv.bcheck_grpkey=_FALSE;
|
||||
padapter->securitypriv.bcheck_grpkey=false;
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("reset group key"));
|
||||
|
||||
|
@ -1191,7 +1191,7 @@ _func_enter_;
|
|||
|
||||
if (encryptionalgo== _TKIP_)
|
||||
{
|
||||
padapter->securitypriv.busetkipkey=_FALSE;
|
||||
padapter->securitypriv.busetkipkey=false;
|
||||
|
||||
//_set_timer(&padapter->securitypriv.tkip_timer, 50);
|
||||
|
||||
|
@ -1218,15 +1218,15 @@ _func_enter_;
|
|||
//Set key to CAM through H2C command
|
||||
if (bgrouptkey)//never go to here
|
||||
{
|
||||
res=rtw_setstakey_cmd(padapter, (unsigned char *)stainfo, _FALSE);
|
||||
res=rtw_setstakey_cmd(padapter, (unsigned char *)stainfo, false);
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n rtw_set_802_11_add_key:rtw_setstakey_cmd(group)\n"));
|
||||
}
|
||||
else{
|
||||
res=rtw_setstakey_cmd(padapter, (unsigned char *)stainfo, _TRUE);
|
||||
res=rtw_setstakey_cmd(padapter, (unsigned char *)stainfo, true);
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n rtw_set_802_11_add_key:rtw_setstakey_cmd(unicast)\n"));
|
||||
}
|
||||
|
||||
if (res ==_FALSE)
|
||||
if (res ==false)
|
||||
ret= _FAIL;
|
||||
|
||||
}
|
||||
|
@ -1245,7 +1245,7 @@ u8 rtw_set_802_11_remove_key(_adapter* padapter, NDIS_802_11_REMOVE_KEY *key){
|
|||
uint encryptionalgo;
|
||||
u8 * pbssid;
|
||||
struct sta_info *stainfo;
|
||||
u8 bgroup = (key->KeyIndex & 0x4000000) > 0 ? _FALSE: _TRUE;
|
||||
u8 bgroup = (key->KeyIndex & 0x4000000) > 0 ? false: true;
|
||||
u8 keyIndex = (u8)key->KeyIndex & 0x03;
|
||||
u8 ret=_SUCCESS;
|
||||
|
||||
|
@ -1256,7 +1256,7 @@ _func_enter_;
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (bgroup == _TRUE) {
|
||||
if (bgroup == true) {
|
||||
encryptionalgo= padapter->securitypriv.dot118021XGrpPrivacy;
|
||||
// clear group key by index
|
||||
//NdisZeroMemory(Adapter->MgntInfo.SecurityInfo.KeyBuf[keyIndex], MAX_WEP_KEY_LEN);
|
||||
|
@ -1289,7 +1289,7 @@ exit:
|
|||
|
||||
_func_exit_;
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
@ -1320,13 +1320,13 @@ u16 rtw_get_cur_max_rate(_adapter *adapter)
|
|||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (adapter->registrypriv.mp_mode == 1)
|
||||
{
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true)
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) != _TRUE)
|
||||
&& (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) != _TRUE))
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) != true)
|
||||
&& (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) != true))
|
||||
return 0;
|
||||
|
||||
#ifdef CONFIG_80211N_HT
|
||||
|
|
|
@ -99,27 +99,27 @@ int rtw_IOL_append_cmds(struct xmit_frame *xmit_frame, u8 *IOL_cmds, u32 cmd_len
|
|||
bool rtw_IOL_applied(ADAPTER *adapter)
|
||||
{
|
||||
if (1 == adapter->registrypriv.fw_iol)
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
if ((2 == adapter->registrypriv.fw_iol) && (!adapter_to_dvobj(adapter)->ishighspeed))
|
||||
return _TRUE;
|
||||
return true;
|
||||
#endif
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
bool rtw_IOL_applied(ADAPTER *adapter)
|
||||
{
|
||||
if (adapter->registrypriv.fw_iol)
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
if (!adapter_to_dvobj(adapter)->ishighspeed)
|
||||
return _TRUE;
|
||||
return true;
|
||||
#endif
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
|
@ -250,14 +250,14 @@ int rtw_IOL_append_END_cmd(struct xmit_frame *xmit_frame)
|
|||
|
||||
u8 rtw_IOL_cmd_boundary_handle(struct xmit_frame *pxmit_frame)
|
||||
{
|
||||
u8 is_cmd_bndy = _FALSE;
|
||||
u8 is_cmd_bndy = false;
|
||||
if (((pxmit_frame->attrib.pktlen+32)%256) + 8 >= 256){
|
||||
rtw_IOL_append_END_cmd(pxmit_frame);
|
||||
pxmit_frame->attrib.pktlen = ((((pxmit_frame->attrib.pktlen+32)/256)+1)*256 );
|
||||
|
||||
//printk("==> %s, pktlen(%d)\n",__func__,pxmit_frame->attrib.pktlen);
|
||||
pxmit_frame->attrib.last_txcmdsz = pxmit_frame->attrib.pktlen;
|
||||
is_cmd_bndy = _TRUE;
|
||||
is_cmd_bndy = true;
|
||||
}
|
||||
return is_cmd_bndy;
|
||||
}
|
||||
|
|
468
core/rtw_led.c
468
core/rtw_led.c
File diff suppressed because it is too large
Load diff
282
core/rtw_mlme.c
282
core/rtw_mlme.c
|
@ -200,7 +200,7 @@ _func_enter_;
|
|||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
|
||||
if (_rtw_queue_empty(queue) == _TRUE)
|
||||
if (_rtw_queue_empty(queue) == true)
|
||||
|
||||
pnetwork = NULL;
|
||||
|
||||
|
@ -229,7 +229,7 @@ _func_enter_;
|
|||
|
||||
_enter_critical_bh(&free_queue->lock, &irqL);
|
||||
|
||||
if (_rtw_queue_empty(free_queue) == _TRUE) {
|
||||
if (_rtw_queue_empty(free_queue) == true) {
|
||||
pnetwork=NULL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ _func_enter_;
|
|||
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("_rtw_alloc_network: ptr=%p\n", plist));
|
||||
pnetwork->network_type = 0;
|
||||
pnetwork->fixed = _FALSE;
|
||||
pnetwork->fixed = false;
|
||||
pnetwork->last_scanned = rtw_get_current_time();
|
||||
pnetwork->aid=0;
|
||||
pnetwork->join_res=0;
|
||||
|
@ -268,13 +268,13 @@ _func_enter_;
|
|||
if (pnetwork == NULL)
|
||||
goto exit;
|
||||
|
||||
if (pnetwork->fixed == _TRUE)
|
||||
if (pnetwork->fixed == true)
|
||||
goto exit;
|
||||
|
||||
curr_time = rtw_get_current_time();
|
||||
|
||||
if ( (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)==_TRUE ) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)==_TRUE ) )
|
||||
if ( (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)==true ) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)==true ) )
|
||||
lifetime = 1;
|
||||
|
||||
if (!isfreeall)
|
||||
|
@ -342,7 +342,7 @@ _func_enter_;
|
|||
if (pnetwork == NULL)
|
||||
goto exit;
|
||||
|
||||
if (pnetwork->fixed == _TRUE)
|
||||
if (pnetwork->fixed == true)
|
||||
goto exit;
|
||||
|
||||
//_enter_critical(&free_queue->lock, &irqL);
|
||||
|
@ -391,7 +391,7 @@ _func_enter_;
|
|||
{
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network ,list);
|
||||
|
||||
if (_rtw_memcmp(addr, pnetwork->network.MacAddress, ETH_ALEN) == _TRUE)
|
||||
if (_rtw_memcmp(addr, pnetwork->network.MacAddress, ETH_ALEN) == true)
|
||||
break;
|
||||
|
||||
plist = get_next(plist);
|
||||
|
@ -427,7 +427,7 @@ _func_enter_;
|
|||
phead = get_list_head(scanned_queue);
|
||||
plist = get_next(phead);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE)
|
||||
while (rtw_end_of_queue_search(phead, plist) == false)
|
||||
{
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
|
@ -453,12 +453,12 @@ sint rtw_if_up(_adapter *padapter) {
|
|||
_func_enter_;
|
||||
|
||||
if ( padapter->bDriverStopped || padapter->bSurpriseRemoved ||
|
||||
(check_fwstate(&padapter->mlmepriv, _FW_LINKED)== _FALSE)){
|
||||
(check_fwstate(&padapter->mlmepriv, _FW_LINKED)== false)){
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_if_up:bDriverStopped(%d) OR bSurpriseRemoved(%d)", padapter->bDriverStopped, padapter->bSurpriseRemoved));
|
||||
res=_FALSE;
|
||||
res=false;
|
||||
}
|
||||
else
|
||||
res= _TRUE;
|
||||
res= true;
|
||||
|
||||
_func_exit_;
|
||||
return res;
|
||||
|
@ -597,22 +597,22 @@ struct wlan_network *rtw_find_network(_queue *scanned_queue, u8 *addr)
|
|||
|
||||
int rtw_is_same_ibss(_adapter *adapter, struct wlan_network *pnetwork)
|
||||
{
|
||||
int ret=_TRUE;
|
||||
int ret=true;
|
||||
struct security_priv *psecuritypriv = &adapter->securitypriv;
|
||||
|
||||
if ( (psecuritypriv->dot11PrivacyAlgrthm != _NO_PRIVACY_ ) &&
|
||||
( pnetwork->network.Privacy == 0 ) )
|
||||
{
|
||||
ret=_FALSE;
|
||||
ret=false;
|
||||
}
|
||||
else if ((psecuritypriv->dot11PrivacyAlgrthm == _NO_PRIVACY_ ) &&
|
||||
( pnetwork->network.Privacy == 1 ) )
|
||||
{
|
||||
ret=_FALSE;
|
||||
ret=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret=_TRUE;
|
||||
ret=true;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -625,7 +625,7 @@ inline int is_same_ess(WLAN_BSSID_EX *a, WLAN_BSSID_EX *b)
|
|||
//RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("(%s,%d)(%s,%d)\n",
|
||||
// a->Ssid.Ssid,a->Ssid.SsidLength,b->Ssid.Ssid,b->Ssid.SsidLength));
|
||||
return (a->Ssid.SsidLength == b->Ssid.SsidLength)
|
||||
&& _rtw_memcmp(a->Ssid.Ssid, b->Ssid.Ssid, a->Ssid.SsidLength)==_TRUE;
|
||||
&& _rtw_memcmp(a->Ssid.Ssid, b->Ssid.Ssid, a->Ssid.SsidLength)==true;
|
||||
}
|
||||
|
||||
int is_same_network(WLAN_BSSID_EX *src, WLAN_BSSID_EX *dst)
|
||||
|
@ -644,7 +644,7 @@ _func_enter_;
|
|||
|
||||
KeBugCheckEx(0x87110000, (ULONG_PTR)dst, (ULONG_PTR)src,(ULONG_PTR)&s_cap, (ULONG_PTR)&d_cap);
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -660,8 +660,8 @@ _func_exit_;
|
|||
|
||||
return ((src->Ssid.SsidLength == dst->Ssid.SsidLength) &&
|
||||
// (src->Configuration.DSConfig == dst->Configuration.DSConfig) &&
|
||||
( (_rtw_memcmp(src->MacAddress, dst->MacAddress, ETH_ALEN)) == _TRUE) &&
|
||||
( (_rtw_memcmp(src->Ssid.Ssid, dst->Ssid.Ssid, src->Ssid.SsidLength)) == _TRUE) &&
|
||||
( (_rtw_memcmp(src->MacAddress, dst->MacAddress, ETH_ALEN)) == true) &&
|
||||
( (_rtw_memcmp(src->Ssid.Ssid, dst->Ssid.Ssid, src->Ssid.SsidLength)) == true) &&
|
||||
((s_cap & WLAN_CAPABILITY_IBSS) ==
|
||||
(d_cap & WLAN_CAPABILITY_IBSS)) &&
|
||||
((s_cap & WLAN_CAPABILITY_BSS) ==
|
||||
|
@ -684,12 +684,12 @@ _func_enter_;
|
|||
while (1)
|
||||
{
|
||||
|
||||
if (rtw_end_of_queue_search(phead,plist)== _TRUE)
|
||||
if (rtw_end_of_queue_search(phead,plist)== true)
|
||||
break;
|
||||
|
||||
pwlan= LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
|
||||
if (pwlan->fixed!=_TRUE)
|
||||
if (pwlan->fixed!=true)
|
||||
{
|
||||
if (oldest == NULL ||time_after(oldest->last_scanned, pwlan->last_scanned))
|
||||
oldest = pwlan;
|
||||
|
@ -790,9 +790,9 @@ _func_enter_;
|
|||
}
|
||||
#endif
|
||||
|
||||
if ( (check_fwstate(pmlmepriv, _FW_LINKED)== _TRUE) && (is_same_network(&(pmlmepriv->cur_network.network), pnetwork)))
|
||||
if ( (check_fwstate(pmlmepriv, _FW_LINKED)== true) && (is_same_network(&(pmlmepriv->cur_network.network), pnetwork)))
|
||||
{
|
||||
update_network(&(pmlmepriv->cur_network.network), pnetwork,adapter, _TRUE);
|
||||
update_network(&(pmlmepriv->cur_network.network), pnetwork,adapter, true);
|
||||
rtw_update_protection(adapter, (pmlmepriv->cur_network.network.IEs) + sizeof (NDIS_802_11_FIXED_IEs),
|
||||
pmlmepriv->cur_network.network.IELength);
|
||||
}
|
||||
|
@ -820,7 +820,7 @@ _func_enter_;
|
|||
|
||||
while (1)
|
||||
{
|
||||
if (rtw_end_of_queue_search(phead,plist)== _TRUE)
|
||||
if (rtw_end_of_queue_search(phead,plist)== true)
|
||||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
|
@ -846,9 +846,9 @@ _func_enter_;
|
|||
|
||||
/* If we didn't find a match, then get a new network slot to initialize
|
||||
* with this beacon's information */
|
||||
if (rtw_end_of_queue_search(phead,plist)== _TRUE) {
|
||||
if (rtw_end_of_queue_search(phead,plist)== true) {
|
||||
|
||||
if (_rtw_queue_empty(&(pmlmepriv->free_bss_pool)) == _TRUE) {
|
||||
if (_rtw_queue_empty(&(pmlmepriv->free_bss_pool)) == true) {
|
||||
/* If there are no more slots, expire the oldest */
|
||||
//list_del_init(&oldest->list);
|
||||
pnetwork = oldest;
|
||||
|
@ -860,7 +860,7 @@ _func_enter_;
|
|||
_rtw_memcpy(&(pnetwork->network), target, get_WLAN_BSSID_EX_sz(target));
|
||||
//pnetwork->last_scanned = rtw_get_current_time();
|
||||
// variable initialize
|
||||
pnetwork->fixed = _FALSE;
|
||||
pnetwork->fixed = false;
|
||||
pnetwork->last_scanned = rtw_get_current_time();
|
||||
|
||||
pnetwork->network_type = 0;
|
||||
|
@ -904,13 +904,13 @@ _func_enter_;
|
|||
* be already expired. In this case we do the same as we found a new
|
||||
* net and call the new_net handler
|
||||
*/
|
||||
bool update_ie = _TRUE;
|
||||
bool update_ie = true;
|
||||
|
||||
pnetwork->last_scanned = rtw_get_current_time();
|
||||
|
||||
//target.Reserved[0]==1, means that scaned network is a bcn frame.
|
||||
if ((pnetwork->network.IELength>target->IELength) && (target->Reserved[0]==1))
|
||||
update_ie = _FALSE;
|
||||
update_ie = false;
|
||||
|
||||
update_network(&(pnetwork->network), target,adapter, update_ie);
|
||||
}
|
||||
|
@ -962,7 +962,7 @@ int rtw_is_desired_network(_adapter *adapter, struct wlan_network *pnetwork)
|
|||
//u8 wps_ie[512];
|
||||
uint wps_ielen;
|
||||
|
||||
int bselected = _TRUE;
|
||||
int bselected = true;
|
||||
|
||||
desired_encmode = psecuritypriv->ndisencryptstatus;
|
||||
privacy = pnetwork->network.Privacy;
|
||||
|
@ -971,29 +971,29 @@ int rtw_is_desired_network(_adapter *adapter, struct wlan_network *pnetwork)
|
|||
{
|
||||
if (rtw_get_wps_ie(pnetwork->network.IEs+_FIXED_IE_LENGTH_, pnetwork->network.IELength-_FIXED_IE_LENGTH_, NULL, &wps_ielen)!=NULL)
|
||||
{
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (adapter->registrypriv.wifi_spec == 1) //for correct flow of 8021X to do....
|
||||
{
|
||||
if ((desired_encmode == Ndis802_11EncryptionDisabled) && (privacy != 0))
|
||||
bselected = _FALSE;
|
||||
bselected = false;
|
||||
}
|
||||
|
||||
|
||||
if ((desired_encmode != Ndis802_11EncryptionDisabled) && (privacy == 0)) {
|
||||
DBG_88E("desired_encmode: %d, privacy: %d\n", desired_encmode, privacy);
|
||||
bselected = _FALSE;
|
||||
bselected = false;
|
||||
}
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true)
|
||||
{
|
||||
if (pnetwork->network.InfrastructureMode != pmlmepriv->cur_network.network.InfrastructureMode)
|
||||
bselected = _FALSE;
|
||||
bselected = false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1054,7 +1054,7 @@ _func_enter_;
|
|||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
// update IBSS_network 's timestamp
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) == _TRUE)
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) == true)
|
||||
{
|
||||
//RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,"rtw_survey_event_callback : WIFI_ADHOC_MASTER_STATE\n\n");
|
||||
if (_rtw_memcmp(&(pmlmepriv->cur_network.network.MacAddress), pnetwork->MacAddress, ETH_ALEN))
|
||||
|
@ -1076,7 +1076,7 @@ _func_enter_;
|
|||
}
|
||||
|
||||
// lock pmlmepriv->lock when you accessing network_q
|
||||
if ((check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) == _FALSE)
|
||||
if ((check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) == false)
|
||||
{
|
||||
if ( pnetwork->Ssid.Ssid[0] == 0 )
|
||||
{
|
||||
|
@ -1138,11 +1138,11 @@ _func_enter_;
|
|||
rtw_set_signal_stat_timer(&adapter->recvpriv);
|
||||
#endif
|
||||
|
||||
if (pmlmepriv->to_join == _TRUE)
|
||||
if (pmlmepriv->to_join == true)
|
||||
{
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)==_TRUE) )
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)==true) )
|
||||
{
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED)==_FALSE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED)==false)
|
||||
{
|
||||
set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
|
||||
|
||||
|
@ -1173,7 +1173,7 @@ _func_enter_;
|
|||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("Error=>rtw_createbss_cmd status FAIL\n"));
|
||||
}
|
||||
|
||||
pmlmepriv->to_join = _FALSE;
|
||||
pmlmepriv->to_join = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1181,7 +1181,7 @@ _func_enter_;
|
|||
{
|
||||
int s_ret;
|
||||
set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
|
||||
pmlmepriv->to_join = _FALSE;
|
||||
pmlmepriv->to_join = false;
|
||||
if (_SUCCESS == (s_ret=rtw_select_and_join_from_scanned_queue(pmlmepriv)))
|
||||
{
|
||||
_set_timer(&pmlmepriv->assoc_timer, MAX_JOIN_TIMEOUT);
|
||||
|
@ -1208,7 +1208,7 @@ _func_enter_;
|
|||
rtw_free_assoc_resources(adapter, 1);
|
||||
rtw_indicate_disconnect(adapter);
|
||||
} else {
|
||||
pmlmepriv->to_join = _TRUE;
|
||||
pmlmepriv->to_join = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -1223,7 +1223,7 @@ _func_enter_;
|
|||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
#ifdef CONFIG_P2P_PS
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
|
||||
p2p_ps_wk_cmd(adapter, P2P_PS_SCAN_DONE, 0);
|
||||
}
|
||||
#endif // CONFIG_P2P_PS
|
||||
|
@ -1363,7 +1363,7 @@ _func_enter_;
|
|||
pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress);
|
||||
if (pwlan)
|
||||
{
|
||||
pwlan->fixed = _FALSE;
|
||||
pwlan->fixed = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1398,7 +1398,7 @@ _func_enter_;
|
|||
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("+rtw_indicate_connect\n"));
|
||||
|
||||
pmlmepriv->to_join = _FALSE;
|
||||
pmlmepriv->to_join = false;
|
||||
|
||||
if (!check_fwstate(&padapter->mlmepriv, _FW_LINKED))
|
||||
{
|
||||
|
@ -1499,7 +1499,7 @@ _func_enter_;
|
|||
|
||||
#ifdef CONFIG_LPS
|
||||
#ifdef CONFIG_WOWLAN
|
||||
if (padapter->pwrctrlpriv.wowlan_mode==_FALSE)
|
||||
if (padapter->pwrctrlpriv.wowlan_mode==false)
|
||||
#endif //CONFIG_WOWLAN
|
||||
rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_DISCONNECT, 1);
|
||||
#endif
|
||||
|
@ -1520,7 +1520,7 @@ void rtw_scan_abort(_adapter *adapter)
|
|||
struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv);
|
||||
|
||||
start = rtw_get_current_time();
|
||||
pmlmeext->scan_abort = _TRUE;
|
||||
pmlmeext->scan_abort = true;
|
||||
while (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)
|
||||
&& rtw_get_passing_time_ms(start) <= 200) {
|
||||
|
||||
|
@ -1539,9 +1539,9 @@ void rtw_scan_abort(_adapter *adapter)
|
|||
set_survey_timer(pmlmeext, 0);
|
||||
_set_timer(&pmlmepriv->scan_to_timer, 50);
|
||||
#endif
|
||||
rtw_indicate_scan_done(adapter, _TRUE);
|
||||
rtw_indicate_scan_done(adapter, true);
|
||||
}
|
||||
pmlmeext->scan_abort = _FALSE;
|
||||
pmlmeext->scan_abort = false;
|
||||
}
|
||||
|
||||
static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wlan_network *pnetwork)
|
||||
|
@ -1572,16 +1572,16 @@ static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wl
|
|||
#endif
|
||||
|
||||
//sta mode
|
||||
rtw_hal_set_odm_var(padapter,HAL_ODM_STA_INFO,psta,_TRUE);
|
||||
rtw_hal_set_odm_var(padapter,HAL_ODM_STA_INFO,psta,true);
|
||||
|
||||
//security related
|
||||
if (padapter->securitypriv.dot11AuthAlgrthm== dot11AuthAlgrthm_8021X)
|
||||
{
|
||||
padapter->securitypriv.binstallGrpkey=_FALSE;
|
||||
padapter->securitypriv.busetkipkey=_FALSE;
|
||||
padapter->securitypriv.bgrpkey_handshake=_FALSE;
|
||||
padapter->securitypriv.binstallGrpkey=false;
|
||||
padapter->securitypriv.busetkipkey=false;
|
||||
padapter->securitypriv.bgrpkey_handshake=false;
|
||||
|
||||
psta->ieee8021x_blocked=_TRUE;
|
||||
psta->ieee8021x_blocked=true;
|
||||
psta->dot118021XPrivacy=padapter->securitypriv.dot11PrivacyAlgrthm;
|
||||
|
||||
_rtw_memset((u8 *)&psta->dot118021x_UncstKey, 0, sizeof (union Keytype));
|
||||
|
@ -1598,7 +1598,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wl
|
|||
// And the Wi-Fi driver shouldn't allow the data packet to be tramsmitted.
|
||||
if ( padapter->securitypriv.wps_ie_len != 0 )
|
||||
{
|
||||
psta->ieee8021x_blocked=_TRUE;
|
||||
psta->ieee8021x_blocked=true;
|
||||
padapter->securitypriv.wps_ie_len = 0;
|
||||
}
|
||||
|
||||
|
@ -1610,7 +1610,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wl
|
|||
{
|
||||
//preorder_ctrl = &precvpriv->recvreorder_ctrl[i];
|
||||
preorder_ctrl = &psta->recvreorder_ctrl[i];
|
||||
preorder_ctrl->enable = _FALSE;
|
||||
preorder_ctrl->enable = false;
|
||||
preorder_ctrl->indicate_seq = 0xffff;
|
||||
#ifdef DBG_RX_SEQ
|
||||
DBG_88E("DBG_RX_SEQ %s:%d indicate_seq:%u\n", __func__, __LINE__,
|
||||
|
@ -1628,7 +1628,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wl
|
|||
{
|
||||
//preorder_ctrl = &precvpriv->recvreorder_ctrl[i];
|
||||
preorder_ctrl = &bmc_sta->recvreorder_ctrl[i];
|
||||
preorder_ctrl->enable = _FALSE;
|
||||
preorder_ctrl->enable = false;
|
||||
preorder_ctrl->indicate_seq = 0xffff;
|
||||
#ifdef DBG_RX_SEQ
|
||||
DBG_88E("DBG_RX_SEQ %s:%d indicate_seq:%u\n", __func__, __LINE__,
|
||||
|
@ -1740,7 +1740,7 @@ void rtw_joinbss_event_prehandle(_adapter *adapter, u8 *pbuf)
|
|||
struct wlan_network *pnetwork = (struct wlan_network *)pbuf;
|
||||
struct wlan_network *cur_network = &(pmlmepriv->cur_network);
|
||||
struct wlan_network *pcur_wlan = NULL, *ptarget_wlan = NULL;
|
||||
unsigned int the_same_macaddr = _FALSE;
|
||||
unsigned int the_same_macaddr = false;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -1801,14 +1801,14 @@ _func_enter_;
|
|||
//s1. find ptarget_wlan
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) )
|
||||
{
|
||||
if (the_same_macaddr == _TRUE)
|
||||
if (the_same_macaddr == true)
|
||||
{
|
||||
ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, cur_network->network.MacAddress);
|
||||
}
|
||||
else
|
||||
{
|
||||
pcur_wlan = rtw_find_network(&pmlmepriv->scanned_queue, cur_network->network.MacAddress);
|
||||
if (pcur_wlan) pcur_wlan->fixed = _FALSE;
|
||||
if (pcur_wlan) pcur_wlan->fixed = false;
|
||||
|
||||
pcur_sta = rtw_get_stainfo(pstapriv, cur_network->network.MacAddress);
|
||||
if (pcur_sta){
|
||||
|
@ -1818,8 +1818,8 @@ _func_enter_;
|
|||
}
|
||||
|
||||
ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->network.MacAddress);
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE){
|
||||
if (ptarget_wlan) ptarget_wlan->fixed = _TRUE;
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true){
|
||||
if (ptarget_wlan) ptarget_wlan->fixed = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1827,8 +1827,8 @@ _func_enter_;
|
|||
else
|
||||
{
|
||||
ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->network.MacAddress);
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE){
|
||||
if (ptarget_wlan) ptarget_wlan->fixed = _TRUE;
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true){
|
||||
if (ptarget_wlan) ptarget_wlan->fixed = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1846,7 +1846,7 @@ _func_enter_;
|
|||
|
||||
|
||||
//s3. find ptarget_sta & update ptarget_sta after update cur_network only for station mode
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)
|
||||
{
|
||||
ptarget_sta = rtw_joinbss_update_stainfo(adapter, pnetwork);
|
||||
if (ptarget_sta==NULL)
|
||||
|
@ -1858,7 +1858,7 @@ _func_enter_;
|
|||
}
|
||||
|
||||
//s4. indicate connect
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)
|
||||
{
|
||||
rtw_indicate_connect(adapter);
|
||||
}
|
||||
|
@ -1892,7 +1892,7 @@ _func_enter_;
|
|||
|
||||
//rtw_free_assoc_resources(adapter, 1);
|
||||
|
||||
if ((check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) == _TRUE)
|
||||
if ((check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) == true)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("fail! clear _FW_UNDER_LINKING ^^^fw_state=%x\n", get_fwstate(pmlmepriv)));
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||
|
@ -2032,7 +2032,7 @@ void rtw_stassoc_event_callback(_adapter *adapter, u8 *pbuf)
|
|||
|
||||
_func_enter_;
|
||||
|
||||
if (rtw_access_ctrl(adapter, pstassoc->macaddr) == _FALSE)
|
||||
if (rtw_access_ctrl(adapter, pstassoc->macaddr) == false)
|
||||
return;
|
||||
|
||||
#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME)
|
||||
|
@ -2107,7 +2107,7 @@ _func_enter_;
|
|||
//psta->aid = (uint)pstassoc->cam_id;
|
||||
DBG_88E("%s\n",__func__);
|
||||
//for ad-hoc mode
|
||||
rtw_hal_set_odm_var(adapter,HAL_ODM_STA_INFO,psta,_TRUE);
|
||||
rtw_hal_set_odm_var(adapter,HAL_ODM_STA_INFO,psta,true);
|
||||
|
||||
rtw_stassoc_hw_rpt(adapter,psta);
|
||||
|
||||
|
@ -2115,18 +2115,18 @@ _func_enter_;
|
|||
psta->dot118021XPrivacy = adapter->securitypriv.dot11PrivacyAlgrthm;
|
||||
|
||||
|
||||
psta->ieee8021x_blocked = _FALSE;
|
||||
psta->ieee8021x_blocked = false;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
if ( (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)==_TRUE ) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)==_TRUE ) )
|
||||
if ( (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)==true ) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)==true ) )
|
||||
{
|
||||
if (adapter->stapriv.asoc_sta_count== 2)
|
||||
{
|
||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, cur_network->network.MacAddress);
|
||||
if (ptarget_wlan) ptarget_wlan->fixed = _TRUE;
|
||||
if (ptarget_wlan) ptarget_wlan->fixed = true;
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
// a sta + bc/mc_stainfo (not Ibss_stainfo)
|
||||
rtw_indicate_connect(adapter);
|
||||
|
@ -2140,7 +2140,7 @@ _func_enter_;
|
|||
|
||||
#ifdef CONFIG_RTL8711
|
||||
//submit SetStaKey_cmd to tell fw, fw will allocate an CAM entry for this sta
|
||||
rtw_setstakey_cmd(adapter, (unsigned char*)psta, _FALSE);
|
||||
rtw_setstakey_cmd(adapter, (unsigned char*)psta, false);
|
||||
#endif
|
||||
|
||||
exit:
|
||||
|
@ -2218,7 +2218,7 @@ _func_enter_;
|
|||
// remove the network entry in scanned_queue
|
||||
pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress);
|
||||
if (pwlan) {
|
||||
pwlan->fixed = _FALSE;
|
||||
pwlan->fixed = false;
|
||||
rtw_free_network_nolock(pmlmepriv, pwlan);
|
||||
}
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
|
@ -2245,7 +2245,7 @@ _func_enter_;
|
|||
pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress);
|
||||
if (pwlan)
|
||||
{
|
||||
pwlan->fixed = _FALSE;
|
||||
pwlan->fixed = false;
|
||||
rtw_free_network_nolock(pmlmepriv, pwlan);
|
||||
}
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
|
@ -2402,7 +2402,7 @@ void rtw_scan_timeout_handler (_adapter *adapter)
|
|||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
rtw_indicate_scan_done(adapter, _TRUE);
|
||||
rtw_indicate_scan_done(adapter, true);
|
||||
|
||||
}
|
||||
|
||||
|
@ -2418,13 +2418,13 @@ static void rtw_auto_scan_handler(_adapter *padapter)
|
|||
if (pmlmepriv->scan_interval==0)
|
||||
{
|
||||
/*
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
|
||||
{
|
||||
DBG_88E("exit %s when _FW_UNDER_SURVEY|_FW_UNDER_LINKING ->\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
if (pmlmepriv->sitesurveyctrl.traffic_busy == _TRUE)
|
||||
if (pmlmepriv->sitesurveyctrl.traffic_busy == true)
|
||||
{
|
||||
DBG_88E("%s exit cause traffic_busy(%x)\n",__func__, pmlmepriv->sitesurveyctrl.traffic_busy);
|
||||
return;
|
||||
|
@ -2434,8 +2434,8 @@ static void rtw_auto_scan_handler(_adapter *padapter)
|
|||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (rtw_buddy_adapter_up(padapter))
|
||||
{
|
||||
if ((check_buddy_fwstate(padapter, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == _TRUE) ||
|
||||
(padapter->pbuddy_adapter->mlmepriv.LinkDetectInfo.bBusyTraffic == _TRUE))
|
||||
if ((check_buddy_fwstate(padapter, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true) ||
|
||||
(padapter->pbuddy_adapter->mlmepriv.LinkDetectInfo.bBusyTraffic == true))
|
||||
{
|
||||
DBG_88E("%s, but buddy_intf is under scanning or linking or BusyTraffic\n", __func__);
|
||||
return;
|
||||
|
@ -2471,24 +2471,24 @@ void rtw_dynamic_check_timer_handlder(_adapter *adapter)
|
|||
if (adapter->HalFunc.hal_checke_bt_hang)
|
||||
adapter->HalFunc.hal_checke_bt_hang(adapter);
|
||||
#endif
|
||||
if (adapter->hw_init_completed == _FALSE)
|
||||
if (adapter->hw_init_completed == false)
|
||||
return;
|
||||
|
||||
if ((adapter->bDriverStopped == _TRUE)||(adapter->bSurpriseRemoved== _TRUE))
|
||||
if ((adapter->bDriverStopped == true)||(adapter->bSurpriseRemoved== true))
|
||||
return;
|
||||
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (pbuddy_adapter)
|
||||
{
|
||||
if (adapter->net_closed == _TRUE && pbuddy_adapter->net_closed == _TRUE)
|
||||
if (adapter->net_closed == true && pbuddy_adapter->net_closed == true)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
if (adapter->net_closed == _TRUE)
|
||||
if (adapter->net_closed == true)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -2509,7 +2509,7 @@ void rtw_dynamic_check_timer_handlder(_adapter *adapter)
|
|||
|
||||
#ifndef CONFIG_ACTIVE_KEEP_ALIVE_CHECK
|
||||
#ifdef CONFIG_AP_MODE
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||
{
|
||||
expire_timeout_chk(adapter);
|
||||
}
|
||||
|
@ -2527,7 +2527,7 @@ void rtw_dynamic_check_timer_handlder(_adapter *adapter)
|
|||
#else // (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35))
|
||||
if ( rcu_dereference(adapter->pnetdev->rx_handler_data)
|
||||
#endif // (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35))
|
||||
&& (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == _TRUE) )
|
||||
&& (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true) )
|
||||
{
|
||||
// expire NAT2.5 entry
|
||||
void nat25_db_expire(_adapter *priv);
|
||||
|
@ -2556,7 +2556,7 @@ void rtw_dynamic_check_timer_handlder(_adapter *adapter)
|
|||
inline bool rtw_is_scan_deny(_adapter *adapter)
|
||||
{
|
||||
struct mlme_priv *mlmepriv = &adapter->mlmepriv;
|
||||
return (ATOMIC_READ(&mlmepriv->set_scan_deny) != 0) ? _TRUE : _FALSE;
|
||||
return (ATOMIC_READ(&mlmepriv->set_scan_deny) != 0) ? true : false;
|
||||
}
|
||||
|
||||
inline void rtw_clear_scan_deny(_adapter *adapter)
|
||||
|
@ -2607,37 +2607,37 @@ void rtw_set_scan_deny(_adapter *adapter, u32 ms)
|
|||
#ifndef PLATFORM_FREEBSD
|
||||
/*
|
||||
* Select a new join candidate from the original @param candidate and @param competitor
|
||||
* @return _TRUE: candidate is updated
|
||||
* @return _FALSE: candidate is not updated
|
||||
* @return true: candidate is updated
|
||||
* @return false: candidate is not updated
|
||||
*/
|
||||
static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
|
||||
, struct wlan_network **candidate, struct wlan_network *competitor)
|
||||
{
|
||||
int updated = _FALSE;
|
||||
int updated = false;
|
||||
_adapter *adapter = container_of(pmlmepriv, _adapter, mlmepriv);
|
||||
|
||||
|
||||
//check bssid, if needed
|
||||
if (pmlmepriv->assoc_by_bssid==_TRUE) {
|
||||
if (_rtw_memcmp(competitor->network.MacAddress, pmlmepriv->assoc_bssid, ETH_ALEN) ==_FALSE)
|
||||
if (pmlmepriv->assoc_by_bssid==true) {
|
||||
if (_rtw_memcmp(competitor->network.MacAddress, pmlmepriv->assoc_bssid, ETH_ALEN) ==false)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
//check ssid, if needed
|
||||
if (pmlmepriv->assoc_ssid.Ssid && pmlmepriv->assoc_ssid.SsidLength) {
|
||||
if ( competitor->network.Ssid.SsidLength != pmlmepriv->assoc_ssid.SsidLength
|
||||
|| _rtw_memcmp(competitor->network.Ssid.Ssid, pmlmepriv->assoc_ssid.Ssid, pmlmepriv->assoc_ssid.SsidLength) == _FALSE
|
||||
|| _rtw_memcmp(competitor->network.Ssid.Ssid, pmlmepriv->assoc_ssid.Ssid, pmlmepriv->assoc_ssid.SsidLength) == false
|
||||
)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (rtw_is_desired_network(adapter, competitor) == _FALSE)
|
||||
if (rtw_is_desired_network(adapter, competitor) == false)
|
||||
goto exit;
|
||||
|
||||
#ifdef CONFIG_LAYER2_ROAMING
|
||||
if (pmlmepriv->to_roaming) {
|
||||
if ( rtw_get_passing_time_ms((u32)competitor->last_scanned) >= RTW_SCAN_RESULT_EXPIRE
|
||||
|| is_same_ess(&competitor->network, &pmlmepriv->cur_network.network) == _FALSE
|
||||
|| is_same_ess(&competitor->network, &pmlmepriv->cur_network.network) == false
|
||||
)
|
||||
goto exit;
|
||||
}
|
||||
|
@ -2646,7 +2646,7 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
|
|||
if (*candidate == NULL ||(*candidate)->network.Rssi<competitor->network.Rssi )
|
||||
{
|
||||
*candidate = competitor;
|
||||
updated = _TRUE;
|
||||
updated = true;
|
||||
}
|
||||
if (updated){
|
||||
DBG_88E("[by_bssid:%u][assoc_ssid:%s]"
|
||||
|
@ -2685,7 +2685,7 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv )
|
|||
_queue *queue = &(pmlmepriv->scanned_queue);
|
||||
struct wlan_network *pnetwork = NULL;
|
||||
struct wlan_network *candidate = NULL;
|
||||
u8 bSupportAntDiv = _FALSE;
|
||||
u8 bSupportAntDiv = false;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -2725,12 +2725,12 @@ _func_enter_;
|
|||
|
||||
|
||||
// check for situation of _FW_LINKED
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
{
|
||||
DBG_88E("%s: _FW_LINKED while ask_for_joinbss!!!\n", __func__);
|
||||
|
||||
{
|
||||
rtw_disassoc_cmd(adapter, 0, _TRUE);
|
||||
rtw_disassoc_cmd(adapter, 0, true);
|
||||
rtw_indicate_disconnect(adapter);
|
||||
rtw_free_assoc_resources(adapter, 0);
|
||||
}
|
||||
|
@ -2738,7 +2738,7 @@ _func_enter_;
|
|||
|
||||
#ifdef CONFIG_ANTENNA_DIVERSITY
|
||||
rtw_hal_get_def_var(adapter, HAL_DEF_IS_SUPPORT_ANT_DIV, &(bSupportAntDiv));
|
||||
if (_TRUE == bSupportAntDiv)
|
||||
if (true == bSupportAntDiv)
|
||||
{
|
||||
u8 CurrentAntenna;
|
||||
rtw_hal_get_def_var(adapter, HAL_DEF_CURRENT_ANTENNA, &(CurrentAntenna));
|
||||
|
@ -2797,13 +2797,13 @@ _func_enter_;
|
|||
|
||||
pmlmepriv->pscanned = get_next(pmlmepriv->pscanned);
|
||||
|
||||
if (pmlmepriv->assoc_by_bssid==_TRUE)
|
||||
if (pmlmepriv->assoc_by_bssid==true)
|
||||
{
|
||||
if (_rtw_memcmp(pnetwork->network.MacAddress, pmlmepriv->assoc_bssid, ETH_ALEN)==_TRUE)
|
||||
if (_rtw_memcmp(pnetwork->network.MacAddress, pmlmepriv->assoc_bssid, ETH_ALEN)==true)
|
||||
{
|
||||
//remove the condition @ 20081125
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
{
|
||||
if (is_same_network(&pmlmepriv->cur_network.network, &pnetwork->network))
|
||||
{
|
||||
|
@ -2813,7 +2813,7 @@ _func_enter_;
|
|||
}
|
||||
else
|
||||
{
|
||||
rtw_disassoc_cmd(adapter, 0, _TRUE);
|
||||
rtw_disassoc_cmd(adapter, 0, true);
|
||||
rtw_indicate_disconnect(adapter);
|
||||
rtw_free_assoc_resources(adapter, 0);
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
|
@ -2852,7 +2852,7 @@ _func_enter_;
|
|||
#endif
|
||||
|
||||
} else if ( (pnetwork->network.Ssid.SsidLength==pmlmepriv->assoc_ssid.SsidLength)
|
||||
&&((_rtw_memcmp(dst_ssid, src_ssid, pmlmepriv->assoc_ssid.SsidLength)) == _TRUE)
|
||||
&&((_rtw_memcmp(dst_ssid, src_ssid, pmlmepriv->assoc_ssid.SsidLength)) == true)
|
||||
)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("dst_ssid=%s, src_ssid=%s\n", dst_ssid, src_ssid));
|
||||
|
@ -2870,16 +2870,16 @@ _func_enter_;
|
|||
// goto ask_for_joinbss;
|
||||
//}
|
||||
|
||||
if (pmlmepriv->assoc_by_rssi==_TRUE)//if the ssid is the same, select the bss which has the max rssi
|
||||
if (pmlmepriv->assoc_by_rssi==true)//if the ssid is the same, select the bss which has the max rssi
|
||||
{
|
||||
if ( NULL==pnetwork_max_rssi|| pnetwork->network.Rssi > pnetwork_max_rssi->network.Rssi)
|
||||
pnetwork_max_rssi = pnetwork;
|
||||
}
|
||||
else if (rtw_is_desired_network(adapter, pnetwork) == _TRUE)
|
||||
else if (rtw_is_desired_network(adapter, pnetwork) == true)
|
||||
{
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
{
|
||||
rtw_disassoc_cmd(adapter, 0, _TRUE);
|
||||
rtw_disassoc_cmd(adapter, 0, true);
|
||||
rtw_free_assoc_resources(adapter, 0);
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
goto ask_for_joinbss;
|
||||
|
@ -2904,7 +2904,7 @@ _func_enter_;
|
|||
}
|
||||
#endif
|
||||
|
||||
if ((pmlmepriv->assoc_by_rssi==_TRUE) && (pnetwork_max_rssi!=NULL))
|
||||
if ((pmlmepriv->assoc_by_rssi==true) && (pnetwork_max_rssi!=NULL))
|
||||
{
|
||||
pnetwork = pnetwork_max_rssi;
|
||||
DBG_88E("select_and_join_from_scanned_queue: pnetwork_max_rssi: %s("MAC_FMT")\n",
|
||||
|
@ -3013,7 +3013,7 @@ _func_enter_;
|
|||
psetkeyparm->set_tx = set_tx;
|
||||
pmlmepriv->key_mask |= BIT(psetkeyparm->keyid);
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
if ( _TRUE == adapter->pwrctrlpriv.bInternalAutoSuspend)
|
||||
if ( true == adapter->pwrctrlpriv.bInternalAutoSuspend)
|
||||
{
|
||||
adapter->pwrctrlpriv.wepkeymask = pmlmepriv->key_mask;
|
||||
DBG_88E("....AutoSuspend pwrctrlpriv.wepkeymask(%x)\n",adapter->pwrctrlpriv.wepkeymask);
|
||||
|
@ -3132,7 +3132,7 @@ static int SecIsInPMKIDList(_adapter *Adapter, u8 *bssid)
|
|||
do
|
||||
{
|
||||
if ( ( psecuritypriv->PMKIDList[i].bUsed ) &&
|
||||
( _rtw_memcmp( psecuritypriv->PMKIDList[i].Bssid, bssid, ETH_ALEN ) == _TRUE ) )
|
||||
( _rtw_memcmp( psecuritypriv->PMKIDList[i].Bssid, bssid, ETH_ALEN ) == true ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -3369,7 +3369,7 @@ void rtw_joinbss_reset(_adapter *padapter)
|
|||
|
||||
pmlmepriv->num_sta_no_ht = 0;
|
||||
|
||||
phtpriv->ampdu_enable = _FALSE;//reset to disabled
|
||||
phtpriv->ampdu_enable = false;//reset to disabled
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
// TH=1 => means that invalidate usb rx aggregation
|
||||
|
@ -3409,7 +3409,7 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
|
|||
struct ht_priv *phtpriv = &pmlmepriv->htpriv;
|
||||
|
||||
|
||||
phtpriv->ht_option = _FALSE;
|
||||
phtpriv->ht_option = false;
|
||||
|
||||
p = rtw_get_ie(in_ie+12, _HT_CAPABILITY_IE_, &ielen, in_len-12);
|
||||
|
||||
|
@ -3472,7 +3472,7 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
|
|||
//*pout_len = *pout_len + (ielen+2);
|
||||
|
||||
|
||||
phtpriv->ht_option = _TRUE;
|
||||
phtpriv->ht_option = true;
|
||||
|
||||
p = rtw_get_ie(in_ie+12, _HT_ADD_INFO_IE_, &ielen, in_len-12);
|
||||
if (p && (ielen==sizeof(struct ieee80211_ht_addt_info)))
|
||||
|
@ -3514,20 +3514,20 @@ void rtw_update_ht_cap(_adapter *padapter, u8 *pie, uint ie_len)
|
|||
DBG_88E("+rtw_update_ht_cap()\n");
|
||||
|
||||
//maybe needs check if ap supports rx ampdu.
|
||||
if ((phtpriv->ampdu_enable==_FALSE) &&(pregistrypriv->ampdu_enable==1))
|
||||
if ((phtpriv->ampdu_enable==false) &&(pregistrypriv->ampdu_enable==1))
|
||||
{
|
||||
if (pregistrypriv->wifi_spec==1)
|
||||
{
|
||||
phtpriv->ampdu_enable = _FALSE;
|
||||
phtpriv->ampdu_enable = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
phtpriv->ampdu_enable = _TRUE;
|
||||
phtpriv->ampdu_enable = true;
|
||||
}
|
||||
}
|
||||
else if (pregistrypriv->ampdu_enable==2)
|
||||
{
|
||||
phtpriv->ampdu_enable = _TRUE;
|
||||
phtpriv->ampdu_enable = true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -3657,7 +3657,7 @@ void rtw_issue_addbareq_cmd(_adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
|
||||
phtpriv = &psta->htpriv;
|
||||
|
||||
if ((phtpriv->ht_option==_TRUE) && (phtpriv->ampdu_enable==_TRUE))
|
||||
if ((phtpriv->ht_option==true) && (phtpriv->ampdu_enable==true))
|
||||
{
|
||||
issued = (phtpriv->agg_enable_bitmap>>priority)&0x1;
|
||||
issued |= (phtpriv->candidate_tid_bitmap>>priority)&0x1;
|
||||
|
@ -3702,7 +3702,7 @@ void _rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network)
|
|||
pnetwork->network.Ssid.SsidLength);
|
||||
_rtw_memcpy(&pmlmepriv->assoc_ssid, &pnetwork->network.Ssid, sizeof(NDIS_802_11_SSID));
|
||||
|
||||
pmlmepriv->assoc_by_bssid = _FALSE;
|
||||
pmlmepriv->assoc_by_bssid = false;
|
||||
|
||||
#ifdef CONFIG_WAPI_SUPPORT
|
||||
rtw_wapi_return_all_sta_info(padapter);
|
||||
|
@ -3732,7 +3732,7 @@ void _rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network)
|
|||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
sint rtw_buddy_adapter_up(_adapter *padapter)
|
||||
{
|
||||
sint res = _FALSE;
|
||||
sint res = false;
|
||||
|
||||
if (padapter == NULL)
|
||||
return res;
|
||||
|
@ -3740,16 +3740,16 @@ sint rtw_buddy_adapter_up(_adapter *padapter)
|
|||
|
||||
if (padapter->pbuddy_adapter == NULL)
|
||||
{
|
||||
res = _FALSE;
|
||||
res = false;
|
||||
}
|
||||
else if ( (padapter->pbuddy_adapter->bDriverStopped) || (padapter->pbuddy_adapter->bSurpriseRemoved) ||
|
||||
(padapter->pbuddy_adapter->bup == _FALSE) || (padapter->pbuddy_adapter->hw_init_completed == _FALSE))
|
||||
(padapter->pbuddy_adapter->bup == false) || (padapter->pbuddy_adapter->hw_init_completed == false))
|
||||
{
|
||||
res = _FALSE;
|
||||
res = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
res = _TRUE;
|
||||
res = true;
|
||||
}
|
||||
|
||||
return res;
|
||||
|
@ -3759,34 +3759,34 @@ sint rtw_buddy_adapter_up(_adapter *padapter)
|
|||
sint check_buddy_fwstate(_adapter *padapter, sint state)
|
||||
{
|
||||
if (padapter == NULL)
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
if (padapter->pbuddy_adapter == NULL)
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
if ((state == WIFI_FW_NULL_STATE) &&
|
||||
(padapter->pbuddy_adapter->mlmepriv.fw_state == WIFI_FW_NULL_STATE))
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
if (padapter->pbuddy_adapter->mlmepriv.fw_state & state)
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
sint check_buddy_fw_link(_adapter *padapter)
|
||||
{
|
||||
if ( (check_buddy_fwstate(padapter, WIFI_AP_STATE) == _TRUE) ||
|
||||
(check_buddy_fwstate(padapter, WIFI_ADHOC_STATE|WIFI_ADHOC_MASTER_STATE) == _TRUE))
|
||||
if ( (check_buddy_fwstate(padapter, WIFI_AP_STATE) == true) ||
|
||||
(check_buddy_fwstate(padapter, WIFI_ADHOC_STATE|WIFI_ADHOC_MASTER_STATE) == true))
|
||||
{
|
||||
if (padapter->pbuddy_adapter->stapriv.asoc_sta_count > 2)
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{ //Station mode
|
||||
if (check_buddy_fwstate(padapter, _FW_LINKED)== _TRUE)
|
||||
return _TRUE;
|
||||
if (check_buddy_fwstate(padapter, _FW_LINKED)== true)
|
||||
return true;
|
||||
}
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -187,7 +187,7 @@ void mp_wi_callback(
|
|||
}
|
||||
|
||||
NdisAcquireSpinLock(&(pmp_wi_cntx->mp_wi_lock));
|
||||
pmp_wi_cntx->bmp_wi_progress= _FALSE;
|
||||
pmp_wi_cntx->bmp_wi_progress= false;
|
||||
NdisReleaseSpinLock(&(pmp_wi_cntx->mp_wi_lock));
|
||||
|
||||
if (pmp_wi_cntx->bmpdrv_unload)
|
||||
|
@ -212,8 +212,8 @@ static int init_mp_priv_by_os(struct mp_priv *pmp_priv)
|
|||
pmp_priv->tx_testcnt1 = 0;
|
||||
|
||||
pmp_wi_cntx = &pmp_priv->wi_cntx
|
||||
pmp_wi_cntx->bmpdrv_unload = _FALSE;
|
||||
pmp_wi_cntx->bmp_wi_progress = _FALSE;
|
||||
pmp_wi_cntx->bmpdrv_unload = false;
|
||||
pmp_wi_cntx->bmp_wi_progress = false;
|
||||
pmp_wi_cntx->curractfunc = NULL;
|
||||
|
||||
return _SUCCESS;
|
||||
|
@ -290,8 +290,8 @@ static void mp_init_xmit_attrib(struct mp_tx *pmptx, PADAPTER padapter)
|
|||
// do_queue_select(padapter, pattrib);
|
||||
pattrib->nr_frags = 1;
|
||||
pattrib->encrypt = 0;
|
||||
pattrib->bswenc = _FALSE;
|
||||
pattrib->qos_en = _FALSE;
|
||||
pattrib->bswenc = false;
|
||||
pattrib->qos_en = false;
|
||||
}
|
||||
|
||||
s32 init_mp_priv(PADAPTER padapter)
|
||||
|
@ -375,22 +375,22 @@ MPT_InitializeAdapter(
|
|||
//-------------------------------------------------------------------------
|
||||
// SW Initialization for 8190 MP.
|
||||
//-------------------------------------------------------------------------
|
||||
pMptCtx->bMptDrvUnload = _FALSE;
|
||||
pMptCtx->bMassProdTest = _FALSE;
|
||||
pMptCtx->bMptIndexEven = _TRUE; //default gain index is -6.0db
|
||||
pMptCtx->bMptDrvUnload = false;
|
||||
pMptCtx->bMassProdTest = false;
|
||||
pMptCtx->bMptIndexEven = true; //default gain index is -6.0db
|
||||
pMptCtx->h2cReqNum = 0x0;
|
||||
/* Init mpt event. */
|
||||
//init for BT MP
|
||||
#ifdef CONFIG_RTL8723A
|
||||
pMptCtx->bMPh2c_timeout = _FALSE;
|
||||
pMptCtx->MptH2cRspEvent = _FALSE;
|
||||
pMptCtx->MptBtC2hEvent = _FALSE;
|
||||
pMptCtx->bMPh2c_timeout = false;
|
||||
pMptCtx->MptH2cRspEvent = false;
|
||||
pMptCtx->MptBtC2hEvent = false;
|
||||
|
||||
_rtw_init_sema(&pMptCtx->MPh2c_Sema, 0);
|
||||
_init_timer( &pMptCtx->MPh2c_timeout_timer, pAdapter->pnetdev, MPh2c_timeout_handle, pAdapter );
|
||||
#endif
|
||||
|
||||
pMptCtx->bMptWorkItemInProgress = _FALSE;
|
||||
pMptCtx->bMptWorkItemInProgress = false;
|
||||
pMptCtx->CurrMptAct = NULL;
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
|
@ -418,7 +418,7 @@ MPT_InitializeAdapter(
|
|||
#endif
|
||||
}
|
||||
|
||||
PHY_IQCalibrate(pAdapter, _FALSE);
|
||||
PHY_IQCalibrate(pAdapter, false);
|
||||
dm_CheckTXPowerTracking(&pHalData->odmpriv); //trigger thermal meter
|
||||
PHY_LCCalibrate(pAdapter);
|
||||
|
||||
|
@ -475,7 +475,7 @@ MPT_DeInitAdapter(
|
|||
{
|
||||
PMPT_CONTEXT pMptCtx = &pAdapter->mppriv.MptCtx;
|
||||
|
||||
pMptCtx->bMptDrvUnload = _TRUE;
|
||||
pMptCtx->bMptDrvUnload = true;
|
||||
#ifdef CONFIG_RTL8723A
|
||||
_rtw_free_sema(&(pMptCtx->MPh2c_Sema));
|
||||
_cancel_timer_ex( &pMptCtx->MPh2c_timeout_timer);
|
||||
|
@ -486,13 +486,13 @@ static u8 mpt_ProStartTest(PADAPTER padapter)
|
|||
{
|
||||
PMPT_CONTEXT pMptCtx = &padapter->mppriv.MptCtx;
|
||||
|
||||
pMptCtx->bMassProdTest = _TRUE;
|
||||
pMptCtx->bStartContTx = _FALSE;
|
||||
pMptCtx->bCckContTx = _FALSE;
|
||||
pMptCtx->bOfdmContTx = _FALSE;
|
||||
pMptCtx->bSingleCarrier = _FALSE;
|
||||
pMptCtx->bCarrierSuppression = _FALSE;
|
||||
pMptCtx->bSingleTone = _FALSE;
|
||||
pMptCtx->bMassProdTest = true;
|
||||
pMptCtx->bStartContTx = false;
|
||||
pMptCtx->bCckContTx = false;
|
||||
pMptCtx->bOfdmContTx = false;
|
||||
pMptCtx->bSingleCarrier = false;
|
||||
pMptCtx->bCarrierSuppression = false;
|
||||
pMptCtx->bSingleTone = false;
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
@ -535,13 +535,13 @@ static void disable_dm(PADAPTER padapter)
|
|||
// disable Dynamic Initial Gain
|
||||
// disable High Power
|
||||
// disable Power Tracking
|
||||
Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _FALSE);
|
||||
Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, false);
|
||||
|
||||
// enable APK, LCK and IQK but disable power tracking
|
||||
#ifndef CONFIG_RTL8188E
|
||||
pdmpriv->TxPowerTrackControl = _FALSE;
|
||||
pdmpriv->TxPowerTrackControl = false;
|
||||
#endif
|
||||
Switch_DM_Func(padapter, DYNAMIC_RF_CALIBRATION, _TRUE);
|
||||
Switch_DM_Func(padapter, DYNAMIC_RF_CALIBRATION, true);
|
||||
}
|
||||
|
||||
//This function initializes the DUT to the MP test mode
|
||||
|
@ -610,12 +610,12 @@ s32 mp_start_test(PADAPTER padapter)
|
|||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true)
|
||||
goto end_of_mp_start_test;
|
||||
|
||||
//init mp_start_test status
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) {
|
||||
rtw_disassoc_cmd(padapter, 500, _TRUE);
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
|
||||
rtw_disassoc_cmd(padapter, 500, true);
|
||||
rtw_indicate_disconnect(padapter);
|
||||
rtw_free_assoc_resources(padapter, 1);
|
||||
}
|
||||
|
@ -689,7 +689,7 @@ void mp_stop_test(PADAPTER padapter)
|
|||
{
|
||||
pmppriv->bSetTxPower=0;
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _FALSE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == false)
|
||||
goto end_of_mp_stop_test;
|
||||
|
||||
//3 1. disconnect psudo AdHoc
|
||||
|
@ -1303,7 +1303,7 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (check_fwstate(&pAdapter->mlmepriv, WIFI_MP_STATE) == _FALSE) {
|
||||
if (check_fwstate(&pAdapter->mlmepriv, WIFI_MP_STATE) == false) {
|
||||
RT_TRACE(_module_mp_, _drv_warning_, ("mp_query_psd: Fail! not in MP mode!\n"));
|
||||
return 0;
|
||||
}
|
||||
|
@ -1405,7 +1405,7 @@ void _rtw_mp_xmit_priv (struct xmit_priv *pxmitpriv)
|
|||
|
||||
pxmitbuf->priv_data = NULL;
|
||||
pxmitbuf->padapter = padapter;
|
||||
pxmitbuf->ext_tag = _TRUE;
|
||||
pxmitbuf->ext_tag = true;
|
||||
|
||||
/*
|
||||
pxmitbuf->pallocated_buf = rtw_zmalloc(max_xmit_extbuf_size);
|
||||
|
|
|
@ -1232,7 +1232,7 @@ _func_enter_;
|
|||
("+oid_rt_pro_read_efuse_hd: buf_len=%d addr=%d cnts=%d\n",
|
||||
poid_par_priv->information_buf_len, addr, cnts));
|
||||
|
||||
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
|
||||
|
||||
if ((addr + cnts) > max_available_size) {
|
||||
RT_TRACE(_module_mp_, _drv_err_, ("!oid_rt_pro_read_efuse_hdl: parameter error!\n"));
|
||||
|
@ -1240,7 +1240,7 @@ _func_enter_;
|
|||
}
|
||||
|
||||
_irqlevel_changed_(&oldirql, LOWER);
|
||||
if (rtw_efuse_access(Adapter, _FALSE, addr, cnts, data) == _FAIL) {
|
||||
if (rtw_efuse_access(Adapter, false, addr, cnts, data) == _FAIL) {
|
||||
RT_TRACE(_module_mp_, _drv_err_, ("!oid_rt_pro_read_efuse_hdl: rtw_efuse_access FAIL!\n"));
|
||||
status = NDIS_STATUS_FAILURE;
|
||||
} else
|
||||
|
@ -1278,7 +1278,7 @@ _func_enter_;
|
|||
("+oid_rt_pro_write_efuse_hdl: buf_len=%d addr=0x%04x cnts=%d\n",
|
||||
poid_par_priv->information_buf_len, addr, cnts));
|
||||
|
||||
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
|
||||
|
||||
if ((addr + cnts) > max_available_size) {
|
||||
RT_TRACE(_module_mp_, _drv_err_, ("!oid_rt_pro_write_efuse_hdl: parameter error"));
|
||||
|
@ -1286,7 +1286,7 @@ _func_enter_;
|
|||
}
|
||||
|
||||
_irqlevel_changed_(&oldirql, LOWER);
|
||||
if (rtw_efuse_access(Adapter, _TRUE, addr, cnts, data) == _FAIL)
|
||||
if (rtw_efuse_access(Adapter, true, addr, cnts, data) == _FAIL)
|
||||
status = NDIS_STATUS_FAILURE;
|
||||
_irqlevel_changed_(&oldirql, RAISE);
|
||||
|
||||
|
@ -1323,23 +1323,23 @@ _func_enter_;
|
|||
("oid_rt_pro_rw_efuse_pgpkt_hdl: Read offset=0x%x\n",\
|
||||
ppgpkt->offset));
|
||||
|
||||
Efuse_PowerSwitch(Adapter, _FALSE, _TRUE);
|
||||
if (Efuse_PgPacketRead(Adapter, ppgpkt->offset, ppgpkt->data, _FALSE) == _TRUE)
|
||||
Efuse_PowerSwitch(Adapter, false, true);
|
||||
if (Efuse_PgPacketRead(Adapter, ppgpkt->offset, ppgpkt->data, false) == true)
|
||||
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
|
||||
else
|
||||
status = NDIS_STATUS_FAILURE;
|
||||
Efuse_PowerSwitch(Adapter, _FALSE, _FALSE);
|
||||
Efuse_PowerSwitch(Adapter, false, false);
|
||||
} else {
|
||||
RT_TRACE(_module_mp_, _drv_notice_,
|
||||
("oid_rt_pro_rw_efuse_pgpkt_hdl: Write offset=0x%x word_en=0x%x\n",\
|
||||
ppgpkt->offset, ppgpkt->word_en));
|
||||
|
||||
Efuse_PowerSwitch(Adapter, _TRUE, _TRUE);
|
||||
if (Efuse_PgPacketWrite(Adapter, ppgpkt->offset, ppgpkt->word_en, ppgpkt->data, _FALSE) == _TRUE)
|
||||
Efuse_PowerSwitch(Adapter, true, true);
|
||||
if (Efuse_PgPacketWrite(Adapter, ppgpkt->offset, ppgpkt->word_en, ppgpkt->data, false) == true)
|
||||
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
|
||||
else
|
||||
status = NDIS_STATUS_FAILURE;
|
||||
Efuse_PowerSwitch(Adapter, _TRUE, _FALSE);
|
||||
Efuse_PowerSwitch(Adapter, true, false);
|
||||
}
|
||||
|
||||
_irqlevel_changed_(&oldirql, RAISE);
|
||||
|
@ -1443,7 +1443,7 @@ _func_enter_;
|
|||
|
||||
RT_TRACE(_module_mp_, _drv_notice_, ("+oid_rt_pro_efuse_map_hdl\n"));
|
||||
|
||||
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
|
||||
|
||||
*poid_par_priv->bytes_rw = 0;
|
||||
|
||||
|
|
164
core/rtw_p2p.c
164
core/rtw_p2p.c
|
@ -44,7 +44,7 @@ int is_any_client_associated( _adapter *padapter )
|
|||
{
|
||||
_irqL irqL;
|
||||
_list *phead, *plist;
|
||||
int intFound = _FALSE;
|
||||
int intFound = false;
|
||||
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
|
||||
|
@ -52,17 +52,17 @@ int is_any_client_associated( _adapter *padapter )
|
|||
phead = &pstapriv->asoc_list;
|
||||
plist = get_next(phead);
|
||||
|
||||
if ( rtw_end_of_queue_search(phead, plist) == _TRUE )
|
||||
if ( rtw_end_of_queue_search(phead, plist) == true )
|
||||
{
|
||||
intFound = _FALSE;
|
||||
intFound = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
intFound = _TRUE;
|
||||
intFound = true;
|
||||
}
|
||||
|
||||
if ((intFound == _FALSE && pstapriv->asoc_list_cnt)
|
||||
|| (intFound == _TRUE && !pstapriv->asoc_list_cnt)) {
|
||||
if ((intFound == false && pstapriv->asoc_list_cnt)
|
||||
|| (intFound == true && !pstapriv->asoc_list_cnt)) {
|
||||
DBG_88E("%s intFound:%d, asoc_list_cnt:%u mismatch\n", __func__
|
||||
, intFound, pstapriv->asoc_list_cnt);
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
plist = get_next(phead);
|
||||
|
||||
//look up sta asoc_queue
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
|
||||
|
||||
|
@ -620,7 +620,7 @@ u32 build_beacon_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
// Value:
|
||||
// Associated BSSID
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE )
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == true )
|
||||
{
|
||||
_rtw_memcpy( wfdie + wfdielen, &pmlmepriv->assoc_bssid[ 0 ], ETH_ALEN );
|
||||
}
|
||||
|
@ -733,7 +733,7 @@ u32 build_probe_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
// Value:
|
||||
// Associated BSSID
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE )
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == true )
|
||||
{
|
||||
_rtw_memcpy( wfdie + wfdielen, &pmlmepriv->assoc_bssid[ 0 ], ETH_ALEN );
|
||||
}
|
||||
|
@ -807,7 +807,7 @@ u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 tunnel
|
|||
// WFD device information
|
||||
// WFD primary sink + available for WFD session + WiFi Direct mode
|
||||
|
||||
if ( _TRUE == pwdinfo->session_available )
|
||||
if ( true == pwdinfo->session_available )
|
||||
{
|
||||
if ( P2P_ROLE_GO == pwdinfo->role )
|
||||
{
|
||||
|
@ -891,7 +891,7 @@ u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 tunnel
|
|||
|
||||
// Value:
|
||||
// Associated BSSID
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE )
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == true )
|
||||
{
|
||||
_rtw_memcpy( wfdie + wfdielen, &pmlmepriv->assoc_bssid[ 0 ], ETH_ALEN );
|
||||
}
|
||||
|
@ -1035,7 +1035,7 @@ u32 build_assoc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
// Value:
|
||||
// Associated BSSID
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE )
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == true )
|
||||
{
|
||||
_rtw_memcpy( wfdie + wfdielen, &pmlmepriv->assoc_bssid[ 0 ], ETH_ALEN );
|
||||
}
|
||||
|
@ -1133,7 +1133,7 @@ u32 build_assoc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
// Value:
|
||||
// Associated BSSID
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE )
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == true )
|
||||
{
|
||||
_rtw_memcpy( wfdie + wfdielen, &pmlmepriv->assoc_bssid[ 0 ], ETH_ALEN );
|
||||
}
|
||||
|
@ -1231,7 +1231,7 @@ u32 build_nego_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
// Value:
|
||||
// Associated BSSID
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE )
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == true )
|
||||
{
|
||||
_rtw_memcpy( wfdie + wfdielen, &pmlmepriv->assoc_bssid[ 0 ], ETH_ALEN );
|
||||
}
|
||||
|
@ -1329,7 +1329,7 @@ u32 build_nego_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
// Value:
|
||||
// Associated BSSID
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE )
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == true )
|
||||
{
|
||||
_rtw_memcpy( wfdie + wfdielen, &pmlmepriv->assoc_bssid[ 0 ], ETH_ALEN );
|
||||
}
|
||||
|
@ -1428,7 +1428,7 @@ u32 build_nego_confirm_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
// Value:
|
||||
// Associated BSSID
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE )
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == true )
|
||||
{
|
||||
_rtw_memcpy( wfdie + wfdielen, &pmlmepriv->assoc_bssid[ 0 ], ETH_ALEN );
|
||||
}
|
||||
|
@ -1527,7 +1527,7 @@ u32 build_invitation_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
// Value:
|
||||
// Associated BSSID
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE )
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == true )
|
||||
{
|
||||
_rtw_memcpy( wfdie + wfdielen, &pmlmepriv->assoc_bssid[ 0 ], ETH_ALEN );
|
||||
}
|
||||
|
@ -1640,7 +1640,7 @@ u32 build_invitation_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
// Value:
|
||||
// Associated BSSID
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE )
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == true )
|
||||
{
|
||||
_rtw_memcpy( wfdie + wfdielen, &pmlmepriv->assoc_bssid[ 0 ], ETH_ALEN );
|
||||
}
|
||||
|
@ -1753,7 +1753,7 @@ u32 build_provdisc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
// Value:
|
||||
// Associated BSSID
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE )
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == true )
|
||||
{
|
||||
_rtw_memcpy( wfdie + wfdielen, &pmlmepriv->assoc_bssid[ 0 ], ETH_ALEN );
|
||||
}
|
||||
|
@ -1852,7 +1852,7 @@ u32 build_provdisc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
// Value:
|
||||
// Associated BSSID
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE )
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED) == true )
|
||||
{
|
||||
_rtw_memcpy( wfdie + wfdielen, &pmlmepriv->assoc_bssid[ 0 ], ETH_ALEN );
|
||||
}
|
||||
|
@ -1987,7 +1987,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
// + NumofSecondDevType (1byte) + WPS Device Name ID field (2bytes) + WPS Device Name Len field (2bytes)
|
||||
//*(u16*) ( p2pie + p2pielen ) = cpu_to_le16( 21 + pwdinfo->device_name_len );
|
||||
#ifdef CONFIG_INTEL_WIDI
|
||||
if ( _rtw_memcmp( pwdinfo->padapter->mlmepriv.sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN ) == _FALSE )
|
||||
if ( _rtw_memcmp( pwdinfo->padapter->mlmepriv.sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN ) == false )
|
||||
{
|
||||
RTW_PUT_LE16(p2pie + p2pielen, 21 + 8 + pwdinfo->device_name_len);
|
||||
}
|
||||
|
@ -2025,7 +2025,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
// Number of Secondary Device Types
|
||||
#ifdef CONFIG_INTEL_WIDI
|
||||
if ( _rtw_memcmp( pwdinfo->padapter->mlmepriv.sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN ) == _FALSE )
|
||||
if ( _rtw_memcmp( pwdinfo->padapter->mlmepriv.sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN ) == false )
|
||||
{
|
||||
p2pie[ p2pielen++ ] = 0x01;
|
||||
|
||||
|
@ -2251,7 +2251,7 @@ u32 build_deauth_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint len)
|
||||
{
|
||||
u8 *p;
|
||||
u32 ret=_FALSE;
|
||||
u32 ret=false;
|
||||
u8 *p2pie;
|
||||
u32 p2pielen = 0;
|
||||
int ssid_len=0, rate_cnt = 0;
|
||||
|
@ -2310,11 +2310,11 @@ u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||
//Check Requested Device Type attributes in WSC IE.
|
||||
//Check Device ID attribute in P2P IE
|
||||
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
}
|
||||
else if ( (p != NULL) && ( ssid_len == 0 ) )
|
||||
{
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2492,7 +2492,7 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
|
|||
plist = get_next(phead);
|
||||
|
||||
//look up sta asoc_queue
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
|
||||
|
||||
|
@ -2540,13 +2540,13 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
|
|||
issue_p2p_devdisc_resp(pwdinfo, GetAddr2Ptr(pframe), status, dialogToken);
|
||||
|
||||
|
||||
return (status==P2P_STATUS_SUCCESS) ? _TRUE:_FALSE;
|
||||
return (status==P2P_STATUS_SUCCESS) ? true:false;
|
||||
|
||||
}
|
||||
|
||||
u32 process_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *pframe, uint len)
|
||||
{
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
u8 process_p2p_provdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint len )
|
||||
|
@ -2591,14 +2591,14 @@ u8 process_p2p_provdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||
}
|
||||
}
|
||||
DBG_88E( "[%s] config method = %s\n", __func__, pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req );
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
u8 process_p2p_provdisc_resp(struct wifidirect_info *pwdinfo, u8 *pframe)
|
||||
{
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
u8 rtw_p2p_get_peer_ch_list(struct wifidirect_info *pwdinfo, u8 *ch_content, u8 ch_cnt, u8 *peer_ch_list)
|
||||
|
@ -2759,7 +2759,7 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe
|
|||
|
||||
#if defined(CONFIG_WFD) && defined(CONFIG_TDLS)
|
||||
if (!(cap_attr & P2P_GRPCAP_INTRABSS) )
|
||||
ptdlsinfo->ap_prohibited = _TRUE;
|
||||
ptdlsinfo->ap_prohibited = true;
|
||||
#endif //defined(CONFIG_WFD) && defined(CONFIG_TDLS)
|
||||
}
|
||||
|
||||
|
@ -2961,7 +2961,7 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram
|
|||
cap_attr = le16_to_cpu(cap_attr);
|
||||
#ifdef CONFIG_TDLS
|
||||
if (!(cap_attr & P2P_GRPCAP_INTRABSS) )
|
||||
ptdlsinfo->ap_prohibited = _TRUE;
|
||||
ptdlsinfo->ap_prohibited = true;
|
||||
#endif // CONFIG_TDLS
|
||||
}
|
||||
|
||||
|
@ -3271,7 +3271,7 @@ u8 process_p2p_presence_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
|
|||
|
||||
issue_p2p_presence_resp(pwdinfo, GetAddr2Ptr(pframe), status, dialogToken);
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void find_phase_handler( _adapter* padapter )
|
||||
|
@ -3436,7 +3436,7 @@ _func_enter_;
|
|||
}
|
||||
else if ( rtw_p2p_chk_state(pwdinfo, P2P_STATE_LISTEN) ||
|
||||
rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_FAIL) ||
|
||||
( rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING) && pwdinfo->nego_req_info.benable == _FALSE ) ||
|
||||
( rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING) && pwdinfo->nego_req_info.benable == false ) ||
|
||||
rtw_p2p_chk_state(pwdinfo, P2P_STATE_RX_PROVISION_DIS_REQ) )
|
||||
{
|
||||
// Now, the driver is in the listen state of P2P mode.
|
||||
|
@ -3474,7 +3474,7 @@ _func_enter_;
|
|||
issue_probereq_p2p(padapter, NULL);
|
||||
_set_timer( &pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT );
|
||||
}
|
||||
else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING) && pwdinfo->nego_req_info.benable == _TRUE)
|
||||
else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING) && pwdinfo->nego_req_info.benable == true)
|
||||
{
|
||||
val8 = 1;
|
||||
set_channel_bwmode(padapter, pwdinfo->nego_req_info.peer_channel_num[0], HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
|
@ -3482,7 +3482,7 @@ _func_enter_;
|
|||
issue_probereq_p2p(padapter, NULL);
|
||||
_set_timer( &pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT );
|
||||
}
|
||||
else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_INVITE_REQ ) && pwdinfo->invitereq_info.benable == _TRUE)
|
||||
else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_INVITE_REQ ) && pwdinfo->invitereq_info.benable == true)
|
||||
{
|
||||
/*
|
||||
val8 = 1;
|
||||
|
@ -3542,7 +3542,7 @@ _func_enter_;
|
|||
#endif
|
||||
}
|
||||
|
||||
pcfg80211_wdinfo->is_ro_ch = _FALSE;
|
||||
pcfg80211_wdinfo->is_ro_ch = false;
|
||||
|
||||
DBG_88E("cfg80211_remain_on_channel_expired\n");
|
||||
|
||||
|
@ -3637,7 +3637,7 @@ void rtw_append_wfd_ie(_adapter *padapter, u8 *buf, u32* len)
|
|||
{
|
||||
action = frame_body[1];
|
||||
if (action == ACT_PUBLIC_VENDOR
|
||||
&& _rtw_memcmp(frame_body+2, P2P_OUI, 4) == _TRUE
|
||||
&& _rtw_memcmp(frame_body+2, P2P_OUI, 4) == true
|
||||
)
|
||||
{
|
||||
OUI_Subtype = frame_body[6];
|
||||
|
@ -3755,7 +3755,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
{
|
||||
action = frame_body[1];
|
||||
if (action == ACT_PUBLIC_VENDOR
|
||||
&& _rtw_memcmp(frame_body+2, P2P_OUI, 4) == _TRUE
|
||||
&& _rtw_memcmp(frame_body+2, P2P_OUI, 4) == true
|
||||
)
|
||||
{
|
||||
OUI_Subtype = frame_body[6];
|
||||
|
@ -3776,16 +3776,16 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
u8 *cont;
|
||||
uint cont_len;
|
||||
case P2P_GO_NEGO_REQ:
|
||||
DBG_88E("RTW_%s:P2P_GO_NEGO_REQ, dialogToken=%d\n", (tx==_TRUE)?"Tx":"Rx", dialogToken);
|
||||
DBG_88E("RTW_%s:P2P_GO_NEGO_REQ, dialogToken=%d\n", (tx==true)?"Tx":"Rx", dialogToken);
|
||||
|
||||
if (tx)
|
||||
{
|
||||
#ifdef CONFIG_DRV_ISSUE_PROV_REQ // IOT FOR S2
|
||||
if (pwdev_priv->provdisc_req_issued == _FALSE)
|
||||
if (pwdev_priv->provdisc_req_issued == false)
|
||||
rtw_cfg80211_issue_p2p_provision_request(padapter, buf, len);
|
||||
#endif //CONFIG_DRV_ISSUE_PROV_REQ
|
||||
|
||||
//pwdev_priv->provdisc_req_issued = _FALSE;
|
||||
//pwdev_priv->provdisc_req_issued = false;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(padapter, _FW_LINKED))
|
||||
|
@ -3796,11 +3796,11 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
break;
|
||||
case P2P_GO_NEGO_RESP:
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, NULL, &cont_len);
|
||||
DBG_88E("RTW_%s:P2P_GO_NEGO_RESP, dialogToken=%d, status:%d\n", (tx==_TRUE)?"Tx":"Rx", dialogToken, cont?*cont:-1);
|
||||
DBG_88E("RTW_%s:P2P_GO_NEGO_RESP, dialogToken=%d, status:%d\n", (tx==true)?"Tx":"Rx", dialogToken, cont?*cont:-1);
|
||||
|
||||
if (!tx)
|
||||
{
|
||||
pwdev_priv->provdisc_req_issued = _FALSE;
|
||||
pwdev_priv->provdisc_req_issued = false;
|
||||
}
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
else
|
||||
|
@ -3812,7 +3812,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
break;
|
||||
case P2P_GO_NEGO_CONF:
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, NULL, &cont_len);
|
||||
DBG_88E("RTW_%s:P2P_GO_NEGO_CONF, dialogToken=%d, status:%d\n", (tx==_TRUE)?"Tx":"Rx", dialogToken, cont?*cont:-1);
|
||||
DBG_88E("RTW_%s:P2P_GO_NEGO_CONF, dialogToken=%d, status:%d\n", (tx==true)?"Tx":"Rx", dialogToken, cont?*cont:-1);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (tx)
|
||||
|
@ -3848,7 +3848,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
invit_info->flags = (flags==-1) ? 0x0 : flags;
|
||||
invit_info->req_op_ch= op_ch;
|
||||
|
||||
DBG_88E("RTW_%s:P2P_INVIT_REQ, dialogToken=%d, flags:0x%02x, op_ch:%d\n", (tx==_TRUE)?"Tx":"Rx", dialogToken, flags, op_ch);
|
||||
DBG_88E("RTW_%s:P2P_INVIT_REQ, dialogToken=%d, flags:0x%02x, op_ch:%d\n", (tx==true)?"Tx":"Rx", dialogToken, flags, op_ch);
|
||||
break;
|
||||
}
|
||||
case P2P_INVIT_RESP:
|
||||
|
@ -3878,15 +3878,15 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
invit_info->rsp_op_ch= op_ch;
|
||||
}
|
||||
|
||||
DBG_88E("RTW_%s:P2P_INVIT_RESP, dialogToken=%d, status:%d, op_ch:%d\n", (tx==_TRUE)?"Tx":"Rx", dialogToken, status, op_ch);
|
||||
DBG_88E("RTW_%s:P2P_INVIT_RESP, dialogToken=%d, status:%d, op_ch:%d\n", (tx==true)?"Tx":"Rx", dialogToken, status, op_ch);
|
||||
break;
|
||||
}
|
||||
case P2P_DEVDISC_REQ:
|
||||
DBG_88E("RTW_%s:P2P_DEVDISC_REQ, dialogToken=%d\n", (tx==_TRUE)?"Tx":"Rx", dialogToken);
|
||||
DBG_88E("RTW_%s:P2P_DEVDISC_REQ, dialogToken=%d\n", (tx==true)?"Tx":"Rx", dialogToken);
|
||||
break;
|
||||
case P2P_DEVDISC_RESP:
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, NULL, &cont_len);
|
||||
DBG_88E("RTW_%s:P2P_DEVDISC_RESP, dialogToken=%d, status:%d\n", (tx==_TRUE)?"Tx":"Rx", dialogToken, cont?*cont:-1);
|
||||
DBG_88E("RTW_%s:P2P_DEVDISC_RESP, dialogToken=%d, status:%d\n", (tx==true)?"Tx":"Rx", dialogToken, cont?*cont:-1);
|
||||
break;
|
||||
case P2P_PROVISION_DISC_REQ:
|
||||
{
|
||||
|
@ -3895,25 +3895,25 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
uint p2p_ielen = 0;
|
||||
uint contentlen = 0;
|
||||
|
||||
DBG_88E("RTW_%s:P2P_PROVISION_DISC_REQ, dialogToken=%d\n", (tx==_TRUE)?"Tx":"Rx", dialogToken);
|
||||
DBG_88E("RTW_%s:P2P_PROVISION_DISC_REQ, dialogToken=%d\n", (tx==true)?"Tx":"Rx", dialogToken);
|
||||
|
||||
//if (tx)
|
||||
{
|
||||
pwdev_priv->provdisc_req_issued = _FALSE;
|
||||
pwdev_priv->provdisc_req_issued = false;
|
||||
|
||||
if ( (p2p_ie=rtw_get_p2p_ie( frame_body + _PUBLIC_ACTION_IE_OFFSET_, frame_body_len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &p2p_ielen)))
|
||||
{
|
||||
|
||||
if (rtw_get_p2p_attr_content( p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, NULL, &contentlen))
|
||||
{
|
||||
pwdev_priv->provdisc_req_issued = _FALSE;//case: p2p_client join p2p GO
|
||||
pwdev_priv->provdisc_req_issued = false;//case: p2p_client join p2p GO
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef CONFIG_DEBUG_CFG80211
|
||||
DBG_88E("provdisc_req_issued is _TRUE\n");
|
||||
DBG_88E("provdisc_req_issued is true\n");
|
||||
#endif //CONFIG_DEBUG_CFG80211
|
||||
pwdev_priv->provdisc_req_issued = _TRUE;//case: p2p_devices connection before Nego req.
|
||||
pwdev_priv->provdisc_req_issued = true;//case: p2p_devices connection before Nego req.
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3921,10 +3921,10 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
}
|
||||
break;
|
||||
case P2P_PROVISION_DISC_RESP:
|
||||
DBG_88E("RTW_%s:P2P_PROVISION_DISC_RESP, dialogToken=%d\n", (tx==_TRUE)?"Tx":"Rx", dialogToken);
|
||||
DBG_88E("RTW_%s:P2P_PROVISION_DISC_RESP, dialogToken=%d\n", (tx==true)?"Tx":"Rx", dialogToken);
|
||||
break;
|
||||
default:
|
||||
DBG_88E("RTW_%s:OUI_Subtype=%d, dialogToken=%d\n", (tx==_TRUE)?"Tx":"Rx", OUI_Subtype, dialogToken);
|
||||
DBG_88E("RTW_%s:OUI_Subtype=%d, dialogToken=%d\n", (tx==true)?"Tx":"Rx", OUI_Subtype, dialogToken);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -3946,26 +3946,26 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
switch (OUI_Subtype)
|
||||
{
|
||||
case P2P_NOTICE_OF_ABSENCE:
|
||||
DBG_88E("RTW_%s:P2P_NOTICE_OF_ABSENCE, dialogToken=%d\n", (tx==_TRUE)?"TX":"RX", dialogToken);
|
||||
DBG_88E("RTW_%s:P2P_NOTICE_OF_ABSENCE, dialogToken=%d\n", (tx==true)?"TX":"RX", dialogToken);
|
||||
break;
|
||||
case P2P_PRESENCE_REQUEST:
|
||||
DBG_88E("RTW_%s:P2P_PRESENCE_REQUEST, dialogToken=%d\n", (tx==_TRUE)?"TX":"RX", dialogToken);
|
||||
DBG_88E("RTW_%s:P2P_PRESENCE_REQUEST, dialogToken=%d\n", (tx==true)?"TX":"RX", dialogToken);
|
||||
break;
|
||||
case P2P_PRESENCE_RESPONSE:
|
||||
DBG_88E("RTW_%s:P2P_PRESENCE_RESPONSE, dialogToken=%d\n", (tx==_TRUE)?"TX":"RX", dialogToken);
|
||||
DBG_88E("RTW_%s:P2P_PRESENCE_RESPONSE, dialogToken=%d\n", (tx==true)?"TX":"RX", dialogToken);
|
||||
break;
|
||||
case P2P_GO_DISC_REQUEST:
|
||||
DBG_88E("RTW_%s:P2P_GO_DISC_REQUEST, dialogToken=%d\n", (tx==_TRUE)?"TX":"RX", dialogToken);
|
||||
DBG_88E("RTW_%s:P2P_GO_DISC_REQUEST, dialogToken=%d\n", (tx==true)?"TX":"RX", dialogToken);
|
||||
break;
|
||||
default:
|
||||
DBG_88E("RTW_%s:OUI_Subtype=%d, dialogToken=%d\n", (tx==_TRUE)?"TX":"RX", OUI_Subtype, dialogToken);
|
||||
DBG_88E("RTW_%s:OUI_Subtype=%d, dialogToken=%d\n", (tx==true)?"TX":"RX", OUI_Subtype, dialogToken);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
DBG_88E("RTW_%s:action frame category=%d\n", (tx==_TRUE)?"TX":"RX", category);
|
||||
DBG_88E("RTW_%s:action frame category=%d\n", (tx==true)?"TX":"RX", category);
|
||||
//is_p2p_frame = (-1);
|
||||
}
|
||||
|
||||
|
@ -4081,7 +4081,7 @@ void process_p2p_ps_ie(PADAPTER padapter, u8 *IEs, u32 IELength)
|
|||
u32 attr_contentlen = 0;
|
||||
|
||||
struct wifidirect_info *pwdinfo = &( padapter->wdinfo );
|
||||
u8 find_p2p = _FALSE, find_p2p_ps = _FALSE;
|
||||
u8 find_p2p = false, find_p2p_ps = false;
|
||||
u8 noa_offset, noa_num, noa_index;
|
||||
|
||||
_func_enter_;
|
||||
|
@ -4104,11 +4104,11 @@ _func_enter_;
|
|||
|
||||
while (p2p_ie)
|
||||
{
|
||||
find_p2p = _TRUE;
|
||||
find_p2p = true;
|
||||
// Get Notice of Absence IE.
|
||||
if (rtw_get_p2p_attr_content( p2p_ie, p2p_ielen, P2P_ATTR_NOA, noa_attr, &attr_contentlen))
|
||||
{
|
||||
find_p2p_ps = _TRUE;
|
||||
find_p2p_ps = true;
|
||||
noa_index = noa_attr[0];
|
||||
|
||||
if ( (pwdinfo->p2p_ps_mode == P2P_PS_NONE) ||
|
||||
|
@ -4147,7 +4147,7 @@ _func_enter_;
|
|||
{
|
||||
pwdinfo->p2p_ps_mode = P2P_PS_CTWINDOW;
|
||||
// driver should wait LPS for entering CTWindow
|
||||
if (padapter->pwrctrlpriv.bFwCurrentInPSMode == _TRUE)
|
||||
if (padapter->pwrctrlpriv.bFwCurrentInPSMode == true)
|
||||
{
|
||||
p2p_ps_wk_cmd(padapter, P2P_PS_ENABLE, 1);
|
||||
}
|
||||
|
@ -4171,9 +4171,9 @@ _func_enter_;
|
|||
|
||||
}
|
||||
|
||||
if (find_p2p == _TRUE)
|
||||
if (find_p2p == true)
|
||||
{
|
||||
if ( (pwdinfo->p2p_ps_mode > P2P_PS_NONE) && (find_p2p_ps == _FALSE) )
|
||||
if ( (pwdinfo->p2p_ps_mode > P2P_PS_NONE) && (find_p2p_ps == false) )
|
||||
{
|
||||
p2p_ps_wk_cmd(padapter, P2P_PS_DISABLE, 1);
|
||||
}
|
||||
|
@ -4202,7 +4202,7 @@ _func_enter_;
|
|||
pwdinfo->opp_ps = 0;
|
||||
pwdinfo->noa_num = 0;
|
||||
pwdinfo->p2p_ps_mode = P2P_PS_NONE;
|
||||
if (padapter->pwrctrlpriv.bFwCurrentInPSMode == _TRUE)
|
||||
if (padapter->pwrctrlpriv.bFwCurrentInPSMode == true)
|
||||
{
|
||||
if (pwrpriv->smart_ps == 0)
|
||||
{
|
||||
|
@ -4353,7 +4353,7 @@ static void pre_tx_scan_timer_process (void *FunctionContext)
|
|||
|
||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_PROVISION_DIS_REQ))
|
||||
{
|
||||
if ( _TRUE == pwdinfo->tx_prov_disc_info.benable ) // the provision discovery request frame is trigger to send or not
|
||||
if ( true == pwdinfo->tx_prov_disc_info.benable ) // the provision discovery request frame is trigger to send or not
|
||||
{
|
||||
p2p_protocol_wk_cmd( adapter, P2P_PRE_TX_PROVDISC_PROCESS_WK );
|
||||
//issue_probereq_p2p(adapter, NULL);
|
||||
|
@ -4362,14 +4362,14 @@ static void pre_tx_scan_timer_process (void *FunctionContext)
|
|||
}
|
||||
else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING))
|
||||
{
|
||||
if ( _TRUE == pwdinfo->nego_req_info.benable )
|
||||
if ( true == pwdinfo->nego_req_info.benable )
|
||||
{
|
||||
p2p_protocol_wk_cmd( adapter, P2P_PRE_TX_NEGOREQ_PROCESS_WK );
|
||||
}
|
||||
}
|
||||
else if ( rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_INVITE_REQ ) )
|
||||
{
|
||||
if ( _TRUE == pwdinfo->invitereq_info.benable )
|
||||
if ( true == pwdinfo->invitereq_info.benable )
|
||||
{
|
||||
p2p_protocol_wk_cmd( adapter, P2P_PRE_TX_INVITEREQ_PROCESS_WK );
|
||||
}
|
||||
|
@ -4421,7 +4421,7 @@ void reset_global_wifidirect_info( _adapter* padapter )
|
|||
|
||||
pwdinfo = &padapter->wdinfo;
|
||||
pwdinfo->persistent_supported = 0;
|
||||
pwdinfo->session_available = _TRUE;
|
||||
pwdinfo->session_available = true;
|
||||
pwdinfo->wfd_tdls_enable = 0;
|
||||
pwdinfo->wfd_tdls_weaksec = 0;
|
||||
}
|
||||
|
@ -4435,13 +4435,13 @@ int rtw_init_wifi_display_info(_adapter* padapter)
|
|||
// Used in P2P and TDLS
|
||||
pwfd_info->rtsp_ctrlport = 554;
|
||||
pwfd_info->peer_rtsp_ctrlport = 0; // Reset to 0
|
||||
pwfd_info->wfd_enable = _FALSE;
|
||||
pwfd_info->wfd_enable = false;
|
||||
pwfd_info->wfd_device_type = WFD_DEVINFO_PSINK;
|
||||
pwfd_info->scan_result_type = SCAN_RESULT_P2P_ONLY;
|
||||
|
||||
// Used in P2P
|
||||
pwfd_info->peer_session_avail = _TRUE;
|
||||
pwfd_info->wfd_pc = _FALSE;
|
||||
pwfd_info->peer_session_avail = true;
|
||||
pwfd_info->wfd_pc = false;
|
||||
|
||||
// Used in TDLS
|
||||
_rtw_memset( pwfd_info->ip_address, 0x00, 4 );
|
||||
|
@ -4510,7 +4510,7 @@ void init_wifidirect_info( _adapter* padapter, enum P2P_ROLE role)
|
|||
pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
}
|
||||
|
||||
if ( ( check_buddy_fwstate(padapter, _FW_LINKED ) == _TRUE ) &&
|
||||
if ( ( check_buddy_fwstate(padapter, _FW_LINKED ) == true ) &&
|
||||
( ( pbuddy_mlmeext->cur_channel == 1) || ( pbuddy_mlmeext->cur_channel == 6 ) || ( pbuddy_mlmeext->cur_channel == 11 ) )
|
||||
)
|
||||
{
|
||||
|
@ -4529,7 +4529,7 @@ void init_wifidirect_info( _adapter* padapter, enum P2P_ROLE role)
|
|||
{
|
||||
rtw_p2p_set_role(pwdinfo, P2P_ROLE_DEVICE);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if ( check_buddy_fwstate(padapter, _FW_LINKED ) == _TRUE )
|
||||
if ( check_buddy_fwstate(padapter, _FW_LINKED ) == true )
|
||||
{
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_IDLE);
|
||||
}
|
||||
|
@ -4743,9 +4743,9 @@ int rtw_p2p_enable(_adapter *padapter, enum P2P_ROLE role)
|
|||
//Enable P2P function
|
||||
init_wifidirect_info(padapter, role);
|
||||
|
||||
rtw_hal_set_odm_var(padapter,HAL_ODM_P2P_STATE,NULL,_TRUE);
|
||||
rtw_hal_set_odm_var(padapter,HAL_ODM_P2P_STATE,NULL,true);
|
||||
#ifdef CONFIG_WFD
|
||||
rtw_hal_set_odm_var(padapter,HAL_ODM_WIFI_DISPLAY_STATE,NULL,_TRUE);
|
||||
rtw_hal_set_odm_var(padapter,HAL_ODM_WIFI_DISPLAY_STATE,NULL,true);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@ -4774,9 +4774,9 @@ int rtw_p2p_enable(_adapter *padapter, enum P2P_ROLE role)
|
|||
_rtw_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);
|
||||
#ifdef CONFIG_WFD
|
||||
rtw_hal_set_odm_var(padapter,HAL_ODM_WIFI_DISPLAY_STATE,NULL,_FALSE);
|
||||
rtw_hal_set_odm_var(padapter,HAL_ODM_WIFI_DISPLAY_STATE,NULL,false);
|
||||
#endif
|
||||
|
||||
//Restore to initial setting.
|
||||
|
|
|
@ -51,7 +51,7 @@ void ips_enter(_adapter * padapter)
|
|||
|
||||
_enter_pwrlock(&pwrpriv->lock);
|
||||
|
||||
pwrpriv->bips_processing = _TRUE;
|
||||
pwrpriv->bips_processing = true;
|
||||
|
||||
// syn ips_mode with request
|
||||
pwrpriv->ips_mode = pwrpriv->ips_mode_req;
|
||||
|
@ -63,16 +63,16 @@ void ips_enter(_adapter * padapter)
|
|||
#endif
|
||||
if (rf_off == pwrpriv->change_rfpwrstate )
|
||||
{
|
||||
pwrpriv->bpower_saving = _TRUE;
|
||||
pwrpriv->bpower_saving = true;
|
||||
DBG_88E_LEVEL(_drv_info_, "nolinked power save enter\n");
|
||||
|
||||
if (pwrpriv->ips_mode == IPS_LEVEL_2)
|
||||
pwrpriv->bkeepfwalive = _TRUE;
|
||||
pwrpriv->bkeepfwalive = true;
|
||||
|
||||
rtw_ips_pwr_down(padapter);
|
||||
pwrpriv->rf_pwrstate = rf_off;
|
||||
}
|
||||
pwrpriv->bips_processing = _FALSE;
|
||||
pwrpriv->bips_processing = false;
|
||||
|
||||
_exit_pwrlock(&pwrpriv->lock);
|
||||
|
||||
|
@ -91,7 +91,7 @@ int ips_leave(_adapter * padapter)
|
|||
|
||||
if ((pwrpriv->rf_pwrstate == rf_off) &&(!pwrpriv->bips_processing))
|
||||
{
|
||||
pwrpriv->bips_processing = _TRUE;
|
||||
pwrpriv->bips_processing = true;
|
||||
pwrpriv->change_rfpwrstate = rf_on;
|
||||
pwrpriv->ips_leave_cnts++;
|
||||
DBG_88E("==>ips_leave cnts:%d\n",pwrpriv->ips_leave_cnts);
|
||||
|
@ -116,10 +116,10 @@ int ips_leave(_adapter * padapter)
|
|||
}
|
||||
|
||||
DBG_88E("==> ips_leave.....LED(0x%08x)...\n",rtw_read32(padapter,0x4c));
|
||||
pwrpriv->bips_processing = _FALSE;
|
||||
pwrpriv->bips_processing = false;
|
||||
|
||||
pwrpriv->bkeepfwalive = _FALSE;
|
||||
pwrpriv->bpower_saving = _FALSE;
|
||||
pwrpriv->bkeepfwalive = false;
|
||||
pwrpriv->bpower_saving = false;
|
||||
}
|
||||
|
||||
_exit_pwrlock(&pwrpriv->lock);
|
||||
|
@ -151,7 +151,7 @@ bool rtw_pwr_unassociated_idle(_adapter *adapter)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
bool ret = _FALSE;
|
||||
bool ret = false;
|
||||
|
||||
if (adapter->pwrctrlpriv.ips_deny_time >= rtw_get_current_time()) {
|
||||
//DBG_88E("%s ips_deny_time\n", __func__);
|
||||
|
@ -194,7 +194,7 @@ bool rtw_pwr_unassociated_idle(_adapter *adapter)
|
|||
goto exit;
|
||||
}
|
||||
}
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
|
||||
exit:
|
||||
return ret;
|
||||
|
@ -212,10 +212,10 @@ void rtw_ps_processor(_adapter*padapter)
|
|||
rt_rf_power_state rfpwrstate;
|
||||
#endif //SUPPORT_HW_RFOFF_DETECTED
|
||||
|
||||
pwrpriv->ps_processing = _TRUE;
|
||||
pwrpriv->ps_processing = true;
|
||||
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
if (pwrpriv->bips_processing == _TRUE)
|
||||
if (pwrpriv->bips_processing == true)
|
||||
goto exit;
|
||||
|
||||
//DBG_88E("==> fw report state(0x%x)\n",rtw_read8(padapter,0x1ca));
|
||||
|
@ -226,8 +226,8 @@ void rtw_ps_processor(_adapter*padapter)
|
|||
{
|
||||
if (pwrpriv->rf_pwrstate == rf_on)
|
||||
{
|
||||
if (padapter->net_closed == _TRUE)
|
||||
pwrpriv->ps_flag = _TRUE;
|
||||
if (padapter->net_closed == true)
|
||||
pwrpriv->ps_flag = true;
|
||||
|
||||
rfpwrstate = RfOnOffDetect(padapter);
|
||||
DBG_88E("@@@@- #1 %s==> rfstate:%s\n",__func__,(rfpwrstate==rf_on)?"rf_on":"rf_off");
|
||||
|
@ -237,8 +237,8 @@ void rtw_ps_processor(_adapter*padapter)
|
|||
{
|
||||
pwrpriv->change_rfpwrstate = rf_off;
|
||||
|
||||
pwrpriv->bkeepfwalive = _TRUE;
|
||||
pwrpriv->brfoffbyhw = _TRUE;
|
||||
pwrpriv->bkeepfwalive = true;
|
||||
pwrpriv->brfoffbyhw = true;
|
||||
|
||||
autosuspend_enter(padapter);
|
||||
}
|
||||
|
@ -256,8 +256,8 @@ void rtw_ps_processor(_adapter*padapter)
|
|||
if (rfpwrstate == rf_off)
|
||||
{
|
||||
pwrpriv->change_rfpwrstate = rf_off;
|
||||
pwrpriv->brfoffbyhw = _TRUE;
|
||||
padapter->bCardDisableWOHSM = _TRUE;
|
||||
pwrpriv->brfoffbyhw = true;
|
||||
padapter->bCardDisableWOHSM = true;
|
||||
rtw_hw_suspend(padapter );
|
||||
}
|
||||
else
|
||||
|
@ -279,7 +279,7 @@ void rtw_ps_processor(_adapter*padapter)
|
|||
)
|
||||
goto exit;
|
||||
|
||||
if (rtw_pwr_unassociated_idle(padapter) == _FALSE)
|
||||
if (rtw_pwr_unassociated_idle(padapter) == false)
|
||||
goto exit;
|
||||
|
||||
if ((pwrpriv->rf_pwrstate == rf_on) && ((pwrpriv->pwr_state_check_cnts%4)==0))
|
||||
|
@ -293,22 +293,22 @@ void rtw_ps_processor(_adapter*padapter)
|
|||
if (padapter->registrypriv.usbss_enable)
|
||||
{
|
||||
if (pwrpriv->bHWPwrPindetect)
|
||||
pwrpriv->bkeepfwalive = _TRUE;
|
||||
pwrpriv->bkeepfwalive = true;
|
||||
|
||||
if (padapter->net_closed == _TRUE)
|
||||
pwrpriv->ps_flag = _TRUE;
|
||||
if (padapter->net_closed == true)
|
||||
pwrpriv->ps_flag = true;
|
||||
|
||||
#if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||
if (_TRUE==pwrpriv->bInternalAutoSuspend) {
|
||||
if (true==pwrpriv->bInternalAutoSuspend) {
|
||||
DBG_88E("<==%s .pwrpriv->bInternalAutoSuspend)(%x)\n",__func__,pwrpriv->bInternalAutoSuspend);
|
||||
} else {
|
||||
pwrpriv->change_rfpwrstate = rf_off;
|
||||
padapter->bCardDisableWOHSM = _TRUE;
|
||||
padapter->bCardDisableWOHSM = true;
|
||||
DBG_88E("<==%s .pwrpriv->bInternalAutoSuspend)(%x) call autosuspend_enter\n",__func__,pwrpriv->bInternalAutoSuspend);
|
||||
autosuspend_enter(padapter);
|
||||
}
|
||||
#else
|
||||
padapter->bCardDisableWOHSM = _TRUE;
|
||||
padapter->bCardDisableWOHSM = true;
|
||||
autosuspend_enter(padapter);
|
||||
#endif //if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ void rtw_ps_processor(_adapter*padapter)
|
|||
}
|
||||
exit:
|
||||
rtw_set_pwr_state_check_timer(&padapter->pwrctrlpriv);
|
||||
pwrpriv->ps_processing = _FALSE;
|
||||
pwrpriv->ps_processing = false;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -361,14 +361,14 @@ _func_enter_;
|
|||
pslv = PS_STATE(pslv);
|
||||
|
||||
|
||||
if (_TRUE == pwrpriv->btcoex_rfon)
|
||||
if (true == pwrpriv->btcoex_rfon)
|
||||
{
|
||||
if (pslv < PS_STATE_S4)
|
||||
pslv = PS_STATE_S3;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_LPS_RPWM_TIMER
|
||||
if (pwrpriv->brpwmtimeout == _TRUE)
|
||||
if (pwrpriv->brpwmtimeout == true)
|
||||
{
|
||||
DBG_88E("%s: RPWM timeout, force to set RPWM(0x%02X) again!\n", __func__, pslv);
|
||||
}
|
||||
|
@ -387,8 +387,8 @@ _func_enter_;
|
|||
}
|
||||
}
|
||||
|
||||
if ((padapter->bSurpriseRemoved == _TRUE) ||
|
||||
(padapter->hw_init_completed == _FALSE))
|
||||
if ((padapter->bSurpriseRemoved == true) ||
|
||||
(padapter->hw_init_completed == false))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_err_,
|
||||
("%s: SurpriseRemoved(%d) hw_init_completed(%d)\n",
|
||||
|
@ -399,7 +399,7 @@ _func_enter_;
|
|||
return;
|
||||
}
|
||||
|
||||
if (padapter->bDriverStopped == _TRUE)
|
||||
if (padapter->bDriverStopped == true)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_err_,
|
||||
("%s: change power state(0x%02X) when DriverStopped\n", __func__, pslv));
|
||||
|
@ -454,35 +454,35 @@ u8 PS_RDY_CHECK(_adapter * padapter)
|
|||
|
||||
if (delta_time < LPS_DELAY_TIME)
|
||||
{
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) == _FALSE) ||
|
||||
(check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) )
|
||||
return _FALSE;
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) == false) ||
|
||||
(check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) )
|
||||
return false;
|
||||
#ifdef CONFIG_WOWLAN
|
||||
if (_TRUE == pwrpriv->bInSuspend && pwrpriv->wowlan_mode)
|
||||
return _TRUE;
|
||||
if (true == pwrpriv->bInSuspend && pwrpriv->wowlan_mode)
|
||||
return true;
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
#else
|
||||
if (_TRUE == pwrpriv->bInSuspend )
|
||||
return _FALSE;
|
||||
if (true == pwrpriv->bInSuspend )
|
||||
return false;
|
||||
#endif
|
||||
if ( (padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) && (padapter->securitypriv.binstallGrpkey == _FALSE) )
|
||||
if ( (padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) && (padapter->securitypriv.binstallGrpkey == false) )
|
||||
{
|
||||
DBG_88E("Group handshake still in progress !!!\n");
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
if (!rtw_cfg80211_pwr_mgmt(padapter))
|
||||
return _FALSE;
|
||||
return false;
|
||||
#endif
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode)
|
||||
|
@ -542,7 +542,7 @@ _func_enter_;
|
|||
phead = &(pstapriv->sta_hash[i]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
ptdls_sta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
|
||||
|
@ -558,14 +558,14 @@ _func_enter_;
|
|||
pwrpriv->pwr_mode = ps_mode;
|
||||
rtw_set_rpwm(padapter, PS_STATE_S4);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
|
||||
pwrpriv->bFwCurrentInPSMode = _FALSE;
|
||||
pwrpriv->bFwCurrentInPSMode = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (PS_RDY_CHECK(padapter)
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
|| (BT_1Ant(padapter) == _TRUE)
|
||||
|| (BT_1Ant(padapter) == true)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
|
@ -579,7 +579,7 @@ _func_enter_;
|
|||
phead = &(pstapriv->sta_hash[i]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
ptdls_sta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
|
||||
|
@ -592,7 +592,7 @@ _func_enter_;
|
|||
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
#endif //CONFIG_TDLS
|
||||
|
||||
pwrpriv->bFwCurrentInPSMode = _TRUE;
|
||||
pwrpriv->bFwCurrentInPSMode = true;
|
||||
pwrpriv->pwr_mode = ps_mode;
|
||||
pwrpriv->smart_ps = smart_ps;
|
||||
pwrpriv->bcn_ant_mode = bcn_ant_mode;
|
||||
|
@ -629,7 +629,7 @@ _func_exit_;
|
|||
s32 LPS_RF_ON_check(PADAPTER padapter, u32 delay_ms)
|
||||
{
|
||||
u32 start_time;
|
||||
u8 bAwake = _FALSE;
|
||||
u8 bAwake = false;
|
||||
s32 err = 0;
|
||||
|
||||
|
||||
|
@ -637,10 +637,10 @@ s32 LPS_RF_ON_check(PADAPTER padapter, u32 delay_ms)
|
|||
while (1)
|
||||
{
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_FWLPS_RF_ON, &bAwake);
|
||||
if (_TRUE == bAwake)
|
||||
if (true == bAwake)
|
||||
break;
|
||||
|
||||
if (_TRUE == padapter->bSurpriseRemoved)
|
||||
if (true == padapter->bSurpriseRemoved)
|
||||
{
|
||||
err = -2;
|
||||
DBG_88E("%s: device surprise removed!!\n", __func__);
|
||||
|
@ -703,17 +703,17 @@ _func_enter_;
|
|||
}
|
||||
#endif
|
||||
|
||||
if (PS_RDY_CHECK(padapter) == _FALSE)
|
||||
if (PS_RDY_CHECK(padapter) == false)
|
||||
return;
|
||||
|
||||
if (_TRUE == pwrpriv->bLeisurePs)
|
||||
if (true == pwrpriv->bLeisurePs)
|
||||
{
|
||||
// Idle for a while if we connect to AP a while ago.
|
||||
if (pwrpriv->LpsIdleCount >= 2) // 4 Sec
|
||||
{
|
||||
if (pwrpriv->pwr_mode == PS_MODE_ACTIVE)
|
||||
{
|
||||
pwrpriv->bpower_saving = _TRUE;
|
||||
pwrpriv->bpower_saving = true;
|
||||
DBG_88E("%s smart_ps:%d\n", __func__, pwrpriv->smart_ps);
|
||||
//For Tenda W311R IOT issue
|
||||
rtw_set_ps_mode(padapter, pwrpriv->power_mgnt, pwrpriv->smart_ps, 0);
|
||||
|
@ -738,7 +738,7 @@ void LPS_Leave(PADAPTER padapter)
|
|||
|
||||
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
|
||||
u32 start_time;
|
||||
u8 bAwake = _FALSE;
|
||||
u8 bAwake = false;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -760,7 +760,7 @@ _func_enter_;
|
|||
}
|
||||
}
|
||||
|
||||
pwrpriv->bpower_saving = _FALSE;
|
||||
pwrpriv->bpower_saving = false;
|
||||
|
||||
// DBG_88E("-LeisurePSLeave\n");
|
||||
|
||||
|
@ -780,7 +780,7 @@ void LeaveAllPowerSaveMode(IN PADAPTER Adapter)
|
|||
_func_enter_;
|
||||
|
||||
//DBG_88E("%s.....\n",__func__);
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
{ //connect
|
||||
#ifdef CONFIG_LPS_LCLK
|
||||
enqueue = 1;
|
||||
|
@ -816,7 +816,7 @@ _func_enter_;
|
|||
{
|
||||
#if defined(CONFIG_PLATFORM_SPRD) && defined(CONFIG_RTL8188E)
|
||||
#ifdef CONFIG_IPS
|
||||
if (_FALSE == ips_leave(Adapter))
|
||||
if (false == ips_leave(Adapter))
|
||||
{
|
||||
DBG_88E("======> ips_leave fail.............\n");
|
||||
}
|
||||
|
@ -841,7 +841,7 @@ _func_enter_;
|
|||
|
||||
pwrpriv = &padapter->pwrctrlpriv;
|
||||
|
||||
bReady = _FALSE;
|
||||
bReady = false;
|
||||
start_time = rtw_get_current_time();
|
||||
|
||||
rtw_yield_os();
|
||||
|
@ -850,20 +850,20 @@ _func_enter_;
|
|||
{
|
||||
_enter_pwrlock(&pwrpriv->lock);
|
||||
|
||||
if ((padapter->bSurpriseRemoved == _TRUE)
|
||||
|| (padapter->hw_init_completed == _FALSE)
|
||||
if ((padapter->bSurpriseRemoved == true)
|
||||
|| (padapter->hw_init_completed == false)
|
||||
#ifdef CONFIG_USB_HCI
|
||||
|| (padapter->bDriverStopped== _TRUE)
|
||||
|| (padapter->bDriverStopped== true)
|
||||
#endif
|
||||
|| (pwrpriv->pwr_mode == PS_MODE_ACTIVE)
|
||||
)
|
||||
{
|
||||
bReady = _TRUE;
|
||||
bReady = true;
|
||||
}
|
||||
|
||||
_exit_pwrlock(&pwrpriv->lock);
|
||||
|
||||
if (_TRUE == bReady)
|
||||
if (true == bReady)
|
||||
break;
|
||||
|
||||
if (rtw_get_passing_time_ms(start_time)>100)
|
||||
|
@ -978,9 +978,9 @@ static void rpwmtimeout_workitem_callback(struct work_struct *work)
|
|||
DBG_88E("%s: cpwm=%d, nothing to do!\n", __func__, pwrpriv->cpwm);
|
||||
goto exit;
|
||||
}
|
||||
pwrpriv->brpwmtimeout = _TRUE;
|
||||
pwrpriv->brpwmtimeout = true;
|
||||
rtw_set_rpwm(padapter, pwrpriv->rpwm);
|
||||
pwrpriv->brpwmtimeout = _FALSE;
|
||||
pwrpriv->brpwmtimeout = false;
|
||||
|
||||
exit:
|
||||
_exit_pwrlock(&pwrpriv->lock);
|
||||
|
@ -1043,7 +1043,7 @@ _func_enter_;
|
|||
res = _SUCCESS;
|
||||
pwrctrl = &padapter->pwrctrlpriv;
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if (_TRUE == padapter->pwrctrlpriv.btcoex_rfon)
|
||||
if (true == padapter->pwrctrlpriv.btcoex_rfon)
|
||||
pslv = PS_STATE_S3;
|
||||
else
|
||||
#endif
|
||||
|
@ -1055,7 +1055,7 @@ _func_enter_;
|
|||
|
||||
register_task_alive(pwrctrl, XMIT_ALIVE);
|
||||
|
||||
if (pwrctrl->bFwCurrentInPSMode == _TRUE)
|
||||
if (pwrctrl->bFwCurrentInPSMode == true)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_,
|
||||
("rtw_register_tx_alive: cpwm=0x%02x alives=0x%08x\n",
|
||||
|
@ -1101,7 +1101,7 @@ _func_enter_;
|
|||
res = _SUCCESS;
|
||||
pwrctrl = &padapter->pwrctrlpriv;
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if (_TRUE == padapter->pwrctrlpriv.btcoex_rfon)
|
||||
if (true == padapter->pwrctrlpriv.btcoex_rfon)
|
||||
pslv = PS_STATE_S3;
|
||||
else
|
||||
#endif
|
||||
|
@ -1113,7 +1113,7 @@ _func_enter_;
|
|||
|
||||
register_task_alive(pwrctrl, CMD_ALIVE);
|
||||
|
||||
if (pwrctrl->bFwCurrentInPSMode == _TRUE)
|
||||
if (pwrctrl->bFwCurrentInPSMode == true)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_info_,
|
||||
("rtw_register_cmd_alive: cpwm=0x%02x alives=0x%08x\n",
|
||||
|
@ -1217,7 +1217,7 @@ _func_enter_;
|
|||
unregister_task_alive(pwrctrl, XMIT_ALIVE);
|
||||
|
||||
if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) &&
|
||||
(pwrctrl->bFwCurrentInPSMode == _TRUE))
|
||||
(pwrctrl->bFwCurrentInPSMode == true))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_,
|
||||
("%s: cpwm=0x%02x alives=0x%08x\n",
|
||||
|
@ -1255,7 +1255,7 @@ _func_enter_;
|
|||
unregister_task_alive(pwrctrl, CMD_ALIVE);
|
||||
|
||||
if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) &&
|
||||
(pwrctrl->bFwCurrentInPSMode == _TRUE))
|
||||
(pwrctrl->bFwCurrentInPSMode == true))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_info_,
|
||||
("%s: cpwm=0x%02x alives=0x%08x\n",
|
||||
|
@ -1335,16 +1335,16 @@ _func_enter_;
|
|||
pwrctrlpriv->rf_pwrstate = rf_on;
|
||||
pwrctrlpriv->ips_enter_cnts=0;
|
||||
pwrctrlpriv->ips_leave_cnts=0;
|
||||
pwrctrlpriv->bips_processing = _FALSE;
|
||||
pwrctrlpriv->bips_processing = false;
|
||||
|
||||
pwrctrlpriv->ips_mode = padapter->registrypriv.ips_mode;
|
||||
pwrctrlpriv->ips_mode_req = padapter->registrypriv.ips_mode;
|
||||
|
||||
pwrctrlpriv->pwr_state_check_interval = RTW_PWR_STATE_CHK_INTERVAL;
|
||||
pwrctrlpriv->pwr_state_check_cnts = 0;
|
||||
pwrctrlpriv->bInternalAutoSuspend = _FALSE;
|
||||
pwrctrlpriv->bInSuspend = _FALSE;
|
||||
pwrctrlpriv->bkeepfwalive = _FALSE;
|
||||
pwrctrlpriv->bInternalAutoSuspend = false;
|
||||
pwrctrlpriv->bInSuspend = false;
|
||||
pwrctrlpriv->bkeepfwalive = false;
|
||||
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
|
@ -1358,9 +1358,9 @@ _func_enter_;
|
|||
pwrctrlpriv->power_mgnt =PS_MODE_ACTIVE ;
|
||||
else
|
||||
pwrctrlpriv->power_mgnt =padapter->registrypriv.power_mgnt;// PS_MODE_MIN;
|
||||
pwrctrlpriv->bLeisurePs = (PS_MODE_ACTIVE != pwrctrlpriv->power_mgnt)?_TRUE:_FALSE;
|
||||
pwrctrlpriv->bLeisurePs = (PS_MODE_ACTIVE != pwrctrlpriv->power_mgnt)?true:false;
|
||||
|
||||
pwrctrlpriv->bFwCurrentInPSMode = _FALSE;
|
||||
pwrctrlpriv->bFwCurrentInPSMode = false;
|
||||
|
||||
pwrctrlpriv->rpwm = 0;
|
||||
pwrctrlpriv->cpwm = PS_STATE_S4;
|
||||
|
@ -1371,7 +1371,7 @@ _func_enter_;
|
|||
|
||||
pwrctrlpriv->tog = 0x80;
|
||||
|
||||
pwrctrlpriv->btcoex_rfon = _FALSE;
|
||||
pwrctrlpriv->btcoex_rfon = false;
|
||||
|
||||
#ifdef CONFIG_LPS_LCLK
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_SET_RPWM, (u8 *)(&pwrctrlpriv->rpwm));
|
||||
|
@ -1379,7 +1379,7 @@ _func_enter_;
|
|||
_init_workitem(&pwrctrlpriv->cpwm_event, cpwm_event_callback, NULL);
|
||||
|
||||
#ifdef CONFIG_LPS_RPWM_TIMER
|
||||
pwrctrlpriv->brpwmtimeout = _FALSE;
|
||||
pwrctrlpriv->brpwmtimeout = false;
|
||||
_init_workitem(&pwrctrlpriv->rpwmtimeoutwi, rpwmtimeout_workitem_callback, NULL);
|
||||
_init_timer(&pwrctrlpriv->pwr_rpwm_timer, padapter->pnetdev, pwr_rpwm_timeout_handler, padapter);
|
||||
#endif // CONFIG_LPS_RPWM_TIMER
|
||||
|
@ -1471,7 +1471,7 @@ static void rtw_early_suspend(struct early_suspend *h)
|
|||
DBG_88E("%s\n",__func__);
|
||||
|
||||
//jeff: do nothing but set do_late_resume to false
|
||||
pwrpriv->do_late_resume = _FALSE;
|
||||
pwrpriv->do_late_resume = false;
|
||||
}
|
||||
|
||||
static void rtw_late_resume(struct early_suspend *h)
|
||||
|
@ -1483,7 +1483,7 @@ static void rtw_late_resume(struct early_suspend *h)
|
|||
if (pwrpriv->do_late_resume) {
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
rtw_resume_process(adapter);
|
||||
pwrpriv->do_late_resume = _FALSE;
|
||||
pwrpriv->do_late_resume = false;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -1505,7 +1505,7 @@ void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv)
|
|||
{
|
||||
DBG_88E("%s\n", __func__);
|
||||
|
||||
pwrpriv->do_late_resume = _FALSE;
|
||||
pwrpriv->do_late_resume = false;
|
||||
|
||||
if (pwrpriv->early_suspend.suspend)
|
||||
unregister_early_suspend(&pwrpriv->early_suspend);
|
||||
|
@ -1525,7 +1525,7 @@ static void rtw_early_suspend(android_early_suspend_t *h)
|
|||
DBG_88E("%s\n",__func__);
|
||||
|
||||
//jeff: do nothing but set do_late_resume to false
|
||||
pwrpriv->do_late_resume = _FALSE;
|
||||
pwrpriv->do_late_resume = false;
|
||||
}
|
||||
|
||||
static void rtw_late_resume(android_early_suspend_t *h)
|
||||
|
@ -1537,7 +1537,7 @@ static void rtw_late_resume(android_early_suspend_t *h)
|
|||
if (pwrpriv->do_late_resume) {
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
rtw_resume_process(adapter);
|
||||
pwrpriv->do_late_resume = _FALSE;
|
||||
pwrpriv->do_late_resume = false;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -1557,7 +1557,7 @@ void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv)
|
|||
{
|
||||
DBG_88E("%s\n", __func__);
|
||||
|
||||
pwrpriv->do_late_resume = _FALSE;
|
||||
pwrpriv->do_late_resume = false;
|
||||
|
||||
if (pwrpriv->early_suspend.suspend)
|
||||
android_unregister_early_suspend(&pwrpriv->early_suspend);
|
||||
|
@ -1569,7 +1569,7 @@ void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv)
|
|||
|
||||
u8 rtw_interface_ps_func(_adapter *padapter,HAL_INTF_PS_FUNC efunc_id,u8* val)
|
||||
{
|
||||
u8 bResult = _TRUE;
|
||||
u8 bResult = true;
|
||||
rtw_hal_intf_ps_func(padapter,efunc_id,val);
|
||||
|
||||
return bResult;
|
||||
|
@ -1599,7 +1599,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
|||
if (padapter->pbuddy_adapter)
|
||||
LeaveAllPowerSaveMode(padapter->pbuddy_adapter);
|
||||
|
||||
if ((padapter->isprimary == _FALSE) && padapter->pbuddy_adapter){
|
||||
if ((padapter->isprimary == false) && padapter->pbuddy_adapter){
|
||||
padapter = padapter->pbuddy_adapter;
|
||||
pwrpriv = &padapter->pwrctrlpriv;
|
||||
pmlmepriv = &padapter->mlmepriv;
|
||||
|
@ -1623,22 +1623,22 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
|||
}
|
||||
|
||||
//System suspend is not allowed to wakeup
|
||||
if ((pwrpriv->bInternalAutoSuspend == _FALSE) && (_TRUE == pwrpriv->bInSuspend )){
|
||||
if ((pwrpriv->bInternalAutoSuspend == false) && (true == pwrpriv->bInSuspend )){
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
//block???
|
||||
if ((pwrpriv->bInternalAutoSuspend == _TRUE) && (padapter->net_closed == _TRUE)) {
|
||||
if ((pwrpriv->bInternalAutoSuspend == true) && (padapter->net_closed == true)) {
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
//I think this should be check in IPS, LPS, autosuspend functions...
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
{
|
||||
#if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||
if (_TRUE==pwrpriv->bInternalAutoSuspend){
|
||||
if (true==pwrpriv->bInternalAutoSuspend){
|
||||
if (0==pwrpriv->autopm_cnt){
|
||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,33))
|
||||
if (usb_autopm_get_interface(adapter_to_dvobj(padapter)->pusbintf) < 0)
|
||||
|
@ -1663,7 +1663,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
|||
{
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
if (pwrpriv->brfoffbyhw==_TRUE)
|
||||
if (pwrpriv->brfoffbyhw==true)
|
||||
{
|
||||
DBG_88E("hw still in rf_off state ...........\n");
|
||||
ret = _FAIL;
|
||||
|
@ -1705,7 +1705,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
|||
, padapter->bDriverStopped
|
||||
, padapter->bup
|
||||
, padapter->hw_init_completed);
|
||||
ret= _FALSE;
|
||||
ret= false;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
@ -1734,7 +1734,7 @@ int rtw_pm_set_lps(_adapter *padapter, u8 mode)
|
|||
pwrctrlpriv->LpsIdleCount = 2;
|
||||
}
|
||||
pwrctrlpriv->power_mgnt = mode;
|
||||
pwrctrlpriv->bLeisurePs = (PS_MODE_ACTIVE != pwrctrlpriv->power_mgnt)?_TRUE:_FALSE;
|
||||
pwrctrlpriv->bLeisurePs = (PS_MODE_ACTIVE != pwrctrlpriv->power_mgnt)?true:false;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
174
core/rtw_recv.c
174
core/rtw_recv.c
|
@ -200,7 +200,7 @@ union recv_frame *_rtw_alloc_recvframe (_queue *pfree_recv_queue)
|
|||
struct recv_priv *precvpriv;
|
||||
_func_enter_;
|
||||
|
||||
if (_rtw_queue_empty(pfree_recv_queue) == _TRUE)
|
||||
if (_rtw_queue_empty(pfree_recv_queue) == true)
|
||||
{
|
||||
precvframe = NULL;
|
||||
}
|
||||
|
@ -377,7 +377,7 @@ _func_enter_;
|
|||
phead = get_list_head(pframequeue);
|
||||
plist = get_next(phead);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE)
|
||||
while (rtw_end_of_queue_search(phead, plist) == false)
|
||||
{
|
||||
precvframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||
|
||||
|
@ -455,7 +455,7 @@ struct recv_buf *rtw_dequeue_recvbuf (_queue *queue)
|
|||
_enter_critical_ex(&queue->lock, &irqL);
|
||||
#endif/*#ifdef CONFIG_SDIO_HCI*/
|
||||
|
||||
if (_rtw_queue_empty(queue) == _TRUE)
|
||||
if (_rtw_queue_empty(queue) == true)
|
||||
{
|
||||
precvbuf = NULL;
|
||||
}
|
||||
|
@ -487,7 +487,7 @@ sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe){
|
|||
sint i,res=_SUCCESS;
|
||||
u32 datalen;
|
||||
u8 miccode[8];
|
||||
u8 bmic_err=_FALSE,brpt_micerror = _TRUE;
|
||||
u8 bmic_err=false,brpt_micerror = true;
|
||||
u8 *pframe, *payload,*pframemic;
|
||||
u8 *mickey;
|
||||
//u8 *iv,rxdata_key_idx=0;
|
||||
|
@ -521,7 +521,7 @@ _func_enter_;
|
|||
//DBG_88E("\n recvframe_chkmic: bcmc key psecuritypriv->dot118021XGrpKeyid(%d),pmlmeinfo->key_index(%d) ,recv key_id(%d)\n",
|
||||
// psecuritypriv->dot118021XGrpKeyid,pmlmeinfo->key_index,rxdata_key_idx);
|
||||
|
||||
if (psecuritypriv->binstallGrpkey==_FALSE)
|
||||
if (psecuritypriv->binstallGrpkey==false)
|
||||
{
|
||||
res=_FAIL;
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("\n recvframe_chkmic:didn't install group key!!!!!!!!!!\n"));
|
||||
|
@ -546,17 +546,17 @@ _func_enter_;
|
|||
|
||||
pframemic=payload+datalen;
|
||||
|
||||
bmic_err=_FALSE;
|
||||
bmic_err=false;
|
||||
|
||||
for (i=0;i<8;i++){
|
||||
if (miccode[i] != *(pframemic+i)){
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("recvframe_chkmic:miccode[%d](%02x) != *(pframemic+%d)(%02x) ",i,miccode[i],i,*(pframemic+i)));
|
||||
bmic_err=_TRUE;
|
||||
bmic_err=true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (bmic_err==_TRUE){
|
||||
if (bmic_err==true){
|
||||
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("\n *(pframemic-8)-*(pframemic-1)=0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
|
||||
*(pframemic-8),*(pframemic-7),*(pframemic-6),*(pframemic-5),*(pframemic-4),*(pframemic-3),*(pframemic-2),*(pframemic-1)));
|
||||
|
@ -583,10 +583,10 @@ _func_enter_;
|
|||
|
||||
// double check key_index for some timing issue ,
|
||||
// cannot compare with psecuritypriv->dot118021XGrpKeyid also cause timing issue
|
||||
if ((IS_MCAST(prxattrib->ra)==_TRUE) && (prxattrib->key_index != pmlmeinfo->key_index ))
|
||||
brpt_micerror = _FALSE;
|
||||
if ((IS_MCAST(prxattrib->ra)==true) && (prxattrib->key_index != pmlmeinfo->key_index ))
|
||||
brpt_micerror = false;
|
||||
|
||||
if ((prxattrib->bdecrypted ==_TRUE)&& (brpt_micerror == _TRUE))
|
||||
if ((prxattrib->bdecrypted ==true)&& (brpt_micerror == true))
|
||||
{
|
||||
rtw_handle_tkip_mic_err(adapter,(u8)IS_MCAST(prxattrib->ra));
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,(" mic error :prxattrib->bdecrypted=%d ",prxattrib->bdecrypted));
|
||||
|
@ -603,9 +603,9 @@ _func_enter_;
|
|||
}
|
||||
else{
|
||||
//mic checked ok
|
||||
if ((psecuritypriv->bcheck_grpkey ==_FALSE)&&(IS_MCAST(prxattrib->ra)==_TRUE)){
|
||||
psecuritypriv->bcheck_grpkey =_TRUE;
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("psecuritypriv->bcheck_grpkey =_TRUE"));
|
||||
if ((psecuritypriv->bcheck_grpkey ==false)&&(IS_MCAST(prxattrib->ra)==true)){
|
||||
psecuritypriv->bcheck_grpkey =true;
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("psecuritypriv->bcheck_grpkey =true"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -663,13 +663,13 @@ _func_enter_;
|
|||
}
|
||||
}
|
||||
|
||||
if ((prxattrib->encrypt>0) && ((prxattrib->bdecrypted==0) ||(psecuritypriv->sw_decrypt==_TRUE)))
|
||||
if ((prxattrib->encrypt>0) && ((prxattrib->bdecrypted==0) ||(psecuritypriv->sw_decrypt==true)))
|
||||
{
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (!IS_MCAST(prxattrib->ra))//bc/mc packets use sw decryption for concurrent mode
|
||||
#endif
|
||||
psecuritypriv->hw_decrypted=_FALSE;
|
||||
psecuritypriv->hw_decrypted=false;
|
||||
|
||||
#ifdef DBG_RX_DECRYPTOR
|
||||
DBG_88E("prxstat->bdecrypted:%d, prxattrib->encrypt:%d, Setting psecuritypriv->hw_decrypted = %d\n"
|
||||
|
@ -701,7 +701,7 @@ _func_enter_;
|
|||
&& (psecuritypriv->busetkipkey==1 || prxattrib->encrypt !=_TKIP_ )
|
||||
)
|
||||
{
|
||||
psecuritypriv->hw_decrypted=_TRUE;
|
||||
psecuritypriv->hw_decrypted=true;
|
||||
#ifdef DBG_RX_DECRYPTOR
|
||||
DBG_88E("prxstat->bdecrypted:%d, prxattrib->encrypt:%d, Setting psecuritypriv->hw_decrypted = %d\n"
|
||||
, prxattrib->bdecrypted ,prxattrib->encrypt, psecuritypriv->hw_decrypted);
|
||||
|
@ -1129,8 +1129,8 @@ sint sta2sta_data_frame(
|
|||
|
||||
_func_enter_;
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE))
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true))
|
||||
{
|
||||
|
||||
// filter packets that SA is myself or multicast or broadcast
|
||||
|
@ -1155,7 +1155,7 @@ _func_enter_;
|
|||
sta_addr = pattrib->src;
|
||||
|
||||
}
|
||||
else if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)
|
||||
else if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)
|
||||
{
|
||||
#ifdef CONFIG_TDLS
|
||||
|
||||
|
@ -1253,7 +1253,7 @@ _func_enter_;
|
|||
}
|
||||
|
||||
}
|
||||
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||
{
|
||||
if (bmcast)
|
||||
{
|
||||
|
@ -1275,7 +1275,7 @@ _func_enter_;
|
|||
}
|
||||
|
||||
}
|
||||
else if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE)
|
||||
else if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true)
|
||||
{
|
||||
_rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN);
|
||||
_rtw_memcpy(pattrib->src, GetAddr2Ptr(ptr), ETH_ALEN);
|
||||
|
@ -1307,7 +1307,7 @@ _func_enter_;
|
|||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (adapter->registrypriv.mp_mode == 1)
|
||||
{
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true)
|
||||
adapter->mppriv.rx_pktloss++;
|
||||
}
|
||||
#endif
|
||||
|
@ -1341,9 +1341,9 @@ sint ap2sta_data_frame(
|
|||
|
||||
_func_enter_;
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)
|
||||
&& (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE
|
||||
|| check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == _TRUE )
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)
|
||||
&& (check_fwstate(pmlmepriv, _FW_LINKED) == true
|
||||
|| check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true )
|
||||
)
|
||||
{
|
||||
|
||||
|
@ -1420,8 +1420,8 @@ _func_enter_;
|
|||
}
|
||||
|
||||
}
|
||||
else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE) &&
|
||||
(check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) )
|
||||
else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) &&
|
||||
(check_fwstate(pmlmepriv, _FW_LINKED) == true) )
|
||||
{
|
||||
_rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN);
|
||||
_rtw_memcpy(pattrib->src, GetAddr2Ptr(ptr), ETH_ALEN);
|
||||
|
@ -1445,7 +1445,7 @@ _func_enter_;
|
|||
|
||||
|
||||
}
|
||||
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||
{
|
||||
/* Special case */
|
||||
ret = RTW_RX_HANDLED;
|
||||
|
@ -1496,7 +1496,7 @@ sint sta2ap_data_frame(
|
|||
|
||||
_func_enter_;
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||
{
|
||||
//For AP mode, RA=BSSID, TX=STA(SRC_ADDR), A3=DST_ADDR
|
||||
if (!_rtw_memcmp(pattrib->bssid, mybssid, ETH_ALEN))
|
||||
|
@ -1632,7 +1632,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
|||
xmitframe_phead = get_list_head(&psta->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
if ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == _FALSE)
|
||||
if ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == false)
|
||||
{
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
|
@ -1652,7 +1652,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
|||
//DBG_88E("handling ps-poll, q_len=%d, tim=%x\n", psta->sleepq_len, pstapriv->tim_bitmap);
|
||||
|
||||
_exit_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||
if (rtw_hal_xmit(padapter, pxmitframe) == _TRUE)
|
||||
if (rtw_hal_xmit(padapter, pxmitframe) == true)
|
||||
{
|
||||
rtw_os_xmit_complete(padapter, pxmitframe);
|
||||
}
|
||||
|
@ -1666,7 +1666,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
|||
|
||||
//upate BCN for TIM IE
|
||||
//update_BCNTIM(padapter);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1692,7 +1692,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
|||
|
||||
//upate BCN for TIM IE
|
||||
//update_BCNTIM(padapter);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1733,7 +1733,7 @@ sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_frame)
|
|||
else if (GetFrameSubType(precv_frame->u.hdr.rx_data) == WIFI_PROBEREQ)
|
||||
psta->sta_stats.rx_probereq_pkts++;
|
||||
else if (GetFrameSubType(precv_frame->u.hdr.rx_data) == WIFI_PROBERSP) {
|
||||
if (_rtw_memcmp(padapter->eeprompriv.mac_addr, GetAddr1Ptr(precv_frame->u.hdr.rx_data), ETH_ALEN) == _TRUE)
|
||||
if (_rtw_memcmp(padapter->eeprompriv.mac_addr, GetAddr1Ptr(precv_frame->u.hdr.rx_data), ETH_ALEN) == true)
|
||||
psta->sta_stats.rx_probersp_pkts++;
|
||||
else if (is_broadcast_mac_addr(GetAddr1Ptr(precv_frame->u.hdr.rx_data))
|
||||
|| is_multicast_mac_addr(GetAddr1Ptr(precv_frame->u.hdr.rx_data)))
|
||||
|
@ -1745,7 +1745,7 @@ sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_frame)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_INTEL_PROXIM
|
||||
if (padapter->proximity.proxim_on==_TRUE)
|
||||
if (padapter->proximity.proxim_on==true)
|
||||
{
|
||||
struct rx_pkt_attrib * pattrib=&precv_frame->u.hdr.attrib;
|
||||
struct recv_stat* prxstat=( struct recv_stat * ) precv_frame->u.hdr.rx_head ;
|
||||
|
@ -1904,7 +1904,7 @@ _func_enter_;
|
|||
|
||||
if (pattrib->priority!=0 && pattrib->priority!=3)
|
||||
{
|
||||
adapter->recvpriv.bIsAnyNonBEPkts = _TRUE;
|
||||
adapter->recvpriv.bIsAnyNonBEPkts = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2194,16 +2194,16 @@ _func_enter_;
|
|||
/* convert hdr + possible LLC headers into Ethernet header */
|
||||
//eth_type = (psnap_type[0] << 8) | psnap_type[1];
|
||||
if ((_rtw_memcmp(psnap, rtw_rfc1042_header, SNAP_SIZE) &&
|
||||
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_IPX, 2) == _FALSE) &&
|
||||
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_AARP, 2)==_FALSE) )||
|
||||
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_IPX, 2) == false) &&
|
||||
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_AARP, 2)==false) )||
|
||||
//eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) ||
|
||||
_rtw_memcmp(psnap, rtw_bridge_tunnel_header, SNAP_SIZE)){
|
||||
/* remove RFC1042 or Bridge-Tunnel encapsulation and replace EtherType */
|
||||
bsnaphdr = _TRUE;
|
||||
bsnaphdr = true;
|
||||
}
|
||||
else {
|
||||
/* Leave Ethernet header part of hdr and full payload */
|
||||
bsnaphdr = _FALSE;
|
||||
bsnaphdr = false;
|
||||
}
|
||||
|
||||
rmv_len = pattrib->hdrlen + pattrib->iv_len +(bsnaphdr?SNAP_SIZE:0);
|
||||
|
@ -2215,7 +2215,7 @@ _func_enter_;
|
|||
eth_type= ntohs((unsigned short )eth_type); //pattrib->ether_type
|
||||
pattrib->eth_type = eth_type;
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE))
|
||||
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true))
|
||||
{
|
||||
ptr += rmv_len ;
|
||||
*ptr = 0x87;
|
||||
|
@ -2269,12 +2269,12 @@ _func_enter_;
|
|||
if (psnap->dsap==0xaa && psnap->ssap==0xaa && psnap->ctrl==0x03)
|
||||
{
|
||||
if (_rtw_memcmp(psnap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN))
|
||||
bsnaphdr=_TRUE;//wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_RFC1042;
|
||||
bsnaphdr=true;//wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_RFC1042;
|
||||
else if (_rtw_memcmp(psnap->oui, SNAP_HDR_APPLETALK_DDP, WLAN_IEEE_OUI_LEN) &&
|
||||
_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_DDP, 2) )
|
||||
bsnaphdr=_TRUE; //wlan_pkt_format = WLAN_PKT_FORMAT_APPLETALK;
|
||||
bsnaphdr=true; //wlan_pkt_format = WLAN_PKT_FORMAT_APPLETALK;
|
||||
else if (_rtw_memcmp( psnap->oui, oui_8021h, WLAN_IEEE_OUI_LEN))
|
||||
bsnaphdr=_TRUE; //wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_TUNNEL;
|
||||
bsnaphdr=true; //wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_TUNNEL;
|
||||
else {
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("drop pkt due to invalid frame format!\n"));
|
||||
ret= _FAIL;
|
||||
|
@ -2282,12 +2282,12 @@ _func_enter_;
|
|||
}
|
||||
|
||||
} else
|
||||
bsnaphdr=_FALSE;//wlan_pkt_format = WLAN_PKT_FORMAT_OTHERS;
|
||||
bsnaphdr=false;//wlan_pkt_format = WLAN_PKT_FORMAT_OTHERS;
|
||||
|
||||
rmv_len = pattrib->hdrlen + pattrib->iv_len +(bsnaphdr?SNAP_SIZE:0);
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_info_,("===pattrib->hdrlen: %x, pattrib->iv_len:%x ===\n", pattrib->hdrlen, pattrib->iv_len));
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true)
|
||||
{
|
||||
ptr += rmv_len ;
|
||||
*ptr = 0x87;
|
||||
|
@ -2482,7 +2482,7 @@ _func_enter_;
|
|||
|
||||
data=get_recvframe_data(prframe);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE)
|
||||
while (rtw_end_of_queue_search(phead, plist) == false)
|
||||
{
|
||||
pnextrframe = LIST_CONTAINOR(plist, union recv_frame , u);
|
||||
pnfhdr=&pnextrframe->u.hdr;
|
||||
|
@ -2584,7 +2584,7 @@ _func_enter_;
|
|||
if (fragnum==0)
|
||||
{
|
||||
//the first fragment
|
||||
if (_rtw_queue_empty(pdefrag_q) == _FALSE)
|
||||
if (_rtw_queue_empty(pdefrag_q) == false)
|
||||
{
|
||||
//free current defrag_q
|
||||
rtw_free_recvframe_queue(pdefrag_q, pfree_recv_queue);
|
||||
|
@ -2816,7 +2816,7 @@ int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe)
|
|||
#endif // (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35))
|
||||
|
||||
|
||||
if ( br_port && (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == _TRUE) )
|
||||
if ( br_port && (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true) )
|
||||
{
|
||||
int nat25_handle_frame(_adapter *priv, struct sk_buff *skb);
|
||||
if (nat25_handle_frame(padapter, sub_skb) == -1) {
|
||||
|
@ -2971,16 +2971,16 @@ exit:
|
|||
{
|
||||
if ( _rtw_memcmp(psnap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN))
|
||||
{
|
||||
bsnaphdr=_TRUE;//wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_RFC1042;
|
||||
bsnaphdr=true;//wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_RFC1042;
|
||||
}
|
||||
else if (_rtw_memcmp(psnap->oui, SNAP_HDR_APPLETALK_DDP, WLAN_IEEE_OUI_LEN) &&
|
||||
_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_DDP, 2) )
|
||||
{
|
||||
bsnaphdr=_TRUE; //wlan_pkt_format = WLAN_PKT_FORMAT_APPLETALK;
|
||||
bsnaphdr=true; //wlan_pkt_format = WLAN_PKT_FORMAT_APPLETALK;
|
||||
}
|
||||
else if (_rtw_memcmp( psnap->oui, oui_8021h, WLAN_IEEE_OUI_LEN))
|
||||
{
|
||||
bsnaphdr=_TRUE; //wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_TUNNEL;
|
||||
bsnaphdr=true; //wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_TUNNEL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2998,7 +2998,7 @@ exit:
|
|||
}
|
||||
else
|
||||
{
|
||||
bsnaphdr=_FALSE;//wlan_pkt_format = WLAN_PKT_FORMAT_OTHERS;
|
||||
bsnaphdr=false;//wlan_pkt_format = WLAN_PKT_FORMAT_OTHERS;
|
||||
}
|
||||
|
||||
ptr += (bsnaphdr?SNAP_SIZE:0);
|
||||
|
@ -3104,7 +3104,7 @@ exit:
|
|||
}
|
||||
|
||||
|
||||
if ((padapter->bDriverStopped ==_FALSE)&&( padapter->bSurpriseRemoved==_FALSE) )
|
||||
if ((padapter->bDriverStopped ==false)&&( padapter->bSurpriseRemoved==false) )
|
||||
{
|
||||
rtw_recv_indicatepkt(padapter, pnrframe);//indicate this recv_frame
|
||||
}
|
||||
|
@ -3159,7 +3159,7 @@ int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_num)
|
|||
#endif
|
||||
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -3194,7 +3194,7 @@ int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_num)
|
|||
|
||||
//DbgPrint("exit->check_indicate_seq(): IndicateSeq: %d, NewSeq: %d\n", precvpriv->indicate_seq, seq_num);
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union recv_frame *prframe);
|
||||
|
@ -3215,7 +3215,7 @@ int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union rec
|
|||
phead = get_list_head(ppending_recvframe_queue);
|
||||
plist = get_next(phead);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE)
|
||||
while (rtw_end_of_queue_search(phead, plist) == false)
|
||||
{
|
||||
pnextrframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||
pnextattrib = &pnextrframe->u.hdr.attrib;
|
||||
|
@ -3231,7 +3231,7 @@ int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union rec
|
|||
|
||||
//_exit_critical_ex(&ppending_recvframe_queue->lock, &irql);
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3255,7 +3255,7 @@ int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union rec
|
|||
|
||||
|
||||
//RT_TRACE(COMP_RX_REORDER, DBG_TRACE, ("InsertRxReorderList(): Pkt insert into buffer!! IndicateSeq: %d, NewSeq: %d\n", pTS->RxIndicateSeq, SeqNum));
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
@ -3268,7 +3268,7 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
|||
union recv_frame *prframe;
|
||||
struct rx_pkt_attrib *pattrib;
|
||||
//u8 index = 0;
|
||||
int bPktInBuf = _FALSE;
|
||||
int bPktInBuf = false;
|
||||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||
_queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
||||
|
||||
|
@ -3281,10 +3281,10 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
|||
plist = get_next(phead);
|
||||
|
||||
// Handling some condition for forced indicate case.
|
||||
if (bforced==_TRUE)
|
||||
if (bforced==true)
|
||||
{
|
||||
if (rtw_is_list_empty(phead))
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
prframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||
pattrib = &prframe->u.hdr.attrib;
|
||||
|
@ -3326,8 +3326,8 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
|||
//indicate this recv_frame
|
||||
if (!pattrib->amsdu)
|
||||
{
|
||||
if ((padapter->bDriverStopped == _FALSE) &&
|
||||
(padapter->bSurpriseRemoved == _FALSE))
|
||||
if ((padapter->bDriverStopped == false) &&
|
||||
(padapter->bSurpriseRemoved == false))
|
||||
{
|
||||
|
||||
rtw_recv_indicatepkt(padapter, prframe);//indicate this recv_frame
|
||||
|
@ -3348,12 +3348,12 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
|||
|
||||
|
||||
//Update local variables.
|
||||
bPktInBuf = _FALSE;
|
||||
bPktInBuf = false;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
bPktInBuf = _TRUE;
|
||||
bPktInBuf = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -3381,7 +3381,7 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
|||
*/
|
||||
//_exit_critical_ex(&ppending_recvframe_queue->lock, &irql);
|
||||
|
||||
//return _TRUE;
|
||||
//return true;
|
||||
return bPktInBuf;
|
||||
|
||||
}
|
||||
|
@ -3403,8 +3403,8 @@ int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prframe)
|
|||
if ((pattrib->qos!=1) /*|| pattrib->priority!=0 || IS_MCAST(pattrib->ra)*/
|
||||
|| (pattrib->eth_type==0x0806) || (pattrib->ack_policy!=0))
|
||||
{
|
||||
if ((padapter->bDriverStopped == _FALSE) &&
|
||||
(padapter->bSurpriseRemoved == _FALSE))
|
||||
if ((padapter->bDriverStopped == false) &&
|
||||
(padapter->bSurpriseRemoved == false))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_, ("@@@@ recv_indicatepkt_reorder -recv_func recv_indicatepkt\n" ));
|
||||
|
||||
|
@ -3421,7 +3421,7 @@ int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prframe)
|
|||
|
||||
}
|
||||
|
||||
if (preorder_ctrl->enable == _FALSE)
|
||||
if (preorder_ctrl->enable == false)
|
||||
{
|
||||
//indicate this recv_frame
|
||||
preorder_ctrl->indicate_seq = pattrib->seq_num;
|
||||
|
@ -3450,7 +3450,7 @@ int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prframe)
|
|||
}
|
||||
else if (pattrib->amsdu==1) //temp filter -> means didn't support A-MSDUs in a A-MPDU
|
||||
{
|
||||
if (preorder_ctrl->enable == _FALSE)
|
||||
if (preorder_ctrl->enable == false)
|
||||
{
|
||||
preorder_ctrl->indicate_seq = pattrib->seq_num;
|
||||
#ifdef DBG_RX_SEQ
|
||||
|
@ -3530,8 +3530,8 @@ int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prframe)
|
|||
// 2. All packets with SeqNum larger than or equal to WinStart => Buffer it.
|
||||
//
|
||||
|
||||
//recv_indicatepkts_in_order(padapter, preorder_ctrl, _TRUE);
|
||||
if (recv_indicatepkts_in_order(padapter, preorder_ctrl, _FALSE)==_TRUE)
|
||||
//recv_indicatepkts_in_order(padapter, preorder_ctrl, true);
|
||||
if (recv_indicatepkts_in_order(padapter, preorder_ctrl, false)==true)
|
||||
{
|
||||
_set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME);
|
||||
_exit_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
|
@ -3572,7 +3572,7 @@ void rtw_reordering_ctrl_timeout_handler(void *pcontext)
|
|||
|
||||
_enter_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
|
||||
if (recv_indicatepkts_in_order(padapter, preorder_ctrl, _TRUE)==_TRUE)
|
||||
if (recv_indicatepkts_in_order(padapter, preorder_ctrl, true)==true)
|
||||
{
|
||||
_set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME);
|
||||
}
|
||||
|
@ -3597,12 +3597,12 @@ int process_recv_indicatepkts(_adapter *padapter, union recv_frame *prframe)
|
|||
struct ht_priv *phtpriv = &pmlmepriv->htpriv;
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
if ( (phtpriv->ht_option==_TRUE) ||
|
||||
if ( (phtpriv->ht_option==true) ||
|
||||
((psta->tdls_sta_state & TDLS_LINKED_STATE) &&
|
||||
(psta->htpriv.ht_option==_TRUE) &&
|
||||
(psta->htpriv.ampdu_enable==_TRUE))) //B/G/N Mode
|
||||
(psta->htpriv.ht_option==true) &&
|
||||
(psta->htpriv.ampdu_enable==true))) //B/G/N Mode
|
||||
#else
|
||||
if (phtpriv->ht_option==_TRUE) //B/G/N Mode
|
||||
if (phtpriv->ht_option==true) //B/G/N Mode
|
||||
#endif //CONFIG_TDLS
|
||||
{
|
||||
//prframe->u.hdr.preorder_ctrl = &precvpriv->recvreorder_ctrl[pattrib->priority];
|
||||
|
@ -3613,8 +3613,8 @@ int process_recv_indicatepkts(_adapter *padapter, union recv_frame *prframe)
|
|||
DBG_88E("DBG_RX_DROP_FRAME %s recv_indicatepkt_reorder error!\n", __func__);
|
||||
#endif
|
||||
|
||||
if ((padapter->bDriverStopped == _FALSE) &&
|
||||
(padapter->bSurpriseRemoved == _FALSE))
|
||||
if ((padapter->bDriverStopped == false) &&
|
||||
(padapter->bSurpriseRemoved == false))
|
||||
{
|
||||
retval = _FAIL;
|
||||
return retval;
|
||||
|
@ -3634,7 +3634,7 @@ int process_recv_indicatepkts(_adapter *padapter, union recv_frame *prframe)
|
|||
return retval;
|
||||
}
|
||||
|
||||
if ((padapter->bDriverStopped ==_FALSE)&&( padapter->bSurpriseRemoved==_FALSE))
|
||||
if ((padapter->bDriverStopped ==false)&&( padapter->bSurpriseRemoved==false))
|
||||
{
|
||||
//indicate this recv_frame
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_, ("@@@@ process_recv_indicatepkts- recv_func recv_indicatepkt\n" ));
|
||||
|
@ -3671,14 +3671,14 @@ int recv_func_prehandle(_adapter *padapter, union recv_frame *rframe)
|
|||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
{
|
||||
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE))//&&(padapter->mppriv.check_mp_pkt == 0))
|
||||
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true))//&&(padapter->mppriv.check_mp_pkt == 0))
|
||||
{
|
||||
if (pattrib->crc_err == 1)
|
||||
padapter->mppriv.rx_crcerrpktcount++;
|
||||
else
|
||||
padapter->mppriv.rx_pktcount++;
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_LPBK_STATE) == _FALSE) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_LPBK_STATE) == false) {
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_alert_, ("MP - Not in loopback mode , drop pkt\n"));
|
||||
ret = _FAIL;
|
||||
rtw_free_recvframe(rframe, pfree_recv_queue);//free this recv_frame
|
||||
|
@ -3798,7 +3798,7 @@ int recv_func_posthandle(_adapter *padapter, union recv_frame *prframe)
|
|||
goto _recv_data_drop;
|
||||
}
|
||||
|
||||
if ((padapter->bDriverStopped == _FALSE) && (padapter->bSurpriseRemoved == _FALSE))
|
||||
if ((padapter->bDriverStopped == false) && (padapter->bSurpriseRemoved == false))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_alert_, ("@@@@ recv_func: recv_func rtw_recv_indicatepkt\n" ));
|
||||
//indicate this recv_frame
|
||||
|
@ -3883,7 +3883,7 @@ int recv_func(_adapter *padapter, union recv_frame *rframe)
|
|||
/* check if need to enqueue into uc_swdec_pending_queue*/
|
||||
if (check_fwstate(mlmepriv, WIFI_STATION_STATE) &&
|
||||
!IS_MCAST(prxattrib->ra) && prxattrib->encrypt>0 &&
|
||||
(prxattrib->bdecrypted == 0 ||psecuritypriv->sw_decrypt == _TRUE) &&
|
||||
(prxattrib->bdecrypted == 0 ||psecuritypriv->sw_decrypt == true) &&
|
||||
!is_wep_enc(psecuritypriv->dot11PrivacyAlgrthm) &&
|
||||
!psecuritypriv->busetkipkey) {
|
||||
rtw_enqueue_recvframe(rframe, &padapter->recvpriv.uc_swdec_pending_queue);
|
||||
|
@ -3974,7 +3974,7 @@ void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS){
|
|||
}
|
||||
|
||||
//update value of signal_strength, rssi, signal_qual
|
||||
if (check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY) == _FALSE) {
|
||||
if (check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY) == false) {
|
||||
tmp_s = (avg_signal_strength+(_alpha-1)*recvpriv->signal_strength);
|
||||
if (tmp_s %_alpha)
|
||||
tmp_s = tmp_s/_alpha + 1;
|
||||
|
|
|
@ -792,7 +792,7 @@ _func_enter_;
|
|||
|
||||
if (IS_MCAST(prxattrib->ra))
|
||||
{
|
||||
if (psecuritypriv->binstallGrpkey==_FALSE)
|
||||
if (psecuritypriv->binstallGrpkey==false)
|
||||
{
|
||||
res=_FAIL;
|
||||
DBG_88E("%s:rx bc/mc packets,but didn't install group key!!!!!!!!!!\n",__func__);
|
||||
|
@ -1915,7 +1915,7 @@ _func_enter_;
|
|||
//in concurrent we should use sw descrypt in group key, so we remove this message
|
||||
//DBG_88E("rx bc/mc packets, to perform sw rtw_aes_decrypt\n");
|
||||
//prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
|
||||
if (psecuritypriv->binstallGrpkey==_FALSE)
|
||||
if (psecuritypriv->binstallGrpkey==false)
|
||||
{
|
||||
res=_FAIL;
|
||||
DBG_88E("%s:rx bc/mc packets,but didn't install group key!!!!!!!!!!\n",__func__);
|
||||
|
@ -2865,7 +2865,7 @@ _func_enter_;
|
|||
}
|
||||
*/
|
||||
|
||||
padapter->securitypriv.busetkipkey=_TRUE;
|
||||
padapter->securitypriv.busetkipkey=true;
|
||||
|
||||
RT_TRACE(_module_rtl871x_security_c_,_drv_err_,("^^^rtw_use_tkipkey_handler padapter->securitypriv.busetkipkey=%d^^^\n",padapter->securitypriv.busetkipkey));
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ void sreset_init_value(_adapter *padapter)
|
|||
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
|
||||
|
||||
_rtw_mutex_init(&psrtpriv->silentreset_mutex);
|
||||
psrtpriv->silent_reset_inprogress = _FALSE;
|
||||
psrtpriv->silent_reset_inprogress = false;
|
||||
psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
|
||||
psrtpriv->last_tx_time =0;
|
||||
psrtpriv->last_tx_complete_time =0;
|
||||
|
@ -37,7 +37,7 @@ void sreset_reset_value(_adapter *padapter)
|
|||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
|
||||
|
||||
psrtpriv->silent_reset_inprogress = _FALSE;
|
||||
psrtpriv->silent_reset_inprogress = false;
|
||||
psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
|
||||
psrtpriv->last_tx_time =0;
|
||||
psrtpriv->last_tx_complete_time =0;
|
||||
|
@ -51,7 +51,7 @@ u8 sreset_get_wifi_status(_adapter *padapter)
|
|||
u8 status = WIFI_STATUS_SUCCESS;
|
||||
u32 val32 = 0;
|
||||
_irqL irqL;
|
||||
if (psrtpriv->silent_reset_inprogress == _TRUE)
|
||||
if (psrtpriv->silent_reset_inprogress == true)
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ _func_enter_;
|
|||
|
||||
psta->capability = 0;
|
||||
|
||||
psta->bpairwise_key_installed = _FALSE;
|
||||
psta->bpairwise_key_installed = false;
|
||||
|
||||
|
||||
#ifdef CONFIG_NATIVEAP_MLME
|
||||
|
@ -237,7 +237,7 @@ _func_enter_;
|
|||
phead = get_list_head(&pstapriv->free_sta_queue);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info ,list);
|
||||
plist = get_next(plist);
|
||||
|
@ -292,7 +292,7 @@ _func_enter_;
|
|||
phead = &(pstapriv->sta_hash[index]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
int i;
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info ,hash_list);
|
||||
|
@ -339,7 +339,7 @@ _func_enter_;
|
|||
|
||||
_enter_critical_bh(&(pfree_sta_queue->lock), &irqL);
|
||||
|
||||
if (_rtw_queue_empty(pfree_sta_queue) == _TRUE)
|
||||
if (_rtw_queue_empty(pfree_sta_queue) == true)
|
||||
{
|
||||
_exit_critical_bh(&(pfree_sta_queue->lock), &irqL);
|
||||
psta = NULL;
|
||||
|
@ -409,7 +409,7 @@ _func_enter_;
|
|||
|
||||
preorder_ctrl->padapter = pstapriv->padapter;
|
||||
|
||||
preorder_ctrl->enable = _FALSE;
|
||||
preorder_ctrl->enable = false;
|
||||
|
||||
preorder_ctrl->indicate_seq = 0xffff;
|
||||
#ifdef DBG_RX_SEQ
|
||||
|
@ -568,7 +568,7 @@ _func_enter_;
|
|||
}
|
||||
|
||||
if (!(psta->state & WIFI_AP_STATE))
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, _FALSE);
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, false);
|
||||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
|
||||
|
@ -652,7 +652,7 @@ _func_enter_;
|
|||
phead = &(pstapriv->sta_hash[index]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info ,hash_list);
|
||||
|
||||
|
@ -710,12 +710,12 @@ _func_enter_;
|
|||
plist = get_next(phead);
|
||||
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
|
||||
if ((_rtw_memcmp(psta->hwaddr, addr, ETH_ALEN))== _TRUE)
|
||||
if ((_rtw_memcmp(psta->hwaddr, addr, ETH_ALEN))== true)
|
||||
{ // if found the matched address
|
||||
break;
|
||||
}
|
||||
|
@ -785,12 +785,12 @@ _func_exit_;
|
|||
|
||||
u8 rtw_access_ctrl(_adapter *padapter, u8 *mac_addr)
|
||||
{
|
||||
u8 res = _TRUE;
|
||||
u8 res = true;
|
||||
#ifdef CONFIG_AP_MODE
|
||||
_irqL irqL;
|
||||
_list *plist, *phead;
|
||||
struct rtw_wlan_acl_node *paclnode;
|
||||
u8 match = _FALSE;
|
||||
u8 match = false;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
||||
_queue *pacl_node_q =&pacl_list->acl_node_q;
|
||||
|
@ -798,16 +798,16 @@ u8 rtw_access_ctrl(_adapter *padapter, u8 *mac_addr)
|
|||
_enter_critical_bh(&(pacl_node_q->lock), &irqL);
|
||||
phead = get_list_head(pacl_node_q);
|
||||
plist = get_next(phead);
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
paclnode = LIST_CONTAINOR(plist, struct rtw_wlan_acl_node, list);
|
||||
plist = get_next(plist);
|
||||
|
||||
if (_rtw_memcmp(paclnode->addr, mac_addr, ETH_ALEN))
|
||||
{
|
||||
if (paclnode->valid == _TRUE)
|
||||
if (paclnode->valid == true)
|
||||
{
|
||||
match = _TRUE;
|
||||
match = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -817,15 +817,15 @@ u8 rtw_access_ctrl(_adapter *padapter, u8 *mac_addr)
|
|||
|
||||
if (pacl_list->mode == 1)//accept unless in deny list
|
||||
{
|
||||
res = (match == _TRUE) ? _FALSE:_TRUE;
|
||||
res = (match == true) ? false:true;
|
||||
}
|
||||
else if (pacl_list->mode == 2)//deny unless in accept list
|
||||
{
|
||||
res = (match == _TRUE) ? _TRUE:_FALSE;
|
||||
res = (match == true) ? true:false;
|
||||
}
|
||||
else
|
||||
{
|
||||
res = _TRUE;
|
||||
res = true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -34,10 +34,10 @@ void rtw_reset_tdls_info(_adapter* padapter)
|
|||
{
|
||||
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
|
||||
|
||||
ptdlsinfo->ap_prohibited = _FALSE;
|
||||
ptdlsinfo->ap_prohibited = false;
|
||||
ptdlsinfo->setup_state = TDLS_STATE_NONE;
|
||||
ptdlsinfo->sta_cnt = 0;
|
||||
ptdlsinfo->sta_maximum = _FALSE;
|
||||
ptdlsinfo->sta_maximum = false;
|
||||
ptdlsinfo->macid_index= 6;
|
||||
ptdlsinfo->clear_cam= 0;
|
||||
ptdlsinfo->ch_sensing = 0;
|
||||
|
@ -166,7 +166,7 @@ s32 update_tdls_attrib(_adapter *padapter, struct pkt_attrib *pattrib)
|
|||
pattrib->priority = 0;
|
||||
}
|
||||
|
||||
if (psta->ieee8021x_blocked == _TRUE)
|
||||
if (psta->ieee8021x_blocked == true)
|
||||
{
|
||||
pattrib->encrypt = 0;
|
||||
}
|
||||
|
@ -217,11 +217,11 @@ s32 update_tdls_attrib(_adapter *padapter, struct pkt_attrib *pattrib)
|
|||
}
|
||||
|
||||
if (pattrib->encrypt &&
|
||||
((padapter->securitypriv.sw_encrypt == _TRUE) || (psecuritypriv->hw_decrypted == _FALSE)))
|
||||
((padapter->securitypriv.sw_encrypt == true) || (psecuritypriv->hw_decrypted == false)))
|
||||
{
|
||||
pattrib->bswenc = _TRUE;
|
||||
pattrib->bswenc = true;
|
||||
} else {
|
||||
pattrib->bswenc = _FALSE;
|
||||
pattrib->bswenc = false;
|
||||
}
|
||||
|
||||
//qos_en, ht_en, init rate, ,bw, ch_offset, sgi
|
||||
|
@ -231,12 +231,12 @@ s32 update_tdls_attrib(_adapter *padapter, struct pkt_attrib *pattrib)
|
|||
pattrib->bwmode = psta->htpriv.bwmode;
|
||||
pattrib->ch_offset = psta->htpriv.ch_offset;
|
||||
pattrib->sgi= psta->htpriv.sgi;
|
||||
pattrib->ampdu_en = _FALSE;
|
||||
pattrib->ampdu_en = false;
|
||||
|
||||
//if (pattrib->ht_en && psta->htpriv.ampdu_enable)
|
||||
//{
|
||||
// if (psta->htpriv.agg_enable_bitmap & BIT(pattrib->priority))
|
||||
// pattrib->ampdu_en = _TRUE;
|
||||
// pattrib->ampdu_en = true;
|
||||
//}
|
||||
|
||||
exit:
|
||||
|
@ -257,13 +257,13 @@ void free_tdls_sta(_adapter *padapter, struct sta_info *ptdls_sta)
|
|||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
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) );
|
||||
}
|
||||
//ready to clear cam
|
||||
if (ptdls_sta->mac_id!=0){
|
||||
ptdlsinfo->clear_cam=ptdls_sta->mac_id;
|
||||
rtw_setstakey_cmd(padapter, (u8 *)ptdls_sta, _TRUE);
|
||||
rtw_setstakey_cmd(padapter, (u8 *)ptdls_sta, true);
|
||||
}
|
||||
|
||||
if (ptdlsinfo->sta_cnt==0){
|
||||
|
@ -294,7 +294,7 @@ void rtw_tdls_set_key(_adapter *adapter, struct rx_pkt_attrib *prx_pkt_attrib, s
|
|||
if (prx_pkt_attrib->encrypt)
|
||||
{
|
||||
ptdls_sta->dot118021XPrivacy=_AES_;
|
||||
rtw_setstakey_cmd(adapter, (u8*)ptdls_sta, _TRUE);
|
||||
rtw_setstakey_cmd(adapter, (u8*)ptdls_sta, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -315,13 +315,13 @@ void rtw_tdls_process_ht_cap(_adapter *adapter, struct sta_info *ptdls_sta, u8 *
|
|||
|
||||
if (ptdls_sta->flags & WLAN_STA_HT)
|
||||
{
|
||||
if (adapter->registrypriv.ht_enable == _TRUE)
|
||||
if (adapter->registrypriv.ht_enable == true)
|
||||
{
|
||||
ptdls_sta->htpriv.ht_option = _TRUE;
|
||||
ptdls_sta->htpriv.ht_option = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ptdls_sta->htpriv.ht_option = _FALSE;
|
||||
ptdls_sta->htpriv.ht_option = false;
|
||||
ptdls_sta->stat_code = _STATS_FAILURE_;
|
||||
}
|
||||
}
|
||||
|
@ -331,12 +331,12 @@ void rtw_tdls_process_ht_cap(_adapter *adapter, struct sta_info *ptdls_sta, u8 *
|
|||
{
|
||||
//check if sta supports rx ampdu
|
||||
if (adapter->registrypriv.ampdu_enable==1)
|
||||
ptdls_sta->htpriv.ampdu_enable = _TRUE;
|
||||
ptdls_sta->htpriv.ampdu_enable = true;
|
||||
|
||||
//check if sta support s Short GI
|
||||
if (ptdls_sta->htpriv.ht_cap.cap_info & cpu_to_le16(IEEE80211_HT_CAP_SGI_20|IEEE80211_HT_CAP_SGI_40))
|
||||
{
|
||||
ptdls_sta->htpriv.sgi = _TRUE;
|
||||
ptdls_sta->htpriv.sgi = true;
|
||||
}
|
||||
|
||||
// bwmode would still followed AP's setting
|
||||
|
@ -550,7 +550,7 @@ void issue_tdls_setup_req(_adapter *padapter, u8 *mac_addr)
|
|||
static u8 dialogtoken = 0;
|
||||
u32 timeout_interval= TPK_RESEND_COUNT * 1000; //retry timer should set at least 301 sec, using TPK_count counting 301 times.
|
||||
|
||||
if (ptdlsinfo->ap_prohibited == _TRUE)
|
||||
if (ptdlsinfo->ap_prohibited == true)
|
||||
goto exit;
|
||||
|
||||
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
||||
|
@ -586,7 +586,7 @@ void issue_tdls_setup_req(_adapter *padapter, u8 *mac_addr)
|
|||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
if ( ptdlsinfo->sta_cnt == (NUM_STA - 2) ) // -2: AP + BC/MC sta
|
||||
{
|
||||
ptdlsinfo->sta_maximum = _TRUE;
|
||||
ptdlsinfo->sta_maximum = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -992,9 +992,9 @@ void issue_tdls_ch_switch_rsp(_adapter *padapter, u8 *mac_addr)
|
|||
pattrib->qsel=pattrib->priority;
|
||||
/*
|
||||
_enter_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
if (xmitframe_enqueue_for_tdls_sleeping_sta(padapter, pmgntframe)==_TRUE){
|
||||
if (xmitframe_enqueue_for_tdls_sleeping_sta(padapter, pmgntframe)==true){
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
if (rtw_xmit_tdls_coalesce(padapter, pmgntframe, TDLS_CHANNEL_SWITCH_RESPONSE) !=_SUCCESS ){
|
||||
|
@ -1032,7 +1032,7 @@ sint On_TDLS_Dis_Rsp(_adapter *adapter, union recv_frame *precv_frame)
|
|||
ptdls_sta->tdls_sta_state |= TDLS_ALIVE_STATE;
|
||||
|
||||
//Record the tdls sta with lowest signal strength
|
||||
if ( (ptdlsinfo->sta_maximum == _TRUE) && (ptdls_sta->alive_count >= 1) )
|
||||
if ( (ptdlsinfo->sta_maximum == true) && (ptdls_sta->alive_count >= 1) )
|
||||
{
|
||||
if ( _rtw_memcmp(ptdlsinfo->ss_record.macaddr, empty_addr, ETH_ALEN) )
|
||||
{
|
||||
|
@ -1052,7 +1052,7 @@ sint On_TDLS_Dis_Rsp(_adapter *adapter, union recv_frame *precv_frame)
|
|||
}
|
||||
else
|
||||
{
|
||||
if ( ptdlsinfo->sta_maximum == _TRUE)
|
||||
if ( ptdlsinfo->sta_maximum == true)
|
||||
{
|
||||
if ( _rtw_memcmp( ptdlsinfo->ss_record.macaddr, empty_addr, ETH_ALEN ) )
|
||||
{
|
||||
|
@ -1122,7 +1122,7 @@ sint On_TDLS_Setup_Req(_adapter *adapter, union recv_frame *precv_frame)
|
|||
-PAYLOAD_TYPE_LEN
|
||||
-FIXED_IE;
|
||||
|
||||
if (ptdlsinfo->ap_prohibited == _TRUE)
|
||||
if (ptdlsinfo->ap_prohibited == true)
|
||||
{
|
||||
goto exit;
|
||||
}
|
||||
|
@ -1192,7 +1192,7 @@ sint On_TDLS_Setup_Req(_adapter *adapter, union recv_frame *precv_frame)
|
|||
ppairwise_cipher=prsnie+10;
|
||||
_rtw_memcpy(&pairwise_count, (u16*)(ppairwise_cipher-2), 1);
|
||||
for (k=0;k<pairwise_count;k++){
|
||||
if (_rtw_memcmp( ppairwise_cipher+4*k, RSN_CIPHER_SUITE_CCMP, 4)==_TRUE)
|
||||
if (_rtw_memcmp( ppairwise_cipher+4*k, RSN_CIPHER_SUITE_CCMP, 4)==true)
|
||||
ccmp_have=1;
|
||||
}
|
||||
if (ccmp_have==0){
|
||||
|
@ -1221,7 +1221,7 @@ sint On_TDLS_Setup_Req(_adapter *adapter, union recv_frame *precv_frame)
|
|||
case EID_BSSCoexistence:
|
||||
break;
|
||||
case _LINK_ID_IE_:
|
||||
if (_rtw_memcmp(get_bssid(pmlmepriv), pIE->data, 6) == _FALSE)
|
||||
if (_rtw_memcmp(get_bssid(pmlmepriv), pIE->data, 6) == false)
|
||||
{
|
||||
//not in the same BSS
|
||||
ptdls_sta->stat_code=7;
|
||||
|
@ -1275,7 +1275,7 @@ sint On_TDLS_Setup_Req(_adapter *adapter, union recv_frame *precv_frame)
|
|||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
if ( ptdlsinfo->sta_cnt == (NUM_STA - 2) ) // -2: AP + BC/MC sta
|
||||
{
|
||||
ptdlsinfo->sta_maximum = _TRUE;
|
||||
ptdlsinfo->sta_maximum = true;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
|
@ -1380,7 +1380,7 @@ sint On_TDLS_Setup_Rsp(_adapter *adapter, union recv_frame *precv_frame)
|
|||
ppairwise_cipher=prsnie+10;
|
||||
_rtw_memcpy(&pairwise_count, (u16*)(ppairwise_cipher-2), 2);
|
||||
for (k=0;k<pairwise_count;k++){
|
||||
if (_rtw_memcmp( ppairwise_cipher+4*k, RSN_CIPHER_SUITE_CCMP, 4)==_TRUE)
|
||||
if (_rtw_memcmp( ppairwise_cipher+4*k, RSN_CIPHER_SUITE_CCMP, 4)==true)
|
||||
verify_ccmp=1;
|
||||
}
|
||||
case _EXT_CAP_IE_:
|
||||
|
@ -1611,7 +1611,7 @@ sint On_TDLS_Dis_Req(_adapter *adapter, union recv_frame *precv_frame)
|
|||
goto exit;
|
||||
}
|
||||
dst = pIE->data + 12;
|
||||
if ( (MacAddr_isBcst(dst) == _FALSE) && (_rtw_memcmp(myid(&(adapter->eeprompriv)), dst, 6) == _FALSE) )
|
||||
if ( (MacAddr_isBcst(dst) == false) && (_rtw_memcmp(myid(&(adapter->eeprompriv)), dst, 6) == false) )
|
||||
{
|
||||
goto exit;
|
||||
}
|
||||
|
@ -1716,7 +1716,7 @@ sint On_TDLS_Peer_Traffic_Rsp(_adapter *adapter, union recv_frame *precv_frame)
|
|||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
//transmit buffered frames
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == false)
|
||||
{
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
|
@ -1731,7 +1731,7 @@ sint On_TDLS_Peer_Traffic_Rsp(_adapter *adapter, union recv_frame *precv_frame)
|
|||
pxmitframe->attrib.eosp = 1;
|
||||
}
|
||||
//pxmitframe->attrib.triggered = 1; //maybe doesn't need in TDLS
|
||||
if (adapter->HalFunc.hal_xmit(adapter, pxmitframe) == _TRUE)
|
||||
if (adapter->HalFunc.hal_xmit(adapter, pxmitframe) == true)
|
||||
{
|
||||
rtw_os_xmit_complete(adapter, pxmitframe);
|
||||
}
|
||||
|
@ -1987,7 +1987,7 @@ void wfd_ie_tdls(_adapter * padapter, u8 *pframe, u32 *pktlen )
|
|||
|
||||
// Value:
|
||||
// Associated BSSID
|
||||
if ( check_fwstate( pmlmepriv, _FW_LINKED) == _TRUE )
|
||||
if ( check_fwstate( pmlmepriv, _FW_LINKED) == true )
|
||||
{
|
||||
_rtw_memcpy( wfdie + wfdielen, &pmlmepriv->assoc_bssid[ 0 ], ETH_ALEN );
|
||||
}
|
||||
|
@ -2880,7 +2880,7 @@ int update_sgi_tdls(_adapter *padapter, struct sta_info *psta)
|
|||
return psta_ht->sgi;
|
||||
}
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
u32 update_mask_tdls(_adapter *padapter, struct sta_info *psta)
|
||||
|
|
|
@ -82,10 +82,10 @@ int cckrates_included(unsigned char *rate, int ratelen)
|
|||
{
|
||||
if ( (((rate[i]) & 0x7f) == 2) || (((rate[i]) & 0x7f) == 4) ||
|
||||
(((rate[i]) & 0x7f) == 11) || (((rate[i]) & 0x7f) == 22) )
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
@ -97,10 +97,10 @@ int cckratesonly_included(unsigned char *rate, int ratelen)
|
|||
{
|
||||
if ( (((rate[i]) & 0x7f) != 2) && (((rate[i]) & 0x7f) != 4) &&
|
||||
(((rate[i]) & 0x7f) != 11) && (((rate[i]) & 0x7f) != 22) )
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned char networktype_to_raid(unsigned char network_type)
|
||||
|
@ -163,11 +163,11 @@ u8 judge_network_type(_adapter *padapter, unsigned char *rate, int ratelen)
|
|||
network_type = WIRELESS_11_24N;
|
||||
}
|
||||
|
||||
if ((cckratesonly_included(rate, ratelen)) == _TRUE)
|
||||
if ((cckratesonly_included(rate, ratelen)) == true)
|
||||
{
|
||||
network_type |= WIRELESS_11B;
|
||||
}
|
||||
else if ((cckrates_included(rate, ratelen)) == _TRUE)
|
||||
else if ((cckrates_included(rate, ratelen)) == true)
|
||||
{
|
||||
network_type |= WIRELESS_11BG;
|
||||
}
|
||||
|
@ -256,12 +256,12 @@ int is_basicrate(_adapter *padapter, unsigned char rate)
|
|||
{
|
||||
if (rate == ratetbl_val_2wifirate(val))
|
||||
{
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned int ratetbl2rateset(_adapter *padapter, unsigned char *rateset);
|
||||
|
@ -287,7 +287,7 @@ unsigned int ratetbl2rateset(_adapter *padapter, unsigned char *rateset)
|
|||
default:
|
||||
rate = ratetbl_val_2wifirate(rate);
|
||||
|
||||
if (is_basicrate(padapter, rate) == _TRUE)
|
||||
if (is_basicrate(padapter, rate) == true)
|
||||
{
|
||||
rate |= IEEE80211_BASIC_RATE_MASK;
|
||||
}
|
||||
|
@ -360,7 +360,7 @@ void UpdateBrateTblForSoftAP(u8 *bssrateset, u32 bssratelen)
|
|||
|
||||
void Save_DM_Func_Flag(_adapter *padapter)
|
||||
{
|
||||
u8 bSaveFlag = _TRUE;
|
||||
u8 bSaveFlag = true;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
|
@ -374,7 +374,7 @@ void Save_DM_Func_Flag(_adapter *padapter)
|
|||
|
||||
void Restore_DM_Func_Flag(_adapter *padapter)
|
||||
{
|
||||
u8 bSaveFlag = _FALSE;
|
||||
u8 bSaveFlag = false;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
if (pbuddy_adapter)
|
||||
|
@ -389,7 +389,7 @@ void Switch_DM_Func(_adapter *padapter, u32 mode, u8 enable)
|
|||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
#endif
|
||||
|
||||
if (enable == _TRUE)
|
||||
if (enable == true)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (pbuddy_adapter)
|
||||
|
@ -649,7 +649,7 @@ int is_client_associated_to_ap(_adapter *padapter)
|
|||
|
||||
if ((pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) && ((pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE))
|
||||
{
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -664,7 +664,7 @@ int is_client_associated_to_ibss(_adapter *padapter)
|
|||
|
||||
if ((pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) && ((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE))
|
||||
{
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -686,7 +686,7 @@ int is_IBSS_empty(_adapter *padapter)
|
|||
}
|
||||
}
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
@ -799,7 +799,7 @@ void flush_all_cam_entry(_adapter *padapter)
|
|||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
|
||||
//if (check_buddy_mlmeinfo_state(padapter, _HW_STATE_NOLINK_))
|
||||
if (check_buddy_fwstate(padapter, _FW_LINKED) == _FALSE)
|
||||
if (check_buddy_fwstate(padapter, _FW_LINKED) == false)
|
||||
{
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_CAM_INVALID_ALL, 0);
|
||||
}
|
||||
|
@ -822,10 +822,10 @@ void flush_all_cam_entry(_adapter *padapter)
|
|||
cam_id = 4;
|
||||
}
|
||||
//clear_cam_entry(padapter, cam_id);
|
||||
rtw_clearstakey_cmd(padapter, (u8*)psta, cam_id, _FALSE);
|
||||
rtw_clearstakey_cmd(padapter, (u8*)psta, cam_id, false);
|
||||
}
|
||||
}
|
||||
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||
{
|
||||
//clear cam when ap free per sta_info
|
||||
}
|
||||
|
@ -864,7 +864,7 @@ int WFD_info_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
|||
{
|
||||
pwdinfo->wfd_info->peer_rtsp_ctrlport = RTW_GET_BE16( attr_content + 2 );
|
||||
DBG_88E( "[%s] Peer PORT NUM = %d\n", __func__, pwdinfo->wfd_info->peer_rtsp_ctrlport );
|
||||
return( _TRUE );
|
||||
return( true );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -891,7 +891,7 @@ int WMM_param_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
|||
|
||||
pmlmeinfo->WMM_enable = 1;
|
||||
_rtw_memcpy(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element));
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
/*if (pregpriv->wifi_spec == 1)
|
||||
{
|
||||
|
@ -904,7 +904,7 @@ int WMM_param_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
|||
{
|
||||
pmlmeinfo->WMM_enable = 1;
|
||||
_rtw_rtw_memcpy(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element));
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1003,13 +1003,13 @@ void WMMOnAssocRsp(_adapter *padapter)
|
|||
//compare CW and AIFS
|
||||
if ((edca[j] & 0xFFFF) < (edca[i] & 0xFFFF))
|
||||
{
|
||||
change_inx = _TRUE;
|
||||
change_inx = true;
|
||||
}
|
||||
else if ((edca[j] & 0xFFFF) == (edca[i] & 0xFFFF))
|
||||
{
|
||||
//compare TXOP
|
||||
if ((edca[j] >> 16) > (edca[i] >> 16))
|
||||
change_inx = _TRUE;
|
||||
change_inx = true;
|
||||
}
|
||||
|
||||
if (change_inx)
|
||||
|
@ -1022,7 +1022,7 @@ void WMMOnAssocRsp(_adapter *padapter)
|
|||
inx[i] = inx[j];
|
||||
inx[j] = tmp;
|
||||
|
||||
change_inx = _FALSE;
|
||||
change_inx = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1051,7 +1051,7 @@ static void bwmode_update_check(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pI
|
|||
if (!pIE)
|
||||
return;
|
||||
|
||||
if (phtpriv->ht_option == _FALSE) return;
|
||||
if (phtpriv->ht_option == false) return;
|
||||
|
||||
if (pIE->Length > sizeof(struct HT_info_element))
|
||||
return;
|
||||
|
@ -1086,7 +1086,7 @@ static void bwmode_update_check(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pI
|
|||
|
||||
if ((new_bwmode!= pmlmeext->cur_bwmode) || (new_ch_offset!=pmlmeext->cur_ch_offset))
|
||||
{
|
||||
pmlmeinfo->bwmode_updated = _TRUE;
|
||||
pmlmeinfo->bwmode_updated = true;
|
||||
|
||||
pmlmeext->cur_bwmode = new_bwmode;
|
||||
pmlmeext->cur_ch_offset = new_ch_offset;
|
||||
|
@ -1096,11 +1096,11 @@ static void bwmode_update_check(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pI
|
|||
}
|
||||
else
|
||||
{
|
||||
pmlmeinfo->bwmode_updated = _FALSE;
|
||||
pmlmeinfo->bwmode_updated = false;
|
||||
}
|
||||
|
||||
|
||||
if (_TRUE == pmlmeinfo->bwmode_updated)
|
||||
if (true == pmlmeinfo->bwmode_updated)
|
||||
{
|
||||
struct sta_info *psta;
|
||||
WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network);
|
||||
|
@ -1129,7 +1129,7 @@ static void bwmode_update_check(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pI
|
|||
|
||||
}
|
||||
|
||||
//pmlmeinfo->bwmode_updated = _FALSE;//bwmode_updated done, reset it!
|
||||
//pmlmeinfo->bwmode_updated = false;//bwmode_updated done, reset it!
|
||||
|
||||
}
|
||||
#endif //CONFIG_80211N_HT
|
||||
|
@ -1149,7 +1149,7 @@ void HT_caps_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
|||
|
||||
if (pIE==NULL) return;
|
||||
|
||||
if (phtpriv->ht_option == _FALSE) return;
|
||||
if (phtpriv->ht_option == false) return;
|
||||
|
||||
pmlmeinfo->HT_caps_enable = 1;
|
||||
|
||||
|
@ -1232,7 +1232,7 @@ void HT_info_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
|||
|
||||
if (pIE==NULL) return;
|
||||
|
||||
if (phtpriv->ht_option == _FALSE) return;
|
||||
if (phtpriv->ht_option == false) return;
|
||||
|
||||
|
||||
if (pIE->Length > sizeof(struct HT_info_element))
|
||||
|
@ -1348,14 +1348,14 @@ int check_ap_tdls_prohibited(u8 *pframe, u8 pkt_len)
|
|||
|
||||
if (pkt_len < 5)
|
||||
{
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
pframe += 4;
|
||||
if ( (*pframe) & tdls_prohibited_bit )
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
#endif //CONFIG_TDLS
|
||||
|
||||
|
@ -1381,8 +1381,8 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
|
|||
unsigned short ht_cap_info;
|
||||
unsigned char ht_info_infos_0;
|
||||
|
||||
if (is_client_associated_to_ap(Adapter) == _FALSE)
|
||||
return _TRUE;
|
||||
if (is_client_associated_to_ap(Adapter) == false)
|
||||
return true;
|
||||
|
||||
len = packet_len - sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
|
||||
|
@ -1391,10 +1391,10 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
|
|||
return _FAIL;
|
||||
}
|
||||
|
||||
if (_rtw_memcmp(cur_network->network.MacAddress, pbssid, 6) == _FALSE) {
|
||||
if (_rtw_memcmp(cur_network->network.MacAddress, pbssid, 6) == false) {
|
||||
DBG_88E("Oops: rtw_check_network_encrypt linked but recv other bssid bcn\n" MAC_FMT MAC_FMT,
|
||||
MAC_ARG(pbssid), MAC_ARG(cur_network->network.MacAddress));
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bssid = (WLAN_BSSID_EX *)rtw_zmalloc(sizeof(WLAN_BSSID_EX));
|
||||
|
@ -1465,12 +1465,12 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
|
|||
/* checking SSID */
|
||||
if ((p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _SSID_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_)) == NULL) {
|
||||
DBG_88E("%s marc: cannot find SSID for survey event\n", __func__);
|
||||
hidden_ssid = _TRUE;
|
||||
hidden_ssid = true;
|
||||
} else {
|
||||
hidden_ssid = _FALSE;
|
||||
hidden_ssid = false;
|
||||
}
|
||||
|
||||
if ((NULL != p) && (_FALSE == hidden_ssid && (*(p + 1)))) {
|
||||
if ((NULL != p) && (false == hidden_ssid && (*(p + 1)))) {
|
||||
_rtw_memcpy(bssid->Ssid.Ssid, (p + 2), *(p + 1));
|
||||
bssid->Ssid.SsidLength = *(p + 1);
|
||||
} else {
|
||||
|
@ -1483,7 +1483,7 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
|
|||
bssid->Ssid.SsidLength, cur_network->network.Ssid.Ssid,
|
||||
cur_network->network.Ssid.SsidLength));
|
||||
|
||||
if (_rtw_memcmp(bssid->Ssid.Ssid, cur_network->network.Ssid.Ssid, 32) == _FALSE ||
|
||||
if (_rtw_memcmp(bssid->Ssid.Ssid, cur_network->network.Ssid.Ssid, 32) == false ||
|
||||
bssid->Ssid.SsidLength != cur_network->network.Ssid.SsidLength) {
|
||||
if (bssid->Ssid.Ssid[0] != '\0' && bssid->Ssid.SsidLength != 0) { /* not hidden ssid */
|
||||
DBG_88E("%s(), SSID is not match return FAIL\n", __func__);
|
||||
|
@ -1599,8 +1599,8 @@ void update_beacon_info(_adapter *padapter, u8 *pframe, uint pkt_len, struct sta
|
|||
|
||||
#ifdef CONFIG_TDLS
|
||||
case _EXT_CAP_IE_:
|
||||
if ( check_ap_tdls_prohibited(pIE->data, pIE->Length) == _TRUE )
|
||||
ptdlsinfo->ap_prohibited = _TRUE;
|
||||
if ( check_ap_tdls_prohibited(pIE->data, pIE->Length) == true )
|
||||
ptdlsinfo->ap_prohibited = true;
|
||||
break;
|
||||
#endif //CONFIG_TDLS
|
||||
default:
|
||||
|
@ -1660,14 +1660,14 @@ unsigned int is_ap_in_tkip(_adapter *padapter)
|
|||
case _VENDOR_SPECIFIC_IE_:
|
||||
if ((_rtw_memcmp(pIE->data, RTW_WPA_OUI, 4)) && (_rtw_memcmp((pIE->data + 12), WPA_TKIP_CIPHER, 4)))
|
||||
{
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
case _RSN_IE_2_:
|
||||
if (_rtw_memcmp((pIE->data + 8), RSN_TKIP_CIPHER, 4))
|
||||
{
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
default:
|
||||
|
@ -1677,11 +1677,11 @@ unsigned int is_ap_in_tkip(_adapter *padapter)
|
|||
i += (pIE->Length + 2);
|
||||
}
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1705,13 +1705,13 @@ unsigned int should_forbid_n_rate(_adapter * padapter)
|
|||
if (_rtw_memcmp(pIE->data, RTW_WPA_OUI, 4) &&
|
||||
((_rtw_memcmp((pIE->data + 12), WPA_CIPHER_SUITE_CCMP, 4)) ||
|
||||
(_rtw_memcmp((pIE->data + 16), WPA_CIPHER_SUITE_CCMP, 4))))
|
||||
return _FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case _RSN_IE_2_:
|
||||
if ((_rtw_memcmp((pIE->data + 8), RSN_CIPHER_SUITE_CCMP, 4)) ||
|
||||
(_rtw_memcmp((pIE->data + 12), RSN_CIPHER_SUITE_CCMP, 4)))
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
@ -1720,11 +1720,11 @@ unsigned int should_forbid_n_rate(_adapter * padapter)
|
|||
i += (pIE->Length + 2);
|
||||
}
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1748,11 +1748,11 @@ unsigned int is_ap_in_wep(_adapter *padapter)
|
|||
{
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
if (_rtw_memcmp(pIE->data, RTW_WPA_OUI, 4))
|
||||
return _FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case _RSN_IE_2_:
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
@ -1761,11 +1761,11 @@ unsigned int is_ap_in_wep(_adapter *padapter)
|
|||
i += (pIE->Length + 2);
|
||||
}
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2089,13 +2089,13 @@ void update_IOT_info(_adapter *padapter)
|
|||
pmlmeinfo->turboMode_cts2self = 0;
|
||||
pmlmeinfo->turboMode_rtsen = 1;
|
||||
//disable high power
|
||||
Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), _FALSE);
|
||||
Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), false);
|
||||
break;
|
||||
case HT_IOT_PEER_REALTEK:
|
||||
//rtw_write16(padapter, 0x4cc, 0xffff);
|
||||
//rtw_write16(padapter, 0x546, 0x01c0);
|
||||
//disable high power
|
||||
Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), _FALSE);
|
||||
Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), false);
|
||||
break;
|
||||
default:
|
||||
pmlmeinfo->turboMode_cts2self = 0;
|
||||
|
@ -2120,7 +2120,7 @@ void update_capinfo(PADAPTER Adapter, u16 updateCap)
|
|||
{ // Short Preamble
|
||||
if (pmlmeinfo->preamble_mode != PREAMBLE_SHORT) // PREAMBLE_LONG or PREAMBLE_AUTO
|
||||
{
|
||||
ShortPreamble = _TRUE;
|
||||
ShortPreamble = true;
|
||||
pmlmeinfo->preamble_mode = PREAMBLE_SHORT;
|
||||
rtw_hal_set_hwreg( Adapter, HW_VAR_ACK_PREAMBLE, (u8 *)&ShortPreamble );
|
||||
}
|
||||
|
@ -2129,7 +2129,7 @@ void update_capinfo(PADAPTER Adapter, u16 updateCap)
|
|||
{ // Long Preamble
|
||||
if (pmlmeinfo->preamble_mode != PREAMBLE_LONG) // PREAMBLE_SHORT or PREAMBLE_AUTO
|
||||
{
|
||||
ShortPreamble = _FALSE;
|
||||
ShortPreamble = false;
|
||||
pmlmeinfo->preamble_mode = PREAMBLE_LONG;
|
||||
rtw_hal_set_hwreg( Adapter, HW_VAR_ACK_PREAMBLE, (u8 *)&ShortPreamble );
|
||||
}
|
||||
|
@ -2207,11 +2207,11 @@ void update_wireless_mode(_adapter *padapter)
|
|||
network_type = WIRELESS_11_24N;
|
||||
}
|
||||
|
||||
if ((cckratesonly_included(rate, ratelen)) == _TRUE)
|
||||
if ((cckratesonly_included(rate, ratelen)) == true)
|
||||
{
|
||||
network_type |= WIRELESS_11B;
|
||||
}
|
||||
else if ((cckrates_included(rate, ratelen)) == _TRUE)
|
||||
else if ((cckrates_included(rate, ratelen)) == true)
|
||||
{
|
||||
network_type |= WIRELESS_11BG;
|
||||
}
|
||||
|
@ -2320,7 +2320,7 @@ void process_addba_req(_adapter *padapter, u8 *paddba_req, u8 *addr)
|
|||
preorder_ctrl->indicate_seq = 0xffff;
|
||||
#endif
|
||||
|
||||
preorder_ctrl->enable =(pmlmeinfo->bAcceptAddbaReq == _TRUE)? _TRUE :_FALSE;
|
||||
preorder_ctrl->enable =(pmlmeinfo->bAcceptAddbaReq == true)? true :false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2371,13 +2371,13 @@ int rtw_handle_dualmac(_adapter *adapter, bool init)
|
|||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
if (dvobj->InterfaceNumber == 0) {
|
||||
//set adapter_type/iface type
|
||||
adapter->isprimary = _TRUE;
|
||||
adapter->isprimary = true;
|
||||
adapter->adapter_type = PRIMARY_ADAPTER;
|
||||
adapter->iface_type = IFACE_PORT0;
|
||||
DBG_88E("%s(): PRIMARY_ADAPTER\n",__func__);
|
||||
} else {
|
||||
//set adapter_type/iface type
|
||||
adapter->isprimary = _FALSE;
|
||||
adapter->isprimary = false;
|
||||
adapter->adapter_type = SECONDARY_ADAPTER;
|
||||
adapter->iface_type = IFACE_PORT1;
|
||||
DBG_88E("%s(): SECONDARY_ADAPTER\n",__func__);
|
||||
|
|
166
core/rtw_xmit.c
166
core/rtw_xmit.c
|
@ -181,7 +181,7 @@ _func_enter_;
|
|||
|
||||
pxmitbuf->priv_data = NULL;
|
||||
pxmitbuf->padapter = padapter;
|
||||
pxmitbuf->ext_tag = _FALSE;
|
||||
pxmitbuf->ext_tag = false;
|
||||
|
||||
/*
|
||||
pxmitbuf->pallocated_buf = rtw_zmalloc(MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ);
|
||||
|
@ -244,7 +244,7 @@ _func_enter_;
|
|||
|
||||
pxmitbuf->priv_data = NULL;
|
||||
pxmitbuf->padapter = padapter;
|
||||
pxmitbuf->ext_tag = _TRUE;
|
||||
pxmitbuf->ext_tag = true;
|
||||
|
||||
/*
|
||||
pxmitbuf->pallocated_buf = rtw_zmalloc(max_xmit_extbuf_size);
|
||||
|
@ -301,7 +301,7 @@ _func_enter_;
|
|||
|
||||
|
||||
#ifdef CONFIG_XMIT_ACK
|
||||
pxmitpriv->ack_tx = _FALSE;
|
||||
pxmitpriv->ack_tx = false;
|
||||
_rtw_mutex_init(&pxmitpriv->ack_tx_mutex);
|
||||
rtw_sctx_init(&pxmitpriv->ack_tx_ops, 0);
|
||||
#endif
|
||||
|
@ -457,10 +457,10 @@ static void update_attrib_vcs_info(_adapter *padapter, struct xmit_frame *pxmitf
|
|||
}
|
||||
else
|
||||
{
|
||||
while (_TRUE)
|
||||
while (true)
|
||||
{
|
||||
//IOT action
|
||||
if ((pmlmeinfo->assoc_AP_vendor == HT_IOT_PEER_ATHEROS) && (pattrib->ampdu_en==_TRUE) &&
|
||||
if ((pmlmeinfo->assoc_AP_vendor == HT_IOT_PEER_ATHEROS) && (pattrib->ampdu_en==true) &&
|
||||
(padapter->securitypriv.dot11PrivacyAlgrthm == _AES_ ))
|
||||
{
|
||||
pattrib->vcs_mode = CTS_TO_SELF;
|
||||
|
@ -501,7 +501,7 @@ static void update_attrib_vcs_info(_adapter *padapter, struct xmit_frame *pxmitf
|
|||
//to do list: check MIMO power save condition.
|
||||
|
||||
//check AMPDU aggregation for TXOP
|
||||
if (pattrib->ampdu_en==_TRUE)
|
||||
if (pattrib->ampdu_en==true)
|
||||
{
|
||||
pattrib->vcs_mode = RTS_CTS;
|
||||
break;
|
||||
|
@ -535,16 +535,16 @@ static void update_attrib_phy_info(struct pkt_attrib *pattrib, struct sta_info *
|
|||
pattrib->bwmode = psta->htpriv.bwmode;
|
||||
pattrib->ch_offset = psta->htpriv.ch_offset;
|
||||
pattrib->sgi= psta->htpriv.sgi;
|
||||
pattrib->ampdu_en = _FALSE;
|
||||
pattrib->ampdu_en = false;
|
||||
#endif //CONFIG_80211N_HT
|
||||
//if (pattrib->ht_en && psta->htpriv.ampdu_enable)
|
||||
//{
|
||||
// if (psta->htpriv.agg_enable_bitmap & BIT(pattrib->priority))
|
||||
// pattrib->ampdu_en = _TRUE;
|
||||
// pattrib->ampdu_en = true;
|
||||
//}
|
||||
|
||||
|
||||
pattrib->retry_ctrl = _FALSE;
|
||||
pattrib->retry_ctrl = false;
|
||||
|
||||
}
|
||||
|
||||
|
@ -633,8 +633,8 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
|
|||
|
||||
pattrib->pctrl = 0;
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) {
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) {
|
||||
_rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
|
||||
_rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
|
||||
}
|
||||
|
@ -712,7 +712,7 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
|
|||
res =_FAIL;
|
||||
goto exit;
|
||||
}
|
||||
else if ((check_fwstate(pmlmepriv, WIFI_AP_STATE)==_TRUE)&&(!(psta->state & _FW_LINKED)))
|
||||
else if ((check_fwstate(pmlmepriv, WIFI_AP_STATE)==true)&&(!(psta->state & _FW_LINKED)))
|
||||
{
|
||||
res =_FAIL;
|
||||
goto exit;
|
||||
|
@ -764,17 +764,17 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
|
|||
|
||||
//pattrib->priority = 5; //force to used VI queue, for testing
|
||||
|
||||
if (psta->ieee8021x_blocked == _TRUE)
|
||||
if (psta->ieee8021x_blocked == true)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,("\n psta->ieee8021x_blocked == _TRUE\n"));
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,("\n psta->ieee8021x_blocked == true\n"));
|
||||
|
||||
pattrib->encrypt = 0;
|
||||
|
||||
if ((pattrib->ether_type != 0x888e) && (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _FALSE))
|
||||
if ((pattrib->ether_type != 0x888e) && (check_fwstate(pmlmepriv, WIFI_MP_STATE) == false))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,("\npsta->ieee8021x_blocked == _TRUE, pattrib->ether_type(%.4x) != 0x888e\n",pattrib->ether_type));
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,("\npsta->ieee8021x_blocked == true, pattrib->ether_type(%.4x) != 0x888e\n",pattrib->ether_type));
|
||||
#ifdef DBG_TX_DROP_FRAME
|
||||
DBG_88E("DBG_TX_DROP_FRAME %s psta->ieee8021x_blocked == _TRUE, pattrib->ether_type(%04x) != 0x888e\n", __func__,pattrib->ether_type);
|
||||
DBG_88E("DBG_TX_DROP_FRAME %s psta->ieee8021x_blocked == true, pattrib->ether_type(%04x) != 0x888e\n", __func__,pattrib->ether_type);
|
||||
#endif
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -857,27 +857,27 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
|
|||
pattrib->encrypt, padapter->securitypriv.sw_encrypt));
|
||||
|
||||
if (pattrib->encrypt &&
|
||||
((padapter->securitypriv.sw_encrypt == _TRUE) || (psecuritypriv->hw_decrypted == _FALSE)))
|
||||
((padapter->securitypriv.sw_encrypt == true) || (psecuritypriv->hw_decrypted == false)))
|
||||
{
|
||||
pattrib->bswenc = _TRUE;
|
||||
pattrib->bswenc = true;
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,
|
||||
("update_attrib: encrypt=%d securitypriv.hw_decrypted=%d bswenc=_TRUE\n",
|
||||
("update_attrib: encrypt=%d securitypriv.hw_decrypted=%d bswenc=true\n",
|
||||
pattrib->encrypt, padapter->securitypriv.sw_encrypt));
|
||||
} else {
|
||||
pattrib->bswenc = _FALSE;
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("update_attrib: bswenc=_FALSE\n"));
|
||||
pattrib->bswenc = false;
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("update_attrib: bswenc=false\n"));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if ((pattrib->encrypt && bmcast) || (pattrib->encrypt ==_WEP40_) || (pattrib->encrypt ==_WEP104_))
|
||||
{
|
||||
pattrib->bswenc = _TRUE;//force using sw enc.
|
||||
pattrib->bswenc = true;//force using sw enc.
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WAPI_SUPPORT
|
||||
if (pattrib->encrypt == _SMS4_)
|
||||
pattrib->bswenc = _FALSE;
|
||||
pattrib->bswenc = false;
|
||||
#endif
|
||||
|
||||
rtw_set_tx_chksum_offload(pkt, pattrib);
|
||||
|
@ -936,7 +936,7 @@ _func_enter_;
|
|||
|
||||
if (bmcst)
|
||||
{
|
||||
if (_rtw_memcmp(psecuritypriv->dot118021XGrptxmickey[psecuritypriv->dot118021XGrpKeyid].skey, null_key, 16)==_TRUE){
|
||||
if (_rtw_memcmp(psecuritypriv->dot118021XGrptxmickey[psecuritypriv->dot118021XGrpKeyid].skey, null_key, 16)==true){
|
||||
//DbgPrint("\nxmitframe_addmic:stainfo->dot11tkiptxmickey==0\n");
|
||||
//rtw_msleep_os(10);
|
||||
return _FAIL;
|
||||
|
@ -946,7 +946,7 @@ _func_enter_;
|
|||
}
|
||||
else
|
||||
{
|
||||
if (_rtw_memcmp(&stainfo->dot11tkiptxmickey.skey[0],null_key, 16)==_TRUE){
|
||||
if (_rtw_memcmp(&stainfo->dot11tkiptxmickey.skey[0],null_key, 16)==true){
|
||||
//DbgPrint("\nxmitframe_addmic:stainfo->dot11tkiptxmickey==0\n");
|
||||
//rtw_msleep_os(10);
|
||||
return _FAIL;
|
||||
|
@ -1074,7 +1074,7 @@ s32 rtw_make_wlanhdr (_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib)
|
|||
struct rtw_ieee80211_hdr *pwlanhdr = (struct rtw_ieee80211_hdr *)hdr;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct qos_priv *pqospriv = &pmlmepriv->qospriv;
|
||||
u8 qos_option = _FALSE;
|
||||
u8 qos_option = false;
|
||||
#ifdef CONFIG_TDLS
|
||||
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
|
@ -1107,7 +1107,7 @@ _func_enter_;
|
|||
|
||||
if (pattrib->subtype & WIFI_DATA_TYPE)
|
||||
{
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)) {
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)) {
|
||||
//to_ds = 1, fr_ds = 0;
|
||||
#ifdef CONFIG_TDLS
|
||||
if ((ptdlsinfo->setup_state == TDLS_LINKED_STATE)){
|
||||
|
@ -1137,10 +1137,10 @@ _func_enter_;
|
|||
}
|
||||
|
||||
if (pqospriv->qos_option)
|
||||
qos_option = _TRUE;
|
||||
qos_option = true;
|
||||
|
||||
}
|
||||
else if ((check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) ) {
|
||||
else if ((check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) ) {
|
||||
//to_ds = 0, fr_ds = 1;
|
||||
SetFrDs(fctrl);
|
||||
_rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
|
||||
|
@ -1148,16 +1148,16 @@ _func_enter_;
|
|||
_rtw_memcpy(pwlanhdr->addr3, pattrib->src, ETH_ALEN);
|
||||
|
||||
if (psta->qos_option)
|
||||
qos_option = _TRUE;
|
||||
qos_option = true;
|
||||
}
|
||||
else if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) {
|
||||
else if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) {
|
||||
_rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
|
||||
_rtw_memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
|
||||
_rtw_memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN);
|
||||
|
||||
if (psta->qos_option)
|
||||
qos_option = _TRUE;
|
||||
qos_option = true;
|
||||
}
|
||||
else {
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,("fw_state:%x is not allowed to xmit frame\n", get_fwstate(pmlmepriv)));
|
||||
|
@ -1208,11 +1208,11 @@ _func_enter_;
|
|||
if (pattrib->ht_en && psta->htpriv.ampdu_enable)
|
||||
{
|
||||
if (psta->htpriv.agg_enable_bitmap & BIT(pattrib->priority))
|
||||
pattrib->ampdu_en = _TRUE;
|
||||
pattrib->ampdu_en = true;
|
||||
}
|
||||
|
||||
//re-check if enable ampdu by BA_starting_seqctrl
|
||||
if (pattrib->ampdu_en == _TRUE)
|
||||
if (pattrib->ampdu_en == true)
|
||||
{
|
||||
u16 tx_seq;
|
||||
|
||||
|
@ -1222,19 +1222,19 @@ _func_enter_;
|
|||
if (SN_LESS(pattrib->seqnum, tx_seq))
|
||||
{
|
||||
//DBG_88E("tx ampdu seqnum(%d) < tx_seq(%d)\n", pattrib->seqnum, tx_seq);
|
||||
pattrib->ampdu_en = _FALSE;//AGG BK
|
||||
pattrib->ampdu_en = false;//AGG BK
|
||||
}
|
||||
else if (SN_EQUAL(pattrib->seqnum, tx_seq))
|
||||
{
|
||||
psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq+1)&0xfff;
|
||||
|
||||
pattrib->ampdu_en = _TRUE;//AGG EN
|
||||
pattrib->ampdu_en = true;//AGG EN
|
||||
}
|
||||
else
|
||||
{
|
||||
//DBG_88E("tx ampdu over run\n");
|
||||
psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum+1)&0xfff;
|
||||
pattrib->ampdu_en = _TRUE;//AGG EN
|
||||
pattrib->ampdu_en = true;//AGG EN
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1284,10 +1284,10 @@ s32 rtw_txframes_pending(_adapter *padapter)
|
|||
{
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
|
||||
return ((_rtw_queue_empty(&pxmitpriv->be_pending) == _FALSE) ||
|
||||
(_rtw_queue_empty(&pxmitpriv->bk_pending) == _FALSE) ||
|
||||
(_rtw_queue_empty(&pxmitpriv->vi_pending) == _FALSE) ||
|
||||
(_rtw_queue_empty(&pxmitpriv->vo_pending) == _FALSE));
|
||||
return ((_rtw_queue_empty(&pxmitpriv->be_pending) == false) ||
|
||||
(_rtw_queue_empty(&pxmitpriv->bk_pending) == false) ||
|
||||
(_rtw_queue_empty(&pxmitpriv->vi_pending) == false) ||
|
||||
(_rtw_queue_empty(&pxmitpriv->vo_pending) == false));
|
||||
}
|
||||
|
||||
s32 rtw_txframes_sta_ac_pending(_adapter *padapter, struct pkt_attrib *pattrib)
|
||||
|
@ -1769,7 +1769,7 @@ _func_enter_;
|
|||
|
||||
frg_inx++;
|
||||
|
||||
if (bmcst || (rtw_endofpktfile(&pktfile) == _TRUE))
|
||||
if (bmcst || (rtw_endofpktfile(&pktfile) == true))
|
||||
{
|
||||
pattrib->nr_frags = frg_inx;
|
||||
|
||||
|
@ -1800,7 +1800,7 @@ _func_enter_;
|
|||
|
||||
xmitframe_swencrypt(padapter, pxmitframe);
|
||||
|
||||
if (bmcst == _FALSE)
|
||||
if (bmcst == false)
|
||||
update_attrib_vcs_info(padapter, pxmitframe);
|
||||
else
|
||||
pattrib->vcs_mode = NONE_VCS;
|
||||
|
@ -1937,7 +1937,7 @@ _func_enter_;
|
|||
|
||||
_enter_critical(&pfree_queue->lock, &irqL);
|
||||
|
||||
if (_rtw_queue_empty(pfree_queue) == _TRUE) {
|
||||
if (_rtw_queue_empty(pfree_queue) == true) {
|
||||
pxmitbuf = NULL;
|
||||
} else {
|
||||
|
||||
|
@ -1959,7 +1959,7 @@ _func_enter_;
|
|||
|
||||
|
||||
pxmitbuf->priv_data = NULL;
|
||||
//pxmitbuf->ext_tag = _TRUE;
|
||||
//pxmitbuf->ext_tag = true;
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
pxmitbuf->len = 0;
|
||||
|
@ -2025,7 +2025,7 @@ _func_enter_;
|
|||
|
||||
_enter_critical(&pfree_xmitbuf_queue->lock, &irqL);
|
||||
|
||||
if (_rtw_queue_empty(pfree_xmitbuf_queue) == _TRUE) {
|
||||
if (_rtw_queue_empty(pfree_xmitbuf_queue) == true) {
|
||||
pxmitbuf = NULL;
|
||||
} else {
|
||||
|
||||
|
@ -2047,7 +2047,7 @@ _func_enter_;
|
|||
//DBG_88E("alloc, free_xmitbuf_cnt=%d\n", pxmitpriv->free_xmitbuf_cnt);
|
||||
|
||||
pxmitbuf->priv_data = NULL;
|
||||
//pxmitbuf->ext_tag = _FALSE;
|
||||
//pxmitbuf->ext_tag = false;
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
pxmitbuf->len = 0;
|
||||
pxmitbuf->pdata = pxmitbuf->ptail = pxmitbuf->phead;
|
||||
|
@ -2153,7 +2153,7 @@ _func_enter_;
|
|||
|
||||
_enter_critical_bh(&pfree_xmit_queue->lock, &irqL);
|
||||
|
||||
if (_rtw_queue_empty(pfree_xmit_queue) == _TRUE) {
|
||||
if (_rtw_queue_empty(pfree_xmit_queue) == true) {
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_alloc_xmitframe:%d\n", pxmitpriv->free_xmitframe_cnt));
|
||||
pxframe = NULL;
|
||||
} else {
|
||||
|
@ -2262,7 +2262,7 @@ _func_enter_;
|
|||
phead = get_list_head(pframequeue);
|
||||
plist = get_next(phead);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE)
|
||||
while (rtw_end_of_queue_search(phead, plist) == false)
|
||||
{
|
||||
|
||||
pxmitframe = LIST_CONTAINOR(plist, struct xmit_frame, list);
|
||||
|
@ -2298,7 +2298,7 @@ static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, str
|
|||
xmitframe_phead = get_list_head(pframe_queue);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == false)
|
||||
{
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
|
@ -2373,7 +2373,7 @@ _func_enter_;
|
|||
sta_phead = get_list_head(phwxmit->sta_queue);
|
||||
sta_plist = get_next(sta_phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(sta_phead, sta_plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(sta_phead, sta_plist)) == false)
|
||||
{
|
||||
|
||||
ptxservq= LIST_CONTAINOR(sta_plist, struct tx_servq, tx_pending);
|
||||
|
@ -2667,7 +2667,7 @@ int rtw_br_client_tx(_adapter *padapter, struct sk_buff **pskb)
|
|||
struct sk_buff *skb = *pskb;
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
_irqL irqL;
|
||||
//if (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == _TRUE)
|
||||
//if (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true)
|
||||
{
|
||||
void dhcp_flag_bcast(_adapter *priv, struct sk_buff *skb);
|
||||
int res, is_vlan_tag=0, i, do_nat25=1;
|
||||
|
@ -2874,7 +2874,7 @@ static void do_queue_select(_adapter *padapter, struct pkt_attrib *pattrib)
|
|||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("### do_queue_select priority=%d ,qsel = %d\n",pattrib->priority ,qsel));
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
// if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
// if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true)
|
||||
// qsel = 7;//
|
||||
#endif
|
||||
|
||||
|
@ -2922,7 +2922,7 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt)
|
|||
rcu_read_unlock();
|
||||
#endif // (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35))
|
||||
|
||||
if ( br_port && check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == _TRUE)
|
||||
if ( br_port && check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true)
|
||||
{
|
||||
res = rtw_br_client_tx(padapter, ppkt);
|
||||
if (res == -1)
|
||||
|
@ -2962,7 +2962,7 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt)
|
|||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
_enter_critical_bh(&pxmitpriv->lock, &irqL0);
|
||||
if (xmitframe_enqueue_for_sleeping_sta(padapter, pxmitframe) == _TRUE)
|
||||
if (xmitframe_enqueue_for_sleeping_sta(padapter, pxmitframe) == true)
|
||||
{
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL0);
|
||||
return 1;
|
||||
|
@ -2970,7 +2970,7 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt)
|
|||
_exit_critical_bh(&pxmitpriv->lock, &irqL0);
|
||||
#endif
|
||||
|
||||
if (rtw_hal_xmit(padapter, pxmitframe) == _FALSE)
|
||||
if (rtw_hal_xmit(padapter, pxmitframe) == false)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
@ -2979,7 +2979,7 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt)
|
|||
#ifdef CONFIG_TDLS
|
||||
sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe)
|
||||
{
|
||||
sint ret=_FALSE;
|
||||
sint ret=false;
|
||||
|
||||
_irqL irqL;
|
||||
struct sta_info *ptdls_sta=NULL;
|
||||
|
@ -2995,7 +2995,7 @@ sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_fra
|
|||
|
||||
if (pattrib->triggered==1)
|
||||
{
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -3039,7 +3039,7 @@ sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_fra
|
|||
//transmit TDLS PTI via AP
|
||||
rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_SD_PTI);
|
||||
}
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
|
||||
}
|
||||
|
||||
|
@ -3056,7 +3056,7 @@ sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_fra
|
|||
sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe)
|
||||
{
|
||||
_irqL irqL;
|
||||
sint ret=_FALSE;
|
||||
sint ret=false;
|
||||
struct sta_info *psta=NULL;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct pkt_attrib *pattrib = &pxmitframe->attrib;
|
||||
|
@ -3072,7 +3072,7 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
|
|||
}
|
||||
#endif //CONFIG_TDLS
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _FALSE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == false)
|
||||
return ret;
|
||||
|
||||
if (pattrib->psta)
|
||||
|
@ -3122,11 +3122,11 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
|
|||
|
||||
//DBG_88E("enqueue, sq_len=%d, tim=%x\n", psta->sleepq_len, pstapriv->tim_bitmap);
|
||||
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);//tx bc/mc packets after upate bcn
|
||||
update_beacon(padapter, _TIM_IE_, NULL, false);//tx bc/mc packets after upate bcn
|
||||
|
||||
//_exit_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
|
||||
}
|
||||
|
||||
|
@ -3187,7 +3187,7 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
|
|||
{
|
||||
//DBG_88E("sleepq_len==1, update BCNTIM\n");
|
||||
//upate BCN for TIM IE
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3198,7 +3198,7 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
|
|||
// wakeup_sta_to_xmit(padapter, psta);
|
||||
//}
|
||||
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
|
||||
}
|
||||
|
||||
|
@ -3222,7 +3222,7 @@ static void dequeue_xmitframes_to_sleeping_queue(_adapter *padapter, struct sta_
|
|||
phead = get_list_head(pframequeue);
|
||||
plist = get_next(phead);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE)
|
||||
while (rtw_end_of_queue_search(phead, plist) == false)
|
||||
{
|
||||
pxmitframe = LIST_CONTAINOR(plist, struct xmit_frame, list);
|
||||
|
||||
|
@ -3317,7 +3317,7 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta)
|
|||
xmitframe_phead = get_list_head(&psta->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == false)
|
||||
{
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
|
@ -3370,7 +3370,7 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta)
|
|||
pxmitframe->attrib.triggered = 1;
|
||||
|
||||
_exit_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||
if (rtw_hal_xmit(padapter, pxmitframe) == _TRUE)
|
||||
if (rtw_hal_xmit(padapter, pxmitframe) == true)
|
||||
{
|
||||
rtw_os_xmit_complete(padapter, pxmitframe);
|
||||
}
|
||||
|
@ -3424,7 +3424,7 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta)
|
|||
xmitframe_phead = get_list_head(&psta_bmc->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == false)
|
||||
{
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
|
@ -3442,7 +3442,7 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta)
|
|||
pxmitframe->attrib.triggered = 1;
|
||||
|
||||
_exit_critical_bh(&psta_bmc->sleep_q.lock, &irqL);
|
||||
if (rtw_hal_xmit(padapter, pxmitframe) == _TRUE)
|
||||
if (rtw_hal_xmit(padapter, pxmitframe) == true)
|
||||
{
|
||||
rtw_os_xmit_complete(padapter, pxmitframe);
|
||||
}
|
||||
|
@ -3470,7 +3470,7 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta)
|
|||
if (update_mask)
|
||||
{
|
||||
//update_BCNTIM(padapter);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3488,7 +3488,7 @@ void xmit_delivery_enabled_frames(_adapter *padapter, struct sta_info *psta)
|
|||
xmitframe_phead = get_list_head(&psta->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == false)
|
||||
{
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
|
@ -3536,7 +3536,7 @@ void xmit_delivery_enabled_frames(_adapter *padapter, struct sta_info *psta)
|
|||
|
||||
pxmitframe->attrib.triggered = 1;
|
||||
|
||||
if (rtw_hal_xmit(padapter, pxmitframe) == _TRUE)
|
||||
if (rtw_hal_xmit(padapter, pxmitframe) == true)
|
||||
{
|
||||
rtw_os_xmit_complete(padapter, pxmitframe);
|
||||
}
|
||||
|
@ -3555,7 +3555,7 @@ void xmit_delivery_enabled_frames(_adapter *padapter, struct sta_info *psta)
|
|||
//DBG_88E("wakeup to xmit, qlen==0, update_BCNTIM, tim=%x\n", pstapriv->tim_bitmap);
|
||||
//upate BCN for TIM IE
|
||||
//update_BCNTIM(padapter);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, false);
|
||||
//update_mask = BIT(0);
|
||||
}
|
||||
|
||||
|
@ -3606,7 +3606,7 @@ struct xmit_buf* dequeue_pending_xmitbuf(
|
|||
|
||||
_enter_critical_bh(&pqueue->lock, &irql);
|
||||
|
||||
if (_rtw_queue_empty(pqueue) == _FALSE)
|
||||
if (_rtw_queue_empty(pqueue) == false)
|
||||
{
|
||||
_list *plist, *phead;
|
||||
|
||||
|
@ -3637,7 +3637,7 @@ struct xmit_buf* dequeue_pending_xmitbuf_under_survey(
|
|||
|
||||
_enter_critical_bh(&pqueue->lock, &irql);
|
||||
|
||||
if (_rtw_queue_empty(pqueue) == _FALSE)
|
||||
if (_rtw_queue_empty(pqueue) == false)
|
||||
{
|
||||
_list *plist, *phead;
|
||||
u8 type;
|
||||
|
@ -3687,10 +3687,10 @@ sint check_pending_xmitbuf(
|
|||
|
||||
pqueue = &pxmitpriv->pending_xmitbuf_queue;
|
||||
|
||||
if (_rtw_queue_empty(pqueue) == _FALSE)
|
||||
return _TRUE;
|
||||
if (_rtw_queue_empty(pqueue) == false)
|
||||
return true;
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
thread_return rtw_xmit_thread(thread_context context)
|
||||
|
@ -3758,9 +3758,9 @@ bool rtw_sctx_chk_waring_status(int status)
|
|||
|
||||
case RTW_SCTX_DONE_DRV_STOP:
|
||||
case RTW_SCTX_DONE_DEV_REMOVE:
|
||||
return _TRUE;
|
||||
return true;
|
||||
default:
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue