From 999a777041b2ad703084e3a95cc47fa5b5456357 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Mon, 17 Dec 2018 11:08:55 -0600 Subject: [PATCH] rtl8188eu: Replace synonyms for true and false with the real thing Signed-off-by: Larry Finger --- core/rtw_ap.c | 592 +++++++++---------- core/rtw_beamforming.c | 296 +++++----- core/rtw_btcoex.c | 154 ++--- core/rtw_cmd.c | 188 +++--- core/rtw_debug.c | 122 ++-- core/rtw_efuse.c | 132 ++--- core/rtw_ieee80211.c | 92 +-- core/rtw_io.c | 24 +- core/rtw_ioctl_set.c | 218 +++---- core/rtw_iol.c | 10 +- core/rtw_mi.c | 284 ++++----- core/rtw_mlme.c | 390 ++++++------ core/rtw_mlme_ext.c | 752 +++++++++++------------ core/rtw_mp.c | 72 +-- core/rtw_odm.c | 4 +- core/rtw_p2p.c | 220 +++---- core/rtw_pwrctrl.c | 254 ++++---- core/rtw_recv.c | 212 +++---- core/rtw_rf.c | 20 +- core/rtw_security.c | 14 +- core/rtw_sreset.c | 26 +- core/rtw_sta_mgt.c | 122 ++-- core/rtw_tdls.c | 250 ++++---- core/rtw_wlan_util.c | 224 +++---- core/rtw_xmit.c | 290 ++++----- hal/HalPwrSeqCmd.c | 12 +- hal/hal_btcoex.c | 346 +++++------ hal/hal_btcoex_wifionly.c | 8 +- hal/hal_com.c | 422 ++++++------- hal/hal_com_phycfg.c | 78 +-- hal/hal_dm.c | 8 +- hal/hal_intf.c | 56 +- hal/hal_mcc.c | 74 +-- hal/hal_mp.c | 36 +- hal/hal_phy.c | 28 +- hal/hal_usb_led.c | 920 ++++++++++++++--------------- hal/phydm/phydm.c | 6 +- hal/phydm/phydm.h | 6 +- hal/phydm/phydm_antdiv.c | 4 +- hal/phydm/phydm_debug.c | 2 +- hal/phydm/phydm_dig.c | 14 +- hal/phydm/phydm_dig.h | 6 +- hal/phydm/phydm_dynamic_rx_path.c | 6 +- hal/phydm/phydm_edcaturbocheck.c | 18 +- hal/phydm/phydm_powertracking_ce.c | 10 +- hal/phydm/phydm_rainfo.c | 26 +- hal/phydm/phydm_types.h | 4 - hal/rtl8188e_cmd.c | 32 +- hal/rtl8188e_dm.c | 22 +- hal/rtl8188e_hal_init.c | 260 ++++---- hal/rtl8188e_phycfg.c | 42 +- hal/rtl8188e_xmit.c | 6 +- hal/rtl8188eu_led.c | 6 +- hal/rtl8188eu_xmit.c | 58 +- hal/usb_halinit.c | 86 +-- hal/usb_ops_linux.c | 8 +- include/Hal8188EPhyCfg.h | 2 +- include/HalVerDef.h | 91 ++- include/autoconf.h | 2 +- include/basic_types.h | 12 - include/drv_types.h | 12 +- include/hal_com_led.h | 4 +- include/hal_com_reg.h | 10 +- include/hal_data.h | 2 +- include/ieee80211.h | 14 +- include/mp_custom_oid.h | 2 +- include/osdep_service.h | 11 +- include/rtl8188e_hal.h | 2 +- include/rtw_beamforming.h | 4 +- include/rtw_io.h | 8 +- include/rtw_mlme.h | 18 +- include/rtw_mlme_ext.h | 8 +- include/rtw_mp.h | 20 +- include/rtw_pwrctrl.h | 6 +- include/rtw_security.h | 2 +- include/rtw_xmit.h | 4 +- include/usb_ops.h | 8 +- include/wifi.h | 10 +- os_dep/ioctl_cfg80211.c | 406 ++++++------- os_dep/ioctl_linux.c | 516 ++++++++-------- os_dep/ioctl_mp.c | 132 ++--- os_dep/mlme_linux.c | 4 +- os_dep/os_intfs.c | 228 +++---- os_dep/osdep_service.c | 78 +-- os_dep/recv_linux.c | 24 +- os_dep/rtw_android.c | 16 +- os_dep/rtw_cfgvendor.c | 2 +- os_dep/rtw_proc.c | 26 +- os_dep/usb_intf.c | 98 +-- os_dep/usb_ops_linux.c | 12 +- os_dep/xmit_linux.c | 50 +- 91 files changed, 4692 insertions(+), 4724 deletions(-) diff --git a/core/rtw_ap.c b/core/rtw_ap.c index 62ce348..68a328f 100644 --- a/core/rtw_ap.c +++ b/core/rtw_ap.c @@ -37,7 +37,7 @@ void init_mlme_ap_info(_adapter *padapter) spin_lock_init(&pmlmepriv->bcn_update_lock); - /* pmlmeext->bstart_bss = _FALSE; */ + /* pmlmeext->bstart_bss = false; */ } @@ -57,106 +57,102 @@ static void update_BCNTIM(_adapter *padapter) struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); WLAN_BSSID_EX *pnetwork_mlmeext = &(pmlmeinfo->network); unsigned char *pie = pnetwork_mlmeext->IEs; + u8 *p, *dst_ie, *premainder_ie = NULL, *pbackup_remainder_ie = NULL; + __le16 tim_bitmap_le; + uint offset, tmp_len, tim_ielen, tim_ie_offset, remainder_ielen; - if (_TRUE) { - u8 *p, *dst_ie, *premainder_ie = NULL, *pbackup_remainder_ie = NULL; - __le16 tim_bitmap_le; - uint offset, tmp_len, tim_ielen, tim_ie_offset, remainder_ielen; + tim_bitmap_le = cpu_to_le16(pstapriv->tim_bitmap); - tim_bitmap_le = cpu_to_le16(pstapriv->tim_bitmap); + p = rtw_get_ie(pie + _FIXED_IE_LENGTH_, _TIM_IE_, &tim_ielen, pnetwork_mlmeext->IELength - _FIXED_IE_LENGTH_); + if (p != NULL && tim_ielen > 0) { + tim_ielen += 2; - p = rtw_get_ie(pie + _FIXED_IE_LENGTH_, _TIM_IE_, &tim_ielen, pnetwork_mlmeext->IELength - _FIXED_IE_LENGTH_); - if (p != NULL && tim_ielen > 0) { - tim_ielen += 2; + premainder_ie = p + tim_ielen; - premainder_ie = p + tim_ielen; + tim_ie_offset = (sint)(p - pie); - tim_ie_offset = (sint)(p - pie); + remainder_ielen = pnetwork_mlmeext->IELength - tim_ie_offset - tim_ielen; - remainder_ielen = pnetwork_mlmeext->IELength - tim_ie_offset - tim_ielen; + /*append TIM IE from dst_ie offset*/ + dst_ie = p; + } else { + tim_ielen = 0; - /*append TIM IE from dst_ie offset*/ - dst_ie = p; - } else { - tim_ielen = 0; + /*calculate head_len*/ + offset = _FIXED_IE_LENGTH_; - /*calculate head_len*/ - offset = _FIXED_IE_LENGTH_; + /* get ssid_ie len */ + p = rtw_get_ie(pie + _BEACON_IE_OFFSET_, _SSID_IE_, &tmp_len, (pnetwork_mlmeext->IELength - _BEACON_IE_OFFSET_)); + if (p != NULL) + offset += tmp_len + 2; - /* get ssid_ie len */ - p = rtw_get_ie(pie + _BEACON_IE_OFFSET_, _SSID_IE_, &tmp_len, (pnetwork_mlmeext->IELength - _BEACON_IE_OFFSET_)); - if (p != NULL) - offset += tmp_len + 2; + /*get supported rates len*/ + p = rtw_get_ie(pie + _BEACON_IE_OFFSET_, _SUPPORTEDRATES_IE_, &tmp_len, (pnetwork_mlmeext->IELength - _BEACON_IE_OFFSET_)); + if (p != NULL) + offset += tmp_len + 2; - /*get supported rates len*/ - p = rtw_get_ie(pie + _BEACON_IE_OFFSET_, _SUPPORTEDRATES_IE_, &tmp_len, (pnetwork_mlmeext->IELength - _BEACON_IE_OFFSET_)); - if (p != NULL) - offset += tmp_len + 2; + /*DS Parameter Set IE, len=3*/ + offset += 3; - /*DS Parameter Set IE, len=3*/ - offset += 3; + premainder_ie = pie + offset; - premainder_ie = pie + offset; + remainder_ielen = pnetwork_mlmeext->IELength - offset - tim_ielen; - remainder_ielen = pnetwork_mlmeext->IELength - offset - tim_ielen; - - /*append TIM IE from offset*/ - dst_ie = pie + offset; - - } - - if (remainder_ielen > 0) { - pbackup_remainder_ie = rtw_malloc(remainder_ielen); - if (pbackup_remainder_ie && premainder_ie) - _rtw_memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen); - } - - *dst_ie++ = _TIM_IE_; - - if ((pstapriv->tim_bitmap & 0xff00) && (pstapriv->tim_bitmap & 0x00fe)) - tim_ielen = 5; - else - tim_ielen = 4; - - *dst_ie++ = tim_ielen; - - *dst_ie++ = 0;/*DTIM count*/ - *dst_ie++ = 1;/*DTIM period*/ - - if (pstapriv->tim_bitmap & BIT(0))/*for bc/mc frames*/ - *dst_ie++ = BIT(0);/*bitmap ctrl */ - else - *dst_ie++ = 0; - if (tim_ielen == 4) { - u8 pvb = 0; - - if (pstapriv->tim_bitmap & 0xff00) - pvb = le16_to_cpu(tim_bitmap_le) >> 8; - else - pvb = le16_to_cpu(tim_bitmap_le); - *dst_ie++ = pvb; - } else if (tim_ielen == 5) { - _rtw_memcpy(dst_ie, &tim_bitmap_le, 2); - dst_ie += 2; - } - - /*copy remainder IE*/ - if (pbackup_remainder_ie) { - _rtw_memcpy(dst_ie, pbackup_remainder_ie, remainder_ielen); - - rtw_mfree(pbackup_remainder_ie, remainder_ielen); - } - - offset = (uint)(dst_ie - pie); - pnetwork_mlmeext->IELength = offset + remainder_ielen; + /*append TIM IE from offset*/ + dst_ie = pie + offset; } + + if (remainder_ielen > 0) { + pbackup_remainder_ie = rtw_malloc(remainder_ielen); + if (pbackup_remainder_ie && premainder_ie) + _rtw_memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen); + } + + *dst_ie++ = _TIM_IE_; + + if ((pstapriv->tim_bitmap & 0xff00) && (pstapriv->tim_bitmap & 0x00fe)) + tim_ielen = 5; + else + tim_ielen = 4; + + *dst_ie++ = tim_ielen; + + *dst_ie++ = 0;/*DTIM count*/ + *dst_ie++ = 1;/*DTIM period*/ + + if (pstapriv->tim_bitmap & BIT(0))/*for bc/mc frames*/ + *dst_ie++ = BIT(0);/*bitmap ctrl */ + else + *dst_ie++ = 0; + if (tim_ielen == 4) { + u8 pvb = 0; + + if (pstapriv->tim_bitmap & 0xff00) + pvb = le16_to_cpu(tim_bitmap_le) >> 8; + else + pvb = le16_to_cpu(tim_bitmap_le); + *dst_ie++ = pvb; + } else if (tim_ielen == 5) { + _rtw_memcpy(dst_ie, &tim_bitmap_le, 2); + dst_ie += 2; + } + + /*copy remainder IE*/ + if (pbackup_remainder_ie) { + _rtw_memcpy(dst_ie, pbackup_remainder_ie, remainder_ielen); + + rtw_mfree(pbackup_remainder_ie, remainder_ielen); + } + + offset = (uint)(dst_ie - pie); + pnetwork_mlmeext->IELength = offset + remainder_ielen; } 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 = NULL, *dst_ie = NULL, *premainder_ie = NULL, *pbackup_remainder_ie = NULL; u32 i, offset, ielen, ie_offset, remainder_ielen = 0; @@ -169,7 +165,7 @@ void rtw_add_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *d else if (pIE->ElementID == index) { /* already exist the same IE */ p = (u8 *)pIE; ielen = pIE->Length; - bmatch = _TRUE; + bmatch = true; break; } @@ -260,7 +256,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 RTW_INFO("sta:"MAC_FMT", rssi:%d, rx:"STA_PKTS_FMT", expire_to:%u, %s%ssq_len:%u\n" , MAC_ARG(psta->hwaddr) @@ -277,7 +273,7 @@ u8 chk_sta_is_alive(struct sta_info *psta) /* if(sta_last_rx_pkts(psta) == sta_rx_pkts(psta)) */ if ((psta->sta_stats.last_rx_data_pkts + psta->sta_stats.last_rx_ctrl_pkts) == (psta->sta_stats.rx_data_pkts + psta->sta_stats.rx_ctrl_pkts)) { } else - ret = _TRUE; + ret = true; sta_update_last_rx_pkts(psta); @@ -288,7 +284,7 @@ void expire_timeout_chk(_adapter *padapter) { unsigned long irqL; _list *phead, *plist; - u8 updated = _FALSE; + u8 updated = false; struct sta_info *psta = NULL; struct sta_priv *pstapriv = &padapter->stapriv; u8 chk_alive_num = 0; @@ -300,7 +296,7 @@ void expire_timeout_chk(_adapter *padapter) /* then driver may check fail due to not recv client's frame under sitesurvey, * don't expire timeout chk under MCC under sitesurvey */ - if (rtw_hal_mcc_link_status_chk(padapter, __func__) == _FALSE) + if (rtw_hal_mcc_link_status_chk(padapter, __func__) == false) return; #endif @@ -311,19 +307,19 @@ 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) { RTW_INFO(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); #ifdef CONFIG_ATMEL_RC_PATCH - if (_TRUE == _rtw_memcmp((void *)(pstapriv->atmel_rc_pattern), (void *)(psta->hwaddr), ETH_ALEN)) + if (true == _rtw_memcmp((void *)(pstapriv->atmel_rc_pattern), (void *)(psta->hwaddr), ETH_ALEN)) continue; if (psta->flag_atmel_rc) continue; @@ -360,18 +356,18 @@ 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) { RTW_INFO(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); #ifdef CONFIG_ATMEL_RC_PATCH RTW_INFO("%s:%d psta=%p, %02x,%02x||%02x,%02x \n\n", __func__, __LINE__, psta, pstapriv->atmel_rc_pattern[0], pstapriv->atmel_rc_pattern[5], psta->hwaddr[0], psta->hwaddr[5]); - if (_TRUE == _rtw_memcmp((void *)pstapriv->atmel_rc_pattern, (void *)(psta->hwaddr), ETH_ALEN)) + if (true == _rtw_memcmp((void *)pstapriv->atmel_rc_pattern, (void *)(psta->hwaddr), ETH_ALEN)) continue; if (psta->flag_atmel_rc) continue; @@ -433,7 +429,7 @@ void expire_timeout_chk(_adapter *padapter) } else if ((psta->keep_alive_trycnt > KEEP_ALIVE_TRYCNT) && !(psta->state & WIFI_STA_ALIVE_CHK_STATE)) psta->keep_alive_trycnt = 0; - if ((psta->htpriv.ht_option == _TRUE) && (psta->htpriv.ampdu_enable == _TRUE)) { + if ((psta->htpriv.ht_option == true) && (psta->htpriv.ampdu_enable == true)) { uint priority = 1; /* test using BK */ u8 issued = 0; @@ -482,7 +478,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, _TRUE); + update_beacon(padapter, _TIM_IE_, NULL, true); if (!pmlmeext->active_keep_alive_check) continue; @@ -502,7 +498,7 @@ void expire_timeout_chk(_adapter *padapter) rtw_list_delete(&psta->asoc_list); pstapriv->asoc_list_cnt--; RTW_INFO("asoc expire "MAC_FMT", state=0x%x\n", MAC_ARG(psta->hwaddr), psta->state); - updated = ap_free_sta(padapter, psta, _FALSE, WLAN_REASON_DEAUTH_LEAVING, _TRUE); + updated = ap_free_sta(padapter, psta, false, WLAN_REASON_DEAUTH_LEAVING, true); } else { /* TODO: Aging mechanism to digest frames in sleep_q to avoid running out of xmitframe */ if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt) @@ -523,7 +519,7 @@ void expire_timeout_chk(_adapter *padapter) u8 backup_ch = 0, backup_bw, backup_offset; u8 union_ch = 0, union_bw, union_offset; - u8 switch_channel = _TRUE; + u8 switch_channel = true; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; if (!rtw_mi_get_ch_setting_union(padapter, &union_ch, &union_bw, &union_offset) @@ -534,11 +530,11 @@ void expire_timeout_chk(_adapter *padapter) if (MCC_EN(padapter)) { /* driver doesn't switch channel under MCC */ if (rtw_hal_check_mcc_status(padapter, MCC_STATUS_DOING_MCC)) - switch_channel = _FALSE; + switch_channel = false; } #endif /* switch to correct channel of current network before issue keep-alive frames */ - if (switch_channel == _TRUE && rtw_get_oper_ch(padapter) != pmlmeext->cur_channel) { + if (switch_channel == true && rtw_get_oper_ch(padapter) != pmlmeext->cur_channel) { backup_ch = rtw_get_oper_ch(padapter); backup_bw = rtw_get_oper_bw(padapter); backup_offset = rtw_get_oper_choffset(padapter); @@ -551,7 +547,7 @@ void expire_timeout_chk(_adapter *padapter) psta = rtw_get_stainfo_by_offset(pstapriv, chk_alive_list[i]); #ifdef CONFIG_ATMEL_RC_PATCH - if (_TRUE == _rtw_memcmp(pstapriv->atmel_rc_pattern, psta->hwaddr, ETH_ALEN)) + if (true == _rtw_memcmp(pstapriv->atmel_rc_pattern, psta->hwaddr, ETH_ALEN)) continue; if (psta->flag_atmel_rc) continue; @@ -579,10 +575,10 @@ void expire_timeout_chk(_adapter *padapter) psta->keep_alive_trycnt = 0; RTW_INFO("asoc expire "MAC_FMT", state=0x%x\n", MAC_ARG(psta->hwaddr), psta->state); _enter_critical_bh(&pstapriv->asoc_list_lock, &irqL); - if (rtw_is_list_empty(&psta->asoc_list) == _FALSE) { + if (rtw_is_list_empty(&psta->asoc_list) == false) { rtw_list_delete(&psta->asoc_list); pstapriv->asoc_list_cnt--; - updated = ap_free_sta(padapter, psta, _FALSE, WLAN_REASON_DEAUTH_LEAVING, _TRUE); + updated = ap_free_sta(padapter, psta, false, WLAN_REASON_DEAUTH_LEAVING, true); } _exit_critical_bh(&pstapriv->asoc_list_lock, &irqL); @@ -664,7 +660,7 @@ void update_bmc_sta(_adapter *padapter) if (psta) { psta->aid = 0;/* default set to 0 */ psta->qos_option = 0; - psta->htpriv.ht_option = _FALSE; + psta->htpriv.ht_option = false; psta->ieee8021x_blocked = 0; @@ -695,7 +691,7 @@ void update_bmc_sta(_adapter *padapter) _exit_critical_bh(&psta->lock, &irqL); rtw_sta_media_status_rpt(padapter, psta, 1); - rtw_hal_update_ra_mask(psta, psta->rssi_level, _TRUE); + rtw_hal_update_ra_mask(psta, psta->rssi_level, true); } else RTW_INFO("add_RATid_bmc_sta error!\n"); @@ -720,12 +716,12 @@ void update_sta_info_apmode(_adapter *padapter, struct sta_info *psta) /*alloc macid when call rtw_alloc_stainfo(),release macid when call rtw_free_stainfo()*/ /* 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 */ @@ -756,17 +752,17 @@ void update_sta_info_apmode(_adapter *padapter, struct sta_info *psta) /* check if sta support s Short GI 20M */ if ((phtpriv_sta->ht_cap.cap_info & phtpriv_ap->ht_cap.cap_info) & cpu_to_le16(IEEE80211_HT_CAP_SGI_20)) - phtpriv_sta->sgi_20m = _TRUE; + phtpriv_sta->sgi_20m = true; /* check if sta support s Short GI 40M */ if ((phtpriv_sta->ht_cap.cap_info & phtpriv_ap->ht_cap.cap_info) & cpu_to_le16(IEEE80211_HT_CAP_SGI_40)) { if (psta->bw_mode == CHANNEL_WIDTH_40) /* according to psta->bw_mode */ - phtpriv_sta->sgi_40m = _TRUE; + phtpriv_sta->sgi_40m = true; else - phtpriv_sta->sgi_40m = _FALSE; + phtpriv_sta->sgi_40m = false; } - psta->qos_option = _TRUE; + psta->qos_option = true; /* B0 Config LDPC Coding Capability */ if (TEST_FLAG(phtpriv_ap->ldpc_cap, LDPC_HT_ENABLE_TX) && @@ -801,10 +797,10 @@ void update_sta_info_apmode(_adapter *padapter, struct sta_info *psta) RTW_INFO("Client STA(%d) HT Beamforming Cap = 0x%02X\n", psta->aid, cur_beamform_cap); #endif /*CONFIG_BEAMFORMING*/ } else { - phtpriv_sta->ampdu_enable = _FALSE; + phtpriv_sta->ampdu_enable = false; - phtpriv_sta->sgi_20m = _FALSE; - phtpriv_sta->sgi_40m = _FALSE; + phtpriv_sta->sgi_20m = false; + phtpriv_sta->sgi_40m = false; psta->bw_mode = CHANNEL_WIDTH_20; phtpriv_sta->ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE; } @@ -854,17 +850,17 @@ static void update_ap_info(_adapter *padapter, struct sta_info *psta) /* check if sta support s Short GI 20M */ if ((phtpriv_ap->ht_cap.cap_info) & cpu_to_le16(IEEE80211_HT_CAP_SGI_20)) - phtpriv_ap->sgi_20m = _TRUE; + phtpriv_ap->sgi_20m = true; /* check if sta support s Short GI 40M */ if ((phtpriv_ap->ht_cap.cap_info) & cpu_to_le16(IEEE80211_HT_CAP_SGI_40)) - phtpriv_ap->sgi_40m = _TRUE; + phtpriv_ap->sgi_40m = true; - psta->qos_option = _TRUE; + psta->qos_option = true; } else { - phtpriv_ap->ampdu_enable = _FALSE; + phtpriv_ap->ampdu_enable = false; - phtpriv_ap->sgi_20m = _FALSE; - phtpriv_ap->sgi_40m = _FALSE; + phtpriv_ap->sgi_20m = false; + phtpriv_ap->sgi_40m = false; } psta->bw_mode = pmlmeext->cur_bwmode; @@ -983,18 +979,18 @@ static void rtw_set_hw_wmm_param(_adapter *padapter) inx[3] = 3; if (pregpriv->wifi_spec == 1) { - u32 j, tmp, change_inx = _FALSE; + u32 j, tmp, change_inx = false; /* entry indx: 0->vo, 1->vi, 2->be, 3->bk. */ for (i = 0 ; i < 4 ; i++) { for (j = i + 1 ; j < 4 ; j++) { /* 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) { @@ -1006,7 +1002,7 @@ static void rtw_set_hw_wmm_param(_adapter *padapter) inx[i] = inx[j]; inx[j] = tmp; - change_inx = _FALSE; + change_inx = false; } } } @@ -1060,29 +1056,29 @@ static void rtw_ap_check_scan(_adapter *padapter) WLAN_BSSID_EX *pbss = NULL; struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); _queue *queue = &(pmlmepriv->scanned_queue); - u8 do_scan = _FALSE; + u8 do_scan = false; u8 reason = RTW_AUTO_SCAN_REASON_UNSPECIFIED; lifetime = SCANQUEUE_LIFETIME; /* 20 sec */ _enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); phead = get_list_head(queue); - if (rtw_end_of_queue_search(phead, get_next(phead)) == _TRUE) + if (rtw_end_of_queue_search(phead, get_next(phead)) == true) if (padapter->registrypriv.wifi_spec) { - do_scan = _TRUE; + do_scan = true; reason |= RTW_AUTO_SCAN_REASON_2040_BSS; } _exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); #ifdef CONFIG_AUTO_CHNL_SEL_NHM if (padapter->registrypriv.acs_auto_scan) { - do_scan = _TRUE; + do_scan = true; reason |= RTW_AUTO_SCAN_REASON_ACS; - rtw_acs_start(padapter, _TRUE); + rtw_acs_start(padapter, true); } #endif - if (_TRUE == do_scan) { + if (true == do_scan) { RTW_INFO("%s : drv scans by itself and wait_completed\n", __func__); rtw_drv_scan_by_self(padapter, reason); rtw_scan_wait_completed(padapter); @@ -1090,7 +1086,7 @@ static void rtw_ap_check_scan(_adapter *padapter) #ifdef CONFIG_AUTO_CHNL_SEL_NHM if (padapter->registrypriv.acs_auto_scan) - rtw_acs_start(padapter, _FALSE); + rtw_acs_start(padapter, false); #endif _enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); @@ -1099,14 +1095,14 @@ static void rtw_ap_check_scan(_adapter *padapter) 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); if (rtw_ch_set_search_ch(padapter->mlmeextpriv.channel_set, pnetwork->network.Configuration.DSConfig) >= 0 - && rtw_mlme_band_check(padapter, pnetwork->network.Configuration.DSConfig) == _TRUE - && _TRUE == rtw_validate_ssid(&(pnetwork->network.Ssid))) { + && rtw_mlme_band_check(padapter, pnetwork->network.Configuration.DSConfig) == true + && true == rtw_validate_ssid(&(pnetwork->network.Ssid))) { delta_time = (u32) rtw_get_passing_time_ms(pnetwork->last_scanned); if (delta_time < lifetime) { @@ -1123,11 +1119,11 @@ static void rtw_ap_check_scan(_adapter *padapter) if (pbuf == NULL) { /* HT CAP INFO IE don't exist, it is b/g mode bss.*/ - if (_FALSE == ATOMIC_READ(&pmlmepriv->olbc)) - ATOMIC_SET(&pmlmepriv->olbc, _TRUE); + if (false == ATOMIC_READ(&pmlmepriv->olbc)) + ATOMIC_SET(&pmlmepriv->olbc, true); - if (_FALSE == ATOMIC_READ(&pmlmepriv->olbc_ht)) - ATOMIC_SET(&pmlmepriv->olbc_ht, _TRUE); + if (false == ATOMIC_READ(&pmlmepriv->olbc_ht)) + ATOMIC_SET(&pmlmepriv->olbc_ht, true); if (padapter->registrypriv.wifi_spec) RTW_INFO("%s: %s is a/b/g ap\n", __func__, pnetwork->network.Ssid.Ssid); @@ -1190,11 +1186,11 @@ void start_bss_network(_adapter *padapter, struct createbss_parm *parm) WLAN_BSSID_EX *pnetwork_mlmeext = &(pmlmeinfo->network); struct dvobj_priv *pdvobj = padapter->dvobj; s16 req_ch = -1, req_bw = -1, req_offset = -1; - bool ch_setting_changed = _FALSE; + bool ch_setting_changed = false; u8 ch_to_set = 0, bw_to_set, offset_to_set; - u8 doiqk = _FALSE; + u8 doiqk = false; /* use for check ch bw offset can be allowed or not */ - u8 chbw_allow = _TRUE; + u8 chbw_allow = true; if (parm->req_ch != 0) { /* bypass other setting, go checking ch, bw, offset */ @@ -1213,22 +1209,22 @@ void start_bss_network(_adapter *padapter, struct createbss_parm *parm) /* if there is wpsie in beacon, the hostapd will update beacon twice when stating hostapd, */ /* 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; 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); } - 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_)) flush_all_cam_entry(padapter); /* clear CAM */ @@ -1295,7 +1291,7 @@ chbw_decision: rtw_hal_mcc_issue_null_data(padapter, chbw_allow, 1); #endif /* CONFIG_MCC_MODE */ - doiqk = _TRUE; + doiqk = true; rtw_hal_set_hwreg(padapter , HW_VAR_DO_IQK , &doiqk); if (ch_to_set != 0) { @@ -1303,7 +1299,7 @@ chbw_decision: rtw_mi_update_union_chan_inf(padapter, ch_to_set, offset_to_set, bw_to_set); } - doiqk = _FALSE; + doiqk = false; rtw_hal_set_hwreg(padapter , HW_VAR_DO_IQK , &doiqk); #ifdef CONFIG_MCC_MODE @@ -1317,20 +1313,20 @@ chbw_decision: } update_beacon: - /* update beacon content only if bstart_bss is _TRUE */ - if (_TRUE == pmlmeext->bstart_bss) { + /* update beacon content only if bstart_bss is true */ + if (true == pmlmeext->bstart_bss) { unsigned long irqL; - if ((ATOMIC_READ(&pmlmepriv->olbc) == _TRUE) || (ATOMIC_READ(&pmlmepriv->olbc_ht) == _TRUE)) { + if ((ATOMIC_READ(&pmlmepriv->olbc) == true) || (ATOMIC_READ(&pmlmepriv->olbc_ht) == true)) { /* AP is not starting a 40 MHz BSS in presence of an 802.11g BSS. */ pmlmepriv->ht_op_mode &= (~HT_INFO_OPERATION_MODE_OP_MODE_MASK); pmlmepriv->ht_op_mode |= OP_MODE_MAY_BE_LEGACY_STAS; - update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, _FALSE); + update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, false); } - update_beacon(padapter, _TIM_IE_, NULL, _FALSE); + update_beacon(padapter, _TIM_IE_, NULL, false); #ifdef CONFIG_SWTIMER_BASED_TXBCN _enter_critical_bh(&pdvobj->ap_if_q.lock, &irqL); @@ -1354,7 +1350,7 @@ update_beacon: && (0 == rtw_mi_check_fwstate(padapter, WIFI_OP_CH_SWITCHING)) ) { - /*update_beacon(padapter, _TIM_IE_, NULL, _TRUE);*/ + /*update_beacon(padapter, _TIM_IE_, NULL, true);*/ #if !defined(CONFIG_INTERRUPT_BASED_TXBCN) #ifdef CONFIG_SWTIMER_BASED_TXBCN @@ -1374,7 +1370,7 @@ update_beacon: if (pregpriv->wifi_spec == 1) rtw_set_hw_wmm_param(padapter); - /*pmlmeext->bstart_bss = _TRUE;*/ + /*pmlmeext->bstart_bss = true;*/ } int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len) @@ -1383,7 +1379,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len) u8 *p; u8 *pHT_caps_ie = NULL; u8 *pHT_info_ie = 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]; @@ -1397,7 +1393,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len) WLAN_BSSID_EX *pbss_network = (WLAN_BSSID_EX *)&pmlmepriv->cur_network.network; struct sta_priv *pstapriv = &padapter->stapriv; u8 *ie = pbss_network->IEs; - u8 vht_cap = _FALSE; + u8 vht_cap = false; struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); u8 rf_num = 0; @@ -1415,7 +1411,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len) RTW_INFO("%s, len=%d\n", __func__, len); - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE) + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true) return _FAIL; @@ -1588,16 +1584,16 @@ 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; rtw_ht_use_default_setting(padapter); /* Update HT Capabilities Info field */ - if (pmlmepriv->htpriv.sgi_20m == _FALSE) + if (pmlmepriv->htpriv.sgi_20m == false) pht_cap->cap_info &= cpu_to_le16(~(IEEE80211_HT_CAP_SGI_20)); - if (pmlmepriv->htpriv.sgi_40m == _FALSE) + if (pmlmepriv->htpriv.sgi_40m == false) pht_cap->cap_info &= cpu_to_le16(~(IEEE80211_HT_CAP_SGI_40)); if (!TEST_FLAG(pmlmepriv->htpriv.ldpc_cap, LDPC_HT_ENABLE_RX)) @@ -1713,20 +1709,20 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len) pmlmepriv->cur_network.network_type = network_type; - 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) { - pmlmepriv->htpriv.ht_option = _TRUE; + if (pregistrypriv->ht_enable && ht_cap == true) { + pmlmepriv->htpriv.ht_option = true; pmlmepriv->qospriv.qos_option = 1; - pmlmepriv->htpriv.ampdu_enable = pregistrypriv->ampdu_enable ? _TRUE : _FALSE; + pmlmepriv->htpriv.ampdu_enable = pregistrypriv->ampdu_enable ? true : false; HT_caps_handler(padapter, (PNDIS_802_11_VARIABLE_IEs)pHT_caps_ie); @@ -1770,7 +1766,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len) 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); */ @@ -1794,7 +1790,7 @@ static void rtw_macaddr_acl_init(_adapter *adapter) acl->mode = RTW_ACL_MODE_DISABLED; for (i = 0; i < NUM_ACL; i++) { _rtw_init_listhead(&acl->aclnode[i].list); - acl->aclnode[i].valid = _FALSE; + acl->aclnode[i].valid = false; } _exit_critical_bh(&(acl_node_q->lock), &irqL); } @@ -1811,12 +1807,12 @@ static void rtw_macaddr_acl_deinit(_adapter *adapter) _enter_critical_bh(&(acl_node_q->lock), &irqL); head = get_list_head(acl_node_q); list = get_next(head); - while (rtw_end_of_queue_search(head, list) == _FALSE) { + while (rtw_end_of_queue_search(head, list) == false) { acl_node = LIST_CONTAINOR(list, struct rtw_wlan_acl_node, list); list = get_next(list); - if (acl_node->valid == _TRUE) { - acl_node->valid = _FALSE; + if (acl_node->valid == true) { + acl_node->valid = false; rtw_list_delete(&acl_node->list); acl->num--; } @@ -1857,12 +1853,12 @@ int rtw_acl_add_sta(_adapter *adapter, const u8 *addr) list = get_next(head); /* search for existed entry */ - while (rtw_end_of_queue_search(head, list) == _FALSE) { + while (rtw_end_of_queue_search(head, list) == false) { acl_node = LIST_CONTAINOR(list, struct rtw_wlan_acl_node, list); list = get_next(list); if (_rtw_memcmp(acl_node->addr, addr, ETH_ALEN)) { - if (acl_node->valid == _TRUE) { + if (acl_node->valid == true) { existed = 1; break; } @@ -1878,11 +1874,11 @@ int rtw_acl_add_sta(_adapter *adapter, const u8 *addr) for (i = 0; i < NUM_ACL; i++) { acl_node = &acl->aclnode[i]; - if (acl_node->valid == _FALSE) { + if (acl_node->valid == false) { _rtw_init_listhead(&acl_node->list); _rtw_memcpy(acl_node->addr, addr, ETH_ALEN); - acl_node->valid = _TRUE; + acl_node->valid = true; rtw_list_insert_tail(&acl_node->list, get_list_head(acl_node_q)); acl->num++; @@ -1921,13 +1917,13 @@ int rtw_acl_remove_sta(_adapter *adapter, const u8 *addr) head = get_list_head(acl_node_q); list = get_next(head); - while (rtw_end_of_queue_search(head, list) == _FALSE) { + while (rtw_end_of_queue_search(head, list) == false) { acl_node = LIST_CONTAINOR(list, struct rtw_wlan_acl_node, list); list = get_next(list); if (is_baddr || _rtw_memcmp(acl_node->addr, addr, ETH_ALEN)) { - if (acl_node->valid == _TRUE) { - acl_node->valid = _FALSE; + if (acl_node->valid == true) { + acl_node->valid = false; rtw_list_delete(&acl_node->list); acl->num--; match = 1; @@ -2084,7 +2080,7 @@ static u8 rtw_ap_bmc_frames_hdl(_adapter *padapter) struct xmit_frame *pxmitframe = NULL; struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct sta_priv *pstapriv = &padapter->stapriv; - bool update_tim = _FALSE; + bool update_tim = false; if (padapter->registrypriv.wifi_spec != 1) @@ -2101,14 +2097,14 @@ static u8 rtw_ap_bmc_frames_hdl(_adapter *padapter) if ((pstapriv->tim_bitmap & BIT(0)) && (psta_bmc->sleepq_len > 0)) { int tx_counts = 0; - _update_beacon(padapter, _TIM_IE_, NULL, _FALSE, "update TIM with TIB=1"); + _update_beacon(padapter, _TIM_IE_, NULL, false, "update TIM with TIB=1"); RTW_INFO("sleepq_len of bmc_sta = %d\n", psta_bmc->sleepq_len); 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); xmitframe_plist = get_next(xmitframe_plist); @@ -2128,7 +2124,7 @@ static u8 rtw_ap_bmc_frames_hdl(_adapter *padapter) pxmitframe->attrib.triggered = 1; - if (xmitframe_hiq_filter(pxmitframe) == _TRUE) + if (xmitframe_hiq_filter(pxmitframe) == true) pxmitframe->attrib.qsel = QSLT_HIGH;/*HIQ*/ rtw_hal_xmitframe_enqueue(padapter, pxmitframe); @@ -2144,14 +2140,14 @@ static u8 rtw_ap_bmc_frames_hdl(_adapter *padapter) /*RTW_INFO("sleepq_len of bmc_sta = %d\n", psta_bmc->sleepq_len);*/ if (pstapriv->tim_bitmap & BIT(0)) - update_tim = _TRUE; + update_tim = true; pstapriv->tim_bitmap &= ~BIT(0); pstapriv->sta_dz_bitmap &= ~BIT(0); - if (update_tim == _TRUE) { + if (update_tim == true) { RTW_INFO("clear TIB\n"); - _update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "bmc sleepq and HIQ empty"); + _update_beacon(padapter, _TIM_IE_, NULL, true, "bmc sleepq and HIQ empty"); } } } @@ -2175,7 +2171,7 @@ static void associated_stainfo_update(_adapter *padapter, struct sta_info *psta, if (pmlmepriv->sw_to_20mhz) { psta->bw_mode = CHANNEL_WIDTH_20; /*psta->htpriv.ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;*/ - psta->htpriv.sgi_40m = _FALSE; + psta->htpriv.sgi_40m = false; } else { /*TODO: Switch back to 40MHZ?80MHZ*/ } @@ -2223,7 +2219,7 @@ static void update_bcn_ext_capab_ie(_adapter *padapter) rtw_remove_bcn_ie(padapter, pnetwork, _EXT_CAP_IE_); if ((pmlmepriv->ext_capab_ie_len > 0) && - (_rtw_memcmp(pmlmepriv->ext_capab_ie_data, null_extcap_data, sizeof(null_extcap_data)) == _FALSE)) + (_rtw_memcmp(pmlmepriv->ext_capab_ie_data, null_extcap_data, sizeof(null_extcap_data)) == false)) rtw_add_bcn_ie(padapter, pnetwork, _EXT_CAP_IE_, pmlmepriv->ext_capab_ie_data, pmlmepriv->ext_capab_ie_len); } @@ -2277,7 +2273,7 @@ static void update_bcn_htcap_ie(_adapter *padapter) static void update_bcn_htinfo_ie(_adapter *padapter) { /* - u8 beacon_updated = _FALSE; + u8 beacon_updated = false; u32 sta_info_update_type = STA_INFO_UPDATE_NONE; */ struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); @@ -2287,7 +2283,7 @@ static void update_bcn_htinfo_ie(_adapter *padapter) unsigned char *p, *ie = pnetwork->IEs; u32 len = 0; - if (pmlmepriv->htpriv.ht_option == _FALSE) + if (pmlmepriv->htpriv.ht_option == false) return; if (pmlmeinfo->HT_info_enable != 1) @@ -2309,15 +2305,15 @@ static void update_bcn_htinfo_ie(_adapter *padapter) /* for STA Channel Width/Secondary Channel Offset*/ if ((pmlmepriv->sw_to_20mhz == 0) && (pmlmeext->cur_channel <= 14)) { - if ((pmlmepriv->num_sta_40mhz_intolerant > 0) || (pmlmepriv->ht_20mhz_width_req == _TRUE) - || (pmlmepriv->ht_intolerant_ch_reported == _TRUE) || (ATOMIC_READ(&pmlmepriv->olbc) == _TRUE)) { + if ((pmlmepriv->num_sta_40mhz_intolerant > 0) || (pmlmepriv->ht_20mhz_width_req == true) + || (pmlmepriv->ht_intolerant_ch_reported == true) || (ATOMIC_READ(&pmlmepriv->olbc) == true)) { SET_HT_OP_ELE_2ND_CHL_OFFSET(pht_info, 0); SET_HT_OP_ELE_STA_CHL_WIDTH(pht_info, 0); pmlmepriv->sw_to_20mhz = 1; /* sta_info_update_type |= STA_INFO_UPDATE_BW; - beacon_updated = _TRUE; + beacon_updated = true; */ RTW_INFO("%s:switching to 20Mhz\n", __func__); @@ -2326,8 +2322,8 @@ static void update_bcn_htinfo_ie(_adapter *padapter) } } else { - if ((pmlmepriv->num_sta_40mhz_intolerant == 0) && (pmlmepriv->ht_20mhz_width_req == _FALSE) - && (pmlmepriv->ht_intolerant_ch_reported == _FALSE) && (ATOMIC_READ(&pmlmepriv->olbc) == _FALSE)) { + if ((pmlmepriv->num_sta_40mhz_intolerant == 0) && (pmlmepriv->ht_20mhz_width_req == false) + && (pmlmepriv->ht_intolerant_ch_reported == false) && (ATOMIC_READ(&pmlmepriv->olbc) == false)) { if (pmlmeext->cur_bwmode >= CHANNEL_WIDTH_40) { @@ -2340,7 +2336,7 @@ static void update_bcn_htinfo_ie(_adapter *padapter) pmlmepriv->sw_to_20mhz = 0; /* sta_info_update_type |= STA_INFO_UPDATE_BW; - beacon_updated = _TRUE; + beacon_updated = true; */ RTW_INFO("%s:switching back to 40Mhz\n", __func__); @@ -2481,7 +2477,7 @@ void _update_beacon(_adapter *padapter, u8 ie_id, u8 *oui, u8 tx, const char *ta 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); @@ -2539,7 +2535,7 @@ void _update_beacon(_adapter *padapter, u8 ie_id, u8 *oui, u8 tx, const char *ta break; } - pmlmepriv->update_bcn = _TRUE; + pmlmepriv->update_bcn = true; _exit_critical_bh(&pmlmepriv->bcn_update_lock, &irqL); @@ -2557,7 +2553,7 @@ void rtw_process_public_act_bsscoex(_adapter *padapter, u8 *pframe, uint frame_l { struct sta_info *psta; struct sta_priv *pstapriv = &padapter->stapriv; - u8 beacon_updated = _FALSE; + u8 beacon_updated = false; struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); u8 *frame_body = pframe + sizeof(struct rtw_ieee80211_hdr_3addr); uint frame_body_len = frame_len - sizeof(struct rtw_ieee80211_hdr_3addr); @@ -2579,15 +2575,15 @@ void rtw_process_public_act_bsscoex(_adapter *padapter, u8 *pframe, uint frame_l if (psta->ht_40mhz_intolerant == 0) { psta->ht_40mhz_intolerant = 1; pmlmepriv->num_sta_40mhz_intolerant++; - beacon_updated = _TRUE; + beacon_updated = true; } } else if (ie_data & RTW_WLAN_20_40_BSS_COEX_20MHZ_WIDTH_REQ) { - if (pmlmepriv->ht_20mhz_width_req == _FALSE) { - pmlmepriv->ht_20mhz_width_req = _TRUE; - beacon_updated = _TRUE; + if (pmlmepriv->ht_20mhz_width_req == false) { + pmlmepriv->ht_20mhz_width_req = true; + beacon_updated = true; } } else - beacon_updated = _FALSE; + beacon_updated = false; } } @@ -2595,16 +2591,16 @@ void rtw_process_public_act_bsscoex(_adapter *padapter, u8 *pframe, uint frame_l /* if EID_BSSIntolerantChlReport ie exists */ if ((frame_body[5] == EID_BSSIntolerantChlReport) && (frame_body[6] > 0)) { /*todo:*/ - if (pmlmepriv->ht_intolerant_ch_reported == _FALSE) { - pmlmepriv->ht_intolerant_ch_reported = _TRUE; - beacon_updated = _TRUE; + if (pmlmepriv->ht_intolerant_ch_reported == false) { + pmlmepriv->ht_intolerant_ch_reported = true; + beacon_updated = true; } } } if (beacon_updated) { - update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, _TRUE); + update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, true); associated_stainfo_update(padapter, psta, STA_INFO_UPDATE_BW); } @@ -2663,7 +2659,7 @@ 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 == _FALSE) + if (pmlmepriv->htpriv.ht_option == false) return 0; /*if (!iface->conf->ieee80211n || iface->conf->ht_op_mode_fixed) @@ -2730,7 +2726,7 @@ int rtw_ht_operation_update(_adapter *padapter) void associated_clients_update(_adapter *padapter, u8 updated, u32 sta_info_type) { /* update associcated stations cap. */ - if (updated == _TRUE) { + if (updated == true) { unsigned long irqL; _list *phead, *plist; struct sta_info *psta = NULL; @@ -2742,7 +2738,7 @@ void associated_clients_update(_adapter *padapter, u8 updated, u32 sta_info_type 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); plist = get_next(plist); @@ -2759,7 +2755,7 @@ void associated_clients_update(_adapter *padapter, u8 updated, u32 sta_info_type /* 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); @@ -2771,8 +2767,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); } } @@ -2784,8 +2780,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); } } @@ -2798,8 +2794,8 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta) pmlmepriv->num_sta_non_erp++; 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); } } @@ -2810,8 +2806,8 @@ void bss_cap_update_on_sta_join(_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); } } @@ -2824,8 +2820,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); } } @@ -2837,8 +2833,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); } } } @@ -2881,7 +2877,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) { RTW_INFO("%s STA " MAC_FMT " - no HT, num of non-HT stations %d\n", __func__, MAC_ARG(psta->hwaddr), @@ -2890,9 +2886,9 @@ 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); - /*beacon_updated = _TRUE;*/ + update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, false); + update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, true); + /*beacon_updated = true;*/ } /* update associcated stations cap. */ @@ -2904,7 +2900,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); @@ -2916,8 +2912,8 @@ u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta) pmlmepriv->num_sta_no_short_preamble--; 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); } } @@ -2925,8 +2921,8 @@ u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta) psta->nonerp_set = 0; 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); } } @@ -2935,8 +2931,8 @@ u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta) pmlmepriv->num_sta_no_short_slot_time--; 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); } } @@ -2956,8 +2952,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); } RTW_INFO("%s, updated=%d\n", __func__, beacon_updated); @@ -2968,7 +2964,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, bool enqueue) { unsigned long 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; @@ -2976,7 +2972,7 @@ u8 ap_free_sta(_adapter *padapter, struct sta_info *psta, bool active, u16 reaso if (!psta) return beacon_updated; - if (active == _TRUE) { + if (active == true) { /* tear down Rx AMPDU */ send_delba(padapter, 0, psta->hwaddr);/* recipient */ @@ -3016,7 +3012,7 @@ u8 ap_free_sta(_adapter *padapter, struct sta_info *psta, bool active, u16 reaso rtw_indicate_sta_disassoc_event(padapter, psta); } - report_del_sta_event(padapter, psta->hwaddr, reason, enqueue, _FALSE); + report_del_sta_event(padapter, psta->hwaddr, reason, enqueue, false); beacon_updated = bss_cap_update_on_sta_leave(padapter, psta); @@ -3051,7 +3047,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); @@ -3088,7 +3084,7 @@ int rtw_sta_flush(_adapter *padapter, bool enqueue) _enter_critical_bh(&pstapriv->asoc_list_lock, &irqL); phead = &pstapriv->asoc_list; plist = get_next(phead); - while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { + while ((rtw_end_of_queue_search(phead, plist)) == false) { int stainfo_offset; psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); @@ -3108,12 +3104,12 @@ int rtw_sta_flush(_adapter *padapter, bool enqueue) /* call ap_free_sta() for each sta picked */ for (i = 0; i < flush_num; i++) { psta = rtw_get_stainfo_by_offset(pstapriv, flush_list[i]); - ap_free_sta(padapter, psta, _TRUE, WLAN_REASON_DEAUTH_LEAVING, enqueue); + ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING, enqueue); } issue_deauth(padapter, bc_addr, WLAN_REASON_DEAUTH_LEAVING); - associated_clients_update(padapter, _TRUE, STA_INFO_UPDATE_ALL); + associated_clients_update(padapter, true, STA_INFO_UPDATE_ALL); return ret; } @@ -3136,16 +3132,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; psta->htpriv.smps_cap = (le16_to_cpu(psta->htpriv.ht_cap.cap_info) & IEEE80211_HT_CAP_SM_PS) >> 2; } 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; update_sta_info_apmode(padapter, psta); } @@ -3153,7 +3149,7 @@ void sta_info_update(_adapter *padapter, struct sta_info *psta) void ap_sta_info_defer_update(_adapter *padapter, struct sta_info *psta) { if (psta->state & _FW_LINKED) - rtw_hal_update_ra_mask(psta, psta->rssi_level, _TRUE); /* DM_RATR_STA_INIT */ + rtw_hal_update_ra_mask(psta, psta->rssi_level, true); /* DM_RATR_STA_INIT */ } /* restore hw setting from sw data structures */ void rtw_ap_restore_network(_adapter *padapter) @@ -3170,7 +3166,7 @@ void rtw_ap_restore_network(_adapter *padapter) char chk_alive_list[NUM_STA]; int i; - rtw_setopmode_cmd(padapter, Ndis802_11APMode, _FALSE); + rtw_setopmode_cmd(padapter, Ndis802_11APMode, false); set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); @@ -3179,7 +3175,7 @@ void rtw_ap_restore_network(_adapter *padapter) if ((padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_) || (padapter->securitypriv.dot11PrivacyAlgrthm == _AES_)) { /* restore group key, WEP keys is restored in ips_leave() */ - rtw_set_key(padapter, psecuritypriv, psecuritypriv->dot118021XGrpKeyid, 0, _FALSE); + rtw_set_key(padapter, psecuritypriv, psecuritypriv->dot118021XGrpKeyid, 0, false); } _enter_critical_bh(&pstapriv->asoc_list_lock, &irqL); @@ -3187,7 +3183,7 @@ void rtw_ap_restore_network(_adapter *padapter) phead = &pstapriv->asoc_list; plist = get_next(phead); - while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { + while ((rtw_end_of_queue_search(phead, plist)) == false) { int stainfo_offset; psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); @@ -3212,7 +3208,7 @@ void rtw_ap_restore_network(_adapter *padapter) /* per sta pairwise key and settings */ if ((padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_) || (padapter->securitypriv.dot11PrivacyAlgrthm == _AES_)) - rtw_setstakey_cmd(padapter, psta, UNICAST_KEY, _FALSE); + rtw_setstakey_cmd(padapter, psta, UNICAST_KEY, false); } } @@ -3228,11 +3224,11 @@ void start_ap_mode(_adapter *padapter) struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct security_priv *psecuritypriv = &padapter->securitypriv; - 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; @@ -3248,11 +3244,11 @@ void start_ap_mode(_adapter *padapter) pmlmepriv->num_sta_ht_20mhz = 0; pmlmepriv->num_sta_40mhz_intolerant = 0; - ATOMIC_SET(&pmlmepriv->olbc, _FALSE); - ATOMIC_SET(&pmlmepriv->olbc_ht, _FALSE); + ATOMIC_SET(&pmlmepriv->olbc, false); + ATOMIC_SET(&pmlmepriv->olbc_ht, false); - pmlmepriv->ht_20mhz_width_req = _FALSE; - pmlmepriv->ht_intolerant_ch_reported = _FALSE; + pmlmepriv->ht_20mhz_width_req = false; + pmlmepriv->ht_intolerant_ch_reported = false; pmlmepriv->ht_op_mode = 0; pmlmepriv->sw_to_20mhz = 0; @@ -3293,9 +3289,9 @@ void stop_ap_mode(_adapter *padapter) RTW_INFO("%s -"ADPT_FMT"\n", __func__, ADPT_ARG(padapter)); - pmlmepriv->update_bcn = _FALSE; - /*pmlmeext->bstart_bss = _FALSE;*/ - padapter->netif_up = _FALSE; + pmlmepriv->update_bcn = false; + /*pmlmeext->bstart_bss = false;*/ + padapter->netif_up = false; /* _rtw_spinlock_free(&pmlmepriv->bcn_update_lock); */ /* reset and init security priv , this can refine with rtw_reset_securitypriv */ @@ -3308,13 +3304,13 @@ void stop_ap_mode(_adapter *padapter) #endif /* free scan queue */ - rtw_free_network_queue(padapter, _TRUE); + rtw_free_network_queue(padapter, true); #if CONFIG_RTW_MACADDR_ACL rtw_macaddr_acl_deinit(padapter); #endif - rtw_sta_flush(padapter, _TRUE); + rtw_sta_flush(padapter, true); /* free_assoc_sta_resources */ rtw_free_all_stainfo(padapter); @@ -3327,7 +3323,7 @@ void stop_ap_mode(_adapter *padapter) rtw_free_mlme_priv_ie_data(pmlmepriv); #ifdef CONFIG_SWTIMER_BASED_TXBCN - if (pmlmeext->bstart_bss == _TRUE) { + if (pmlmeext->bstart_bss == true) { _enter_critical_bh(&pdvobj->ap_if_q.lock, &irqL); pdvobj->nr_ap_if--; if (pdvobj->nr_ap_if > 0) @@ -3345,7 +3341,7 @@ void stop_ap_mode(_adapter *padapter) } #endif - pmlmeext->bstart_bss = _FALSE; + pmlmeext->bstart_bss = false; #ifdef CONFIG_BT_COEXIST rtw_btcoex_MediaStatusNotify(padapter, 0); /* disconnect */ @@ -3413,10 +3409,10 @@ void rtw_ap_update_bss_chbw(_adapter *adapter, WLAN_BSSID_EX *bss, u8 ch, u8 bw, u8 *p; int ie_len; u8 old_ch = bss->Configuration.DSConfig; - bool change_band = _FALSE; + bool change_band = false; if ((ch <= 14 && old_ch >= 36) || (ch >= 36 && old_ch <= 14)) - change_band = _TRUE; + change_band = true; /* update channel in IE */ p = rtw_get_ie((bss->IEs + sizeof(NDIS_802_11_FIXED_IEs)), _DSSET_IE_, &ie_len, (bss->IELength - sizeof(NDIS_802_11_FIXED_IEs))); @@ -3426,7 +3422,7 @@ void rtw_ap_update_bss_chbw(_adapter *adapter, WLAN_BSSID_EX *bss, u8 ch, u8 bw, bss->Configuration.DSConfig = ch; /* band is changed, update ERP, support rate, ext support rate IE */ - if (change_band == _TRUE) + if (change_band == true) change_band_update_ie(adapter, bss, ch); } @@ -3438,11 +3434,11 @@ bool rtw_ap_chbw_decision(_adapter *adapter, s16 req_ch, s8 req_bw, s8 req_offse u8 cur_ie_ch, cur_ie_bw, cur_ie_offset; u8 dec_ch, dec_bw, dec_offset; u8 u_ch = 0, u_offset, u_bw; - bool changed = _FALSE; + bool changed = false; struct mlme_ext_priv *mlmeext = &(adapter->mlmeextpriv); WLAN_BSSID_EX *network = &(adapter->mlmepriv.cur_network.network); struct mi_state mstate; - bool set_u_ch = _FALSE, set_dec_ch = _FALSE; + bool set_u_ch = false, set_dec_ch = false; rtw_ies_get_chbw(network->IEs + sizeof(NDIS_802_11_FIXED_IEs) , network->IELength - sizeof(NDIS_802_11_FIXED_IEs) @@ -3460,7 +3456,7 @@ bool rtw_ap_chbw_decision(_adapter *adapter, s16 req_ch, s8 req_bw, s8 req_offse RTW_INFO(FUNC_ADPT_FMT"req ch settings are the same as current ch setting, go to exit\n" , FUNC_ADPT_ARG(adapter)); - *chbw_allow = _FALSE; + *chbw_allow = false; goto exit; } else { RTW_INFO(FUNC_ADPT_FMT"request channel settings are not the same as current channel setting(%d,%d,%d,%d,%d,%d), restart MCC\n" @@ -3499,13 +3495,13 @@ bool rtw_ap_chbw_decision(_adapter *adapter, s16 req_ch, s8 req_bw, s8 req_offse mlmeext->cur_bwmode = *bw = dec_bw; mlmeext->cur_ch_offset = *offset = dec_offset; /* channel bw offset can not be allowed, need MCC */ - *chbw_allow = _FALSE; + *chbw_allow = false; RTW_INFO(FUNC_ADPT_FMT" enable mcc: %u,%u,%u\n", FUNC_ADPT_ARG(adapter) , *ch, *bw, *offset); goto exit; } else /* channel bw offset can be allowed, not need MCC */ - *chbw_allow = _TRUE; + *chbw_allow = true; } #endif /* CONFIG_MCC_MODE */ rtw_sync_chbw(&dec_ch, &dec_bw, &dec_offset @@ -3514,7 +3510,7 @@ bool rtw_ap_chbw_decision(_adapter *adapter, s16 req_ch, s8 req_bw, s8 req_offse rtw_ap_update_bss_chbw(adapter, &(adapter->mlmepriv.cur_network.network) , dec_ch, dec_bw, dec_offset); - set_u_ch = _TRUE; + set_u_ch = true; } else if (MSTATE_STA_LG_NUM(&mstate)) { /* has linking STA */ @@ -3533,10 +3529,10 @@ bool rtw_ap_chbw_decision(_adapter *adapter, s16 req_ch, s8 req_bw, s8 req_offse rtw_ap_update_bss_chbw(adapter, &(adapter->mlmepriv.cur_network.network) , dec_ch, dec_bw, dec_offset); - set_u_ch = _TRUE; + set_u_ch = true; /* channel bw offset can be allowed, not need MCC */ - *chbw_allow = _TRUE; + *chbw_allow = true; } else { #ifdef CONFIG_MCC_MODE if (MCC_EN(adapter)) { @@ -3545,7 +3541,7 @@ bool rtw_ap_chbw_decision(_adapter *adapter, s16 req_ch, s8 req_bw, s8 req_offse mlmeext->cur_ch_offset = *offset = dec_offset; /* channel bw offset can not be allowed, need MCC */ - *chbw_allow = _FALSE; + *chbw_allow = false; RTW_INFO(FUNC_ADPT_FMT" enable mcc: %u,%u,%u\n", FUNC_ADPT_ARG(adapter) , *ch, *bw, *offset); goto exit; @@ -3565,7 +3561,7 @@ bool rtw_ap_chbw_decision(_adapter *adapter, s16 req_ch, s8 req_bw, s8 req_offse if (req_ch == -1 || req_bw == -1) goto choose_chbw; RTW_WARN(FUNC_ADPT_FMT" req: %u,%u has no valid offset\n", FUNC_ADPT_ARG(adapter), dec_ch, dec_bw); - *chbw_allow = _FALSE; + *chbw_allow = false; goto exit; } @@ -3573,7 +3569,7 @@ bool rtw_ap_chbw_decision(_adapter *adapter, s16 req_ch, s8 req_bw, s8 req_offse if (req_ch == -1 || req_bw == -1) goto choose_chbw; RTW_WARN(FUNC_ADPT_FMT" req: %u,%u,%u doesn't fit in chplan\n", FUNC_ADPT_ARG(adapter), dec_ch, dec_bw, dec_offset); - *chbw_allow = _FALSE; + *chbw_allow = false; goto exit; } @@ -3582,13 +3578,13 @@ bool rtw_ap_chbw_decision(_adapter *adapter, s16 req_ch, s8 req_bw, s8 req_offse RTW_WARN(FUNC_ADPT_FMT" DFS channel %u,%u,%u can't be used\n", FUNC_ADPT_ARG(adapter), dec_ch, dec_bw, dec_offset); if (req_ch > 0) { /* specific channel and not from IE => don't change channel setting */ - *chbw_allow = _FALSE; + *chbw_allow = false; goto exit; } goto choose_chbw; } - if (rtw_chset_is_ch_non_ocp(mlmeext->channel_set, dec_ch, dec_bw, dec_offset) == _FALSE) + if (rtw_chset_is_ch_non_ocp(mlmeext->channel_set, dec_ch, dec_bw, dec_offset) == false) goto update_bss_chbw; choose_chbw: @@ -3599,21 +3595,21 @@ choose_chbw: if (!rtw_odm_dfs_domain_unknown(adapter)) { /* choose 5G DFS channel for debug */ if (adapter_to_rfctl(adapter)->dbg_dfs_master_choose_dfs_ch_first - && rtw_choose_shortest_waiting_ch(adapter, req_bw, &dec_ch, &dec_bw, &dec_offset, RTW_CHF_2G | RTW_CHF_NON_DFS) == _TRUE) + && rtw_choose_shortest_waiting_ch(adapter, req_bw, &dec_ch, &dec_bw, &dec_offset, RTW_CHF_2G | RTW_CHF_NON_DFS) == true) RTW_INFO(FUNC_ADPT_FMT" choose 5G DFS channel for debug\n", FUNC_ADPT_ARG(adapter)); else if (adapter_to_rfctl(adapter)->dfs_ch_sel_d_flags - && rtw_choose_shortest_waiting_ch(adapter, req_bw, &dec_ch, &dec_bw, &dec_offset, adapter_to_rfctl(adapter)->dfs_ch_sel_d_flags) == _TRUE) + && rtw_choose_shortest_waiting_ch(adapter, req_bw, &dec_ch, &dec_bw, &dec_offset, adapter_to_rfctl(adapter)->dfs_ch_sel_d_flags) == true) RTW_INFO(FUNC_ADPT_FMT" choose with dfs_ch_sel_d_flags:0x%02x for debug\n", FUNC_ADPT_ARG(adapter), adapter_to_rfctl(adapter)->dfs_ch_sel_d_flags); - else if (rtw_choose_shortest_waiting_ch(adapter, req_bw, &dec_ch, &dec_bw, &dec_offset, 0) == _FALSE) { + else if (rtw_choose_shortest_waiting_ch(adapter, req_bw, &dec_ch, &dec_bw, &dec_offset, 0) == false) { RTW_WARN(FUNC_ADPT_FMT" no available channel\n", FUNC_ADPT_ARG(adapter)); - *chbw_allow = _FALSE; + *chbw_allow = false; goto exit; } } else #endif /* defined(CONFIG_DFS_MASTER) */ - if (rtw_choose_shortest_waiting_ch(adapter, req_bw, &dec_ch, &dec_bw, &dec_offset, RTW_CHF_DFS) == _FALSE) { + if (rtw_choose_shortest_waiting_ch(adapter, req_bw, &dec_ch, &dec_bw, &dec_offset, RTW_CHF_DFS) == false) { RTW_WARN(FUNC_ADPT_FMT" no available channel\n", FUNC_ADPT_ARG(adapter)); - *chbw_allow = _FALSE; + *chbw_allow = false; goto exit; } @@ -3622,27 +3618,27 @@ update_bss_chbw: , dec_ch, dec_bw, dec_offset); /* channel bw offset can be allowed for single AP, not need MCC */ - *chbw_allow = _TRUE; - set_dec_ch = _TRUE; + *chbw_allow = true; + set_dec_ch = true; } if (rtw_mi_check_fwstate(adapter, _FW_UNDER_SURVEY)) { /* scanning, leave ch setting to scan state machine */ - set_u_ch = set_dec_ch = _FALSE; + set_u_ch = set_dec_ch = false; } if (mlmeext->cur_channel != dec_ch || mlmeext->cur_bwmode != dec_bw || mlmeext->cur_ch_offset != dec_offset) - changed = _TRUE; + changed = true; - if (changed == _TRUE && rtw_linked_check(adapter) == _TRUE) { + if (changed == true && rtw_linked_check(adapter) == true) { #ifdef CONFIG_SPCT_CH_SWITCH if (1) rtw_ap_inform_ch_switch(adapter, dec_ch, dec_offset); else #endif - rtw_sta_flush(adapter, _FALSE); + rtw_sta_flush(adapter, false); } mlmeext->cur_channel = dec_ch; @@ -3654,11 +3650,11 @@ update_bss_chbw: RTW_INFO(FUNC_ADPT_FMT" dec: %u,%u,%u\n", FUNC_ADPT_ARG(adapter), dec_ch, dec_bw, dec_offset); - if (set_u_ch == _TRUE) { + if (set_u_ch == true) { *ch = u_ch; *bw = u_bw; *offset = u_offset; - } else if (set_dec_ch == _TRUE) { + } else if (set_dec_ch == true) { *ch = dec_ch; *bw = dec_bw; *offset = dec_offset; @@ -3735,7 +3731,7 @@ void tx_beacon_handler(struct dvobj_priv *pdvobj) padapter = NULL; phead = get_list_head(&pdvobj->ap_if_q); plist = get_next(phead); - while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { + while ((rtw_end_of_queue_search(phead, plist)) == false) { padapter = LIST_CONTAINOR(plist, struct _ADAPTER, list); plist = get_next(plist); @@ -3785,7 +3781,7 @@ void tx_beacon_handler(struct dvobj_priv *pdvobj) #ifdef DBG_SWTIMER_BASED_TXBCN RTW_INFO("padapter=%p, PORT=%d\n", padapter, padapter->hw_port); #endif - /*update_beacon(padapter, _TIM_IE_, NULL, _FALSE);*/ + /*update_beacon(padapter, _TIM_IE_, NULL, false);*/ issue_beacon(padapter, 0); } } diff --git a/core/rtw_beamforming.c b/core/rtw_beamforming.c index 6e4f5bd..035f535 100644 --- a/core/rtw_beamforming.c +++ b/core/rtw_beamforming.c @@ -62,8 +62,8 @@ static void _get_txvector_parameter(PADAPTER adapter, struct sta_info *sta, u8 * /* (dec(AID[0:8]) + dec(BSSID)*2^5) mod 2^9 */ *p_aid = (aid + (val16 << 5)) & 0x1FF; *g_id = 63; - } else if ((check_fwstate(mlme, WIFI_ADHOC_STATE) == _TRUE) - || (check_fwstate(mlme, WIFI_ADHOC_MASTER_STATE) == _TRUE)) { + } else if ((check_fwstate(mlme, WIFI_ADHOC_STATE) == true) + || (check_fwstate(mlme, WIFI_ADHOC_MASTER_STATE) == true)) { /* * Otherwise, includes * 1. Sent to an IBSS STA @@ -110,7 +110,7 @@ static void _get_sta_beamform_cap(PADAPTER adapter, struct sta_info *sta, info = GET_BEAMFORM_INFO(adapter); ht = &adapter->mlmepriv.htpriv; - if (is_supported_ht(sta->wireless_mode) == _TRUE) { + if (is_supported_ht(sta->wireless_mode) == true) { /* HT */ bf_cap = ht->beamform_cap; @@ -156,13 +156,13 @@ static u8 _send_ht_ndpa_packet(PADAPTER adapter, u8 *ra, CHANNEL_WIDTH bw) bfee = rtw_bf_bfee_get_entry_by_addr(adapter, ra); if (!bfee) { RTW_ERR("%s: Cann't find beamformee entry!\n", __func__); - return _FALSE; + return false; } pmgntframe = alloc_mgtxmitframe(pxmitpriv); if (!pmgntframe) { RTW_ERR("%s: alloc mgnt frame fail!\n", __func__); - return _FALSE; + return false; } txrate = beamforming_get_htndp_tx_rate(GET_PDM_ODM(adapter), bfee->comp_steering_num_of_bfer); @@ -222,7 +222,7 @@ static u8 _send_ht_ndpa_packet(PADAPTER adapter, u8 *ra, CHANNEL_WIDTH bw) dump_mgntframe(adapter, pmgntframe); - return _TRUE; + return true; } static u8 _send_vht_ndpa_packet(PADAPTER adapter, u8 *ra, u16 aid, CHANNEL_WIDTH bw) @@ -252,13 +252,13 @@ static u8 _send_vht_ndpa_packet(PADAPTER adapter, u8 *ra, u16 aid, CHANNEL_WIDTH bfee = rtw_bf_bfee_get_entry_by_addr(adapter, ra); if (!bfee) { RTW_ERR("%s: Cann't find beamformee entry!\n", __func__); - return _FALSE; + return false; } pmgntframe = alloc_mgtxmitframe(pxmitpriv); if (!pmgntframe) { RTW_ERR("%s: alloc mgnt frame fail!\n", __func__); - return _FALSE; + return false; } txrate = beamforming_get_vht_ndp_tx_rate(GET_PDM_ODM(adapter), bfee->comp_steering_num_of_bfer); @@ -314,7 +314,7 @@ static u8 _send_vht_ndpa_packet(PADAPTER adapter, u8 *ra, u16 aid, CHANNEL_WIDTH * "AID12" Equal to 0 if the STA is an AP, mesh STA or * STA that is a member of an IBSS */ - if (check_fwstate(&adapter->mlmepriv, WIFI_AP_STATE) == _FALSE) + if (check_fwstate(&adapter->mlmepriv, WIFI_AP_STATE) == false) aid = 0; sta_info.aid = aid; /* "Feedback Type" set to 0 for SU */ @@ -328,7 +328,7 @@ static u8 _send_vht_ndpa_packet(PADAPTER adapter, u8 *ra, u16 aid, CHANNEL_WIDTH dump_mgntframe(adapter, pmgntframe); - return _TRUE; + return true; } static u8 _send_vht_mu_ndpa_packet(PADAPTER adapter, CHANNEL_WIDTH bw) @@ -373,7 +373,7 @@ static u8 _send_vht_mu_ndpa_packet(PADAPTER adapter, CHANNEL_WIDTH bw) pmgntframe = alloc_mgtxmitframe(pxmitpriv); if (!pmgntframe) { RTW_ERR("%s: alloc mgnt frame fail!\n", __func__); - return _FALSE; + return false; } /* update attribute */ @@ -445,7 +445,7 @@ static u8 _send_vht_mu_ndpa_packet(PADAPTER adapter, CHANNEL_WIDTH bw) dump_mgntframe(adapter, pmgntframe); - return _TRUE; + return true; } static u8 _send_bf_report_poll(PADAPTER adapter, u8 *ra, u8 bFinalPoll) @@ -466,7 +466,7 @@ static u8 _send_bf_report_poll(PADAPTER adapter, u8 *ra, u8 bFinalPoll) pmgntframe = alloc_mgtxmitframe(pxmitpriv); if (!pmgntframe) { RTW_ERR("%s: alloc mgnt frame fail!\n", __func__); - return _FALSE; + return false; } /* update attribute */ @@ -507,7 +507,7 @@ static u8 _send_bf_report_poll(PADAPTER adapter, u8 *ra, u8 bFinalPoll) dump_mgntframe(adapter, pmgntframe); - return _TRUE; + return true; } static void _sounding_update_min_period(PADAPTER adapter, u16 period, u8 leave) @@ -520,7 +520,7 @@ static void _sounding_update_min_period(PADAPTER adapter, u16 period, u8 leave) info = GET_BEAMFORM_INFO(adapter); - if (_TRUE == leave) { + if (true == leave) { /* * When a BFee left, * we need to find the latest min sounding period @@ -528,7 +528,7 @@ static void _sounding_update_min_period(PADAPTER adapter, u16 period, u8 leave) */ for (i = 0; i < MAX_BEAMFORMEE_ENTRY_NUM; i++) { bfee = &info->bfee_entry[i]; - if ((bfee->used == _TRUE) + if ((bfee->used == true) && (bfee->sound_period < min_val)) min_val = bfee->sound_period; } @@ -572,10 +572,10 @@ static void _sounding_reset_vars(PADAPTER adapter) /* Clear bSound flag for the new period */ for (idx = 0; idx < MAX_BEAMFORMEE_ENTRY_NUM; idx++) { - if ((info->bfee_entry[idx].used == _TRUE) - && (info->bfee_entry[idx].sounding == _TRUE)) { - info->bfee_entry[idx].sounding = _FALSE; - info->bfee_entry[idx].bCandidateSoundingPeer = _FALSE; + if ((info->bfee_entry[idx].used == true) + && (info->bfee_entry[idx].sounding == true)) { + info->bfee_entry[idx].sounding = false; + info->bfee_entry[idx].bCandidateSoundingPeer = false; } } } @@ -602,7 +602,7 @@ static int _sounding_get_list(PADAPTER adapter) /* Add MU BFee list first because MU priority is higher than SU */ for (i = 0; i < MAX_BEAMFORMEE_ENTRY_NUM; i++) { bfee = &info->bfee_entry[i]; - if (bfee->used == _FALSE) + if (bfee->used == false) continue; if (bfee->state != BEAMFORM_ENTRY_HW_STATE_ADDED) { @@ -635,8 +635,8 @@ static int _sounding_get_list(PADAPTER adapter) continue; } - if (bfee->bApplySounding == _TRUE) { - bfee->bCandidateSoundingPeer = _TRUE; + if (bfee->bApplySounding == true) { + bfee->bCandidateSoundingPeer = true; bfee->SoundCnt = GetInitSoundCnt(bfee->sound_period, sounding->min_sounding_period); sounding->mu_sounding_list[mu_idx] = i; mu_idx++; @@ -648,12 +648,12 @@ static int _sounding_get_list(PADAPTER adapter) continue; } - if (bfee->bDeleteSounding == _TRUE) { + if (bfee->bDeleteSounding == true) { sounding->su_sounding_list[su_idx] = i; su_idx++; - } else if ((bfee->bApplySounding == _TRUE) - && (bfee->bSuspendSUCap == _FALSE)) { - bfee->bCandidateSoundingPeer = _TRUE; + } else if ((bfee->bApplySounding == true) + && (bfee->bSuspendSUCap == false)) { + bfee->bCandidateSoundingPeer = true; bfee->SoundCnt = GetInitSoundCnt(bfee->sound_period, sounding->min_sounding_period); sounding->su_sounding_list[su_idx] = i; su_idx++; @@ -681,7 +681,7 @@ static void _sounding_handler(PADAPTER adapter) struct beamformee_entry *bfee; u8 su_idx, i; u32 timeout_period = 0; - u8 set_timer = _FALSE; + u8 set_timer = false; int ret = 0; static u16 wait_cnt = 0; @@ -735,7 +735,7 @@ static void _sounding_handler(PADAPTER adapter) wait_cnt = 0; - if (check_fwstate(&adapter->mlmepriv, WIFI_SITE_MONITOR) == _TRUE) { + if (check_fwstate(&adapter->mlmepriv, WIFI_SITE_MONITOR) == true) { RTW_INFO("%s: Sounding abort! scanning APs...\n", __func__); info->sounding_running--; return; @@ -751,7 +751,7 @@ static void _sounding_handler(PADAPTER adapter) if (su_idx >= MAX_BEAMFORMEE_ENTRY_NUM) continue; bfee = &info->bfee_entry[su_idx]; - if (_FALSE == bfee->sounding) + if (false == bfee->sounding) break; } if (i < MAX_NUM_BEAMFORMEE_SU) { @@ -760,12 +760,12 @@ static void _sounding_handler(PADAPTER adapter) sounding->state = SOUNDING_STATE_SU_START; RTW_DBG("%s: Set to SOUNDING_STATE_SU_START\n", __func__); - bfee->sounding = _TRUE; + bfee->sounding = true; /* Reset sounding timeout flag for the new sounding */ - bfee->bSoundingTimeout = _FALSE; + bfee->bSoundingTimeout = false; - if (_TRUE == bfee->bDeleteSounding) { - u8 res = _FALSE; + if (true == bfee->bDeleteSounding) { + u8 res = false; rtw_bf_cmd(adapter, BEAMFORMING_CTRL_END_PERIOD, &res, 1, 0); return; } @@ -793,7 +793,7 @@ static void _sounding_handler(PADAPTER adapter) /* Update MU BFee info */ for (i = 0; i < sounding->candidate_mu_bfee_cnt; i++) { bfee = &info->bfee_entry[sounding->mu_sounding_list[i]]; - bfee->sounding = _TRUE; + bfee->sounding = true; } /* Send MU NDPA */ @@ -805,9 +805,9 @@ static void _sounding_handler(PADAPTER adapter) bfee = &info->bfee_entry[sounding->mu_sounding_list[i]]; if (i == (sounding->candidate_mu_bfee_cnt - 1))/* The last STA*/ - _send_bf_report_poll(adapter, bfee->mac_addr, _TRUE); + _send_bf_report_poll(adapter, bfee->mac_addr, true); else - _send_bf_report_poll(adapter, bfee->mac_addr, _FALSE); + _send_bf_report_poll(adapter, bfee->mac_addr, false); } sounding->candidate_mu_bfee_cnt = 0; @@ -835,7 +835,7 @@ static void _sounding_force_stop(PADAPTER adapter) if ((sounding->state == SOUNDING_STATE_SU_START) || (sounding->state == SOUNDING_STATE_MU_START)) { - u8 res = _FALSE; + u8 res = false; _cancel_timer(&info->sounding_timeout_timer, &cancelled); rtw_bf_cmd(adapter, BEAMFORMING_CTRL_END_PERIOD, &res, 1, 1); return; @@ -910,7 +910,7 @@ static void _sounding_timeout_timer_handler(void *FunctionContext) RTW_ERR("%s: Set to SU SOUNDING_STATE_SOUNDING_TIMEOUT\n", __func__); /* SU BFee */ bfee = &info->bfee_entry[sounding->su_bfee_curidx]; - bfee->bSoundingTimeout = _TRUE; + bfee->bSoundingTimeout = true; RTW_WARN("%s: The BFee entry[%d] is Sounding Timeout!\n", __func__, sounding->su_bfee_curidx); } else if (SOUNDING_STATE_MU_START == sounding->state) { sounding->state = SOUNDING_STATE_SOUNDING_TIMEOUT; @@ -934,7 +934,7 @@ static struct beamformer_entry *_bfer_get_free_entry(PADAPTER adapter) for (i = 0; i < MAX_BEAMFORMER_ENTRY_NUM; i++) { bfer = &info->bfer_entry[i]; - if (bfer->used == _FALSE) + if (bfer->used == false) return bfer; } @@ -952,9 +952,9 @@ static struct beamformer_entry *_bfer_get_entry_by_addr(PADAPTER adapter, u8 *ra for (i = 0; i < MAX_BEAMFORMER_ENTRY_NUM; i++) { bfer = &info->bfer_entry[i]; - if (bfer->used == _FALSE) + if (bfer->used == false) continue; - if (_rtw_memcmp(ra, bfer->mac_addr, ETH_ALEN) == _TRUE) + if (_rtw_memcmp(ra, bfer->mac_addr, ETH_ALEN) == true) return bfer; } @@ -982,7 +982,7 @@ static struct beamformer_entry *_bfer_add_entry(PADAPTER adapter, return NULL; } - bfer->used = _TRUE; + bfer->used = true; _get_txvector_parameter(adapter, sta, &bfer->g_id, &bfer->p_aid); _rtw_memcpy(bfer->mac_addr, sta->hwaddr, ETH_ALEN); bfer->cap = bf_cap; @@ -1066,7 +1066,7 @@ static struct beamformee_entry *_bfee_get_free_entry(PADAPTER adapter) for (i = 0; i < MAX_BEAMFORMEE_ENTRY_NUM; i++) { bfee = &info->bfee_entry[i]; - if (bfee->used == _FALSE) + if (bfee->used == false) return bfee; } @@ -1084,9 +1084,9 @@ static struct beamformee_entry *_bfee_get_entry_by_addr(PADAPTER adapter, u8 *ra for (i = 0; i < MAX_BEAMFORMEE_ENTRY_NUM; i++) { bfee = &info->bfee_entry[i]; - if (bfee->used == _FALSE) + if (bfee->used == false) continue; - if (_rtw_memcmp(ra, bfee->mac_addr, ETH_ALEN) == _TRUE) + if (_rtw_memcmp(ra, bfee->mac_addr, ETH_ALEN) == true) return bfee; } @@ -1106,7 +1106,7 @@ static u8 _bfee_get_first_su_entry_idx(PADAPTER adapter, struct beamformee_entry bfee = &info->bfee_entry[i]; if (ignore && (bfee == ignore)) continue; - if (bfee->used == _FALSE) + if (bfee->used == false) continue; if ((!TEST_FLAG(bfee->cap, BEAMFORMEE_CAP_VHT_MU)) && TEST_FLAG(bfee->cap, BEAMFORMEE_CAP_VHT_SU|BEAMFORMEE_CAP_HT_EXPLICIT)) @@ -1139,7 +1139,7 @@ static u8 _bfee_get_first_mu_entry_idx(PADAPTER adapter, struct beamformee_entry bfee = &info->bfee_entry[i]; if (ignore && (bfee == ignore)) continue; - if (bfee->used == _FALSE) + if (bfee->used == false) continue; if (TEST_FLAG(bfee->cap, BEAMFORMEE_CAP_VHT_MU)) return i; @@ -1169,7 +1169,7 @@ static struct beamformee_entry *_bfee_add_entry(PADAPTER adapter, return NULL; } - bfee->used = _TRUE; + bfee->used = true; bfee->aid = sta->aid; bfee->mac_id = sta->mac_id; bfee->sound_bw = sta->bw_mode; @@ -1179,18 +1179,18 @@ static struct beamformee_entry *_bfee_add_entry(PADAPTER adapter, sta->txbf_paid = bfee->p_aid; _rtw_memcpy(bfee->mac_addr, sta->hwaddr, ETH_ALEN); - bfee->txbf = _FALSE; - bfee->sounding = _FALSE; + bfee->txbf = false; + bfee->sounding = false; bfee->sound_period = 40; - _sounding_update_min_period(adapter, bfee->sound_period, _FALSE); + _sounding_update_min_period(adapter, bfee->sound_period, false); bfee->SoundCnt = GetInitSoundCnt(bfee->sound_period, info->sounding_info.min_sounding_period); bfee->cap = bf_cap; bfee->state = BEAMFORM_ENTRY_HW_STATE_ADD_INIT; - bfee->bCandidateSoundingPeer = _FALSE; - bfee->bSoundingTimeout = _FALSE; - bfee->bDeleteSounding = _FALSE; - bfee->bApplySounding = _TRUE; + bfee->bCandidateSoundingPeer = false; + bfee->bSoundingTimeout = false; + bfee->bDeleteSounding = false; + bfee->bApplySounding = true; bfee->tx_timestamp = 0; bfee->tx_bytes = 0; @@ -1198,18 +1198,18 @@ static struct beamformee_entry *_bfee_add_entry(PADAPTER adapter, bfee->LogStatusFailCnt = 0; bfee->NumofSoundingDim = sounding_dim; bfee->comp_steering_num_of_bfer = comp_steering; - bfee->bSuspendSUCap = _FALSE; + bfee->bSuspendSUCap = false; if (TEST_FLAG(bf_cap, BEAMFORMEE_CAP_VHT_MU)) { info->beamformee_mu_cnt += 1; info->first_mu_bfee_index = _bfee_get_first_mu_entry_idx(adapter, NULL); - if (_TRUE == info->bEnableSUTxBFWorkAround) { + if (true == info->bEnableSUTxBFWorkAround) { /* When the first MU BFee added, discard SU BFee bfee's capability */ if ((info->beamformee_mu_cnt == 1) && (info->beamformee_su_cnt > 0)) { if (info->TargetSUBFee) { - info->TargetSUBFee->bSuspendSUCap = _TRUE; - info->TargetSUBFee->bDeleteSounding = _TRUE; + info->TargetSUBFee->bSuspendSUCap = true; + info->TargetSUBFee->bDeleteSounding = true; } else { RTW_ERR("%s: UNEXPECTED!! info->TargetSUBFee is NULL!", __func__); } @@ -1233,14 +1233,14 @@ static struct beamformee_entry *_bfee_add_entry(PADAPTER adapter, } else if (TEST_FLAG(bf_cap, BEAMFORMEE_CAP_VHT_SU|BEAMFORMEE_CAP_HT_EXPLICIT)) { info->beamformee_su_cnt += 1; - if (_TRUE == info->bEnableSUTxBFWorkAround) { + if (true == info->bEnableSUTxBFWorkAround) { /* Record the first SU BFee index. We only allow the first SU BFee to be sound */ if ((info->beamformee_su_cnt == 1) && (info->beamformee_mu_cnt == 0)) { info->TargetSUBFee = bfee; memset(&info->TargetCSIInfo, 0, sizeof(struct _RT_CSI_INFO)); - bfee->bSuspendSUCap = _FALSE; + bfee->bSuspendSUCap = false; } else { - bfee->bSuspendSUCap = _TRUE; + bfee->bSuspendSUCap = true; } } @@ -1273,21 +1273,21 @@ static void _bfee_remove_entry(PADAPTER adapter, struct beamformee_entry *entry) info->beamformee_mu_cnt -= 1; info->first_mu_bfee_index = _bfee_get_first_mu_entry_idx(adapter, entry); - if (_TRUE == info->bEnableSUTxBFWorkAround) { + if (true == info->bEnableSUTxBFWorkAround) { if ((info->beamformee_mu_cnt == 0) && (info->beamformee_su_cnt > 0)) { idx = _bfee_get_first_su_entry_idx(adapter, NULL); info->TargetSUBFee = &info->bfee_entry[idx]; memset(&info->TargetCSIInfo, 0, sizeof(struct _RT_CSI_INFO)); - info->TargetSUBFee->bSuspendSUCap = _FALSE; + info->TargetSUBFee->bSuspendSUCap = false; } } } else if (TEST_FLAG(entry->cap, BEAMFORMEE_CAP_VHT_SU|BEAMFORMEE_CAP_HT_EXPLICIT)) { info->beamformee_su_cnt -= 1; /* When the target SU BFee leaves, disable workaround */ - if ((_TRUE == info->bEnableSUTxBFWorkAround) + if ((true == info->bEnableSUTxBFWorkAround) && (entry == info->TargetSUBFee)) { - entry->bSuspendSUCap = _TRUE; + entry->bSuspendSUCap = true; info->TargetSUBFee = NULL; memset(&info->TargetCSIInfo, 0, sizeof(struct _RT_CSI_INFO)); rtw_bf_cmd(adapter, BEAMFORMING_CTRL_SET_CSI_REPORT, (u8*)&info->TargetCSIInfo, sizeof(struct _RT_CSI_INFO), 0); @@ -1299,7 +1299,7 @@ static void _bfee_remove_entry(PADAPTER adapter, struct beamformee_entry *entry) if (info->beamformee_su_cnt == 0) info->beamforming_cap &= ~(BEAMFORMER_CAP_VHT_SU|BEAMFORMER_CAP_HT_EXPLICIT); - _sounding_update_min_period(adapter, 0, _TRUE); + _sounding_update_min_period(adapter, 0, true); } static enum beamforming_cap _bfee_get_entry_cap_by_macid(PADAPTER adapter, u8 macid) @@ -1313,7 +1313,7 @@ static enum beamforming_cap _bfee_get_entry_cap_by_macid(PADAPTER adapter, u8 ma for (i = 0; i < MAX_BEAMFORMER_ENTRY_NUM; i++) { bfee = &info->bfee_entry[i]; - if (bfee->used == _FALSE) + if (bfee->used == false) continue; if (bfee->mac_id == macid) return bfee->cap; @@ -1356,8 +1356,8 @@ static void _beamforming_enter(PADAPTER adapter, void *p) /* The current setting does not support Beaforming */ wireless_mode = sta->wireless_mode; - if ((is_supported_ht(wireless_mode) == _FALSE) - && (is_supported_vht(wireless_mode) == _FALSE)) { + if ((is_supported_ht(wireless_mode) == false) + && (is_supported_vht(wireless_mode) == false)) { RTW_WARN("%s: Not support HT or VHT mode\n", __func__); return; } @@ -1419,7 +1419,7 @@ static void _beamforming_leave(PADAPTER adapter, u8 *ra) struct beamforming_info *info; struct beamformer_entry *bfer = NULL; struct beamformee_entry *bfee = NULL; - u8 bHwStateAddInit = _FALSE; + u8 bHwStateAddInit = false; RTW_INFO("+%s\n", __func__); @@ -1483,21 +1483,21 @@ static void _beamforming_sounding_down(PADAPTER adapter, u8 status) * old sound down event happens in the new sounding period. * 2015.12.10 */ - if (_TRUE == bfee->bSoundingTimeout) { + if (true == bfee->bSoundingTimeout) { RTW_WARN("%s: The entry[%d] is bSoundingTimeout!\n", __func__, sounding->su_bfee_curidx); - bfee->bSoundingTimeout = _FALSE; + bfee->bSoundingTimeout = false; return; } - if (_TRUE == status) { + if (true == status) { /* success */ bfee->LogStatusFailCnt = 0; info->SetHalSoundownOnDemandCnt++; rtw_hal_set_hwreg(adapter, HW_VAR_SOUNDING_STATUS, &status); - } else if (_TRUE == bfee->bDeleteSounding) { + } else if (true == bfee->bDeleteSounding) { RTW_WARN("%s: Delete entry[%d] sounding info!\n", __func__, sounding->su_bfee_curidx); rtw_hal_set_hwreg(adapter, HW_VAR_SOUNDING_STATUS, &status); - bfee->bDeleteSounding = _FALSE; + bfee->bDeleteSounding = false; } else { bfee->LogStatusFailCnt++; RTW_WARN("%s: LogStatusFailCnt=%d\n", __func__, bfee->LogStatusFailCnt); @@ -1525,8 +1525,8 @@ static void _c2h_snd_txbf(PADAPTER adapter, u8 *buf, u8 buf_len) _cancel_timer(&info->sounding_timeout_timer, &cancelled); - res = C2H_SND_TXBF_GET_SND_RESULT(buf) ? _TRUE : _FALSE; - RTW_INFO("+%s: %s\n", __func__, res==_TRUE?"Success":"Fail!"); + res = C2H_SND_TXBF_GET_SND_RESULT(buf) ? true : false; + RTW_INFO("+%s: %s\n", __func__, res==true?"Success":"Fail!"); rtw_bf_cmd(adapter, BEAMFORMING_CTRL_END_PERIOD, &res, 1, 1); } @@ -1607,7 +1607,7 @@ u32 rtw_bf_get_report_packet(PADAPTER adapter, union recv_frame *precv_frame) */ pCSIMatrix = pMIMOCtrlField + 3 + Nc; CSIMatrixLen = frame_len - 26 - 3 - Nc; - info->TargetCSIInfo.bVHT = _TRUE; + info->TargetCSIInfo.bVHT = true; } else if ((category == RTW_WLAN_CATEGORY_HT) && (action == RTW_WLAN_ACTION_HT_COMPRESS_BEAMFORMING)) { pMIMOCtrlField = pframe + 26; @@ -1622,11 +1622,11 @@ u32 rtw_bf_get_report_packet(PADAPTER adapter, union recv_frame *precv_frame) */ pCSIMatrix = pMIMOCtrlField + 6 + Nr; CSIMatrixLen = frame_len - 26 - 6 - Nr; - info->TargetCSIInfo.bVHT = _FALSE; + info->TargetCSIInfo.bVHT = false; } /* Update current CSI report info */ - if ((_TRUE == info->bEnableSUTxBFWorkAround) + if ((true == info->bEnableSUTxBFWorkAround) && (info->TargetSUBFee == bfee)) { if ((info->TargetCSIInfo.Nc != Nc) || (info->TargetCSIInfo.Nr != Nr) || (info->TargetCSIInfo.ChnlWidth != CH_W) || (info->TargetCSIInfo.Ng != Ng) || @@ -1664,7 +1664,7 @@ u8 rtw_bf_send_vht_gid_mgnt_packet(PADAPTER adapter, u8 *ra, u8 *gid, u8 *positi pmgntframe = alloc_mgtxmitframe(xmitpriv); if (!pmgntframe) - return _FALSE; + return false; /* update attribute */ attrib = &pmgntframe->attrib; @@ -1702,7 +1702,7 @@ u8 rtw_bf_send_vht_gid_mgnt_packet(PADAPTER adapter, u8 *ra, u8 *gid, u8 *positi dump_mgntframe(adapter, pmgntframe); - return _TRUE; + return true; } /* @@ -1763,7 +1763,7 @@ void rtw_bf_init(PADAPTER adapter) info->SetHalBFLeaveOnDemandCnt = 0; info->SetHalSoundownOnDemandCnt = 0; - info->bEnableSUTxBFWorkAround = _TRUE; + info->bEnableSUTxBFWorkAround = true; info->TargetSUBFee = NULL; info->sounding_running = 0; @@ -1888,7 +1888,7 @@ void rtw_bf_update_traffic(PADAPTER adapter) u8 tx_rate[MAX_BEAMFORMEE_ENTRY_NUM] = {0}; u64 tx_bytes, last_bytes; u32 time, last_timestamp; - u8 set_timer = _FALSE; + u8 set_timer = false; info = GET_BEAMFORM_INFO(adapter); @@ -1901,7 +1901,7 @@ void rtw_bf_update_traffic(PADAPTER adapter) for (i = 0; i < MAX_BEAMFORMEE_ENTRY_NUM; i++) { bfee = &info->bfee_entry[i]; - if (_FALSE == bfee->used) + if (false == bfee->used) continue; sta = rtw_get_stainfo(&adapter->stapriv, bfee->mac_addr); @@ -1932,29 +1932,29 @@ void rtw_bf_update_traffic(PADAPTER adapter) for (i = 0; i < MAX_BEAMFORMEE_ENTRY_NUM; i++) { bfee = &info->bfee_entry[i]; - if (_FALSE == bfee->used) { + if (false == bfee->used) { if (sounding_idx & BIT(i)) RTW_WARN("%s: bfee(%d) not in used but need sounding?!\n", __func__, i); continue; } if (sounding_idx & BIT(i)) { - if (_FALSE == bfee->bApplySounding) { - bfee->bApplySounding = _TRUE; + if (false == bfee->bApplySounding) { + bfee->bApplySounding = true; bfee->SoundCnt = 0; - set_timer = _TRUE; + set_timer = true; } } else { - if (_TRUE == bfee->bApplySounding) { - bfee->bApplySounding = _FALSE; - bfee->bDeleteSounding = _TRUE; + if (true == bfee->bApplySounding) { + bfee->bApplySounding = false; + bfee->bDeleteSounding = true; bfee->SoundCnt = 0; - set_timer = _TRUE; + set_timer = true; } } } - if (_TRUE == set_timer) { + if (true == set_timer) { if (SOUNDING_STATE_NONE == info->sounding_info.state) { info->sounding_info.state = SOUNDING_STATE_INIT; _set_timer(&info->sounding_timer, 0); @@ -2004,7 +2004,7 @@ struct beamforming_entry *beamforming_get_free_entry(struct mlme_priv *pmlmepriv struct beamforming_info *pBeamInfo = GET_BEAMFORM_INFO(pmlmepriv); for (i = 0; i < BEAMFORMING_ENTRY_NUM; i++) { - if (pBeamInfo->beamforming_entry[i].bUsed == _FALSE) { + if (pBeamInfo->beamforming_entry[i].bUsed == false) { *idx = i; return &(pBeamInfo->beamforming_entry[i]); } @@ -2020,7 +2020,7 @@ struct beamforming_entry *beamforming_add_entry(PADAPTER adapter, u8 *ra, u16 ai struct beamforming_entry *pEntry = beamforming_get_free_entry(pmlmepriv, idx); if (pEntry != NULL) { - pEntry->bUsed = _TRUE; + pEntry->bUsed = true; pEntry->aid = aid; pEntry->mac_id = mac_id; pEntry->sound_bw = bw; @@ -2038,7 +2038,7 @@ struct beamforming_entry *beamforming_add_entry(PADAPTER adapter, u8 *ra, u16 ai pEntry->g_id = 0; } _rtw_memcpy(pEntry->mac_addr, ra, ETH_ALEN); - pEntry->bSound = _FALSE; + pEntry->bSound = false; /* 3 TODO SW/FW sound period */ pEntry->sound_period = 200; @@ -2063,12 +2063,12 @@ bool beamforming_remove_entry(struct mlme_priv *pmlmepriv, u8 *ra, u8 *idx) struct beamforming_entry *pEntry = beamforming_get_entry_by_addr(pmlmepriv, ra, idx); if (pEntry != NULL) { - pEntry->bUsed = _FALSE; + pEntry->bUsed = false; pEntry->beamforming_entry_cap = BEAMFORMING_CAP_NONE; pEntry->beamforming_entry_state = BEAMFORMING_ENTRY_STATE_UNINITIALIZE; - return _TRUE; + return true; } else - return _FALSE; + return false; } /* Used for BeamformingStart_V1 */ @@ -2090,7 +2090,7 @@ void beamforming_dym_ndpa_rate(PADAPTER adapter) void beamforming_dym_period(PADAPTER Adapter) { u8 Idx; - bool bChangePeriod = _FALSE; + bool bChangePeriod = false; u16 SoundPeriod_SW, SoundPeriod_FW; PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter); struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(Adapter); @@ -2119,7 +2119,7 @@ void beamforming_dym_period(PADAPTER Adapter) if (pSoundInfo->sound_mode == SOUNDING_FW_VHT_TIMER || pSoundInfo->sound_mode == SOUNDING_FW_HT_TIMER) { if (pBeamformEntry->sound_period != SoundPeriod_FW) { pBeamformEntry->sound_period = SoundPeriod_FW; - bChangePeriod = _TRUE; /* Only FW sounding need to send H2C packet to change sound period. */ + bChangePeriod = true; /* Only FW sounding need to send H2C packet to change sound period. */ } } else if (pBeamformEntry->sound_period != SoundPeriod_SW) pBeamformEntry->sound_period = SoundPeriod_SW; @@ -2152,7 +2152,7 @@ bool issue_ht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, CHANNEL_WIDTH bw, u8 qidx pmgntframe = alloc_mgtxmitframe(pxmitpriv); if (pmgntframe == NULL) - return _FALSE; + return false; /*update attribute*/ pattrib = &pmgntframe->attrib; @@ -2205,7 +2205,7 @@ bool issue_ht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, CHANNEL_WIDTH bw, u8 qidx dump_mgntframe(Adapter, pmgntframe); - return _TRUE; + return true; } @@ -2226,7 +2226,7 @@ bool issue_ht_ndpa_packet(PADAPTER Adapter, u8 *ra, CHANNEL_WIDTH bw, u8 qidx) pmgntframe = alloc_mgtxmitframe(pxmitpriv); if (pmgntframe == NULL) - return _FALSE; + return false; /*update attribute*/ pattrib = &pmgntframe->attrib; @@ -2281,7 +2281,7 @@ bool issue_ht_ndpa_packet(PADAPTER Adapter, u8 *ra, CHANNEL_WIDTH bw, u8 qidx) dump_mgntframe(Adapter, pmgntframe); - return _TRUE; + return true; } bool beamforming_send_ht_ndpa_packet(PADAPTER Adapter, u8 *ra, CHANNEL_WIDTH bw, u8 qidx) @@ -2315,7 +2315,7 @@ bool issue_vht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, CHANNEL_WIDTH b if (pmgntframe == NULL) { RTW_INFO("%s, alloc mgnt frame fail\n", __func__); - return _FALSE; + return false; } /*update attribute*/ @@ -2379,7 +2379,7 @@ bool issue_vht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, CHANNEL_WIDTH b dump_mgntframe(Adapter, pmgntframe); - return _TRUE; + return true; } bool issue_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, CHANNEL_WIDTH bw, u8 qidx) @@ -2400,7 +2400,7 @@ bool issue_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, CHANNEL_WIDTH bw, pmgntframe = alloc_mgtxmitframe(pxmitpriv); if (pmgntframe == NULL) - return _FALSE; + return false; /*update attribute*/ pattrib = &pmgntframe->attrib; @@ -2465,7 +2465,7 @@ bool issue_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, CHANNEL_WIDTH bw, dump_mgntframe(Adapter, pmgntframe); - return _TRUE; + return true; } bool beamforming_send_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, CHANNEL_WIDTH bw, u8 qidx) @@ -2475,12 +2475,12 @@ bool beamforming_send_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, CHANNEL bool beamfomring_bSounding(struct beamforming_info *pBeamInfo) { - bool bSounding = _FALSE; + bool bSounding = false; if ((beamforming_get_beamform_cap(pBeamInfo) & BEAMFORMER_CAP) == 0) - bSounding = _FALSE; + bSounding = false; else - bSounding = _TRUE; + bSounding = true; return bSounding; } @@ -2492,7 +2492,7 @@ u8 beamforming_sounding_idx(struct beamforming_info *pBeamInfo) for (i = 0; i < BEAMFORMING_ENTRY_NUM; i++) { if (pBeamInfo->beamforming_entry[i].bUsed && - (_FALSE == pBeamInfo->beamforming_entry[i].bSound)) { + (false == pBeamInfo->beamforming_entry[i].bSound)) { idx = i; break; } @@ -2548,11 +2548,11 @@ bool beamforming_select_beam_entry(struct beamforming_info *pBeamInfo) pSoundInfo->sound_mode = SOUNDING_STOP_All_TIMER; if (SOUNDING_STOP_All_TIMER == pSoundInfo->sound_mode) - return _FALSE; + return false; else { pSoundInfo->sound_bw = beamforming_sounding_bw(pBeamInfo, pSoundInfo->sound_mode, pSoundInfo->sound_idx); pSoundInfo->sound_period = beamforming_sounding_time(pBeamInfo, pSoundInfo->sound_mode, pSoundInfo->sound_idx); - return _TRUE; + return true; } } @@ -2560,21 +2560,21 @@ bool beamforming_start_fw(PADAPTER adapter, u8 idx) { u8 *RA = NULL; struct beamforming_entry *pEntry; - bool ret = _TRUE; + bool ret = true; struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); struct beamforming_info *pBeamInfo = GET_BEAMFORM_INFO(pmlmepriv); pEntry = &(pBeamInfo->beamforming_entry[idx]); - if (pEntry->bUsed == _FALSE) { + if (pEntry->bUsed == false) { RTW_INFO("Skip Beamforming, no entry for Idx =%d\n", idx); - return _FALSE; + return false; } pEntry->beamforming_entry_state = BEAMFORMING_ENTRY_STATE_PROGRESSING; - pEntry->bSound = _TRUE; + pEntry->bSound = true; rtw_hal_set_hwreg(adapter, HW_VAR_SOUNDING_FW_NDPA, (u8 *)&idx); - return _TRUE; + return true; } void beamforming_end_fw(PADAPTER adapter) @@ -2588,7 +2588,7 @@ void beamforming_end_fw(PADAPTER adapter) bool beamforming_start_period(PADAPTER adapter) { - bool ret = _TRUE; + bool ret = true; struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); struct beamforming_info *pBeamInfo = GET_BEAMFORM_INFO(pmlmepriv); struct sounding_info *pSoundInfo = &(pBeamInfo->sounding_info); @@ -2600,7 +2600,7 @@ bool beamforming_start_period(PADAPTER adapter) if (pSoundInfo->sound_mode == SOUNDING_FW_VHT_TIMER || pSoundInfo->sound_mode == SOUNDING_FW_HT_TIMER) ret = beamforming_start_fw(adapter, pSoundInfo->sound_idx); else - ret = _FALSE; + ret = false; RTW_INFO("%s Idx %d Mode %d BW %d Period %d\n", __func__, pSoundInfo->sound_idx, pSoundInfo->sound_mode, pSoundInfo->sound_bw, pSoundInfo->sound_period); @@ -2623,19 +2623,19 @@ void beamforming_end_period(PADAPTER adapter) void beamforming_notify(PADAPTER adapter) { - bool bSounding = _FALSE; + bool bSounding = false; struct beamforming_info *pBeamInfo = GET_BEAMFORM_INFO(&(adapter->mlmepriv)); bSounding = beamfomring_bSounding(pBeamInfo); if (pBeamInfo->beamforming_state == BEAMFORMING_STATE_IDLE) { if (bSounding) { - if (beamforming_start_period(adapter) == _TRUE) + if (beamforming_start_period(adapter) == true) pBeamInfo->beamforming_state = BEAMFORMING_STATE_START; } } else if (pBeamInfo->beamforming_state == BEAMFORMING_STATE_START) { if (bSounding) { - if (beamforming_start_period(adapter) == _FALSE) + if (beamforming_start_period(adapter) == false) pBeamInfo->beamforming_state = BEAMFORMING_STATE_END; } else { beamforming_end_period(adapter); @@ -2643,7 +2643,7 @@ void beamforming_notify(PADAPTER adapter) } } else if (pBeamInfo->beamforming_state == BEAMFORMING_STATE_END) { if (bSounding) { - if (beamforming_start_period(adapter) == _TRUE) + if (beamforming_start_period(adapter) == true) pBeamInfo->beamforming_state = BEAMFORMING_STATE_START; } } else @@ -2668,7 +2668,7 @@ bool beamforming_init_entry(PADAPTER adapter, struct sta_info *psta, u8 *idx) /* The current setting does not support Beaforming */ if (0 == phtpriv->beamform_cap) { RTW_INFO("The configuration disabled Beamforming! Skip...\n"); - return _FALSE; + return false; } aid = psta->aid; @@ -2692,7 +2692,7 @@ bool beamforming_init_entry(PADAPTER adapter, struct sta_info *psta, u8 *idx) beamform_cap = (BEAMFORMING_CAP)(beamform_cap | BEAMFORMER_CAP_HT_EXPLICIT); if (beamform_cap == BEAMFORMING_CAP_NONE) - return _FALSE; + return false; RTW_INFO("Beamforming Config Capability = 0x%02X\n", beamform_cap); @@ -2700,7 +2700,7 @@ bool beamforming_init_entry(PADAPTER adapter, struct sta_info *psta, u8 *idx) if (pBeamformEntry == NULL) { pBeamformEntry = beamforming_add_entry(adapter, ra, aid, mac_id, bw, beamform_cap, idx); if (pBeamformEntry == NULL) - return _FALSE; + return false; else pBeamformEntry->beamforming_entry_state = BEAMFORMING_ENTRY_STATE_INITIALIZEING; } else { @@ -2708,7 +2708,7 @@ bool beamforming_init_entry(PADAPTER adapter, struct sta_info *psta, u8 *idx) if (pBeamformEntry->beamforming_entry_state != BEAMFORMING_ENTRY_STATE_INITIALIZED && pBeamformEntry->beamforming_entry_state != BEAMFORMING_ENTRY_STATE_PROGRESSED) { RTW_INFO("Error State of Beamforming"); - return _FALSE; + return false; } else pBeamformEntry->beamforming_entry_state = BEAMFORMING_ENTRY_STATE_INITIALIZEING; } @@ -2719,7 +2719,7 @@ bool beamforming_init_entry(PADAPTER adapter, struct sta_info *psta, u8 *idx) RTW_INFO("%s Idx %d\n", __func__, *idx); } else - return _FALSE; + return false; return _SUCCESS; } @@ -2729,7 +2729,7 @@ void beamforming_deinit_entry(PADAPTER adapter, u8 *ra) u8 idx = 0; struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); - if (beamforming_remove_entry(pmlmepriv, ra, &idx) == _TRUE) + if (beamforming_remove_entry(pmlmepriv, ra, &idx) == true) rtw_hal_set_hwreg(adapter, HW_VAR_SOUNDING_LEAVE, (u8 *)&idx); RTW_INFO("%s Idx %d\n", __func__, idx); @@ -2742,8 +2742,8 @@ void beamforming_reset(PADAPTER adapter) struct beamforming_info *pBeamInfo = GET_BEAMFORM_INFO(pmlmepriv); for (idx = 0; idx < BEAMFORMING_ENTRY_NUM; idx++) { - if (pBeamInfo->beamforming_entry[idx].bUsed == _TRUE) { - pBeamInfo->beamforming_entry[idx].bUsed = _FALSE; + if (pBeamInfo->beamforming_entry[idx].bUsed == true) { + pBeamInfo->beamforming_entry[idx].bUsed = false; pBeamInfo->beamforming_entry[idx].beamforming_entry_cap = BEAMFORMING_CAP_NONE; pBeamInfo->beamforming_entry[idx].beamforming_entry_state = BEAMFORMING_ENTRY_STATE_UNINITIALIZE; rtw_hal_set_hwreg(adapter, HW_VAR_SOUNDING_LEAVE, (u8 *)&idx); @@ -2759,7 +2759,7 @@ void beamforming_sounding_fail(PADAPTER Adapter) struct beamforming_info *pBeamInfo = GET_BEAMFORM_INFO(pmlmepriv); struct beamforming_entry *pEntry = &(pBeamInfo->beamforming_entry[pBeamInfo->beamforming_cur_idx]); - pEntry->bSound = _FALSE; + pEntry->bSound = false; rtw_hal_set_hwreg(Adapter, HW_VAR_SOUNDING_FW_NDPA, (u8 *)&pBeamInfo->beamforming_cur_idx); beamforming_deinit_entry(Adapter, pEntry->mac_addr); } @@ -2778,7 +2778,7 @@ void beamforming_check_sounding_success(PADAPTER Adapter, bool status) } if (pEntry->LogStatusFailCnt > 20) { RTW_INFO("%s LogStatusFailCnt > 20, Stop SOUNDING\n", __func__); - /* pEntry->bSound = _FALSE; */ + /* pEntry->bSound = false; */ /* rtw_hal_set_hwreg(Adapter, HW_VAR_SOUNDING_FW_NDPA, (u8 *)&pBeamInfo->beamforming_cur_idx); */ /* beamforming_deinit_entry(Adapter, pEntry->mac_addr); */ beamforming_wk_cmd(Adapter, BEAMFORMING_CTRL_SOUNDING_FAIL, NULL, 0, 1); @@ -2808,8 +2808,8 @@ void beamforming_leave(PADAPTER adapter, u8 *ra) BEAMFORMING_CAP beamforming_get_beamform_cap(struct beamforming_info *pBeamInfo) { u8 i; - bool bSelfBeamformer = _FALSE; - bool bSelfBeamformee = _FALSE; + bool bSelfBeamformer = false; + bool bSelfBeamformee = false; struct beamforming_entry beamforming_entry; BEAMFORMING_CAP beamform_cap = BEAMFORMING_CAP_NONE; @@ -2819,10 +2819,10 @@ BEAMFORMING_CAP beamforming_get_beamform_cap(struct beamforming_info *pBeamInfo) if (beamforming_entry.bUsed) { if ((beamforming_entry.beamforming_entry_cap & BEAMFORMEE_CAP_VHT_SU) || (beamforming_entry.beamforming_entry_cap & BEAMFORMEE_CAP_HT_EXPLICIT)) - bSelfBeamformee = _TRUE; + bSelfBeamformee = true; if ((beamforming_entry.beamforming_entry_cap & BEAMFORMER_CAP_VHT_SU) || (beamforming_entry.beamforming_entry_cap & BEAMFORMER_CAP_HT_EXPLICIT)) - bSelfBeamformer = _TRUE; + bSelfBeamformer = true; } if (bSelfBeamformer && bSelfBeamformee) @@ -2880,19 +2880,19 @@ u32 rtw_beamforming_get_report_frame(PADAPTER Adapter, union recv_frame *precv_ /*RTW_INFO("%s MacId %d offset=%d\n", __func__, pBeamformEntry->mac_id, offset);*/ - if (_rtw_memcmp(pBeamformEntry->PreCsiReport + offset, pframe + offset, frame_len - offset) == _FALSE) + if (_rtw_memcmp(pBeamformEntry->PreCsiReport + offset, pframe + offset, frame_len - offset) == false) pBeamformEntry->DefaultCsiCnt = 0; else pBeamformEntry->DefaultCsiCnt++; _rtw_memcpy(&pBeamformEntry->PreCsiReport, pframe, frame_len); - pBeamformEntry->bDefaultCSI = _FALSE; + pBeamformEntry->bDefaultCSI = false; if (pBeamformEntry->DefaultCsiCnt > 20) - pBeamformEntry->bDefaultCSI = _TRUE; + pBeamformEntry->bDefaultCSI = true; else - pBeamformEntry->bDefaultCSI = _FALSE; + pBeamformEntry->bDefaultCSI = false; #endif return ret; } @@ -2914,7 +2914,7 @@ void rtw_beamforming_get_ndpa_frame(PADAPTER Adapter, union recv_frame *precv_f /*RTW_INFO("rtw_beamforming_get_ndpa_frame\n");*/ - if (IS_HARDWARE_TYPE_8812(Adapter) == _FALSE) + if (IS_HARDWARE_TYPE_8812(Adapter) == false) return; else if (get_frame_sub_type(pframe) != WIFI_NDPA) return; diff --git a/core/rtw_btcoex.c b/core/rtw_btcoex.c index 995a3b7..3b59046 100644 --- a/core/rtw_btcoex.c +++ b/core/rtw_btcoex.c @@ -49,7 +49,7 @@ void rtw_btcoex_IpsNotify(PADAPTER padapter, u8 type) PHAL_DATA_TYPE pHalData; pHalData = GET_HAL_DATA(padapter); - if (_FALSE == pHalData->EEPROMBluetoothCoexist) + if (false == pHalData->EEPROMBluetoothCoexist) return; hal_btcoex_IpsNotify(padapter, type); @@ -60,7 +60,7 @@ void rtw_btcoex_LpsNotify(PADAPTER padapter, u8 type) PHAL_DATA_TYPE pHalData; pHalData = GET_HAL_DATA(padapter); - if (_FALSE == pHalData->EEPROMBluetoothCoexist) + if (false == pHalData->EEPROMBluetoothCoexist) return; hal_btcoex_LpsNotify(padapter, type); @@ -75,10 +75,10 @@ void rtw_btcoex_ScanNotify(PADAPTER padapter, u8 type) #endif /* CONFIG_BT_COEXIST_SOCKET_TRX */ pHalData = GET_HAL_DATA(padapter); - if (_FALSE == pHalData->EEPROMBluetoothCoexist) + if (false == pHalData->EEPROMBluetoothCoexist) return; - if (_FALSE == type) { + if (false == type) { #ifdef CONFIG_CONCURRENT_MODE if (rtw_mi_buddy_check_fwstate(padapter, WIFI_SITE_MONITOR)) return; @@ -102,11 +102,11 @@ void rtw_btcoex_ConnectNotify(PADAPTER padapter, u8 action) PHAL_DATA_TYPE pHalData; pHalData = GET_HAL_DATA(padapter); - if (_FALSE == pHalData->EEPROMBluetoothCoexist) + if (false == pHalData->EEPROMBluetoothCoexist) return; #ifdef DBG_CONFIG_ERROR_RESET - if (_TRUE == rtw_hal_sreset_inprogress(padapter)) { + if (true == rtw_hal_sreset_inprogress(padapter)) { RTW_INFO(FUNC_ADPT_FMT ": [BTCoex] under reset, skip notify!\n", FUNC_ADPT_ARG(padapter)); return; @@ -114,7 +114,7 @@ void rtw_btcoex_ConnectNotify(PADAPTER padapter, u8 action) #endif /* DBG_CONFIG_ERROR_RESET */ #ifdef CONFIG_CONCURRENT_MODE - if (_FALSE == action) { + if (false == action) { if (rtw_mi_buddy_check_fwstate(padapter, WIFI_UNDER_LINKING)) return; } @@ -128,11 +128,11 @@ void rtw_btcoex_MediaStatusNotify(PADAPTER padapter, u8 mediaStatus) PHAL_DATA_TYPE pHalData; pHalData = GET_HAL_DATA(padapter); - if (_FALSE == pHalData->EEPROMBluetoothCoexist) + if (false == pHalData->EEPROMBluetoothCoexist) return; #ifdef DBG_CONFIG_ERROR_RESET - if (_TRUE == rtw_hal_sreset_inprogress(padapter)) { + if (true == rtw_hal_sreset_inprogress(padapter)) { RTW_INFO(FUNC_ADPT_FMT ": [BTCoex] under reset, skip notify!\n", FUNC_ADPT_ARG(padapter)); return; @@ -147,7 +147,7 @@ void rtw_btcoex_MediaStatusNotify(PADAPTER padapter, u8 mediaStatus) #endif /* CONFIG_CONCURRENT_MODE */ if ((RT_MEDIA_CONNECT == mediaStatus) - && (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == _TRUE)) + && (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true)) rtw_hal_set_hwreg(padapter, HW_VAR_DL_RSVD_PAGE, NULL); hal_btcoex_MediaStatusNotify(padapter, mediaStatus); @@ -158,7 +158,7 @@ void rtw_btcoex_SpecialPacketNotify(PADAPTER padapter, u8 pktType) PHAL_DATA_TYPE pHalData; pHalData = GET_HAL_DATA(padapter); - if (_FALSE == pHalData->EEPROMBluetoothCoexist) + if (false == pHalData->EEPROMBluetoothCoexist) return; hal_btcoex_SpecialPacketNotify(padapter, pktType); @@ -169,7 +169,7 @@ void rtw_btcoex_IQKNotify(PADAPTER padapter, u8 state) PHAL_DATA_TYPE pHalData; pHalData = GET_HAL_DATA(padapter); - if (_FALSE == pHalData->EEPROMBluetoothCoexist) + if (false == pHalData->EEPROMBluetoothCoexist) return; hal_btcoex_IQKNotify(padapter, state); @@ -180,7 +180,7 @@ void rtw_btcoex_BtInfoNotify(PADAPTER padapter, u8 length, u8 *tmpBuf) PHAL_DATA_TYPE pHalData; pHalData = GET_HAL_DATA(padapter); - if (_FALSE == pHalData->EEPROMBluetoothCoexist) + if (false == pHalData->EEPROMBluetoothCoexist) return; hal_btcoex_BtInfoNotify(padapter, length, tmpBuf); @@ -191,7 +191,7 @@ void rtw_btcoex_BtMpRptNotify(PADAPTER padapter, u8 length, u8 *tmpBuf) PHAL_DATA_TYPE pHalData; pHalData = GET_HAL_DATA(padapter); - if (_FALSE == pHalData->EEPROMBluetoothCoexist) + if (false == pHalData->EEPROMBluetoothCoexist) return; if (padapter->registrypriv.mp_mode == 1) @@ -205,7 +205,7 @@ void rtw_btcoex_SuspendNotify(PADAPTER padapter, u8 state) PHAL_DATA_TYPE pHalData; pHalData = GET_HAL_DATA(padapter); - if (_FALSE == pHalData->EEPROMBluetoothCoexist) + if (false == pHalData->EEPROMBluetoothCoexist) return; hal_btcoex_SuspendNotify(padapter, state); @@ -217,10 +217,10 @@ void rtw_btcoex_HaltNotify(PADAPTER padapter) u8 do_halt = 1; pHalData = GET_HAL_DATA(padapter); - if (_FALSE == pHalData->EEPROMBluetoothCoexist) + if (false == pHalData->EEPROMBluetoothCoexist) do_halt = 0; - if (_FALSE == padapter->bup) { + if (false == padapter->bup) { RTW_INFO(FUNC_ADPT_FMT ": bup=%d Skip!\n", FUNC_ADPT_ARG(padapter), padapter->bup); do_halt = 0; @@ -261,7 +261,7 @@ void rtw_btcoex_Handler(PADAPTER padapter) pHalData = GET_HAL_DATA(padapter); - if (_FALSE == pHalData->EEPROMBluetoothCoexist) + if (false == pHalData->EEPROMBluetoothCoexist) return; hal_btcoex_Hanlder(padapter); @@ -296,10 +296,10 @@ u32 rtw_btcoex_GetAMPDUSize(PADAPTER padapter) void rtw_btcoex_SetManualControl(PADAPTER padapter, u8 manual) { - if (_TRUE == manual) - hal_btcoex_SetManualControl(padapter, _TRUE); + if (true == manual) + hal_btcoex_SetManualControl(padapter, true); else - hal_btcoex_SetManualControl(padapter, _FALSE); + hal_btcoex_SetManualControl(padapter, false); } u8 rtw_btcoex_1Ant(PADAPTER padapter) @@ -398,7 +398,7 @@ void rtw_btcoex_LPS_Enter(PADAPTER padapter) pwrpriv = adapter_to_pwrctl(padapter); - pwrpriv->bpower_saving = _TRUE; + pwrpriv->bpower_saving = true; lpsVal = rtw_btcoex_LpsVal(padapter); rtw_set_ps_mode(padapter, PS_MODE_MIN, 0, lpsVal, "BTCOEX"); } @@ -413,7 +413,7 @@ void rtw_btcoex_LPS_Leave(PADAPTER padapter) if (pwrpriv->pwr_mode != PS_MODE_ACTIVE) { rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0, "BTCOEX"); LPS_RF_ON_check(padapter, 100); - pwrpriv->bpower_saving = _FALSE; + pwrpriv->bpower_saving = false; } } @@ -464,7 +464,7 @@ u8 rtw_btcoex_get_pg_rfe_type(PADAPTER padapter) u8 rtw_btcoex_is_tfbga_package_type(PADAPTER padapter) { - return _FALSE; + return false; } u8 rtw_btcoex_get_ant_div_cfg(PADAPTER padapter) @@ -473,7 +473,7 @@ u8 rtw_btcoex_get_ant_div_cfg(PADAPTER padapter) pHalData = GET_HAL_DATA(padapter); - return (pHalData->AntDivCfg == 0) ? _FALSE : _TRUE; + return (pHalData->AntDivCfg == 0) ? false : true; } /* ================================================== @@ -550,7 +550,7 @@ u8 rtw_btcoex_send_event_to_BT(_adapter *padapter, u8 status, u8 event_code, u8 /* total tx event length + EventCode length + sizeof(length) */ tx_event_length = pEvent->Length + 2; - status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE); + status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false); return status; } @@ -622,7 +622,7 @@ u8 rtw_btcoex_parse_BT_info_notify_cmd(_adapter *padapter, u8 *pcmd, u16 cmdlen) /* total tx event length + EventCode length + sizeof(length) */ tx_event_length = pEvent->Length + 2; - status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE); + status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false); return status; /* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ @@ -670,7 +670,7 @@ u8 rtw_btcoex_parse_BT_patch_ver_info_cmd(_adapter *padapter, u8 *pcmd, u16 cmdl /* total tx event length + EventCode length + sizeof(length) */ tx_event_length = pEvent->Length + 2; - status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE); + status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false); return status; /* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ } @@ -716,7 +716,7 @@ u8 rtw_btcoex_parse_HCI_Ver_notify_cmd(_adapter *padapter, u8 *pcmd, u16 cmdlen) /* total tx event length + EventCode length + sizeof(length) */ tx_event_length = pEvent->Length + 2; - status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE); + status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false); return status; /* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ } @@ -758,7 +758,7 @@ u8 rtw_btcoex_parse_WIFI_scan_notify_cmd(_adapter *padapter, u8 *pcmd, u16 cmdle /* total tx event length + EventCode length + sizeof(length) */ tx_event_length = pEvent->Length + 2; - status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE); + status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false); return status; /* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ } @@ -787,8 +787,8 @@ u8 rtw_btcoex_parse_HCI_link_status_notify_cmd(_adapter *padapter, u8 *pcmd, u16 RTW_INFO("BTLinkStatusNotify\n"); /* Current only RTL8723 support this command. */ - /* pBtMgnt->bSupportProfile = TRUE; */ - pBtMgnt->bSupportProfile = _FALSE; + /* pBtMgnt->bSupportProfile = true; */ + pBtMgnt->bSupportProfile = false; pBtMgnt->ExtConfig.NumberOfACL = 0; pBtMgnt->ExtConfig.NumberOfSCO = 0; @@ -861,7 +861,7 @@ u8 rtw_btcoex_parse_HCI_link_status_notify_cmd(_adapter *padapter, u8 *pcmd, u16 /* total tx event length + EventCode length + sizeof(length) */ tx_event_length = pEvent->Length + 2; - status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE); + status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false); return status; /* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ } @@ -897,7 +897,7 @@ u8 rtw_btcoex_parse_HCI_BT_coex_notify_cmd(_adapter *padapter, u8 *pcmd, u16 cmd /* total tx event length + EventCode length + sizeof(length) */ tx_event_length = pEvent->Length + 2; - status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE); + status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false); return status; /* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ } @@ -970,7 +970,7 @@ u8 rtw_btcoex_parse_HCI_BT_operation_notify_cmd(_adapter *padapter, u8 *pcmd, u1 /* total tx event length + EventCode length + sizeof(length) */ tx_event_length = pEvent->Length + 2; - status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE); + status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false); return status; /* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ } @@ -1004,7 +1004,7 @@ u8 rtw_btcoex_parse_BT_AFH_MAP_notify_cmd(_adapter *padapter, u8 *pcmd, u16 cmdl /* total tx event length + EventCode length + sizeof(length) */ tx_event_length = pEvent->Length + 2; - status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE); + status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false); return status; /* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ } @@ -1039,7 +1039,7 @@ u8 rtw_btcoex_parse_BT_register_val_notify_cmd(_adapter *padapter, u8 *pcmd, u16 /* total tx event length + EventCode length + sizeof(length) */ tx_event_length = pEvent->Length + 2; - status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE); + status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false); return status; /* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ } @@ -1073,7 +1073,7 @@ u8 rtw_btcoex_parse_HCI_BT_abnormal_notify_cmd(_adapter *padapter, u8 *pcmd, u16 /* total tx event length + EventCode length + sizeof(length) */ tx_event_length = pEvent->Length + 2; - status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE); + status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false); return status; /* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ } @@ -1107,7 +1107,7 @@ u8 rtw_btcoex_parse_HCI_query_RF_status_cmd(_adapter *padapter, u8 *pcmd, u16 cm /* total tx event length + EventCode length + sizeof(length) */ tx_event_length = pEvent->Length + 2; - status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE); + status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false); return status; /* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ } @@ -1213,21 +1213,21 @@ u16 rtw_btcoex_parse_recv_data(u8 *msg, u8 msg_size) u8 cmp_msg6[32] = invite_rsp; u8 res = OTHER; - if (_rtw_memcmp(cmp_msg1, msg, msg_size) == _TRUE) { + if (_rtw_memcmp(cmp_msg1, msg, msg_size) == true) { /*RTW_INFO("%s, msg:%s\n",__func__,msg);*/ res = RX_ATTEND_ACK; - } else if (_rtw_memcmp(cmp_msg2, msg, msg_size) == _TRUE) { + } else if (_rtw_memcmp(cmp_msg2, msg, msg_size) == true) { /*RTW_INFO("%s, msg:%s\n",__func__,msg);*/ res = RX_LEAVE_ACK; - } else if (_rtw_memcmp(cmp_msg3, msg, msg_size) == _TRUE) { + } else if (_rtw_memcmp(cmp_msg3, msg, msg_size) == true) { /*RTW_INFO("%s, msg:%s\n",__func__,msg);*/ res = RX_BT_LEAVE; - } else if (_rtw_memcmp(cmp_msg4, msg, msg_size) == _TRUE) { + } else if (_rtw_memcmp(cmp_msg4, msg, msg_size) == true) { /*RTW_INFO("%s, msg:%s\n",__func__,msg);*/ res = RX_INVITE_REQ; - } else if (_rtw_memcmp(cmp_msg5, msg, msg_size) == _TRUE) + } else if (_rtw_memcmp(cmp_msg5, msg, msg_size) == true) res = RX_ATTEND_REQ; - else if (_rtw_memcmp(cmp_msg6, msg, msg_size) == _TRUE) + else if (_rtw_memcmp(cmp_msg6, msg, msg_size) == true) res = RX_INVITE_RSP; else { /*RTW_INFO("%s, %s\n", __func__, msg);*/ @@ -1279,50 +1279,50 @@ void rtw_btcoex_recvmsgbysocket(void *data) switch (parse_res) { case RX_ATTEND_ACK: /* attend ack */ - pcoex_info->BT_attend = _TRUE; + pcoex_info->BT_attend = true; RTW_INFO("RX_ATTEND_ACK!,sock_open:%d, BT_attend:%d\n", pcoex_info->sock_open, pcoex_info->BT_attend); rtw_btcoex_pta_off_on_notify(pbtcoexadapter, pcoex_info->BT_attend); break; case RX_ATTEND_REQ: - pcoex_info->BT_attend = _TRUE; + pcoex_info->BT_attend = true; RTW_INFO("RX_BT_ATTEND_REQ!,sock_open:%d, BT_attend:%d\n", pcoex_info->sock_open, pcoex_info->BT_attend); - rtw_btcoex_sendmsgbysocket(pbtcoexadapter, attend_ack, sizeof(attend_ack), _FALSE); + rtw_btcoex_sendmsgbysocket(pbtcoexadapter, attend_ack, sizeof(attend_ack), false); rtw_btcoex_pta_off_on_notify(pbtcoexadapter, pcoex_info->BT_attend); break; case RX_INVITE_REQ: /* invite req from BT */ - pcoex_info->BT_attend = _TRUE; + pcoex_info->BT_attend = true; RTW_INFO("RX_INVITE_REQ!,sock_open:%d, BT_attend:%d\n", pcoex_info->sock_open, pcoex_info->BT_attend); - rtw_btcoex_sendmsgbysocket(pbtcoexadapter, invite_rsp, sizeof(invite_rsp), _FALSE); + rtw_btcoex_sendmsgbysocket(pbtcoexadapter, invite_rsp, sizeof(invite_rsp), false); rtw_btcoex_pta_off_on_notify(pbtcoexadapter, pcoex_info->BT_attend); break; case RX_INVITE_RSP: /*invite rsp*/ - pcoex_info->BT_attend = _TRUE; + pcoex_info->BT_attend = true; RTW_INFO("RX_INVITE_RSP!,sock_open:%d, BT_attend:%d\n", pcoex_info->sock_open, pcoex_info->BT_attend); rtw_btcoex_pta_off_on_notify(pbtcoexadapter, pcoex_info->BT_attend); break; case RX_LEAVE_ACK: /* mean BT know wifi will leave */ - pcoex_info->BT_attend = _FALSE; + pcoex_info->BT_attend = false; RTW_INFO("RX_LEAVE_ACK!,sock_open:%d, BT_attend:%d\n", pcoex_info->sock_open, pcoex_info->BT_attend); rtw_btcoex_pta_off_on_notify(pbtcoexadapter, pcoex_info->BT_attend); break; case RX_BT_LEAVE: /* BT leave */ - rtw_btcoex_sendmsgbysocket(pbtcoexadapter, leave_ack, sizeof(leave_ack), _FALSE); /* no ack */ - pcoex_info->BT_attend = _FALSE; + rtw_btcoex_sendmsgbysocket(pbtcoexadapter, leave_ack, sizeof(leave_ack), false); /* no ack */ + pcoex_info->BT_attend = false; RTW_INFO("RX_BT_LEAVE!sock_open:%d, BT_attend:%d\n", pcoex_info->sock_open, pcoex_info->BT_attend); rtw_btcoex_pta_off_on_notify(pbtcoexadapter, pcoex_info->BT_attend); break; default: - if (_TRUE == pcoex_info->BT_attend) + if (true == pcoex_info->BT_attend) rtw_btcoex_parse_hci_cmd(pbtcoexadapter, recv_data, recv_length); else RTW_INFO("ERROR!! BT is UP\n"); @@ -1363,9 +1363,9 @@ u8 rtw_btcoex_sendmsgbysocket(_adapter *padapter, u8 *msg, u8 msg_size, bool for struct iovec iov; struct bt_coex_info *pcoex_info = &padapter->coex_info; - /* RTW_INFO("%s: msg:%s, force:%s\n", __func__, msg, force == _TRUE?"TRUE":"FALSE"); */ - if (_FALSE == force) { - if (_FALSE == pcoex_info->BT_attend) { + /* RTW_INFO("%s: msg:%s, force:%s\n", __func__, msg, force == true?"true":"false"); */ + if (false == force) { + if (false == pcoex_info->BT_attend) { RTW_INFO("TX Blocked: WiFi-BT disconnected\n"); return _FAIL; } @@ -1443,12 +1443,12 @@ u8 rtw_btcoex_create_kernel_socket(_adapter *padapter) RTW_INFO("binding socket success\n"); pcoex_info->udpsock->sk->sk_data_ready = rtw_btcoex_recvmsg_init; pcoex_info->sock_open |= KERNEL_SOCKET_OK; - pcoex_info->BT_attend = _FALSE; + pcoex_info->BT_attend = false; RTW_INFO("WIFI sending attend_req\n"); - rtw_btcoex_sendmsgbysocket(padapter, attend_req, sizeof(attend_req), _TRUE); + rtw_btcoex_sendmsgbysocket(padapter, attend_req, sizeof(attend_req), true); status = _SUCCESS; } else { - pcoex_info->BT_attend = _FALSE; + pcoex_info->BT_attend = false; sock_release(pcoex_info->udpsock); /* bind fail release socket */ RTW_INFO("Error binding socket: %d\n", kernel_socket_err); status = _FAIL; @@ -1466,8 +1466,8 @@ void rtw_btcoex_close_kernel_socket(_adapter *padapter) RTW_INFO("release kernel socket\n"); sock_release(pcoex_info->udpsock); pcoex_info->sock_open &= ~(KERNEL_SOCKET_OK); - if (_TRUE == pcoex_info->BT_attend) - pcoex_info->BT_attend = _FALSE; + if (true == pcoex_info->BT_attend) + pcoex_info->BT_attend = false; RTW_INFO("sock_open:%d, BT_attend:%d\n", pcoex_info->sock_open, pcoex_info->BT_attend); } @@ -1476,10 +1476,10 @@ void rtw_btcoex_close_kernel_socket(_adapter *padapter) void rtw_btcoex_init_socket(_adapter *padapter) { - u8 is_invite = _FALSE; + u8 is_invite = false; struct bt_coex_info *pcoex_info = &padapter->coex_info; RTW_INFO("%s\n", __func__); - if (_FALSE == pcoex_info->is_exist) { + if (false == pcoex_info->is_exist) { memset(pcoex_info, 0, sizeof(struct bt_coex_info)); pcoex_info->btcoex_wq = create_workqueue("BTCOEX"); INIT_DELAYED_WORK(&pcoex_info->recvmsg_work, @@ -1487,16 +1487,16 @@ void rtw_btcoex_init_socket(_adapter *padapter) pbtcoexadapter = padapter; /* We expect BT is off if BT don't send ack to wifi */ RTW_INFO("We expect BT is off if BT send ack to wifi\n"); - rtw_btcoex_pta_off_on_notify(pbtcoexadapter, _FALSE); + rtw_btcoex_pta_off_on_notify(pbtcoexadapter, false); if (rtw_btcoex_create_kernel_socket(padapter) == _SUCCESS) - pcoex_info->is_exist = _TRUE; + pcoex_info->is_exist = true; else { - pcoex_info->is_exist = _FALSE; + pcoex_info->is_exist = false; pbtcoexadapter = NULL; } RTW_INFO("%s: pbtcoexadapter:%p, coex_info->is_exist: %s\n" - , __func__, pbtcoexadapter, pcoex_info->is_exist == _TRUE ? "TRUE" : "FALSE"); + , __func__, pbtcoexadapter, pcoex_info->is_exist == true ? "true" : "false"); } } @@ -1505,12 +1505,12 @@ void rtw_btcoex_close_socket(_adapter *padapter) struct bt_coex_info *pcoex_info = &padapter->coex_info; RTW_INFO("%s--coex_info->is_exist: %s, pcoex_info->BT_attend:%s\n" - , __func__, pcoex_info->is_exist == _TRUE ? "TRUE" : "FALSE", pcoex_info->BT_attend == _TRUE ? "TRUE" : "FALSE"); + , __func__, pcoex_info->is_exist == true ? "true" : "false", pcoex_info->BT_attend == true ? "true" : "false"); - if (_TRUE == pcoex_info->is_exist) { - if (_TRUE == pcoex_info->BT_attend) { + if (true == pcoex_info->is_exist) { + if (true == pcoex_info->BT_attend) { /*inform BT wifi leave*/ - rtw_btcoex_sendmsgbysocket(padapter, wifi_leave, sizeof(wifi_leave), _FALSE); + rtw_btcoex_sendmsgbysocket(padapter, wifi_leave, sizeof(wifi_leave), false); msleep(50); } @@ -1521,7 +1521,7 @@ void rtw_btcoex_close_socket(_adapter *padapter) rtw_btcoex_close_kernel_socket(padapter); pbtcoexadapter = NULL; - pcoex_info->is_exist = _FALSE; + pcoex_info->is_exist = false; } } @@ -1568,7 +1568,7 @@ void rtw_btcoex_SendEventExtBtCoexControl(PADAPTER padapter, u8 bNeedDbgRsp, u8 /* total tx event length + EventCode length + sizeof(length) */ tx_event_length = pEvent->Length + 2; - rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE); + rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false); } /* Porting from Windows team */ @@ -1606,7 +1606,7 @@ void rtw_btcoex_SendEventExtBtInfoControl(PADAPTER padapter, u8 dataLen, void *p /* total tx event length + EventCode length + sizeof(length) */ tx_event_length = pEvent->Length + 2; - rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE); + rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false); } void rtw_btcoex_SendScanNotify(PADAPTER padapter, u8 scanType) @@ -1642,7 +1642,7 @@ void rtw_btcoex_SendScanNotify(PADAPTER padapter, u8 scanType) /* total tx event length + EventCode length + sizeof(length) */ tx_event_length = pEvent->Length + 2; - rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE); + rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false); } #endif /* CONFIG_BT_COEXIST_SOCKET_TRX */ #endif /* CONFIG_BT_COEXIST */ diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index bad3521..84c4825 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -85,7 +85,7 @@ static void c2h_wk_callback(_workitem *work) u8 id, seq, plen; u8 *payload; - evtpriv->c2h_wk_alive = _TRUE; + evtpriv->c2h_wk_alive = true; while (!rtw_cbuf_empty(evtpriv->c2h_queue)) { c2h_evt = (u8 *)rtw_cbuf_pop(evtpriv->c2h_queue); @@ -117,7 +117,7 @@ static void c2h_wk_callback(_workitem *work) continue; } - if (direct_hdl_filter(adapter, id, seq, plen, payload) == _TRUE) { + if (direct_hdl_filter(adapter, id, seq, plen, payload) == true) { /* Handle directly */ rtw_hal_c2h_handler(adapter, id, seq, plen, payload); rtw_mfree(c2h_evt, C2H_REG_LEN); @@ -128,7 +128,7 @@ static void c2h_wk_callback(_workitem *work) } } - evtpriv->c2h_wk_alive = _FALSE; + evtpriv->c2h_wk_alive = false; } #endif /* CONFIG_C2H_WK */ @@ -181,7 +181,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 @@ -400,7 +400,7 @@ void rtw_free_cmd_priv(struct cmd_priv *pcmdpriv) 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 */ @@ -411,20 +411,20 @@ int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj) struct drvextra_cmd_parm *pdrvextra_cmd_parm = (struct drvextra_cmd_parm *)cmd_obj->parmbuf; if (pdrvextra_cmd_parm->ec_id == POWER_SAVING_CTRL_WK_CID) { /* RTW_INFO("==>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 (cmd_obj->no_io) - bAllow = _TRUE; + bAllow = true; - if ((!rtw_is_hw_init_completed(pcmdpriv->padapter) && (bAllow == _FALSE)) - || ATOMIC_READ(&(pcmdpriv->cmdthd_running)) == _FALSE /* com_thread not running */ + if ((!rtw_is_hw_init_completed(pcmdpriv->padapter) && (bAllow == false)) + || ATOMIC_READ(&(pcmdpriv->cmdthd_running)) == false /* com_thread not running */ ) { if (DBG_CMD_EXECUTE) RTW_INFO(ADPT_FMT" drop "CMD_FMT" hw_init_completed:%u, cmdthd_running:%u\n", ADPT_ARG(cmd_obj->padapter) @@ -524,7 +524,7 @@ void rtw_free_cmd_obj(struct cmd_obj *pcmd) void rtw_stop_cmd_thread(_adapter *adapter) { if (adapter->cmdThread && - ATOMIC_READ(&(adapter->cmdpriv.cmdthd_running)) == _TRUE && + ATOMIC_READ(&(adapter->cmdpriv.cmdthd_running)) == true && adapter->cmdpriv.stop_req == 0) { adapter->cmdpriv.stop_req = 1; _rtw_up_sema(&adapter->cmdpriv.cmd_queue_sema); @@ -552,7 +552,7 @@ thread_return rtw_cmd_thread(thread_context context) prspbuf = pcmdpriv->rsp_buf; pcmdpriv->stop_req = 0; - ATOMIC_SET(&(pcmdpriv->cmdthd_running), _TRUE); + ATOMIC_SET(&(pcmdpriv->cmdthd_running), true); _rtw_up_sema(&pcmdpriv->terminate_cmdthread_sema); @@ -712,7 +712,7 @@ post_process: #endif /* to avoid enqueue cmd after free all cmd_obj */ - ATOMIC_SET(&(pcmdpriv->cmdthd_running), _FALSE); + ATOMIC_SET(&(pcmdpriv->cmdthd_running), false); /* free all cmd_obj resources */ do { @@ -864,12 +864,12 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num, #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 */ @@ -883,7 +883,7 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num, return _FAIL; } - rtw_free_network_queue(padapter, _FALSE); + rtw_free_network_queue(padapter, false); init_h2fwcmd_w_parm_no_rsp(ph2c, psurveyPara, GEN_CMD_CODE(_SiteSurvey)); @@ -1231,7 +1231,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 } @@ -1243,7 +1243,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 } @@ -1375,7 +1375,7 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork) /* 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) { case Ndis802_11IBSS: set_fwstate(pmlmepriv, WIFI_ADHOC_STATE); @@ -1429,7 +1429,7 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork) /* 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); psecnetwork->IELength = rtw_restruct_sec_ie(padapter, &pnetwork->network.IEs[0], &psecnetwork->IEs[0], pnetwork->network.IELength); @@ -1448,7 +1448,7 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork) } } - phtpriv->ht_option = _FALSE; + phtpriv->ht_option = false; ptmp = rtw_get_ie(&pnetwork->network.IEs[12], _HT_CAPABILITY_IE_, &tmp_len, pnetwork->network.IELength - 12); if (pregistrypriv->ht_enable && ptmp && tmp_len > 0) { /* Added by Albert 2010/06/23 */ @@ -1482,7 +1482,7 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork) RTW_INFO("FT: Target AP "MAC_FMT" MDID=(0x%2x), capacity=(0x%2x)\n", MAC_ARG(pnetwork->network.MacAddress), pftpriv->mdid, pftpriv->ft_cap); rtw_set_ft_flags(padapter, RTW_FT_SUPPORTED); - if ((rtw_chk_ft_flags(padapter, RTW_FT_STA_OVER_DS_SUPPORTED)) && (pftpriv->ft_roam_on_expired == _FALSE) && (pftpriv->ft_cap & 0x01)) + if ((rtw_chk_ft_flags(padapter, RTW_FT_STA_OVER_DS_SUPPORTED)) && (pftpriv->ft_roam_on_expired == false) && (pftpriv->ft_cap & 0x01)) rtw_set_ft_flags(padapter, RTW_FT_OVER_DS_SUPPORTED); } else { /*Don't use FT roaming if Target AP cannot support FT*/ @@ -1607,7 +1607,7 @@ u8 rtw_setstakey_cmd(_adapter *padapter, struct sta_info *sta, u8 key_type, bool if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) 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 (key_type == GROUP_KEY) _rtw_memcpy(&psetstakey_para->key, &psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey, 16); @@ -1621,7 +1621,7 @@ u8 rtw_setstakey_cmd(_adapter *padapter, struct sta_info *sta, u8 key_type, bool #endif /* CONFIG_TDLS */ /* jeff: set this becasue at least sw key is ready */ - padapter->securitypriv.busetkipkey = _TRUE; + padapter->securitypriv.busetkipkey = true; if (enqueue) { ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj)); @@ -2080,7 +2080,7 @@ static u8 _rtw_set_chplan_cmd(_adapter *adapter, int flags, u8 chplan, const str /* check if allow software config */ - if (swconfig && rtw_hal_is_disable_sw_channel_plan(adapter) == _TRUE) { + if (swconfig && rtw_hal_is_disable_sw_channel_plan(adapter) == true) { res = _FAIL; goto exit; } @@ -2151,8 +2151,8 @@ inline u8 rtw_set_country_cmd(_adapter *adapter, int flags, const char *country_ { const struct country_chplan *ent; - if (is_alpha(country_code[0]) == _FALSE - || is_alpha(country_code[1]) == _FALSE + if (is_alpha(country_code[0]) == false + || is_alpha(country_code[1]) == false ) { RTW_PRINT("%s input country_code is not alpha2\n", __func__); return _FAIL; @@ -2319,12 +2319,12 @@ exit: /* from_timer == 1 means driver is in LPS */ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer) { - u8 bEnterPS = _FALSE; + u8 bEnterPS = false; u16 BusyThresholdHigh; u16 BusyThresholdLow; u16 BusyThreshold; - 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; struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); #ifdef CONFIG_TDLS @@ -2351,7 +2351,7 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer) /* */ /* Determine if our traffic is busy now */ /* */ - if ((check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) + if ((check_fwstate(pmlmepriv, _FW_LINKED) == true) /*&& !MgntInitAdapterInProgress(pMgntInfo)*/) { /* if we raise bBusyTraffic in last watchdog, using lower threshold. */ if (pmlmepriv->LinkDetectInfo.bBusyTraffic) @@ -2359,23 +2359,23 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer) if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > BusyThreshold || pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > BusyThreshold) { - 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_TRAFFIC_PROTECT @@ -2399,7 +2399,7 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer) #ifdef CONFIG_TDLS #ifdef CONFIG_TDLS_AUTOSETUP /* TDLS_WATCHDOG_PERIOD * 2sec, periodically send */ - if (hal_chk_wl_func(padapter, WL_FUNC_TDLS) == _TRUE) { + if (hal_chk_wl_func(padapter, WL_FUNC_TDLS) == true) { if ((ptdlsinfo->watchdog_count % TDLS_WATCHDOG_PERIOD) == 0) { _rtw_memcpy(txmgmt.peer, baddr, ETH_ALEN); issue_tdls_dis_req(padapter, &txmgmt); @@ -2422,9 +2422,9 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer) if (padapter->dump_rx_cnt_mode & DUMP_DRV_TRX_COUNTER_DATA) RTW_INFO("(-)Tx = %d, Rx = %d\n", pmlmepriv->LinkDetectInfo.NumTxOkInPeriod, pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod); #endif - bEnterPS = _FALSE; + bEnterPS = false; #ifdef CONFIG_LPS_SLOW_TRANSITION - if (bBusyTraffic == _TRUE) { + if (bBusyTraffic == true) { if (pmlmepriv->LinkDetectInfo.TrafficTransitionCount <= 4) pmlmepriv->LinkDetectInfo.TrafficTransitionCount = 4; @@ -2449,15 +2449,15 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer) pmlmepriv->LinkDetectInfo.TrafficTransitionCount = 0; if (pmlmepriv->LinkDetectInfo.TrafficTransitionCount == 0) - bEnterPS = _TRUE; + bEnterPS = true; #else /* CONFIG_LPS_SLOW_TRANSITION */ - bEnterPS = _TRUE; + bEnterPS = true; #endif /* CONFIG_LPS_SLOW_TRANSITION */ } #ifdef CONFIG_DYNAMIC_DTIM if (pmlmepriv->LinkDetectInfo.LowPowerTransitionCount == 8) - bEnterPS = _FALSE; + bEnterPS = false; RTW_INFO("LowPowerTransitionCount=%d\n", pmlmepriv->LinkDetectInfo.LowPowerTransitionCount); #endif /* CONFIG_DYNAMIC_DTIM */ @@ -2478,7 +2478,7 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer) /* rtw_hal_dm_watchdog_in_lps(padapter); */ } #ifdef CONFIG_DYNAMIC_DTIM - if (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode == _TRUE) + if (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode == true) pmlmepriv->LinkDetectInfo.LowPowerTransitionCount++; #endif /* CONFIG_DYNAMIC_DTIM */ } else { @@ -2559,28 +2559,28 @@ static void dynamic_update_bcn_check(_adapter *padapter) if (count % 10 == 0) { count = 1; - if (_FALSE == ATOMIC_READ(&pmlmepriv->olbc) - && _FALSE == ATOMIC_READ(&pmlmepriv->olbc_ht)) { + if (false == ATOMIC_READ(&pmlmepriv->olbc) + && false == ATOMIC_READ(&pmlmepriv->olbc_ht)) { 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); } } } /* In 2s, there are any legacy AP, update HT info, and then reset count */ - if (_FALSE != ATOMIC_READ(&pmlmepriv->olbc) - && _FALSE != ATOMIC_READ(&pmlmepriv->olbc_ht)) { + if (false != ATOMIC_READ(&pmlmepriv->olbc) + && false != ATOMIC_READ(&pmlmepriv->olbc_ht)) { 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); } - ATOMIC_SET(&pmlmepriv->olbc, _FALSE); - ATOMIC_SET(&pmlmepriv->olbc_ht, _FALSE); + ATOMIC_SET(&pmlmepriv->olbc, false); + ATOMIC_SET(&pmlmepriv->olbc_ht, false); count = 0; } @@ -2593,7 +2593,7 @@ void rtw_iface_dynamic_chk_wk_hdl(_adapter *padapter) #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); #endif #endif /* CONFIG_ACTIVE_KEEP_ALIVE_CHECK */ @@ -2623,7 +2623,7 @@ static void rtw_dynamic_chk_wk_hdl(_adapter *padapter) rtw_hal_sreset_linked_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) */ { #ifdef DBG_RX_COUNTER_DUMP rtw_dump_rx_counters(padapter); @@ -2660,17 +2660,17 @@ void lps_ctrl_wk_hdl(_adapter *padapter, u8 lps_ctrl_type) u8 mstatus; - 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; switch (lps_ctrl_type) { case LPS_CTRL_SCAN: /* RTW_INFO("LPS_CTRL_SCAN\n"); */ #ifdef CONFIG_BT_COEXIST - rtw_btcoex_ScanNotify(padapter, _TRUE); + rtw_btcoex_ScanNotify(padapter, true); #endif /* CONFIG_BT_COEXIST */ - if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { + if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { /* connect */ LPS_Leave(padapter, "LPS_CTRL_SCAN"); } @@ -2823,7 +2823,7 @@ static void rtw_lps_change_dtim_hdl(_adapter *padapter, u8 dtim) return; #ifdef CONFIG_BT_COEXIST - if (rtw_btcoex_IsBtControlLps(padapter) == _TRUE) + if (rtw_btcoex_IsBtControlLps(padapter) == true) return; #endif @@ -2838,7 +2838,7 @@ static void rtw_lps_change_dtim_hdl(_adapter *padapter, u8 dtim) pwrpriv->dtim = dtim; } - if ((pwrpriv->bFwCurrentInPSMode == _TRUE) && (pwrpriv->pwr_mode > PS_MODE_ACTIVE)) { + if ((pwrpriv->bFwCurrentInPSMode == true) && (pwrpriv->pwr_mode > PS_MODE_ACTIVE)) { u8 ps_mode = pwrpriv->pwr_mode; /* RTW_INFO("change DTIM from %d to %d, ps_mode=%d\n", pwrpriv->dtim, dtim, ps_mode); */ @@ -2941,7 +2941,7 @@ exit: #ifdef CONFIG_ANTENNA_DIVERSITY void antenna_select_wk_hdl(_adapter *padapter, u8 antenna) { - rtw_hal_set_odm_var(padapter, HAL_ODM_ANTDIV_SELECT, &antenna, _TRUE); + rtw_hal_set_odm_var(padapter, HAL_ODM_ANTDIV_SELECT, &antenna, true); } u8 rtw_antenna_select_cmd(_adapter *padapter, u8 antenna, u8 enqueue) @@ -2950,12 +2950,12 @@ u8 rtw_antenna_select_cmd(_adapter *padapter, u8 antenna, u8 enqueue) struct drvextra_cmd_parm *pdrvextra_cmd_parm; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); - u8 bSupportAntDiv = _FALSE; + u8 bSupportAntDiv = false; u8 res = _SUCCESS; int i; rtw_hal_get_def_var(padapter, HAL_DEF_IS_SUPPORT_ANT_DIV, &(bSupportAntDiv)); - if (_FALSE == bSupportAntDiv) + if (false == bSupportAntDiv) return _FAIL; for (i = 0; i < dvobj->iface_nums; i++) { @@ -2963,7 +2963,7 @@ u8 rtw_antenna_select_cmd(_adapter *padapter, u8 antenna, u8 enqueue) return _FAIL; } - if (_TRUE == enqueue) { + if (true == enqueue) { ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj)); if (ph2c == NULL) { res = _FAIL; @@ -3239,7 +3239,7 @@ static void rtw_chk_hi_queue_hdl(_adapter *padapter) struct sta_info *psta_bmc; struct sta_priv *pstapriv = &padapter->stapriv; u32 start = rtw_get_current_time(); - u8 empty = _FALSE; + u8 empty = false; psta_bmc = rtw_get_bcmc_stainfo(padapter); if (!psta_bmc) @@ -3247,23 +3247,23 @@ static void rtw_chk_hi_queue_hdl(_adapter *padapter) rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &empty); - while (_FALSE == empty && rtw_get_passing_time_ms(start) < rtw_get_wait_hiq_empty_ms()) { + while (false == empty && rtw_get_passing_time_ms(start) < rtw_get_wait_hiq_empty_ms()) { rtw_msleep_os(100); rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &empty); } if (psta_bmc->sleepq_len == 0) { if (empty == _SUCCESS) { - bool update_tim = _FALSE; + bool update_tim = false; if (pstapriv->tim_bitmap & BIT(0)) - update_tim = _TRUE; + update_tim = true; pstapriv->tim_bitmap &= ~BIT(0); pstapriv->sta_dz_bitmap &= ~BIT(0); - if (update_tim == _TRUE) - _update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "bmc sleepq and HIQ empty"); + if (update_tim == true) + _update_beacon(padapter, _TIM_IE_, NULL, true, "bmc sleepq and HIQ empty"); } else /* re check again */ rtw_chk_hi_queue_cmd(padapter); @@ -3328,7 +3328,7 @@ u8 rtw_dfs_master_hdl(_adapter *adapter) } if (!rfctl->dbg_dfs_master_fake_radar_detect_cnt - && rtw_odm_radar_detect(adapter) != _TRUE) + && rtw_odm_radar_detect(adapter) != true) goto cac_status_chk; if (rfctl->dbg_dfs_master_fake_radar_detect_cnt != 0) { @@ -3432,7 +3432,7 @@ void rtw_dfs_master_timer_hdl(strust timer_list *t) #else _adapter *adapter = from_timer(adapter, t, dfs_master_timer); #endif - rtw_dfs_master_cmd(adapter, _TRUE); + rtw_dfs_master_cmd(adapter, true); } void rtw_dfs_master_enable(_adapter *adapter, u8 ch, u8 bw, u8 offset) @@ -3444,10 +3444,10 @@ void rtw_dfs_master_enable(_adapter *adapter, u8 ch, u8 bw, u8 offset) RTW_INFO(FUNC_ADPT_FMT" on %u,%u,%u\n", FUNC_ADPT_ARG(adapter), ch, bw, offset); - if (rtw_is_cac_reset_needed(adapter, ch, bw, offset) == _TRUE) + if (rtw_is_cac_reset_needed(adapter, ch, bw, offset) == true) rtw_reset_cac(adapter, ch, bw, offset); - rfctl->radar_detect_by_others = _FALSE; + rfctl->radar_detect_by_others = false; rfctl->radar_detect_ch = ch; rfctl->radar_detect_bw = bw; rfctl->radar_detect_offset = offset; @@ -3512,14 +3512,14 @@ void rtw_dfs_master_status_apply(_adapter *adapter, u8 self_action) struct mlme_ext_priv *mlmeext = &adapter->mlmeextpriv; struct mi_state mstate; u8 u_ch, u_bw, u_offset; - bool ld_sta_in_dfs = _FALSE; - bool sync_ch = _FALSE; /* _FALSE: asign channel directly */ - bool needed = _FALSE; + bool ld_sta_in_dfs = false; + bool sync_ch = false; /* false: asign channel directly */ + bool needed = false; rtw_mi_status_no_self(adapter, &mstate); rtw_mi_get_ch_setting_union_no_self(adapter, &u_ch, &u_bw, &u_offset); if (u_ch != 0) - sync_ch = _TRUE; + sync_ch = true; switch (self_action) { case MLME_STA_CONNECTING: @@ -3537,7 +3537,7 @@ void rtw_dfs_master_status_apply(_adapter *adapter, u8 self_action) break; } - if (sync_ch == _TRUE) { + if (sync_ch == true) { if (!rtw_is_chbw_grouped(mlmeext->cur_channel, mlmeext->cur_bwmode, mlmeext->cur_ch_offset, u_ch, u_bw, u_offset)) { RTW_INFO(FUNC_ADPT_FMT" can't sync %u,%u,%u with %u,%u,%u\n", FUNC_ADPT_ARG(adapter) , mlmeext->cur_channel, mlmeext->cur_bwmode, mlmeext->cur_ch_offset, u_ch, u_bw, u_offset); @@ -3555,7 +3555,7 @@ void rtw_dfs_master_status_apply(_adapter *adapter, u8 self_action) if (MSTATE_STA_LD_NUM(&mstate) > 0) { /* rely on AP on which STA mode connects */ if (rtw_is_dfs_ch(u_ch, u_bw, u_offset)) - ld_sta_in_dfs = _TRUE; + ld_sta_in_dfs = true; goto apply; } @@ -3570,7 +3570,7 @@ void rtw_dfs_master_status_apply(_adapter *adapter, u8 self_action) } if (rtw_is_dfs_ch(u_ch, u_bw, u_offset)) - needed = _TRUE; + needed = true; apply: @@ -3580,7 +3580,7 @@ apply: , FUNC_ADPT_ARG(adapter), MSTATE_STA_LD_NUM(&mstate), MSTATE_STA_LG_NUM(&mstate), MSTATE_AP_NUM(&mstate) , u_ch, u_bw, u_offset); - if (needed == _TRUE) + if (needed == true) rtw_dfs_master_enable(adapter, u_ch, u_bw, u_offset); else rtw_dfs_master_disable(adapter, u_ch, u_bw, u_offset, ld_sta_in_dfs); @@ -3821,7 +3821,7 @@ static s32 rtw_mp_cmd_hdl(_adapter *padapter, u8 mp_cmd_id) padapter->mppriv.mode = MP_ON; MPT_PwrCtlDM(padapter, 0); } - padapter->mppriv.bmac_filter = _FALSE; + padapter->mppriv.bmac_filter = false; odm_write_dig(&pHalData->odmpriv, 0x20); } else if (mp_cmd_id == MP_STOP) { if (padapter->registrypriv.mp_mode == 1) { @@ -4097,7 +4097,7 @@ s32 c2h_evt_hdl(_adapter *adapter, u8 *c2h_evt, c2h_id_filter filter) rtw_hal_c2h_reg_hdr_parse(adapter, c2h_evt, &id, &seq, &plen, &payload); - if (filter && filter(adapter, id, seq, plen, payload) == _FALSE) + if (filter && filter(adapter, id, seq, plen, payload) == false) goto exit; ret = rtw_hal_c2h_handler(adapter, id, seq, plen, payload); @@ -4203,7 +4203,7 @@ static void session_tracker_chk_for_sta(_adapter *adapter, struct sta_info *sta) phead = &st_ctl->tracker_q.queue; plist = get_next(phead); pnext = get_next(plist); - while (rtw_end_of_queue_search(phead, plist) == _FALSE) { + while (rtw_end_of_queue_search(phead, plist) == false) { st = LIST_CONTAINOR(plist, struct session_tracker, list); plist = pnext; pnext = get_next(pnext); @@ -4235,7 +4235,7 @@ static void session_tracker_chk_for_sta(_adapter *adapter, struct sta_info *sta) _exit_critical_bh(&st_ctl->tracker_q.lock, &irqL); plist = get_next(&dlist); - while (rtw_end_of_queue_search(&dlist, plist) == _FALSE) { + while (rtw_end_of_queue_search(&dlist, plist) == false) { st = LIST_CONTAINOR(plist, struct session_tracker, list); plist = get_next(plist); rtw_mfree((u8 *)st, sizeof(struct session_tracker)); @@ -4266,7 +4266,7 @@ static void session_tracker_chk_for_adapter(_adapter *adapter) phead = &(stapriv->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) { sta = LIST_CONTAINOR(plist, struct sta_info, hash_list); plist = get_next(plist); @@ -4324,7 +4324,7 @@ static void session_tracker_cmd_hdl(_adapter *adapter, struct st_cmd_parm *parm) phead = &st_ctl->tracker_q.queue; plist = get_next(phead); - while (rtw_end_of_queue_search(phead, plist) == _FALSE) { + while (rtw_end_of_queue_search(phead, plist) == false) { st = LIST_CONTAINOR(plist, struct session_tracker, list); if (st->local_naddr == local_naddr @@ -4336,7 +4336,7 @@ static void session_tracker_cmd_hdl(_adapter *adapter, struct st_cmd_parm *parm) plist = get_next(plist); } - if (rtw_end_of_queue_search(phead, plist) == _TRUE) + if (rtw_end_of_queue_search(phead, plist) == true) st = NULL; switch (cmd) { @@ -4617,7 +4617,7 @@ void rtw_create_ibss_post_hdl(_adapter *padapter, int status) pdev_network->Length = get_WLAN_BSSID_EX_sz(pdev_network); _rtw_memcpy(&(pwlan->network), pdev_network, pdev_network->Length); - /* pwlan->fixed = _TRUE; */ + /* pwlan->fixed = true; */ /* copy pdev_network information to pmlmepriv->cur_network */ _rtw_memcpy(&mlme_cur_network->network, pdev_network, (get_WLAN_BSSID_EX_sz(pdev_network))); @@ -4673,7 +4673,7 @@ void rtw_setassocsta_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd) _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); @@ -4691,7 +4691,7 @@ void rtw_getrttbl_cmd_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd) 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 diff --git a/core/rtw_debug.c b/core/rtw_debug.c index f1c967c..fdb455a 100644 --- a/core/rtw_debug.c +++ b/core/rtw_debug.c @@ -255,9 +255,9 @@ bool rtw_fwdl_test_trigger_chksum_fail(void) if (fwdl_test_chksum_fail) { RTW_PRINT("fwdl test case: trigger chksum_fail\n"); fwdl_test_chksum_fail--; - return _TRUE; + return true; } - return _FALSE; + return false; } bool rtw_fwdl_test_trigger_wintint_rdy_fail(void) @@ -265,9 +265,9 @@ bool rtw_fwdl_test_trigger_wintint_rdy_fail(void) if (fwdl_test_wintint_rdy_fail) { RTW_PRINT("fwdl test case: trigger wintint_rdy_fail\n"); fwdl_test_wintint_rdy_fail--; - return _TRUE; + return true; } - return _FALSE; + return false; } static u32 g_wait_hiq_empty_ms = 0; @@ -284,9 +284,9 @@ bool rtw_del_rx_ampdu_test_trigger_no_tx_fail(void) if (del_rx_ampdu_test_no_tx_fail) { RTW_PRINT("del_rx_ampdu test case: trigger no_tx_fail\n"); del_rx_ampdu_test_no_tx_fail--; - return _TRUE; + return true; } - return _FALSE; + return false; } void rtw_sink_rtp_seq_dbg(_adapter *adapter, _pkt *pkt) @@ -684,16 +684,16 @@ int proc_get_rx_stat(struct seq_file *m, void *v) for (i = 0; i < NUM_STA; i++) { 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); plist = get_next(plist); pstats = &psta->sta_stats; if (pstats == NULL) continue; - if ((_rtw_memcmp(psta->hwaddr, bc_addr, 6) != _TRUE) - && (_rtw_memcmp(psta->hwaddr, null_addr, 6) != _TRUE) - && (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(adapter), 6) != _TRUE)) { + if ((_rtw_memcmp(psta->hwaddr, bc_addr, 6) != true) + && (_rtw_memcmp(psta->hwaddr, null_addr, 6) != true) + && (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(adapter), 6) != true)) { RTW_PRINT_SEL(m, "MAC :\t\t"MAC_FMT "\n", MAC_ARG(psta->hwaddr)); RTW_PRINT_SEL(m, "data_rx_cnt :\t%llu\n", pstats->rx_data_pkts - pstats->rx_data_last_pkts); pstats->rx_data_last_pkts = pstats->rx_data_pkts; @@ -734,12 +734,12 @@ int proc_get_tx_stat(struct seq_file *m, void *v) sta_rec[i] = NULL; 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); plist = get_next(plist); - if ((_rtw_memcmp(psta->hwaddr, bc_addr, 6) != _TRUE) - && (_rtw_memcmp(psta->hwaddr, null_addr, 6) != _TRUE) - && (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(adapter), 6) != _TRUE)) { + if ((_rtw_memcmp(psta->hwaddr, bc_addr, 6) != true) + && (_rtw_memcmp(psta->hwaddr, null_addr, 6) != true) + && (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(adapter), 6) != true)) { sta_rec[macid_rec_idx++] = psta; } } @@ -1255,14 +1255,14 @@ int proc_get_survey_info(struct seq_file *m, void *v) RTW_PRINT_SEL(m, "%5s %-17s %3s %-3s %-4s %-4s %5s %32s %32s\n", "index", "bssid", "ch", "RSSI", "SdBm", "Noise", "age", "flag", "ssid"); 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); if (!pnetwork) break; - if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE && + if (check_fwstate(pmlmepriv, _FW_LINKED) == true && is_same_network(&pmlmepriv->cur_network.network, &pnetwork->network, 0)) { notify_signal = translate_percentage_to_dbm(padapter->recvpriv.signal_strength);/* dbm */ } else { @@ -1311,8 +1311,8 @@ ssize_t proc_set_survey_info(struct file *file, const char __user *buffer, size_ struct net_device *dev = data; _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - bool need_indicate_scan_done = _FALSE; - u8 _status = _FALSE; + bool need_indicate_scan_done = false; + u8 _status = false; NDIS_802_11_SSID ssid[RTW_SSID_SCAN_AMOUNT]; if (count < 1) @@ -1338,8 +1338,8 @@ ssize_t proc_set_survey_info(struct file *file, const char __user *buffer, size_ goto cancel_ps_deny; } - if (rtw_mi_busy_traffic_check(padapter, _FALSE)) { - RTW_INFO("scan abort!! BusyTraffic == _TRUE\n"); + if (rtw_mi_busy_traffic_check(padapter, false)) { + RTW_INFO("scan abort!! BusyTraffic == true\n"); goto cancel_ps_deny; } @@ -1347,7 +1347,7 @@ ssize_t proc_set_survey_info(struct file *file, const char __user *buffer, size_ RTW_INFO("scan abort!! AP mode process WPS\n"); goto cancel_ps_deny; } - if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING) == _TRUE) { + if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING) == true) { RTW_INFO("scan abort!! fwstate=0x%x\n", pmlmepriv->fw_state); goto cancel_ps_deny; } @@ -1476,7 +1476,7 @@ int proc_get_dis_pwt(struct seq_file *m, void *v) _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); u8 dis_pwt = 0; rtw_hal_get_def_var(padapter, HAL_DEF_DBG_DIS_PWT, &(dis_pwt)); - RTW_PRINT_SEL(m, " Tx Power training mode:%s\n", (dis_pwt == _TRUE) ? "Disable" : "Enable"); + RTW_PRINT_SEL(m, " Tx Power training mode:%s\n", (dis_pwt == true) ? "Disable" : "Enable"); return 0; } ssize_t proc_set_dis_pwt(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data) @@ -1497,7 +1497,7 @@ ssize_t proc_set_dis_pwt(struct file *file, const char __user *buffer, size_t co if (buffer && !copy_from_user(tmp, buffer, count)) { int num = sscanf(tmp, "%hhx", &dis_pwt); - RTW_INFO("Set Tx Power training mode:%s\n", (dis_pwt == _TRUE) ? "Disable" : "Enable"); + RTW_INFO("Set Tx Power training mode:%s\n", (dis_pwt == true) ? "Disable" : "Enable"); if (num >= 1) rtw_hal_set_def_var(padapter, HAL_DEF_DBG_DIS_PWT, &(dis_pwt)); @@ -2169,7 +2169,7 @@ int proc_get_trx_info_debug(struct seq_file *m, void *v) rtw_hal_get_def_var(padapter, HW_DEF_RA_INFO_DUMP, m); /*============ rx info ============ */ - rtw_hal_set_odm_var(padapter, HAL_ODM_RX_INFO_DUMP, m, _FALSE); + rtw_hal_set_odm_var(padapter, HAL_ODM_RX_INFO_DUMP, m, false); return 0; @@ -2997,7 +2997,7 @@ int proc_get_all_sta_info(struct seq_file *m, void *v) 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); plist = get_next(plist); @@ -3410,7 +3410,7 @@ ssize_t proc_set_pattern_info(struct file *file, const char __user *buffer, pwrpriv->patterns[index].content, &pwrpriv->patterns[index].len, pwrpriv->patterns[index].mask); - if (ret == _TRUE) + if (ret == true) pwrpriv->wowlan_pattern_idx++; } } @@ -3494,8 +3494,8 @@ int proc_get_p2p_wowlan_info(struct seq_file *m, void *v) _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); struct wifidirect_info *pwdinfo = &(padapter->wdinfo); struct p2p_wowlan_info peerinfo = pwdinfo->p2p_wow_info; - if (_TRUE == peerinfo.is_trigger) { - RTW_PRINT_SEL(m, "is_trigger: TRUE\n"); + if (true == peerinfo.is_trigger) { + RTW_PRINT_SEL(m, "is_trigger: true\n"); switch (peerinfo.wowlan_recv_frame_type) { case P2P_WOWLAN_RECV_NEGO_REQ: RTW_PRINT_SEL(m, "Frame Type: Nego Request\n"); @@ -3608,15 +3608,15 @@ static int proc_tdls_display_tdls_function_info(struct seq_file *m) struct tdls_info *ptdlsinfo = &padapter->tdlsinfo; u8 SpaceBtwnItemAndValue = TDLS_DBG_INFO_SPACE_BTWN_ITEM_AND_VALUE; u8 SpaceBtwnItemAndValueTmp = 0; - bool FirstMatchFound = _FALSE; + bool FirstMatchFound = false; int j = 0; RTW_PRINT_SEL(m, "============[TDLS Function Info]============\n"); - RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Prohibited", (ptdlsinfo->ap_prohibited == _TRUE) ? "_TRUE" : "_FALSE"); - RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Channel Switch Prohibited", (ptdlsinfo->ch_switch_prohibited == _TRUE) ? "_TRUE" : "_FALSE"); - RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Link Established", (ptdlsinfo->link_established == _TRUE) ? "_TRUE" : "_FALSE"); + RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Prohibited", (ptdlsinfo->ap_prohibited == true) ? "true" : "false"); + RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Channel Switch Prohibited", (ptdlsinfo->ch_switch_prohibited == true) ? "true" : "false"); + RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Link Established", (ptdlsinfo->link_established == true) ? "true" : "false"); RTW_PRINT_SEL(m, "%-*s = %d/%d\n", SpaceBtwnItemAndValue, "TDLS STA Num (Linked/Allowed)", ptdlsinfo->sta_cnt, MAX_ALLOWED_TDLS_STA_NUM); - RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Allowed STA Num Reached", (ptdlsinfo->sta_maximum == _TRUE) ? "_TRUE" : "_FALSE"); + RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Allowed STA Num Reached", (ptdlsinfo->sta_maximum == true) ? "true" : "false"); #ifdef CONFIG_TDLS_CH_SW RTW_PRINT_SEL(m, "%-*s =", SpaceBtwnItemAndValue, "TDLS CH SW State"); @@ -3625,9 +3625,9 @@ static int proc_tdls_display_tdls_function_info(struct seq_file *m) else { for (j = 0; j < 32; j++) { if (ptdlsinfo->chsw_info.ch_sw_state & BIT(j)) { - if (FirstMatchFound == _FALSE) { + if (FirstMatchFound == false) { SpaceBtwnItemAndValueTmp = 1; - FirstMatchFound = _TRUE; + FirstMatchFound = true; } else SpaceBtwnItemAndValueTmp = SpaceBtwnItemAndValue + 3; switch (BIT(j)) { @@ -3666,17 +3666,17 @@ static int proc_tdls_display_tdls_function_info(struct seq_file *m) } } - RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS CH SW On", (ATOMIC_READ(&ptdlsinfo->chsw_info.chsw_on) == _TRUE) ? "_TRUE" : "_FALSE"); + RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS CH SW On", (ATOMIC_READ(&ptdlsinfo->chsw_info.chsw_on) == true) ? "true" : "false"); RTW_PRINT_SEL(m, "%-*s = %d\n", SpaceBtwnItemAndValue, "TDLS CH SW Off-Channel Num", ptdlsinfo->chsw_info.off_ch_num); RTW_PRINT_SEL(m, "%-*s = %d\n", SpaceBtwnItemAndValue, "TDLS CH SW Channel Offset", ptdlsinfo->chsw_info.ch_offset); RTW_PRINT_SEL(m, "%-*s = %d\n", SpaceBtwnItemAndValue, "TDLS CH SW Current Time", ptdlsinfo->chsw_info.cur_time); - RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS CH SW Delay Switch Back", (ptdlsinfo->chsw_info.delay_switch_back == _TRUE) ? "_TRUE" : "_FALSE"); + RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS CH SW Delay Switch Back", (ptdlsinfo->chsw_info.delay_switch_back == true) ? "true" : "false"); RTW_PRINT_SEL(m, "%-*s = %d\n", SpaceBtwnItemAndValue, "TDLS CH SW Dump Back", ptdlsinfo->chsw_info.dump_stack); #endif - RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Device Discovered", (ptdlsinfo->dev_discovered == _TRUE) ? "_TRUE" : "_FALSE"); - RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Enable", (ptdlsinfo->tdls_enable == _TRUE) ? "_TRUE" : "_FALSE"); - RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Driver Setup", (ptdlsinfo->driver_setup == _TRUE) ? "_TRUE" : "_FALSE"); + RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Device Discovered", (ptdlsinfo->dev_discovered == true) ? "true" : "false"); + RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Enable", (ptdlsinfo->tdls_enable == true) ? "true" : "false"); + RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Driver Setup", (ptdlsinfo->driver_setup == true) ? "true" : "false"); return 0; } @@ -3812,14 +3812,14 @@ static int proc_tdls_display_tdls_sta_info(struct seq_file *m) u8 SpaceBtwnItemAndValue = TDLS_DBG_INFO_SPACE_BTWN_ITEM_AND_VALUE; u8 SpaceBtwnItemAndValueTmp = 0; u8 NumOfTdlsStaToShow = 0; - bool FirstMatchFound = _FALSE; + bool FirstMatchFound = false; /* Search for TDLS sta info to display */ _enter_critical_bh(&pstapriv->sta_hash_lock, &irqL); for (i = 0; i < NUM_STA; i++) { 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); plist = get_next(plist); if (psta->tdls_sta_state != TDLS_STATE_NONE) { @@ -3828,12 +3828,12 @@ static int proc_tdls_display_tdls_sta_info(struct seq_file *m) RTW_PRINT_SEL(m, "%-*s = "MAC_FMT"\n", SpaceBtwnItemAndValue, "Mac Address", MAC_ARG(psta->hwaddr)); RTW_PRINT_SEL(m, "%-*s =", SpaceBtwnItemAndValue, "TDLS STA State"); SpaceBtwnItemAndValueTmp = 0; - FirstMatchFound = _FALSE; + FirstMatchFound = false; for (j = 0; j < 32; j++) { if (psta->tdls_sta_state & BIT(j)) { - if (FirstMatchFound == _FALSE) { + if (FirstMatchFound == false) { SpaceBtwnItemAndValueTmp = 1; - FirstMatchFound = _TRUE; + FirstMatchFound = true; } else SpaceBtwnItemAndValueTmp = SpaceBtwnItemAndValue + 3; switch (BIT(j)) { @@ -3984,9 +3984,9 @@ int proc_get_tdls_info(struct seq_file *m, void *v) u8 SpaceBtwnItemAndValue = 41; u8 SpaceBtwnItemAndValueTmp = 0; u8 NumOfTdlsStaToShow = 0; - bool FirstMatchFound = _FALSE; + bool FirstMatchFound = false; - if (hal_chk_wl_func(padapter, WL_FUNC_TDLS) == _FALSE) { + if (hal_chk_wl_func(padapter, WL_FUNC_TDLS) == false) { RTW_PRINT_SEL(m, "No tdls info can be shown since hal doesn't support tdls\n"); return 0; } @@ -4061,7 +4061,7 @@ int proc_get_efuse_map(struct seq_file *m, void *v) u8 ips_mode = IPS_NUM; u16 mapLen; - 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 (mapLen > EFUSE_MAX_MAP_LEN) mapLen = EFUSE_MAX_MAP_LEN; @@ -4153,12 +4153,12 @@ ssize_t proc_set_tx_sa_query(struct file *file, const char __user *buffer, size_ RTW_INFO("0: set sa query request , key_type=%d\n", key_type); } - if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE) - && (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) && padapter->securitypriv.binstallBIPkey == _TRUE) { + if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) + && (check_fwstate(pmlmepriv, _FW_LINKED) == true) && padapter->securitypriv.binstallBIPkey == true) { RTW_INFO("STA:"MAC_FMT"\n", MAC_ARG(get_my_bssid(&(pmlmeinfo->network)))); /* TX unicast sa_query to AP */ issue_action_SA_Query(padapter, get_my_bssid(&(pmlmeinfo->network)), 0, 0, (u8)key_type); - } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE && padapter->securitypriv.binstallBIPkey == _TRUE) { + } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true && padapter->securitypriv.binstallBIPkey == true) { /* TX unicast sa_query to every client STA */ _enter_critical_bh(&pstapriv->sta_hash_lock, &irqL); for (index = 0; index < NUM_STA; index++) { @@ -4167,7 +4167,7 @@ ssize_t proc_set_tx_sa_query(struct file *file, const char __user *buffer, size_ 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); plist = get_next(plist); _rtw_memcpy(&mac_addr[psta->mac_id][0], psta->hwaddr, ETH_ALEN); @@ -4236,13 +4236,13 @@ ssize_t proc_set_tx_deauth(struct file *file, const char __user *buffer, size_t if (key_type < 0 || key_type > 4) return count; - if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE) - && (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) { + if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) + && (check_fwstate(pmlmepriv, _FW_LINKED) == true)) { if (key_type == 3) /* key_type 3 only for AP mode */ return count; /* TX unicast deauth to AP */ issue_deauth_11w(padapter, get_my_bssid(&(pmlmeinfo->network)), 0, (u8)key_type); - } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) { + } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) { if (key_type == 3) issue_deauth_11w(padapter, bc_addr, 0, IEEE80211W_RIGHT_KEY); @@ -4255,7 +4255,7 @@ ssize_t proc_set_tx_deauth(struct file *file, const char __user *buffer, size_t 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); plist = get_next(plist); _rtw_memcpy(&mac_addr[psta->mac_id][0], psta->hwaddr, ETH_ALEN); @@ -4271,13 +4271,13 @@ ssize_t proc_set_tx_deauth(struct file *file, const char __user *buffer, size_t psta = rtw_get_stainfo(pstapriv, &mac_addr[index][0]); if (psta && key_type != IEEE80211W_WRONG_KEY && key_type != IEEE80211W_NO_KEY) { - u8 updated = _FALSE; + u8 updated = false; _enter_critical_bh(&pstapriv->asoc_list_lock, &irqL); - if (rtw_is_list_empty(&psta->asoc_list) == _FALSE) { + if (rtw_is_list_empty(&psta->asoc_list) == false) { rtw_list_delete(&psta->asoc_list); pstapriv->asoc_list_cnt--; - updated = ap_free_sta(padapter, psta, _FALSE, WLAN_REASON_PREV_AUTH_NOT_VALID, _TRUE); + updated = ap_free_sta(padapter, psta, false, WLAN_REASON_PREV_AUTH_NOT_VALID, true); } _exit_critical_bh(&pstapriv->asoc_list_lock, &irqL); @@ -4339,8 +4339,8 @@ ssize_t proc_set_tx_auth(struct file *file, const char __user *buffer, size_t co RTW_INFO("1: setnd auth, 2: send assoc request. tx_auth=%d\n", tx_auth); } - if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE) - && (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) { + if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) + && (check_fwstate(pmlmepriv, _FW_LINKED) == true)) { if (tx_auth == 1) { /* TX unicast auth to AP */ issue_auth(padapter, NULL, 0); diff --git a/core/rtw_efuse.c b/core/rtw_efuse.c index ac7819c..07cf2c0 100644 --- a/core/rtw_efuse.c +++ b/core/rtw_efuse.c @@ -50,7 +50,7 @@ static bool rtw_file_efuse_IsMasked(PADAPTER pAdapter, u16 Offset) int result = 0; if (pAdapter->registrypriv.boffefusemask) - return FALSE; + return false; if (c < 4) /* Upper double word */ result = (maskfileBuffer[r] & (0x10 << c)); @@ -65,12 +65,12 @@ static bool efuse_IsMasked(PADAPTER pAdapter, u16 Offset) PHAL_DATA_TYPE pHalData = GET_HAL_DATA(pAdapter); if (pAdapter->registrypriv.boffefusemask) - return FALSE; + return false; if (IS_HARDWARE_TYPE_8188E(pAdapter)) - return (IS_MASKED(8188E, _MUSB, Offset)) ? TRUE : FALSE; + return (IS_MASKED(8188E, _MUSB, Offset)) ? true : false; - return FALSE; + return false; } void rtw_efuse_mask_array(PADAPTER pAdapter, u8 *pArray) @@ -95,14 +95,14 @@ u8 rtw_efuse_mask_map_read(PADAPTER padapter, u16 addr, u16 cnts, u8 *data) u8 ret = _SUCCESS; u16 mapLen = 0, i = 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); ret = rtw_efuse_map_read(padapter, addr, cnts , data); if (padapter->registrypriv.boffefusemask == 0) { for (i = 0; i < cnts; i++) { - if (padapter->registrypriv.bFileMaskEfuse == _TRUE) { + if (padapter->registrypriv.bFileMaskEfuse == true) { if (rtw_file_efuse_IsMasked(padapter, addr + i)) /*use file efuse mask.*/ data[i] = 0xff; } else { @@ -150,13 +150,13 @@ Efuse_Read1ByteFromFakeContent( u8 *Value) { 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 @@ -171,12 +171,12 @@ Efuse_Write1ByteToFakeContent( u8 Value) { if (Offset >= EFUSE_MAX_HW_SIZE) - return _FALSE; + return false; if (fakeEfuseBank == 0) fakeEfuseContent[Offset] = Value; else fakeBTEfuseContent[fakeEfuseBank - 1][Offset] = Value; - return _TRUE; + return true; } /*----------------------------------------------------------------------------- @@ -401,10 +401,10 @@ efuse_OneByteRead( } if (tmpidx < 100) { *data = rtw_read8(pAdapter, EFUSE_CTRL); - bResult = _TRUE; + bResult = true; } else { *data = 0xff; - bResult = _FALSE; + bResult = false; RTW_INFO("%s: [ERROR] addr=0x%x bResult=%d time out 1s !!!\n", __func__, addr, bResult); RTW_INFO("%s: [ERROR] EFUSE_CTRL =0x%08x !!!\n", __func__, rtw_read32(pAdapter, EFUSE_CTRL)); } @@ -421,7 +421,7 @@ efuse_OneByteWrite( bool bPseudoTest) { u8 tmpidx = 0; - u8 bResult = _FALSE; + u8 bResult = false; u32 efuseValue = 0; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); @@ -433,7 +433,7 @@ efuse_OneByteWrite( return bResult; } - Efuse_PowerSwitch(pAdapter, _TRUE, _TRUE); + Efuse_PowerSwitch(pAdapter, true, true); /* -----------------e-fuse reg ctrl --------------------------------- */ /* address */ @@ -463,9 +463,9 @@ efuse_OneByteWrite( } if (tmpidx < 100) - bResult = _TRUE; + bResult = true; else { - bResult = _FALSE; + bResult = false; RTW_INFO("%s: [ERROR] addr=0x%x ,efuseValue=0x%x ,bResult=%d time out 1s !!!\n", __func__, addr, efuseValue, bResult); RTW_INFO("%s: [ERROR] EFUSE_CTRL =0x%08x !!!\n", __func__, rtw_read32(pAdapter, EFUSE_CTRL)); @@ -476,7 +476,7 @@ efuse_OneByteWrite( (IS_CHIP_VENDOR_SMIC(pHalData->version_id))) phy_set_mac_reg(pAdapter, EFUSE_TEST, BIT(11), 0); - Efuse_PowerSwitch(pAdapter, _TRUE, _FALSE); + Efuse_PowerSwitch(pAdapter, true, false); return bResult; } @@ -540,12 +540,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); } /* @@ -560,13 +560,13 @@ u8 rtw_efuse_access(PADAPTER padapter, u8 bWrite, u16 start_addr, u16 cnts, u8 * u32 backupRegs[4] = {0}; - 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; @@ -575,7 +575,7 @@ u8 rtw_efuse_access(PADAPTER padapter, u8 bWrite, u16 start_addr, u16 cnts, u8 * efuse_PreUpdateAction(padapter, backupRegs); - Efuse_PowerSwitch(padapter, bWrite, _TRUE); + Efuse_PowerSwitch(padapter, bWrite, true); /* e-fuse one byte read / write */ for (i = 0; i < cnts; i++) { @@ -589,7 +589,7 @@ u8 rtw_efuse_access(PADAPTER padapter, u8 bWrite, u16 start_addr, u16 cnts, u8 * break; } - Efuse_PowerSwitch(padapter, bWrite, _FALSE); + Efuse_PowerSwitch(padapter, bWrite, false); efuse_PostUpdateAction(padapter, backupRegs); @@ -601,15 +601,15 @@ u16 efuse_GetMaxSize(PADAPTER padapter) u16 max_size; max_size = 0; - 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; } @@ -619,15 +619,15 @@ u16 efuse_bt_GetMaxSize(PADAPTER padapter) u16 max_size; max_size = 0; - EFUSE_GetEfuseDefinition(padapter, EFUSE_BT , TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_size, _FALSE); + EFUSE_GetEfuseDefinition(padapter, EFUSE_BT , TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_size, false); return max_size; } u8 efuse_bt_GetCurrentSize(PADAPTER padapter, u16 *size) { - Efuse_PowerSwitch(padapter, _FALSE, _TRUE); - *size = Efuse_GetCurrentSize(padapter, EFUSE_BT, _FALSE); - Efuse_PowerSwitch(padapter, _FALSE, _FALSE); + Efuse_PowerSwitch(padapter, false, true); + *size = Efuse_GetCurrentSize(padapter, EFUSE_BT, false); + Efuse_PowerSwitch(padapter, false, false); return _SUCCESS; } @@ -636,16 +636,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; } @@ -654,16 +654,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; } @@ -689,8 +689,8 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data) PEFUSE_HAL pEfuseHal = &pHalData->EfuseHal; - EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, _FALSE); - EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, &efuse_max_available_len, _FALSE); + EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false); + EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, &efuse_max_available_len, false); if ((addr + cnts) > mapLen) return _FAIL; @@ -710,7 +710,7 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data) if (padapter->registrypriv.boffefusemask == 0) { for (i = 0; i < cnts; i++) { - if (padapter->registrypriv.bFileMaskEfuse == _TRUE) { + if (padapter->registrypriv.bFileMaskEfuse == true) { if (rtw_file_efuse_IsMasked(padapter, addr + i)) /*use file efuse mask. */ data[i] = map[addr + i]; } else { @@ -720,7 +720,7 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data) RTW_INFO("%s , data[%d] = %x, map[addr+i]= %x\n", __func__, i, data[i], map[addr + i]); } } - /*Efuse_PowerSwitch(padapter, _TRUE, _TRUE);*/ + /*Efuse_PowerSwitch(padapter, true, true);*/ chk_total_byte = 0; idx = 0; @@ -750,7 +750,7 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data) rtw_hal_get_hwreg(padapter, HW_VAR_EFUSE_BYTES, (u8 *)&startAddr); if (startAddr == 0) { - startAddr = Efuse_GetCurrentSize(padapter, EFUSE_WIFI, _FALSE); + startAddr = Efuse_GetCurrentSize(padapter, EFUSE_WIFI, false); RTW_INFO("%s: Efuse_GetCurrentSize startAddr=%#X\n", __func__, startAddr); } RTW_DBG("%s: startAddr=%#X\n", __func__, startAddr); @@ -778,7 +778,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); RTW_INFO("offset=%x\n", offset); RTW_INFO("word_en=%x\n", word_en); @@ -791,7 +791,7 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data) offset++; } - /*Efuse_PowerSwitch(padapter, _TRUE, _FALSE);*/ + /*Efuse_PowerSwitch(padapter, true, false);*/ efuse_PostUpdateAction(padapter, backupRegs); @@ -819,7 +819,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; @@ -845,7 +845,7 @@ u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data) RTW_INFO("\n"); } RTW_INFO("\n"); - Efuse_PowerSwitch(padapter, _TRUE, _TRUE); + Efuse_PowerSwitch(padapter, true, true); idx = 0; offset = (addr >> 3); @@ -867,7 +867,7 @@ u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data) for (i = 0; i < PGPKT_DATA_SIZE; i++) RTW_INFO("0x%02X ", newdata[i]); RTW_INFO("\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; } @@ -875,7 +875,7 @@ u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data) offset++; } - Efuse_PowerSwitch(padapter, _TRUE, _FALSE); + Efuse_PowerSwitch(padapter, true, false); exit: @@ -915,13 +915,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); } /*----------------------------------------------------------------------------- @@ -1233,7 +1233,7 @@ void EFUSE_ShadowMapUpdate( u16 mapLen = 0; EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, bPseudoTest); - if (pHalData->bautoload_fail_flag == _TRUE) + if (pHalData->bautoload_fail_flag == true) memset(pHalData->efuse_eeprom_data, 0xFF, mapLen); else { #ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE @@ -1289,7 +1289,7 @@ u8 mac_hidden_wl_func_to_hal_wl_func(u8 func) int isAdaptorInfoFileValid(void) { - return _TRUE; + return true; } int storeAdaptorInfoFile(char *path, u8 *efuse_data) @@ -1341,13 +1341,13 @@ u8 rtw_efuse_file_read(PADAPTER padapter, u8 *filepatch, u8 *buf, u32 len) ptmpbuf = rtw_zmalloc(bufsize); if (ptmpbuf == NULL) - return _FALSE; + return false; count = rtw_retrieve_from_file(filepatch, ptmpbuf, bufsize); if (count <= 100) { rtw_mfree(ptmpbuf, bufsize); RTW_ERR("%s, filepatch %s, size=%d, FAIL!!\n", __func__, filepatch, count); - return _FALSE; + return false; } i = 0; @@ -1384,7 +1384,7 @@ u8 rtw_efuse_file_read(PADAPTER padapter, u8 *filepatch, u8 *buf, u32 len) rtw_mfree(ptmpbuf, bufsize); RTW_INFO("%s, filepatch %s, size=%d, done\n", __func__, filepatch, count); - return _TRUE; + return true; } #ifdef CONFIG_EFUSE_CONFIG_FILE @@ -1394,14 +1394,14 @@ u32 rtw_read_efuse_from_file(const char *path, u8 *buf, int map_size) u8 c; u8 temp[3]; u8 temp_i; - u8 end = _FALSE; + u8 end = false; u32 ret = _FAIL; u8 *file_data = NULL; u32 file_size, read_size, pos = 0; u8 *map = NULL; - if (rtw_is_file_readable_with_size(path, &file_size) != _TRUE) { + if (rtw_is_file_readable_with_size(path, &file_size) != true) { RTW_PRINT("%s %s is not readable\n", __func__, path); goto exit; } @@ -1432,16 +1432,16 @@ u32 rtw_read_efuse_from_file(const char *path, u8 *buf, int map_size) while (1) { if (pos >= read_size) { - end = _TRUE; + end = true; break; } c = file_data[pos++]; /* bypass spece or eol or null before first hex digit */ - if (temp_i == 0 && (is_eol(c) == _TRUE || is_space(c) == _TRUE || is_null(c) == _TRUE)) + if (temp_i == 0 && (is_eol(c) == true || is_space(c) == true || is_null(c) == true)) continue; - if (IsHexDigit(c) == _FALSE) { + if (IsHexDigit(c) == false) { RTW_ERR("%s invalid 8-bit hex format for offset:0x%03x\n", __func__, i); goto exit; } @@ -1458,7 +1458,7 @@ u32 rtw_read_efuse_from_file(const char *path, u8 *buf, int map_size) } } - if (end == _TRUE) { + if (end == true) { if (temp_i != 0) { RTW_ERR("%s incomplete 8-bit hex format for offset:0x%03x\n", __func__, i); goto exit; @@ -1492,7 +1492,7 @@ u32 rtw_read_macaddr_from_file(const char *path, u8 *buf) u32 read_size, pos = 0; u8 addr[ETH_ALEN]; - if (rtw_is_file_readable(path) != _TRUE) { + if (rtw_is_file_readable(path) != true) { RTW_PRINT("%s %s is not readable\n", __func__, path); goto exit; } @@ -1506,7 +1506,7 @@ u32 rtw_read_macaddr_from_file(const char *path, u8 *buf) temp[2] = 0; /* end of string '\0' */ for (i = 0 ; i < ETH_ALEN ; i++) { - if (IsHexDigit(file_data[i * 3]) == _FALSE || IsHexDigit(file_data[i * 3 + 1]) == _FALSE) { + if (IsHexDigit(file_data[i * 3]) == false || IsHexDigit(file_data[i * 3 + 1]) == false) { RTW_ERR("%s invalid 8-bit hex format for address offset:%u\n", __func__, i); goto exit; } diff --git a/core/rtw_ieee80211.c b/core/rtw_ieee80211.c index 8fcb58a..20f9a1d 100644 --- a/core/rtw_ieee80211.c +++ b/core/rtw_ieee80211.c @@ -140,11 +140,11 @@ uint rtw_is_cckrates_included(u8 *rate) while (rate[i] != 0) { 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) @@ -155,26 +155,26 @@ uint rtw_is_cckratesonly_included(u8 *rate) while (rate[i] != 0) { 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; } 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; @@ -322,7 +322,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]; if (ie) @@ -500,7 +500,7 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv) /* HT Cap. */ if (((pregistrypriv->wireless_mode & WIRELESS_11_5N) || (pregistrypriv->wireless_mode & WIRELESS_11_24N)) - && (pregistrypriv->ht_enable == _TRUE)) { + && (pregistrypriv->ht_enable == true)) { /* todo: */ } @@ -520,7 +520,7 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit) pbuf = rtw_get_ie(pbuf, _WPA_IE_ID_, &len, limit_new); 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; /* check version... */ _rtw_memcpy((u8 *)&leval16, (pbuf + 6), sizeof(val16)); @@ -564,15 +564,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; @@ -580,15 +580,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; @@ -609,7 +609,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; pos = wpa_ie; @@ -757,8 +757,8 @@ int rtw_get_wapi_ie(u8 *in_ie, uint in_len, u8 *wapi_ie, u16 *wapi_len) 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); @@ -796,7 +796,7 @@ int rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie, while (cnt < in_len) { 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)) { if (wpa_ie) _rtw_memcpy(wpa_ie, &in_ie[cnt], in_ie[cnt + 1] + 2); @@ -825,7 +825,7 @@ int rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie, 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) @@ -833,10 +833,10 @@ u8 rtw_is_wps_ie(u8 *ie_ptr, uint *wps_ielen) 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)) { /* RTW_INFO("==> found WPS_IE.....\n"); */ *wps_ielen = ie_ptr[1] + 2; - match = _TRUE; + match = true; } return match; } @@ -898,7 +898,7 @@ u8 *rtw_get_wps_ie(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen) return NULL; } - if (eid == WLAN_EID_VENDOR_SPECIFIC && _rtw_memcmp(&in_ie[cnt + 2], wps_oui, 4) == _TRUE) { + if (eid == WLAN_EID_VENDOR_SPECIFIC && _rtw_memcmp(&in_ie[cnt + 2], wps_oui, 4) == true) { wpsie_ptr = in_ie + cnt; if (wps_ie) @@ -936,7 +936,7 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id , u8 *buf_at *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; /* 6 = 1(Element ID) + 1(Length) + 4(WPS OUI) */ @@ -1322,8 +1322,8 @@ int rtw_get_mac_addr_intel(unsigned char *buf) * check_local_bit: check locally bit or not. * * Output: - * _TRUE: The mac address is invalid. - * _FALSE: The mac address is valid. + * true: The mac address is invalid. + * false: The mac address is valid. * * Auther: Isaac.Li */ @@ -1331,26 +1331,26 @@ u8 rtw_check_invalid_mac_address(u8 *mac_addr, u8 check_local_bit) { u8 null_mac_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0}; u8 multi_mac_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; - u8 res = _FALSE; + u8 res = false; if (_rtw_memcmp(mac_addr, null_mac_addr, ETH_ALEN)) { - res = _TRUE; + res = true; goto func_exit; } if (_rtw_memcmp(mac_addr, multi_mac_addr, ETH_ALEN)) { - res = _TRUE; + res = true; goto func_exit; } if (mac_addr[0] & BIT0) { - res = _TRUE; + res = true; goto func_exit; } - if (check_local_bit == _TRUE) { + if (check_local_bit == true) { if (mac_addr[0] & BIT1) { - res = _TRUE; + res = true; goto func_exit; } } @@ -1397,7 +1397,7 @@ void rtw_macaddr_cfg(u8 *out, const u8 *hw_mac_addr) } err_chk: - if (rtw_check_invalid_mac_address(mac, _TRUE) == _TRUE) { + if (rtw_check_invalid_mac_address(mac, true) == true) { #if DEFAULT_RANDOM_MACADDR RTW_ERR("invalid mac addr:"MAC_FMT", assign random MAC\n", MAC_ARG(mac)); *((u32 *)(&mac[2])) = rtw_random32(); @@ -1582,7 +1582,7 @@ void rtw_bss_get_chbw(WLAN_BSSID_EX *bss, u8 *ch, u8 *bw, u8 *offset) bool rtw_is_chbw_grouped(u8 ch_a, u8 bw_a, u8 offset_a , u8 ch_b, u8 bw_b, u8 offset_b) { - bool is_grouped = _FALSE; + bool is_grouped = false; if (ch_a != ch_b) { /* ch is different */ @@ -1594,7 +1594,7 @@ bool rtw_is_chbw_grouped(u8 ch_a, u8 bw_a, u8 offset_a goto exit; } - is_grouped = _TRUE; + is_grouped = true; exit: return is_grouped; @@ -1786,7 +1786,7 @@ u8 *rtw_get_p2p_ie(u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen) return NULL; } - if (eid == WLAN_EID_VENDOR_SPECIFIC && _rtw_memcmp(&in_ie[cnt + 2], p2p_oui, 4) == _TRUE) { + if (eid == WLAN_EID_VENDOR_SPECIFIC && _rtw_memcmp(&in_ie[cnt + 2], p2p_oui, 4) == true) { p2p_ie_ptr = in_ie + cnt; if (p2p_ie) @@ -1826,7 +1826,7 @@ u8 *rtw_get_p2p_attr(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id , u8 *buf_att if (!p2p_ie || p2p_ielen <= 6 || (p2p_ie[0] != WLAN_EID_VENDOR_SPECIFIC) - || (_rtw_memcmp(p2p_ie + 2, p2p_oui, 4) != _TRUE)) + || (_rtw_memcmp(p2p_ie + 2, p2p_oui, 4) != true)) return attr_ptr; /* 6 = 1(Element ID) + 1(Length) + 3 (OUI) + 1(OUI Type) */ @@ -2130,7 +2130,7 @@ u8 *rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen) return NULL; } - if (eid == WLAN_EID_VENDOR_SPECIFIC && _rtw_memcmp(&in_ie[cnt + 2], wfd_oui, 4) == _TRUE) { + if (eid == WLAN_EID_VENDOR_SPECIFIC && _rtw_memcmp(&in_ie[cnt + 2], wfd_oui, 4) == true) { wfd_ie_ptr = in_ie + cnt; if (wfd_ie) @@ -2170,7 +2170,7 @@ u8 *rtw_get_wfd_attr(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id, u8 *buf_attr if (!wfd_ie || wfd_ielen <= 6 || (wfd_ie[0] != WLAN_EID_VENDOR_SPECIFIC) - || (_rtw_memcmp(wfd_ie + 2, wfd_oui, 4) != _TRUE)) + || (_rtw_memcmp(wfd_ie + 2, wfd_oui, 4) != true)) return attr_ptr; /* 6 = 1(Element ID) + 1(Length) + 3 (OUI) + 1(OUI Type) */ @@ -2642,7 +2642,7 @@ int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8 *category, u8 *act if ((fc & (RTW_IEEE80211_FCTL_FTYPE | RTW_IEEE80211_FCTL_STYPE)) != (RTW_IEEE80211_FTYPE_MGMT | RTW_IEEE80211_STYPE_ACTION) ) - return _FALSE; + return false; c = frame_body[0]; @@ -2658,7 +2658,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[] = { diff --git a/core/rtw_io.c b/core/rtw_io.c index 64ad941..50fa7cb 100644 --- a/core/rtw_io.c +++ b/core/rtw_io.c @@ -320,18 +320,18 @@ int rtw_init_io_priv(_adapter *padapter, void (*set_intf_ops)(_adapter *padapter /* * Increase and check if the continual_io_error of this @param dvobjprive is larger than MAX_CONTINUAL_IO_ERR -* @return _TRUE: -* @return _FALSE: +* @return true: +* @return false: */ int rtw_inc_and_chk_continual_io_error(struct dvobj_priv *dvobj) { - int ret = _FALSE; + int ret = false; int value; value = ATOMIC_INC_RETURN(&dvobj->continual_io_error); if (value > MAX_CONTINUAL_IO_ERR) { RTW_INFO("[dvobj:%p][ERROR] continual_io_error:%d > %d\n", dvobj, value, MAX_CONTINUAL_IO_ERR); - ret = _TRUE; + ret = true; } else { /* RTW_INFO("[dvobj:%p] continual_io_error:%d\n", dvobj, value); */ } @@ -365,10 +365,10 @@ bool match_read_sniff_ranges(u32 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(u32 addr, u16 len) @@ -376,10 +376,10 @@ bool match_write_sniff_ranges(u32 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; } struct rf_sniff_ent { @@ -408,10 +408,10 @@ bool match_rf_read_sniff_ranges(u8 path, u32 addr, u32 mask) for (i = 0; i < rf_read_sniff_num; i++) { if (rf_read_sniff_ranges[i].path == MAX_RF_PATH || rf_read_sniff_ranges[i].path == path) if (addr == rf_read_sniff_ranges[i].reg && (mask & rf_read_sniff_ranges[i].mask)) - return _TRUE; + return true; } - return _FALSE; + return false; } bool match_rf_write_sniff_ranges(u8 path, u32 addr, u32 mask) @@ -421,10 +421,10 @@ bool match_rf_write_sniff_ranges(u8 path, u32 addr, u32 mask) for (i = 0; i < rf_write_sniff_num; i++) { if (rf_write_sniff_ranges[i].path == MAX_RF_PATH || rf_write_sniff_ranges[i].path == path) if (addr == rf_write_sniff_ranges[i].reg && (mask & rf_write_sniff_ranges[i].mask)) - return _TRUE; + return true; } - return _FALSE; + return false; } u8 dbg_rtw_read8(_adapter *adapter, u32 addr, const char *caller, const int line) diff --git a/core/rtw_ioctl_set.c b/core/rtw_ioctl_set.c index 5c6c0e6..67bb8d9 100644 --- a/core/rtw_ioctl_set.c +++ b/core/rtw_ioctl_set.c @@ -27,18 +27,18 @@ (\ ((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_bssid(u8 *bssid) { - u8 ret = _TRUE; + u8 ret = true; if (is_zero_mac_addr(bssid) || is_broadcast_mac_addr(bssid) || is_multicast_mac_addr(bssid) ) - ret = _FALSE; + ret = false; return ret; } @@ -46,10 +46,10 @@ u8 rtw_validate_bssid(u8 *bssid) u8 rtw_validate_ssid(NDIS_802_11_SSID *ssid) { u8 i; - u8 ret = _TRUE; + u8 ret = true; if (ssid->SsidLength > 32) { - ret = _FALSE; + ret = false; goto exit; } @@ -57,7 +57,7 @@ u8 rtw_validate_ssid(NDIS_802_11_SSID *ssid) for (i = 0; i < ssid->SsidLength; i++) { /* wifi, printable ascii code must be supported */ if (!((ssid->Ssid[i] >= 0x20) && (ssid->Ssid[i] <= 0x7e))) { - ret = _FALSE; + ret = false; break; } } @@ -88,25 +88,25 @@ u8 rtw_do_join(_adapter *padapter) 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); /* 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 || rtw_to_roam(padapter) > 0 ) { /* submit site_survey_cmd */ ret = rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0); if (_SUCCESS != ret) { - pmlmepriv->to_join = _FALSE; + pmlmepriv->to_join = false; } } else { - pmlmepriv->to_join = _FALSE; + pmlmepriv->to_join = false; ret = _FAIL; } @@ -116,10 +116,10 @@ u8 rtw_do_join(_adapter *padapter) _exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); select_ret = rtw_select_and_join_from_scanned_queue(pmlmepriv); if (select_ret == _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 */ /* pmlmepriv->lock has been acquired by caller... */ @@ -138,11 +138,11 @@ u8 rtw_do_join(_adapter *padapter) rtw_generate_random_ibss(pibss); if (rtw_create_ibss_cmd(padapter, 0) != _SUCCESS) { - ret = _FALSE; + ret = false; goto exit; } - pmlmepriv->to_join = _FALSE; + pmlmepriv->to_join = false; } else { /* can't associate ; reset under-linking */ @@ -150,17 +150,17 @@ u8 rtw_do_join(_adapter *padapter) /* 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 || rtw_to_roam(padapter) > 0 ) { /* RTW_INFO("rtw_do_join() when no desired bss in scanning queue\n"); */ ret = rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0); if (_SUCCESS != ret) { - pmlmepriv->to_join = _FALSE; + pmlmepriv->to_join = false; } } else { ret = _FAIL; - pmlmepriv->to_join = _FALSE; + pmlmepriv->to_join = false; } } @@ -191,26 +191,26 @@ u8 rtw_set_802_11_bssid(_adapter *padapter, u8 *bssid) _enter_critical_bh(&pmlmepriv->lock, &irqL); RTW_INFO("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) { - if (_rtw_memcmp(&pmlmepriv->cur_network.network.MacAddress, bssid, ETH_ALEN) == _TRUE) { - if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _FALSE) + if (_rtw_memcmp(&pmlmepriv->cur_network.network.MacAddress, bssid, ETH_ALEN) == true) { + 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 { - rtw_disassoc_cmd(padapter, 0, _TRUE); + rtw_disassoc_cmd(padapter, 0, true); - if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) - rtw_indicate_disconnect(padapter, 0, _FALSE); + if (check_fwstate(pmlmepriv, _FW_LINKED) == true) + rtw_indicate_disconnect(padapter, 0, false); 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); } @@ -225,10 +225,10 @@ handle_tkip_countermeasure: memset(&pmlmepriv->assoc_ssid, 0, sizeof(NDIS_802_11_SSID)); _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); @@ -260,27 +260,27 @@ u8 rtw_set_802_11_ssid(_adapter *padapter, NDIS_802_11_SSID *ssid) _enter_critical_bh(&pmlmepriv->lock, &irqL); RTW_INFO("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) { if ((pmlmepriv->assoc_ssid.SsidLength == ssid->SsidLength) && - (_rtw_memcmp(&pmlmepriv->assoc_ssid.Ssid, ssid->Ssid, ssid->SsidLength) == _TRUE)) { - if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _FALSE)) { + (_rtw_memcmp(&pmlmepriv->assoc_ssid.Ssid, ssid->Ssid, ssid->SsidLength) == true)) { + if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == false)) { - 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) - rtw_indicate_disconnect(padapter, 0, _FALSE); + if (check_fwstate(pmlmepriv, _FW_LINKED) == true) + rtw_indicate_disconnect(padapter, 0, false); 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); } @@ -294,14 +294,14 @@ u8 rtw_set_802_11_ssid(_adapter *padapter, NDIS_802_11_SSID *ssid) #endif } else { - rtw_disassoc_cmd(padapter, 0, _TRUE); + rtw_disassoc_cmd(padapter, 0, true); - if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) - rtw_indicate_disconnect(padapter, 0, _FALSE); + if (check_fwstate(pmlmepriv, _FW_LINKED) == true) + rtw_indicate_disconnect(padapter, 0, false); 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); } @@ -314,16 +314,16 @@ handle_tkip_countermeasure: goto release_mlme_lock; } - if (rtw_validate_ssid(ssid) == _FALSE) { + if (rtw_validate_ssid(ssid) == false) { status = _FAIL; goto release_mlme_lock; } _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); @@ -341,17 +341,17 @@ u8 rtw_set_802_11_connect(_adapter *padapter, u8 *bssid, NDIS_802_11_SSID *ssid) unsigned long irqL; u8 status = _SUCCESS; u32 cur_time = 0; - bool bssid_valid = _TRUE; - bool ssid_valid = _TRUE; + bool bssid_valid = true; + bool ssid_valid = true; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - if (!ssid || rtw_validate_ssid(ssid) == _FALSE) - ssid_valid = _FALSE; + if (!ssid || rtw_validate_ssid(ssid) == false) + ssid_valid = false; - if (!bssid || rtw_validate_bssid(bssid) == _FALSE) - bssid_valid = _FALSE; + if (!bssid || rtw_validate_bssid(bssid) == false) + bssid_valid = false; - if (ssid_valid == _FALSE && bssid_valid == _FALSE) { + if (ssid_valid == false && bssid_valid == false) { RTW_INFO(FUNC_ADPT_FMT" ssid:%p, ssid_valid:%d, bssid:%p, bssid_valid:%d\n", FUNC_ADPT_ARG(padapter), ssid, ssid_valid, bssid, bssid_valid); status = _FAIL; @@ -368,9 +368,9 @@ u8 rtw_set_802_11_connect(_adapter *padapter, u8 *bssid, NDIS_802_11_SSID *ssid) RTW_PRINT(FUNC_ADPT_FMT" fw_state=0x%08x\n", FUNC_ADPT_ARG(padapter), 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; handle_tkip_countermeasure: @@ -386,12 +386,12 @@ handle_tkip_countermeasure: if (bssid && bssid_valid) { _rtw_memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN); - pmlmepriv->assoc_by_bssid = _TRUE; + pmlmepriv->assoc_by_bssid = true; } else - 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); @@ -410,7 +410,7 @@ u8 rtw_set_802_11_infrastructure_mode(_adapter *padapter, struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct wlan_network *cur_network = &pmlmepriv->cur_network; NDIS_802_11_NETWORK_INFRASTRUCTURE *pold_state = &(cur_network->network.InfrastructureMode); - u8 ap2sta_mode = _FALSE; + u8 ap2sta_mode = false; if (*pold_state != networktype) { /* RTW_INFO("change mode, old_mode=%d, new_mode=%d, fw_state=0x%x\n", *pold_state, networktype, get_fwstate(pmlmepriv)); */ @@ -418,7 +418,7 @@ u8 rtw_set_802_11_infrastructure_mode(_adapter *padapter, if (*pold_state == Ndis802_11APMode) { /* change to other mode from Ndis802_11APMode */ cur_network->join_res = -1; - ap2sta_mode = _TRUE; + ap2sta_mode = true; #ifdef CONFIG_NATIVEAP_MLME stop_ap_mode(padapter); #endif @@ -426,16 +426,16 @@ u8 rtw_set_802_11_infrastructure_mode(_adapter *padapter, _enter_critical_bh(&pmlmepriv->lock, &irqL); - 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) { - rtw_indicate_disconnect(padapter, 0, _FALSE); /*will clr Linked_state; before this function, we must have checked whether issue dis-assoc_cmd or not*/ + if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { + rtw_indicate_disconnect(padapter, 0, false); /*will clr Linked_state; before this function, we must have checked whether issue dis-assoc_cmd or not*/ } } @@ -477,7 +477,7 @@ u8 rtw_set_802_11_infrastructure_mode(_adapter *padapter, _exit_critical_bh(&pmlmepriv->lock, &irqL); } - return _TRUE; + return true; } u8 rtw_set_802_11_disassociate(_adapter *padapter) @@ -487,10 +487,10 @@ u8 rtw_set_802_11_disassociate(_adapter *padapter) _enter_critical_bh(&pmlmepriv->lock, &irqL); - if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { + if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { - rtw_disassoc_cmd(padapter, 0, _TRUE); - rtw_indicate_disconnect(padapter, 0, _FALSE); + rtw_disassoc_cmd(padapter, 0, true); + rtw_indicate_disconnect(padapter, 0, false); /* modify for CONFIG_IEEE80211W, none 11w can use it */ rtw_free_assoc_resources_cmd(padapter); if (_FAIL == rtw_pwr_wakeup(padapter)) @@ -499,14 +499,14 @@ u8 rtw_set_802_11_disassociate(_adapter *padapter) _exit_critical_bh(&pmlmepriv->lock, &irqL); - return _TRUE; + return true; } u8 rtw_set_802_11_bssid_list_scan(_adapter *padapter, NDIS_802_11_SSID *pssid, int ssid_max_num, struct rtw_ieee80211_channel *ch, int ch_num) { unsigned long irqL; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - u8 res = _TRUE; + u8 res = true; _enter_critical_bh(&pmlmepriv->lock, &irqL); res = rtw_sitesurvey_cmd(padapter, pssid, ssid_max_num, ch, ch_num); @@ -534,9 +534,9 @@ u8 rtw_set_802_11_authentication_mode(_adapter *padapter, NDIS_802_11_AUTHENTICA res = rtw_set_auth(padapter, psecuritypriv); if (res == _SUCCESS) - ret = _TRUE; + ret = true; else - ret = _FALSE; + ret = false; return ret; } @@ -550,12 +550,12 @@ u8 rtw_set_802_11_add_wep(_adapter *padapter, NDIS_802_11_WEP *wep) struct security_priv *psecuritypriv = &(padapter->securitypriv); u8 ret = _SUCCESS; - 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) { - ret = _FALSE; + ret = false; goto exit; } @@ -577,10 +577,10 @@ u8 rtw_set_802_11_add_wep(_adapter *padapter, NDIS_802_11_WEP *wep) psecuritypriv->dot11PrivacyKeyIndex = keyid; - res = rtw_set_key(padapter, psecuritypriv, keyid, 1, _TRUE); + res = rtw_set_key(padapter, psecuritypriv, keyid, 1, true); if (res == _FAIL) - ret = _FALSE; + ret = false; exit: return ret; @@ -594,7 +594,7 @@ u8 rtw_set_802_11_remove_wep(_adapter *padapter, u32 keyindex) if (keyindex >= 0x80000000 || padapter == NULL) { - ret = _FALSE; + ret = false; goto exit; } else { @@ -604,7 +604,7 @@ u8 rtw_set_802_11_remove_wep(_adapter *padapter, u32 keyindex) memset(&psecuritypriv->dot11DefKey[keyindex], 0, 16); - res = rtw_set_key(padapter, psecuritypriv, keyindex, 0, _TRUE); + res = rtw_set_key(padapter, psecuritypriv, keyindex, 0, true); psecuritypriv->dot11DefKeylen[keyindex] = 0; @@ -628,8 +628,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; if (((key->KeyIndex & 0x80000000) == 0) && ((key->KeyIndex & 0x40000000) > 0)) { @@ -661,9 +661,9 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key) } /* check BSSID */ - if (IS_MAC_ADDRESS_BROADCAST(key->BSSID) == _TRUE) { + if (IS_MAC_ADDRESS_BROADCAST(key->BSSID) == true) { - ret = _FALSE; + ret = false; goto exit; } @@ -692,7 +692,7 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key) goto exit; } - bgroup = _FALSE; + bgroup = false; /* Check the pairwise key. Added by Annie, 2005-07-06. */ @@ -721,7 +721,7 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key) } - 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)) { ret = _FAIL; goto exit; } @@ -746,12 +746,12 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key) } 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)) - bgrouptkey = _TRUE; + if ((check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE) == true) && (check_fwstate(&padapter->mlmepriv, _FW_LINKED) == true)) + bgrouptkey = true; - bgroup = _TRUE; + bgroup = true; } @@ -781,7 +781,7 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key) if (key->KeyIndex & 0x20000000) { /* SetRSC */ - if (bgroup == _TRUE) { + if (bgroup == true) { NDIS_802_11_KEY_RSC keysrc = key->KeyRSC & 0x00FFFFFFFFFFFFULL; _rtw_memcpy(&padapter->securitypriv.dot11Grprxpn, &keysrc, 8); } else { @@ -793,10 +793,10 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key) /* 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; if ((key->KeyIndex & 0x3) == 0) { @@ -823,11 +823,11 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key) key->KeyIndex = key->KeyIndex & 0x03; - padapter->securitypriv.binstallGrpkey = _TRUE; + padapter->securitypriv.binstallGrpkey = true; - padapter->securitypriv.bcheck_grpkey = _FALSE; + padapter->securitypriv.bcheck_grpkey = false; - res = rtw_set_key(padapter, &padapter->securitypriv, key->KeyIndex, 1, _TRUE); + res = rtw_set_key(padapter, &padapter->securitypriv, key->KeyIndex, 1, true); if (res == _FAIL) ret = _FAIL; @@ -846,7 +846,7 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key) _rtw_memcpy(&stainfo->dot118021x_UncstKey, key->KeyMaterial, 16); if (encryptionalgo == _TKIP_) { - padapter->securitypriv.busetkipkey = _FALSE; + padapter->securitypriv.busetkipkey = false; /* _set_timer(&padapter->securitypriv.tkip_timer, 50); */ @@ -867,9 +867,9 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key) /* Set key to CAM through H2C command */ - res = rtw_setstakey_cmd(padapter, stainfo, UNICAST_KEY, _TRUE); + res = rtw_setstakey_cmd(padapter, stainfo, UNICAST_KEY, true); - if (res == _FALSE) + if (res == false) ret = _FAIL; } } @@ -885,7 +885,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; @@ -894,7 +894,7 @@ u8 rtw_set_802_11_remove_key(_adapter *padapter, NDIS_802_11_REMOVE_KEY *key) 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); */ @@ -924,7 +924,7 @@ u8 rtw_set_802_11_remove_key(_adapter *padapter, NDIS_802_11_REMOVE_KEY *key) exit: - return _TRUE; + return true; } @@ -946,13 +946,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; psta = rtw_get_stainfo(&adapter->stapriv, get_bssid(pmlmepriv)); diff --git a/core/rtw_iol.c b/core/rtw_iol.c index 32217a7..4f2799b 100644 --- a/core/rtw_iol.c +++ b/core/rtw_iol.c @@ -85,12 +85,12 @@ 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; if ((2 == adapter->registrypriv.fw_iol) && (IS_FULL_SPEED_USB(adapter))) - return _TRUE; + return true; - return _FALSE; + return false; } int rtw_IOL_exec_cmds_sync(ADAPTER *adapter, struct xmit_frame *xmit_frame, u32 max_wating_ms, u32 bndy_cnt) @@ -216,14 +216,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); /* RTW_INFO("==> %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; } diff --git a/core/rtw_mi.c b/core/rtw_mi.c index 4ddd017..73742b2 100644 --- a/core/rtw_mi.c +++ b/core/rtw_mi.c @@ -61,7 +61,7 @@ static int _rtw_mi_get_ch_setting_union(_adapter *adapter, u8 *ch, u8 *bw, u8 *o if (check_fwstate(&iface->mlmepriv, WIFI_OP_CH_SWITCHING)) continue; - if (include_self == _FALSE && adapter == iface) + if (include_self == false && adapter == iface) continue; if (num == 0) { @@ -122,40 +122,40 @@ static void _rtw_mi_status(_adapter *adapter, struct mi_state *mstate, bool incl for (i = 0; i < dvobj->iface_nums; i++) { iface = dvobj->padapters[i]; - if (include_self == _FALSE && iface == adapter) + if (include_self == false && iface == adapter) continue; - if (check_fwstate(&iface->mlmepriv, WIFI_STATION_STATE) == _TRUE) { + if (check_fwstate(&iface->mlmepriv, WIFI_STATION_STATE) == true) { MSTATE_STA_NUM(mstate)++; - if (check_fwstate(&iface->mlmepriv, _FW_LINKED) == _TRUE) + if (check_fwstate(&iface->mlmepriv, _FW_LINKED) == true) MSTATE_STA_LD_NUM(mstate)++; - if (check_fwstate(&iface->mlmepriv, _FW_UNDER_LINKING) == _TRUE) + if (check_fwstate(&iface->mlmepriv, _FW_UNDER_LINKING) == true) MSTATE_STA_LG_NUM(mstate)++; - } else if (check_fwstate(&iface->mlmepriv, WIFI_AP_STATE) == _TRUE - && check_fwstate(&iface->mlmepriv, _FW_LINKED) == _TRUE + } else if (check_fwstate(&iface->mlmepriv, WIFI_AP_STATE) == true + && check_fwstate(&iface->mlmepriv, _FW_LINKED) == true ) { MSTATE_AP_NUM(mstate)++; if (iface->stapriv.asoc_sta_count > 2) MSTATE_AP_LD_NUM(mstate)++; - } else if (check_fwstate(&iface->mlmepriv, WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE) == _TRUE - && check_fwstate(&iface->mlmepriv, _FW_LINKED) == _TRUE + } else if (check_fwstate(&iface->mlmepriv, WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE) == true + && check_fwstate(&iface->mlmepriv, _FW_LINKED) == true ) { MSTATE_ADHOC_NUM(mstate)++; if (iface->stapriv.asoc_sta_count > 2) MSTATE_ADHOC_LD_NUM(mstate)++; } - if (check_fwstate(&iface->mlmepriv, WIFI_UNDER_WPS) == _TRUE) + if (check_fwstate(&iface->mlmepriv, WIFI_UNDER_WPS) == true) MSTATE_WPS_NUM(mstate)++; #ifdef CONFIG_IOCTL_CFG80211 if (rtw_cfg80211_get_is_mgmt_tx(iface)) MSTATE_MGMT_TX_NUM(mstate)++; #ifdef CONFIG_P2P - if (rtw_cfg80211_get_is_roch(iface) == _TRUE) + if (rtw_cfg80211_get_is_roch(iface) == true) MSTATE_ROCH_NUM(mstate)++; #endif #endif /* CONFIG_IOCTL_CFG80211 */ @@ -243,7 +243,7 @@ u8 rtw_mi_check_status(_adapter *adapter, u8 type) { struct dvobj_priv *dvobj = adapter_to_dvobj(adapter); struct mi_state *iface_state = &dvobj->iface_state; - u8 ret = _FALSE; + u8 ret = false; #ifdef DBG_IFACE_STATUS DBG_IFACE_STATUS_DUMP(adapter); @@ -253,46 +253,46 @@ u8 rtw_mi_check_status(_adapter *adapter, u8 type) switch (type) { case MI_LINKED: if (MSTATE_STA_LD_NUM(iface_state) || MSTATE_AP_NUM(iface_state) || MSTATE_ADHOC_NUM(iface_state)) /*check_fwstate(&iface->mlmepriv, _FW_LINKED)*/ - ret = _TRUE; + ret = true; break; case MI_ASSOC: if (MSTATE_STA_LD_NUM(iface_state) || MSTATE_AP_LD_NUM(iface_state) || MSTATE_ADHOC_LD_NUM(iface_state)) - ret = _TRUE; + ret = true; break; case MI_UNDER_WPS: if (MSTATE_WPS_NUM(iface_state)) - ret = _TRUE; + ret = true; break; case MI_AP_MODE: if (MSTATE_AP_NUM(iface_state)) - ret = _TRUE; + ret = true; break; case MI_AP_ASSOC: if (MSTATE_AP_LD_NUM(iface_state)) - ret = _TRUE; + ret = true; break; case MI_ADHOC: if (MSTATE_ADHOC_NUM(iface_state)) - ret = _TRUE; + ret = true; break; case MI_ADHOC_ASSOC: if (MSTATE_ADHOC_LD_NUM(iface_state)) - ret = _TRUE; + ret = true; break; case MI_STA_NOLINK: /* this is misleading, but not used now */ if (MSTATE_STA_NUM(iface_state) && (!(MSTATE_STA_LD_NUM(iface_state) || MSTATE_STA_LG_NUM(iface_state)))) - ret = _TRUE; + ret = true; break; case MI_STA_LINKED: if (MSTATE_STA_LD_NUM(iface_state)) - ret = _TRUE; + ret = true; break; case MI_STA_LINKING: if (MSTATE_STA_LG_NUM(iface_state)) - ret = _TRUE; + ret = true; break; default: @@ -313,20 +313,20 @@ u8 rtw_mi_mp_mode_check(_adapter *padapter) iface = dvobj->padapters[i]; if ((iface) && (iface->registrypriv.mp_mode == 1)) - return _TRUE; + return true; } #else if (padapter->registrypriv.mp_mode == 1) - return _TRUE; + return true; #endif #endif /* CONFIG_MP_INCLUDED */ - return _FALSE; + return false; } /* * return value : 0 is failed or have not interface meet condition * return value : !0 is success or interface numbers which meet condition -* return value of ops_func must be _TRUE or _FALSE +* return value of ops_func must be true or false */ static u8 _rtw_mi_process(_adapter *padapter, bool exclude_self, void *data, u8(*ops_func)(_adapter *padapter, void *data)) @@ -345,7 +345,7 @@ static u8 _rtw_mi_process(_adapter *padapter, bool exclude_self, continue; if (ops_func) - if (_TRUE == ops_func(iface, data)) + if (true == ops_func(iface, data)) ret++; } } @@ -359,19 +359,19 @@ static u8 _rtw_mi_netif_stop_queue(_adapter *padapter, void *data) if (carrier_off) netif_carrier_off(pnetdev); rtw_netif_stop_queue(pnetdev); - return _TRUE; + return true; } u8 rtw_mi_netif_stop_queue(_adapter *padapter, bool carrier_off) { bool in_data = carrier_off; - return _rtw_mi_process(padapter, _FALSE, &in_data, _rtw_mi_netif_stop_queue); + return _rtw_mi_process(padapter, false, &in_data, _rtw_mi_netif_stop_queue); } u8 rtw_mi_buddy_netif_stop_queue(_adapter *padapter, bool carrier_off) { bool in_data = carrier_off; - return _rtw_mi_process(padapter, _TRUE, &in_data, _rtw_mi_netif_stop_queue); + return _rtw_mi_process(padapter, true, &in_data, _rtw_mi_netif_stop_queue); } static u8 _rtw_mi_netif_wake_queue(_adapter *padapter, void *data) @@ -380,15 +380,15 @@ static u8 _rtw_mi_netif_wake_queue(_adapter *padapter, void *data) if (pnetdev) rtw_netif_wake_queue(pnetdev); - return _TRUE; + return true; } u8 rtw_mi_netif_wake_queue(_adapter *padapter) { - return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_netif_wake_queue); + return _rtw_mi_process(padapter, false, NULL, _rtw_mi_netif_wake_queue); } u8 rtw_mi_buddy_netif_wake_queue(_adapter *padapter) { - return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_netif_wake_queue); + return _rtw_mi_process(padapter, true, NULL, _rtw_mi_netif_wake_queue); } static u8 _rtw_mi_netif_carrier_on(_adapter *padapter, void *data) @@ -397,15 +397,15 @@ static u8 _rtw_mi_netif_carrier_on(_adapter *padapter, void *data) if (pnetdev) rtw_netif_carrier_on(pnetdev); - return _TRUE; + return true; } u8 rtw_mi_netif_carrier_on(_adapter *padapter) { - return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_netif_carrier_on); + return _rtw_mi_process(padapter, false, NULL, _rtw_mi_netif_carrier_on); } u8 rtw_mi_buddy_netif_carrier_on(_adapter *padapter) { - return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_netif_carrier_on); + return _rtw_mi_process(padapter, true, NULL, _rtw_mi_netif_carrier_on); } static u8 _rtw_mi_scan_abort(_adapter *adapter, void *data) @@ -417,104 +417,104 @@ static u8 _rtw_mi_scan_abort(_adapter *adapter, void *data) else rtw_scan_abort_no_wait(adapter); - return _TRUE; + return true; } void rtw_mi_scan_abort(_adapter *adapter, bool bwait) { bool in_data = bwait; - _rtw_mi_process(adapter, _FALSE, &in_data, _rtw_mi_scan_abort); + _rtw_mi_process(adapter, false, &in_data, _rtw_mi_scan_abort); } void rtw_mi_buddy_scan_abort(_adapter *adapter, bool bwait) { bool in_data = bwait; - _rtw_mi_process(adapter, _TRUE, &in_data, _rtw_mi_scan_abort); + _rtw_mi_process(adapter, true, &in_data, _rtw_mi_scan_abort); } static u8 _rtw_mi_start_drv_threads(_adapter *adapter, void *data) { rtw_start_drv_threads(adapter); - return _TRUE; + return true; } void rtw_mi_start_drv_threads(_adapter *adapter) { - _rtw_mi_process(adapter, _FALSE, NULL, _rtw_mi_start_drv_threads); + _rtw_mi_process(adapter, false, NULL, _rtw_mi_start_drv_threads); } void rtw_mi_buddy_start_drv_threads(_adapter *adapter) { - _rtw_mi_process(adapter, _TRUE, NULL, _rtw_mi_start_drv_threads); + _rtw_mi_process(adapter, true, NULL, _rtw_mi_start_drv_threads); } static u8 _rtw_mi_stop_drv_threads(_adapter *adapter, void *data) { rtw_stop_drv_threads(adapter); - return _TRUE; + return true; } void rtw_mi_stop_drv_threads(_adapter *adapter) { - _rtw_mi_process(adapter, _FALSE, NULL, _rtw_mi_stop_drv_threads); + _rtw_mi_process(adapter, false, NULL, _rtw_mi_stop_drv_threads); } void rtw_mi_buddy_stop_drv_threads(_adapter *adapter) { - _rtw_mi_process(adapter, _TRUE, NULL, _rtw_mi_stop_drv_threads); + _rtw_mi_process(adapter, true, NULL, _rtw_mi_stop_drv_threads); } static u8 _rtw_mi_cancel_all_timer(_adapter *adapter, void *data) { rtw_cancel_all_timer(adapter); - return _TRUE; + return true; } void rtw_mi_cancel_all_timer(_adapter *adapter) { - _rtw_mi_process(adapter, _FALSE, NULL, _rtw_mi_cancel_all_timer); + _rtw_mi_process(adapter, false, NULL, _rtw_mi_cancel_all_timer); } void rtw_mi_buddy_cancel_all_timer(_adapter *adapter) { - _rtw_mi_process(adapter, _TRUE, NULL, _rtw_mi_cancel_all_timer); + _rtw_mi_process(adapter, true, NULL, _rtw_mi_cancel_all_timer); } static u8 _rtw_mi_reset_drv_sw(_adapter *adapter, void *data) { rtw_reset_drv_sw(adapter); - return _TRUE; + return true; } void rtw_mi_reset_drv_sw(_adapter *adapter) { - _rtw_mi_process(adapter, _FALSE, NULL, _rtw_mi_reset_drv_sw); + _rtw_mi_process(adapter, false, NULL, _rtw_mi_reset_drv_sw); } void rtw_mi_buddy_reset_drv_sw(_adapter *adapter) { - _rtw_mi_process(adapter, _TRUE, NULL, _rtw_mi_reset_drv_sw); + _rtw_mi_process(adapter, true, NULL, _rtw_mi_reset_drv_sw); } static u8 _rtw_mi_intf_start(_adapter *adapter, void *data) { rtw_intf_start(adapter); - return _TRUE; + return true; } void rtw_mi_intf_start(_adapter *adapter) { - _rtw_mi_process(adapter, _FALSE, NULL, _rtw_mi_intf_start); + _rtw_mi_process(adapter, false, NULL, _rtw_mi_intf_start); } void rtw_mi_buddy_intf_start(_adapter *adapter) { - _rtw_mi_process(adapter, _TRUE, NULL, _rtw_mi_intf_start); + _rtw_mi_process(adapter, true, NULL, _rtw_mi_intf_start); } static u8 _rtw_mi_intf_stop(_adapter *adapter, void *data) { rtw_intf_stop(adapter); - return _TRUE; + return true; } void rtw_mi_intf_stop(_adapter *adapter) { - _rtw_mi_process(adapter, _FALSE, NULL, _rtw_mi_intf_stop); + _rtw_mi_process(adapter, false, NULL, _rtw_mi_intf_stop); } void rtw_mi_buddy_intf_stop(_adapter *adapter) { - _rtw_mi_process(adapter, _TRUE, NULL, _rtw_mi_intf_stop); + _rtw_mi_process(adapter, true, NULL, _rtw_mi_intf_stop); } static u8 _rtw_mi_suspend_free_assoc_resource(_adapter *padapter, void *data) @@ -523,11 +523,11 @@ static u8 _rtw_mi_suspend_free_assoc_resource(_adapter *padapter, void *data) } void rtw_mi_suspend_free_assoc_resource(_adapter *adapter) { - _rtw_mi_process(adapter, _FALSE, NULL, _rtw_mi_suspend_free_assoc_resource); + _rtw_mi_process(adapter, false, NULL, _rtw_mi_suspend_free_assoc_resource); } void rtw_mi_buddy_suspend_free_assoc_resource(_adapter *adapter) { - _rtw_mi_process(adapter, _TRUE, NULL, _rtw_mi_suspend_free_assoc_resource); + _rtw_mi_process(adapter, true, NULL, _rtw_mi_suspend_free_assoc_resource); } static u8 _rtw_mi_is_scan_deny(_adapter *adapter, void *data) @@ -537,12 +537,12 @@ static u8 _rtw_mi_is_scan_deny(_adapter *adapter, void *data) u8 rtw_mi_is_scan_deny(_adapter *adapter) { - return _rtw_mi_process(adapter, _FALSE, NULL, _rtw_mi_is_scan_deny); + return _rtw_mi_process(adapter, false, NULL, _rtw_mi_is_scan_deny); } u8 rtw_mi_buddy_is_scan_deny(_adapter *adapter) { - return _rtw_mi_process(adapter, _TRUE, NULL, _rtw_mi_is_scan_deny); + return _rtw_mi_process(adapter, true, NULL, _rtw_mi_is_scan_deny); } #ifdef CONFIG_SET_SCAN_DENY_TIMER @@ -551,19 +551,19 @@ static u8 _rtw_mi_set_scan_deny(_adapter *adapter, void *data) u32 ms = *(u32 *)data; rtw_set_scan_deny(adapter, ms); - return _TRUE; + return true; } void rtw_mi_set_scan_deny(_adapter *adapter, u32 ms) { u32 in_data = ms; - _rtw_mi_process(adapter, _FALSE, &in_data, _rtw_mi_set_scan_deny); + _rtw_mi_process(adapter, false, &in_data, _rtw_mi_set_scan_deny); } void rtw_mi_buddy_set_scan_deny(_adapter *adapter, u32 ms) { u32 in_data = ms; - _rtw_mi_process(adapter, _TRUE, &in_data, _rtw_mi_set_scan_deny); + _rtw_mi_process(adapter, true, &in_data, _rtw_mi_set_scan_deny); } #endif @@ -578,12 +578,12 @@ static u8 _rtw_mi_issue_nulldata(_adapter *padapter, void *data) { struct nulldata_param *pnulldata_param = (struct nulldata_param *)data; - if (is_client_associated_to_ap(padapter) == _TRUE) { + if (is_client_associated_to_ap(padapter) == true) { /* TODO: TDLS peers */ issue_nulldata(padapter, pnulldata_param->da, pnulldata_param->power_mode, pnulldata_param->try_cnt, pnulldata_param->wait_ms); - return _TRUE; + return true; } - return _FALSE; + return false; } u8 rtw_mi_issue_nulldata(_adapter *padapter, unsigned char *da, unsigned int power_mode, int try_cnt, int wait_ms) @@ -595,7 +595,7 @@ u8 rtw_mi_issue_nulldata(_adapter *padapter, unsigned char *da, unsigned int pow nparam.try_cnt = try_cnt; nparam.wait_ms = wait_ms; - return _rtw_mi_process(padapter, _FALSE, &nparam, _rtw_mi_issue_nulldata); + return _rtw_mi_process(padapter, false, &nparam, _rtw_mi_issue_nulldata); } u8 rtw_mi_buddy_issue_nulldata(_adapter *padapter, unsigned char *da, unsigned int power_mode, int try_cnt, int wait_ms) { @@ -606,7 +606,7 @@ u8 rtw_mi_buddy_issue_nulldata(_adapter *padapter, unsigned char *da, unsigned i nparam.try_cnt = try_cnt; nparam.wait_ms = wait_ms; - return _rtw_mi_process(padapter, _TRUE, &nparam, _rtw_mi_issue_nulldata); + return _rtw_mi_process(padapter, true, &nparam, _rtw_mi_issue_nulldata); } static u8 _rtw_mi_beacon_update(_adapter *padapter, void *data) @@ -614,21 +614,21 @@ static u8 _rtw_mi_beacon_update(_adapter *padapter, void *data) struct mlme_ext_priv *mlmeext = &padapter->mlmeextpriv; if (mlmeext_msr(mlmeext) == WIFI_FW_AP_STATE - && check_fwstate(&padapter->mlmepriv, _FW_LINKED) == _TRUE) { + && check_fwstate(&padapter->mlmepriv, _FW_LINKED) == true) { RTW_INFO(ADPT_FMT"-WIFI_FW_AP_STATE - update_beacon\n", ADPT_ARG(padapter)); - update_beacon(padapter, 0, NULL, _TRUE); + update_beacon(padapter, 0, NULL, true); } - return _TRUE; + return true; } void rtw_mi_beacon_update(_adapter *padapter) { - _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_beacon_update); + _rtw_mi_process(padapter, false, NULL, _rtw_mi_beacon_update); } void rtw_mi_buddy_beacon_update(_adapter *padapter) { - _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_beacon_update); + _rtw_mi_process(padapter, true, NULL, _rtw_mi_beacon_update); } static u8 _rtw_mi_hal_dump_macaddr(_adapter *padapter, void *data) @@ -637,15 +637,15 @@ static u8 _rtw_mi_hal_dump_macaddr(_adapter *padapter, void *data) rtw_hal_get_macaddr_port(padapter, mac_addr); RTW_INFO(ADPT_FMT"MAC Address ="MAC_FMT"\n", ADPT_ARG(padapter), MAC_ARG(mac_addr)); - return _TRUE; + return true; } void rtw_mi_hal_dump_macaddr(_adapter *padapter) { - _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_hal_dump_macaddr); + _rtw_mi_process(padapter, false, NULL, _rtw_mi_hal_dump_macaddr); } void rtw_mi_buddy_hal_dump_macaddr(_adapter *padapter) { - _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_hal_dump_macaddr); + _rtw_mi_process(padapter, true, NULL, _rtw_mi_hal_dump_macaddr); } static u8 _rtw_mi_busy_traffic_check(_adapter *padapter, void *data) @@ -654,33 +654,33 @@ static u8 _rtw_mi_busy_traffic_check(_adapter *padapter, void *data) struct mlme_priv *pmlmepriv = &padapter->mlmepriv; bool check_sc_interval = *(bool *)data; - if (pmlmepriv->LinkDetectInfo.bBusyTraffic == _TRUE) { + if (pmlmepriv->LinkDetectInfo.bBusyTraffic == true) { if (check_sc_interval) { /* Miracast can't do AP scan*/ passtime = rtw_get_passing_time_ms(pmlmepriv->lastscantime); pmlmepriv->lastscantime = rtw_get_current_time(); if (passtime > BUSY_TRAFFIC_SCAN_DENY_PERIOD) { - RTW_INFO(ADPT_FMT" bBusyTraffic == _TRUE\n", ADPT_ARG(padapter)); - return _TRUE; + RTW_INFO(ADPT_FMT" bBusyTraffic == true\n", ADPT_ARG(padapter)); + return true; } } else - return _TRUE; + return true; } - return _FALSE; + return false; } u8 rtw_mi_busy_traffic_check(_adapter *padapter, bool check_sc_interval) { bool in_data = check_sc_interval; - return _rtw_mi_process(padapter, _FALSE, &in_data, _rtw_mi_busy_traffic_check); + return _rtw_mi_process(padapter, false, &in_data, _rtw_mi_busy_traffic_check); } u8 rtw_mi_buddy_busy_traffic_check(_adapter *padapter, bool check_sc_interval) { bool in_data = check_sc_interval; - return _rtw_mi_process(padapter, _TRUE, &in_data, _rtw_mi_busy_traffic_check); + return _rtw_mi_process(padapter, true, &in_data, _rtw_mi_busy_traffic_check); } static u8 _rtw_mi_check_mlmeinfo_state(_adapter *padapter, void *data) { @@ -689,23 +689,23 @@ static u8 _rtw_mi_check_mlmeinfo_state(_adapter *padapter, void *data) /*if (mlmeext_msr(mlmeext) == state)*/ if (check_mlmeinfo_state(mlmeext, state)) - return _TRUE; + return true; else - return _FALSE; + return false; } u8 rtw_mi_check_mlmeinfo_state(_adapter *padapter, u32 state) { u32 in_data = state; - return _rtw_mi_process(padapter, _FALSE, &in_data, _rtw_mi_check_mlmeinfo_state); + return _rtw_mi_process(padapter, false, &in_data, _rtw_mi_check_mlmeinfo_state); } u8 rtw_mi_buddy_check_mlmeinfo_state(_adapter *padapter, u32 state) { u32 in_data = state; - return _rtw_mi_process(padapter, _TRUE, &in_data, _rtw_mi_check_mlmeinfo_state); + return _rtw_mi_process(padapter, true, &in_data, _rtw_mi_check_mlmeinfo_state); } /*#define DBG_DUMP_FW_STATE*/ @@ -742,15 +742,15 @@ static void rtw_dbg_dump_fwstate(_adapter *padapter, sint state) static u8 _rtw_mi_check_fwstate(_adapter *padapter, void *data) { - u8 ret = _FALSE; + u8 ret = false; sint state = *(sint *)data; if ((state == WIFI_FW_NULL_STATE) && (padapter->mlmepriv.fw_state == WIFI_FW_NULL_STATE)) - ret = _TRUE; - else if (_TRUE == check_fwstate(&padapter->mlmepriv, state)) - ret = _TRUE; + ret = true; + else if (true == check_fwstate(&padapter->mlmepriv, state)) + ret = true; #ifdef DBG_DUMP_FW_STATE if (ret) rtw_dbg_dump_fwstate(padapter, state); @@ -761,13 +761,13 @@ u8 rtw_mi_check_fwstate(_adapter *padapter, sint state) { sint in_data = state; - return _rtw_mi_process(padapter, _FALSE, &in_data, _rtw_mi_check_fwstate); + return _rtw_mi_process(padapter, false, &in_data, _rtw_mi_check_fwstate); } u8 rtw_mi_buddy_check_fwstate(_adapter *padapter, sint state) { sint in_data = state; - return _rtw_mi_process(padapter, _TRUE, &in_data, _rtw_mi_check_fwstate); + return _rtw_mi_process(padapter, true, &in_data, _rtw_mi_check_fwstate); } static u8 _rtw_mi_traffic_statistics(_adapter *padapter , void *data) @@ -783,11 +783,11 @@ static u8 _rtw_mi_traffic_statistics(_adapter *padapter , void *data) pdvobjpriv->traffic_stat.rx_bytes += padapter->recvpriv.rx_bytes; pdvobjpriv->traffic_stat.rx_pkts += padapter->recvpriv.rx_pkts; pdvobjpriv->traffic_stat.rx_drop += padapter->recvpriv.rx_drop; - return _TRUE; + return true; } u8 rtw_mi_traffic_statistics(_adapter *padapter) { - return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_traffic_statistics); + return _rtw_mi_process(padapter, false, NULL, _rtw_mi_traffic_statistics); } static u8 _rtw_mi_check_miracast_enabled(_adapter *padapter , void *data) @@ -796,7 +796,7 @@ static u8 _rtw_mi_check_miracast_enabled(_adapter *padapter , void *data) } u8 rtw_mi_check_miracast_enabled(_adapter *padapter) { - return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_check_miracast_enabled); + return _rtw_mi_process(padapter, false, NULL, _rtw_mi_check_miracast_enabled); } #ifdef CONFIG_XMIT_THREAD_MODE @@ -808,11 +808,11 @@ static u8 _rtw_mi_check_pending_xmitbuf(_adapter *padapter , void *data) } u8 rtw_mi_check_pending_xmitbuf(_adapter *padapter) { - return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_check_pending_xmitbuf); + return _rtw_mi_process(padapter, false, NULL, _rtw_mi_check_pending_xmitbuf); } u8 rtw_mi_buddy_check_pending_xmitbuf(_adapter *padapter) { - return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_check_pending_xmitbuf); + return _rtw_mi_process(padapter, true, NULL, _rtw_mi_check_pending_xmitbuf); } #endif @@ -832,68 +832,68 @@ static void _rtw_mi_adapter_reset(_adapter *padapter , u8 exclude_self) void rtw_mi_adapter_reset(_adapter *padapter) { - _rtw_mi_adapter_reset(padapter, _FALSE); + _rtw_mi_adapter_reset(padapter, false); } void rtw_mi_buddy_adapter_reset(_adapter *padapter) { - _rtw_mi_adapter_reset(padapter, _TRUE); + _rtw_mi_adapter_reset(padapter, true); } static u8 _rtw_mi_dynamic_check_timer_handler(_adapter *adapter, void *data) { rtw_iface_dynamic_check_timer_handler(adapter); - return _TRUE; + return true; } u8 rtw_mi_dynamic_check_timer_handler(_adapter *padapter) { - return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_dynamic_check_timer_handler); + return _rtw_mi_process(padapter, false, NULL, _rtw_mi_dynamic_check_timer_handler); } u8 rtw_mi_buddy_dynamic_check_timer_handler(_adapter *padapter) { - return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_dynamic_check_timer_handler); + return _rtw_mi_process(padapter, true, NULL, _rtw_mi_dynamic_check_timer_handler); } static u8 _rtw_mi_dev_unload(_adapter *adapter, void *data) { rtw_dev_unload(adapter); - return _TRUE; + return true; } u8 rtw_mi_dev_unload(_adapter *padapter) { - return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_dev_unload); + return _rtw_mi_process(padapter, false, NULL, _rtw_mi_dev_unload); } u8 rtw_mi_buddy_dev_unload(_adapter *padapter) { - return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_dev_unload); + return _rtw_mi_process(padapter, true, NULL, _rtw_mi_dev_unload); } static u8 _rtw_mi_dynamic_chk_wk_hdl(_adapter *adapter, void *data) { rtw_iface_dynamic_chk_wk_hdl(adapter); - return _TRUE; + return true; } u8 rtw_mi_dynamic_chk_wk_hdl(_adapter *padapter) { - return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_dynamic_chk_wk_hdl); + return _rtw_mi_process(padapter, false, NULL, _rtw_mi_dynamic_chk_wk_hdl); } u8 rtw_mi_buddy_dynamic_chk_wk_hdl(_adapter *padapter) { - return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_dynamic_chk_wk_hdl); + return _rtw_mi_process(padapter, true, NULL, _rtw_mi_dynamic_chk_wk_hdl); } static u8 _rtw_mi_os_xmit_schedule(_adapter *adapter, void *data) { rtw_os_xmit_schedule(adapter); - return _TRUE; + return true; } u8 rtw_mi_os_xmit_schedule(_adapter *padapter) { - return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_os_xmit_schedule); + return _rtw_mi_process(padapter, false, NULL, _rtw_mi_os_xmit_schedule); } u8 rtw_mi_buddy_os_xmit_schedule(_adapter *padapter) { - return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_os_xmit_schedule); + return _rtw_mi_process(padapter, true, NULL, _rtw_mi_os_xmit_schedule); } static u8 _rtw_mi_report_survey_event(_adapter *adapter, void *data) @@ -901,15 +901,15 @@ static u8 _rtw_mi_report_survey_event(_adapter *adapter, void *data) union recv_frame *precv_frame = (union recv_frame *)data; report_survey_event(adapter, precv_frame); - return _TRUE; + return true; } u8 rtw_mi_report_survey_event(_adapter *padapter, union recv_frame *precv_frame) { - return _rtw_mi_process(padapter, _FALSE, precv_frame, _rtw_mi_report_survey_event); + return _rtw_mi_process(padapter, false, precv_frame, _rtw_mi_report_survey_event); } u8 rtw_mi_buddy_report_survey_event(_adapter *padapter, union recv_frame *precv_frame) { - return _rtw_mi_process(padapter, _TRUE, precv_frame, _rtw_mi_report_survey_event); + return _rtw_mi_process(padapter, true, precv_frame, _rtw_mi_report_survey_event); } static u8 _rtw_mi_sreset_adapter_hdl(_adapter *adapter, void *data) @@ -920,39 +920,39 @@ static u8 _rtw_mi_sreset_adapter_hdl(_adapter *adapter, void *data) sreset_start_adapter(adapter); else sreset_stop_adapter(adapter); - return _TRUE; + return true; } u8 rtw_mi_sreset_adapter_hdl(_adapter *padapter, u8 bstart) { u8 in_data = bstart; - return _rtw_mi_process(padapter, _FALSE, &in_data, _rtw_mi_sreset_adapter_hdl); + return _rtw_mi_process(padapter, false, &in_data, _rtw_mi_sreset_adapter_hdl); } u8 rtw_mi_buddy_sreset_adapter_hdl(_adapter *padapter, u8 bstart) { u8 in_data = bstart; - return _rtw_mi_process(padapter, _TRUE, &in_data, _rtw_mi_sreset_adapter_hdl); + return _rtw_mi_process(padapter, true, &in_data, _rtw_mi_sreset_adapter_hdl); } static u8 _rtw_mi_tx_beacon_hdl(_adapter *adapter, void *data) { - if (check_fwstate(&adapter->mlmepriv, WIFI_AP_STATE) == _TRUE - && check_fwstate(&adapter->mlmepriv, WIFI_ASOC_STATE) == _TRUE + if (check_fwstate(&adapter->mlmepriv, WIFI_AP_STATE) == true + && check_fwstate(&adapter->mlmepriv, WIFI_ASOC_STATE) == true ) { - adapter->mlmepriv.update_bcn = _TRUE; + adapter->mlmepriv.update_bcn = true; #ifndef CONFIG_INTERRUPT_BASED_TXBCN tx_beacon_hdl(adapter, NULL); #endif } - return _TRUE; + return true; } u8 rtw_mi_tx_beacon_hdl(_adapter *padapter) { - return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_tx_beacon_hdl); + return _rtw_mi_process(padapter, false, NULL, _rtw_mi_tx_beacon_hdl); } u8 rtw_mi_buddy_tx_beacon_hdl(_adapter *padapter) { - return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_sreset_adapter_hdl); + return _rtw_mi_process(padapter, true, NULL, _rtw_mi_sreset_adapter_hdl); } static u8 _rtw_mi_set_tx_beacon_cmd(_adapter *adapter, void *data) @@ -960,18 +960,18 @@ static u8 _rtw_mi_set_tx_beacon_cmd(_adapter *adapter, void *data) struct mlme_priv *pmlmepriv = &adapter->mlmepriv; if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { - if (pmlmepriv->update_bcn == _TRUE) + if (pmlmepriv->update_bcn == true) set_tx_beacon_cmd(adapter); } - return _TRUE; + return true; } u8 rtw_mi_set_tx_beacon_cmd(_adapter *padapter) { - return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_set_tx_beacon_cmd); + return _rtw_mi_process(padapter, false, NULL, _rtw_mi_set_tx_beacon_cmd); } u8 rtw_mi_buddy_set_tx_beacon_cmd(_adapter *padapter) { - return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_set_tx_beacon_cmd); + return _rtw_mi_process(padapter, true, NULL, _rtw_mi_set_tx_beacon_cmd); } #ifdef CONFIG_P2P @@ -986,29 +986,29 @@ u8 rtw_mi_p2p_chk_state(_adapter *padapter, enum P2P_STATE p2p_state) { u8 in_data = p2p_state; - return _rtw_mi_process(padapter, _FALSE, &in_data, _rtw_mi_p2p_chk_state); + return _rtw_mi_process(padapter, false, &in_data, _rtw_mi_p2p_chk_state); } u8 rtw_mi_buddy_p2p_chk_state(_adapter *padapter, enum P2P_STATE p2p_state) { u8 in_data = p2p_state; - return _rtw_mi_process(padapter, _TRUE, &in_data, _rtw_mi_p2p_chk_state); + return _rtw_mi_process(padapter, true, &in_data, _rtw_mi_p2p_chk_state); } static u8 _rtw_mi_stay_in_p2p_mode(_adapter *adapter, void *data) { struct wifidirect_info *pwdinfo = &(adapter->wdinfo); if (rtw_p2p_role(pwdinfo) != P2P_ROLE_DISABLE) - return _TRUE; - return _FALSE; + return true; + return false; } u8 rtw_mi_stay_in_p2p_mode(_adapter *padapter) { - return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_stay_in_p2p_mode); + return _rtw_mi_process(padapter, false, NULL, _rtw_mi_stay_in_p2p_mode); } u8 rtw_mi_buddy_stay_in_p2p_mode(_adapter *padapter) { - return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_stay_in_p2p_mode); + return _rtw_mi_process(padapter, true, NULL, _rtw_mi_stay_in_p2p_mode); } #endif /*CONFIG_P2P*/ @@ -1029,13 +1029,13 @@ _adapter *rtw_get_iface_by_macddr(_adapter *padapter, u8 *mac_addr) { int i; _adapter *iface = NULL; - u8 bmatch = _FALSE; + u8 bmatch = false; struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); for (i = 0; i < dvobj->iface_nums; i++) { iface = dvobj->padapters[i]; if ((iface) && (_rtw_memcmp(mac_addr, adapter_mac_addr(iface), ETH_ALEN))) { - bmatch = _TRUE; + bmatch = true; break; } } @@ -1049,13 +1049,13 @@ _adapter *rtw_get_iface_by_hwport(_adapter *padapter, u8 hw_port) { int i; _adapter *iface = NULL; - u8 bmatch = _FALSE; + u8 bmatch = false; struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); for (i = 0; i < dvobj->iface_nums; i++) { iface = dvobj->padapters[i]; if ((iface) && (hw_port == iface->hw_port)) { - bmatch = _TRUE; + bmatch = true; break; } } @@ -1105,10 +1105,10 @@ static void rtw_dbg_skb_process(_adapter *padapter, union recv_frame *precvframe if (precvframe->u.hdr.len != pcloneframe->u.hdr.len) RTW_INFO("%s [WARN] recv_frame length(%d:%d) compare failed\n", __func__, precvframe->u.hdr.len, pcloneframe->u.hdr.len); - if (_rtw_memcmp(&precvframe->u.hdr.attrib, &pcloneframe->u.hdr.attrib, sizeof(struct rx_pkt_attrib)) == _FALSE) + if (_rtw_memcmp(&precvframe->u.hdr.attrib, &pcloneframe->u.hdr.attrib, sizeof(struct rx_pkt_attrib)) == false) RTW_INFO("%s [WARN] recv_frame attrib compare failed\n", __func__); - if (_rtw_memcmp(precvframe->u.hdr.rx_data, pcloneframe->u.hdr.rx_data, precvframe->u.hdr.len) == _FALSE) + if (_rtw_memcmp(precvframe->u.hdr.rx_data, pcloneframe->u.hdr.rx_data, precvframe->u.hdr.len) == false) RTW_INFO("%s [WARN] recv_frame rx_data compare failed\n", __func__); } @@ -1172,7 +1172,7 @@ void rtw_mi_buddy_clone_bcmc_packet(_adapter *padapter, union recv_frame *precvf iface = dvobj->padapters[i]; if (!iface || iface == padapter) continue; - if (rtw_is_adapter_up(iface) == _FALSE || iface->registered == 0) + if (rtw_is_adapter_up(iface) == false || iface->registered == 0) continue; pcloneframe = rtw_alloc_recvframe(pfree_recv_queue); diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c index d135896..597691e 100644 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -35,7 +35,7 @@ static sint _rtw_init_mlme_priv(_adapter *padapter) sint res = _SUCCESS; /*ht_priv*/ - pmlmepriv->htpriv.ampdu_enable = _FALSE;/*set to disabled*/ + pmlmepriv->htpriv.ampdu_enable = false;/*set to disabled*/ pmlmepriv->nic_hdl = (u8 *)padapter; @@ -181,7 +181,7 @@ int rtw_mlme_update_wfd_ie_data(struct mlme_priv *mlme, u8 type, u8 *ie, u32 ie_ if (!hal_chk_wl_func(adapter, WL_FUNC_MIRACAST)) goto success; - if (wfd_info->wfd_enable == _TRUE) + if (wfd_info->wfd_enable == true) goto success; /* WFD IE is build by self */ if (!ie && !ie_len) @@ -313,7 +313,7 @@ struct wlan_network *_rtw_dequeue_network(_queue *queue) _enter_critical_bh(&queue->lock, &irqL); - if (_rtw_queue_empty(queue) == _TRUE) + if (_rtw_queue_empty(queue) == true) pnetwork = NULL; @@ -341,7 +341,7 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv) /* (_queue _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; } @@ -352,7 +352,7 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv) /* (_queue rtw_list_delete(&pnetwork->list); pnetwork->network_type = 0; - pnetwork->fixed = _FALSE; + pnetwork->fixed = false; pnetwork->last_scanned = rtw_get_current_time(); pnetwork->aid = 0; pnetwork->join_res = 0; @@ -377,11 +377,11 @@ void _rtw_free_network(struct mlme_priv *pmlmepriv , struct wlan_network *pnetwo if (pnetwork == NULL) goto exit; - if (pnetwork->fixed == _TRUE) + if (pnetwork->fixed == true) goto exit; - 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) { @@ -416,7 +416,7 @@ void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network * if (pnetwork == NULL) goto exit; - if (pnetwork->fixed == _TRUE) + if (pnetwork->fixed == true) goto exit; /* _enter_critical(&free_queue->lock, &irqL); */ @@ -461,7 +461,7 @@ struct wlan_network *_rtw_find_network(_queue *scanned_queue, u8 *addr) while (plist != phead) { 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); @@ -495,7 +495,7 @@ void _rtw_free_network_queue(_adapter *padapter, u8 isfreeall) 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); @@ -519,10 +519,10 @@ sint rtw_if_up(_adapter *padapter) sint res; if (RTW_CANNOT_RUN(padapter) || - (check_fwstate(&padapter->mlmepriv, _FW_LINKED) == _FALSE)) { - res = _FALSE; + (check_fwstate(&padapter->mlmepriv, _FW_LINKED) == false)) { + res = false; } else - res = _TRUE; + res = true; return res; } @@ -633,17 +633,17 @@ 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; @@ -652,7 +652,7 @@ int rtw_is_same_ibss(_adapter *adapter, struct wlan_network *pnetwork) inline int is_same_ess(WLAN_BSSID_EX *a, WLAN_BSSID_EX *b) { 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, u8 feature) @@ -660,8 +660,8 @@ int is_same_network(WLAN_BSSID_EX *src, WLAN_BSSID_EX *dst, u8 feature) u16 s_cap, d_cap; __le16 le_tmp; - if (rtw_bug_check(dst, src, &s_cap, &d_cap) == _FALSE) - return _FALSE; + if (rtw_bug_check(dst, src, &s_cap, &d_cap) == false) + return false; _rtw_memcpy((u8 *)&le_tmp, rtw_get_capability_from_ie(src->IEs), 2); s_cap = le16_to_cpu(le_tmp); @@ -670,15 +670,15 @@ int is_same_network(WLAN_BSSID_EX *src, WLAN_BSSID_EX *dst, u8 feature) #ifdef CONFIG_P2P if ((feature == 1) && /* 1: P2P supported */ - (_rtw_memcmp(src->MacAddress, dst->MacAddress, ETH_ALEN) == _TRUE) + (_rtw_memcmp(src->MacAddress, dst->MacAddress, ETH_ALEN) == true) ) - return _TRUE; + return true; #endif 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) == @@ -737,12 +737,12 @@ struct wlan_network *rtw_get_oldest_wlan_network(_queue *scanned_queue) 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; } @@ -837,8 +837,8 @@ static void update_current_network(_adapter *adapter, WLAN_BSSID_EX *pnetwork) &(pmlmepriv->cur_network.network), &(pmlmepriv->cur_network.network)); - if ((check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) && (is_same_network(&(pmlmepriv->cur_network.network), pnetwork, 0))) { - update_network(&(pmlmepriv->cur_network.network), pnetwork, adapter, _TRUE); + if ((check_fwstate(pmlmepriv, _FW_LINKED) == true) && (is_same_network(&(pmlmepriv->cur_network.network), pnetwork, 0))) { + 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); } @@ -880,7 +880,7 @@ void rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target) #endif 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); @@ -889,7 +889,7 @@ void rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target) #ifdef CONFIG_P2P if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE) && - (_rtw_memcmp(pnetwork->network.MacAddress, target->MacAddress, ETH_ALEN) == _TRUE)) { + (_rtw_memcmp(pnetwork->network.MacAddress, target->MacAddress, ETH_ALEN) == true)) { target_find = 1; break; } @@ -914,9 +914,9 @@ void rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target) /* 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 (!target_find) { - 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; @@ -929,7 +929,7 @@ void rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target) _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; @@ -969,21 +969,21 @@ void rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target) * 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; /* probe resp(3) > beacon(1) > probe req(2) */ if ((target->Reserved[0] != 2) && (target->Reserved[0] >= pnetwork->network.Reserved[0]) ) - update_ie = _TRUE; + update_ie = true; else - update_ie = _FALSE; + update_ie = false; update_network(&(pnetwork->network), target, adapter, update_ie); } @@ -1036,42 +1036,42 @@ 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; if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS)) { 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.... */ u8 *p = NULL; uint ie_len = 0; if ((desired_encmode == Ndis802_11EncryptionDisabled) && (privacy != 0)) - bselected = _FALSE; + bselected = false; if (psecuritypriv->ndisauthtype == Ndis802_11AuthModeWPA2PSK) { p = rtw_get_ie(pnetwork->network.IEs + _BEACON_IE_OFFSET_, _RSN_IE_2_, &ie_len, (pnetwork->network.IELength - _BEACON_IE_OFFSET_)); if (p && ie_len > 0) - bselected = _TRUE; + bselected = true; else - bselected = _FALSE; + bselected = false; } } if ((desired_encmode != Ndis802_11EncryptionDisabled) && (privacy == 0)) { RTW_INFO("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; } @@ -1105,7 +1105,7 @@ void rtw_survey_event_callback(_adapter *adapter, u8 *pbuf) _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) { if (_rtw_memcmp(&(pmlmepriv->cur_network.network.MacAddress), pnetwork->MacAddress, ETH_ALEN)) { struct wlan_network *ibss_wlan = NULL; unsigned long irqL; @@ -1123,7 +1123,7 @@ void rtw_survey_event_callback(_adapter *adapter, u8 *pbuf) } /* 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) pnetwork->Ssid.SsidLength = 0; rtw_add_network(adapter, pnetwork); @@ -1160,7 +1160,7 @@ void rtw_surveydone_event_callback(_adapter *adapter, u8 *pbuf) } - if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _FALSE) { + if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == false) { RTW_INFO(FUNC_ADPT_FMT" fw_state:0x%x\n", FUNC_ADPT_ARG(adapter), get_fwstate(pmlmepriv)); /* rtw_warn_on(1); */ } @@ -1176,9 +1176,9 @@ void rtw_surveydone_event_callback(_adapter *adapter, u8 *pbuf) rtw_set_signal_stat_timer(&adapter->recvpriv); #endif - if (pmlmepriv->to_join == _TRUE) { - if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE)) { - if (check_fwstate(pmlmepriv, _FW_LINKED) == _FALSE) { + if (pmlmepriv->to_join == true) { + if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true)) { + if (check_fwstate(pmlmepriv, _FW_LINKED) == false) { set_fwstate(pmlmepriv, _FW_UNDER_LINKING); if (rtw_select_and_join_from_scanned_queue(pmlmepriv) == _SUCCESS) @@ -1203,13 +1203,13 @@ void rtw_surveydone_event_callback(_adapter *adapter, u8 *pbuf) if (rtw_create_ibss_cmd(adapter, 0) != _SUCCESS) RTW_ERR("rtw_create_ibss_cmd FAIL\n"); - pmlmepriv->to_join = _FALSE; + pmlmepriv->to_join = false; } } } else { int s_ret; set_fwstate(pmlmepriv, _FW_UNDER_LINKING); - pmlmepriv->to_join = _FALSE; + pmlmepriv->to_join = false; s_ret = rtw_select_and_join_from_scanned_queue(pmlmepriv); if (_SUCCESS == s_ret) _set_timer(&pmlmepriv->assoc_timer, MAX_JOIN_TIMEOUT); @@ -1232,11 +1232,11 @@ void rtw_surveydone_event_callback(_adapter *adapter, u8 *pbuf) } #endif /* CONFIG_INTEL_WIDI */ rtw_free_assoc_resources(adapter, 1); - rtw_indicate_disconnect(adapter, 0, _FALSE); + rtw_indicate_disconnect(adapter, 0, false); } else - pmlmepriv->to_join = _TRUE; + pmlmepriv->to_join = true; } else - rtw_indicate_disconnect(adapter, 0, _FALSE); + rtw_indicate_disconnect(adapter, 0, false); _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING); } } @@ -1254,7 +1254,7 @@ void rtw_surveydone_event_callback(_adapter *adapter, u8 *pbuf) } #else receive_disconnect(adapter, pmlmepriv->cur_network.network.MacAddress - , WLAN_REASON_ACTIVE_ROAM, _FALSE); + , WLAN_REASON_ACTIVE_ROAM, false); #endif } } @@ -1266,7 +1266,7 @@ void rtw_surveydone_event_callback(_adapter *adapter, u8 *pbuf) _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 */ @@ -1289,10 +1289,10 @@ void rtw_surveydone_event_callback(_adapter *adapter, u8 *pbuf) rtw_cfg80211_surveydone_event_callback(adapter); #endif /* CONFIG_IOCTL_CFG80211 */ - rtw_indicate_scan_done(adapter, _FALSE); + rtw_indicate_scan_done(adapter, false); #if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_IOCTL_CFG80211) - rtw_cfg80211_indicate_scan_done_for_buddy(adapter, _FALSE); + rtw_cfg80211_indicate_scan_done_for_buddy(adapter, false); #endif } @@ -1371,7 +1371,7 @@ void rtw_free_assoc_resources(_adapter *adapter, int lock_scanned_queue) psta = rtw_get_stainfo(&adapter->stapriv, tgt_network->network.MacAddress); #ifdef CONFIG_TDLS - if (ptdlsinfo->link_established == _TRUE) { + if (ptdlsinfo->link_established == true) { rtw_tdls_cmd(adapter, NULL, TDLS_RS_RCR); rtw_reset_tdls_info(adapter); rtw_free_all_stainfo(adapter); @@ -1405,7 +1405,7 @@ void rtw_free_assoc_resources(_adapter *adapter, int lock_scanned_queue) pwlan = _rtw_find_same_network(&pmlmepriv->scanned_queue, tgt_network); if ((pwlan) && (!check_fwstate(pmlmepriv, WIFI_UNDER_WPS))) { - pwlan->fixed = _FALSE; + pwlan->fixed = false; RTW_INFO("free disconnecting network of scanned_queue\n"); rtw_free_network_nolock(adapter, pwlan); @@ -1447,7 +1447,7 @@ void rtw_indicate_connect(_adapter *padapter) - pmlmepriv->to_join = _FALSE; + pmlmepriv->to_join = false; if (!check_fwstate(&padapter->mlmepriv, _FW_LINKED)) { @@ -1568,8 +1568,8 @@ inline void rtw_indicate_scan_done(_adapter *padapter, bool aborted) #ifdef CONFIG_IPS if (is_primary_adapter(padapter) - && (_FALSE == adapter_to_pwrctl(padapter)->bInSuspend) - && (check_fwstate(&padapter->mlmepriv, WIFI_ASOC_STATE | WIFI_UNDER_LINKING) == _FALSE)) { + && (false == adapter_to_pwrctl(padapter)->bInSuspend) + && (check_fwstate(&padapter->mlmepriv, WIFI_ASOC_STATE | WIFI_UNDER_LINKING) == false)) { struct pwrctrl_priv *pwrpriv; pwrpriv = adapter_to_pwrctl(padapter); @@ -1604,7 +1604,7 @@ static u32 _rtw_wait_scan_done(_adapter *adapter, u8 abort, u32 timeout_ms) rtw_msleep_os(20); } - if (_TRUE == abort) { + if (true == abort) { if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) { if (!RTW_CANNOT_RUN(adapter)) RTW_INFO(FUNC_NDEV_FMT"waiting for scan_abort time out!\n", FUNC_NDEV_ARG(adapter->pnetdev)); @@ -1613,11 +1613,11 @@ static u32 _rtw_wait_scan_done(_adapter *adapter, u8 abort, u32 timeout_ms) set_survey_timer(pmlmeext, 0); mlme_set_scan_to_timer(pmlmepriv, 50); #endif - rtw_indicate_scan_done(adapter, _TRUE); + rtw_indicate_scan_done(adapter, true); } } - pmlmeext->scan_abort = _FALSE; + pmlmeext->scan_abort = false; pass_ms = rtw_get_passing_time_ms(start); return pass_ms; @@ -1636,12 +1636,12 @@ void rtw_scan_wait_completed(_adapter *adapter) scan_to = CONC_SCANNING_TIMEOUT_SINGLE_BAND; #endif /* CONFIG_SCAN_BACKOP */ - _rtw_wait_scan_done(adapter, _FALSE, scan_to); + _rtw_wait_scan_done(adapter, false, scan_to); } u32 rtw_scan_abort_timeout(_adapter *adapter, u32 timeout_ms) { - return _rtw_wait_scan_done(adapter, _TRUE, timeout_ms); + return _rtw_wait_scan_done(adapter, true, timeout_ms); } void rtw_scan_abort_no_wait(_adapter *adapter) @@ -1650,7 +1650,7 @@ void rtw_scan_abort_no_wait(_adapter *adapter) struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv); if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) - pmlmeext->scan_abort = _TRUE; + pmlmeext->scan_abort = true; } void rtw_scan_abort(_adapter *adapter) @@ -1687,19 +1687,19 @@ static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wl /* 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 */ #ifdef CONFIG_RTW_80211R - if ((padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) && (psta->ft_pairwise_key_installed == _FALSE)) { + if ((padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) && (psta->ft_pairwise_key_installed == false)) { #else if (padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) { #endif - 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; memset((u8 *)&psta->dot118021x_UncstKey, 0, sizeof(union Keytype)); @@ -1719,7 +1719,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wl /* When doing the WPS, the wps_ie_len won't equal to 0 */ /* 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; } @@ -1730,7 +1730,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wl for (i = 0; i < 16 ; i++) { /* 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 RTW_INFO("DBG_RX_SEQ %s:%d indicate_seq:%u\n", __func__, __LINE__, @@ -1747,7 +1747,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wl for (i = 0; i < 16 ; i++) { /* 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 RTW_INFO("DBG_RX_SEQ %s:%d indicate_seq:%u\n", __func__, __LINE__, @@ -1851,7 +1851,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; rtw_get_encrypt_decrypt_from_registrypriv(adapter); @@ -1873,12 +1873,12 @@ void rtw_joinbss_event_prehandle(_adapter *adapter, u8 *pbuf) if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) { /* 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; + pcur_wlan->fixed = false; pcur_sta = rtw_get_stainfo(pstapriv, cur_network->network.MacAddress); if (pcur_sta) { @@ -1888,17 +1888,17 @@ void rtw_joinbss_event_prehandle(_adapter *adapter, u8 *pbuf) } ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->network.MacAddress); - if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE) { + if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) { if (ptarget_wlan) - ptarget_wlan->fixed = _TRUE; + ptarget_wlan->fixed = true; } } } else { ptarget_wlan = _rtw_find_same_network(&pmlmepriv->scanned_queue, pnetwork); - if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE) { + if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) { if (ptarget_wlan) - ptarget_wlan->fixed = _TRUE; + ptarget_wlan->fixed = true; } } @@ -1913,7 +1913,7 @@ void rtw_joinbss_event_prehandle(_adapter *adapter, u8 *pbuf) /* 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) { RTW_ERR("Can't update stainfo when joinbss_event callback\n"); @@ -1945,7 +1945,7 @@ void rtw_joinbss_event_prehandle(_adapter *adapter, u8 *pbuf) /* rtw_free_assoc_resources(adapter, 1); */ - if ((check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) == _TRUE) { + if ((check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) == true) { _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING); } @@ -2124,7 +2124,7 @@ void rtw_stassoc_event_callback(_adapter *adapter, u8 *pbuf) #if CONFIG_RTW_MACADDR_ACL - if (rtw_access_ctrl(adapter, pstassoc->macaddr) == _FALSE) + if (rtw_access_ctrl(adapter, pstassoc->macaddr) == false) return; #endif @@ -2187,7 +2187,7 @@ void rtw_stassoc_event_callback(_adapter *adapter, u8 *pbuf) goto exit; } - 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_sta_media_status_rpt(adapter, psta, 1); @@ -2195,18 +2195,18 @@ void rtw_stassoc_event_callback(_adapter *adapter, u8 *pbuf) 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); pmlmepriv->cur_network_scanned = ptarget_wlan; if (ptarget_wlan) - ptarget_wlan->fixed = _TRUE; + ptarget_wlan->fixed = true; _exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); /* a sta + bc/mc_stainfo (not Ibss_stainfo) */ rtw_indicate_connect(adapter); @@ -2233,13 +2233,13 @@ void rtw_sta_timeout_event_callback(_adapter *adapter, u8 *pbuf) psta = rtw_get_stainfo(&adapter->stapriv, pstadel->macaddr); if (psta) { - u8 updated = _FALSE; + u8 updated = false; _enter_critical_bh(&pstapriv->asoc_list_lock, &irqL); - if (rtw_is_list_empty(&psta->asoc_list) == _FALSE) { + if (rtw_is_list_empty(&psta->asoc_list) == false) { rtw_list_delete(&psta->asoc_list); pstapriv->asoc_list_cnt--; - updated = ap_free_sta(adapter, psta, _TRUE, WLAN_REASON_PREV_AUTH_NOT_VALID, _TRUE); + updated = ap_free_sta(adapter, psta, true, WLAN_REASON_PREV_AUTH_NOT_VALID, true); } _exit_critical_bh(&pstapriv->asoc_list_lock, &irqL); @@ -2263,11 +2263,11 @@ void rtw_update_ft_stainfo(_adapter *padapter, WLAN_BSSID_EX *pnetwork) 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; psta->dot11txpn.val = psta->dot11txpn.val + 1; @@ -2415,30 +2415,30 @@ void rtw_stadel_event_callback(_adapter *adapter, u8 *pbuf) if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) { u16 reason = *((unsigned short *)(pstadel->rsvd)); - bool roam = _FALSE; + bool roam = false; struct wlan_network *roam_target = NULL; #ifdef CONFIG_LAYER2_ROAMING #ifdef CONFIG_RTW_80211R if (reason == WLAN_REASON_EXPIRATION_CHK && rtw_chk_roam_flags(adapter, RTW_ROAM_ON_EXPIRED)) - pmlmepriv->ftpriv.ft_roam_on_expired = _TRUE; + pmlmepriv->ftpriv.ft_roam_on_expired = true; else - pmlmepriv->ftpriv.ft_roam_on_expired = _FALSE; + pmlmepriv->ftpriv.ft_roam_on_expired = false; #endif if (adapter->registrypriv.wifi_spec == 1) - roam = _FALSE; + roam = false; else if (reason == WLAN_REASON_EXPIRATION_CHK && rtw_chk_roam_flags(adapter, RTW_ROAM_ON_EXPIRED)) - roam = _TRUE; + roam = true; else if (reason == WLAN_REASON_ACTIVE_ROAM && rtw_chk_roam_flags(adapter, RTW_ROAM_ACTIVE)) { - roam = _TRUE; + roam = true; roam_target = pmlmepriv->roam_network; } #ifdef CONFIG_INTEL_WIDI else if (adapter->mlmepriv.widi_state == INTEL_WIDI_STATE_CONNECTED) - roam = _TRUE; + roam = true; #endif /* CONFIG_INTEL_WIDI */ - if (roam == _TRUE) { + if (roam == true) { if (rtw_to_roam(adapter) > 0) rtw_dec_to_roam(adapter); /* this stadel_event is caused by roaming, decrease to_roam */ else if (rtw_to_roam(adapter) == 0) @@ -2456,7 +2456,7 @@ void rtw_stadel_event_callback(_adapter *adapter, u8 *pbuf) /* remove the network entry in scanned_queue */ pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress); if ((pwlan) && (!check_fwstate(pmlmepriv, WIFI_UNDER_WPS))) { - pwlan->fixed = _FALSE; + pwlan->fixed = false; rtw_free_network_nolock(adapter, pwlan); } _exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); @@ -2484,7 +2484,7 @@ void rtw_stadel_event_callback(_adapter *adapter, u8 *pbuf) /* pwlan = rtw_find_network(&pmlmepriv->scanned_queue, pstadel->macaddr); */ pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress); if (pwlan) { - pwlan->fixed = _FALSE; + pwlan->fixed = false; rtw_free_network_nolock(adapter, pwlan); } _exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); @@ -2587,7 +2587,7 @@ void _rtw_join_timeout_handler(_adapter *adapter) rtw_clr_ft_flags(adapter, RTW_FT_SUPPORTED|RTW_FT_OVER_DS_SUPPORTED); rtw_reset_ft_status(adapter); #endif - rtw_indicate_disconnect(adapter, 0, _FALSE); + rtw_indicate_disconnect(adapter, 0, false); break; } } @@ -2595,12 +2595,12 @@ void _rtw_join_timeout_handler(_adapter *adapter) } else #endif { - rtw_indicate_disconnect(adapter, 0, _FALSE); + rtw_indicate_disconnect(adapter, 0, false); free_scanqueue(pmlmepriv);/* ??? */ #ifdef CONFIG_IOCTL_CFG80211 /* indicate disconnect for the case that join_timeout and check_fwstate != FW_LINKED */ - rtw_cfg80211_indicate_disconnect(adapter, 0, _FALSE); + rtw_cfg80211_indicate_disconnect(adapter, 0, false); #endif /* CONFIG_IOCTL_CFG80211 */ } @@ -2636,10 +2636,10 @@ void rtw_scan_timeout_handler(_adapter *adapter) rtw_cfg80211_surveydone_event_callback(adapter); #endif /* CONFIG_IOCTL_CFG80211 */ - rtw_indicate_scan_done(adapter, _TRUE); + rtw_indicate_scan_done(adapter, true); #if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_IOCTL_CFG80211) - rtw_cfg80211_indicate_scan_done_for_buddy(adapter, _TRUE); + rtw_cfg80211_indicate_scan_done_for_buddy(adapter, true); #endif } @@ -2655,7 +2655,7 @@ void rtw_mlme_reset_auto_scan_int(_adapter *adapter, u8 *reason) rtw_mi_get_ch_setting_union(adapter, &u_ch, NULL, NULL); if (hal_chk_bw_cap(adapter, BW_CAP_40M) - && is_client_associated_to_ap(adapter) == _TRUE + && is_client_associated_to_ap(adapter) == true && u_ch >= 1 && u_ch <= 14 && adapter->registrypriv.wifi_spec /* TODO: AP Connected is 40MHz capability? */ @@ -2700,9 +2700,9 @@ void rtw_drv_scan_by_self(_adapter *padapter, u8 reason) if (!rtw_is_adapter_up(padapter)) goto exit; - if (rtw_mi_busy_traffic_check(padapter, _FALSE)) { + if (rtw_mi_busy_traffic_check(padapter, false)) { #ifdef CONFIG_LAYER2_ROAMING - if (rtw_chk_roam_flags(padapter, RTW_ROAM_ACTIVE) && pmlmepriv->need_to_roam == _TRUE) { + if (rtw_chk_roam_flags(padapter, RTW_ROAM_ACTIVE) && pmlmepriv->need_to_roam == true) { RTW_INFO("need to roam, don't care BusyTraffic\n"); } else #endif @@ -2715,7 +2715,7 @@ void rtw_drv_scan_by_self(_adapter *padapter, u8 reason) RTW_INFO(FUNC_ADPT_FMT" WIFI_AP_STATE && WIFI_UNDER_WPS\n", FUNC_ADPT_ARG(padapter)); goto exit; } - if (check_fwstate(pmlmepriv, (_FW_UNDER_SURVEY | _FW_UNDER_LINKING)) == _TRUE) { + if (check_fwstate(pmlmepriv, (_FW_UNDER_SURVEY | _FW_UNDER_LINKING)) == true) { RTW_INFO(FUNC_ADPT_FMT" _FW_UNDER_SURVEY|_FW_UNDER_LINKING\n", FUNC_ADPT_ARG(padapter)); goto exit; } @@ -2753,7 +2753,7 @@ static void rtw_auto_scan_handler(_adapter *padapter) #endif #ifdef CONFIG_TDLS - if (padapter->tdlsinfo.link_established == _TRUE) + if (padapter->tdlsinfo.link_established == true) goto exit; #endif @@ -2768,15 +2768,15 @@ exit: } static u8 is_drv_in_lps(_adapter *adapter) { - u8 is_in_lps = _FALSE; + u8 is_in_lps = false; #ifdef CONFIG_LPS_LCLK_WD_TIMER /* to avoid leaving lps 32k frequently*/ - if ((adapter_to_pwrctl(adapter)->bFwCurrentInPSMode == _TRUE) + if ((adapter_to_pwrctl(adapter)->bFwCurrentInPSMode == true) #ifdef CONFIG_BT_COEXIST - && (rtw_btcoex_IsBtControlLps(adapter) == _FALSE) + && (rtw_btcoex_IsBtControlLps(adapter) == false) #endif ) - is_in_lps = _TRUE; + is_in_lps = true; #endif /* CONFIG_LPS_LCLK_WD_TIMER*/ return is_in_lps; } @@ -2786,7 +2786,7 @@ void rtw_iface_dynamic_check_timer_handler(_adapter *adapter) struct mlme_priv *pmlmepriv = &adapter->mlmepriv; #endif /* CONFIG_AP_MODE */ - if (adapter->net_closed == _TRUE) + if (adapter->net_closed == true) return; #ifdef CONFIG_LPS_LCLK_WD_TIMER /* to avoid leaving lps 32k frequently*/ if (is_drv_in_lps(adapter)) { @@ -2809,7 +2809,7 @@ void rtw_iface_dynamic_check_timer_handler(_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); #endif #endif /* !CONFIG_ACTIVE_KEEP_ALIVE_CHECK */ @@ -2825,7 +2825,7 @@ void rtw_iface_dynamic_check_timer_handler(_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 */ nat25_db_expire(adapter); @@ -2909,7 +2909,7 @@ void rtw_dynamic_check_timer_handler(_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) @@ -2937,13 +2937,13 @@ void rtw_set_scan_deny(_adapter *adapter, u32 ms) #ifdef CONFIG_LAYER2_ROAMING /* * Select a new roaming 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_roaming_candidate(struct mlme_priv *mlme , struct wlan_network **candidate, struct wlan_network *competitor) { - int updated = _FALSE; + int updated = false; _adapter *adapter = container_of(mlme, _adapter, mlmepriv); #ifdef CONFIG_RTW_80211R ft_priv *pftpriv = &mlme->ftpriv; @@ -2952,14 +2952,14 @@ static int rtw_check_roaming_candidate(struct mlme_priv *mlme #endif - if (is_same_ess(&competitor->network, &mlme->cur_network.network) == _FALSE) + if (is_same_ess(&competitor->network, &mlme->cur_network.network) == 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 (mlme->need_to_roam == _FALSE) + if (mlme->need_to_roam == false) goto exit; #endif @@ -2995,7 +2995,7 @@ static int rtw_check_roaming_candidate(struct mlme_priv *mlme /* got specific addr to roam */ if (!is_zero_mac_addr(mlme->roam_tgt_addr)) { - if (_rtw_memcmp(mlme->roam_tgt_addr, competitor->network.MacAddress, ETH_ALEN) == _TRUE) + if (_rtw_memcmp(mlme->roam_tgt_addr, competitor->network.MacAddress, ETH_ALEN) == true) goto update; else goto exit; @@ -3010,7 +3010,7 @@ static int rtw_check_roaming_candidate(struct mlme_priv *mlme goto exit; update: *candidate = competitor; - updated = _TRUE; + updated = true; exit: return updated; @@ -3025,7 +3025,7 @@ int rtw_select_roaming_candidate(struct mlme_priv *mlme) _queue *queue = &(mlme->scanned_queue); struct wlan_network *pnetwork = NULL; struct wlan_network *candidate = NULL; - u8 bSupportAntDiv = _FALSE; + u8 bSupportAntDiv = false; if (mlme->cur_network_scanned == NULL) { @@ -3071,7 +3071,7 @@ int rtw_select_roaming_candidate(struct mlme_priv *mlme) mlme->roam_network = candidate; - if (_rtw_memcmp(candidate->network.MacAddress, mlme->roam_tgt_addr, ETH_ALEN) == _TRUE) + if (_rtw_memcmp(candidate->network.MacAddress, mlme->roam_tgt_addr, ETH_ALEN) == true) memset(mlme->roam_tgt_addr, 0, ETH_ALEN); } @@ -3085,37 +3085,37 @@ exit: /* * 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 *mlme , struct wlan_network **candidate, struct wlan_network *competitor) { - int updated = _FALSE; + int updated = false; _adapter *adapter = container_of(mlme, _adapter, mlmepriv); /* check bssid, if needed */ - if (mlme->assoc_by_bssid == _TRUE) { - if (_rtw_memcmp(competitor->network.MacAddress, mlme->assoc_bssid, ETH_ALEN) == _FALSE) + if (mlme->assoc_by_bssid == true) { + if (_rtw_memcmp(competitor->network.MacAddress, mlme->assoc_bssid, ETH_ALEN) == false) goto exit; } /* check ssid, if needed */ if (mlme->assoc_ssid.Ssid[0] && mlme->assoc_ssid.SsidLength) { if (competitor->network.Ssid.SsidLength != mlme->assoc_ssid.SsidLength - || _rtw_memcmp(competitor->network.Ssid.Ssid, mlme->assoc_ssid.Ssid, mlme->assoc_ssid.SsidLength) == _FALSE + || _rtw_memcmp(competitor->network.Ssid.Ssid, mlme->assoc_ssid.Ssid, mlme->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 (rtw_to_roam(adapter) > 0) { if (rtw_get_passing_time_ms((u32)competitor->last_scanned) >= mlme->roam_scanr_exp_ms - || is_same_ess(&competitor->network, &mlme->cur_network.network) == _FALSE + || is_same_ess(&competitor->network, &mlme->cur_network.network) == false ) goto exit; } @@ -3123,7 +3123,7 @@ static int rtw_check_join_candidate(struct mlme_priv *mlme if (*candidate == NULL || (*candidate)->network.Rssi < competitor->network.Rssi) { *candidate = competitor; - updated = _TRUE; + updated = true; } if (updated) { @@ -3163,7 +3163,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; adapter = (_adapter *)pmlmepriv->nic_hdl; @@ -3219,17 +3219,17 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv) candidate_exist: /* check for situation of _FW_LINKED */ - if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { + if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { RTW_INFO("%s: _FW_LINKED while ask_for_joinbss!!!\n", __func__); - rtw_disassoc_cmd(adapter, 0, _TRUE); - rtw_indicate_disconnect(adapter, 0, _FALSE); + rtw_disassoc_cmd(adapter, 0, true); + rtw_indicate_disconnect(adapter, 0, false); rtw_free_assoc_resources(adapter, 0); } #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_odm_var(adapter, HAL_ODM_ANTDIV_SELECT, &(CurrentAntenna), NULL); RTW_INFO("#### Opt_Ant_(%s) , cur_Ant(%s)\n", @@ -3427,7 +3427,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; else { i++; @@ -3687,7 +3687,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 */ /* TH=1 => means that invalidate usb rx aggregation */ /* TH=0 => means that validate usb rx aggregation, use init value. */ @@ -3708,9 +3708,9 @@ void rtw_ht_use_default_setting(_adapter *padapter) struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct ht_priv *phtpriv = &pmlmepriv->htpriv; struct registry_priv *pregistrypriv = &padapter->registrypriv; - bool bHwLDPCSupport = _FALSE, bHwSTBCSupport = _FALSE; + bool bHwLDPCSupport = false, bHwSTBCSupport = false; #ifdef CONFIG_BEAMFORMING - bool bHwSupportBeamformer = _FALSE, bHwSupportBeamformee = _FALSE; + bool bHwSupportBeamformer = false, bHwSupportBeamformee = false; #endif /* CONFIG_BEAMFORMING */ if (pregistrypriv->wifi_spec) @@ -3718,8 +3718,8 @@ void rtw_ht_use_default_setting(_adapter *padapter) else phtpriv->bss_coexist = 0; - phtpriv->sgi_40m = TEST_FLAG(pregistrypriv->short_gi, BIT1) ? _TRUE : _FALSE; - phtpriv->sgi_20m = TEST_FLAG(pregistrypriv->short_gi, BIT0) ? _TRUE : _FALSE; + phtpriv->sgi_40m = TEST_FLAG(pregistrypriv->short_gi, BIT1) ? true : false; + phtpriv->sgi_20m = TEST_FLAG(pregistrypriv->short_gi, BIT0) ? true : false; /* LDPC support */ rtw_hal_get_def_var(padapter, HAL_DEF_RX_LDPC, (u8 *)&bHwLDPCSupport); @@ -3797,7 +3797,7 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct hal_spec_t *hal_spec = GET_HAL_SPEC(padapter); - phtpriv->ht_option = _FALSE; + phtpriv->ht_option = false; out_len = *pout_len; @@ -3969,7 +3969,7 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui pframe = rtw_set_ie(out_ie + out_len, _HT_CAPABILITY_IE_, sizeof(struct rtw_ieee80211_ht_cap), (unsigned char *)&ht_capie, pout_len); - phtpriv->ht_option = _TRUE; + phtpriv->ht_option = true; if (in_ie != NULL) { p = rtw_get_ie(in_ie, _HT_ADD_INFO_IE_, &ielen, in_len); @@ -4011,13 +4011,13 @@ void rtw_update_ht_cap(_adapter *padapter, u8 *pie, uint ie_len, u8 channel) RTW_INFO("+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) { /* remove this part because testbed AP should disable RX AMPDU */ - /* phtpriv->ampdu_enable = _FALSE; */ - phtpriv->ampdu_enable = _TRUE; + /* phtpriv->ampdu_enable = false; */ + phtpriv->ampdu_enable = true; } else - phtpriv->ampdu_enable = _TRUE; + phtpriv->ampdu_enable = true; } @@ -4130,12 +4130,12 @@ void rtw_issue_addbareq_cmd_tdls(_adapter *padapter, struct xmit_frame *pxmitfra priority = pattrib->priority; - if (pattrib->direct_link == _TRUE) { + if (pattrib->direct_link == true) { ptdls_sta = rtw_get_stainfo(&padapter->stapriv, pattrib->dst); if ((ptdls_sta != NULL) && (ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE)) { phtpriv = &ptdls_sta->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; @@ -4159,7 +4159,7 @@ void rtw_issue_addbareq_cmd(_adapter *padapter, struct xmit_frame *pxmitframe) struct pkt_attrib *pattrib = &pxmitframe->attrib; s32 bmcst = IS_MCAST(pattrib->ra); - /* if(bmcst || (padapter->mlmepriv.LinkDetectInfo.bTxBusyTraffic == _FALSE)) */ + /* if(bmcst || (padapter->mlmepriv.LinkDetectInfo.bTxBusyTraffic == false)) */ if (bmcst || (padapter->mlmepriv.LinkDetectInfo.NumTxOkInPeriod < 100)) return; @@ -4188,7 +4188,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; @@ -4216,7 +4216,7 @@ void rtw_append_exented_cap(_adapter *padapter, u8 *out_ie, uint *pout_len) in the Extended Capabilities element, then the STA is not required to transmit the Extended Capabilities element. */ - if (_FALSE == _rtw_memcmp(cap_content, null_content, 8)) + if (false == _rtw_memcmp(cap_content, null_content, 8)) pframe = rtw_set_ie(out_ie + *pout_len, EID_EXTCapability, 8, cap_content , pout_len); } @@ -4224,7 +4224,7 @@ void rtw_append_exented_cap(_adapter *padapter, u8 *out_ie, uint *pout_len) inline void rtw_set_to_roam(_adapter *adapter, u8 to_roam) { if (to_roam == 0) - adapter->mlmepriv.to_join = _FALSE; + adapter->mlmepriv.to_join = false; adapter->mlmepriv.to_roam = to_roam; } @@ -4260,7 +4260,7 @@ void _rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network) cur_network->network.Ssid.SsidLength); _rtw_memcpy(&pmlmepriv->assoc_ssid, &cur_network->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); @@ -4282,7 +4282,7 @@ void _rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network) rtw_clr_ft_flags(padapter, RTW_FT_SUPPORTED|RTW_FT_OVER_DS_SUPPORTED); rtw_reset_ft_status(padapter); #endif - rtw_indicate_disconnect(padapter, 0, _FALSE); + rtw_indicate_disconnect(padapter, 0, false); break; } } @@ -4312,45 +4312,45 @@ bool rtw_adjust_chbw(_adapter *adapter, u8 req_ch, u8 *req_bw, u8 *req_offset) *req_bw = CHANNEL_WIDTH_20; *req_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE; } else - return _FALSE; + return false; - return _TRUE; + return true; } sint rtw_linked_check(_adapter *padapter) { - if ((check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == _TRUE) || - (check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE) == _TRUE)) { + if ((check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true) || + (check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE) == true)) { if (padapter->stapriv.asoc_sta_count > 2) - return _TRUE; + return true; } else { /* Station mode */ - if (check_fwstate(&padapter->mlmepriv, _FW_LINKED) == _TRUE) - return _TRUE; + if (check_fwstate(&padapter->mlmepriv, _FW_LINKED) == true) + return true; } - return _FALSE; + return false; } u8 rtw_is_adapter_up(_adapter *padapter) { if (padapter == NULL) - return _FALSE; + return false; if (RTW_CANNOT_RUN(padapter)) { - RTW_INFO(FUNC_ADPT_FMT "-(bSurpriseRemoved == _TRUE) || ( bDriverStopped == _TRUE)\n", FUNC_ADPT_ARG(padapter)); - return _FALSE; + RTW_INFO(FUNC_ADPT_FMT "-(bSurpriseRemoved == true) || ( bDriverStopped == true)\n", FUNC_ADPT_ARG(padapter)); + return false; } if (!rtw_is_hw_init_completed(padapter)) { - /*RTW_INFO(FUNC_ADPT_FMT "-(hw_init_completed == _FALSE)\n", FUNC_ADPT_ARG(padapter));*/ - return _FALSE; + /*RTW_INFO(FUNC_ADPT_FMT "-(hw_init_completed == false)\n", FUNC_ADPT_ARG(padapter));*/ + return false; } - if (padapter->bup == _FALSE) { - /*RTW_INFO(FUNC_ADPT_FMT "-(bup == _FALSE)\n", FUNC_ADPT_ARG(padapter));*/ - return _FALSE; + if (padapter->bup == false) { + /*RTW_INFO(FUNC_ADPT_FMT "-(bup == false)\n", FUNC_ADPT_ARG(padapter));*/ + return false; } - return _TRUE; + return true; } bool is_miracast_enabled(_adapter *adapter) @@ -4400,8 +4400,8 @@ static bool wfd_st_match_rule(_adapter *adapter, u8 *local_naddr, u8 *local_port if (ntohs(*((__be16 *)local_port)) == wfdinfo->rtsp_ctrlport || ntohs(*((__be16 *)local_port)) == wfdinfo->tdls_rtsp_ctrlport || ntohs(*((__be16 *)remote_port)) == wfdinfo->peer_rtsp_ctrlport) - return _TRUE; - return _FALSE; + return true; + return false; } static struct st_register wfd_st_reg = { diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index 9442a01..2ea83c8 100755 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -322,9 +322,9 @@ bool rtw_chplan_is_empty(u8 id) && chplan_map->Index5G == RTW_RD_5G_NULL #endif ) - return _TRUE; + return true; - return _FALSE; + return false; } void rtw_rfctl_init(_adapter *adapter) @@ -349,25 +349,25 @@ void rtw_rfctl_init(_adapter *adapter) bool rtw_is_cac_reset_needed(_adapter *adapter, u8 ch, u8 bw, u8 offset) { struct rf_ctl_t *rfctl = adapter_to_rfctl(adapter); - bool needed = _FALSE; + bool needed = false; u32 cur_hi, cur_lo, hi, lo; if (rfctl->radar_detected == 1) { - needed = _TRUE; + needed = true; goto exit; } if (rfctl->radar_detect_ch == 0) { - needed = _TRUE; + needed = true; goto exit; } - if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == _FALSE) { + if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == false) { RTW_ERR("request detection range ch:%u, bw:%u, offset:%u\n", ch, bw, offset); rtw_warn_on(1); } - if (rtw_chbw_to_freq_range(rfctl->radar_detect_ch, rfctl->radar_detect_bw, rfctl->radar_detect_offset, &cur_hi, &cur_lo) == _FALSE) { + if (rtw_chbw_to_freq_range(rfctl->radar_detect_ch, rfctl->radar_detect_bw, rfctl->radar_detect_offset, &cur_hi, &cur_lo) == false) { RTW_ERR("cur detection range ch:%u, bw:%u, offset:%u\n", rfctl->radar_detect_ch, rfctl->radar_detect_bw, rfctl->radar_detect_offset); rtw_warn_on(1); } @@ -385,15 +385,15 @@ bool rtw_is_cac_reset_needed(_adapter *adapter, u8 ch, u8 bw, u8 offset) /* check if request channel coverage has new range and the new range is in DFS range */ if (!rtw_is_range_overlap(hi, lo, cur_hi, cur_lo)) { /* request has no overlap with current */ - needed = _TRUE; + needed = true; } else if (rtw_is_range_a_in_b(cur_hi, cur_lo, hi, lo)) { /* request is supper set of current */ if ((hi != cur_hi && rtw_is_dfs_range(hi, cur_hi)) || (lo != cur_lo && rtw_is_dfs_range(cur_lo, lo))) - needed = _TRUE; + needed = true; } else { /* request is not supper set of current, but has overlap */ if ((lo < cur_lo && rtw_is_dfs_range(cur_lo, lo)) || (hi > cur_hi && rtw_is_dfs_range(hi, cur_hi))) - needed = _TRUE; + needed = true; } exit: @@ -402,7 +402,7 @@ exit: bool _rtw_rfctl_overlap_radar_detect_ch(struct rf_ctl_t *rfctl, u8 ch, u8 bw, u8 offset) { - bool ret = _FALSE; + bool ret = false; u32 hi = 0, lo = 0; u32 r_hi = 0, r_lo = 0; int i; @@ -413,20 +413,20 @@ bool _rtw_rfctl_overlap_radar_detect_ch(struct rf_ctl_t *rfctl, u8 ch, u8 bw, u8 if (rfctl->radar_detect_ch == 0) goto exit; - if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == _FALSE) { + if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == false) { rtw_warn_on(1); goto exit; } if (rtw_chbw_to_freq_range(rfctl->radar_detect_ch , rfctl->radar_detect_bw, rfctl->radar_detect_offset - , &r_hi, &r_lo) == _FALSE) { + , &r_hi, &r_lo) == false) { rtw_warn_on(1); goto exit; } if (rtw_is_range_overlap(hi, lo, r_hi, r_lo)) - ret = _TRUE; + ret = true; exit: return ret; @@ -447,11 +447,11 @@ bool rtw_rfctl_is_tx_blocked_by_ch_waiting(struct rf_ctl_t *rfctl) bool rtw_chset_is_ch_non_ocp(RT_CHANNEL_INFO *ch_set, u8 ch, u8 bw, u8 offset) { - bool ret = _FALSE; + bool ret = false; u32 hi = 0, lo = 0; int i; - if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == _FALSE) + if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == false) goto exit; for (i = 0; ch_set[i].ChannelNum != 0; i++) { @@ -466,7 +466,7 @@ bool rtw_chset_is_ch_non_ocp(RT_CHANNEL_INFO *ch_set, u8 ch, u8 bw, u8 offset) if (lo <= rtw_ch2freq(ch_set[i].ChannelNum) && rtw_ch2freq(ch_set[i].ChannelNum) <= hi ) { - ret = _TRUE; + ret = true; break; } } @@ -482,7 +482,7 @@ u32 rtw_chset_get_ch_non_ocp_ms(RT_CHANNEL_INFO *ch_set, u8 ch, u8 bw, u8 offset u32 hi = 0, lo = 0; int i; - if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == _FALSE) + if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == false) goto exit; current_time = rtw_get_current_time(); @@ -521,7 +521,7 @@ static void _rtw_chset_update_non_ocp(RT_CHANNEL_INFO *ch_set, u8 ch, u8 bw, u8 u32 hi = 0, lo = 0; int i; - if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == _FALSE) + if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == false) goto exit; for (i = 0; ch_set[i].ChannelNum != 0; i++) { @@ -570,12 +570,12 @@ u32 rtw_get_ch_waiting_ms(_adapter *adapter, u8 ch, u8 bw, u8 offset, u32 *r_non if (rfctl->dfs_master_enabled) { u32 cur_hi, cur_lo, hi, lo; - if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == _FALSE) { + if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == false) { RTW_ERR("input range ch:%u, bw:%u, offset:%u\n", ch, bw, offset); rtw_warn_on(1); } - if (rtw_chbw_to_freq_range(rfctl->radar_detect_ch, rfctl->radar_detect_bw, rfctl->radar_detect_offset, &cur_hi, &cur_lo) == _FALSE) { + if (rtw_chbw_to_freq_range(rfctl->radar_detect_ch, rfctl->radar_detect_bw, rfctl->radar_detect_offset, &cur_hi, &cur_lo) == false) { RTW_ERR("cur detection range ch:%u, bw:%u, offset:%u\n", rfctl->radar_detect_ch, rfctl->radar_detect_bw, rfctl->radar_detect_offset); rtw_warn_on(1); } @@ -648,7 +648,7 @@ bool rtw_choose_shortest_waiting_ch(_adapter *adapter, u8 req_bw, u8 *dec_ch, u8 if (!dec_ch || !dec_bw || !dec_offset) { rtw_warn_on(1); - return _FALSE; + return false; } /* full search and narrow bw judegement first to avoid potetial judegement timing issue */ @@ -725,13 +725,13 @@ bool rtw_choose_shortest_waiting_ch(_adapter *adapter, u8 req_bw, u8 *dec_ch, u8 *dec_ch = ch_c; *dec_bw = bw_c; *dec_offset = offset_c; - return _TRUE; + return true; } if (d_flags == 0) rtw_warn_on(1); - return _FALSE; + return false; } void dump_country_chplan(void *sel, const struct country_chplan *ent) @@ -927,7 +927,7 @@ exit: * @adapter: the given adapter * @ch: the given channel number * - * return _TRUE when check valid, _FALSE not valid + * return true when check valid, false not valid */ bool rtw_mlme_band_check(_adapter *adapter, const u32 ch) { @@ -935,8 +935,8 @@ bool rtw_mlme_band_check(_adapter *adapter, const u32 ch) || (adapter->setband == WIFI_FREQUENCY_BAND_2GHZ && ch < 35) /* 2.4G only */ || (adapter->setband == WIFI_FREQUENCY_BAND_5GHZ && ch > 35) /* 5G only */ ) - return _TRUE; - return _FALSE; + return true; + return false; } inline void RTW_SET_SCAN_BAND_SKIP(_adapter *padapter, int skip_band) { @@ -963,11 +963,11 @@ inline int RTW_GET_SCAN_BAND_SKIP(_adapter *padapter) bool rtw_mlme_ignore_chan(_adapter *adapter, const u32 ch) { if (RTW_IS_SCAN_BAND_SKIP(adapter, BAND_24G) && ch < 35) /* SKIP 2.4G Band channel */ - return _TRUE; + return true; if (RTW_IS_SCAN_BAND_SKIP(adapter, BAND_5G) && ch > 35) /* SKIP 5G Band channel */ - return _TRUE; + return true; - return _FALSE; + return false; } @@ -1045,7 +1045,7 @@ static void init_mlme_ext_priv_value(_adapter *padapter) #if defined(CONFIG_ANTENNA_DIVERSITY) || defined(DBG_SCAN_SW_ANTDIV_BL) pmlmeext->sitesurvey_res.is_sw_antdiv_bl_scan = 0; #endif - pmlmeext->scan_abort = _FALSE; + pmlmeext->scan_abort = false; pmlmeinfo->state = WIFI_FW_NULL_STATE; pmlmeinfo->reauth_count = 0; @@ -1145,16 +1145,16 @@ static bool rtw_regsty_is_excl_chs(struct registry_priv *regsty, u8 ch) if (regsty->excl_chs[i] == 0) break; if (regsty->excl_chs[i] == ch) - return _TRUE; + return true; } - return _FALSE; + return false; } static u8 init_channel_set(_adapter *padapter, u8 ChannelPlan, RT_CHANNEL_INFO *channel_set) { struct registry_priv *regsty = adapter_to_regsty(padapter); u8 index, chanset_size = 0; - u8 b5GBand = _FALSE, b2_4GBand = _FALSE; + u8 b5GBand = false, b2_4GBand = false; u8 Index2G = 0, Index5G = 0; HAL_DATA_TYPE *hal_data = GET_HAL_DATA(padapter); int i; @@ -1167,10 +1167,10 @@ static u8 init_channel_set(_adapter *padapter, u8 ChannelPlan, RT_CHANNEL_INFO * memset(channel_set, 0, sizeof(RT_CHANNEL_INFO) * MAX_CHANNEL_NUM); if (IsSupported24G(padapter->registrypriv.wireless_mode)) - b2_4GBand = _TRUE; + b2_4GBand = true; if (is_supported_5g(padapter->registrypriv.wireless_mode)) - b5GBand = _TRUE; + b5GBand = true; if (b2_4GBand) { if (RTW_CHPLAN_REALTEK_DEFINE == ChannelPlan) @@ -1179,7 +1179,7 @@ static u8 init_channel_set(_adapter *padapter, u8 ChannelPlan, RT_CHANNEL_INFO * Index2G = RTW_ChannelPlanMap[ChannelPlan].Index2G; for (index = 0; index < CH_LIST_LEN(RTW_ChannelPlan2G[Index2G]); index++) { - if (rtw_regsty_is_excl_chs(regsty, CH_LIST_CH(RTW_ChannelPlan2G[Index2G], index)) == _TRUE) + if (rtw_regsty_is_excl_chs(regsty, CH_LIST_CH(RTW_ChannelPlan2G[Index2G], index)) == true) continue; channel_set[chanset_size].ChannelNum = CH_LIST_CH(RTW_ChannelPlan2G[Index2G], index); @@ -1216,7 +1216,7 @@ static u8 init_channel_set(_adapter *padapter, u8 ChannelPlan, RT_CHANNEL_INFO * Index5G = RTW_ChannelPlanMap[ChannelPlan].Index5G; for (index = 0; index < CH_LIST_LEN(RTW_ChannelPlan5G[Index5G]); index++) { - if (rtw_regsty_is_excl_chs(regsty, CH_LIST_CH(RTW_ChannelPlan5G[Index5G], index)) == _TRUE) + if (rtw_regsty_is_excl_chs(regsty, CH_LIST_CH(RTW_ChannelPlan5G[Index5G], index)) == true) continue; #ifdef CONFIG_DFS channel_set[chanset_size].ChannelNum = CH_LIST_CH(RTW_ChannelPlan5G[Index5G], index); @@ -1292,13 +1292,13 @@ int init_mlme_ext_priv(_adapter *padapter) pmlmeext->max_chan_nums = init_channel_set(padapter, pmlmepriv->ChannelPlan, pmlmeext->channel_set); init_channel_list(padapter, pmlmeext->channel_set, pmlmeext->max_chan_nums, &pmlmeext->channel_list); pmlmeext->last_scan_time = 0; - pmlmeext->mlmeext_init = _TRUE; + pmlmeext->mlmeext_init = true; #ifdef CONFIG_ACTIVE_KEEP_ALIVE_CHECK - pmlmeext->active_keep_alive_check = _TRUE; + pmlmeext->active_keep_alive_check = true; #else - pmlmeext->active_keep_alive_check = _FALSE; + pmlmeext->active_keep_alive_check = false; #endif #ifdef DBG_FIXED_CHAN @@ -1412,7 +1412,7 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame) #ifdef CONFIG_AP_MODE switch (get_frame_sub_type(pframe)) { case WIFI_AUTH: - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) ptable->func = &OnAuth; else ptable->func = &OnAuthClient; @@ -1421,12 +1421,12 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame) case WIFI_REASSOCREQ: _mgt_dispatcher(padapter, ptable, precv_frame); #ifdef CONFIG_HOSTAPD_MLME - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) rtw_hostapd_mlme_rx(padapter, precv_frame); #endif break; case WIFI_PROBEREQ: - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) { + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) { #ifdef CONFIG_HOSTAPD_MLME rtw_hostapd_mlme_rx(padapter, precv_frame); #else @@ -1439,12 +1439,12 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame) _mgt_dispatcher(padapter, ptable, precv_frame); break; case WIFI_ACTION: - /* if(check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) */ + /* if(check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) */ _mgt_dispatcher(padapter, ptable, precv_frame); break; default: _mgt_dispatcher(padapter, ptable, precv_frame); - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) rtw_hostapd_mlme_rx(padapter, precv_frame); break; } @@ -1459,13 +1459,13 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame) #ifdef CONFIG_P2P static u32 p2p_listen_state_process(_adapter *padapter, unsigned char *da) { - bool response = _TRUE; + bool response = true; #ifdef CONFIG_IOCTL_CFG80211 if (padapter->wdinfo.driver_interface == DRIVER_CFG80211) { - if (rtw_cfg80211_get_is_roch(padapter) == _FALSE + if (rtw_cfg80211_get_is_roch(padapter) == false || rtw_get_oper_ch(padapter) != padapter->wdinfo.listen_channel - || adapter_wdev_data(padapter)->p2p_enabled == _FALSE + || adapter_wdev_data(padapter)->p2p_enabled == false || padapter->mlmepriv.wps_probe_resp_ie == NULL || padapter->mlmepriv.p2p_probe_resp_ie == NULL ) { @@ -1481,17 +1481,17 @@ static u32 p2p_listen_state_process(_adapter *padapter, unsigned char *da) , rtw_get_oper_ch(padapter) , padapter->wdinfo.listen_channel); #endif - response = _FALSE; + response = false; } } else #endif /* CONFIG_IOCTL_CFG80211 */ if (padapter->wdinfo.driver_interface == DRIVER_WEXT) { /* do nothing if the device name is empty */ if (!padapter->wdinfo.device_name_len) - response = _FALSE; + response = false; } - if (response == _TRUE) + if (response == true) issue_probersp_p2p(padapter, da); return _SUCCESS; @@ -1515,7 +1515,7 @@ unsigned int OnProbeReq(_adapter *padapter, union recv_frame *precv_frame) WLAN_BSSID_EX *cur = &(pmlmeinfo->network); u8 *pframe = precv_frame->u.hdr.rx_data; uint len = precv_frame->u.hdr.len; - u8 is_valid_p2p_probereq = _FALSE; + u8 is_valid_p2p_probereq = false; #ifdef CONFIG_ATMEL_RC_PATCH u8 *target_ie = NULL, *wps_ie = NULL; @@ -1534,7 +1534,7 @@ unsigned int OnProbeReq(_adapter *padapter, union recv_frame *precv_frame) #ifdef CONFIG_IOCTL_CFG80211 if ((pwdinfo->driver_interface == DRIVER_CFG80211) && !rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE) - && (GET_CFG80211_REPORT_MGMT(adapter_wdev_data(padapter), IEEE80211_STYPE_PROBE_REQ) == _TRUE) + && (GET_CFG80211_REPORT_MGMT(adapter_wdev_data(padapter), IEEE80211_STYPE_PROBE_REQ) == true) ) { rtw_cfg80211_rx_probe_request(padapter, precv_frame); return _SUCCESS; @@ -1563,7 +1563,7 @@ unsigned int OnProbeReq(_adapter *padapter, union recv_frame *precv_frame) if (wifi_test_chk_rate == 1) { is_valid_p2p_probereq = process_probe_req_p2p_ie(pwdinfo, pframe, len); - if (is_valid_p2p_probereq == _TRUE) { + if (is_valid_p2p_probereq == true) { if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_DEVICE)) { /* FIXME */ if (padapter->wdinfo.driver_interface == DRIVER_WEXT) @@ -1586,8 +1586,8 @@ _continue: if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) return _SUCCESS; - if (check_fwstate(pmlmepriv, _FW_LINKED) == _FALSE && - check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE | WIFI_AP_STATE) == _FALSE) + if (check_fwstate(pmlmepriv, _FW_LINKED) == false && + check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE | WIFI_AP_STATE) == false) return _SUCCESS; @@ -1601,7 +1601,7 @@ _continue: NULL, &wps_ielen); if (wps_ie) target_ie = rtw_get_wps_attr_content(wps_ie, wps_ielen, WPS_ATTR_MANUFACTURER, NULL, &target_ielen); - if ((target_ie && (target_ielen == 4)) && (_TRUE == _rtw_memcmp((void *)target_ie, "Ozmo", 4))) { + if ((target_ie && (target_ielen == 4)) && (true == _rtw_memcmp((void *)target_ie, "Ozmo", 4))) { /* psta->flag_atmel_rc = 1; */ unsigned char *sa_addr = get_sa(pframe); RTW_INFO("%s: Find Ozmo RC -- %02x:%02x:%02x:%02x:%02x:%02x \n\n", @@ -1612,8 +1612,8 @@ _continue: #ifdef CONFIG_AUTO_AP_MODE - if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE && - pmlmepriv->cur_network.join_res == _TRUE) { + if (check_fwstate(pmlmepriv, _FW_LINKED) == true && + pmlmepriv->cur_network.join_res == true) { unsigned long irqL; struct sta_info *psta; u8 *mac_addr, *peer_addr; @@ -1665,7 +1665,7 @@ _continue: psta->pid = (u16)(((mac_addr[4] << 8) + mac_addr[5]) + ((peer_addr[4] << 8) + peer_addr[5])); /* update peer stainfo */ - psta->isrc = _TRUE; + psta->isrc = true; /* get a unique AID */ if (psta->aid > 0) @@ -1687,16 +1687,16 @@ _continue: psta->qos_option = 1; psta->bw_mode = CHANNEL_WIDTH_20; - psta->ieee8021x_blocked = _FALSE; - psta->htpriv.ht_option = _TRUE; - psta->htpriv.ampdu_enable = _FALSE; - psta->htpriv.sgi_20m = _FALSE; - psta->htpriv.sgi_40m = _FALSE; + psta->ieee8021x_blocked = false; + psta->htpriv.ht_option = true; + psta->htpriv.ampdu_enable = false; + psta->htpriv.sgi_20m = false; + psta->htpriv.sgi_40m = false; psta->htpriv.ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE; psta->htpriv.agg_enable_bitmap = 0x0;/* reset */ psta->htpriv.candidate_tid_bitmap = 0x0;/* reset */ - rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, _TRUE); + rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, true); memset((void *)&psta->sta_stats, 0, sizeof(struct stainfo_stats)); @@ -1708,7 +1708,7 @@ _continue: } - issue_probersp(padapter, get_sa(pframe), _FALSE); + issue_probersp(padapter, get_sa(pframe), false); return _SUCCESS; @@ -1735,17 +1735,17 @@ _non_rc_device: /* check (wildcard) SSID */ if (p != NULL) { - if (is_valid_p2p_probereq == _TRUE) + if (is_valid_p2p_probereq == true) goto _issue_probersp; - if ((ielen != 0 && _FALSE == _rtw_memcmp((void *)(p + 2), (void *)cur->Ssid.Ssid, cur->Ssid.SsidLength)) + if ((ielen != 0 && false == _rtw_memcmp((void *)(p + 2), (void *)cur->Ssid.Ssid, cur->Ssid.SsidLength)) || (ielen == 0 && pmlmeinfo->hidden_ssid_mode) ) return _SUCCESS; _issue_probersp: - if (((check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE && - pmlmepriv->cur_network.join_res == _TRUE)) || check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) { + if (((check_fwstate(pmlmepriv, _FW_LINKED) == true && + pmlmepriv->cur_network.join_res == true)) || check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) { /* RTW_INFO("+issue_probersp during ap mode\n"); */ issue_probersp(padapter, get_sa(pframe), is_valid_p2p_probereq); } @@ -1770,16 +1770,16 @@ unsigned int OnProbeRsp(_adapter *padapter, union recv_frame *precv_frame) #ifdef CONFIG_P2P if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_PROVISION_DIS_REQ)) { - if (_TRUE == pwdinfo->tx_prov_disc_info.benable) { + if (true == pwdinfo->tx_prov_disc_info.benable) { if (_rtw_memcmp(pwdinfo->tx_prov_disc_info.peerIFAddr, get_addr2_ptr(pframe), ETH_ALEN)) { if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_CLIENT)) { - pwdinfo->tx_prov_disc_info.benable = _FALSE; + pwdinfo->tx_prov_disc_info.benable = false; issue_p2p_provision_request(padapter, pwdinfo->tx_prov_disc_info.ssid.Ssid, pwdinfo->tx_prov_disc_info.ssid.SsidLength, pwdinfo->tx_prov_disc_info.peerDevAddr); } else if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_DEVICE) || rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) { - pwdinfo->tx_prov_disc_info.benable = _FALSE; + pwdinfo->tx_prov_disc_info.benable = false; issue_p2p_provision_request(padapter, NULL, 0, @@ -1789,18 +1789,18 @@ unsigned int OnProbeRsp(_adapter *padapter, union recv_frame *precv_frame) } return _SUCCESS; } 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) { RTW_INFO("[%s] P2P State is GONEGO ING!\n", __func__); if (_rtw_memcmp(pwdinfo->nego_req_info.peerDevAddr, get_addr2_ptr(pframe), ETH_ALEN)) { - pwdinfo->nego_req_info.benable = _FALSE; + pwdinfo->nego_req_info.benable = false; issue_p2p_GO_request(padapter, pwdinfo->nego_req_info.peerDevAddr); } } } else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_INVITE_REQ)) { - if (_TRUE == pwdinfo->invitereq_info.benable) { + if (true == pwdinfo->invitereq_info.benable) { RTW_INFO("[%s] P2P_STATE_TX_INVITE_REQ!\n", __func__); if (_rtw_memcmp(pwdinfo->invitereq_info.peer_macaddr, get_addr2_ptr(pframe), ETH_ALEN)) { - pwdinfo->invitereq_info.benable = _FALSE; + pwdinfo->invitereq_info.benable = false; issue_p2p_invitation_request(padapter, pwdinfo->invitereq_info.peer_macaddr); } } @@ -1830,7 +1830,7 @@ static void rtw_check_legacy_ap(_adapter *padapter, u8 *pframe, u32 len) return; - if (pmlmeext->bstart_bss == _TRUE) { + if (pmlmeext->bstart_bss == true) { int left; u16 capability; unsigned char *pos; @@ -1854,8 +1854,8 @@ static void rtw_check_legacy_ap(_adapter *padapter, u8 *pframe, u32 len) if (0) RTW_INFO("%s: "MAC_FMT" is legacy ap\n", __func__, MAC_ARG(GetAddr3Ptr(pframe))); - ATOMIC_SET(&pmlmepriv->olbc, _TRUE); - ATOMIC_SET(&pmlmepriv->olbc_ht, _TRUE); + ATOMIC_SET(&pmlmepriv->olbc, true); + ATOMIC_SET(&pmlmepriv->olbc_ht, true); } } @@ -1882,7 +1882,7 @@ unsigned int OnBeacon(_adapter *padapter, union recv_frame *precv_frame) #endif #endif /* CONFIG_TDLS */ - if (validate_beacon_len(pframe, len) == _FALSE) + if (validate_beacon_len(pframe, len) == false) return _SUCCESS; #ifdef CONFIG_ATTEMPT_TO_FIX_AP_BEACON_ERROR p = rtw_get_ie(pframe + sizeof(struct rtw_ieee80211_hdr_3addr) + _BEACON_IE_OFFSET_, _EXT_SUPPORTEDRATES_IE_, &ielen, @@ -1912,11 +1912,11 @@ unsigned int OnBeacon(_adapter *padapter, union recv_frame *precv_frame) if (collect_bss_info(padapter, precv_frame, pbss) == _SUCCESS) { struct beacon_keys recv_beacon; - update_network(&(pmlmepriv->cur_network.network), pbss, padapter, _TRUE); + update_network(&(pmlmepriv->cur_network.network), pbss, padapter, true); rtw_get_bcn_info(&(pmlmepriv->cur_network)); /* update bcn keys */ - if (rtw_get_bcn_keys(padapter, pframe, len, &recv_beacon) == _TRUE) { + if (rtw_get_bcn_keys(padapter, pframe, len, &recv_beacon) == true) { RTW_INFO("%s: beacon keys ready\n", __func__); _rtw_memcpy(&pmlmepriv->cur_beacon_keys, &recv_beacon, sizeof(recv_beacon)); @@ -1937,7 +1937,7 @@ unsigned int OnBeacon(_adapter *padapter, union recv_frame *precv_frame) update_TSF(pmlmeext, pframe, len); /* reset for adaptive_early_32k */ - pmlmeext->adaptive_tsf_done = _FALSE; + pmlmeext->adaptive_tsf_done = false; pmlmeext->DrvBcnEarly = 0xff; pmlmeext->DrvBcnTimeOut = 0xff; pmlmeext->bcn_cnt = 0; @@ -1950,7 +1950,7 @@ unsigned int OnBeacon(_adapter *padapter, union recv_frame *precv_frame) #if defined(CONFIG_P2P) && defined(CONFIG_CONCURRENT_MODE) if (padapter->registrypriv.wifi_spec) { - if (process_p2p_cross_connect_ie(padapter, (pframe + WLAN_HDR_A3_LEN), (len - WLAN_HDR_A3_LEN)) == _FALSE) { + if (process_p2p_cross_connect_ie(padapter, (pframe + WLAN_HDR_A3_LEN), (len - WLAN_HDR_A3_LEN)) == false) { if (rtw_mi_buddy_check_mlmeinfo_state(padapter, WIFI_FW_AP_STATE)) { RTW_PRINT("no issue auth, P2P cross-connect does not permit\n "); return _SUCCESS; @@ -1974,7 +1974,7 @@ unsigned int OnBeacon(_adapter *padapter, union recv_frame *precv_frame) /* join wrong channel, deauth and reconnect */ issue_deauth(padapter, (&(pmlmeinfo->network))->MacAddress, WLAN_REASON_DEAUTH_LEAVING); - report_del_sta_event(padapter, (&(pmlmeinfo->network))->MacAddress, WLAN_REASON_JOIN_WRONG_CHANNEL, _TRUE, _FALSE); + report_del_sta_event(padapter, (&(pmlmeinfo->network))->MacAddress, WLAN_REASON_JOIN_WRONG_CHANNEL, true, false); pmlmeinfo->state &= (~WIFI_FW_ASSOC_SUCCESS); return _SUCCESS; } @@ -1983,7 +1983,7 @@ unsigned int OnBeacon(_adapter *padapter, union recv_frame *precv_frame) ret = rtw_check_bcn_info(padapter, pframe, len); if (!ret) { RTW_PRINT("ap has changed, disconnect now\n "); - receive_disconnect(padapter, pmlmeinfo->network.MacAddress , 0, _FALSE); + receive_disconnect(padapter, pmlmeinfo->network.MacAddress , 0, false); return _SUCCESS; } /* update WMM, ERP in the beacon */ @@ -1999,9 +1999,9 @@ unsigned int OnBeacon(_adapter *padapter, union recv_frame *precv_frame) #ifdef CONFIG_TDLS #ifdef CONFIG_TDLS_CH_SW - if (rtw_tdls_is_chsw_allowed(padapter) == _TRUE) { + if (rtw_tdls_is_chsw_allowed(padapter) == true) { /* Send TDLS Channel Switch Request when receiving Beacon */ - if ((padapter->tdlsinfo.chsw_info.ch_sw_state & TDLS_CH_SW_INITIATOR_STATE) && (ATOMIC_READ(&pchsw_info->chsw_on) == _TRUE) + if ((padapter->tdlsinfo.chsw_info.ch_sw_state & TDLS_CH_SW_INITIATOR_STATE) && (ATOMIC_READ(&pchsw_info->chsw_on) == true) && (pmlmeext->cur_channel == rtw_get_oper_ch(padapter))) { ptdls_sta = rtw_get_stainfo(&padapter->stapriv, padapter->tdlsinfo.chsw_info.addr); if (ptdls_sta != NULL) { @@ -2148,7 +2148,7 @@ unsigned int OnAuth(_adapter *padapter, union recv_frame *precv_frame) } #if CONFIG_RTW_MACADDR_ACL - if (rtw_access_ctrl(padapter, sa) == _FALSE) { + if (rtw_access_ctrl(padapter, sa) == false) { status = _STATS_UNABLE_HANDLE_STA_; goto auth_fail; } @@ -2173,12 +2173,12 @@ unsigned int OnAuth(_adapter *padapter, union recv_frame *precv_frame) /* pstat->capability = 0; */ } else { #ifdef CONFIG_IEEE80211W - if (pstat->bpairwise_key_installed != _TRUE && !(pstat->state & WIFI_FW_ASSOC_SUCCESS)) + if (pstat->bpairwise_key_installed != true && !(pstat->state & WIFI_FW_ASSOC_SUCCESS)) #endif /* CONFIG_IEEE80211W */ { _enter_critical_bh(&pstapriv->asoc_list_lock, &irqL); - if (rtw_is_list_empty(&pstat->asoc_list) == _FALSE) { + if (rtw_is_list_empty(&pstat->asoc_list) == false) { rtw_list_delete(&pstat->asoc_list); pstapriv->asoc_list_cnt--; if (pstat->expire_to > 0) @@ -2193,7 +2193,7 @@ unsigned int OnAuth(_adapter *padapter, union recv_frame *precv_frame) } #ifdef CONFIG_IEEE80211W - if (pstat->bpairwise_key_installed != _TRUE && !(pstat->state & WIFI_FW_ASSOC_SUCCESS)) + if (pstat->bpairwise_key_installed != true && !(pstat->state & WIFI_FW_ASSOC_SUCCESS)) #endif /* CONFIG_IEEE80211W */ { _enter_critical_bh(&pstapriv->auth_list_lock, &irqL); @@ -2219,7 +2219,7 @@ unsigned int OnAuth(_adapter *padapter, union recv_frame *precv_frame) if (algorithm == 0 && (auth_mode == 0 || auth_mode == 2 || auth_mode == 3)) { if (seq == 1) { #ifdef CONFIG_IEEE80211W - if (pstat->bpairwise_key_installed != _TRUE && !(pstat->state & WIFI_FW_ASSOC_SUCCESS)) + if (pstat->bpairwise_key_installed != true && !(pstat->state & WIFI_FW_ASSOC_SUCCESS)) #endif /* CONFIG_IEEE80211W */ { pstat->state &= ~WIFI_FW_AUTH_NULL; @@ -2240,7 +2240,7 @@ unsigned int OnAuth(_adapter *padapter, union recv_frame *precv_frame) /* get_random_bytes((void *)pstat->chg_txt, 128); */ /* TODO: */ memset((void *)pstat->chg_txt, 78, 128); #ifdef CONFIG_IEEE80211W - if (pstat->bpairwise_key_installed != _TRUE && !(pstat->state & WIFI_FW_ASSOC_SUCCESS)) + if (pstat->bpairwise_key_installed != true && !(pstat->state & WIFI_FW_ASSOC_SUCCESS)) #endif /* CONFIG_IEEE80211W */ { pstat->state &= ~WIFI_FW_AUTH_NULL; @@ -2263,7 +2263,7 @@ unsigned int OnAuth(_adapter *padapter, union recv_frame *precv_frame) if (_rtw_memcmp((void *)(p + 2), pstat->chg_txt, 128)) { #ifdef CONFIG_IEEE80211W - if (pstat->bpairwise_key_installed != _TRUE && !(pstat->state & WIFI_FW_ASSOC_SUCCESS)) + if (pstat->bpairwise_key_installed != true && !(pstat->state & WIFI_FW_ASSOC_SUCCESS)) #endif /* CONFIG_IEEE80211W */ { pstat->state &= (~WIFI_FW_AUTH_STATE); @@ -2652,7 +2652,7 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame) rtw_get_wps_attr_content(pmlmepriv->wps_beacon_ie, pmlmepriv->wps_beacon_ie_len, WPS_ATTR_SELECTED_REGISTRAR , &selected_registrar, NULL); if (!selected_registrar) { - RTW_INFO("selected_registrar is _FALSE , or AP is not ready to do WPS\n"); + RTW_INFO("selected_registrar is false , or AP is not ready to do WPS\n"); status = _STATS_UNABLE_HANDLE_STA_; @@ -2694,7 +2694,7 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame) pstat->flags &= ~WLAN_STA_WME; pstat->qos_option = 0; pstat->qos_info = 0; - pstat->has_legacy_ac = _TRUE; + pstat->has_legacy_ac = true; pstat->uapsd_vo = 0; pstat->uapsd_vi = 0; pstat->uapsd_be = 0; @@ -2715,9 +2715,9 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame) pstat->max_sp_len = (pstat->qos_info >> 5) & 0x3; if ((pstat->qos_info & 0xf) != 0xf) - pstat->has_legacy_ac = _TRUE; + pstat->has_legacy_ac = true; else - pstat->has_legacy_ac = _FALSE; + pstat->has_legacy_ac = false; if (pstat->qos_info & 0xf) { if (pstat->qos_info & BIT(0)) @@ -2751,7 +2751,7 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame) } - if (pmlmepriv->htpriv.ht_option == _FALSE) + if (pmlmepriv->htpriv.ht_option == false) goto bypass_ht_chk; /* save HT capabilities in the sta object */ @@ -2767,7 +2767,7 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame) pstat->flags &= ~WLAN_STA_HT; bypass_ht_chk: - if ((pmlmepriv->htpriv.ht_option == _FALSE) && (pstat->flags & WLAN_STA_HT)) { + if ((pmlmepriv->htpriv.ht_option == false) && (pstat->flags & WLAN_STA_HT)) { rtw_warn_on(1); status = _STATS_FAILURE_; goto OnAssocReqFail; @@ -2807,11 +2807,11 @@ bypass_ht_chk: goto OnAssocReqFail; #ifdef CONFIG_P2P - pstat->is_p2p_device = _FALSE; + pstat->is_p2p_device = false; if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) { p2pie = rtw_get_p2p_ie(pframe + WLAN_HDR_A3_LEN + ie_offset , pkt_len - WLAN_HDR_A3_LEN - ie_offset , NULL, &p2pielen); if (p2pie) { - pstat->is_p2p_device = _TRUE; + pstat->is_p2p_device = true; p2p_status_code = (u8)process_assoc_req_p2p_ie(pwdinfo, pframe, pkt_len, pstat); if (p2p_status_code > 0) { pstat->p2p_status_code = p2p_status_code; @@ -2865,7 +2865,7 @@ bypass_ht_chk: /* RTW_INFO("==================%s, %d, (%x), bpairwise_key_installed=%d, MAC:"MAC_FMT"\n" , __func__, __LINE__, pstat->state, pstat->bpairwise_key_installed, MAC_ARG(pstat->hwaddr)); */ #ifdef CONFIG_IEEE80211W - if (pstat->bpairwise_key_installed != _TRUE) + if (pstat->bpairwise_key_installed != true) #endif /* CONFIG_IEEE80211W */ { _enter_critical_bh(&pstapriv->auth_list_lock, &irqL); @@ -2888,7 +2888,7 @@ bypass_ht_chk: if (pstat && (pstat->state & WIFI_FW_ASSOC_SUCCESS) && (_STATS_SUCCESSFUL_ == status)) { #ifdef CONFIG_NATIVEAP_MLME #ifdef CONFIG_IEEE80211W - if (pstat->bpairwise_key_installed != _TRUE) + if (pstat->bpairwise_key_installed != true) #endif /* CONFIG_IEEE80211W */ { /* .1 bss_cap_update & sta_info_update */ @@ -2896,7 +2896,7 @@ bypass_ht_chk: sta_info_update(padapter, pstat); } #ifdef CONFIG_IEEE80211W - if (pstat->bpairwise_key_installed == _TRUE) + if (pstat->bpairwise_key_installed == true) status = _STATS_REFUSED_TEMPORARILY_; #endif /* CONFIG_IEEE80211W */ /* .2 issue assoc rsp before notify station join event. */ @@ -2921,14 +2921,14 @@ bypass_ht_chk: _exit_critical_bh(&pstat->lock, &irqL); #endif /* CONFIG_IOCTL_CFG80211 */ #ifdef CONFIG_IEEE80211W - if (pstat->bpairwise_key_installed != _TRUE) + if (pstat->bpairwise_key_installed != true) #endif /* CONFIG_IEEE80211W */ { /* .3-(1) report sta add event */ report_add_sta_event(padapter, pstat->hwaddr); } #ifdef CONFIG_IEEE80211W - if (pstat->bpairwise_key_installed == _TRUE && padapter->securitypriv.binstallBIPkey == _TRUE) { + if (pstat->bpairwise_key_installed == true && padapter->securitypriv.binstallBIPkey == true) { RTW_INFO(MAC_FMT"\n", MAC_ARG(pstat->hwaddr)); issue_action_SA_Query(padapter, pstat->hwaddr, 0, 0, IEEE80211W_RIGHT_KEY); } @@ -3045,10 +3045,10 @@ unsigned int OnAssocRsp(_adapter *padapter, union recv_frame *precv_frame) break; #ifdef CONFIG_TDLS case _EXT_CAP_IE_: - if (check_ap_tdls_prohibited(pIE->data, pIE->Length) == _TRUE) - padapter->tdlsinfo.ap_prohibited = _TRUE; - if (check_ap_tdls_ch_switching_prohibited(pIE->data, pIE->Length) == _TRUE) - padapter->tdlsinfo.ch_switch_prohibited = _TRUE; + if (check_ap_tdls_prohibited(pIE->data, pIE->Length) == true) + padapter->tdlsinfo.ap_prohibited = true; + if (check_ap_tdls_ch_switching_prohibited(pIE->data, pIE->Length) == true) + padapter->tdlsinfo.ch_switch_prohibited = true; break; #endif /* CONFIG_TDLS */ default: @@ -3108,7 +3108,7 @@ unsigned int OnDeAuth(_adapter *padapter, union recv_frame *precv_frame) rtw_lock_rx_suspend_timeout(8000); #ifdef CONFIG_AP_MODE - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) { + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) { unsigned long irqL; struct sta_info *psta; struct sta_priv *pstapriv = &padapter->stapriv; @@ -3122,13 +3122,13 @@ unsigned int OnDeAuth(_adapter *padapter, union recv_frame *precv_frame) psta = rtw_get_stainfo(pstapriv, get_addr2_ptr(pframe)); if (psta) { - u8 updated = _FALSE; + u8 updated = false; _enter_critical_bh(&pstapriv->asoc_list_lock, &irqL); - if (rtw_is_list_empty(&psta->asoc_list) == _FALSE) { + if (rtw_is_list_empty(&psta->asoc_list) == false) { rtw_list_delete(&psta->asoc_list); pstapriv->asoc_list_cnt--; - updated = ap_free_sta(padapter, psta, _FALSE, reason, _TRUE); + updated = ap_free_sta(padapter, psta, false, reason, true); } _exit_critical_bh(&pstapriv->asoc_list_lock, &irqL); @@ -3162,9 +3162,9 @@ unsigned int OnDeAuth(_adapter *padapter, union recv_frame *precv_frame) , FUNC_ADPT_ARG(padapter), reason, get_addr2_ptr(pframe), ignore_received_deauth); if (0 == ignore_received_deauth) - receive_disconnect(padapter, get_addr2_ptr(pframe), reason, _FALSE); + receive_disconnect(padapter, get_addr2_ptr(pframe), reason, false); } - pmlmepriv->LinkDetectInfo.bBusyTraffic = _FALSE; + pmlmepriv->LinkDetectInfo.bBusyTraffic = false; return _SUCCESS; } @@ -3198,7 +3198,7 @@ unsigned int OnDisassoc(_adapter *padapter, union recv_frame *precv_frame) rtw_lock_rx_suspend_timeout(8000); #ifdef CONFIG_AP_MODE - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) { + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) { unsigned long irqL; struct sta_info *psta; struct sta_priv *pstapriv = &padapter->stapriv; @@ -3212,13 +3212,13 @@ unsigned int OnDisassoc(_adapter *padapter, union recv_frame *precv_frame) psta = rtw_get_stainfo(pstapriv, get_addr2_ptr(pframe)); if (psta) { - u8 updated = _FALSE; + u8 updated = false; _enter_critical_bh(&pstapriv->asoc_list_lock, &irqL); - if (rtw_is_list_empty(&psta->asoc_list) == _FALSE) { + if (rtw_is_list_empty(&psta->asoc_list) == false) { rtw_list_delete(&psta->asoc_list); pstapriv->asoc_list_cnt--; - updated = ap_free_sta(padapter, psta, _FALSE, reason, _TRUE); + updated = ap_free_sta(padapter, psta, false, reason, true); } _exit_critical_bh(&pstapriv->asoc_list_lock, &irqL); @@ -3233,9 +3233,9 @@ unsigned int OnDisassoc(_adapter *padapter, union recv_frame *precv_frame) RTW_PRINT(FUNC_ADPT_FMT" reason=%u, ta=%pM\n" , FUNC_ADPT_ARG(padapter), reason, get_addr2_ptr(pframe)); - receive_disconnect(padapter, get_addr2_ptr(pframe), reason, _FALSE); + receive_disconnect(padapter, get_addr2_ptr(pframe), reason, false); } - pmlmepriv->LinkDetectInfo.bBusyTraffic = _FALSE; + pmlmepriv->LinkDetectInfo.bBusyTraffic = false; return _SUCCESS; } @@ -3296,7 +3296,7 @@ static unsigned int on_action_spct_ch_switch(_adapter *padapter, struct sta_info * 2. things after channel switching */ - ret = rtw_set_ch_cmd(padapter, ch, bwmode, ch_offset, _TRUE); + ret = rtw_set_ch_cmd(padapter, ch, bwmode, ch_offset, true); } exit: @@ -3412,7 +3412,7 @@ u8 rtw_rx_ampdu_size(_adapter *adapter) } #ifdef CONFIG_BT_COEXIST - if (rtw_btcoex_IsBTCoexCtrlAMPDUSize(adapter) == _TRUE) { + if (rtw_btcoex_IsBTCoexCtrlAMPDUSize(adapter) == true) { size = rtw_btcoex_GetAMPDUSize(adapter); goto exit; } @@ -3475,8 +3475,8 @@ bool rtw_rx_ampdu_is_accept(_adapter *adapter) } #ifdef CONFIG_BT_COEXIST - if (rtw_btcoex_IsBTCoexRejectAMPDU(adapter) == _TRUE) { - accept = _FALSE; + if (rtw_btcoex_IsBTCoexRejectAMPDU(adapter) == true) { + accept = false; goto exit; } #endif @@ -3507,7 +3507,7 @@ exit: */ bool rtw_rx_ampdu_set_size(_adapter *adapter, u8 size, u8 reason) { - bool is_adj = _FALSE; + bool is_adj = false; struct mlme_ext_priv *mlmeext; struct mlme_ext_info *mlmeinfo; @@ -3517,7 +3517,7 @@ bool rtw_rx_ampdu_set_size(_adapter *adapter, u8 size, u8 reason) if (reason == RX_AMPDU_DRV_FIXED) { if (adapter->fix_rx_ampdu_size != size) { adapter->fix_rx_ampdu_size = size; - is_adj = _TRUE; + is_adj = true; RTW_INFO(FUNC_ADPT_FMT" fix_rx_ampdu_size:%u\n", FUNC_ADPT_ARG(adapter), size); } } else if (reason == RX_AMPDU_DRV_SCAN) { @@ -3525,7 +3525,7 @@ bool rtw_rx_ampdu_set_size(_adapter *adapter, u8 size, u8 reason) if (ss->rx_ampdu_size != size) { ss->rx_ampdu_size = size; - is_adj = _TRUE; + is_adj = true; RTW_INFO(FUNC_ADPT_FMT" ss.rx_ampdu_size:%u\n", FUNC_ADPT_ARG(adapter), size); } } @@ -3543,7 +3543,7 @@ bool rtw_rx_ampdu_set_size(_adapter *adapter, u8 size, u8 reason) */ bool rtw_rx_ampdu_set_accept(_adapter *adapter, u8 accept, u8 reason) { - bool is_adj = _FALSE; + bool is_adj = false; struct mlme_ext_priv *mlmeext; struct mlme_ext_info *mlmeinfo; @@ -3553,13 +3553,13 @@ bool rtw_rx_ampdu_set_accept(_adapter *adapter, u8 accept, u8 reason) if (reason == RX_AMPDU_DRV_FIXED) { if (adapter->fix_rx_ampdu_accept != accept) { adapter->fix_rx_ampdu_accept = accept; - is_adj = _TRUE; + is_adj = true; RTW_INFO(FUNC_ADPT_FMT" fix_rx_ampdu_accept:%u\n", FUNC_ADPT_ARG(adapter), accept); } } else if (reason == RX_AMPDU_DRV_SCAN) { if (adapter->mlmeextpriv.sitesurvey_res.rx_ampdu_accept != accept) { adapter->mlmeextpriv.sitesurvey_res.rx_ampdu_accept = accept; - is_adj = _TRUE; + is_adj = true; RTW_INFO(FUNC_ADPT_FMT" ss.rx_ampdu_accept:%u\n", FUNC_ADPT_ARG(adapter), accept); } } @@ -3588,7 +3588,7 @@ u8 rx_ampdu_apply_sta_tid(_adapter *adapter, struct sta_info *sta, u8 tid, u8 ac u8 ret = 0; struct recv_reorder_ctrl *reorder_ctl = &sta->recvreorder_ctrl[tid]; - if (reorder_ctl->enable == _FALSE) { + if (reorder_ctl->enable == false) { if (reorder_ctl->ampdu_size != RX_AMPDU_SIZE_INVALID) { send_delba_sta_tid_wait_ack(adapter, 0, sta, tid, 1); ret = 3; @@ -3596,7 +3596,7 @@ u8 rx_ampdu_apply_sta_tid(_adapter *adapter, struct sta_info *sta, u8 tid, u8 ac goto exit; } - if (accept == _FALSE) { + if (accept == false) { send_delba_sta_tid_wait_ack(adapter, 0, sta, tid, 0); ret = 1; } else if (reorder_ctl->ampdu_size != size) { @@ -3666,7 +3666,7 @@ u16 rtw_rx_ampdu_apply(_adapter *adapter) phead = &pstapriv->asoc_list; plist = get_next(phead); - while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { + while ((rtw_end_of_queue_search(phead, plist)) == false) { int stainfo_offset; sta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); @@ -3725,8 +3725,8 @@ unsigned int OnAction_back(_adapter *padapter, union recv_frame *precv_frame) if (category == RTW_WLAN_CATEGORY_BACK) { /* representing Block Ack */ #ifdef CONFIG_TDLS if ((psta->tdls_sta_state & TDLS_LINKED_STATE) && - (psta->htpriv.ht_option == _TRUE) && - (psta->htpriv.ampdu_enable == _TRUE)) + (psta->htpriv.ht_option == true) && + (psta->htpriv.ampdu_enable == true)) RTW_INFO("Recv [%s] from direc link\n", __func__); else #endif /* CONFIG_TDLS */ @@ -3756,7 +3756,7 @@ unsigned int OnAction_back(_adapter *padapter, union recv_frame *precv_frame) psta->htpriv.candidate_tid_bitmap &= ~BIT(tid); /* amsdu in ampdu */ if (frame_body[5] & 1) - psta->htpriv.tx_amsdu_enable = _TRUE; + psta->htpriv.tx_amsdu_enable = true; } else psta->htpriv.agg_enable_bitmap &= ~BIT(tid); @@ -3781,7 +3781,7 @@ unsigned int OnAction_back(_adapter *padapter, union recv_frame *precv_frame) tid = (frame_body[3] >> 4) & 0x0F; preorder_ctrl = &psta->recvreorder_ctrl[tid]; - preorder_ctrl->enable = _FALSE; + preorder_ctrl->enable = false; preorder_ctrl->ampdu_size = RX_AMPDU_SIZE_INVALID; } @@ -5733,7 +5733,7 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) #ifdef CONFIG_INTEL_WIDI /* Commented by Kurt */ /* Appended WiDi info. only if we did issued_probereq_widi(), and then we saved ven. ext. in pmlmepriv->sa_ext. */ - if (_rtw_memcmp(pmlmepriv->sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN) == _FALSE + if (_rtw_memcmp(pmlmepriv->sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN) == false || pmlmepriv->num_p2p_sdt != 0) { /* Sec dev type */ *(__be16 *)(wpsie + wpsielen) = cpu_to_be16(WPS_ATTR_SEC_DEV_TYPE_LIST); @@ -5755,7 +5755,7 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) *(__be16 *)(wpsie + wpsielen) = cpu_to_be16(WPS_PDT_SCID_WIDI_CONSUMER_SINK); wpsielen += 2; - if (_rtw_memcmp(pmlmepriv->sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN) == _FALSE) { + if (_rtw_memcmp(pmlmepriv->sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN) == false) { /* Vendor Extension */ _rtw_memcpy(wpsie + wpsielen, pmlmepriv->sa_ext, L2SDTA_SERVICE_VE_LEN); wpsielen += L2SDTA_SERVICE_VE_LEN; @@ -6250,7 +6250,7 @@ exit: inline void issue_probereq_p2p(_adapter *adapter, u8 *da) { - _issue_probereq_p2p(adapter, da, _FALSE); + _issue_probereq_p2p(adapter, da, false); } /* @@ -6265,7 +6265,7 @@ int issue_probereq_p2p_ex(_adapter *adapter, u8 *da, int try_cnt, int wait_ms) u32 start = rtw_get_current_time(); do { - ret = _issue_probereq_p2p(adapter, da, wait_ms > 0 ? _TRUE : _FALSE); + ret = _issue_probereq_p2p(adapter, da, wait_ms > 0 ? true : false); i++; @@ -6416,7 +6416,7 @@ static unsigned int on_action_public_p2p(union recv_frame *precv_frame) /* Commented by Albert 20110425 */ /* The restore timer is enabled when issuing the nego request frame of rtw_p2p_connect function. */ _cancel_timer_ex(&pwdinfo->restore_p2p_state_timer); - pwdinfo->nego_req_info.benable = _FALSE; + pwdinfo->nego_req_info.benable = false; result = process_p2p_group_negotation_resp(pwdinfo, frame_body, len); issue_p2p_GO_confirm(pwdinfo->padapter, get_addr2_ptr(pframe), result); if (P2P_STATUS_SUCCESS == result) { @@ -6620,7 +6620,7 @@ static unsigned int on_action_public_p2p(union recv_frame *precv_frame) if (attr_contentlen == 1) { RTW_INFO("[%s] Status = %d\n", __func__, attr_content); - pwdinfo->invitereq_info.benable = _FALSE; + pwdinfo->invitereq_info.benable = false; if (attr_content == P2P_STATUS_SUCCESS) { if (_rtw_memcmp(pwdinfo->invitereq_info.go_bssid, adapter_mac_addr(padapter), ETH_ALEN)) @@ -6710,7 +6710,7 @@ static unsigned int on_action_public_vendor(union recv_frame *precv_frame) uint frame_len = precv_frame->u.hdr.len; u8 *frame_body = pframe + sizeof(struct rtw_ieee80211_hdr_3addr); - if (_rtw_memcmp(frame_body + 2, P2P_OUI, 4) == _TRUE) { + if (_rtw_memcmp(frame_body + 2, P2P_OUI, 4) == true) { if (rtw_action_public_decache(precv_frame, 7) == _FAIL) goto exit; @@ -6772,7 +6772,7 @@ unsigned int on_action_public(_adapter *padapter, union recv_frame *precv_frame) case ACT_PUBLIC_BSSCOEXIST: #ifdef CONFIG_AP_MODE /*20/40 BSS Coexistence Management frame is a Public Action frame*/ - if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == _TRUE) + if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true) rtw_process_public_act_bsscoex(padapter, pframe, frame_len); #endif /*CONFIG_AP_MODE*/ break; @@ -6852,7 +6852,7 @@ unsigned int OnAction_ft(_adapter *padapter, union recv_frame *precv_frame) _cancel_timer_ex(&pmlmeext->ft_link_timer); /*Disconnect current AP*/ - receive_disconnect(padapter, pmlmepriv->cur_network.network.MacAddress, WLAN_REASON_ACTIVE_ROAM, _FALSE); + receive_disconnect(padapter, pmlmepriv->cur_network.network.MacAddress, WLAN_REASON_ACTIVE_ROAM, false); pftpriv->ft_action_len = frame_len; _rtw_memcpy(pftpriv->ft_action, pframe, rtw_min(frame_len, RTW_MAX_FTIE_SZ)); @@ -6892,7 +6892,7 @@ unsigned int OnAction_ht(_adapter *padapter, union recv_frame *precv_frame) switch (action) { case RTW_WLAN_ACTION_HT_SM_PS: #ifdef CONFIG_AP_MODE - if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == _TRUE) + if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true) rtw_process_ht_action_smps(padapter, get_addr2_ptr(pframe), frame_body[2]); #endif /*CONFIG_AP_MODE*/ break; @@ -7097,12 +7097,12 @@ exit: inline struct xmit_frame *alloc_mgtxmitframe(struct xmit_priv *pxmitpriv) { - return _alloc_mgtxmitframe(pxmitpriv, _FALSE); + return _alloc_mgtxmitframe(pxmitpriv, false); } inline struct xmit_frame *alloc_mgtxmitframe_once(struct xmit_priv *pxmitpriv) { - return _alloc_mgtxmitframe(pxmitpriv, _TRUE); + return _alloc_mgtxmitframe(pxmitpriv, true); } @@ -7157,17 +7157,17 @@ void update_monitor_frame_attrib(_adapter *padapter, struct pkt_attrib *pattrib) pattrib->rate = MGN_MCS7; pattrib->encrypt = _NO_PRIVACY_; - pattrib->bswenc = _FALSE; + pattrib->bswenc = false; - pattrib->qos_en = _FALSE; + pattrib->qos_en = false; pattrib->ht_en = 1; pattrib->bwmode = CHANNEL_WIDTH_20; pattrib->ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE; - pattrib->sgi = _FALSE; + pattrib->sgi = false; pattrib->seqnum = pmlmeext->mgnt_seq; - pattrib->retry_ctrl = _TRUE; + pattrib->retry_ctrl = true; pattrib->mbssid = 0; pattrib->hw_ssn_sel = pxmitpriv->hw_ssn_seq_no; @@ -7213,17 +7213,17 @@ void update_mgntframe_attrib(_adapter *padapter, struct pkt_attrib *pattrib) pattrib->rate = pmlmeext->tx_rate; pattrib->encrypt = _NO_PRIVACY_; - pattrib->bswenc = _FALSE; + pattrib->bswenc = false; - pattrib->qos_en = _FALSE; - pattrib->ht_en = _FALSE; + pattrib->qos_en = false; + pattrib->ht_en = false; pattrib->bwmode = CHANNEL_WIDTH_20; pattrib->ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE; - pattrib->sgi = _FALSE; + pattrib->sgi = false; pattrib->seqnum = pmlmeext->mgnt_seq; - pattrib->retry_ctrl = _TRUE; + pattrib->retry_ctrl = true; pattrib->mbssid = 0; pattrib->hw_ssn_sel = pxmitpriv->hw_ssn_seq_no; @@ -7307,14 +7307,14 @@ s32 dump_mgntframe_and_wait_ack_timeout(_adapter *padapter, struct xmit_frame *p } _enter_critical_mutex(&pxmitpriv->ack_tx_mutex, NULL); - pxmitpriv->ack_tx = _TRUE; + pxmitpriv->ack_tx = true; pxmitpriv->seq_no = seq_no++; pmgntframe->ack_report = 1; rtw_sctx_init(&(pxmitpriv->ack_tx_ops), timeout_ms); if (rtw_hal_mgnt_xmit(padapter, pmgntframe) == _SUCCESS) ret = rtw_sctx_wait(&(pxmitpriv->ack_tx_ops), __func__); - pxmitpriv->ack_tx = _FALSE; + pxmitpriv->ack_tx = false; _exit_critical_mutex(&pxmitpriv->ack_tx_mutex, NULL); return ret; @@ -7669,7 +7669,7 @@ void issue_beacon(_adapter *padapter, int timeout_ms) _issue_bcn: #if defined(CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) - pmlmepriv->update_bcn = _FALSE; + pmlmepriv->update_bcn = false; _exit_critical_bh(&pmlmepriv->bcn_update_lock, &irqL); #endif /* #if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) */ @@ -8063,7 +8063,7 @@ exit: inline void issue_probereq(_adapter *padapter, NDIS_802_11_SSID *pssid, u8 *da) { - _issue_probereq(padapter, pssid, da, 0, 1, _FALSE); + _issue_probereq(padapter, pssid, da, 0, 1, false); } /* @@ -8082,7 +8082,7 @@ int issue_probereq_ex(_adapter *padapter, NDIS_802_11_SSID *pssid, u8 *da, u8 ch goto exit; do { - ret = _issue_probereq(padapter, pssid, da, ch, append_wps, wait_ms > 0 ? _TRUE : _FALSE); + ret = _issue_probereq(padapter, pssid, da, ch, append_wps, wait_ms > 0 ? true : false); i++; @@ -8133,8 +8133,8 @@ void issue_auth(_adapter *padapter, struct sta_info *psta, unsigned short status #ifdef CONFIG_RTW_80211R struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); ft_priv *pftpriv = &pmlmepriv->ftpriv; - u8 is_ft_roaming = _FALSE; - u8 is_ft_roaming_with_rsn_ie = _TRUE; + u8 is_ft_roaming = false; + u8 is_ft_roaming_with_rsn_ie = true; u8 *pie = NULL; u32 ft_ie_len = 0; #endif @@ -8208,7 +8208,7 @@ void issue_auth(_adapter *padapter, struct sta_info *psta, unsigned short status #ifdef CONFIG_RTW_80211R /*For Fast BSS Transition */ if ((rtw_to_roam(padapter) > 0) && rtw_chk_ft_flags(padapter, RTW_FT_SUPPORTED)) { - is_ft_roaming = _TRUE; + is_ft_roaming = true; val16 = 2; /* 2: 802.11R FTAA */ le_val16 = cpu_to_le16(val16); } else @@ -8250,12 +8250,12 @@ void issue_auth(_adapter *padapter, struct sta_info *psta, unsigned short status pframe = rtw_set_fixed_ie(pframe, _STATUS_CODE_, (unsigned char *)&le_val16, &(pattrib->pktlen)); #ifdef CONFIG_RTW_80211R - if (is_ft_roaming == _TRUE) { + if (is_ft_roaming == true) { pie = rtw_get_ie(pftpriv->updated_ft_ies, EID_WPA2, &ft_ie_len, pftpriv->updated_ft_ies_len); if (pie) pframe = rtw_set_ie(pframe, EID_WPA2, ft_ie_len, pie+2, &(pattrib->pktlen)); else - is_ft_roaming_with_rsn_ie = _FALSE; + is_ft_roaming_with_rsn_ie = false; pie = rtw_get_ie(pftpriv->updated_ft_ies, _MDIE_, &ft_ie_len, pftpriv->updated_ft_ies_len); if (pie) @@ -8455,7 +8455,7 @@ void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *p } #ifdef CONFIG_P2P - if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO) && (pstat->is_p2p_device == _TRUE)) { + if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO) && (pstat->is_p2p_device == true)) { u32 len; if (padapter->wdinfo.driver_interface == DRIVER_CFG80211) { @@ -8555,7 +8555,7 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc) SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; - if (is_reassoc == _TRUE) + if (is_reassoc == true) set_frame_sub_type(pframe, WIFI_REASSOCREQ); else set_frame_sub_type(pframe, WIFI_ASSOCREQ); @@ -8584,7 +8584,7 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc) pattrib->pktlen += 2; /*Construct Current AP Field for Reassoc-Req only*/ - if (is_reassoc == _TRUE) { + if (is_reassoc == true) { _rtw_memcpy(pframe, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); pframe += ETH_ALEN; pattrib->pktlen += ETH_ALEN; @@ -8703,7 +8703,7 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc) case EID_WPA2: #ifdef CONFIG_RTW_80211R - if ((is_reassoc == _TRUE) && (rtw_to_roam(padapter) > 0) && rtw_chk_ft_flags(padapter, RTW_FT_SUPPORTED)) { + if ((is_reassoc == true) && (rtw_to_roam(padapter) > 0) && rtw_chk_ft_flags(padapter, RTW_FT_SUPPORTED)) { pie = rtw_get_ie(pftpriv->updated_ft_ies, EID_WPA2, &ft_ie_len, pftpriv->updated_ft_ies_len); if (pie) pframe = rtw_set_ie(pframe, EID_WPA2, ft_ie_len, pie+2, &(pattrib->pktlen)); @@ -8712,7 +8712,7 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc) pframe = rtw_set_ie(pframe, EID_WPA2, pIE->Length, pIE->data, &(pattrib->pktlen)); break; case EID_HTCapability: - if (padapter->mlmepriv.htpriv.ht_option == _TRUE) { + if (padapter->mlmepriv.htpriv.ht_option == true) { if (!(is_ap_in_tkip(padapter))) { _rtw_memcpy(&(pmlmeinfo->HT_caps), pIE->data, sizeof(struct HT_caps_element)); pframe = rtw_set_ie(pframe, EID_HTCapability, pIE->Length , (u8 *)(&(pmlmeinfo->HT_caps)), &(pattrib->pktlen)); @@ -8721,7 +8721,7 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc) break; case EID_EXTCapability: - if (padapter->mlmepriv.htpriv.ht_option == _TRUE) + if (padapter->mlmepriv.htpriv.ht_option == true) pframe = rtw_set_ie(pframe, EID_EXTCapability, pIE->Length, pIE->data, &(pattrib->pktlen)); break; default: @@ -8899,13 +8899,13 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc) pframe = rtw_set_ie(pframe, _MDIE_, 3, mdieval, &(pattrib->pktlen)); } - if (is_reassoc == _TRUE) { + if (is_reassoc == true) { if ((rtw_to_roam(padapter) > 0) && rtw_chk_ft_flags(padapter, RTW_FT_SUPPORTED)) { - u8 is_ft_roaming_with_rsn_ie = _TRUE; + u8 is_ft_roaming_with_rsn_ie = true; pie = rtw_get_ie(pftpriv->updated_ft_ies, EID_WPA2, &ft_ie_len, pftpriv->updated_ft_ies_len); if (!pie) - is_ft_roaming_with_rsn_ie = _FALSE; + is_ft_roaming_with_rsn_ie = false; pie = rtw_get_ie(pftpriv->updated_ft_ies, _FTIE_, &ft_ie_len, pftpriv->updated_ft_ies_len); if (pie && is_ft_roaming_with_rsn_ie) @@ -8930,12 +8930,12 @@ exit: void issue_assocreq(_adapter *padapter) { - _issue_assocreq(padapter, _FALSE); + _issue_assocreq(padapter, false); } void issue_reassocreq(_adapter *padapter) { - _issue_assocreq(padapter, _TRUE); + _issue_assocreq(padapter, true); } /* when wait_ack is ture, this function shoule be called at process context */ @@ -8970,7 +8970,7 @@ static int _issue_nulldata(_adapter *padapter, unsigned char *da, unsigned int p /* update attribute */ pattrib = &pmgntframe->attrib; update_mgntframe_attrib(padapter, pattrib); - pattrib->retry_ctrl = _FALSE; + pattrib->retry_ctrl = false; memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); @@ -9029,13 +9029,13 @@ int issue_nulldata(_adapter *padapter, unsigned char *da, unsigned int power_mod struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct sta_info *psta; - u8 macid_sleep_reg_access = _TRUE; + u8 macid_sleep_reg_access = true; #ifdef CONFIG_MCC_MODE if (MCC_EN(padapter)) { /* driver doesn't access macid sleep reg under MCC */ if (rtw_hal_check_mcc_status(padapter, MCC_STATUS_DOING_MCC)) { - macid_sleep_reg_access = _FALSE; + macid_sleep_reg_access = false; if (da == NULL) { RTW_INFO("Warning: Do not tx null data to AP under MCC mode\n"); @@ -9068,7 +9068,7 @@ int issue_nulldata(_adapter *padapter, unsigned char *da, unsigned int power_mod } do { - ret = _issue_nulldata(padapter, da, power_mode, wait_ms > 0 ? _TRUE : _FALSE); + ret = _issue_nulldata(padapter, da, power_mode, wait_ms > 0 ? true : false); i++; @@ -9121,7 +9121,7 @@ s32 issue_nulldata_in_interrupt(PADAPTER padapter, u8 *da, unsigned int power_mo if (da == NULL) da = get_my_bssid(&(pmlmeinfo->network)); - ret = _issue_nulldata(padapter, da, power_mode, _FALSE); + ret = _issue_nulldata(padapter, da, power_mode, false); return ret; } @@ -9153,7 +9153,7 @@ static int _issue_qos_nulldata(_adapter *padapter, unsigned char *da, u16 tid, i update_mgntframe_attrib(padapter, pattrib); pattrib->hdrlen += 2; - pattrib->qos_en = _TRUE; + pattrib->qos_en = true; pattrib->eosp = 1; pattrib->ack_policy = 0; pattrib->mdata = 0; @@ -9229,7 +9229,7 @@ int issue_qos_nulldata(_adapter *padapter, unsigned char *da, u16 tid, int try_c da = get_my_bssid(&(pmlmeinfo->network)); do { - ret = _issue_qos_nulldata(padapter, da, tid, wait_ms > 0 ? _TRUE : _FALSE); + ret = _issue_qos_nulldata(padapter, da, tid, wait_ms > 0 ? true : false); i++; @@ -9296,7 +9296,7 @@ static int _issue_deauth(_adapter *padapter, unsigned char *da, unsigned short r /* update attribute */ pattrib = &pmgntframe->attrib; update_mgntframe_attrib(padapter, pattrib); - pattrib->retry_ctrl = _FALSE; + pattrib->retry_ctrl = false; pattrib->key_type = key_type; memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); @@ -9337,14 +9337,14 @@ exit: int issue_deauth(_adapter *padapter, unsigned char *da, unsigned short reason) { RTW_INFO("%s to "MAC_FMT"\n", __func__, MAC_ARG(da)); - return _issue_deauth(padapter, da, reason, _FALSE, IEEE80211W_RIGHT_KEY); + return _issue_deauth(padapter, da, reason, false, IEEE80211W_RIGHT_KEY); } #ifdef CONFIG_IEEE80211W int issue_deauth_11w(_adapter *padapter, unsigned char *da, unsigned short reason, u8 key_type) { RTW_INFO("%s to "MAC_FMT"\n", __func__, MAC_ARG(da)); - return _issue_deauth(padapter, da, reason, _FALSE, key_type); + return _issue_deauth(padapter, da, reason, false, key_type); } #endif /* CONFIG_IEEE80211W */ @@ -9364,7 +9364,7 @@ int issue_deauth_ex(_adapter *padapter, u8 *da, unsigned short reason, int try_c goto exit; do { - ret = _issue_deauth(padapter, da, reason, wait_ms > 0 ? _TRUE : _FALSE, IEEE80211W_RIGHT_KEY); + ret = _issue_deauth(padapter, da, reason, wait_ms > 0 ? true : false, IEEE80211W_RIGHT_KEY); i++; @@ -9729,7 +9729,7 @@ inline void issue_addba_req(_adapter *adapter, unsigned char *ra, u8 tid) , 0 /* unused */ , 0 /* unused */ , 0 /* unused */ - , _FALSE + , false ); RTW_INFO(FUNC_ADPT_FMT" ra="MAC_FMT" tid=%u\n" , FUNC_ADPT_ARG(adapter), MAC_ARG(ra), tid); @@ -9751,7 +9751,7 @@ inline void issue_addba_rsp(_adapter *adapter, unsigned char *ra, u8 tid, u16 st , size , status , 0 /* unused */ - , _FALSE + , false ); RTW_INFO(FUNC_ADPT_FMT" ra="MAC_FMT" status=%u, tid=%u, size=%u\n" , FUNC_ADPT_ARG(adapter), MAC_ARG(ra), status, tid, size); @@ -9783,7 +9783,7 @@ inline u8 issue_addba_rsp_wait_ack(_adapter *adapter, unsigned char *ra, u8 tid, , size , status , 0 /* unused */ - , _TRUE + , true ); i++; @@ -9828,7 +9828,7 @@ inline void issue_del_ba(_adapter *adapter, unsigned char *ra, u8 tid, u16 reaso , 0 /* unused */ , reason , initiator - , _FALSE + , false ); RTW_INFO(FUNC_ADPT_FMT" ra="MAC_FMT" reason=%u, tid=%u, initiator=%u\n" , FUNC_ADPT_ARG(adapter), MAC_ARG(ra), reason, tid, initiator); @@ -9861,7 +9861,7 @@ int issue_del_ba_ex(_adapter *adapter, unsigned char *ra, u8 tid, u16 reason, u8 , 0 /* unused */ , reason , initiator - , wait_ms > 0 ? _TRUE : _FALSE + , wait_ms > 0 ? true : false ); i++; @@ -9912,7 +9912,7 @@ static void issue_action_BSSCoexistPacket(_adapter *padapter) if ((pmlmepriv->num_FortyMHzIntolerant == 0) || (pmlmepriv->num_sta_no_ht == 0)) return; - if (_TRUE == pmlmeinfo->bwmode_updated) + if (true == pmlmeinfo->bwmode_updated) return; if (rtw_rfctl_is_tx_blocked_by_ch_waiting(adapter_to_rfctl(padapter))) @@ -9981,7 +9981,7 @@ static void issue_action_BSSCoexistPacket(_adapter *padapter) u8 *p; WLAN_BSSID_EX *pbss_network; - 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); @@ -10136,7 +10136,7 @@ int issue_action_SM_PS_wait_ack(_adapter *padapter, unsigned char *raddr, u8 New goto exit; do { - ret = _issue_action_SM_PS(padapter, raddr, NewMimoPsMode , wait_ms > 0 ? _TRUE : _FALSE); + ret = _issue_action_SM_PS(padapter, raddr, NewMimoPsMode , wait_ms > 0 ? true : false); i++; @@ -10173,7 +10173,7 @@ exit: int issue_action_SM_PS(_adapter *padapter , unsigned char *raddr , u8 NewMimoPsMode) { RTW_INFO("%s to "MAC_FMT"\n", __func__, MAC_ARG(raddr)); - return _issue_action_SM_PS(padapter, raddr, NewMimoPsMode , _FALSE); + return _issue_action_SM_PS(padapter, raddr, NewMimoPsMode , false); } /** @@ -10202,10 +10202,10 @@ static unsigned int _send_delba_sta_tid(_adapter *adapter, u8 initiator, struct if (initiator == 0) { /* recipient */ - if (force || sta->recvreorder_ctrl[tid].enable == _TRUE) { + if (force || sta->recvreorder_ctrl[tid].enable == true) { u8 ampdu_size_bak = sta->recvreorder_ctrl[tid].ampdu_size; - sta->recvreorder_ctrl[tid].enable = _FALSE; + sta->recvreorder_ctrl[tid].enable = false; sta->recvreorder_ctrl[tid].ampdu_size = RX_AMPDU_SIZE_INVALID; if (rtw_del_rx_ampdu_test_trigger_no_tx_fail()) @@ -10215,7 +10215,7 @@ static unsigned int _send_delba_sta_tid(_adapter *adapter, u8 initiator, struct else issue_del_ba(adapter, sta->hwaddr, tid, 37, initiator); - if (ret == _FAIL && sta->recvreorder_ctrl[tid].enable == _FALSE) + if (ret == _FAIL && sta->recvreorder_ctrl[tid].enable == false) sta->recvreorder_ctrl[tid].ampdu_size = ampdu_size_bak; } } else if (initiator == 1) { @@ -10265,7 +10265,7 @@ unsigned int send_delba(_adapter *padapter, u8 initiator, u8 *addr) unsigned int send_beacon(_adapter *padapter) { - u8 bxmitok = _FALSE; + u8 bxmitok = false; int issue = 0; int poll = 0; #if defined(CONFIG_PCI_HCI) && defined(RTL8814AE_SW_BCN) @@ -10302,15 +10302,15 @@ unsigned int send_beacon(_adapter *padapter) rtw_yield_os(); rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8 *)(&bxmitok)); poll++; - } while ((poll % 10) != 0 && _FALSE == bxmitok && !RTW_CANNOT_RUN(padapter)); + } while ((poll % 10) != 0 && false == bxmitok && !RTW_CANNOT_RUN(padapter)); - } while (_FALSE == bxmitok && issue < 100 && !RTW_CANNOT_RUN(padapter)); + } while (false == bxmitok && issue < 100 && !RTW_CANNOT_RUN(padapter)); if (RTW_CANNOT_RUN(padapter)) return _FAIL; - if (_FALSE == bxmitok) { + if (false == bxmitok) { RTW_INFO("%s fail! %u ms\n", __func__, rtw_get_passing_time_ms(start)); return _FAIL; } else { @@ -10346,8 +10346,8 @@ bool IsLegal5GChannel( }; for (i = 0; i < sizeof(Channel_5G); i++) if (channel == Channel_5G[i]) - return _TRUE; - return _FALSE; + return true; + return false; } /* collect bss info from Beacon and Probe request/response frames. */ @@ -10520,7 +10520,7 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI bssid->Configuration.ATIMWindow = 0; /* 20/40 BSS Coexistence check */ - if ((pregistrypriv->wifi_spec == 1) && (_FALSE == pmlmeinfo->bwmode_updated)) { + if ((pregistrypriv->wifi_spec == 1) && (false == pmlmeinfo->bwmode_updated)) { struct mlme_priv *pmlmepriv = &padapter->mlmepriv; p = rtw_get_ie(bssid->IEs + ie_offset, _HT_CAPABILITY_IE_, &len, bssid->IELength - ie_offset); if (p && len > 0) { @@ -10564,7 +10564,7 @@ void start_create_ibss(_adapter *padapter) struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX *)(&(pmlmeinfo->network)); - u8 doiqk = _FALSE; + u8 doiqk = false; pmlmeext->cur_channel = (u8)pnetwork->Configuration.DSConfig; pmlmeinfo->bcn_interval = get_beacon_interval(pnetwork); @@ -10580,13 +10580,13 @@ void start_create_ibss(_adapter *padapter) val8 = 0xcf; rtw_hal_set_hwreg(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8)); - doiqk = _TRUE; + doiqk = true; rtw_hal_set_hwreg(padapter , HW_VAR_DO_IQK , &doiqk); /* switch channel */ set_channel_bwmode(padapter, pmlmeext->cur_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, CHANNEL_WIDTH_20); - doiqk = _FALSE; + doiqk = false; rtw_hal_set_hwreg(padapter , HW_VAR_DO_IQK , &doiqk); beacon_timing_control(padapter); @@ -10637,7 +10637,7 @@ void start_clnt_join(_adapter *padapter) /* check if sta is ASIX peer and fix IOT issue if it is. */ if (_rtw_memcmp(get_my_bssid(&pmlmeinfo->network) , ASIX_ID , 3)) { - u8 iot_flag = _TRUE; + u8 iot_flag = true; rtw_hal_set_hwreg(padapter, HW_VAR_ASIX_IOT, (u8 *)(&iot_flag)); } @@ -10669,7 +10669,7 @@ void start_clnt_join(_adapter *padapter) struct wlan_network *scanned = NULL; u8 ie_offset = 0; unsigned long irqL; - bool has_p2p_ie = _FALSE; + bool has_p2p_ie = false; _enter_critical_bh(&(padapter->mlmepriv.scanned_queue.lock), &irqL); @@ -10677,19 +10677,19 @@ void start_clnt_join(_adapter *padapter) scanned = LIST_CONTAINOR(pos, struct wlan_network, list); - if (_rtw_memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(NDIS_802_11_SSID)) == _TRUE - && _rtw_memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(NDIS_802_11_MAC_ADDRESS)) == _TRUE + if (_rtw_memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(NDIS_802_11_SSID)) == true + && _rtw_memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(NDIS_802_11_MAC_ADDRESS)) == true ) { ie_offset = (scanned->network.Reserved[0] == 2 ? 0 : 12); if (rtw_get_p2p_ie(scanned->network.IEs + ie_offset, scanned->network.IELength - ie_offset, NULL, NULL)) - has_p2p_ie = _TRUE; + has_p2p_ie = true; break; } } _exit_critical_bh(&(padapter->mlmepriv.scanned_queue.lock), &irqL); - if (scanned == NULL || rtw_end_of_queue_search(head, pos) || has_p2p_ie == _FALSE) + if (scanned == NULL || rtw_end_of_queue_search(head, pos) || has_p2p_ie == false) #endif /* CONFIG_P2P */ /* To avoid connecting to AP fail during resume process, change retry count from 5 to 1 */ issue_deauth_ex(padapter, pnetwork->MacAddress, WLAN_REASON_DEAUTH_LEAVING, 1, 100); @@ -10804,7 +10804,7 @@ unsigned int receive_disconnect(_adapter *padapter, unsigned char *MacAddr, unsi if ((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE) { if (pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) { - if (report_del_sta_event(padapter, MacAddr, reason, _TRUE, locally_generated) != _FAIL) + if (report_del_sta_event(padapter, MacAddr, reason, true, locally_generated) != _FAIL) pmlmeinfo->state = WIFI_FW_NULL_STATE; } else if (pmlmeinfo->state & WIFI_FW_LINKING_STATE) { if (report_join_res(padapter, -2) != _FAIL) @@ -11382,7 +11382,7 @@ void report_add_sta_event(_adapter *padapter, unsigned char *MacAddr) bool rtw_port_switch_chk(_adapter *adapter) { - bool switch_needed = _FALSE; + bool switch_needed = false; #ifdef CONFIG_CONCURRENT_MODE #ifdef CONFIG_RUNTIME_PORT_SWITCH struct dvobj_priv *dvobj = adapter_to_dvobj(adapter); @@ -11424,10 +11424,10 @@ bool rtw_port_switch_chk(_adapter *adapter) #ifdef CONFIG_WOWLAN /* WOWLAN interface(primary, for now) should be port0 */ - if (pwrctl->wowlan_mode == _TRUE) { + if (pwrctl->wowlan_mode == true) { if (!is_primary_adapter(if_port0)) { RTW_INFO("%s "ADPT_FMT" enable WOWLAN\n", __func__, ADPT_ARG(if_port1)); - switch_needed = _TRUE; + switch_needed = true; } goto exit; } @@ -11436,7 +11436,7 @@ bool rtw_port_switch_chk(_adapter *adapter) /* AP should use port0 for ctl frame's ack */ if ((if_port1_mlmeinfo->state & 0x03) == WIFI_FW_AP_STATE) { RTW_INFO("%s "ADPT_FMT" is AP/GO\n", __func__, ADPT_ARG(if_port1)); - switch_needed = _TRUE; + switch_needed = true; goto exit; } @@ -11449,7 +11449,7 @@ bool rtw_port_switch_chk(_adapter *adapter) && !check_fwstate(&if_port1->mlmepriv, WIFI_UNDER_WPS) ) { RTW_INFO("%s "ADPT_FMT" is GC\n", __func__, ADPT_ARG(if_port1)); - switch_needed = _TRUE; + switch_needed = true; goto exit; } @@ -11459,7 +11459,7 @@ bool rtw_port_switch_chk(_adapter *adapter) && ((if_port0_mlmeinfo->state & 0x03) != WIFI_FW_AP_STATE) ) { RTW_INFO("%s "ADPT_FMT" is SINGLE_LINK\n", __func__, ADPT_ARG(if_port1)); - switch_needed = _TRUE; + switch_needed = true; goto exit; } @@ -11491,19 +11491,19 @@ void update_sta_info(_adapter *padapter, struct sta_info *psta) /* HT */ if (pmlmepriv->htpriv.ht_option) { - psta->htpriv.ht_option = _TRUE; + psta->htpriv.ht_option = true; psta->htpriv.ampdu_enable = pmlmepriv->htpriv.ampdu_enable; psta->htpriv.rx_ampdu_min_spacing = (pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & IEEE80211_HT_CAP_AMPDU_DENSITY) >> 2; if (support_short_GI(padapter, &(pmlmeinfo->HT_caps), CHANNEL_WIDTH_20)) - psta->htpriv.sgi_20m = _TRUE; + psta->htpriv.sgi_20m = true; if (support_short_GI(padapter, &(pmlmeinfo->HT_caps), CHANNEL_WIDTH_40)) - psta->htpriv.sgi_40m = _TRUE; + psta->htpriv.sgi_40m = true; - psta->qos_option = _TRUE; + psta->qos_option = true; psta->htpriv.ldpc_cap = pmlmepriv->htpriv.ldpc_cap; psta->htpriv.stbc_cap = pmlmepriv->htpriv.stbc_cap; @@ -11512,12 +11512,12 @@ void update_sta_info(_adapter *padapter, struct sta_info *psta) _rtw_memcpy(&psta->htpriv.ht_cap, &pmlmeinfo->HT_caps, sizeof(struct rtw_ieee80211_ht_cap)); } else { - psta->htpriv.ht_option = _FALSE; - psta->htpriv.ampdu_enable = _FALSE; - psta->htpriv.tx_amsdu_enable = _FALSE; - psta->htpriv.sgi_20m = _FALSE; - psta->htpriv.sgi_40m = _FALSE; - psta->qos_option = _FALSE; + psta->htpriv.ht_option = false; + psta->htpriv.ampdu_enable = false; + psta->htpriv.tx_amsdu_enable = false; + psta->htpriv.sgi_20m = false; + psta->htpriv.sgi_40m = false; + psta->qos_option = false; } @@ -11530,7 +11530,7 @@ void update_sta_info(_adapter *padapter, struct sta_info *psta) /* QoS */ if (pmlmepriv->qospriv.qos_option) - psta->qos_option = _TRUE; + psta->qos_option = true; update_ldpc_stbc_cap(psta); @@ -11559,7 +11559,7 @@ static void rtw_mlmeext_disconnect(_adapter *padapter) /* check if sta is ASIX peer and fix IOT issue if it is. */ if (_rtw_memcmp(get_my_bssid(&pmlmeinfo->network) , ASIX_ID , 3)) { - u8 iot_flag = _FALSE; + u8 iot_flag = false; rtw_hal_set_hwreg(padapter, HW_VAR_ASIX_IOT, (u8 *)(&iot_flag)); } pmlmeinfo->state = WIFI_FW_NULL_STATE; @@ -11570,7 +11570,7 @@ static void rtw_mlmeext_disconnect(_adapter *padapter) #endif /* CONFIG_MCC_MODE */ if (state_backup == WIFI_FW_STATION_STATE) { - if (rtw_port_switch_chk(padapter) == _TRUE) { + if (rtw_port_switch_chk(padapter) == true) { rtw_hal_set_hwreg(padapter, HW_VAR_PORT_SWITCH, NULL); #ifdef CONFIG_LPS { @@ -11611,16 +11611,16 @@ static void rtw_mlmeext_disconnect(_adapter *padapter) _cancel_timer_ex(&pmlmeext->link_timer); - /* pmlmepriv->LinkDetectInfo.TrafficBusyState = _FALSE; */ + /* pmlmepriv->LinkDetectInfo.TrafficBusyState = false; */ pmlmepriv->LinkDetectInfo.TrafficTransitionCount = 0; pmlmepriv->LinkDetectInfo.LowPowerTransitionCount = 0; #ifdef CONFIG_TDLS - padapter->tdlsinfo.ap_prohibited = _FALSE; + padapter->tdlsinfo.ap_prohibited = false; /* For TDLS channel switch, currently we only allow it to work in wifi logo test mode */ if (padapter->registrypriv.wifi_spec == 1) - padapter->tdlsinfo.ch_switch_prohibited = _FALSE; + padapter->tdlsinfo.ch_switch_prohibited = false; #endif /* CONFIG_TDLS */ } @@ -11657,7 +11657,7 @@ void mlmeext_joinbss_event_callback(_adapter *padapter, int join_res) /* turn on dynamic functions */ - /* Switch_DM_Func(padapter, DYNAMIC_ALL_FUNC_ENABLE, _TRUE); */ + /* Switch_DM_Func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true); */ /* update IOT-releated issue */ update_IOT_info(padapter); @@ -11701,7 +11701,7 @@ void mlmeext_joinbss_event_callback(_adapter *padapter, int join_res) rtw_sec_restore_wep_key(padapter); #endif /* CONFIG_IOCTL_CFG80211 */ - if (rtw_port_switch_chk(padapter) == _TRUE) + if (rtw_port_switch_chk(padapter) == true) rtw_hal_set_hwreg(padapter, HW_VAR_PORT_SWITCH, NULL); join_type = 2; @@ -11818,7 +11818,7 @@ void _linked_info_dump(_adapter *padapter) _enter_critical_bh(&pstapriv->asoc_list_lock, &irqL); phead = &pstapriv->asoc_list; 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, asoc_list); plist = get_next(plist); @@ -11832,7 +11832,7 @@ void _linked_info_dump(_adapter *padapter) /*============ tx info ============ */ rtw_hal_get_def_var(padapter, HW_DEF_RA_INFO_DUMP, RTW_DBGDUMP); - rtw_hal_set_odm_var(padapter, HAL_ODM_RX_INFO_DUMP, RTW_DBGDUMP, _FALSE); + rtw_hal_set_odm_var(padapter, HAL_ODM_RX_INFO_DUMP, RTW_DBGDUMP, false); } @@ -11863,13 +11863,13 @@ static void rtw_delba_check(_adapter *padapter, struct sta_info *psta, u8 from_t for (i = 0; i < TID_NUM ; i++) { if ((psta->recvreorder_ctrl[i].enable) && (sta_rx_data_qos_pkts(psta, i) == sta_last_rx_data_qos_pkts(psta, i)) ) { - if (_TRUE == rtw_inc_and_chk_continual_no_rx_packet(psta, i)) { + if (true == rtw_inc_and_chk_continual_no_rx_packet(psta, i)) { /* send a DELBA frame to the peer STA with the Reason Code field set to TIMEOUT */ if (!from_timer) ret = issue_del_ba_ex(padapter, psta->hwaddr, i, 39, 0, 3, 1); else issue_del_ba(padapter, psta->hwaddr, i, 39, 0); - psta->recvreorder_ctrl[i].enable = _FALSE; + psta->recvreorder_ctrl[i].enable = false; if (ret != _FAIL) psta->recvreorder_ctrl[i].ampdu_size = RX_AMPDU_SIZE_INVALID; rtw_reset_continual_no_rx_packet(psta, i); @@ -11884,7 +11884,7 @@ static void rtw_delba_check(_adapter *padapter, struct sta_info *psta, u8 from_t static u8 chk_ap_is_alive(_adapter *padapter, struct sta_info *psta) { - u8 ret = _FALSE; + u8 ret = false; int i = 0; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); @@ -11914,9 +11914,9 @@ static u8 chk_ap_is_alive(_adapter *padapter, struct sta_info *psta) && sta_rx_beacon_pkts(psta) == sta_last_rx_beacon_pkts(psta) && sta_rx_probersp_pkts(psta) == sta_last_rx_probersp_pkts(psta) ) - ret = _FALSE; + ret = false; else - ret = _TRUE; + ret = true; sta_update_last_rx_pkts(psta); @@ -11931,7 +11931,7 @@ static u8 chk_ap_is_alive(_adapter *padapter, struct sta_info *psta) static u8 chk_adhoc_peer_is_alive(struct sta_info *psta) { - u8 ret = _TRUE; + u8 ret = true; #ifdef DBG_EXPIRATION_CHK RTW_INFO("sta:"MAC_FMT", rssi:%d, rx:"STA_PKTS_FMT", beacon:%llu, probersp_to_self:%llu" @@ -11953,7 +11953,7 @@ static u8 chk_adhoc_peer_is_alive(struct sta_info *psta) if (sta_rx_data_pkts(psta) == sta_last_rx_data_pkts(psta) && sta_rx_beacon_pkts(psta) == sta_last_rx_beacon_pkts(psta) && sta_rx_probersp_pkts(psta) == sta_last_rx_probersp_pkts(psta)) - ret = _FALSE; + ret = false; sta_update_last_rx_pkts(psta); @@ -11965,9 +11965,9 @@ u8 chk_tdls_peer_sta_is_alive(_adapter *padapter, struct sta_info *psta) { if ((psta->sta_stats.rx_data_pkts == psta->sta_stats.last_rx_data_pkts) && (psta->sta_stats.rx_tdls_disc_rsp_pkts == psta->sta_stats.last_rx_tdls_disc_rsp_pkts)) - return _FALSE; + return false; - return _TRUE; + return true; } void linked_status_chk_tdls(_adapter *padapter) @@ -11985,7 +11985,7 @@ void linked_status_chk_tdls(_adapter *padapter) struct tdls_txmgmt txmgmt; struct candidate_pool checkalive[MAX_ALLOWED_TDLS_STA_NUM]; struct candidate_pool teardown[MAX_ALLOWED_TDLS_STA_NUM]; - u8 tdls_sta_max = _FALSE; + u8 tdls_sta_max = false; #define ALIVE_MIN 2 #define ALIVE_MAX 5 @@ -11994,20 +11994,20 @@ void linked_status_chk_tdls(_adapter *padapter) memset(checkalive, 0x00, sizeof(checkalive)); memset(teardown, 0x00, sizeof(teardown)); - if ((padapter->tdlsinfo.link_established == _TRUE)) { + if ((padapter->tdlsinfo.link_established == true)) { _enter_critical_bh(&pstapriv->sta_hash_lock, &irqL); for (i = 0; i < NUM_STA; i++) { 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); plist = get_next(plist); if (psta->tdls_sta_state & TDLS_LINKED_STATE) { psta->alive_count++; if (psta->alive_count >= ALIVE_MIN) { - if (chk_tdls_peer_sta_is_alive(padapter, psta) == _FALSE) { + if (chk_tdls_peer_sta_is_alive(padapter, psta) == false) { if (psta->alive_count < ALIVE_MAX) { _rtw_memcpy(checkalive[num_checkalive].addr, psta->hwaddr, ETH_ALEN); checkalive[num_checkalive].psta = psta; @@ -12024,13 +12024,13 @@ void linked_status_chk_tdls(_adapter *padapter) psta->sta_stats.last_rx_tdls_disc_rsp_pkts = psta->sta_stats.rx_tdls_disc_rsp_pkts; if ((num_checkalive >= MAX_ALLOWED_TDLS_STA_NUM) || (num_teardown >= MAX_ALLOWED_TDLS_STA_NUM)) { - tdls_sta_max = _TRUE; + tdls_sta_max = true; break; } } } - if (tdls_sta_max == _TRUE) + if (tdls_sta_max == true) break; } _exit_critical_bh(&pstapriv->sta_hash_lock, &irqL); @@ -12049,7 +12049,7 @@ void linked_status_chk_tdls(_adapter *padapter) RTW_INFO("[%s %d] Send teardown to "MAC_FMT"\n", __func__, __LINE__, MAC_ARG(teardown[i].addr)); txmgmt.status_code = _RSON_TDLS_TEAR_TOOFAR_; _rtw_memcpy(txmgmt.peer, teardown[i].addr, ETH_ALEN); - issue_tdls_teardown(padapter, &txmgmt, _FALSE); + issue_tdls_teardown(padapter, &txmgmt, false); } } } @@ -12073,7 +12073,7 @@ void linked_status_chk(_adapter *padapter, u8 from_timer) struct recv_priv *precvpriv = &padapter->recvpriv; #endif - if (padapter->registrypriv.mp_mode == _TRUE) + if (padapter->registrypriv.mp_mode == true) return; if (is_client_associated_to_ap(padapter)) { @@ -12087,10 +12087,10 @@ void linked_status_chk(_adapter *padapter, u8 from_timer) if (rtw_chk_roam_flags(padapter, RTW_ROAM_ACTIVE)) { RTW_INFO("signal_strength_data.avg_val = %d\n", precvpriv->signal_strength_data.avg_val); if (precvpriv->signal_strength_data.avg_val < pmlmepriv->roam_rssi_threshold) { - pmlmepriv->need_to_roam = _TRUE; + pmlmepriv->need_to_roam = true; rtw_drv_scan_by_self(padapter, RTW_AUTO_SCAN_REASON_ROAM); } else { - pmlmepriv->need_to_roam = _FALSE; + pmlmepriv->need_to_roam = false; } } #endif @@ -12100,7 +12100,7 @@ void linked_status_chk(_adapter *padapter, u8 from_timer) * we may check chk_ap_is_alive fail, and may issue_probereq to wrong channel under sitesurvey * don't keep alive check under MCC */ - if (rtw_hal_mcc_link_status_chk(padapter, __func__) == _FALSE) + if (rtw_hal_mcc_link_status_chk(padapter, __func__) == false) return; #endif @@ -12140,7 +12140,7 @@ void linked_status_chk(_adapter *padapter, u8 from_timer) #ifdef CONFIG_TDLS #ifdef CONFIG_TDLS_CH_SW - if (ATOMIC_READ(&padapter->tdlsinfo.chsw_info.chsw_on) == _TRUE) + if (ATOMIC_READ(&padapter->tdlsinfo.chsw_info.chsw_on) == true) return; #endif /* CONFIG_TDLS_CH_SW */ @@ -12151,7 +12151,7 @@ void linked_status_chk(_adapter *padapter, u8 from_timer) psta = rtw_get_stainfo(pstapriv, pmlmeinfo->network.MacAddress); if (psta != NULL) { - bool is_p2p_enable = _FALSE; + bool is_p2p_enable = false; #ifdef CONFIG_P2P is_p2p_enable = !rtw_p2p_chk_state(&padapter->wdinfo, P2P_STATE_NONE); #endif @@ -12160,7 +12160,7 @@ void linked_status_chk(_adapter *padapter, u8 from_timer) /*issue delba when ap does not tx data packet that is Broadcom ap */ rtw_delba_check(padapter, psta, from_timer); #endif - if (chk_ap_is_alive(padapter, psta) == _FALSE) + if (chk_ap_is_alive(padapter, psta) == false) rx_chk = _FAIL; if (pxmitpriv->last_tx_pkts == pxmitpriv->tx_pkts) @@ -12238,7 +12238,7 @@ bypass_active_keep_alive: RTW_PRINT(FUNC_ADPT_FMT" disconnect or roaming\n", FUNC_ADPT_ARG(padapter)); receive_disconnect(padapter, pmlmeinfo->network.MacAddress - , WLAN_REASON_EXPIRATION_CHK, _FALSE); + , WLAN_REASON_EXPIRATION_CHK, false); return; } } else @@ -12265,7 +12265,7 @@ bypass_active_keep_alive: 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); plist = get_next(plist); @@ -12287,13 +12287,13 @@ bypass_active_keep_alive: _exit_critical_bh(&pstapriv->sta_hash_lock, &irqL); plist = get_next(&dlist); - while (rtw_end_of_queue_search(&dlist, plist) == _FALSE) { + while (rtw_end_of_queue_search(&dlist, plist) == false) { psta = LIST_CONTAINOR(plist, struct sta_info, list); plist = get_next(plist); rtw_list_delete(&psta->list); RTW_INFO(FUNC_ADPT_FMT" ibss expire "MAC_FMT"\n" , FUNC_ADPT_ARG(padapter), MAC_ARG(psta->hwaddr)); - report_del_sta_event(padapter, psta->hwaddr, WLAN_REASON_EXPIRATION_CHK, from_timer ? _TRUE : _FALSE, _FALSE); + report_del_sta_event(padapter, psta->hwaddr, WLAN_REASON_EXPIRATION_CHK, from_timer ? true : false, false); } } @@ -12410,7 +12410,7 @@ void addba_timer_hdl(struct sta_info *psta) phtpriv = &psta->htpriv; - if ((phtpriv->ht_option == _TRUE) && (phtpriv->ampdu_enable == _TRUE)) { + if ((phtpriv->ht_option == true) && (phtpriv->ampdu_enable == true)) { if (phtpriv->candidate_tid_bitmap) phtpriv->candidate_tid_bitmap = 0x0; @@ -12478,8 +12478,8 @@ void report_sta_timeout_event(_adapter *padapter, u8 *MacAddr, unsigned short re void clnt_sa_query_timeout(_adapter *padapter) { - rtw_disassoc_cmd(padapter, 0, _TRUE); - rtw_indicate_disconnect(padapter, 0, _FALSE); + rtw_disassoc_cmd(padapter, 0, true); + rtw_indicate_disconnect(padapter, 0, false); rtw_free_assoc_resources(padapter, 1); RTW_INFO("SA query timeout client disconnect\n"); @@ -12492,10 +12492,10 @@ void sa_query_timer_hdl(struct sta_info *psta) struct sta_priv *pstapriv = &padapter->stapriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE && - check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) + if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true && + check_fwstate(pmlmepriv, _FW_LINKED) == true) clnt_sa_query_timeout(padapter); - else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) + else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) report_sta_timeout_event(padapter, psta->hwaddr, WLAN_REASON_PREV_AUTH_NOT_VALID); } @@ -12540,7 +12540,7 @@ void ft_roam_timer_hdl(_adapter *padapter) struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); receive_disconnect(padapter, pmlmepriv->cur_network.network.MacAddress - , WLAN_REASON_ACTIVE_ROAM, _FALSE); + , WLAN_REASON_ACTIVE_ROAM, false); } void issue_action_ft_request(_adapter *padapter, u8 *pTargetAddr) @@ -12556,7 +12556,7 @@ void issue_action_ft_request(_adapter *padapter, u8 *pTargetAddr) u8 *pframe = NULL; u8 category = RTW_WLAN_CATEGORY_FT; u8 action = RTW_WLAN_ACTION_FT_REQUEST; - u8 is_ft_roaming_with_rsn_ie = _TRUE; + u8 is_ft_roaming_with_rsn_ie = true; u8 *pie = NULL; __le16 *fctrl; u32 ft_ie_len = 0; @@ -12602,7 +12602,7 @@ void issue_action_ft_request(_adapter *padapter, u8 *pTargetAddr) if (pie) pframe = rtw_set_ie(pframe, EID_WPA2, ft_ie_len, pie+2, &(pattrib->pktlen)); else - is_ft_roaming_with_rsn_ie = _FALSE; + is_ft_roaming_with_rsn_ie = false; pie = rtw_get_ie(pftpriv->updated_ft_ies, _MDIE_, &ft_ie_len, pftpriv->updated_ft_ies_len); if (pie) @@ -12712,7 +12712,7 @@ void rtw_start_auto_ap(_adapter *adapter) rtw_set_802_11_infrastructure_mode(adapter, Ndis802_11APMode); - rtw_setopmode_cmd(adapter, Ndis802_11APMode, _TRUE); + rtw_setopmode_cmd(adapter, Ndis802_11APMode, true); } static int rtw_auto_ap_start_beacon(_adapter *adapter) @@ -12729,7 +12729,7 @@ static int rtw_auto_ap_start_beacon(_adapter *adapter) struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE) + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true) return -EINVAL; @@ -12835,7 +12835,7 @@ u8 setopmode_hdl(_adapter *padapter, u8 *pbuf) rtw_auto_ap_start_beacon(padapter); #endif - if (rtw_port_switch_chk(padapter) == _TRUE) { + if (rtw_port_switch_chk(padapter) == true) { rtw_hal_set_hwreg(padapter, HW_VAR_PORT_SWITCH, NULL); if (psetop->mode == Ndis802_11APMode) @@ -12896,7 +12896,7 @@ u8 createbss_hdl(_adapter *padapter, u8 *pbuf) /* config the initial gain under linking, need to write the BB registers */ /* initialgain = 0x1E; */ - /*rtw_hal_set_odm_var(padapter, HAL_ODM_INITIAL_GAIN, &initialgain, _FALSE);*/ + /*rtw_hal_set_odm_var(padapter, HAL_ODM_INITIAL_GAIN, &initialgain, false);*/ /* disable dynamic functions, such as high power, DIG */ rtw_phydm_ability_backup(padapter); @@ -12946,7 +12946,7 @@ u8 join_cmd_hdl(_adapter *padapter, u8 *pbuf) /* u8 initialgain; */ /* u32 acparm; */ u8 u_ch, u_bw, u_offset; - u8 doiqk = _FALSE; + u8 doiqk = false; /* check already connecting to AP or not */ if (pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) { @@ -12968,7 +12968,7 @@ u8 join_cmd_hdl(_adapter *padapter, u8 *pbuf) } #ifdef CONFIG_ANTENNA_DIVERSITY - rtw_antenna_select_cmd(padapter, pparm->network.PhyInfo.Optimum_antenna, _FALSE); + rtw_antenna_select_cmd(padapter, pparm->network.PhyInfo.Optimum_antenna, false); #endif #ifdef CONFIG_WAPI_SUPPORT @@ -12984,7 +12984,7 @@ u8 join_cmd_hdl(_adapter *padapter, u8 *pbuf) pmlmeinfo->HT_info_enable = 0; pmlmeinfo->agg_enable_bitmap = 0; pmlmeinfo->candidate_tid_bitmap = 0; - pmlmeinfo->bwmode_updated = _FALSE; + pmlmeinfo->bwmode_updated = false; /* pmlmeinfo->assoc_AP_vendor = HT_IOT_PEER_MAX; */ pmlmeinfo->VHT_enable = 0; @@ -13042,13 +13042,13 @@ u8 join_cmd_hdl(_adapter *padapter, u8 *pbuf) rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, pmlmeinfo->network.MacAddress); join_type = 0; rtw_hal_set_hwreg(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); - doiqk = _TRUE; + doiqk = true; rtw_hal_set_hwreg(padapter , HW_VAR_DO_IQK , &doiqk); set_channel_bwmode(padapter, u_ch, u_offset, u_bw); rtw_mi_update_union_chan_inf(padapter, u_ch, u_offset, u_bw); - doiqk = _FALSE; + doiqk = false; rtw_hal_set_hwreg(padapter , HW_VAR_DO_IQK , &doiqk); /* cancel link timer */ @@ -13069,7 +13069,7 @@ u8 disconnect_hdl(_adapter *padapter, unsigned char *pbuf) if (is_client_associated_to_ap(padapter)) { #ifdef CONFIG_DFS - if (padapter->mlmepriv.handle_dfs == _FALSE) + if (padapter->mlmepriv.handle_dfs == false) #endif /* CONFIG_DFS */ #ifdef CONFIG_PLATFORM_ROCKCHIPS /* To avoid connecting to AP fail during resume process, change retry count from 5 to 1 */ @@ -13080,8 +13080,8 @@ u8 disconnect_hdl(_adapter *padapter, unsigned char *pbuf) } #ifdef CONFIG_DFS - if (padapter->mlmepriv.handle_dfs == _TRUE) - padapter->mlmepriv.handle_dfs = _FALSE; + if (padapter->mlmepriv.handle_dfs == true) + padapter->mlmepriv.handle_dfs = false; #endif /* CONFIG_DFS */ if (((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE)) { @@ -13128,9 +13128,9 @@ static bool scan_abort_hdl(_adapter *adapter) #ifdef CONFIG_P2P struct wifidirect_info *pwdinfo = &adapter->wdinfo; #endif - bool ret = _FALSE; + bool ret = false; - if (pmlmeext->scan_abort == _TRUE) { + if (pmlmeext->scan_abort == true) { #ifdef CONFIG_P2P if (!rtw_p2p_chk_state(&adapter->wdinfo, P2P_STATE_NONE)) { rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_MAX); @@ -13147,8 +13147,8 @@ static bool scan_abort_hdl(_adapter *adapter) , ss->channel_idx ); } - pmlmeext->scan_abort = _FALSE; - ret = _TRUE; + pmlmeext->scan_abort = false; + ret = true; } return ret; @@ -13177,9 +13177,9 @@ static u8 rtw_scan_sparse(_adapter *adapter, struct rtw_ieee80211_channel *ch, u static u8 token = 255; u32 interval; - bool busy_traffic = _FALSE; - bool miracast_enabled = _FALSE; - bool bg_scan = _FALSE; + bool busy_traffic = false; + bool miracast_enabled = false; + bool bg_scan = false; u8 max_allow_ch = SCAN_SPARSE_CH_NUM_INVALID; u8 scan_division_num; u8 ret_num = ch_num; @@ -13199,30 +13199,30 @@ static u8 rtw_scan_sparse(_adapter *adapter, struct rtw_ieee80211_channel *ch, u interval = rtw_get_passing_time_ms(mlmeext->last_scan_time); - if (rtw_mi_busy_traffic_check(adapter, _FALSE)) - busy_traffic = _TRUE; + if (rtw_mi_busy_traffic_check(adapter, false)) + busy_traffic = true; if (rtw_mi_check_miracast_enabled(adapter)) - miracast_enabled = _TRUE; + miracast_enabled = true; if (interval > RTW_SCAN_SPARSE_BG_INTERVAL_MS) - bg_scan = _TRUE; + bg_scan = true; /* max_allow_ch by conditions*/ #if RTW_SCAN_SPARSE_MIRACAST - if (miracast_enabled == _TRUE && busy_traffic == _TRUE) + if (miracast_enabled == true && busy_traffic == true) max_allow_ch = rtw_min(max_allow_ch, RTW_SCAN_SPARSE_CH_NUM_MIRACAST); #endif #if RTW_SCAN_SPARSE_BG - if (bg_scan == _TRUE) + if (bg_scan == true) max_allow_ch = rtw_min(max_allow_ch, RTW_SCAN_SPARSE_CH_NUM_BG); #endif #if defined(CONFIG_LAYER2_ROAMING) && defined(RTW_SCAN_SPARSE_ROAMING_ACTIVE) if (rtw_chk_roam_flags(adapter, RTW_ROAM_ACTIVE)) { - if (busy_traffic == _TRUE && adapter->mlmepriv.need_to_roam == _TRUE) + if (busy_traffic == true && adapter->mlmepriv.need_to_roam == true) max_allow_ch = rtw_min(max_allow_ch, RTW_SCAN_SPARSE_CH_NUM_ROAMING_ACTIVE); } #endif @@ -13278,7 +13278,7 @@ static int rtw_scan_ch_decision(_adapter *padapter, struct rtw_ieee80211_channel if (!in[i].hw_value || (in[i].flags & RTW_IEEE80211_CHAN_DISABLED)) continue; - if (rtw_mlme_band_check(padapter, in[i].hw_value) == _FALSE) + if (rtw_mlme_band_check(padapter, in[i].hw_value) == false) continue; set_idx = rtw_ch_set_search_ch(pmlmeext->channel_set, in[i].hw_value); @@ -13304,8 +13304,8 @@ static int rtw_scan_ch_decision(_adapter *padapter, struct rtw_ieee80211_channel if (j == 0) { for (i = 0; i < pmlmeext->max_chan_nums; i++) { chan = pmlmeext->channel_set[i].ChannelNum; - if (rtw_mlme_band_check(padapter, chan) == _TRUE) { - if (rtw_mlme_ignore_chan(padapter, chan) == _TRUE) + if (rtw_mlme_band_check(padapter, chan) == true) { + if (rtw_mlme_ignore_chan(padapter, chan) == true) continue; if (0) @@ -13457,11 +13457,11 @@ static u8 sitesurvey_pick_ch_behavior(_adapter *padapter, u8 *ch, RT_SCAN_TYPE * /* for SCAN_SW_ANTDIV_BL state testing */ struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); int i; - bool is_linked = _FALSE; + bool is_linked = false; for (i = 0; i < dvobj->iface_nums; i++) { if (rtw_linked_check(dvobj->padapters[i])) - is_linked = _TRUE; + is_linked = true; } if (!is_linked) { @@ -13512,7 +13512,7 @@ void site_survey(_adapter *padapter, u8 survey_channel, RT_SCAN_TYPE ScanType) if (ACS_ENABLE == GET_ACS_STATE(padapter)) { ACS_OP acs_op = ACS_RESET; - rtw_hal_set_odm_var(padapter, HAL_ODM_AUTO_CHNL_SEL, &acs_op, _TRUE); + rtw_hal_set_odm_var(padapter, HAL_ODM_AUTO_CHNL_SEL, &acs_op, true); rtw_set_acs_channel(padapter, survey_channel); #ifdef DBG_AUTO_CHNL_SEL_NHM RTW_INFO("[ACS-"ADPT_FMT"]-set ch:%u\n", @@ -13658,7 +13658,7 @@ static void sitesurvey_set_igi(_adapter *adapter) case SCAN_ENTER: #ifdef CONFIG_P2P #ifdef CONFIG_IOCTL_CFG80211 - if (adapter_wdev_data(adapter)->p2p_enabled == _TRUE && pwdinfo->driver_interface == DRIVER_CFG80211) + if (adapter_wdev_data(adapter)->p2p_enabled == true && pwdinfo->driver_interface == DRIVER_CFG80211) igi = 0x30; else #endif /* CONFIG_IOCTL_CFG80211 */ @@ -13673,13 +13673,13 @@ static void sitesurvey_set_igi(_adapter *adapter) rtw_hal_get_odm_var(adapter, HAL_ODM_INITIAL_GAIN, &ss->igi_before_scan, NULL); /* disable DIG and set IGI for scan */ - rtw_hal_set_odm_var(adapter, HAL_ODM_INITIAL_GAIN, &igi, _FALSE); + rtw_hal_set_odm_var(adapter, HAL_ODM_INITIAL_GAIN, &igi, false); break; case SCAN_COMPLETE: case SCAN_TO_P2P_LISTEN: /* enable DIG and restore IGI */ igi = 0xff; - rtw_hal_set_odm_var(adapter, HAL_ODM_INITIAL_GAIN, &igi, _FALSE); + rtw_hal_set_odm_var(adapter, HAL_ODM_INITIAL_GAIN, &igi, false); break; #ifdef CONFIG_SCAN_BACKOP case SCAN_BACKING_OP: @@ -13800,7 +13800,7 @@ operation_by_state: /* config dynamic functions for off channel */ rtw_phydm_func_for_offchannel(padapter); /* set MSR to no link state */ - sitesurvey_set_msr(padapter, _TRUE); + sitesurvey_set_msr(padapter, true); val8 = 1; /* under site survey */ rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); @@ -13818,7 +13818,7 @@ operation_by_state: if ((ACS_ENABLE == GET_ACS_STATE(padapter)) && (0 != rtw_get_acs_channel(padapter))) { ACS_OP acs_op = ACS_SELECT; - rtw_hal_set_odm_var(padapter, HAL_ODM_AUTO_CHNL_SEL, &acs_op, _TRUE); + rtw_hal_set_odm_var(padapter, HAL_ODM_AUTO_CHNL_SEL, &acs_op, true); } #endif @@ -13869,7 +13869,7 @@ operation_by_state: site_survey(padapter, scan_ch, scan_type); #if defined(CONFIG_ATMEL_RC_PATCH) - if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) + if (check_fwstate(pmlmepriv, _FW_LINKED) == true) scan_ms = 20; else scan_ms = 40; @@ -13886,11 +13886,11 @@ operation_by_state: { struct noise_info info; - info.bPauseDIG = _FALSE; + info.bPauseDIG = false; info.IGIValue = 0; info.max_time = scan_ms / 2; info.chan = scan_ch; - rtw_hal_set_odm_var(padapter, HAL_ODM_NOISE_MONITOR, &info, _FALSE); + rtw_hal_set_odm_var(padapter, HAL_ODM_NOISE_MONITOR, &info, false); } #endif @@ -13901,7 +13901,7 @@ operation_by_state: #ifdef CONFIG_SCAN_BACKOP case SCAN_BACKING_OP: { u8 back_ch, back_bw, back_ch_offset; - u8 need_ch_setting_union = _TRUE; + u8 need_ch_setting_union = true; #ifdef CONFIG_MCC_MODE need_ch_setting_union = rtw_hal_mcc_change_scan_flag(padapter, @@ -13923,7 +13923,7 @@ operation_by_state: set_channel_bwmode(padapter, back_ch, back_ch_offset, back_bw); - sitesurvey_set_msr(padapter, _FALSE); + sitesurvey_set_msr(padapter, false); val8 = 0; /* survey done */ rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); @@ -13982,7 +13982,7 @@ operation_by_state: if (mlmeext_chk_scan_backop_flags(pmlmeext, SS_BACKOP_PS_ANNC)) sitesurvey_set_igi(padapter); - sitesurvey_set_msr(padapter, _TRUE); + sitesurvey_set_msr(padapter, true); val8 = 1; /* under site survey */ rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); @@ -14052,7 +14052,7 @@ operation_by_state: /* switch channel */ survey_done_set_ch_bw(padapter); - sitesurvey_set_msr(padapter, _FALSE); + sitesurvey_set_msr(padapter, false); val8 = 0; /* survey done */ rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); @@ -14118,7 +14118,7 @@ u8 setkey_hdl(_adapter *padapter, u8 *pbuf) struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); unsigned char null_addr[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; u8 *addr; - bool used = _FALSE; + bool used = false; /* main tx key for wep. */ if (pparm->set_tx) @@ -14149,7 +14149,7 @@ u8 setkey_hdl(_adapter *padapter, u8 *pbuf) } /* cam entry searched is pairwise key */ - if (used == _TRUE && rtw_camid_is_gk(padapter, cam_id) == _FALSE) { + if (used == true && rtw_camid_is_gk(padapter, cam_id) == false) { s16 camid_clr; RTW_PRINT(FUNC_ADPT_FMT" group key with "MAC_FMT" id:%u the same key id as pairwise key\n" @@ -14204,7 +14204,7 @@ u8 setkey_hdl(_adapter *padapter, u8 *pbuf) #ifndef CONFIG_CONCURRENT_MODE if (cam_id >= 0 && cam_id <= 3) - rtw_hal_set_hwreg(padapter, HW_VAR_SEC_DK_CFG, (u8 *)_TRUE); + rtw_hal_set_hwreg(padapter, HW_VAR_SEC_DK_CFG, (u8 *)true); #endif /* 8814au should set both broadcast and unicast CAM entry for WEP key in STA mode */ @@ -14281,7 +14281,7 @@ u8 set_stakey_hdl(_adapter *padapter, u8 *pbuf) goto exit; /* cam entry searched is group key */ - if (used == _TRUE && rtw_camid_is_gk(padapter, cam_id) == _TRUE) { + if (used == true && rtw_camid_is_gk(padapter, cam_id) == true) { s16 camid_clr; RTW_PRINT(FUNC_ADPT_FMT" pairwise key with "MAC_FMT" id:%u the same key id as group key\n" @@ -14340,8 +14340,8 @@ u8 add_ba_hdl(_adapter *padapter, unsigned char *pbuf) } #ifdef CONFIG_TDLS else if ((psta->tdls_sta_state & TDLS_LINKED_STATE) && - (psta->htpriv.ht_option == _TRUE) && - (psta->htpriv.ampdu_enable == _TRUE)) { + (psta->htpriv.ht_option == true) && + (psta->htpriv.ampdu_enable == true)) { issue_addba_req(padapter, pparm->addr, (u8)pparm->tid); _set_timer(&psta->addba_retry_timer, ADDBA_TO); } @@ -14355,7 +14355,7 @@ u8 add_ba_hdl(_adapter *padapter, unsigned char *pbuf) u8 add_ba_rsp_hdl(_adapter *padapter, unsigned char *pbuf) { struct addBaRsp_parm *pparm = (struct addBaRsp_parm *)pbuf; - u8 ret = _TRUE, i = 0, try_cnt = 3, wait_ms = 50; + u8 ret = true, i = 0, try_cnt = 3, wait_ms = 50; struct recv_reorder_ctrl *preorder_ctrl; struct sta_priv *pstapriv = &padapter->stapriv; struct sta_info *psta; @@ -14385,10 +14385,10 @@ u8 add_ba_rsp_hdl(_adapter *padapter, unsigned char *pbuf) * status = 37 means reject this addba req */ if (pparm->status == 0) { - preorder_ctrl->enable = _TRUE; + preorder_ctrl->enable = true; preorder_ctrl->ampdu_size = pparm->size; } else if (pparm->status == 37) - preorder_ctrl->enable = _FALSE; + preorder_ctrl->enable = false; exit: return H2C_SUCCESS; @@ -14554,7 +14554,7 @@ u8 chk_bmc_sleepq_hdl(_adapter *padapter, unsigned char *pbuf) 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); xmitframe_plist = get_next(xmitframe_plist); @@ -14569,7 +14569,7 @@ u8 chk_bmc_sleepq_hdl(_adapter *padapter, unsigned char *pbuf) pxmitframe->attrib.triggered = 1; - if (xmitframe_hiq_filter(pxmitframe) == _TRUE) + if (xmitframe_hiq_filter(pxmitframe) == true) pxmitframe->attrib.qsel = QSLT_HIGH;/* HIQ */ rtw_hal_xmitframe_enqueue(padapter, pxmitframe); @@ -14698,7 +14698,7 @@ void rtw_join_done_chk_ch(_adapter *adapter, int join_res) bool is_grouped = rtw_is_chbw_grouped(u_ch, u_bw, u_offset , mlmeext->cur_channel, mlmeext->cur_bwmode, mlmeext->cur_ch_offset); - if (is_grouped == _FALSE) { + if (is_grouped == false) { /* handle AP which need to switch ch setting */ /* restore original bw, adjust bw by registry setting on target ch */ @@ -14718,7 +14718,7 @@ void rtw_join_done_chk_ch(_adapter *adapter, int join_res) rtw_start_bss_hdl_after_chbw_decided(iface); } - update_beacon(iface, 0, NULL, _TRUE); + update_beacon(iface, 0, NULL, true); } clr_fwstate(mlme, WIFI_OP_CH_SWITCHING); @@ -14738,7 +14738,7 @@ void rtw_join_done_chk_ch(_adapter *adapter, int join_res) if (check_fwstate(mlme, WIFI_AP_STATE) && check_fwstate(mlme, WIFI_ASOC_STATE)) - update_beacon(iface, 0, NULL, _TRUE); + update_beacon(iface, 0, NULL, true); clr_fwstate(mlme, WIFI_OP_CH_SWITCHING); } @@ -14760,8 +14760,8 @@ void rtw_join_done_chk_ch(_adapter *adapter, int join_res) int rtw_chk_start_clnt_join(_adapter *adapter, u8 *ch, u8 *bw, u8 *offset) { - bool chbw_allow = _TRUE; - bool connect_allow = _TRUE; + bool chbw_allow = true; + bool connect_allow = true; struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv; u8 cur_ch, cur_bw, cur_ch_offset; u8 u_ch, u_offset, u_bw; @@ -14771,13 +14771,13 @@ int rtw_chk_start_clnt_join(_adapter *adapter, u8 *ch, u8 *bw, u8 *offset) u_offset = cur_ch_offset = pmlmeext->cur_ch_offset; if (!ch || !bw || !offset) { - connect_allow = _FALSE; + connect_allow = false; rtw_warn_on(1); goto exit; } if (cur_ch == 0) { - connect_allow = _FALSE; + connect_allow = false; RTW_ERR(FUNC_ADPT_FMT" cur_ch:%u\n" , FUNC_ADPT_ARG(adapter), cur_ch); rtw_warn_on(1); @@ -14825,7 +14825,7 @@ int rtw_chk_start_clnt_join(_adapter *adapter, u8 *ch, u8 *bw, u8 *offset) goto exit; #endif - if (chbw_allow == _TRUE) { + if (chbw_allow == true) { rtw_sync_chbw(&cur_ch, &cur_bw, &cur_ch_offset, &u_ch, &u_bw, &u_offset); rtw_warn_on(cur_ch != pmlmeext->cur_channel); rtw_warn_on(cur_bw != pmlmeext->cur_bwmode); @@ -14834,7 +14834,7 @@ int rtw_chk_start_clnt_join(_adapter *adapter, u8 *ch, u8 *bw, u8 *offset) } #ifdef CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT - /* chbw_allow is _FALSE, connect allow? */ + /* chbw_allow is false, connect allow? */ for (i = 0; i < dvobj->iface_nums; i++) { iface = dvobj->padapters[i]; mlme = &iface->mlmepriv; @@ -14846,29 +14846,29 @@ int rtw_chk_start_clnt_join(_adapter *adapter, u8 *ch, u8 *bw, u8 *offset) && rtw_p2p_chk_state(&(iface->wdinfo), P2P_STATE_NONE) #endif ) { - connect_allow = _FALSE; + connect_allow = false; break; } } #endif /* CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT */ if (MSTATE_STA_LD_NUM(&mstate) + MSTATE_AP_LD_NUM(&mstate) >= 2) - connect_allow = _FALSE; + connect_allow = false; RTW_INFO(FUNC_ADPT_FMT" connect_allow:%d\n" , FUNC_ADPT_ARG(adapter), connect_allow); - if (connect_allow == _FALSE) + if (connect_allow == false) goto exit; connect_allow_hdl: - /* connect_allow == _TRUE */ + /* connect_allow == true */ #ifdef CONFIG_DFS_MASTER rtw_dfs_master_status_apply(adapter, MLME_STA_CONNECTING); #endif - if (chbw_allow == _FALSE) { + if (chbw_allow == false) { u_ch = cur_ch; u_bw = cur_bw; u_offset = cur_ch_offset; @@ -14889,15 +14889,15 @@ connect_allow_hdl: rtw_ap_inform_ch_switch(iface, pmlmeext->cur_channel , pmlmeext->cur_ch_offset); else #endif - rtw_sta_flush(iface, _FALSE); + rtw_sta_flush(iface, false); rtw_hal_set_hwreg(iface, HW_VAR_CHECK_TXBUF, 0); set_fwstate(mlme, WIFI_OP_CH_SWITCHING); } else if (check_fwstate(mlme, WIFI_STATION_STATE) && check_fwstate(mlme, WIFI_ASOC_STATE) ) { - rtw_disassoc_cmd(iface, 500, _FALSE); - rtw_indicate_disconnect(iface, 0, _FALSE); + rtw_disassoc_cmd(iface, 500, false); + rtw_indicate_disconnect(iface, 0, false); rtw_free_assoc_resources(iface, 1); } } @@ -14907,14 +14907,14 @@ connect_allow_hdl: exit: - if (connect_allow == _TRUE) { + if (connect_allow == true) { RTW_INFO(FUNC_ADPT_FMT" union: %u,%u,%u\n", FUNC_ADPT_ARG(adapter), u_ch, u_bw, u_offset); *ch = u_ch; *bw = u_bw; *offset = u_offset; } - return connect_allow == _TRUE ? _SUCCESS : _FAIL; + return connect_allow == true ? _SUCCESS : _FAIL; } @@ -14962,7 +14962,7 @@ u8 set_chplan_hdl(_adapter *padapter, unsigned char *pbuf) pmlmeext->max_chan_nums = init_channel_set(padapter, setChannelPlan_param->channel_plan, pmlmeext->channel_set); init_channel_list(padapter, pmlmeext->channel_set, pmlmeext->max_chan_nums, &pmlmeext->channel_list); - rtw_hal_set_odm_var(padapter, HAL_ODM_REGULATION, NULL, _TRUE); + rtw_hal_set_odm_var(padapter, HAL_ODM_REGULATION, NULL, true); #ifdef CONFIG_IOCTL_CFG80211 rtw_reg_notify_by_driver(padapter); @@ -15009,10 +15009,10 @@ u8 set_csa_hdl(_adapter *padapter, unsigned char *pbuf) rtw_hal_set_hwreg(padapter, HW_VAR_TXPAUSE, &gval8); - rtw_disassoc_cmd(padapter, 0, _FALSE); - rtw_indicate_disconnect(padapter, 0, _FALSE); + rtw_disassoc_cmd(padapter, 0, false); + rtw_indicate_disconnect(padapter, 0, false); rtw_free_assoc_resources(padapter, 1); - rtw_free_network_queue(padapter, _TRUE); + rtw_free_network_queue(padapter, true); if (((new_ch_no >= 52) && (new_ch_no <= 64)) || ((new_ch_no >= 100) && (new_ch_no <= 140))) RTW_INFO("Switched to DFS band (ch %02x) again!!\n", new_ch_no); @@ -15099,7 +15099,7 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf) set_sta_rate(padapter, ptdls_sta); rtw_sta_media_status_rpt(padapter, ptdls_sta, 1); /* Sta mode */ - rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, ptdls_sta, _TRUE); + rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, ptdls_sta, true); break; } case TDLS_ISSUE_PTI: @@ -15116,7 +15116,7 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf) issue_nulldata(padapter, NULL, 1, 3, 3); RTW_INFO("[TDLS ] issue tdls channel switch response\n"); - ret = issue_tdls_ch_switch_rsp(padapter, &txmgmt, _TRUE); + ret = issue_tdls_ch_switch_rsp(padapter, &txmgmt, true); /* If we receive TDLS_CH_SW_REQ at off channel which it's target is AP's channel */ /* then we just switch to AP's channel*/ @@ -15135,10 +15135,10 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf) pchsw_info->ch_sw_state |= TDLS_CH_SWITCH_PREPARE_STATE; /* to collect IQK info of off-chnl */ - doiqk = _TRUE; + doiqk = true; rtw_hal_set_hwreg(padapter, HW_VAR_DO_IQK, &doiqk); set_channel_bwmode(padapter, pchsw_info->off_ch_num, pchsw_info->ch_offset, (pchsw_info->ch_offset) ? CHANNEL_WIDTH_40 : CHANNEL_WIDTH_20); - doiqk = _FALSE; + doiqk = false; rtw_hal_set_hwreg(padapter, HW_VAR_DO_IQK, &doiqk); /* switch back to base-chnl */ @@ -15150,7 +15150,7 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf) break; case TDLS_CH_SW_START: - rtw_tdls_set_ch_sw_oper_control(padapter, _TRUE); + rtw_tdls_set_ch_sw_oper_control(padapter, true); break; case TDLS_CH_SW_TO_OFF_CHNL: issue_nulldata(padapter, NULL, 1, 3, 3); @@ -15176,7 +15176,7 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf) break; case TDLS_CH_SW_END: case TDLS_CH_SW_END_TO_BASE_CHNL: - rtw_tdls_set_ch_sw_oper_control(padapter, _FALSE); + rtw_tdls_set_ch_sw_oper_control(padapter, false); _cancel_timer_ex(&ptdls_sta->ch_sw_timer); _cancel_timer_ex(&ptdls_sta->stay_on_base_chnl_timer); _cancel_timer_ex(&ptdls_sta->ch_sw_monitor_timer); @@ -15194,7 +15194,7 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf) memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt)); txmgmt.status_code = 0; _rtw_memcpy(txmgmt.peer, ptdls_sta->hwaddr, ETH_ALEN); - issue_tdls_ch_switch_rsp(padapter, &txmgmt, _FALSE); + issue_tdls_ch_switch_rsp(padapter, &txmgmt, false); } } @@ -15217,15 +15217,15 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf) txmgmt.status_code = 0; _rtw_memcpy(txmgmt.peer, ptdls_sta->hwaddr, ETH_ALEN); - issue_tdls_teardown(padapter, &txmgmt, _TRUE); + issue_tdls_teardown(padapter, &txmgmt, true); break; case TDLS_TEARDOWN_STA_LOCALLY: #ifdef CONFIG_TDLS_CH_SW - if (_rtw_memcmp(TDLSoption->addr, pchsw_info->addr, ETH_ALEN) == _TRUE) { + if (_rtw_memcmp(TDLSoption->addr, pchsw_info->addr, ETH_ALEN) == true) { pchsw_info->ch_sw_state &= ~(TDLS_CH_SW_INITIATOR_STATE | TDLS_CH_SWITCH_ON_STATE | TDLS_PEER_AT_OFF_STATE); - rtw_tdls_set_ch_sw_oper_control(padapter, _FALSE); + rtw_tdls_set_ch_sw_oper_control(padapter, false); memset(pchsw_info->addr, 0x00, ETH_ALEN); } #endif diff --git a/core/rtw_mp.c b/core/rtw_mp.c index 3912cd9..1e59501 100644 --- a/core/rtw_mp.c +++ b/core/rtw_mp.c @@ -141,11 +141,11 @@ static void _init_mp_priv_(struct mp_priv *pmp_priv) pmp_priv->network_macaddr[4] = 0x66; pmp_priv->network_macaddr[5] = 0x55; - pmp_priv->bSetRxBssid = _FALSE; - pmp_priv->bRTWSmbCfg = _FALSE; - pmp_priv->bloopback = _FALSE; + pmp_priv->bSetRxBssid = false; + pmp_priv->bRTWSmbCfg = false; + pmp_priv->bloopback = false; - pmp_priv->bloadefusemap = _FALSE; + pmp_priv->bloadefusemap = false; pnetwork = &pmp_priv->mp_network.network; _rtw_memcpy(pnetwork->MacAddress, pmp_priv->network_macaddr, ETH_ALEN); @@ -219,8 +219,8 @@ static void mp_init_xmit_attrib(struct mp_tx *pmptx, PADAPTER padapter) pattrib->qsel = pattrib->priority; pattrib->nr_frags = 1; pattrib->encrypt = 0; - pattrib->bswenc = _FALSE; - pattrib->qos_en = _FALSE; + pattrib->bswenc = false; + pattrib->qos_en = false; pattrib->pktlen = 1500; } @@ -237,7 +237,7 @@ s32 init_mp_priv(PADAPTER padapter) pmppriv->mp_dm = 0; pmppriv->tx.stop = 1; pmppriv->bSetTxPower = 0; /*for manually set tx power*/ - pmppriv->bTxBufCkFail = _FALSE; + pmppriv->bTxBufCkFail = false; pmppriv->pktInterval = 0; pmppriv->pktLength = 1000; @@ -347,15 +347,15 @@ MPT_InitializeAdapter( u32 ledsetting; struct mlme_priv *pmlmepriv = &pAdapter->mlmepriv; - 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 for BT MP */ mpt_InitHWConfig(pAdapter); - pMptCtx->bMptWorkItemInProgress = _FALSE; + pMptCtx->bMptWorkItemInProgress = false; pMptCtx->CurrMptAct = NULL; pMptCtx->mpt_rf_path = ODM_RF_PATH_A; /* ------------------------------------------------------------------------- */ @@ -365,7 +365,7 @@ MPT_InitializeAdapter( ledsetting = rtw_read32(pAdapter, REG_LEDCFG0); PHY_LCCalibrate(pAdapter); - PHY_IQCalibrate(pAdapter, _FALSE); + PHY_IQCalibrate(pAdapter, false); PHY_SetRFPathSwitch(pAdapter, 1/*pHalData->bDefaultAntenna*/); /* default use Main */ @@ -403,20 +403,20 @@ MPT_DeInitAdapter( { PMPT_CONTEXT pMptCtx = &pAdapter->mppriv.mpt_ctx; - pMptCtx->bMptDrvUnload = _TRUE; + pMptCtx->bMptDrvUnload = true; } static u8 mpt_ProStartTest(PADAPTER padapter) { PMPT_CONTEXT pMptCtx = &padapter->mppriv.mpt_ctx; - pMptCtx->bMassProdTest = _TRUE; - pMptCtx->is_start_cont_tx = _FALSE; - pMptCtx->bCckContTx = _FALSE; - pMptCtx->bOfdmContTx = _FALSE; - pMptCtx->bSingleCarrier = _FALSE; - pMptCtx->is_carrier_suppression = _FALSE; - pMptCtx->is_single_tone = _FALSE; + pMptCtx->bMassProdTest = true; + pMptCtx->is_start_cont_tx = false; + pMptCtx->bCckContTx = false; + pMptCtx->bOfdmContTx = false; + pMptCtx->bSingleCarrier = false; + pMptCtx->is_carrier_suppression = false; + pMptCtx->is_single_tone = false; pMptCtx->HWTxmode = PACKETS_TX; return _SUCCESS; @@ -438,7 +438,7 @@ void GetPowerTracking(PADAPTER padapter, u8 *enable) void rtw_mp_trigger_iqk(PADAPTER padapter) { - PHY_IQCalibrate(padapter, _FALSE); + PHY_IQCalibrate(padapter, false); } void rtw_mp_trigger_lck(PADAPTER padapter) @@ -462,7 +462,7 @@ static void disable_dm(PADAPTER padapter) rtw_phydm_func_disable_all(padapter); /* enable APK, LCK and IQK but disable power tracking */ - pDM_Odm->rf_calibrate_info.txpowertrack_control = _FALSE; + pDM_Odm->rf_calibrate_info.txpowertrack_control = false; rtw_phydm_func_set(padapter, ODM_RF_CALIBRATION); /* #ifdef CONFIG_BT_COEXIST */ @@ -480,13 +480,13 @@ void MPT_PwrCtlDM(PADAPTER padapter, u32 bstart) RTW_INFO("in MPT_PwrCtlDM start\n"); rtw_phydm_func_set(padapter, ODM_RF_TX_PWR_TRACK | ODM_RF_CALIBRATION); - pDM_Odm->rf_calibrate_info.txpowertrack_control = _TRUE; + pDM_Odm->rf_calibrate_info.txpowertrack_control = true; padapter->mppriv.mp_dm = 1; } else { RTW_INFO("in MPT_PwrCtlDM stop\n"); disable_dm(padapter); - pDM_Odm->rf_calibrate_info.txpowertrack_control = _FALSE; + pDM_Odm->rf_calibrate_info.txpowertrack_control = false; padapter->mppriv.mp_dm = 0; { struct _TXPWRTRACK_CFG c; @@ -561,13 +561,13 @@ u32 mp_join(PADAPTER padapter, u8 mode) _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); - rtw_indicate_disconnect(padapter, 0, _FALSE); + if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { + rtw_disassoc_cmd(padapter, 500, true); + rtw_indicate_disconnect(padapter, 0, false); rtw_free_assoc_resources(padapter, 1); } pmppriv->prev_fw_state = get_fwstate(pmlmepriv); @@ -693,11 +693,11 @@ void mp_stop_test(PADAPTER padapter) if (pmppriv->mode == MP_ON) { 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 */ - rtw_indicate_disconnect(padapter, 0, _FALSE); + rtw_indicate_disconnect(padapter, 0, false); /* 3 2. clear psta used in mp test mode. * rtw_free_assoc_resources(padapter, 1); */ @@ -781,7 +781,7 @@ int SetTxPower(PADAPTER pAdapter) { hal_mpt_SetTxPower(pAdapter); - return _TRUE; + return true; } static void SetTxAGCOffset(PADAPTER pAdapter, u32 ulTxAGCOffset) @@ -1143,7 +1143,7 @@ void SetPacketRx(PADAPTER pAdapter, u8 bStartRx, u8 bAB) pHalData->ReceiveConfig |= RCR_ACRC32; pHalData->ReceiveConfig |= RCR_APP_PHYST_RXFF | RCR_APP_ICV | RCR_APP_MIC; - if (pmppriv->bSetRxBssid == _TRUE) { + if (pmppriv->bSetRxBssid == true) { RTW_INFO("%s: pmppriv->network_macaddr=" MAC_FMT "\n", __func__, MAC_ARG(pmppriv->network_macaddr)); pHalData->ReceiveConfig = 0; @@ -1259,7 +1259,7 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data) return 0; } - if (check_fwstate(&pAdapter->mlmepriv, WIFI_MP_STATE) == _FALSE) { + if (check_fwstate(&pAdapter->mlmepriv, WIFI_MP_STATE) == false) { return 0; } @@ -2159,7 +2159,7 @@ void PMAC_Nsym_generator( N_CBPS = N_BPSC * N_SD * pPMacPktInfo->Nss; N_DBPS = (u32)((double)N_CBPS * CR); - if (pPMacTxInfo->bLDPC == FALSE) { + if (pPMacTxInfo->bLDPC == false) { N_ES = (u32)ceil((double)(N_DBPS * pPMacPktInfo->Nss) / 4. / 300.); RTW_INFO("N_ES = %d\n", N_ES); @@ -2203,7 +2203,7 @@ void PMAC_Nsym_generator( N_BPSC = N_BPSC_list[pPMacPktInfo->MCS]; N_CBPS = N_BPSC * N_SD * pPMacPktInfo->Nss; N_DBPS = (u32)((double)N_CBPS * CR); - if (pPMacTxInfo->bLDPC == FALSE) { + if (pPMacTxInfo->bLDPC == false) { if (pPMacTxInfo->bSGI) N_ES = (u32)ceil((double)(N_DBPS) / 3.6 / 600.); else @@ -2437,7 +2437,7 @@ void HT_SIG_generator( /* Short GI*/ sig_bi[31] = pPMacTxInfo->bSGI; /* N_ELTFs*/ - if (pPMacTxInfo->NDP_sound == FALSE) { + if (pPMacTxInfo->NDP_sound == false) { sig_bi[32] = 0; sig_bi[33] = 0; } else { diff --git a/core/rtw_odm.c b/core/rtw_odm.c index 6123f2a..212cc43 100644 --- a/core/rtw_odm.c +++ b/core/rtw_odm.c @@ -128,10 +128,10 @@ bool rtw_odm_adaptivity_needed(_adapter *adapter) { struct registry_priv *regsty = &adapter->registrypriv; struct mlme_priv *mlme = &adapter->mlmepriv; - bool ret = _FALSE; + bool ret = false; if (regsty->adaptivity_en == RTW_ADAPTIVITY_EN_ENABLE) - ret = _TRUE; + ret = true; return ret; } diff --git a/core/rtw_p2p.c b/core/rtw_p2p.c index 5dfa237..221809e 100644 --- a/core/rtw_p2p.c +++ b/core/rtw_p2p.c @@ -40,7 +40,7 @@ static int rtw_p2p_is_channel_list_ok(u8 desired_ch, u8 *ch_list, u8 ch_cnt) static int is_any_client_associated(_adapter *padapter) { - return padapter->stapriv.asoc_list_cnt ? _TRUE : _FALSE; + return padapter->stapriv.asoc_list_cnt ? true : false; } static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf) @@ -71,7 +71,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); plist = get_next(plist); @@ -592,7 +592,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); else memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -704,7 +704,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); else memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -777,7 +777,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) { if (is_any_client_associated(pwdinfo->padapter)) { if (pwdinfo->wfd_tdls_enable) { @@ -839,7 +839,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); else memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -993,7 +993,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); else memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -1092,7 +1092,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); else memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -1191,7 +1191,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); else memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -1290,7 +1290,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); else memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -1390,7 +1390,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); else memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -1490,7 +1490,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); else memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -1603,7 +1603,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); else memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -1716,7 +1716,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); else memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -1816,7 +1816,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); else memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -1860,7 +1860,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) u8 zero_array_check[L2SDTA_SERVICE_VE_LEN] = { 0x00 }; u8 widi_version = 0, i = 0; - if (_rtw_memcmp(pmlmepriv->sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN) == _FALSE) + if (_rtw_memcmp(pmlmepriv->sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN) == false) widi_version = 35; else if (pmlmepriv->num_p2p_sdt != 0) widi_version = 40; @@ -2237,7 +2237,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; @@ -2287,9 +2287,9 @@ 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 { /* non -p2p device */ } @@ -2447,7 +2447,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); plist = get_next(plist); @@ -2484,13 +2484,13 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le issue_p2p_devdisc_resp(pwdinfo, get_addr2_ptr(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) @@ -2529,14 +2529,14 @@ u8 process_p2p_provdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint l } } RTW_INFO("[%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; } static u8 rtw_p2p_get_peer_ch_list(struct wifidirect_info *pwdinfo, u8 *ch_content, u8 ch_cnt, u8 *peer_ch_list) @@ -2663,7 +2663,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) */ } @@ -2823,7 +2823,7 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe cap_attr = le16_to_cpu(le_tmp); #ifdef CONFIG_TDLS if (!(cap_attr & P2P_GRPCAP_INTRABSS)) - ptdlsinfo->ap_prohibited = _TRUE; + ptdlsinfo->ap_prohibited = true; #endif /* CONFIG_TDLS */ } @@ -3067,7 +3067,7 @@ u8 process_p2p_presence_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le issue_p2p_presence_resp(pwdinfo, get_addr2_ptr(pframe), status, dialogToken); - return _TRUE; + return true; } static void find_phase_handler(_adapter *padapter) @@ -3210,7 +3210,7 @@ void p2p_concurrent_handler(_adapter *padapter) } } 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. */ RTW_INFO("[%s] P2P_STATE_IDLE, ext_listen_interval = %d\n", __func__, pwdinfo->ext_listen_interval); @@ -3244,13 +3244,13 @@ void p2p_concurrent_handler(_adapter *padapter) rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); 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, CHANNEL_WIDTH_20); rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); 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; set_channel_bwmode(padapter, , HAL_PRIME_CHNL_OFFSET_DONT_CARE, CHANNEL_WIDTH_20); @@ -3290,7 +3290,7 @@ static int cancel_ro_ch_handler(_adapter *padapter, u8 *buf) _enter_critical_mutex(&pwdev_priv->roch_mutex, NULL); - if (rtw_cfg80211_get_is_roch(padapter) != _TRUE) + if (rtw_cfg80211_get_is_roch(padapter) != true) goto exit; if (roch_parm->wdev && roch_parm->cookie) { @@ -3336,7 +3336,7 @@ static int cancel_ro_ch_handler(_adapter *padapter, u8 *buf) wdev = pcfg80211_wdinfo->ro_ch_wdev; - rtw_cfg80211_set_is_roch(padapter, _FALSE); + rtw_cfg80211_set_is_roch(padapter, false); pcfg80211_wdinfo->ro_ch_wdev = NULL; pcfg80211_wdinfo->last_ro_ch_time = rtw_get_current_time(); @@ -3349,7 +3349,7 @@ static int cancel_ro_ch_handler(_adapter *padapter, u8 *buf) , pcfg80211_wdinfo->remain_on_ch_cookie); #ifdef CONFIG_BT_COEXIST - rtw_btcoex_ScanNotify(padapter, _FALSE); + rtw_btcoex_ScanNotify(padapter, false); #endif exit: @@ -3450,7 +3450,7 @@ static void rtw_change_p2pie_ch_list(_adapter *padapter, const u8 *frame_body, u static bool rtw_chk_p2pie_ch_list_with_buddy(_adapter *padapter, const u8 *frame_body, u32 len) { - bool fit = _FALSE; + bool fit = false; #ifdef CONFIG_CONCURRENT_MODE u8 *ies, *p2p_ie; u32 ies_len, p2p_ielen; @@ -3480,7 +3480,7 @@ static bool rtw_chk_p2pie_ch_list_with_buddy(_adapter *padapter, const u8 *frame for (i = 0; i < num_of_ch; i++) { if (*(pattr_temp + 2 + i) == union_ch) { RTW_INFO(FUNC_ADPT_FMT" ch_list fit buddy_ch:%u\n", FUNC_ADPT_ARG(padapter), union_ch); - fit = _TRUE; + fit = true; break; } } @@ -3499,7 +3499,7 @@ static bool rtw_chk_p2pie_ch_list_with_buddy(_adapter *padapter, const u8 *frame static bool rtw_chk_p2pie_op_ch_with_buddy(_adapter *padapter, const u8 *frame_body, u32 len) { - bool fit = _FALSE; + bool fit = false; #ifdef CONFIG_CONCURRENT_MODE u8 *ies, *p2p_ie; u32 ies_len, p2p_ielen; @@ -3521,7 +3521,7 @@ static bool rtw_chk_p2pie_op_ch_with_buddy(_adapter *padapter, const u8 *frame_b if (pattr != NULL) { if (*(pattr + 4) == union_ch) { RTW_INFO(FUNC_ADPT_FMT" op_ch fit buddy_ch:%u\n", FUNC_ADPT_ARG(padapter), union_ch); - fit = _TRUE; + fit = true; break; } } @@ -3616,7 +3616,7 @@ static u32 rtw_xframe_build_wfd_ie(struct xmit_frame *xframe) if (category == RTW_WLAN_CATEGORY_PUBLIC) { 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]; dialogToken = frame_body[7]; @@ -3697,7 +3697,7 @@ static bool rtw_xframe_del_wfd_ie(struct xmit_frame *xframe) if (category == RTW_WLAN_CATEGORY_PUBLIC) { 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]; @@ -3744,7 +3744,7 @@ void rtw_xframe_chk_wfd_ie(struct xmit_frame *xframe) del = 1; #ifdef CONFIG_IOCTL_CFG80211 - if (_TRUE == wdinfo->wfd_info->wfd_enable) + if (true == wdinfo->wfd_info->wfd_enable) #endif del = build = 1; @@ -3764,7 +3764,7 @@ static u8 *dump_p2p_attr_ch_list(u8 *p2p_ie, uint p2p_ielen, u8 *buf, u32 buf_le int w_sz = 0; u8 ch_cnt = 0; u8 ch_list[40]; - bool continuous = _FALSE; + bool continuous = false; pattr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CH_LIST, NULL, &attr_contentlen); if (pattr != NULL) { @@ -3808,16 +3808,16 @@ static u8 *dump_p2p_attr_ch_list(u8 *p2p_ie, uint p2p_ielen, u8 *buf, u32 buf_le } /* - * return _TRUE if requester is GO, _FALSE if responder is GO + * return true if requester is GO, false if responder is GO */ static bool rtw_p2p_nego_intent_compare(u8 req, u8 resp) { if (req >> 1 == resp >> 1) - return req & 0x01 ? _TRUE : _FALSE; + return req & 0x01 ? true : false; else if (req >> 1 > resp >> 1) - return _TRUE; + return true; else - return _FALSE; + return false; } int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) @@ -3842,7 +3842,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) if (category == RTW_WLAN_CATEGORY_PUBLIC) { 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]; dialogToken = frame_body[7]; @@ -3866,11 +3866,11 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) 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; */ #if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT) if (rtw_mi_check_status(padapter, MI_LINKED) && padapter->registrypriv.full_ch_in_p2p_handshake == 0) @@ -3906,7 +3906,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) dump_p2p_attr_ch_list(p2p_ie, p2p_ielen, ch_list_buf, 128); RTW_INFO("RTW_%s:P2P_GO_NEGO_REQ, dialogToken=%d, intent:%u%s, listen_ch:%d, op_ch:%d, ch_list:%s" - , (tx == _TRUE) ? "Tx" : "Rx" , dialogToken , (intent >> 1) , intent & 0x1 ? "+" : "-" , listen_ch , op_ch , ch_list_buf); + , (tx == true) ? "Tx" : "Rx" , dialogToken , (intent >> 1) , intent & 0x1 ? "+" : "-" , listen_ch , op_ch , ch_list_buf); if (iaddr) _RTW_INFO(", iaddr:"MAC_FMT, MAC_ARG(iaddr)); _RTW_INFO("\n"); @@ -3914,7 +3914,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) if (!tx) { #if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT) if (rtw_mi_check_status(padapter, MI_LINKED) - && rtw_chk_p2pie_ch_list_with_buddy(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)) == _FALSE + && rtw_chk_p2pie_ch_list_with_buddy(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)) == false && padapter->registrypriv.full_ch_in_p2p_handshake == 0) { RTW_INFO(FUNC_ADPT_FMT" ch_list has no intersect with buddy\n", FUNC_ADPT_ARG(padapter)); rtw_change_p2pie_ch_list(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr), 0); @@ -3948,7 +3948,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) iaddr = cont; if (nego_info->token == dialogToken && nego_info->state == 0 - && _rtw_memcmp(nego_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN) == _TRUE + && _rtw_memcmp(nego_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN) == true ) { if (iaddr) _rtw_memcpy(tx ? nego_info->iface_addr : nego_info->peer_iface_addr, iaddr, ETH_ALEN); @@ -3962,16 +3962,16 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) dump_p2p_attr_ch_list(p2p_ie, p2p_ielen, ch_list_buf, 128); RTW_INFO("RTW_%s:P2P_GO_NEGO_RESP, dialogToken=%d, intent:%u%s, status:%d, op_ch:%d, ch_list:%s" - , (tx == _TRUE) ? "Tx" : "Rx", dialogToken, (intent >> 1), intent & 0x1 ? "+" : "-", status, op_ch, ch_list_buf); + , (tx == true) ? "Tx" : "Rx", dialogToken, (intent >> 1), intent & 0x1 ? "+" : "-", status, op_ch, ch_list_buf); if (iaddr) _RTW_INFO(", iaddr:"MAC_FMT, MAC_ARG(iaddr)); _RTW_INFO("\n"); if (!tx) { - pwdev_priv->provdisc_req_issued = _FALSE; + pwdev_priv->provdisc_req_issued = false; #if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT) if (rtw_mi_check_status(padapter, MI_LINKED) - && rtw_chk_p2pie_ch_list_with_buddy(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)) == _FALSE + && rtw_chk_p2pie_ch_list_with_buddy(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)) == false && padapter->registrypriv.full_ch_in_p2p_handshake == 0) { RTW_INFO(FUNC_ADPT_FMT" ch_list has no intersect with buddy\n", FUNC_ADPT_ARG(padapter)); rtw_change_p2pie_ch_list(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr), 0); @@ -3983,7 +3983,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) } case P2P_GO_NEGO_CONF: { struct rtw_wdev_nego_info *nego_info = &pwdev_priv->nego_info; - bool is_go = _FALSE; + bool is_go = false; if (tx) { #if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT) @@ -4000,7 +4000,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) status = *cont; if (nego_info->token == dialogToken && nego_info->state == 1 - && _rtw_memcmp(nego_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN) == _TRUE + && _rtw_memcmp(nego_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN) == true ) { nego_info->status = (status == -1) ? 0xff : status; nego_info->conf_op_ch = (op_ch == -1) ? 0 : op_ch; @@ -4008,7 +4008,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) if (status == 0) { if (rtw_p2p_nego_intent_compare(nego_info->req_intent, nego_info->rsp_intent) ^ !tx) - is_go = _TRUE; + is_go = true; } nego_info->token = 0; /* init */ @@ -4016,7 +4016,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) dump_p2p_attr_ch_list(p2p_ie, p2p_ielen, ch_list_buf, 128); RTW_INFO("RTW_%s:P2P_GO_NEGO_CONF, dialogToken=%d, status:%d, op_ch:%d, ch_list:%s\n" - , (tx == _TRUE) ? "Tx" : "Rx", dialogToken, status, op_ch, ch_list_buf); + , (tx == true) ? "Tx" : "Rx", dialogToken, status, op_ch, ch_list_buf); if (!tx) { } @@ -4059,7 +4059,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) dump_p2p_attr_ch_list(p2p_ie, p2p_ielen, ch_list_buf, 128); RTW_INFO("RTW_%s:P2P_INVIT_REQ, dialogToken=%d, flags:0x%02x, op_ch:%d, ch_list:%s" - , (tx == _TRUE) ? "Tx" : "Rx", dialogToken, flags, op_ch, ch_list_buf); + , (tx == true) ? "Tx" : "Rx", dialogToken, flags, op_ch, ch_list_buf); if (gbssid) _RTW_INFO(", gbssid:"MAC_FMT, MAC_ARG(gbssid)); _RTW_INFO("\n"); @@ -4067,10 +4067,10 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) if (!tx) { #if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT) if (rtw_mi_check_status(padapter, MI_LINKED) && padapter->registrypriv.full_ch_in_p2p_handshake == 0) { - if (op_ch != -1 && rtw_chk_p2pie_op_ch_with_buddy(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)) == _FALSE) { + if (op_ch != -1 && rtw_chk_p2pie_op_ch_with_buddy(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)) == false) { RTW_INFO(FUNC_ADPT_FMT" op_ch:%u has no intersect with buddy\n", FUNC_ADPT_ARG(padapter), op_ch); rtw_change_p2pie_ch_list(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr), 0); - } else if (rtw_chk_p2pie_ch_list_with_buddy(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)) == _FALSE) { + } else if (rtw_chk_p2pie_ch_list_with_buddy(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)) == false) { RTW_INFO(FUNC_ADPT_FMT" ch_list has no intersect with buddy\n", FUNC_ADPT_ARG(padapter)); rtw_change_p2pie_ch_list(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr), 0); } @@ -4108,7 +4108,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) gbssid = cont; if (invit_info->token == dialogToken && invit_info->state == 0 - && _rtw_memcmp(invit_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN) == _TRUE + && _rtw_memcmp(invit_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN) == true ) { invit_info->status = (status == -1) ? 0xff : status; invit_info->rsp_op_ch = op_ch; @@ -4118,7 +4118,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) dump_p2p_attr_ch_list(p2p_ie, p2p_ielen, ch_list_buf, 128); RTW_INFO("RTW_%s:P2P_INVIT_RESP, dialogToken=%d, status:%d, op_ch:%d, ch_list:%s" - , (tx == _TRUE) ? "Tx" : "Rx", dialogToken, status, op_ch, ch_list_buf); + , (tx == true) ? "Tx" : "Rx", dialogToken, status, op_ch, ch_list_buf); if (gbssid) _RTW_INFO(", gbssid:"MAC_FMT, MAC_ARG(gbssid)); _RTW_INFO("\n"); @@ -4129,11 +4129,11 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) break; } case P2P_DEVDISC_REQ: - RTW_INFO("RTW_%s:P2P_DEVDISC_REQ, dialogToken=%d\n", (tx == _TRUE) ? "Tx" : "Rx", dialogToken); + RTW_INFO("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); - RTW_INFO("RTW_%s:P2P_DEVDISC_RESP, dialogToken=%d, status:%d\n", (tx == _TRUE) ? "Tx" : "Rx", dialogToken, cont ? *cont : -1); + RTW_INFO("RTW_%s:P2P_DEVDISC_RESP, dialogToken=%d, status:%d\n", (tx == true) ? "Tx" : "Rx", dialogToken, cont ? *cont : -1); break; case P2P_PROVISION_DISC_REQ: { size_t frame_body_len = len - sizeof(struct rtw_ieee80211_hdr_3addr); @@ -4141,22 +4141,22 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) uint p2p_ielen = 0; uint contentlen = 0; - RTW_INFO("RTW_%s:P2P_PROVISION_DISC_REQ, dialogToken=%d\n", (tx == _TRUE) ? "Tx" : "Rx", dialogToken); + RTW_INFO("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; p2p_ie = rtw_get_p2p_ie(frame_body + _PUBLIC_ACTION_IE_OFFSET_, frame_body_len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &p2p_ielen); if (p2p_ie) { 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 - RTW_INFO("provdisc_req_issued is _TRUE\n"); + RTW_INFO("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. */ } } @@ -4164,10 +4164,10 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) } break; case P2P_PROVISION_DISC_RESP: - RTW_INFO("RTW_%s:P2P_PROVISION_DISC_RESP, dialogToken=%d\n", (tx == _TRUE) ? "Tx" : "Rx", dialogToken); + RTW_INFO("RTW_%s:P2P_PROVISION_DISC_RESP, dialogToken=%d\n", (tx == true) ? "Tx" : "Rx", dialogToken); break; default: - RTW_INFO("RTW_%s:OUI_Subtype=%d, dialogToken=%d\n", (tx == _TRUE) ? "Tx" : "Rx", OUI_Subtype, dialogToken); + RTW_INFO("RTW_%s:OUI_Subtype=%d, dialogToken=%d\n", (tx == true) ? "Tx" : "Rx", OUI_Subtype, dialogToken); break; } @@ -4186,24 +4186,24 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) switch (OUI_Subtype) { case P2P_NOTICE_OF_ABSENCE: - RTW_INFO("RTW_%s:P2P_NOTICE_OF_ABSENCE, dialogToken=%d\n", (tx == _TRUE) ? "TX" : "RX", dialogToken); + RTW_INFO("RTW_%s:P2P_NOTICE_OF_ABSENCE, dialogToken=%d\n", (tx == true) ? "TX" : "RX", dialogToken); break; case P2P_PRESENCE_REQUEST: - RTW_INFO("RTW_%s:P2P_PRESENCE_REQUEST, dialogToken=%d\n", (tx == _TRUE) ? "TX" : "RX", dialogToken); + RTW_INFO("RTW_%s:P2P_PRESENCE_REQUEST, dialogToken=%d\n", (tx == true) ? "TX" : "RX", dialogToken); break; case P2P_PRESENCE_RESPONSE: - RTW_INFO("RTW_%s:P2P_PRESENCE_RESPONSE, dialogToken=%d\n", (tx == _TRUE) ? "TX" : "RX", dialogToken); + RTW_INFO("RTW_%s:P2P_PRESENCE_RESPONSE, dialogToken=%d\n", (tx == true) ? "TX" : "RX", dialogToken); break; case P2P_GO_DISC_REQUEST: - RTW_INFO("RTW_%s:P2P_GO_DISC_REQUEST, dialogToken=%d\n", (tx == _TRUE) ? "TX" : "RX", dialogToken); + RTW_INFO("RTW_%s:P2P_GO_DISC_REQUEST, dialogToken=%d\n", (tx == true) ? "TX" : "RX", dialogToken); break; default: - RTW_INFO("RTW_%s:OUI_Subtype=%d, dialogToken=%d\n", (tx == _TRUE) ? "TX" : "RX", OUI_Subtype, dialogToken); + RTW_INFO("RTW_%s:OUI_Subtype=%d, dialogToken=%d\n", (tx == true) ? "TX" : "RX", OUI_Subtype, dialogToken); break; } } else - RTW_INFO("RTW_%s:action frame category=%d\n", (tx == _TRUE) ? "TX" : "RX", category); + RTW_INFO("RTW_%s:action frame category=%d\n", (tx == true) ? "TX" : "RX", category); return is_p2p_frame; } @@ -4294,7 +4294,7 @@ s32 p2p_protocol_wk_hdl(_adapter *padapter, int intCmdType, u8 *buf) int process_p2p_cross_connect_ie(PADAPTER padapter, u8 *IEs, u32 IELength) { - int ret = _TRUE; + int ret = true; u8 *ies; u32 ies_len; u8 *p2p_ie; @@ -4317,7 +4317,7 @@ int process_p2p_cross_connect_ie(PADAPTER padapter, u8 *IEs, u32 IELength) /* Get P2P Manageability IE. */ if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_MANAGEABILITY, p2p_attr, &attr_contentlen)) { if ((p2p_attr[0] & (BIT(0) | BIT(1))) == 0x01) - ret = _FALSE; + ret = false; break; } /* Get the next P2P IE */ @@ -4338,7 +4338,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; @@ -4359,10 +4359,10 @@ void process_p2p_ps_ie(PADAPTER padapter, u8 *IEs, u32 IELength) p2p_ie = rtw_get_p2p_ie(ies, ies_len, NULL, &p2p_ielen); 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) || @@ -4397,7 +4397,7 @@ void process_p2p_ps_ie(PADAPTER padapter, u8 *IEs, u32 IELength) if (pwdinfo->opp_ps == 1) { pwdinfo->p2p_ps_mode = P2P_PS_CTWINDOW; /* driver should wait LPS for entering CTWindow */ - if (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode == _TRUE) + if (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode == true) p2p_ps_wk_cmd(padapter, P2P_PS_ENABLE, 1); } else if (pwdinfo->noa_num > 0) { pwdinfo->p2p_ps_mode = P2P_PS_NOA; @@ -4414,8 +4414,8 @@ void process_p2p_ps_ie(PADAPTER padapter, u8 *IEs, u32 IELength) } - if (find_p2p == _TRUE) { - if ((pwdinfo->p2p_ps_mode > P2P_PS_NONE) && (find_p2p_ps == _FALSE)) + if (find_p2p == true) { + if ((pwdinfo->p2p_ps_mode > P2P_PS_NONE) && (find_p2p_ps == false)) p2p_ps_wk_cmd(padapter, P2P_PS_DISABLE, 1); } @@ -4439,7 +4439,7 @@ void p2p_ps_wk_hdl(_adapter *padapter, u8 p2p_ps_state) pwdinfo->opp_ps = 0; pwdinfo->noa_num = 0; pwdinfo->p2p_ps_mode = P2P_PS_NONE; - if (pwrpriv->bFwCurrentInPSMode == _TRUE) { + if (pwrpriv->bFwCurrentInPSMode == true) { if (pwrpriv->smart_ps == 0) { pwrpriv->smart_ps = 2; rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&(pwrpriv->pwr_mode))); @@ -4631,16 +4631,16 @@ static void pre_tx_scan_timer_process(struct timer_list *t) 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); */ /* _set_timer( &pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT ); */ } } 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); } else RTW_INFO("[%s] p2p_state is %d, ignore!!\n", __func__, rtw_p2p_state(pwdinfo)); @@ -4703,9 +4703,9 @@ void reset_global_wifidirect_info(_adapter *padapter) pwdinfo = &padapter->wdinfo; pwdinfo->persistent_supported = 0; - pwdinfo->session_available = _TRUE; + pwdinfo->session_available = true; rtw_tdls_wfd_enable(padapter, 0); - pwdinfo->wfd_tdls_weaksec = _TRUE; + pwdinfo->wfd_tdls_weaksec = true; } #ifdef CONFIG_WFD @@ -4723,13 +4723,13 @@ int rtw_init_wifi_display_info(_adapter *padapter) #endif pwfd_info->tdls_rtsp_ctrlport = 0; 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 */ memset(pwfd_info->ip_address, 0x00, 4); @@ -4744,10 +4744,10 @@ inline void rtw_wfd_enable(_adapter *adapter, bool on) if (on) { wfdinfo->rtsp_ctrlport = wfdinfo->init_rtsp_ctrlport; - wfdinfo->wfd_enable = _TRUE; + wfdinfo->wfd_enable = true; } else { - wfdinfo->wfd_enable = _FALSE; + wfdinfo->wfd_enable = false; wfdinfo->rtsp_ctrlport = 0; } } @@ -4757,7 +4757,7 @@ inline void rtw_wfd_set_ctrl_port(_adapter *adapter, u16 port) struct wifi_display_info *wfdinfo = &adapter->wfd_info; wfdinfo->init_rtsp_ctrlport = port; - if (wfdinfo->wfd_enable == _TRUE) + if (wfdinfo->wfd_enable == true) wfdinfo->rtsp_ctrlport = port; if (adapter->wdinfo.wfd_tdls_enable == 1) wfdinfo->tdls_rtsp_ctrlport = port; @@ -4788,7 +4788,7 @@ u32 rtw_append_beacon_wfd_ie(_adapter *adapter, u8 *pbuf) goto exit; #ifdef CONFIG_IOCTL_CFG80211 - if (_TRUE == wdinfo->wfd_info->wfd_enable) + if (true == wdinfo->wfd_info->wfd_enable) #endif build_ie_by_self = 1; @@ -4816,7 +4816,7 @@ u32 rtw_append_probe_req_wfd_ie(_adapter *adapter, u8 *pbuf) goto exit; #ifdef CONFIG_IOCTL_CFG80211 - if (_TRUE == wdinfo->wfd_info->wfd_enable) + if (true == wdinfo->wfd_info->wfd_enable) #endif build_ie_by_self = 1; @@ -4844,7 +4844,7 @@ u32 rtw_append_probe_resp_wfd_ie(_adapter *adapter, u8 *pbuf) goto exit; #ifdef CONFIG_IOCTL_CFG80211 - if (_TRUE == wdinfo->wfd_info->wfd_enable) + if (true == wdinfo->wfd_info->wfd_enable) #endif build_ie_by_self = 1; @@ -4872,7 +4872,7 @@ u32 rtw_append_assoc_req_wfd_ie(_adapter *adapter, u8 *pbuf) goto exit; #ifdef CONFIG_IOCTL_CFG80211 - if (_TRUE == wdinfo->wfd_info->wfd_enable) + if (true == wdinfo->wfd_info->wfd_enable) #endif build_ie_by_self = 1; @@ -4900,7 +4900,7 @@ u32 rtw_append_assoc_resp_wfd_ie(_adapter *adapter, u8 *pbuf) goto exit; #ifdef CONFIG_IOCTL_CFG80211 - if (_TRUE == wdinfo->wfd_info->wfd_enable) + if (true == wdinfo->wfd_info->wfd_enable) #endif build_ie_by_self = 1; @@ -5284,24 +5284,24 @@ int rtw_p2p_enable(_adapter *padapter, enum P2P_ROLE role) #ifdef CONFIG_IOCTL_CFG80211 if (padapter->wdinfo.driver_interface == DRIVER_CFG80211) - adapter_wdev_data(padapter)->p2p_enabled = _TRUE; + adapter_wdev_data(padapter)->p2p_enabled = true; #endif - 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 if (hal_chk_wl_func(padapter, WL_FUNC_MIRACAST)) - 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 } else if (role == P2P_ROLE_DISABLE) { #ifdef CONFIG_INTEL_WIDI - if (padapter->mlmepriv.p2p_reject_disable == _TRUE) + if (padapter->mlmepriv.p2p_reject_disable == true) return ret; #endif /* CONFIG_INTEL_WIDI */ #ifdef CONFIG_IOCTL_CFG80211 if (padapter->wdinfo.driver_interface == DRIVER_CFG80211) - adapter_wdev_data(padapter)->p2p_enabled = _FALSE; + adapter_wdev_data(padapter)->p2p_enabled = false; #endif pwdinfo->listen_channel = 0; @@ -5333,10 +5333,10 @@ int rtw_p2p_enable(_adapter *padapter, enum P2P_ROLE role) pwdinfo->profileindex = 0; } - 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 if (hal_chk_wl_func(padapter, WL_FUNC_MIRACAST)) - 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 if (_FAIL == rtw_pwr_wakeup(padapter)) { diff --git a/core/rtw_pwrctrl.c b/core/rtw_pwrctrl.c index 7166bc8..1c3f0c1 100644 --- a/core/rtw_pwrctrl.c +++ b/core/rtw_pwrctrl.c @@ -75,7 +75,7 @@ void _ips_enter(_adapter *padapter) { struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); - pwrpriv->bips_processing = _TRUE; + pwrpriv->bips_processing = true; /* syn ips_mode with request */ pwrpriv->ips_mode = pwrpriv->ips_mode_req; @@ -84,16 +84,16 @@ void _ips_enter(_adapter *padapter) RTW_INFO("==>ips_enter cnts:%d\n", pwrpriv->ips_enter_cnts); if (rf_off == pwrpriv->change_rfpwrstate) { - pwrpriv->bpower_saving = _TRUE; + pwrpriv->bpower_saving = true; RTW_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; } @@ -117,7 +117,7 @@ int _ips_leave(_adapter *padapter) int result = _SUCCESS; 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++; RTW_INFO("==>ips_leave cnts:%d\n", pwrpriv->ips_leave_cnts); @@ -128,10 +128,10 @@ int _ips_leave(_adapter *padapter) RTW_INFO("nolinked power save leave\n"); RTW_INFO("==> 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; } return result; @@ -188,9 +188,9 @@ static bool rtw_pwr_unassociated_idle(_adapter *adapter) #endif #endif - bool ret = _FALSE; + bool ret = false; - if (adapter_to_pwrctl(adapter)->bpower_saving == _TRUE) { + if (adapter_to_pwrctl(adapter)->bpower_saving == true) { /* RTW_INFO("%s: already in LPS or IPS mode\n", __func__); */ goto exit; } @@ -215,7 +215,7 @@ static bool rtw_pwr_unassociated_idle(_adapter *adapter) || check_fwstate(pmlmepriv, WIFI_AP_STATE) || check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE | WIFI_ADHOC_STATE) #if defined(CONFIG_P2P) && defined(CONFIG_IOCTL_CFG80211) - || rtw_cfg80211_get_is_roch(iface) == _TRUE + || rtw_cfg80211_get_is_roch(iface) == true #elif defined(CONFIG_P2P) || rtw_p2p_chk_state(pwdinfo, P2P_STATE_IDLE) || rtw_p2p_chk_state(pwdinfo, P2P_STATE_LISTEN) @@ -235,7 +235,7 @@ static bool rtw_pwr_unassociated_idle(_adapter *adapter) #endif #ifdef CONFIG_INTEL_PROXIM - if (adapter->proximity.proxim_on == _TRUE) + if (adapter->proximity.proxim_on == true) return; #endif @@ -247,7 +247,7 @@ static bool rtw_pwr_unassociated_idle(_adapter *adapter) goto exit; } - ret = _TRUE; + ret = true; exit: return ret; @@ -281,16 +281,16 @@ void rtw_ps_processor(_adapter *padapter) goto exit; } - if (pwrpriv->bInSuspend == _TRUE) { /* system suspend or autosuspend */ + if (pwrpriv->bInSuspend == true) { /* system suspend or autosuspend */ pdbgpriv->dbg_ps_insuspend_cnt++; - RTW_INFO("%s, pwrpriv->bInSuspend == _TRUE ignore this process\n", __func__); + RTW_INFO("%s, pwrpriv->bInSuspend == true ignore this process\n", __func__); return; } - 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; /* RTW_INFO("==> fw report state(0x%x)\n",rtw_read8(padapter,0x1ca)); */ @@ -298,8 +298,8 @@ void rtw_ps_processor(_adapter *padapter) #ifdef CONFIG_AUTOSUSPEND if (padapter->registrypriv.usbss_enable) { 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); RTW_INFO("@@@@- #1 %s==> rfstate:%s\n", __func__, (rfpwrstate == rf_on) ? "rf_on" : "rf_off"); @@ -307,8 +307,8 @@ void rtw_ps_processor(_adapter *padapter) if (rfpwrstate == rf_off) { pwrpriv->change_rfpwrstate = rf_off; - pwrpriv->bkeepfwalive = _TRUE; - pwrpriv->brfoffbyhw = _TRUE; + pwrpriv->bkeepfwalive = true; + pwrpriv->brfoffbyhw = true; autosuspend_enter(padapter); } @@ -323,7 +323,7 @@ void rtw_ps_processor(_adapter *padapter) if (rfpwrstate != pwrpriv->rf_pwrstate) { if (rfpwrstate == rf_off) { pwrpriv->change_rfpwrstate = rf_off; - pwrpriv->brfoffbyhw = _TRUE; + pwrpriv->brfoffbyhw = true; rtw_hw_suspend(padapter); } else { pwrpriv->change_rfpwrstate = rf_on; @@ -339,7 +339,7 @@ void rtw_ps_processor(_adapter *padapter) if (pwrpriv->ips_mode_req == IPS_NONE) 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)) { @@ -351,13 +351,13 @@ void rtw_ps_processor(_adapter *padapter) #ifdef CONFIG_AUTOSUSPEND 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) RTW_INFO("<==%s .pwrpriv->bInternalAutoSuspend)(%x)\n", __func__, pwrpriv->bInternalAutoSuspend); else { pwrpriv->change_rfpwrstate = rf_off; @@ -384,7 +384,7 @@ exit: #ifndef CONFIG_IPS_CHECK_IN_WD rtw_set_pwr_state_check_timer(pwrpriv); #endif - pwrpriv->ps_processing = _FALSE; + pwrpriv->ps_processing = false; return; } @@ -410,7 +410,7 @@ void traffic_check_for_leave_lps(PADAPTER padapter, u8 tx, u32 tx_packets) #ifdef CONFIG_CHECK_LEAVE_LPS static u32 start_time = 0; static u32 xmit_cnt = 0; - u8 bLeaveLPS = _FALSE; + u8 bLeaveLPS = false; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; @@ -426,11 +426,11 @@ void traffic_check_for_leave_lps(PADAPTER padapter, u8 tx, u32 tx_packets) if ((adapter_to_pwrctl(padapter)->bLeisurePs) && (adapter_to_pwrctl(padapter)->pwr_mode != PS_MODE_ACTIVE) #ifdef CONFIG_BT_COEXIST - && (rtw_btcoex_IsBtControlLps(padapter) == _FALSE) + && (rtw_btcoex_IsBtControlLps(padapter) == false) #endif ) { /* RTW_INFO("leave lps via Tx = %d\n", xmit_cnt); */ - bLeaveLPS = _TRUE; + bLeaveLPS = true; } } @@ -443,11 +443,11 @@ void traffic_check_for_leave_lps(PADAPTER padapter, u8 tx, u32 tx_packets) if ((adapter_to_pwrctl(padapter)->bLeisurePs) && (adapter_to_pwrctl(padapter)->pwr_mode != PS_MODE_ACTIVE) #ifdef CONFIG_BT_COEXIST - && (rtw_btcoex_IsBtControlLps(padapter) == _FALSE) + && (rtw_btcoex_IsBtControlLps(padapter) == false) #endif ) { /* RTW_INFO("leave lps via Rx = %d\n", pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod); */ - bLeaveLPS = _TRUE; + bLeaveLPS = true; } } } @@ -482,7 +482,7 @@ void rtw_set_rpwm(PADAPTER padapter, u8 pslv) pslv = PS_STATE(pslv); #ifdef CONFIG_LPS_RPWM_TIMER - if (pwrpriv->brpwmtimeout == _TRUE) + if (pwrpriv->brpwmtimeout == true) RTW_INFO("%s: RPWM timeout, force to set RPWM(0x%02X) again!\n", __func__, pslv); else #endif /* CONFIG_LPS_RPWM_TIMER */ @@ -600,15 +600,15 @@ static u8 PS_RDY_CHECK(_adapter *padapter) #endif /* CONFIG_P2P */ #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN) - if (_TRUE == pwrpriv->bInSuspend && pwrpriv->wowlan_mode) - return _TRUE; - else if (_TRUE == pwrpriv->bInSuspend && pwrpriv->wowlan_ap_mode) - return _TRUE; - else if (_TRUE == pwrpriv->bInSuspend) - return _FALSE; + if (true == pwrpriv->bInSuspend && pwrpriv->wowlan_mode) + return true; + else if (true == pwrpriv->bInSuspend && pwrpriv->wowlan_ap_mode) + return true; + else if (true == pwrpriv->bInSuspend) + return false; #else - if (_TRUE == pwrpriv->bInSuspend) - return _FALSE; + if (true == pwrpriv->bInSuspend) + return false; #endif curr_time = rtw_get_current_time(); @@ -616,34 +616,34 @@ static u8 PS_RDY_CHECK(_adapter *padapter) delta_time = curr_time - pwrpriv->DelayLPSLastTimeStamp; if (delta_time < LPS_DELAY_TIME) - return _FALSE; + return false; if (check_fwstate(pmlmepriv, WIFI_SITE_MONITOR) || check_fwstate(pmlmepriv, WIFI_UNDER_LINKING | WIFI_UNDER_WPS) || check_fwstate(pmlmepriv, WIFI_AP_STATE) || check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE | WIFI_ADHOC_STATE) #if defined(CONFIG_P2P) && defined(CONFIG_IOCTL_CFG80211) - || rtw_cfg80211_get_is_roch(padapter) == _TRUE + || rtw_cfg80211_get_is_roch(padapter) == true #endif || rtw_is_scan_deny(padapter) #ifdef CONFIG_TDLS /* TDLS link is established. */ - || (padapter->tdlsinfo.link_established == _TRUE) + || (padapter->tdlsinfo.link_established == true) #endif /* CONFIG_TDLS */ ) - return _FALSE; + return false; - if ((padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) && (padapter->securitypriv.binstallGrpkey == _FALSE)) { + if ((padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) && (padapter->securitypriv.binstallGrpkey == false)) { RTW_INFO("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; } #if defined(CONFIG_FWLPS_IN_IPS) @@ -656,7 +656,7 @@ void rtw_set_fw_in_ips_mode(PADAPTER padapter, u8 enable) u8 cpwm_orig = 0, cpwm_now = 0; u8 parm[H2C_INACTIVE_PS_LEN] = {0}; - if (padapter->netif_up == _FALSE) { + if (padapter->netif_up == false) { RTW_INFO("%s: ERROR, netif is down\n", __func__); return; } @@ -822,13 +822,13 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode if (ps_mode == PS_MODE_ACTIVE) { if (1 #ifdef CONFIG_BT_COEXIST - && (((rtw_btcoex_IsBtControlLps(padapter) == _FALSE) + && (((rtw_btcoex_IsBtControlLps(padapter) == false) #ifdef CONFIG_P2P_PS && (pwdinfo->opp_ps == 0) #endif /* CONFIG_P2P_PS */ ) - || ((rtw_btcoex_IsBtControlLps(padapter) == _TRUE) - && (rtw_btcoex_IsLpsOn(padapter) == _FALSE)) + || ((rtw_btcoex_IsBtControlLps(padapter) == true) + && (rtw_btcoex_IsLpsOn(padapter) == false)) ) #else /* !CONFIG_BT_COEXIST */ #ifdef CONFIG_P2P_PS @@ -848,7 +848,7 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode 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); if (ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE) @@ -862,9 +862,9 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode rtw_set_rpwm(padapter, PS_STATE_S4); #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN) || defined(CONFIG_P2P_WOWLAN) - if (pwrpriv->wowlan_mode == _TRUE || - pwrpriv->wowlan_ap_mode == _TRUE || - pwrpriv->wowlan_p2p_mode == _TRUE) { + if (pwrpriv->wowlan_mode == true || + pwrpriv->wowlan_ap_mode == true || + pwrpriv->wowlan_p2p_mode == true) { u32 start_time, delay_ms; u8 val8; delay_ms = 20; @@ -892,7 +892,7 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode (u8 *)(&ps_mode)); #endif /*CONFIG_LPS_POFF*/ - pwrpriv->bFwCurrentInPSMode = _FALSE; + pwrpriv->bFwCurrentInPSMode = false; #ifdef CONFIG_BT_COEXIST rtw_btcoex_LpsNotify(padapter, ps_mode); @@ -901,11 +901,11 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode } else { if ((PS_RDY_CHECK(padapter) && check_fwstate(&padapter->mlmepriv, WIFI_ASOC_STATE)) #ifdef CONFIG_BT_COEXIST - || ((rtw_btcoex_IsBtControlLps(padapter) == _TRUE) - && (rtw_btcoex_IsLpsOn(padapter) == _TRUE)) + || ((rtw_btcoex_IsBtControlLps(padapter) == true) + && (rtw_btcoex_IsLpsOn(padapter) == true)) #endif #ifdef CONFIG_P2P_WOWLAN - || (_TRUE == pwrpriv->wowlan_p2p_mode) + || (true == pwrpriv->wowlan_p2p_mode) #endif /* CONFIG_P2P_WOWLAN */ ) { u8 pslv; @@ -922,7 +922,7 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode 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); if (ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE) @@ -941,7 +941,7 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode (u8 *)(&ps_mode)); #endif /*CONFIG_LPS_POFF*/ - pwrpriv->bFwCurrentInPSMode = _TRUE; + pwrpriv->bFwCurrentInPSMode = true; pwrpriv->pwr_mode = ps_mode; pwrpriv->smart_ps = smart_ps; pwrpriv->bcn_ant_mode = bcn_ant_mode; @@ -960,8 +960,8 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode #endif /* CONFIG_LPS_LCLK */ #ifdef CONFIG_BT_COEXIST - if ((rtw_btcoex_IsBtDisabled(padapter) == _FALSE) - && (rtw_btcoex_IsBtControlLps(padapter) == _TRUE)) { + if ((rtw_btcoex_IsBtDisabled(padapter) == false) + && (rtw_btcoex_IsBtControlLps(padapter) == true)) { u8 val8; val8 = rtw_btcoex_LpsVal(padapter); @@ -990,14 +990,14 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode s32 LPS_RF_ON_check(PADAPTER padapter, u32 delay_ms) { u32 start_time; - u8 bAwake = _FALSE; + u8 bAwake = false; s32 err = 0; start_time = rtw_get_current_time(); while (1) { rtw_hal_get_hwreg(padapter, HW_VAR_FWLPS_RF_ON, &bAwake); - if (_TRUE == bAwake) + if (true == bAwake) break; if (rtw_is_surprise_removed(padapter)) { @@ -1032,11 +1032,11 @@ void LPS_Enter(PADAPTER padapter, const char *msg) /* RTW_INFO("+LeisurePSEnter\n"); */ - if (_FALSE == padapter->bFWReady) + if (false == padapter->bFWReady) return; #ifdef CONFIG_BT_COEXIST - if (rtw_btcoex_IsBtControlLps(padapter) == _TRUE) + if (rtw_btcoex_IsBtControlLps(padapter) == true) return; #endif @@ -1055,7 +1055,7 @@ void LPS_Enter(PADAPTER padapter, const char *msg) #endif for (i = 0; i < dvobj->iface_nums; i++) { - if (PS_RDY_CHECK(dvobj->padapters[i]) == _FALSE) + if (PS_RDY_CHECK(dvobj->padapters[i]) == false) return; } @@ -1070,7 +1070,7 @@ void LPS_Enter(PADAPTER padapter, const char *msg) if (pwrpriv->LpsIdleCount >= 2) { /* 4 Sec */ if (pwrpriv->pwr_mode == PS_MODE_ACTIVE) { sprintf(buf, "WIFI-%s", msg); - pwrpriv->bpower_saving = _TRUE; + pwrpriv->bpower_saving = true; rtw_set_ps_mode(padapter, pwrpriv->power_mgnt, padapter->registrypriv.smart_ps, 0, buf); } } else @@ -1092,7 +1092,7 @@ void LPS_Leave(PADAPTER padapter, const char *msg) struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); struct pwrctrl_priv *pwrpriv = dvobj_to_pwrctl(dvobj); u32 start_time; - u8 bAwake = _FALSE; + u8 bAwake = false; char buf[32] = {0}; struct debug_priv *pdbgpriv = &dvobj->drv_dbg; @@ -1100,7 +1100,7 @@ void LPS_Leave(PADAPTER padapter, const char *msg) /* RTW_INFO("+LeisurePSLeave\n"); */ #ifdef CONFIG_BT_COEXIST - if (rtw_btcoex_IsBtControlLps(padapter) == _TRUE) + if (rtw_btcoex_IsBtControlLps(padapter) == true) return; #endif @@ -1114,7 +1114,7 @@ void LPS_Leave(PADAPTER padapter, const char *msg) } } - pwrpriv->bpower_saving = _FALSE; + pwrpriv->bpower_saving = false; #ifdef DBG_CHECK_FW_PS_STATE if (rtw_fw_ps_state(padapter) == _FAIL) { RTW_INFO("leave lps, fw in 32k\n"); @@ -1142,7 +1142,7 @@ void LeaveAllPowerSaveModeDirect(PADAPTER Adapter) RTW_INFO("%s.....\n", __func__); if (rtw_is_surprise_removed(Adapter)) { - RTW_INFO(FUNC_ADPT_FMT ": bSurpriseRemoved=_TRUE Skip!\n", FUNC_ADPT_ARG(Adapter)); + RTW_INFO(FUNC_ADPT_FMT ": bSurpriseRemoved=true Skip!\n", FUNC_ADPT_ARG(Adapter)); return; } @@ -1221,7 +1221,7 @@ void LeaveAllPowerSaveModeDirect(PADAPTER Adapter) #endif { #ifdef CONFIG_IPS - if (_FALSE == ips_leave(pri_padapter)) + if (false == ips_leave(pri_padapter)) RTW_INFO("======> ips_leave fail.............\n"); #endif } @@ -1245,14 +1245,14 @@ void LeaveAllPowerSaveMode(PADAPTER Adapter) /* RTW_INFO("%s.....\n",__func__); */ - if (_FALSE == Adapter->bup) { + if (false == Adapter->bup) { RTW_INFO(FUNC_ADPT_FMT ": bup=%d Skip!\n", FUNC_ADPT_ARG(Adapter), Adapter->bup); return; } if (rtw_is_surprise_removed(Adapter)) { - RTW_INFO(FUNC_ADPT_FMT ": bSurpriseRemoved=_TRUE Skip!\n", FUNC_ADPT_ARG(Adapter)); + RTW_INFO(FUNC_ADPT_FMT ": bSurpriseRemoved=true Skip!\n", FUNC_ADPT_ARG(Adapter)); return; } @@ -1292,7 +1292,7 @@ void LeaveAllPowerSaveMode(PADAPTER Adapter) { #if defined(CONFIG_FWLPS_IN_IPS) || defined(CONFIG_SWLPS_IN_IPS) || (defined(CONFIG_PLATFORM_SPRD)) #ifdef CONFIG_IPS - if (_FALSE == ips_leave(Adapter)) + if (false == ips_leave(Adapter)) RTW_INFO("======> ips_leave fail.............\n"); #endif #endif /* CONFIG_SWLPS_IN_IPS || (CONFIG_PLATFORM_SPRD) */ @@ -1313,7 +1313,7 @@ void LPS_Leave_check( pwrpriv = adapter_to_pwrctl(padapter); - bReady = _FALSE; + bReady = false; start_time = rtw_get_current_time(); rtw_yield_os(); @@ -1326,11 +1326,11 @@ void LPS_Leave_check( || rtw_is_drv_stopped(padapter) || (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) { @@ -1452,9 +1452,9 @@ static void rpwmtimeout_workitem_callback(struct work_struct *work) RTW_INFO("%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); @@ -1529,7 +1529,7 @@ s32 rtw_register_task_alive(PADAPTER padapter, u32 task) register_task_alive(pwrctrl, task); - if (pwrctrl->bFwCurrentInPSMode == _TRUE) { + if (pwrctrl->bFwCurrentInPSMode == true) { if (pwrctrl->cpwm < pslv) { if (pwrctrl->cpwm < PS_STATE_S2) @@ -1572,8 +1572,8 @@ void rtw_unregister_task_alive(PADAPTER padapter, u32 task) pslv = PS_STATE_S0; #ifdef CONFIG_BT_COEXIST - if ((rtw_btcoex_IsBtDisabled(padapter) == _FALSE) - && (rtw_btcoex_IsBtControlLps(padapter) == _TRUE)) { + if ((rtw_btcoex_IsBtDisabled(padapter) == false) + && (rtw_btcoex_IsBtControlLps(padapter) == true)) { u8 val8; val8 = rtw_btcoex_LpsVal(padapter); @@ -1588,7 +1588,7 @@ void rtw_unregister_task_alive(PADAPTER padapter, u32 task) unregister_task_alive(pwrctrl, task); if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) - && (pwrctrl->bFwCurrentInPSMode == _TRUE)) { + && (pwrctrl->bFwCurrentInPSMode == true)) { if (pwrctrl->cpwm > pslv) { if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0)) @@ -1628,7 +1628,7 @@ s32 rtw_register_tx_alive(PADAPTER padapter) register_task_alive(pwrctrl, XMIT_ALIVE); - if (pwrctrl->bFwCurrentInPSMode == _TRUE) { + if (pwrctrl->bFwCurrentInPSMode == true) { if (pwrctrl->cpwm < pslv) { if (pwrctrl->cpwm < PS_STATE_S2) @@ -1679,7 +1679,7 @@ s32 rtw_register_cmd_alive(PADAPTER padapter) register_task_alive(pwrctrl, CMD_ALIVE); - if (pwrctrl->bFwCurrentInPSMode == _TRUE) { + if (pwrctrl->bFwCurrentInPSMode == true) { if (pwrctrl->cpwm < pslv) { if (pwrctrl->cpwm < PS_STATE_S2) @@ -1773,8 +1773,8 @@ void rtw_unregister_tx_alive(PADAPTER padapter) pslv = PS_STATE_S0; #ifdef CONFIG_BT_COEXIST - if ((rtw_btcoex_IsBtDisabled(padapter) == _FALSE) - && (rtw_btcoex_IsBtControlLps(padapter) == _TRUE)) { + if ((rtw_btcoex_IsBtDisabled(padapter) == false) + && (rtw_btcoex_IsBtControlLps(padapter) == true)) { u8 val8; val8 = rtw_btcoex_LpsVal(padapter); @@ -1800,7 +1800,7 @@ void rtw_unregister_tx_alive(PADAPTER padapter) unregister_task_alive(pwrctrl, XMIT_ALIVE); if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) - && (pwrctrl->bFwCurrentInPSMode == _TRUE)) { + && (pwrctrl->bFwCurrentInPSMode == true)) { if (pwrctrl->cpwm > pslv) { if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0)) @@ -1831,8 +1831,8 @@ void rtw_unregister_cmd_alive(PADAPTER padapter) pslv = PS_STATE_S0; #ifdef CONFIG_BT_COEXIST - if ((rtw_btcoex_IsBtDisabled(padapter) == _FALSE) - && (rtw_btcoex_IsBtControlLps(padapter) == _TRUE)) { + if ((rtw_btcoex_IsBtDisabled(padapter) == false) + && (rtw_btcoex_IsBtControlLps(padapter) == true)) { u8 val8; val8 = rtw_btcoex_LpsVal(padapter); @@ -1859,7 +1859,7 @@ void rtw_unregister_cmd_alive(PADAPTER padapter) unregister_task_alive(pwrctrl, CMD_ALIVE); if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) - && (pwrctrl->bFwCurrentInPSMode == _TRUE)) { + && (pwrctrl->bFwCurrentInPSMode == true)) { if (pwrctrl->cpwm > pslv) { if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0)) @@ -1926,16 +1926,16 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter) pwrctrlpriv->ips_leave_cnts = 0; pwrctrlpriv->lps_enter_cnts = 0; pwrctrlpriv->lps_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; pwrctrlpriv->padapter = padapter; #ifdef CONFIG_AUTOSUSPEND @@ -1955,9 +1955,9 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter) 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; @@ -1977,7 +1977,7 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter) _init_workitem(&pwrctrlpriv->dma_event, dma_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 */ @@ -1989,9 +1989,9 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter) timer_setup(&pwrctrlpriv->pwr_state_check_timer, pwr_state_check_handler, 0); #endif - pwrctrlpriv->wowlan_mode = _FALSE; - pwrctrlpriv->wowlan_ap_mode = _FALSE; - pwrctrlpriv->wowlan_p2p_mode = _FALSE; + pwrctrlpriv->wowlan_mode = false; + pwrctrlpriv->wowlan_ap_mode = false; + pwrctrlpriv->wowlan_p2p_mode = false; pwrctrlpriv->wowlan_last_wake_reason = 0; #ifdef CONFIG_RESUME_IN_WORKQUEUE @@ -2008,7 +2008,7 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter) /*default low active*/ pwrctrlpriv->is_high_active = HIGH_ACTIVE; val8 = (pwrctrlpriv->is_high_active == 0) ? 1 : 0; - rtw_hal_switch_gpio_wl_ctrl(padapter, WAKEUP_GPIO_IDX, _TRUE); + rtw_hal_switch_gpio_wl_ctrl(padapter, WAKEUP_GPIO_IDX, true); rtw_hal_set_output_gpio(padapter, WAKEUP_GPIO_IDX, val8); RTW_INFO("%s: set GPIO_%d %d as default.\n", __func__, WAKEUP_GPIO_IDX, val8); @@ -2016,9 +2016,9 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter) #ifdef CONFIG_WOWLAN rtw_wow_pattern_sw_reset(padapter); - pwrctrlpriv->wowlan_in_resume = _FALSE; + pwrctrlpriv->wowlan_in_resume = false; #ifdef CONFIG_PNO_SUPPORT - pwrctrlpriv->pno_inited = _FALSE; + pwrctrlpriv->pno_inited = false; pwrctrlpriv->pnlo_info = NULL; pwrctrlpriv->pscan_info = NULL; pwrctrlpriv->pno_ssid_list = NULL; @@ -2116,12 +2116,12 @@ void rtw_resume_in_workqueue(struct pwrctrl_priv *pwrpriv) #if defined(CONFIG_HAS_EARLYSUSPEND) || defined(CONFIG_ANDROID_POWER) inline bool rtw_is_earlysuspend_registered(struct pwrctrl_priv *pwrpriv) { - return (pwrpriv->early_suspend.suspend) ? _TRUE : _FALSE; + return (pwrpriv->early_suspend.suspend) ? true : false; } inline bool rtw_is_do_late_resume(struct pwrctrl_priv *pwrpriv) { - return (pwrpriv->do_late_resume) ? _TRUE : _FALSE; + return (pwrpriv->do_late_resume) ? true : false; } inline void rtw_set_do_late_resume(struct pwrctrl_priv *pwrpriv, bool enable) @@ -2137,7 +2137,7 @@ static void rtw_early_suspend(struct early_suspend *h) struct pwrctrl_priv *pwrpriv = container_of(h, struct pwrctrl_priv, early_suspend); RTW_INFO("%s\n", __func__); - rtw_set_do_late_resume(pwrpriv, _FALSE); + rtw_set_do_late_resume(pwrpriv, false); } static void rtw_late_resume(struct early_suspend *h) @@ -2149,7 +2149,7 @@ static void rtw_late_resume(struct early_suspend *h) RTW_INFO("%s\n", __func__); if (pwrpriv->do_late_resume) { - rtw_set_do_late_resume(pwrpriv, _FALSE); + rtw_set_do_late_resume(pwrpriv, false); rtw_resume_process(adapter); } } @@ -2171,7 +2171,7 @@ void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv) { RTW_INFO("%s\n", __func__); - rtw_set_do_late_resume(pwrpriv, _FALSE); + rtw_set_do_late_resume(pwrpriv, false); if (pwrpriv->early_suspend.suspend) unregister_early_suspend(&pwrpriv->early_suspend); @@ -2188,7 +2188,7 @@ static void rtw_early_suspend(android_early_suspend_t *h) struct pwrctrl_priv *pwrpriv = container_of(h, struct pwrctrl_priv, early_suspend); RTW_INFO("%s\n", __func__); - rtw_set_do_late_resume(pwrpriv, _FALSE); + rtw_set_do_late_resume(pwrpriv, false); } static void rtw_late_resume(android_early_suspend_t *h) @@ -2199,7 +2199,7 @@ static void rtw_late_resume(android_early_suspend_t *h) RTW_INFO("%s\n", __func__); if (pwrpriv->do_late_resume) { - rtw_set_do_late_resume(pwrpriv, _FALSE); + rtw_set_do_late_resume(pwrpriv, false); rtw_resume_process(adapter); } } @@ -2219,7 +2219,7 @@ void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv) { RTW_INFO("%s\n", __func__); - rtw_set_do_late_resume(pwrpriv, _FALSE); + rtw_set_do_late_resume(pwrpriv, false); if (pwrpriv->early_suspend.suspend) android_unregister_early_suspend(&pwrpriv->early_suspend); @@ -2231,7 +2231,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; @@ -2293,7 +2293,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller) } #endif - if (pwrpriv->bInternalAutoSuspend == _FALSE && pwrpriv->bInSuspend) { + if (pwrpriv->bInternalAutoSuspend == false && pwrpriv->bInSuspend) { RTW_INFO("%s wait bInSuspend...\n", __func__); while (pwrpriv->bInSuspend && ((rtw_get_passing_time_ms(start) <= 3000 && !rtw_is_do_late_resume(pwrpriv)) @@ -2307,21 +2307,21 @@ 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) @@ -2343,7 +2343,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller) if (rf_off == pwrpriv->rf_pwrstate) { #ifdef CONFIG_AUTOSUSPEND - if (pwrpriv->brfoffbyhw == _TRUE) { + if (pwrpriv->brfoffbyhw == true) { RTW_INFO("hw still in rf_off state ...........\n"); ret = _FAIL; goto exit; @@ -2378,7 +2378,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller) , rtw_is_drv_stopped(padapter) ? "True" : "False" , padapter->bup , rtw_get_hw_init_completed(padapter)); - ret = _FALSE; + ret = false; goto exit; } @@ -2401,7 +2401,7 @@ int rtw_pm_set_lps(_adapter *padapter, u8 mode) else 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 ret = -EINVAL; diff --git a/core/rtw_recv.c b/core/rtw_recv.c index 9b75368..721643c 100755 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -214,7 +214,7 @@ union recv_frame *_rtw_alloc_recvframe(_queue *pfree_recv_queue) _adapter *padapter; struct recv_priv *precvpriv; - if (_rtw_queue_empty(pfree_recv_queue) == _TRUE) + if (_rtw_queue_empty(pfree_recv_queue) == true) precvframe = NULL; else { phead = get_list_head(pfree_recv_queue); @@ -364,7 +364,7 @@ void rtw_free_recvframe_queue(_queue *pframequeue, _queue *pfree_recv_queue) 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); plist = get_next(plist); @@ -429,7 +429,7 @@ struct recv_buf *rtw_dequeue_recvbuf(_queue *queue) _enter_critical_ex(&queue->lock, &irqL); - if (_rtw_queue_empty(queue) == _TRUE) + if (_rtw_queue_empty(queue) == true) precvbuf = NULL; else { phead = get_list_head(queue); @@ -453,7 +453,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; */ @@ -479,7 +479,7 @@ sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe) /* RTW_INFO("\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; RTW_INFO("\n recvframe_chkmic:didn't install group key!!!!!!!!!!\n"); goto exit; @@ -499,25 +499,25 @@ sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe) pframemic = payload + datalen; - bmic_err = _FALSE; + bmic_err = false; for (i = 0; i < 8; i++) { if (miccode[i] != *(pframemic + i)) { - bmic_err = _TRUE; + bmic_err = true; } } - if (bmic_err == _TRUE) { + if (bmic_err == true) { /* 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, stainfo, (u8)IS_MCAST(prxattrib->ra)); RTW_INFO(" mic error :prxattrib->bdecrypted=%d\n", prxattrib->bdecrypted); } else { @@ -528,8 +528,8 @@ sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe) } else { /* mic checked ok */ - if ((psecuritypriv->bcheck_grpkey == _FALSE) && (IS_MCAST(prxattrib->ra) == _TRUE)) { - psecuritypriv->bcheck_grpkey = _TRUE; + if ((psecuritypriv->bcheck_grpkey == false) && (IS_MCAST(prxattrib->ra) == true)) { + psecuritypriv->bcheck_grpkey = true; } } @@ -583,12 +583,12 @@ union recv_frame *decryptor(_adapter *padapter, union recv_frame *precv_frame) } } - 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_SW_DECRYPTOR RTW_INFO(ADPT_FMT" - sec_type:%s DO SW decryption\n", @@ -633,7 +633,7 @@ union recv_frame *decryptor(_adapter *padapter, union recv_frame *precv_frame) prxattrib->encrypt != _TKIP_)) { DBG_COUNTER(padapter->rx_logs.core_rx_post_decrypt_hw); - psecuritypriv->hw_decrypted = _TRUE; + psecuritypriv->hw_decrypted = true; #ifdef DBG_RX_DECRYPTOR RTW_INFO("[%s] %d:prxstat->bdecrypted:%d, prxattrib->encrypt:%d, Setting psecuritypriv->hw_decrypted = %d\n", __func__, @@ -659,7 +659,7 @@ union recv_frame *decryptor(_adapter *padapter, union recv_frame *precv_frame) rtw_free_recvframe(return_packet, &padapter->recvpriv.free_recv_queue); return_packet = NULL; } else { - prxattrib->bdecrypted = _TRUE; + prxattrib->bdecrypted = true; } return return_packet; } @@ -815,7 +815,7 @@ static sint recv_bcast_pn_decache(union recv_frame *precv_frame) u8 key_id; if ((pattrib->encrypt == _AES_) && - (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)) { + (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)) { tmp_iv_hdr = le64_to_cpu(*(__le64*)(pdata + pattrib->hdrlen)); key_id = CCMPH_2_KEYID(tmp_iv_hdr); @@ -962,13 +962,13 @@ sint OnTDLS(_adapter *adapter, union recv_frame *precv_frame) RTW_INFO("[TDLS] Recv %s from "MAC_FMT" with SeqNum = %d\n", rtw_tdls_action_txt(*paction), MAC_ARG(pattrib->src), GetSequence(get_recvframe_data(precv_frame))); - if (hal_chk_wl_func(adapter, WL_FUNC_TDLS) == _FALSE) { + if (hal_chk_wl_func(adapter, WL_FUNC_TDLS) == false) { RTW_INFO("Ignore tdls frame since hal doesn't support tdls\n"); ret = _FAIL; return ret; } - if (ptdlsinfo->tdls_enable == _FALSE) { + if (ptdlsinfo->tdls_enable == false) { RTW_INFO("recv tdls frame, " "but tdls haven't enabled\n"); ret = _FAIL; @@ -1012,14 +1012,14 @@ sint OnTDLS(_adapter *adapter, union recv_frame *precv_frame) /* Probe request frame */ if (*(paction + 3) == 0x04) { /* WFDTDLS: for sigma test, do not setup direct link automatically */ - ptdlsinfo->dev_discovered = _TRUE; + ptdlsinfo->dev_discovered = true; RTW_INFO("recv tunneled probe request frame\n"); issue_tunneled_probe_rsp(adapter, precv_frame); } /* Probe response frame */ if (*(paction + 3) == 0x05) { /* WFDTDLS: for sigma test, do not setup direct link automatically */ - ptdlsinfo->dev_discovered = _TRUE; + ptdlsinfo->dev_discovered = true; RTW_INFO("recv tunneled probe response frame\n"); } } @@ -1085,7 +1085,7 @@ void count_rx_stats(_adapter *padapter, union recv_frame *prframe, struct sta_in } #ifdef CONFIG_CHECK_LEAVE_LPS - traffic_check_for_leave_lps(padapter, _FALSE, 0); + traffic_check_for_leave_lps(padapter, false, 0); #endif /* CONFIG_LPS */ } @@ -1125,8 +1125,8 @@ sint sta2sta_data_frame( /* RTW_INFO("[%s] %d, seqnum:%d\n", __func__, __LINE__, pattrib->seq_num); */ - 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 */ if (_rtw_memcmp(myhwaddr, pattrib->src, ETH_ALEN)) { @@ -1148,11 +1148,11 @@ sint sta2sta_data_frame( 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 /* direct link data transfer */ - if (ptdlsinfo->link_established == _TRUE) { + if (ptdlsinfo->link_established == true) { ptdls_sta = rtw_get_stainfo(pstapriv, pattrib->src); if (ptdls_sta == NULL) { ret = _FAIL; @@ -1177,7 +1177,7 @@ sint sta2sta_data_frame( } #ifdef CONFIG_TDLS_CH_SW - if (ATOMIC_READ(&pchsw_info->chsw_on) == _TRUE) { + if (ATOMIC_READ(&pchsw_info->chsw_on) == true) { if (adapter->mlmeextpriv.cur_channel != rtw_get_oper_ch(adapter)) { pchsw_info->ch_sw_state |= TDLS_PEER_AT_OFF_STATE; if (!(pchsw_info->ch_sw_state & TDLS_CH_SW_INITIATOR_STATE)) @@ -1234,7 +1234,7 @@ sint sta2sta_data_frame( sta_addr = pattrib->bssid; } - } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) { + } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) { if (bmcast) { /* For AP mode, if DA == MCAST, then BSSID should be also MCAST */ if (!IS_MCAST(pattrib->bssid)) { @@ -1251,7 +1251,7 @@ sint sta2sta_data_frame( sta_addr = pattrib->src; } - } 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, get_addr2_ptr(ptr), ETH_ALEN); _rtw_memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN); @@ -1277,7 +1277,7 @@ sint sta2sta_data_frame( if (*psta == NULL) { #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 @@ -1309,9 +1309,9 @@ sint ap2sta_data_frame( sint bmcast = IS_MCAST(pattrib->dst); - 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) ) { /* filter packets that SA is myself or multicast or broadcast */ @@ -1376,8 +1376,8 @@ sint ap2sta_data_frame( goto exit; } - } 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, get_addr2_ptr(ptr), ETH_ALEN); _rtw_memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN); @@ -1395,7 +1395,7 @@ sint ap2sta_data_frame( } - } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) { + } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) { /* Special case */ ret = RTW_RX_HANDLED; goto exit; @@ -1449,7 +1449,7 @@ sint sta2ap_data_frame( sint ret = _SUCCESS; - 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)) { ret = _FAIL; @@ -1488,8 +1488,8 @@ bypass_deauth7: ret = RTW_RX_HANDLED; goto exit; } - } 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_INFO("%s ,in WIFI_MP_STATE\n",__func__); */ _rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN); _rtw_memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN); @@ -1602,7 +1602,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); xmitframe_plist = get_next(xmitframe_plist); @@ -1629,7 +1629,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, _TRUE); + update_beacon(padapter, _TIM_IE_, NULL, true); } /* _exit_critical_bh(&psta->sleep_q.lock, &irqL); */ @@ -1655,7 +1655,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, _TRUE); + update_beacon(padapter, _TIM_IE_, NULL, true); } } } @@ -1689,7 +1689,7 @@ static sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_ else if (get_frame_sub_type(precv_frame->u.hdr.rx_data) == WIFI_PROBEREQ) psta->sta_stats.rx_probereq_pkts++; else if (get_frame_sub_type(precv_frame->u.hdr.rx_data) == WIFI_PROBERSP) { - if (_rtw_memcmp(adapter_mac_addr(padapter), GetAddr1Ptr(precv_frame->u.hdr.rx_data), ETH_ALEN) == _TRUE) + if (_rtw_memcmp(adapter_mac_addr(padapter), 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))) @@ -1701,7 +1701,7 @@ static sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_ } #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 ; u8 *pda, *psa, *pbssid, *ptr; @@ -1847,9 +1847,9 @@ sint validate_recv_data_frame(_adapter *adapter, union recv_frame *precv_frame) pattrib->hdrlen = pattrib->to_fr_ds == 3 ? 32 : 26; if (pattrib->priority != 0 && pattrib->priority != 3) - adapter->recvpriv.is_any_non_be_pkts = _TRUE; + adapter->recvpriv.is_any_non_be_pkts = true; else - adapter->recvpriv.is_any_non_be_pkts = _FALSE; + adapter->recvpriv.is_any_non_be_pkts = false; } else { pattrib->priority = 0; pattrib->hdrlen = pattrib->to_fr_ds == 3 ? 30 : 24; @@ -1926,7 +1926,7 @@ static sint validate_80211w_mgmt(_adapter *adapter, union recv_frame *precv_fram type = GetFrameType(ptr); subtype = get_frame_sub_type(ptr); /* bit(7)~bit(2) */ - if (adapter->securitypriv.binstallBIPkey == _TRUE) { + if (adapter->securitypriv.binstallBIPkey == true) { /* unicast management frame decrypt */ if (pattrib->privacy && !(IS_MCAST(GetAddr1Ptr(ptr))) && (subtype == WIFI_DEAUTH || subtype == WIFI_DISASSOC || subtype == WIFI_ACTION)) { @@ -1978,7 +1978,7 @@ static sint validate_80211w_mgmt(_adapter *adapter, union recv_frame *precv_fram else { psta = rtw_get_stainfo(pstapriv, get_addr2_ptr(ptr)); - if (subtype == WIFI_ACTION && psta && psta->bpairwise_key_installed == _TRUE) { + if (subtype == WIFI_ACTION && psta && psta->bpairwise_key_installed == true) { /* according 802.11-2012 standard, these five types are not robust types */ if (ptr[WLAN_HDR_A3_LEN] != RTW_WLAN_CATEGORY_PUBLIC && ptr[WLAN_HDR_A3_LEN] != RTW_WLAN_CATEGORY_HT && @@ -2234,15 +2234,15 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe) /* 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); @@ -2285,7 +2285,7 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe) } #endif /* CONFIG_AUTO_AP_MODE */ - if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE)) { + if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true)) { ptr += rmv_len ; *ptr = 0x87; *(ptr + 1) = 0x12; @@ -2359,7 +2359,7 @@ union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q) 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; @@ -2448,7 +2448,7 @@ union recv_frame *recvframe_chk_defrag(PADAPTER padapter, union recv_frame *prec if (pdefrag_q != NULL) { 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); } @@ -2609,7 +2609,7 @@ static int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, __le16 se RTW_INFO("%s IndicateSeq: %d > NewSeq: %d\n", __func__, preorder_ctrl->indicate_seq, seq_num); #endif - return _FALSE; + return false; } /* */ @@ -2641,7 +2641,7 @@ static int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, __le16 se /* DbgPrint("exit->check_indicate_seq(): IndicateSeq: %d, NewSeq: %d\n", precvpriv->indicate_seq, seq_num); */ - return _TRUE; + return true; } static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union recv_frame *prframe) @@ -2661,7 +2661,7 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, un 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; @@ -2672,7 +2672,7 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, un /* _exit_critical_ex(&ppending_recvframe_queue->lock, &irql); */ - return _FALSE; + return false; } else break; @@ -2692,7 +2692,7 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, un /* _exit_critical_ex(&ppending_recvframe_queue->lock, &irql); */ - return _TRUE; + return true; } @@ -2714,7 +2714,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; struct dvobj_priv *psdpriv = padapter->dvobj; @@ -2731,12 +2731,12 @@ 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) { pdbgpriv->dbg_rx_ampdu_forced_indicate_count++; if (rtw_is_list_empty(phead)) { /* _exit_critical_ex(&ppending_recvframe_queue->lock, &irql); */ /* _rtw_spinunlock_ex(&ppending_recvframe_queue->lock); */ - return _TRUE; + return true; } prframe = LIST_CONTAINOR(plist, union recv_frame, u); @@ -2784,10 +2784,10 @@ 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; } @@ -2838,7 +2838,7 @@ static int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prfram } - if (preorder_ctrl->enable == _FALSE) { + if (preorder_ctrl->enable == false) { /* indicate this recv_frame */ preorder_ctrl->indicate_seq = le16_to_cpu(pattrib->seq_num); #ifdef DBG_RX_SEQ @@ -2864,7 +2864,7 @@ static int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prfram #endif } 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 = le16_to_cpu(pattrib->seq_num); #ifdef DBG_RX_SEQ RTW_INFO("DBG_RX_SEQ %s:%d IndicateSeq: %d, NewSeq: %d\n", __func__, __LINE__, @@ -2924,15 +2924,15 @@ static int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prfram /* 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) { if (!preorder_ctrl->bReorderWaiting) { - preorder_ctrl->bReorderWaiting = _TRUE; + preorder_ctrl->bReorderWaiting = true; _set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME); } _exit_critical_bh(&ppending_recvframe_queue->lock, &irql); } else { - preorder_ctrl->bReorderWaiting = _FALSE; + preorder_ctrl->bReorderWaiting = false; _exit_critical_bh(&ppending_recvframe_queue->lock, &irql); _cancel_timer_ex(&preorder_ctrl->reordering_ctrl_timer); } @@ -2966,9 +2966,9 @@ void rtw_reordering_ctrl_timeout_handler(void *pcontext) _enter_critical_bh(&ppending_recvframe_queue->lock, &irql); if (preorder_ctrl) - preorder_ctrl->bReorderWaiting = _FALSE; + preorder_ctrl->bReorderWaiting = false; - 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); _exit_critical_bh(&ppending_recvframe_queue->lock, &irql); @@ -2990,12 +2990,12 @@ int process_recv_indicatepkts(_adapter *padapter, union recv_frame *prframe) DBG_COUNTER(padapter->rx_logs.core_rx_post_indicate); #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]; */ @@ -3048,12 +3048,12 @@ static int validate_mp_recv_frame(_adapter *adapter, union recv_frame *precv_fra pmptx = &pmppriv->tx; if (pmppriv->bloopback) { - if (_rtw_memcmp(ptr + 24, pmptx->buf + 24, precv_frame->u.hdr.len - 24) == _FALSE) { + if (_rtw_memcmp(ptr + 24, pmptx->buf + 24, precv_frame->u.hdr.len - 24) == false) { RTW_INFO("Compare payload content Fail !!!\n"); ret = _FAIL; } } - if (pmppriv->bSetRxBssid == _TRUE) { + if (pmppriv->bSetRxBssid == true) { sa = get_addr2_ptr(ptr); da = GetAddr1Ptr(ptr); @@ -3061,7 +3061,7 @@ static int validate_mp_recv_frame(_adapter *adapter, union recv_frame *precv_fra type = GetFrameType(ptr); subtype = get_frame_sub_type(ptr); /* bit(7)~bit(2) */ - if (_rtw_memcmp(bs, adapter->mppriv.network_macaddr, ETH_ALEN) == _FALSE) + if (_rtw_memcmp(bs, adapter->mppriv.network_macaddr, ETH_ALEN) == false) ret = _FAIL; RTW_DBG("############ type:0x%02x subtype:0x%02x #################\n", type, subtype); @@ -3073,7 +3073,7 @@ static int validate_mp_recv_frame(_adapter *adapter, union recv_frame *precv_fra if (!adapter->mppriv.bmac_filter) return ret; - if (_rtw_memcmp(get_addr2_ptr(ptr), adapter->mppriv.mac_filter, ETH_ALEN) == _FALSE) + if (_rtw_memcmp(get_addr2_ptr(ptr), adapter->mppriv.mac_filter, ETH_ALEN) == false) ret = _FAIL; return ret; @@ -3106,15 +3106,15 @@ static sint MPwlanhdr_to_ethhdr(union recv_frame *precvframe) /* 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); @@ -3138,11 +3138,11 @@ static sint MPwlanhdr_to_ethhdr(union recv_frame *precvframe) be_tmp = htons(le16_to_cpu(pattrib->seq_num)); /* RTW_INFO("wlan seq = %d ,seq_num =%x\n",len,pattrib->seq_num); */ _rtw_memcpy(ptr + 12, &be_tmp, 2); - if (adapter->mppriv.bRTWSmbCfg == _TRUE) { - /* if(_rtw_memcmp(mcastheadermac, pattrib->dst, 3) == _TRUE) */ /* SimpleConfig Dest. */ + if (adapter->mppriv.bRTWSmbCfg == true) { + /* if(_rtw_memcmp(mcastheadermac, pattrib->dst, 3) == true) */ /* SimpleConfig Dest. */ /* _rtw_memcpy(ptr+ETH_ALEN, pattrib->bssid, ETH_ALEN); */ - if (_rtw_memcmp(mcastheadermac, pattrib->bssid, 3) == _TRUE) /* SimpleConfig Dest. */ + if (_rtw_memcmp(mcastheadermac, pattrib->bssid, 3) == true) /* SimpleConfig Dest. */ _rtw_memcpy(ptr, pattrib->bssid, ETH_ALEN); } @@ -3169,7 +3169,7 @@ static int mp_recv_frame(_adapter *padapter, union recv_frame *rframe) struct sta_info *psta = NULL; DBG_COUNTER(padapter->rx_logs.core_rx_pre); - if ((check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) { /* &&(padapter->mppriv.check_mp_pkt == 0)) */ + if ((check_fwstate(pmlmepriv, _FW_LINKED) == true)) { /* &&(padapter->mppriv.check_mp_pkt == 0)) */ if (pattrib->crc_err == 1) padapter->mppriv.rx_crcerrpktcount++; else { @@ -3179,7 +3179,7 @@ static int mp_recv_frame(_adapter *padapter, union recv_frame *rframe) padapter->mppriv.rx_pktcount_filter_out++; } - if (pmppriv->rx_bindicatePkt == _FALSE) { + if (pmppriv->rx_bindicatePkt == false) { ret = _FAIL; rtw_free_recvframe(rframe, pfree_recv_queue);/* free this recv_frame */ goto exit; @@ -3605,7 +3605,7 @@ static int recv_func_prehandle(_adapter *padapter, union recv_frame *rframe) #endif #ifdef CONFIG_MP_INCLUDED - if (padapter->registrypriv.mp_mode == 1 || padapter->mppriv.bRTWSmbCfg == _TRUE) { + if (padapter->registrypriv.mp_mode == 1 || padapter->mppriv.bRTWSmbCfg == true) { mp_recv_frame(padapter, rframe); ret = _FAIL; goto exit; @@ -3758,7 +3758,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) && psecuritypriv->ndisauthtype == Ndis802_11AuthModeWPAPSK && !psecuritypriv->busetkipkey) { DBG_COUNTER(padapter->rx_logs.core_rx_enqueue); @@ -3867,13 +3867,13 @@ void rtw_signal_stat_timer_hdl(struct timer_list *t) goto set_timer; } - if (check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY) == _TRUE - || check_fwstate(&adapter->mlmepriv, _FW_LINKED) == _FALSE + if (check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY) == true + || check_fwstate(&adapter->mlmepriv, _FW_LINKED) == false ) goto set_timer; #ifdef CONFIG_CONCURRENT_MODE - if (rtw_mi_buddy_check_fwstate(adapter, _FW_UNDER_SURVEY) == _TRUE) + if (rtw_mi_buddy_check_fwstate(adapter, _FW_UNDER_SURVEY) == true) goto set_timer; #endif @@ -4062,9 +4062,9 @@ void rx_query_phy_status( struct debug_priv *pdbgpriv = &psdpriv->drv_dbg; /* unsigned long irqL; */ - pkt_info.is_packet_match_bssid = _FALSE; - pkt_info.is_packet_to_self = _FALSE; - pkt_info.is_packet_beacon = _FALSE; + pkt_info.is_packet_match_bssid = false; + pkt_info.is_packet_to_self = false; + pkt_info.is_packet_beacon = false; wlanhdr = get_recvframe_data(precvframe); @@ -4085,7 +4085,7 @@ void rx_query_phy_status( pkt_info.station_id = 0xFF; - if (_rtw_memcmp(adapter_mac_addr(padapter), sa, ETH_ALEN) == _TRUE) { + if (_rtw_memcmp(adapter_mac_addr(padapter), sa, ETH_ALEN) == true) { static u32 start_time = 0; if ((start_time == 0) || (rtw_get_passing_time_ms(start_time) > 5000)) { @@ -4111,7 +4111,7 @@ void rx_query_phy_status( { precvframe->u.hdr.psta = NULL; if (pkt_info.is_packet_match_bssid - && (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == _TRUE) + && (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true) ) { if (psta) { precvframe->u.hdr.psta = psta; @@ -4129,17 +4129,17 @@ void rx_query_phy_status( } /* * Increase and check if the continual_no_rx_packet of this @param pmlmepriv is larger than MAX_CONTINUAL_NORXPACKET_COUNT -* @return _TRUE: -* @return _FALSE: +* @return true: +* @return false: */ int rtw_inc_and_chk_continual_no_rx_packet(struct sta_info *sta, int tid_index) { - int ret = _FALSE; + int ret = false; int value = ATOMIC_INC_RETURN(&sta->continual_no_rx_packet[tid_index]); if (value >= MAX_CONTINUAL_NORXPACKET_COUNT) - ret = _TRUE; + ret = true; return ret; } @@ -4164,7 +4164,7 @@ s32 pre_recv_entry(union recv_frame *precvframe, u8 *pphy_status) pda = get_ra(pbuf); - if (IS_MCAST(pda) == _FALSE) { /*unicast packets*/ + if (IS_MCAST(pda) == false) { /*unicast packets*/ iface = rtw_get_iface_by_macddr(primary_padapter , pda); if (NULL == iface) { RTW_INFO("%s [WARN] Cannot find appropriate adapter - mac_addr : "MAC_FMT"\n", __func__, MAC_ARG(pda)); diff --git a/core/rtw_rf.c b/core/rtw_rf.c index 1bbc7b4..63d18d2 100644 --- a/core/rtw_rf.c +++ b/core/rtw_rf.c @@ -476,7 +476,7 @@ bool rtw_chbw_to_freq_range(u8 ch, u8 bw, u8 offset, u32 *hi, u32 *lo) u32 freq; u32 hi_ret = 0, lo_ret = 0; int i; - bool valid = _FALSE; + bool valid = false; if (hi) *hi = 0; @@ -508,7 +508,7 @@ bool rtw_chbw_to_freq_range(u8 ch, u8 bw, u8 offset, u32 *hi, u32 *lo) if (lo) *lo = lo_ret; - valid = _TRUE; + valid = true; exit: return valid; @@ -1064,30 +1064,30 @@ void rtw_rf_apply_tx_gain_offset(_adapter *adapter, u8 ch) bool rtw_is_dfs_range(u32 hi, u32 lo) { - return rtw_is_range_overlap(hi, lo, 5720 + 10, 5260 - 10) ? _TRUE : _FALSE; + return rtw_is_range_overlap(hi, lo, 5720 + 10, 5260 - 10) ? true : false; } bool rtw_is_dfs_ch(u8 ch, u8 bw, u8 offset) { u32 hi, lo; - if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == _FALSE) - return _FALSE; + if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == false) + return false; - return rtw_is_dfs_range(hi, lo) ? _TRUE : _FALSE; + return rtw_is_dfs_range(hi, lo) ? true : false; } bool rtw_is_long_cac_range(u32 hi, u32 lo, u8 dfs_region) { - return (dfs_region == PHYDM_DFS_DOMAIN_ETSI && rtw_is_range_overlap(hi, lo, 5660 + 10, 5600 - 10)) ? _TRUE : _FALSE; + return (dfs_region == PHYDM_DFS_DOMAIN_ETSI && rtw_is_range_overlap(hi, lo, 5660 + 10, 5600 - 10)) ? true : false; } bool rtw_is_long_cac_ch(u8 ch, u8 bw, u8 offset, u8 dfs_region) { u32 hi, lo; - if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == _FALSE) - return _FALSE; + if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == false) + return false; - return rtw_is_long_cac_range(hi, lo, dfs_region) ? _TRUE : _FALSE; + return rtw_is_long_cac_range(hi, lo, dfs_region) ? true : false; } diff --git a/core/rtw_security.c b/core/rtw_security.c index e2cd063..cc9b926 100644 --- a/core/rtw_security.c +++ b/core/rtw_security.c @@ -826,7 +826,7 @@ u32 rtw_tkip_decrypt(_adapter *padapter, u8 *precvframe) static u32 no_gkey_bc_cnt = 0; static u32 no_gkey_mc_cnt = 0; - if (psecuritypriv->binstallGrpkey == _FALSE) { + if (psecuritypriv->binstallGrpkey == false) { res = _FAIL; if (start == 0) @@ -1953,7 +1953,7 @@ u32 rtw_aes_decrypt(_adapter *padapter, u8 *precvframe) /* RTW_INFO("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; if (start == 0) @@ -3030,7 +3030,7 @@ void rtw_use_tkipkey_handler(RTW_TIMER_HDL_ARGS) } */ - padapter->securitypriv.busetkipkey = _TRUE; + padapter->securitypriv.busetkipkey = true; @@ -3046,9 +3046,9 @@ void rtw_sec_restore_wep_key(_adapter *adapter) for (keyid = 0; keyid < 4; keyid++) { if (securitypriv->key_mask & BIT(keyid)) { if (keyid == securitypriv->dot11PrivacyKeyIndex) - rtw_set_key(adapter, securitypriv, keyid, 1, _FALSE); + rtw_set_key(adapter, securitypriv, keyid, 1, false); else - rtw_set_key(adapter, securitypriv, keyid, 0, _FALSE); + rtw_set_key(adapter, securitypriv, keyid, 0, false); } } } @@ -3059,12 +3059,12 @@ u8 rtw_handle_tkip_countermeasure(_adapter *adapter, const char *caller) struct security_priv *securitypriv = &(adapter->securitypriv); u8 status = _SUCCESS; - if (securitypriv->btkip_countermeasure == _TRUE) { + if (securitypriv->btkip_countermeasure == true) { u32 passing_ms = rtw_get_passing_time_ms(securitypriv->btkip_countermeasure_time); if (passing_ms > 60 * 1000) { RTW_PRINT("%s("ADPT_FMT") countermeasure time:%ds > 60s\n", caller, ADPT_ARG(adapter), passing_ms / 1000); - securitypriv->btkip_countermeasure = _FALSE; + securitypriv->btkip_countermeasure = false; securitypriv->btkip_countermeasure_time = 0; } else { RTW_PRINT("%s("ADPT_FMT") countermeasure time:%ds < 60s\n", diff --git a/core/rtw_sreset.c b/core/rtw_sreset.c index c3029a7..c5b7505 100644 --- a/core/rtw_sreset.c +++ b/core/rtw_sreset.c @@ -29,7 +29,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; @@ -56,7 +56,7 @@ u8 sreset_get_wifi_status(_adapter *padapter) u8 status = WIFI_STATUS_SUCCESS; u32 val32 = 0; unsigned long irqL; - if (psrtpriv->silent_reset_inprogress == _TRUE) + if (psrtpriv->silent_reset_inprogress == true) return status; val32 = rtw_read32(padapter, REG_TXDMA_STATUS); if (val32 == 0xeaeaeaea) @@ -103,7 +103,7 @@ bool sreset_inprogress(_adapter *padapter) HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); return pHalData->srestpriv.silent_reset_inprogress; #else - return _FALSE; + return false; #endif } @@ -137,9 +137,9 @@ static void sreset_restore_security_station(_adapter *padapter) /* DEBUG_ERR( ("Set wpa_set_encryption: Obtain Sta_info fail\n")); */ } else { /* pairwise key */ - rtw_setstakey_cmd(padapter, psta, UNICAST_KEY, _FALSE); + rtw_setstakey_cmd(padapter, psta, UNICAST_KEY, false); /* group key */ - rtw_set_key(padapter, &padapter->securitypriv, padapter->securitypriv.dot118021XGrpKeyid, 0, _FALSE); + rtw_set_key(padapter, &padapter->securitypriv, padapter->securitypriv.dot118021XGrpKeyid, 0, false); } } } @@ -149,9 +149,9 @@ static void sreset_restore_network_station(_adapter *padapter) struct mlme_priv *mlmepriv = &padapter->mlmepriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - u8 doiqk = _FALSE; + u8 doiqk = false; - rtw_setopmode_cmd(padapter, Ndis802_11Infrastructure, _FALSE); + rtw_setopmode_cmd(padapter, Ndis802_11Infrastructure, false); { u8 threshold; @@ -169,12 +169,12 @@ static void sreset_restore_network_station(_adapter *padapter) } } - doiqk = _TRUE; + doiqk = true; rtw_hal_set_hwreg(padapter, HW_VAR_DO_IQK , &doiqk); set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); - doiqk = _FALSE; + doiqk = false; rtw_hal_set_hwreg(padapter , HW_VAR_DO_IQK , &doiqk); /* disable dynamic functions, such as high power, DIG */ /*rtw_phydm_func_disable_all(padapter);*/ @@ -287,17 +287,17 @@ void sreset_reset(_adapter *padapter) _enter_pwrlock(&pwrpriv->lock); - psrtpriv->silent_reset_inprogress = _TRUE; + psrtpriv->silent_reset_inprogress = true; pwrpriv->change_rfpwrstate = rf_off; - rtw_mi_sreset_adapter_hdl(padapter, _FALSE);/*sreset_stop_adapter*/ + rtw_mi_sreset_adapter_hdl(padapter, false);/*sreset_stop_adapter*/ #ifdef CONFIG_IPS _ips_enter(padapter); _ips_leave(padapter); #endif - rtw_mi_sreset_adapter_hdl(padapter, _TRUE);/*sreset_start_adapter*/ + rtw_mi_sreset_adapter_hdl(padapter, true);/*sreset_start_adapter*/ - psrtpriv->silent_reset_inprogress = _FALSE; + psrtpriv->silent_reset_inprogress = false; _exit_pwrlock(&pwrpriv->lock); diff --git a/core/rtw_sta_mgt.c b/core/rtw_sta_mgt.c index 37fbd1c..d94507f 100644 --- a/core/rtw_sta_mgt.c +++ b/core/rtw_sta_mgt.c @@ -25,8 +25,8 @@ static bool test_st_match_rule(_adapter *adapter, u8 *local_naddr, u8 *local_por { if (ntohs(*((__be16 *)local_port)) == 5001 || ntohs(*((__be16 *)remote_port)) == 5001) - return _TRUE; - return _FALSE; + return true; + return false; } static struct st_register test_st_reg = { @@ -49,7 +49,7 @@ inline void rtw_st_ctl_clear_tracker_q(struct st_ctl_t *st_ctl) _enter_critical_bh(&st_ctl->tracker_q.lock, &irqL); phead = &st_ctl->tracker_q.queue; plist = get_next(phead); - while (rtw_end_of_queue_search(phead, plist) == _FALSE) { + while (rtw_end_of_queue_search(phead, plist) == false) { st = LIST_CONTAINOR(plist, struct session_tracker, list); plist = get_next(plist); rtw_list_delete(&st->list); @@ -97,12 +97,12 @@ inline void rtw_st_ctl_unregister(struct st_ctl_t *st_ctl, u8 st_reg_id) inline bool rtw_st_ctl_chk_reg_s_proto(struct st_ctl_t *st_ctl, u8 s_proto) { - bool ret = _FALSE; + bool ret = false; int i; for (i = 0; i < SESSION_TRACKER_REG_ID_NUM; i++) { if (st_ctl->reg[i].s_proto == s_proto) { - ret = _TRUE; + ret = true; break; } } @@ -112,14 +112,14 @@ inline bool rtw_st_ctl_chk_reg_s_proto(struct st_ctl_t *st_ctl, u8 s_proto) inline bool rtw_st_ctl_chk_reg_rule(struct st_ctl_t *st_ctl, _adapter *adapter, u8 *local_naddr, u8 *local_port, u8 *remote_naddr, u8 *remote_port) { - bool ret = _FALSE; + bool ret = false; int i; st_match_rule rule; for (i = 0; i < SESSION_TRACKER_REG_ID_NUM; i++) { rule = st_ctl->reg[i].rule; - if (rule && rule(adapter, local_naddr, local_port, remote_naddr, remote_port) == _TRUE) { - ret = _TRUE; + if (rule && rule(adapter, local_naddr, local_port, remote_naddr, remote_port) == true) { + ret = true; break; } } @@ -146,7 +146,7 @@ void dump_st_ctl(void *sel, struct st_ctl_t *st_ctl) _enter_critical_bh(&st_ctl->tracker_q.lock, &irqL); phead = &st_ctl->tracker_q.queue; plist = get_next(phead); - while (rtw_end_of_queue_search(phead, plist) == _FALSE) { + while (rtw_end_of_queue_search(phead, plist) == false) { st = LIST_CONTAINOR(plist, struct session_tracker, list); plist = get_next(plist); @@ -188,10 +188,10 @@ void _rtw_init_stainfo(struct sta_info *psta) psta->capability = 0; - psta->bpairwise_key_installed = _FALSE; + psta->bpairwise_key_installed = false; #ifdef CONFIG_RTW_80211R - psta->ft_pairwise_key_installed = _FALSE; + psta->ft_pairwise_key_installed = false; #endif #ifdef CONFIG_NATIVEAP_MLME @@ -362,7 +362,7 @@ void rtw_mfree_all_stainfo(struct sta_priv *pstapriv) 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); @@ -408,7 +408,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv) 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); plist = get_next(plist); @@ -458,7 +458,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr) /* _enter_critical_bh(&(pfree_sta_queue->lock), &irqL); */ _enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL2); - if (_rtw_queue_empty(pfree_sta_queue) == _TRUE) { + if (_rtw_queue_empty(pfree_sta_queue) == true) { psta = NULL; goto exit; } @@ -517,7 +517,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr) preorder_ctrl->padapter = pstapriv->padapter; - preorder_ctrl->enable = _FALSE; + preorder_ctrl->enable = false; preorder_ctrl->indicate_seq = 0xffff; #ifdef DBG_RX_SEQ @@ -543,7 +543,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr) #endif /* init for the sequence number of received management frame */ psta->RxMgmtFrameSeqNum = 0xffff; - psta->ra_rpt_linked = _FALSE; + psta->ra_rpt_linked = false; rtw_alloc_macid(pstapriv->padapter, psta); @@ -568,14 +568,14 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta) struct sta_priv *pstapriv = &padapter->stapriv; struct hw_xmit *phwxmit; int pending_qcnt[4]; - u8 is_pre_link_sta = _FALSE; + u8 is_pre_link_sta = false; if (psta == NULL) goto exit; is_pre_link_sta = rtw_is_pre_link_sta(pstapriv, psta->hwaddr); - if (is_pre_link_sta == _FALSE) { + if (is_pre_link_sta == false) { _enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL0); rtw_list_delete(&psta->hash_list); pstapriv->asoc_sta_count--; @@ -697,12 +697,12 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta) } - if (!((psta->state & WIFI_AP_STATE) || MacAddr_isBcst(psta->hwaddr)) && is_pre_link_sta == _FALSE) - rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, _FALSE); + if (!((psta->state & WIFI_AP_STATE) || MacAddr_isBcst(psta->hwaddr)) && is_pre_link_sta == false) + rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, false); /* release mac id for non-bc/mc station, */ - if (is_pre_link_sta == _FALSE) + if (is_pre_link_sta == false) rtw_release_macid(pstapriv->padapter, psta); #ifdef CONFIG_AP_MODE @@ -756,7 +756,7 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta) rtw_st_ctl_deinit(&psta->st_ctl); - if (is_pre_link_sta == _FALSE) { + if (is_pre_link_sta == false) { _rtw_spinlock_free(&psta->lock); /* _enter_critical_bh(&(pfree_sta_queue->lock), &irqL0); */ @@ -793,13 +793,13 @@ void rtw_free_all_stainfo(_adapter *padapter) 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); plist = get_next(plist); if (pbcmc_stainfo != psta) { - if (rtw_is_pre_link_sta(pstapriv, psta->hwaddr) == _FALSE) + if (rtw_is_pre_link_sta(pstapriv, psta->hwaddr) == false) rtw_list_delete(&psta->hash_list); stainfo_offset = rtw_stainfo_offset(pstapriv, psta); @@ -855,11 +855,11 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr) 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; } @@ -930,11 +930,11 @@ const char *const _acl_mode_str[] = { u8 rtw_access_ctrl(_adapter *adapter, u8 *mac_addr) { - u8 res = _TRUE; + u8 res = true; unsigned long irqL; _list *list, *head; struct rtw_wlan_acl_node *acl_node; - u8 match = _FALSE; + u8 match = false; struct sta_priv *stapriv = &adapter->stapriv; struct wlan_acl_pool *acl = &stapriv->acl_list; _queue *acl_node_q = &acl->acl_node_q; @@ -942,13 +942,13 @@ u8 rtw_access_ctrl(_adapter *adapter, u8 *mac_addr) _enter_critical_bh(&(acl_node_q->lock), &irqL); head = get_list_head(acl_node_q); list = get_next(head); - while (rtw_end_of_queue_search(head, list) == _FALSE) { + while (rtw_end_of_queue_search(head, list) == false) { acl_node = LIST_CONTAINOR(list, struct rtw_wlan_acl_node, list); list = get_next(list); if (_rtw_memcmp(acl_node->addr, mac_addr, ETH_ALEN)) { - if (acl_node->valid == _TRUE) { - match = _TRUE; + if (acl_node->valid == true) { + match = true; break; } } @@ -956,11 +956,11 @@ u8 rtw_access_ctrl(_adapter *adapter, u8 *mac_addr) _exit_critical_bh(&(acl_node_q->lock), &irqL); if (acl->mode == RTW_ACL_MODE_ACCEPT_UNLESS_LISTED) - res = (match == _TRUE) ? _FALSE : _TRUE; + res = (match == true) ? false : true; else if (acl->mode == RTW_ACL_MODE_DENY_UNLESS_LISTED) - res = (match == _TRUE) ? _TRUE : _FALSE; + res = (match == true) ? true : false; else - res = _TRUE; + res = true; return res; } @@ -974,7 +974,7 @@ void dump_macaddr_acl(void *sel, _adapter *adapter) RTW_PRINT_SEL(sel, "mode:%s(%d)\n", acl_mode_str(acl->mode), acl->mode); RTW_PRINT_SEL(sel, "num:%d/%d\n", acl->num, NUM_ACL); for (i = 0; i < NUM_ACL; i++) { - if (acl->aclnode[i].valid == _FALSE) + if (acl->aclnode[i].valid == false) continue; RTW_PRINT_SEL(sel, MAC_FMT"\n", MAC_ARG(acl->aclnode[i].addr)); } @@ -986,16 +986,16 @@ bool rtw_is_pre_link_sta(struct sta_priv *stapriv, u8 *addr) #if CONFIG_RTW_PRE_LINK_STA struct pre_link_sta_ctl_t *pre_link_sta_ctl = &stapriv->pre_link_sta_ctl; struct sta_info *sta = NULL; - u8 exist = _FALSE; + u8 exist = false; int i; unsigned long irqL; _enter_critical_bh(&(pre_link_sta_ctl->lock), &irqL); for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) { - if (pre_link_sta_ctl->node[i].valid == _TRUE - && _rtw_memcmp(pre_link_sta_ctl->node[i].addr, addr, ETH_ALEN) == _TRUE + if (pre_link_sta_ctl->node[i].valid == true + && _rtw_memcmp(pre_link_sta_ctl->node[i].addr, addr, ETH_ALEN) == true ) { - exist = _TRUE; + exist = true; break; } } @@ -1003,7 +1003,7 @@ bool rtw_is_pre_link_sta(struct sta_priv *stapriv, u8 *addr) return exist; #else - return _FALSE; + return false; #endif } @@ -1013,30 +1013,30 @@ struct sta_info *rtw_pre_link_sta_add(struct sta_priv *stapriv, u8 *hwaddr) struct pre_link_sta_ctl_t *pre_link_sta_ctl = &stapriv->pre_link_sta_ctl; struct pre_link_sta_node_t *node = NULL; struct sta_info *sta = NULL; - u8 exist = _FALSE; + u8 exist = false; int i; unsigned long irqL; - if (rtw_check_invalid_mac_address(hwaddr, _FALSE) == _TRUE) + if (rtw_check_invalid_mac_address(hwaddr, false) == true) goto exit; _enter_critical_bh(&(pre_link_sta_ctl->lock), &irqL); for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) { - if (pre_link_sta_ctl->node[i].valid == _TRUE - && _rtw_memcmp(pre_link_sta_ctl->node[i].addr, hwaddr, ETH_ALEN) == _TRUE + if (pre_link_sta_ctl->node[i].valid == true + && _rtw_memcmp(pre_link_sta_ctl->node[i].addr, hwaddr, ETH_ALEN) == true ) { node = &pre_link_sta_ctl->node[i]; - exist = _TRUE; + exist = true; break; } - if (node == NULL && pre_link_sta_ctl->node[i].valid == _FALSE) + if (node == NULL && pre_link_sta_ctl->node[i].valid == false) node = &pre_link_sta_ctl->node[i]; } - if (exist == _FALSE && node) { + if (exist == false && node) { _rtw_memcpy(node->addr, hwaddr, ETH_ALEN); - node->valid = _TRUE; + node->valid = true; pre_link_sta_ctl->num++; } _exit_critical_bh(&(pre_link_sta_ctl->lock), &irqL); @@ -1055,7 +1055,7 @@ struct sta_info *rtw_pre_link_sta_add(struct sta_priv *stapriv, u8 *hwaddr) sta->state = WIFI_FW_PRE_LINK; odm_hook: - rtw_hal_set_odm_var(stapriv->padapter, HAL_ODM_STA_INFO, sta, _TRUE); + rtw_hal_set_odm_var(stapriv->padapter, HAL_ODM_STA_INFO, sta, true); exit: return sta; @@ -1066,31 +1066,31 @@ void rtw_pre_link_sta_del(struct sta_priv *stapriv, u8 *hwaddr) struct pre_link_sta_ctl_t *pre_link_sta_ctl = &stapriv->pre_link_sta_ctl; struct pre_link_sta_node_t *node = NULL; struct sta_info *sta = NULL; - u8 exist = _FALSE; + u8 exist = false; int i; unsigned long irqL; - if (rtw_check_invalid_mac_address(hwaddr, _FALSE) == _TRUE) + if (rtw_check_invalid_mac_address(hwaddr, false) == true) goto exit; _enter_critical_bh(&(pre_link_sta_ctl->lock), &irqL); for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) { - if (pre_link_sta_ctl->node[i].valid == _TRUE - && _rtw_memcmp(pre_link_sta_ctl->node[i].addr, hwaddr, ETH_ALEN) == _TRUE + if (pre_link_sta_ctl->node[i].valid == true + && _rtw_memcmp(pre_link_sta_ctl->node[i].addr, hwaddr, ETH_ALEN) == true ) { node = &pre_link_sta_ctl->node[i]; - exist = _TRUE; + exist = true; break; } } - if (exist == _TRUE && node) { - node->valid = _FALSE; + if (exist == true && node) { + node->valid = false; pre_link_sta_ctl->num--; } _exit_critical_bh(&(pre_link_sta_ctl->lock), &irqL); - if (exist == _FALSE) + if (exist == false) goto exit; sta = rtw_get_stainfo(stapriv, hwaddr); @@ -1118,10 +1118,10 @@ void rtw_pre_link_sta_ctl_reset(struct sta_priv *stapriv) _enter_critical_bh(&(pre_link_sta_ctl->lock), &irqL); for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) { - if (pre_link_sta_ctl->node[i].valid == _FALSE) + if (pre_link_sta_ctl->node[i].valid == false) continue; _rtw_memcpy(&(addrs[j][0]), pre_link_sta_ctl->node[i].addr, ETH_ALEN); - pre_link_sta_ctl->node[i].valid = _FALSE; + pre_link_sta_ctl->node[i].valid = false; pre_link_sta_ctl->num--; j++; } @@ -1145,7 +1145,7 @@ void rtw_pre_link_sta_ctl_init(struct sta_priv *stapriv) spin_lock_init(&pre_link_sta_ctl->lock); pre_link_sta_ctl->num = 0; for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) - pre_link_sta_ctl->node[i].valid = _FALSE; + pre_link_sta_ctl->node[i].valid = false; } void rtw_pre_link_sta_ctl_deinit(struct sta_priv *stapriv) @@ -1166,7 +1166,7 @@ void dump_pre_link_sta_ctl(void *sel, struct sta_priv *stapriv) RTW_PRINT_SEL(sel, "num:%d/%d\n", pre_link_sta_ctl->num, RTW_PRE_LINK_STA_NUM); for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) { - if (pre_link_sta_ctl->node[i].valid == _FALSE) + if (pre_link_sta_ctl->node[i].valid == false) continue; RTW_PRINT_SEL(sel, MAC_FMT"\n", MAC_ARG(pre_link_sta_ctl->node[i].addr)); } diff --git a/core/rtw_tdls.c b/core/rtw_tdls.c index 424edc1..02eabee 100644 --- a/core/rtw_tdls.c +++ b/core/rtw_tdls.c @@ -33,31 +33,31 @@ void rtw_reset_tdls_info(_adapter *padapter) { struct tdls_info *ptdlsinfo = &padapter->tdlsinfo; - ptdlsinfo->ap_prohibited = _FALSE; + ptdlsinfo->ap_prohibited = false; /* For TDLS channel switch, currently we only allow it to work in wifi logo test mode */ if (padapter->registrypriv.wifi_spec == 1) - ptdlsinfo->ch_switch_prohibited = _FALSE; + ptdlsinfo->ch_switch_prohibited = false; else - ptdlsinfo->ch_switch_prohibited = _TRUE; + ptdlsinfo->ch_switch_prohibited = true; - ptdlsinfo->link_established = _FALSE; + ptdlsinfo->link_established = false; ptdlsinfo->sta_cnt = 0; - ptdlsinfo->sta_maximum = _FALSE; + ptdlsinfo->sta_maximum = false; #ifdef CONFIG_TDLS_CH_SW ptdlsinfo->chsw_info.ch_sw_state = TDLS_STATE_NONE; - ATOMIC_SET(&ptdlsinfo->chsw_info.chsw_on, _FALSE); + ATOMIC_SET(&ptdlsinfo->chsw_info.chsw_on, false); ptdlsinfo->chsw_info.off_ch_num = 0; ptdlsinfo->chsw_info.ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE; ptdlsinfo->chsw_info.cur_time = 0; - ptdlsinfo->chsw_info.delay_switch_back = _FALSE; - ptdlsinfo->chsw_info.dump_stack = _FALSE; + ptdlsinfo->chsw_info.delay_switch_back = false; + ptdlsinfo->chsw_info.dump_stack = false; #endif ptdlsinfo->ch_sensing = 0; ptdlsinfo->watchdog_count = 0; - ptdlsinfo->dev_discovered = _FALSE; + ptdlsinfo->dev_discovered = false; #ifdef CONFIG_WFD ptdlsinfo->wfd_info = &padapter->wfd_info; @@ -71,11 +71,11 @@ int rtw_init_tdls_info(_adapter *padapter) rtw_reset_tdls_info(padapter); - ptdlsinfo->tdls_enable = _TRUE; + ptdlsinfo->tdls_enable = true; #ifdef CONFIG_TDLS_DRIVER_SETUP - ptdlsinfo->driver_setup = _TRUE; + ptdlsinfo->driver_setup = true; #else - ptdlsinfo->driver_setup = _FALSE; + ptdlsinfo->driver_setup = false; #endif /* CONFIG_TDLS_DRIVER_SETUP */ spin_lock_init(&ptdlsinfo->cmd_lock); @@ -99,13 +99,13 @@ int check_ap_tdls_prohibited(u8 *pframe, u8 pkt_len) u8 tdls_prohibited_bit = 0x40; /* bit(38); TDLS_prohibited */ if (pkt_len < 5) - return _FALSE; + return false; pframe += 4; if ((*pframe) & tdls_prohibited_bit) - return _TRUE; + return true; - return _FALSE; + return false; } int check_ap_tdls_ch_switching_prohibited(u8 *pframe, u8 pkt_len) @@ -113,23 +113,23 @@ int check_ap_tdls_ch_switching_prohibited(u8 *pframe, u8 pkt_len) u8 tdls_ch_swithcing_prohibited_bit = 0x80; /* bit(39); TDLS_channel_switching prohibited */ if (pkt_len < 5) - return _FALSE; + return false; pframe += 4; if ((*pframe) & tdls_ch_swithcing_prohibited_bit) - return _TRUE; + return true; - return _FALSE; + return false; } u8 rtw_tdls_is_setup_allowed(_adapter *padapter) { struct tdls_info *ptdlsinfo = &padapter->tdlsinfo; - if (ptdlsinfo->ap_prohibited == _TRUE) - return _FALSE; + if (ptdlsinfo->ap_prohibited == true) + return false; - return _TRUE; + return true; } #ifdef CONFIG_TDLS_CH_SW @@ -137,13 +137,13 @@ u8 rtw_tdls_is_chsw_allowed(_adapter *padapter) { struct tdls_info *ptdlsinfo = &padapter->tdlsinfo; - if (ptdlsinfo->ch_switch_prohibited == _TRUE) - return _FALSE; + if (ptdlsinfo->ch_switch_prohibited == true) + return false; if (padapter->registrypriv.wifi_spec == 0) - return _FALSE; + return false; - return _TRUE; + return true; } #endif @@ -167,11 +167,11 @@ int _issue_nulldata_to_TDLS_peer_STA(_adapter *padapter, unsigned char *da, unsi update_mgntframe_attrib(padapter, pattrib); pattrib->hdrlen += 2; - pattrib->qos_en = _TRUE; + pattrib->qos_en = true; pattrib->eosp = 1; pattrib->ack_policy = 0; pattrib->mdata = 0; - pattrib->retry_ctrl = _FALSE; + pattrib->retry_ctrl = false; memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); @@ -231,7 +231,7 @@ int issue_nulldata_to_TDLS_peer_STA(_adapter *padapter, unsigned char *da, unsig struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); do { - ret = _issue_nulldata_to_TDLS_peer_STA(padapter, da, power_mode, wait_ms > 0 ? _TRUE : _FALSE); + ret = _issue_nulldata_to_TDLS_peer_STA(padapter, da, power_mode, wait_ms > 0 ? true : false); i++; @@ -277,16 +277,16 @@ void free_tdls_sta(_adapter *padapter, struct sta_info *ptdls_sta) _exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL); /* -2: AP + BC/MC sta, -4: default key */ if (ptdlsinfo->sta_cnt < MAX_ALLOWED_TDLS_STA_NUM) { - ptdlsinfo->sta_maximum = _FALSE; + ptdlsinfo->sta_maximum = false; memset(&ptdlsinfo->ss_record, 0x00, sizeof(struct tdls_ss_record)); } /* clear cam */ - rtw_clearstakey_cmd(padapter, ptdls_sta, _TRUE); + rtw_clearstakey_cmd(padapter, ptdls_sta, true); if (ptdlsinfo->sta_cnt == 0) { rtw_tdls_cmd(padapter, NULL, TDLS_RS_RCR); - ptdlsinfo->link_established = _FALSE; + ptdlsinfo->link_established = false; } else RTW_INFO("Remain tdls sta:%02x\n", ptdlsinfo->sta_cnt); @@ -299,7 +299,7 @@ void free_tdls_sta(_adapter *padapter, struct sta_info *ptdls_sta) void rtw_tdls_set_key(_adapter *padapter, struct sta_info *ptdls_sta) { ptdls_sta->dot118021XPrivacy = _AES_; - rtw_setstakey_cmd(padapter, ptdls_sta, TDLS_KEY, _TRUE); + rtw_setstakey_cmd(padapter, ptdls_sta, TDLS_KEY, true); } void rtw_tdls_process_ht_cap(_adapter *padapter, struct sta_info *ptdls_sta, u8 *data, u8 Length) @@ -322,12 +322,12 @@ void rtw_tdls_process_ht_cap(_adapter *padapter, struct sta_info *ptdls_sta, u8 ptdls_sta->flags &= ~WLAN_STA_HT; if (ptdls_sta->flags & WLAN_STA_HT) { - if (padapter->registrypriv.ht_enable == _TRUE) { - ptdls_sta->htpriv.ht_option = _TRUE; - ptdls_sta->qos_option = _TRUE; + if (padapter->registrypriv.ht_enable == true) { + ptdls_sta->htpriv.ht_option = true; + ptdls_sta->qos_option = true; } else { - ptdls_sta->htpriv.ht_option = _FALSE; - ptdls_sta->qos_option = _FALSE; + ptdls_sta->htpriv.ht_option = false; + ptdls_sta->qos_option = false; } } @@ -335,7 +335,7 @@ void rtw_tdls_process_ht_cap(_adapter *padapter, struct sta_info *ptdls_sta, u8 if (ptdls_sta->htpriv.ht_option) { /* Check if sta supports rx ampdu */ if (padapter->registrypriv.ampdu_enable == 1) - ptdls_sta->htpriv.ampdu_enable = _TRUE; + ptdls_sta->htpriv.ampdu_enable = true; /* AMPDU Parameters field */ /* Get MIN of MAX AMPDU Length Exp */ @@ -352,11 +352,11 @@ void rtw_tdls_process_ht_cap(_adapter *padapter, struct sta_info *ptdls_sta, u8 /* Check if sta support s Short GI 20M */ if (ptdls_sta->htpriv.ht_cap.cap_info & cpu_to_le16(IEEE80211_HT_CAP_SGI_20)) - ptdls_sta->htpriv.sgi_20m = _TRUE; + ptdls_sta->htpriv.sgi_20m = true; /* Check if sta support s Short GI 40M */ if (ptdls_sta->htpriv.ht_cap.cap_info & cpu_to_le16(IEEE80211_HT_CAP_SGI_40)) - ptdls_sta->htpriv.sgi_40m = _TRUE; + ptdls_sta->htpriv.sgi_40m = true; /* Bwmode would still followed AP's setting */ if (ptdls_sta->htpriv.ht_cap.cap_info & cpu_to_le16(IEEE80211_HT_CAP_SUP_WIDTH)) { @@ -433,7 +433,7 @@ u8 *rtw_tdls_set_rsnie(struct tdls_txmgmt *ptxmgmt, u8 *pframe, struct pkt_attri if (p != NULL) return rtw_set_ie(pframe, _RSN_IE_2_, len, p + 2, &(pattrib->pktlen)); - else if (init == _TRUE) + else if (init == true) return rtw_set_ie(pframe, _RSN_IE_2_, sizeof(TDLS_RSNIE), TDLS_RSNIE, &(pattrib->pktlen)); else return rtw_set_ie(pframe, _RSN_IE_2_, sizeof(ptdls_sta->TDLS_RSNIE), ptdls_sta->TDLS_RSNIE, &(pattrib->pktlen)); @@ -484,7 +484,7 @@ u8 *rtw_tdls_set_timeout_interval(struct tdls_txmgmt *ptxmgmt, u8 *pframe, struc else { /* Timeout interval */ timeout_itvl[0] = 0x02; - if (init == _TRUE) + if (init == true) _rtw_memcpy(timeout_itvl + 1, &timeout_interval, 4); else _rtw_memcpy(timeout_itvl + 1, (u8 *)(&ptdls_sta->TDLS_PeerKey_Lifetime), 4); @@ -587,7 +587,7 @@ u8 *rtw_tdls_set_sup_reg_class(u8 *pframe, struct pkt_attrib *pattrib) u8 *rtw_tdls_set_linkid(u8 *pframe, struct pkt_attrib *pattrib, u8 init) { u8 link_id_addr[18] = {0}; - if (init == _TRUE) { + if (init == true) { _rtw_memcpy(link_id_addr, pattrib->ra, 6); _rtw_memcpy((link_id_addr + 6), pattrib->src, 6); _rtw_memcpy((link_id_addr + 12), pattrib->dst, 6); @@ -629,7 +629,7 @@ void rtw_tdls_set_ch_sw_oper_control(_adapter *padapter, u8 enable) ATOMIC_SET(&padapter->tdlsinfo.chsw_info.chsw_on, enable); rtw_hal_set_hwreg(padapter, HW_VAR_TDLS_BCN_EARLY_C2H_RPT, &enable); - RTW_INFO("[TDLS] %s Bcn Early C2H Report\n", (enable == _TRUE) ? "Start" : "Stop"); + RTW_INFO("[TDLS] %s Bcn Early C2H Report\n", (enable == true) ? "Start" : "Stop"); } void rtw_tdls_ch_sw_back_to_base_chnl(_adapter *padapter) @@ -639,7 +639,7 @@ void rtw_tdls_ch_sw_back_to_base_chnl(_adapter *padapter) pmlmepriv = &padapter->mlmepriv; - if ((ATOMIC_READ(&pchsw_info->chsw_on) == _TRUE) && + if ((ATOMIC_READ(&pchsw_info->chsw_on) == true) && (padapter->mlmeextpriv.cur_channel != rtw_get_oper_ch(padapter))) rtw_tdls_cmd(padapter, pchsw_info->addr, TDLS_CH_SW_TO_BASE_CHNL_UNSOLICITED); } @@ -711,7 +711,7 @@ s32 rtw_tdls_do_ch_sw(_adapter *padapter, struct sta_info *ptdls_sta, u8 chnl_ty _exit_critical_mutex(&(adapter_to_dvobj(padapter)->setch_mutex), NULL); rtw_hal_get_hwreg(padapter, HW_VAR_CH_SW_NEED_TO_TAKE_CARE_IQK_INFO, &take_care_iqk); - if (take_care_iqk == _TRUE) + if (take_care_iqk == true) rtw_hal_ch_sw_iqk_info_restore(padapter, CH_SW_USE_CASE_TDLS); ch_sw_time_spent = rtw_systime_to_ms(rtw_get_current_time()) - ch_sw_time_start; @@ -746,7 +746,7 @@ u8 *rtw_tdls_set_wmm_params(_adapter *padapter, u8 *pframe, struct pkt_attrib *p if (&pmlmeinfo->WMM_param) { _rtw_memcpy(wmm_param_ele, WMM_PARA_OUI, 6); - if (_rtw_memcmp(&pmlmeinfo->WMM_param, &wmm_param_ele[6], 18) == _TRUE) + if (_rtw_memcmp(&pmlmeinfo->WMM_param, &wmm_param_ele[6], 18) == true) /* Use default WMM Param */ _rtw_memcpy(wmm_param_ele + 6, (u8 *)&TDLS_WMM_PARAM_IE, sizeof(TDLS_WMM_PARAM_IE)); else @@ -895,7 +895,7 @@ int issue_tdls_setup_req(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, int wa RTW_INFO("[TDLS] %s\n", __func__); ptxmgmt->action_code = TDLS_SETUP_REQUEST; - if (rtw_tdls_is_setup_allowed(padapter) == _FALSE) + if (rtw_tdls_is_setup_allowed(padapter) == false) goto exit; pmgntframe = alloc_mgtxmitframe(pxmitpriv); @@ -929,11 +929,11 @@ int issue_tdls_setup_req(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, int wa ptdlsinfo->sta_cnt++; if (ptdlsinfo->sta_cnt == MAX_ALLOWED_TDLS_STA_NUM) - ptdlsinfo->sta_maximum = _TRUE; + ptdlsinfo->sta_maximum = true; ptdls_sta->tdls_sta_state |= TDLS_RESPONDER_STATE; - if (rtw_tdls_is_driver_setup(padapter) == _TRUE) { + if (rtw_tdls_is_driver_setup(padapter) == true) { ptdls_sta->TDLS_PeerKey_Lifetime = timeout_interval; _set_timer(&ptdls_sta->handshake_timer, TDLS_HANDSHAKE_TIME); } @@ -983,7 +983,7 @@ int _issue_tdls_teardown(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, u8 wai goto exit; rtw_mi_set_scan_deny(padapter, 550); - rtw_mi_scan_abort(padapter, _TRUE); + rtw_mi_scan_abort(padapter, true); pattrib = &pmgntframe->attrib; @@ -1003,7 +1003,7 @@ int _issue_tdls_teardown(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, u8 wai goto exit; } - if (rtw_tdls_is_driver_setup(padapter) == _TRUE) + if (rtw_tdls_is_driver_setup(padapter) == true) if (ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE) if (pattrib->encrypt) _cancel_timer_ex(&ptdls_sta->TPK_timer); @@ -1316,7 +1316,7 @@ int issue_tdls_ch_switch_req(_adapter *padapter, struct sta_info *ptdls_sta) RTW_INFO("[TDLS] %s\n", __func__); - if (rtw_tdls_is_chsw_allowed(padapter) == _FALSE) { + if (rtw_tdls_is_chsw_allowed(padapter) == false) { RTW_INFO("[TDLS] Ignore %s since channel switch is not allowed\n", __func__); goto exit; } @@ -1363,7 +1363,7 @@ int issue_tdls_ch_switch_rsp(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, in RTW_INFO("[TDLS] %s\n", __func__); - if (rtw_tdls_is_chsw_allowed(padapter) == _FALSE) { + if (rtw_tdls_is_chsw_allowed(padapter) == false) { RTW_INFO("[TDLS] Ignore %s since channel switch is not allowed\n", __func__); goto exit; } @@ -1388,9 +1388,9 @@ int issue_tdls_ch_switch_rsp(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, in 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, ptxmgmt) != _SUCCESS) { @@ -1425,7 +1425,7 @@ int On_TDLS_Dis_Rsp(_adapter *padapter, union recv_frame *precv_frame) memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt)); /* WFDTDLS: for sigma test, not to setup direct link automatically */ - ptdlsinfo->dev_discovered = _TRUE; + ptdlsinfo->dev_discovered = true; psa = get_sa(ptr); ptdls_sta = rtw_get_stainfo(&(padapter->stapriv), psa); @@ -1435,7 +1435,7 @@ int On_TDLS_Dis_Rsp(_adapter *padapter, union recv_frame *precv_frame) #ifdef CONFIG_TDLS_AUTOSETUP if (ptdls_sta != NULL) { /* 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)) { _rtw_memcpy(ptdlsinfo->ss_record.macaddr, psa, ETH_ALEN); ptdlsinfo->ss_record.RxPWDBAll = pattrib->phy_info.RxPWDBAll; @@ -1447,7 +1447,7 @@ int On_TDLS_Dis_Rsp(_adapter *padapter, 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)) { /* All traffics are busy, do not set up another direct link. */ ret = _FAIL; @@ -1455,7 +1455,7 @@ int On_TDLS_Dis_Rsp(_adapter *padapter, union recv_frame *precv_frame) } else { if (pattrib->phy_info.RxPWDBAll > ptdlsinfo->ss_record.RxPWDBAll) { _rtw_memcpy(txmgmt.peer, ptdlsinfo->ss_record.macaddr, ETH_ALEN); - /* issue_tdls_teardown(padapter, ptdlsinfo->ss_record.macaddr, _FALSE); */ + /* issue_tdls_teardown(padapter, ptdlsinfo->ss_record.macaddr, false); */ } else { ret = _FAIL; goto exit; @@ -1468,7 +1468,7 @@ int On_TDLS_Dis_Rsp(_adapter *padapter, union recv_frame *precv_frame) if (pattrib->phy_info.RxPWDBAll + TDLS_SIGNAL_THRESH >= undecorated_smoothed_pwdb) { RTW_INFO("pattrib->RxPWDBAll=%d, pdmpriv->undecorated_smoothed_pwdb=%d\n", pattrib->phy_info.RxPWDBAll, undecorated_smoothed_pwdb); _rtw_memcpy(txmgmt.peer, psa, ETH_ALEN); - issue_tdls_setup_req(padapter, &txmgmt, _FALSE); + issue_tdls_setup_req(padapter, &txmgmt, false); } } #endif /* CONFIG_TDLS_AUTOSETUP */ @@ -1502,7 +1502,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame) int supportRateNum = 0; struct tdls_txmgmt txmgmt; - if (rtw_tdls_is_setup_allowed(padapter) == _FALSE) + if (rtw_tdls_is_setup_allowed(padapter) == false) goto exit; memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt)); @@ -1581,7 +1581,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame) _rtw_memcpy(ptdls_sta->TDLS_RSNIE, pIE->data, pIE->Length); pairwise_count = *(u16 *)(ppairwise_cipher - 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) ccmp_included = 1; } @@ -1609,7 +1609,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, 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) txmgmt.status_code = _STATS_NOT_IN_SAME_BSS_; break; default: @@ -1654,7 +1654,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame) ptdlsinfo->sta_cnt++; /* -2: AP + BC/MC sta, -4: default key */ if (ptdlsinfo->sta_cnt == MAX_ALLOWED_TDLS_STA_NUM) - ptdlsinfo->sta_maximum = _TRUE; + ptdlsinfo->sta_maximum = true; #ifdef CONFIG_WFD rtw_tdls_process_wfd_ie(ptdlsinfo, ptr + FIXED_IE, parsing_length); @@ -1759,16 +1759,16 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, 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_: break; case _VENDOR_SPECIFIC_IE_: - if (_rtw_memcmp((u8 *)pIE + 2, WMM_INFO_OUI, 6) == _TRUE) { + if (_rtw_memcmp((u8 *)pIE + 2, WMM_INFO_OUI, 6) == true) { /* WMM Info ID and OUI */ - if ((pregistrypriv->wmm_enable == _TRUE) || (padapter->mlmepriv.htpriv.ht_option == _TRUE)) - ptdls_sta->qos_option = _TRUE; + if ((pregistrypriv->wmm_enable == true) || (padapter->mlmepriv.htpriv.ht_option == true)) + ptdls_sta->qos_option = true; } break; case _FTIE_: @@ -1811,7 +1811,7 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame) if (prx_pkt_attrib->encrypt) { if (verify_ccmp == 1) { txmgmt.status_code = _STATS_SUCCESSFUL_; - if (rtw_tdls_is_driver_setup(padapter) == _TRUE) { + if (rtw_tdls_is_driver_setup(padapter) == true) { wpa_tdls_generate_tpk(padapter, ptdls_sta); if (tdls_verify_mic(ptdls_sta->tpk.kck, 2, plinkid_ie, prsnie, ptimeout_ie, pftie) == _FAIL) { RTW_INFO("[TDLS] %s tdls_verify_mic fail, free_tdls_sta\n", __func__); @@ -1828,12 +1828,12 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame) txmgmt.status_code = _STATS_SUCCESSFUL_; } - if (rtw_tdls_is_driver_setup(padapter) == _TRUE) { + if (rtw_tdls_is_driver_setup(padapter) == true) { _rtw_memcpy(txmgmt.peer, prx_pkt_attrib->src, ETH_ALEN); issue_tdls_setup_cfm(padapter, &txmgmt); if (txmgmt.status_code == _STATS_SUCCESSFUL_) { - ptdlsinfo->link_established = _TRUE; + ptdlsinfo->link_established = true; if (ptdls_sta->tdls_sta_state & TDLS_RESPONDER_STATE) { ptdls_sta->tdls_sta_state |= TDLS_LINKED_STATE; @@ -1850,7 +1850,7 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame) } exit: - if (rtw_tdls_is_driver_setup(padapter) == _TRUE) + if (rtw_tdls_is_driver_setup(padapter) == true) return ret; else return _SUCCESS; @@ -1912,9 +1912,9 @@ int On_TDLS_Setup_Cfm(_adapter *padapter, union recv_frame *precv_frame) prsnie = (u8 *)pIE; break; case _VENDOR_SPECIFIC_IE_: - if (_rtw_memcmp((u8 *)pIE + 2, WMM_PARA_OUI, 6) == _TRUE) { + if (_rtw_memcmp((u8 *)pIE + 2, WMM_PARA_OUI, 6) == true) { /* WMM Parameter ID and OUI */ - ptdls_sta->qos_option = _TRUE; + ptdls_sta->qos_option = true; } break; case _FTIE_: @@ -1947,7 +1947,7 @@ int On_TDLS_Setup_Cfm(_adapter *padapter, union recv_frame *precv_frame) } if (rtw_tdls_is_driver_setup(padapter)) { - ptdlsinfo->link_established = _TRUE; + ptdlsinfo->link_established = true; if (ptdls_sta->tdls_sta_state & TDLS_INITIATOR_STATE) { ptdls_sta->tdls_sta_state |= TDLS_LINKED_STATE; @@ -1984,7 +1984,7 @@ int On_TDLS_Dis_Req(_adapter *padapter, union recv_frame *precv_frame) struct tdls_txmgmt txmgmt; int ret = _SUCCESS; - if (rtw_tdls_is_driver_setup(padapter) == _FALSE) + if (rtw_tdls_is_driver_setup(padapter) == false) goto exit; memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt)); @@ -2012,7 +2012,7 @@ int On_TDLS_Dis_Req(_adapter *padapter, union recv_frame *precv_frame) if (psta_ap == NULL) goto exit; dst = pIE->data + 12; - if (MacAddr_isBcst(dst) == _FALSE && (_rtw_memcmp(adapter_mac_addr(padapter), dst, 6) == _FALSE)) + if (MacAddr_isBcst(dst) == false && (_rtw_memcmp(adapter_mac_addr(padapter), dst, 6) == false)) goto exit; break; default: @@ -2112,7 +2112,7 @@ int On_TDLS_Peer_Traffic_Rsp(_adapter *padapter, 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); rtw_list_delete(&pxmitframe->list); @@ -2166,7 +2166,7 @@ sint On_TDLS_Ch_Switch_Req(_adapter *padapter, union recv_frame *precv_frame) u16 switch_time = TDLS_CH_SWITCH_TIME * 1000, switch_timeout = TDLS_CH_SWITCH_TIMEOUT * 1000; u8 take_care_iqk; - if (rtw_tdls_is_chsw_allowed(padapter) == _FALSE) { + if (rtw_tdls_is_chsw_allowed(padapter) == false) { RTW_INFO("[TDLS] Ignore %s since channel switch is not allowed\n", __func__); return _FAIL; } @@ -2199,7 +2199,7 @@ sint On_TDLS_Ch_Switch_Req(_adapter *padapter, union recv_frame *precv_frame) pchsw_info->off_ch_num = 44; if (pchsw_info->off_ch_num != pmlmeext->cur_channel) - pchsw_info->delay_switch_back = _FALSE; + pchsw_info->delay_switch_back = false; /* Parsing information element */ for (j = FIXED_IE; j < parsing_length;) { @@ -2238,7 +2238,7 @@ sint On_TDLS_Ch_Switch_Req(_adapter *padapter, union recv_frame *precv_frame) } rtw_hal_get_hwreg(padapter, HW_VAR_CH_SW_NEED_TO_TAKE_CARE_IQK_INFO, &take_care_iqk); - if (take_care_iqk == _TRUE) { + if (take_care_iqk == true) { u8 central_chnl; u8 bw_mode; @@ -2260,10 +2260,10 @@ sint On_TDLS_Ch_Switch_Req(_adapter *padapter, union recv_frame *precv_frame) txmgmt.status_code = 0; _rtw_memcpy(txmgmt.peer, psa, ETH_ALEN); - if (_rtw_memcmp(pchsw_info->addr, zaddr, ETH_ALEN) == _TRUE) + if (_rtw_memcmp(pchsw_info->addr, zaddr, ETH_ALEN) == true) _rtw_memcpy(pchsw_info->addr, ptdls_sta->hwaddr, ETH_ALEN); - if (ATOMIC_READ(&pchsw_info->chsw_on) == _FALSE) + if (ATOMIC_READ(&pchsw_info->chsw_on) == false) rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_CH_SW_START); rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_CH_SW_RESP); @@ -2286,7 +2286,7 @@ sint On_TDLS_Ch_Switch_Rsp(_adapter *padapter, union recv_frame *precv_frame) struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; int ret = _SUCCESS; - if (rtw_tdls_is_chsw_allowed(padapter) == _FALSE) { + if (rtw_tdls_is_chsw_allowed(padapter) == false) { RTW_INFO("[TDLS] Ignore %s since channel switch is not allowed\n", __func__); return _SUCCESS; } @@ -2301,7 +2301,7 @@ sint On_TDLS_Ch_Switch_Rsp(_adapter *padapter, union recv_frame *precv_frame) /* If we receive Unsolicited TDLS Channel Switch Response when channel switch is running, */ /* we will go back to base channel and terminate this channel switch procedure */ - if (ATOMIC_READ(&pchsw_info->chsw_on) == _TRUE) { + if (ATOMIC_READ(&pchsw_info->chsw_on) == true) { if (pmlmeext->cur_channel != rtw_get_oper_ch(padapter)) { RTW_INFO("[TDLS] Rx unsolicited channel switch response\n"); rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_CH_SW_TO_BASE_CHNL); @@ -2354,7 +2354,7 @@ sint On_TDLS_Ch_Switch_Rsp(_adapter *padapter, union recv_frame *precv_frame) if ((pmlmeext->cur_channel == rtw_get_oper_ch(padapter)) && (pchsw_info->ch_sw_state & TDLS_WAIT_CH_RSP_STATE)) { - if (ATOMIC_READ(&pchsw_info->chsw_on) == _TRUE) + if (ATOMIC_READ(&pchsw_info->chsw_on) == true) rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_CH_SW_TO_OFF_CHNL); } @@ -2428,7 +2428,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); else memset(wfdie + wfdielen, 0x00, ETH_ALEN); @@ -2486,7 +2486,7 @@ void rtw_build_tdls_setup_req_ies(_adapter *padapter, struct xmit_frame *pxmitfr pframe = rtw_tdls_set_sup_reg_class(pframe, pattrib); if (pattrib->encrypt) - pframe = rtw_tdls_set_rsnie(ptxmgmt, pframe, pattrib, _TRUE, ptdls_sta); + pframe = rtw_tdls_set_rsnie(ptxmgmt, pframe, pattrib, true, ptdls_sta); pframe = rtw_tdls_set_ext_cap(pframe, pattrib); @@ -2497,18 +2497,18 @@ void rtw_build_tdls_setup_req_ies(_adapter *padapter, struct xmit_frame *pxmitfr , NULL , ptdls_sta->SNonce); - pframe = rtw_tdls_set_timeout_interval(ptxmgmt, pframe, pattrib, _TRUE, ptdls_sta); + pframe = rtw_tdls_set_timeout_interval(ptxmgmt, pframe, pattrib, true, ptdls_sta); } /* Sup_reg_classes(optional) */ - if (pregistrypriv->ht_enable == _TRUE) + if (pregistrypriv->ht_enable == true) pframe = rtw_tdls_set_ht_cap(padapter, pframe_head, pattrib); pframe = rtw_tdls_set_bss_coexist(padapter, pframe, pattrib); - pframe = rtw_tdls_set_linkid(pframe, pattrib, _TRUE); + pframe = rtw_tdls_set_linkid(pframe, pattrib, true); - if ((pregistrypriv->wmm_enable == _TRUE) || (padapter->mlmepriv.htpriv.ht_option == _TRUE)) + if ((pregistrypriv->wmm_enable == true) || (padapter->mlmepriv.htpriv.ht_option == true)) pframe = rtw_tdls_set_qos_cap(pframe, pattrib); #ifdef CONFIG_WFD @@ -2561,13 +2561,13 @@ void rtw_build_tdls_setup_rsp_ies(_adapter *padapter, struct xmit_frame *pxmitfr if (pattrib->encrypt) { prsnie = pframe; - pframe = rtw_tdls_set_rsnie(ptxmgmt, pframe, pattrib, _FALSE, ptdls_sta); + pframe = rtw_tdls_set_rsnie(ptxmgmt, pframe, pattrib, false, ptdls_sta); } pframe = rtw_tdls_set_ext_cap(pframe, pattrib); if (pattrib->encrypt) { - if (rtw_tdls_is_driver_setup(padapter) == _TRUE) + if (rtw_tdls_is_driver_setup(padapter) == true) wpa_tdls_generate_tpk(padapter, ptdls_sta); pftie = pframe; @@ -2579,23 +2579,23 @@ void rtw_build_tdls_setup_rsp_ies(_adapter *padapter, struct xmit_frame *pxmitfr , ptdls_sta->SNonce); ptimeout_ie = pframe; - pframe = rtw_tdls_set_timeout_interval(ptxmgmt, pframe, pattrib, _FALSE, ptdls_sta); + pframe = rtw_tdls_set_timeout_interval(ptxmgmt, pframe, pattrib, false, ptdls_sta); } /* Sup_reg_classes(optional) */ - if (pregistrypriv->ht_enable == _TRUE) + if (pregistrypriv->ht_enable == true) pframe = rtw_tdls_set_ht_cap(padapter, pframe_head, pattrib); pframe = rtw_tdls_set_bss_coexist(padapter, pframe, pattrib); plinkid_ie = pframe; - pframe = rtw_tdls_set_linkid(pframe, pattrib, _FALSE); + pframe = rtw_tdls_set_linkid(pframe, pattrib, false); /* Fill FTIE mic */ - if (pattrib->encrypt && rtw_tdls_is_driver_setup(padapter) == _TRUE) + if (pattrib->encrypt && rtw_tdls_is_driver_setup(padapter) == true) wpa_tdls_ftie_mic(ptdls_sta->tpk.kck, 2, plinkid_ie, prsnie, ptimeout_ie, pftie, pftie_mic); - if ((pregistrypriv->wmm_enable == _TRUE) || (padapter->mlmepriv.htpriv.ht_option == _TRUE)) + if ((pregistrypriv->wmm_enable == true) || (padapter->mlmepriv.htpriv.ht_option == true)) pframe = rtw_tdls_set_qos_cap(pframe, pattrib); #ifdef CONFIG_WFD @@ -2629,7 +2629,7 @@ void rtw_build_tdls_setup_cfm_ies(_adapter *padapter, struct xmit_frame *pxmitfr if (pattrib->encrypt) { prsnie = pframe; - pframe = rtw_tdls_set_rsnie(ptxmgmt, pframe, pattrib, _TRUE, ptdls_sta); + pframe = rtw_tdls_set_rsnie(ptxmgmt, pframe, pattrib, true, ptdls_sta); } if (pattrib->encrypt) { @@ -2642,9 +2642,9 @@ void rtw_build_tdls_setup_cfm_ies(_adapter *padapter, struct xmit_frame *pxmitfr , ptdls_sta->SNonce); ptimeout_ie = pframe; - pframe = rtw_tdls_set_timeout_interval(ptxmgmt, pframe, pattrib, _TRUE, ptdls_sta); + pframe = rtw_tdls_set_timeout_interval(ptxmgmt, pframe, pattrib, true, ptdls_sta); - if (rtw_tdls_is_driver_setup(padapter) == _TRUE) { + if (rtw_tdls_is_driver_setup(padapter) == true) { /* Start TPK timer */ ptdls_sta->TPK_count = 0; _set_timer(&ptdls_sta->TPK_timer, ONE_SEC); @@ -2654,12 +2654,12 @@ void rtw_build_tdls_setup_cfm_ies(_adapter *padapter, struct xmit_frame *pxmitfr /* HT operation; todo */ plinkid_ie = pframe; - pframe = rtw_tdls_set_linkid(pframe, pattrib, _TRUE); + pframe = rtw_tdls_set_linkid(pframe, pattrib, true); - if (pattrib->encrypt && (rtw_tdls_is_driver_setup(padapter) == _TRUE)) + if (pattrib->encrypt && (rtw_tdls_is_driver_setup(padapter) == true)) wpa_tdls_ftie_mic(ptdls_sta->tpk.kck, 3, plinkid_ie, prsnie, ptimeout_ie, pftie, pftie_mic); - if (ptdls_sta->qos_option == _TRUE) + if (ptdls_sta->qos_option == true) pframe = rtw_tdls_set_wmm_params(padapter, pframe, pattrib); } @@ -2686,11 +2686,11 @@ void rtw_build_tdls_teardown_ies(_adapter *padapter, struct xmit_frame *pxmitfra plinkid_ie = pframe; if (ptdls_sta->tdls_sta_state & TDLS_INITIATOR_STATE) - pframe = rtw_tdls_set_linkid(pframe, pattrib, _FALSE); + pframe = rtw_tdls_set_linkid(pframe, pattrib, false); else if (ptdls_sta->tdls_sta_state & TDLS_RESPONDER_STATE) - pframe = rtw_tdls_set_linkid(pframe, pattrib, _TRUE); + pframe = rtw_tdls_set_linkid(pframe, pattrib, true); - if (pattrib->encrypt && (rtw_tdls_is_driver_setup(padapter) == _TRUE)) + if (pattrib->encrypt && (rtw_tdls_is_driver_setup(padapter) == true)) wpa_tdls_teardown_ftie_mic(ptdls_sta->tpk.kck, plinkid_ie, ptxmgmt->status_code, 1, 4, pftie, pftie_mic); } @@ -2702,7 +2702,7 @@ void rtw_build_tdls_dis_req_ies(_adapter *padapter, struct xmit_frame *pxmitfram pframe = rtw_tdls_set_category(pframe, pattrib, RTW_WLAN_CATEGORY_TDLS); pframe = rtw_tdls_set_action(pframe, pattrib, ptxmgmt); pframe = rtw_tdls_set_dialog(pframe, pattrib, ptxmgmt); - pframe = rtw_tdls_set_linkid(pframe, pattrib, _TRUE); + pframe = rtw_tdls_set_linkid(pframe, pattrib, true); } @@ -2726,20 +2726,20 @@ void rtw_build_tdls_dis_rsp_ies(_adapter *padapter, struct xmit_frame *pxmitfram pframe = rtw_tdls_set_sup_ch(pmlmeext, pframe, pattrib); if (privacy) - pframe = rtw_tdls_set_rsnie(ptxmgmt, pframe, pattrib, _TRUE, NULL); + pframe = rtw_tdls_set_rsnie(ptxmgmt, pframe, pattrib, true, NULL); pframe = rtw_tdls_set_ext_cap(pframe, pattrib); if (privacy) { pframe = rtw_tdls_set_ftie(ptxmgmt, pframe, pattrib, NULL, NULL); - pframe = rtw_tdls_set_timeout_interval(ptxmgmt, pframe, pattrib, _TRUE, NULL); + pframe = rtw_tdls_set_timeout_interval(ptxmgmt, pframe, pattrib, true, NULL); } - if (pregistrypriv->ht_enable == _TRUE) + if (pregistrypriv->ht_enable == true) pframe = rtw_tdls_set_ht_cap(padapter, pframe_head - pktlen_index, pattrib); pframe = rtw_tdls_set_bss_coexist(padapter, pframe, pattrib); - pframe = rtw_tdls_set_linkid(pframe, pattrib, _FALSE); + pframe = rtw_tdls_set_linkid(pframe, pattrib, false); } void rtw_build_tdls_peer_traffic_indication_ies(_adapter *padapter, struct xmit_frame *pxmitframe, u8 *pframe, struct tdls_txmgmt *ptxmgmt) @@ -2755,9 +2755,9 @@ void rtw_build_tdls_peer_traffic_indication_ies(_adapter *padapter, struct xmit_ pframe = rtw_tdls_set_dialog(pframe, pattrib, ptxmgmt); if (ptdls_sta->tdls_sta_state & TDLS_INITIATOR_STATE) - pframe = rtw_tdls_set_linkid(pframe, pattrib, _FALSE); + pframe = rtw_tdls_set_linkid(pframe, pattrib, false); else if (ptdls_sta->tdls_sta_state & TDLS_RESPONDER_STATE) - pframe = rtw_tdls_set_linkid(pframe, pattrib, _TRUE); + pframe = rtw_tdls_set_linkid(pframe, pattrib, true); /* PTI control */ /* PU buffer status */ @@ -2785,9 +2785,9 @@ void rtw_build_tdls_peer_traffic_rsp_ies(_adapter *padapter, struct xmit_frame * pframe = rtw_tdls_set_dialog(pframe, pattrib, ptxmgmt); if (ptdls_sta->tdls_sta_state & TDLS_INITIATOR_STATE) - pframe = rtw_tdls_set_linkid(pframe, pattrib, _FALSE); + pframe = rtw_tdls_set_linkid(pframe, pattrib, false); else if (ptdls_sta->tdls_sta_state & TDLS_RESPONDER_STATE) - pframe = rtw_tdls_set_linkid(pframe, pattrib, _TRUE); + pframe = rtw_tdls_set_linkid(pframe, pattrib, true); } #ifdef CONFIG_TDLS_CH_SW @@ -2820,9 +2820,9 @@ void rtw_build_tdls_ch_switch_req_ies(_adapter *padapter, struct xmit_frame *pxm } if (ptdls_sta->tdls_sta_state & TDLS_INITIATOR_STATE) - pframe = rtw_tdls_set_linkid(pframe, pattrib, _FALSE); + pframe = rtw_tdls_set_linkid(pframe, pattrib, false); else if (ptdls_sta->tdls_sta_state & TDLS_RESPONDER_STATE) - pframe = rtw_tdls_set_linkid(pframe, pattrib, _TRUE); + pframe = rtw_tdls_set_linkid(pframe, pattrib, true); pframe = rtw_tdls_set_ch_sw(pframe, pattrib, ptdls_sta); @@ -2841,9 +2841,9 @@ void rtw_build_tdls_ch_switch_rsp_ies(_adapter *padapter, struct xmit_frame *pxm pframe = rtw_tdls_set_status_code(pframe, pattrib, ptxmgmt); if (ptdls_sta->tdls_sta_state & TDLS_INITIATOR_STATE) - pframe = rtw_tdls_set_linkid(pframe, pattrib, _FALSE); + pframe = rtw_tdls_set_linkid(pframe, pattrib, false); else if (ptdls_sta->tdls_sta_state & TDLS_RESPONDER_STATE) - pframe = rtw_tdls_set_linkid(pframe, pattrib, _TRUE); + pframe = rtw_tdls_set_linkid(pframe, pattrib, true); pframe = rtw_tdls_set_ch_sw(pframe, pattrib, ptdls_sta); } @@ -2925,7 +2925,7 @@ void _tdls_tpk_timer_hdl(void *FunctionContext) RTW_INFO("[TDLS] %s, Re-Setup TDLS link with "MAC_FMT" since TPK lifetime expires!\n", __func__, MAC_ARG(ptdls_sta->hwaddr)); ptdls_sta->TPK_count = 0; _rtw_memcpy(txmgmt.peer, ptdls_sta->hwaddr, ETH_ALEN); - issue_tdls_setup_req(ptdls_sta->padapter, &txmgmt, _FALSE); + issue_tdls_setup_req(ptdls_sta->padapter, &txmgmt, false); } _set_timer(&ptdls_sta->TPK_timer, ONE_SEC); @@ -2949,7 +2949,7 @@ void _tdls_delay_timer_hdl(void *FunctionContext) struct tdls_ch_switch *pchsw_info = &padapter->tdlsinfo.chsw_info; RTW_INFO("[TDLS] %s, op_ch:%d, tdls_state:0x%08x\n", __func__, rtw_get_oper_ch(padapter), ptdls_sta->tdls_sta_state); - pchsw_info->delay_switch_back = _TRUE; + pchsw_info->delay_switch_back = true; } void _tdls_stay_on_base_chnl_timer_hdl(void *FunctionContext) @@ -3009,7 +3009,7 @@ void _tdls_pti_timer_hdl(void *FunctionContext) if (ptdls_sta->tdls_sta_state & TDLS_WAIT_PTR_STATE) { RTW_INFO("[TDLS] Doesn't receive PTR from peer dev:"MAC_FMT"; " "Send TDLS Tear Down\n", MAC_ARG(ptdls_sta->hwaddr)); - issue_tdls_teardown(padapter, &txmgmt, _FALSE); + issue_tdls_teardown(padapter, &txmgmt, false); } } } diff --git a/core/rtw_wlan_util.c b/core/rtw_wlan_util.c index 3660630..d775d98 100644 --- a/core/rtw_wlan_util.c +++ b/core/rtw_wlan_util.c @@ -81,10 +81,10 @@ int cckrates_included(unsigned char *rate, int ratelen) for (i = 0; i < ratelen; i++) { 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; } @@ -95,10 +95,10 @@ int cckratesonly_included(unsigned char *rate, int ratelen) for (i = 0; i < ratelen; i++) { 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; } #ifdef CONFIG_GET_RAID_BY_DRV @@ -241,9 +241,9 @@ u8 judge_network_type(_adapter *padapter, unsigned char *rate, int ratelen) if (pmlmeinfo->HT_enable) 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; else network_type |= WIRELESS_11G; @@ -324,11 +324,11 @@ int is_basicrate(_adapter *padapter, unsigned char rate) if ((val != 0xff) && (val != 0xfe)) { if (rate == ratetbl_val_2wifirate(val)) - return _TRUE; + return true; } } - return _FALSE; + return false; } unsigned int ratetbl2rateset(_adapter *padapter, unsigned char *rateset); @@ -355,7 +355,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; rateset[len] = rate; @@ -670,7 +670,7 @@ void set_channel_bwmode(_adapter *padapter, unsigned char channel, unsigned char u8 center_ch, chnl_offset80 = HAL_PRIME_CHNL_OFFSET_DONT_CARE; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; #if (defined(CONFIG_TDLS) && defined(CONFIG_TDLS_CH_SW)) || defined(CONFIG_MCC_MODE) - u8 iqk_info_backup = _FALSE; + u8 iqk_info_backup = false; #endif if (padapter->bNotifyChannelChange) @@ -727,15 +727,15 @@ void set_channel_bwmode(_adapter *padapter, unsigned char channel, unsigned char rtw_hal_get_hwreg(padapter, HW_VAR_CH_SW_NEED_TO_TAKE_CARE_IQK_INFO, &take_care_iqk); rtw_hal_get_hwreg(padapter, HW_VAR_DO_IQK, &do_iqk); - if ((take_care_iqk == _TRUE) && (do_iqk == _TRUE)) - iqk_info_backup = _TRUE; + if ((take_care_iqk == true) && (do_iqk == true)) + iqk_info_backup = true; } #endif rtw_hal_set_chnl_bw(padapter, center_ch, bwmode, channel_offset, chnl_offset80); /* set center channel */ #if (defined(CONFIG_TDLS) && defined(CONFIG_TDLS_CH_SW)) || defined(CONFIG_MCC_MODE) - if (iqk_info_backup == _TRUE) + if (iqk_info_backup == true) rtw_hal_ch_sw_iqk_info_backup(padapter); #endif @@ -787,7 +787,7 @@ int is_client_associated_to_ap(_adapter *padapter) pmlmeinfo = &(pmlmeext->mlmext_info); if ((pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) && ((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE)) - return _TRUE; + return true; else return _FAIL; } @@ -798,7 +798,7 @@ int is_client_associated_to_ibss(_adapter *padapter) struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); if ((pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) && ((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE)) - return _TRUE; + return true; else return _FAIL; } @@ -819,7 +819,7 @@ int is_IBSS_empty(_adapter *padapter) return _FAIL; } - return _TRUE; + return true; } unsigned int decide_wait_for_beacon_timeout(unsigned int bcn_interval) @@ -926,8 +926,8 @@ inline bool _rtw_camctl_chk_cap(_adapter *adapter, u8 cap) struct cam_ctl_t *cam_ctl = &dvobj->cam_ctl; if (cam_ctl->sec_cap & cap) - return _TRUE; - return _FALSE; + return true; + return false; } inline void _rtw_camctl_set_flags(_adapter *adapter, u32 flags) @@ -974,8 +974,8 @@ inline bool _rtw_camctl_chk_flags(_adapter *adapter, u32 flags) struct cam_ctl_t *cam_ctl = &dvobj->cam_ctl; if (cam_ctl->flags & flags) - return _TRUE; - return _FALSE; + return true; + return false; } void dump_sec_cam_map(void *sel, struct sec_cam_bmp *map, u8 max_num) @@ -1108,7 +1108,7 @@ inline bool rtw_sec_camid_is_drv_forbid(struct cam_ctl_t *cam_ctl, u8 id) static bool _rtw_sec_camid_is_used(struct cam_ctl_t *cam_ctl, u8 id) { - bool ret = _FALSE; + bool ret = false; if (id >= cam_ctl->num) { rtw_warn_on(1); @@ -1157,17 +1157,17 @@ inline bool _rtw_camid_is_gk(_adapter *adapter, u8 cam_id) { struct dvobj_priv *dvobj = adapter_to_dvobj(adapter); struct cam_ctl_t *cam_ctl = &dvobj->cam_ctl; - bool ret = _FALSE; + bool ret = false; if (cam_id >= cam_ctl->num) { rtw_warn_on(1); goto exit; } - if (_rtw_sec_camid_is_used(cam_ctl, cam_id) == _FALSE) + if (_rtw_sec_camid_is_used(cam_ctl, cam_id) == false) goto exit; - ret = (dvobj->cam_cache[cam_id].ctrl & BIT6) ? _TRUE : _FALSE; + ret = (dvobj->cam_cache[cam_id].ctrl & BIT6) ? true : false; exit: return ret; @@ -1190,16 +1190,16 @@ inline bool rtw_camid_is_gk(_adapter *adapter, u8 cam_id) static bool cam_cache_chk(_adapter *adapter, u8 id, u8 *addr, s16 kid, s8 gk) { struct dvobj_priv *dvobj = adapter_to_dvobj(adapter); - bool ret = _FALSE; + bool ret = false; - if (addr && _rtw_memcmp(dvobj->cam_cache[id].mac, addr, ETH_ALEN) == _FALSE) + if (addr && _rtw_memcmp(dvobj->cam_cache[id].mac, addr, ETH_ALEN) == false) goto exit; if (kid >= 0 && kid != (dvobj->cam_cache[id].ctrl & 0x03)) goto exit; - if (gk != -1 && (gk ? _TRUE : _FALSE) != _rtw_camid_is_gk(adapter, id)) + if (gk != -1 && (gk ? true : false) != _rtw_camid_is_gk(adapter, id)) goto exit; - ret = _TRUE; + ret = true; exit: return ret; @@ -1261,8 +1261,8 @@ static s16 rtw_get_camid(_adapter *adapter, struct sta_info *sta, u8 *addr, s16 } /* find cam entry which has the same addr, kid (, gk bit) */ - if (_rtw_camctl_chk_cap(adapter, SEC_CAP_CHK_BMC) == _TRUE) - i = _rtw_camid_search(adapter, addr, kid, sta ? _FALSE : _TRUE); + if (_rtw_camctl_chk_cap(adapter, SEC_CAP_CHK_BMC) == true) + i = _rtw_camid_search(adapter, addr, kid, sta ? false : true); else i = _rtw_camid_search(adapter, addr, kid, -1); @@ -1277,7 +1277,7 @@ static s16 rtw_get_camid(_adapter *adapter, struct sta_info *sta, u8 *addr, s16 if (((i + start_id) % cam_ctl->num) < 4) continue; #endif - if (_rtw_sec_camid_is_used(cam_ctl, ((i + start_id) % cam_ctl->num)) == _FALSE) + if (_rtw_sec_camid_is_used(cam_ctl, ((i + start_id) % cam_ctl->num)) == false) break; } @@ -1307,7 +1307,7 @@ s16 rtw_camid_alloc(_adapter *adapter, struct sta_info *sta, u8 kid, bool *used) unsigned long irqL; s16 cam_id = -1; - *used = _FALSE; + *used = false; _enter_critical_bh(&cam_ctl->lock, &irqL); @@ -1448,7 +1448,7 @@ static s16 rtw_get_empty_cam_entry(_adapter *adapter, u8 start_camid) _enter_critical_bh(&cam_ctl->lock, &irqL); for (i = start_camid; i < cam_ctl->num; i++) { - if (_FALSE == _rtw_sec_camid_is_used(cam_ctl, i)) { + if (false == _rtw_sec_camid_is_used(cam_ctl, i)) { cam_id = i; break; } @@ -1498,9 +1498,9 @@ void flush_all_cam_entry(_adapter *padapter) if (psta->state & WIFI_AP_STATE) { /*clear cam when ap free per sta_info*/ } else - rtw_clearstakey_cmd(padapter, psta, _FALSE); + rtw_clearstakey_cmd(padapter, psta, false); } - } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) { + } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) { int cam_id = -1; u8 *addr = adapter_mac_addr(padapter); @@ -1514,7 +1514,7 @@ void flush_all_cam_entry(_adapter *padapter) invalidate_cam_all(padapter); /* clear default key related key search setting */ - rtw_hal_set_hwreg(padapter, HW_VAR_SEC_DK_CFG, (u8 *)_FALSE); + rtw_hal_set_hwreg(padapter, HW_VAR_SEC_DK_CFG, (u8 *)false); #endif } @@ -1562,15 +1562,15 @@ int WMM_param_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE) if (pmlmepriv->qospriv.qos_option == 0) { pmlmeinfo->WMM_enable = 0; - return _FALSE; + return false; } if (_rtw_memcmp(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element))) - return _FALSE; + return false; else _rtw_memcpy(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element)); pmlmeinfo->WMM_enable = 1; - return _TRUE; + return true; } void WMMOnAssocRsp(_adapter *padapter) @@ -1676,18 +1676,18 @@ void WMMOnAssocRsp(_adapter *padapter) inx[3] = 3; if (pregpriv->wifi_spec == 1) { - u32 j, tmp, change_inx = _FALSE; + u32 j, tmp, change_inx = false; /* entry indx: 0->vo, 1->vi, 2->be, 3->bk. */ for (i = 0; i < 4; i++) { for (j = i + 1; j < 4; j++) { /* 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) { @@ -1699,7 +1699,7 @@ void WMMOnAssocRsp(_adapter *padapter) inx[i] = inx[j]; inx[j] = tmp; - change_inx = _FALSE; + change_inx = false; } } } @@ -1731,7 +1731,7 @@ static void bwmode_update_check(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pI if (!pIE) return; - if (phtpriv->ht_option == _FALSE) + if (phtpriv->ht_option == false) return; if (pmlmeext->cur_bwmode >= CHANNEL_WIDTH_80) @@ -1778,7 +1778,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) && new_bwmode < pmlmeext->cur_bwmode ) { - pmlmeinfo->bwmode_updated = _TRUE; + pmlmeinfo->bwmode_updated = true; pmlmeext->cur_bwmode = new_bwmode; pmlmeext->cur_ch_offset = new_ch_offset; @@ -1786,10 +1786,10 @@ static void bwmode_update_check(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pI /* update HT info also */ HT_info_handler(padapter, pIE); } 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); struct sta_priv *pstapriv = &padapter->stapriv; @@ -1814,7 +1814,7 @@ static void bwmode_update_check(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pI rtw_dm_ra_mask_wk_cmd(padapter, (u8 *)psta); } - /* pmlmeinfo->bwmode_updated = _FALSE; */ /* bwmode_updated done, reset it! */ + /* pmlmeinfo->bwmode_updated = false; */ /* bwmode_updated done, reset it! */ } } @@ -1834,7 +1834,7 @@ void HT_caps_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE) if (pIE == NULL) return; - if (phtpriv->ht_option == _FALSE) + if (phtpriv->ht_option == false) return; pmlmeinfo->HT_caps_enable = 1; @@ -1990,7 +1990,7 @@ void HT_info_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE) if (pIE == NULL) return; - if (phtpriv->ht_option == _FALSE) + if (phtpriv->ht_option == false) return; @@ -2118,18 +2118,18 @@ static int check_ielen(u8 *start, uint len) if (elen > left) { RTW_INFO("IEEE 802.11 element parse failed (id=%d elen=%d left=%lu)\n", id, elen, (unsigned long) left); - return _FALSE; + return false; } if ((id == WLAN_EID_VENDOR_SPECIFIC) && (elen < 4)) - return _FALSE; + return false; left -= elen; pos += elen; } if (left) - return _FALSE; + return false; - return _TRUE; + return true; } int validate_beacon_len(u8 *pframe, u32 len) @@ -2138,13 +2138,13 @@ int validate_beacon_len(u8 *pframe, u32 len) if (len < ie_offset) { RTW_INFO("%s: incorrect beacon length(%d)\n", __func__, len); - return _FALSE; + return false; } - if (check_ielen(pframe + ie_offset, len - ie_offset) == _FALSE) - return _FALSE; + if (check_ielen(pframe + ie_offset, len - ie_offset) == false) + return false; - return _TRUE; + return true; } /* @@ -2175,12 +2175,12 @@ int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len, left = packet_len - sizeof(struct rtw_ieee80211_hdr_3addr) - _BEACON_IE_OFFSET_; pos = pframe + sizeof(struct rtw_ieee80211_hdr_3addr) + _BEACON_IE_OFFSET_; if (rtw_ieee802_11_parse_elems(pos, left, &elems, 1) == ParseFailed) - return _FALSE; + return false; /* check bw and channel offset */ if (elems.ht_capabilities) { if (elems.ht_capabilities_len != sizeof(*pht_cap)) - return _FALSE; + return false; pht_cap = (struct rtw_ieee80211_ht_cap *) elems.ht_capabilities; recv_beacon->ht_cap_info = le16_to_cpu(pht_cap->cap_info); @@ -2188,7 +2188,7 @@ int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len, if (elems.ht_operation) { if (elems.ht_operation_len != sizeof(*pht_info)) - return _FALSE; + return false; pht_info = (struct HT_info_element *) elems.ht_operation; recv_beacon->ht_info_infos_0_sco = pht_info->infos[0] & 0x03; @@ -2210,7 +2210,7 @@ int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len, /* checking SSID */ if (elems.ssid) { if (elems.ssid_len > sizeof(recv_beacon->ssid)) - return _FALSE; + return false; _rtw_memcpy(recv_beacon->ssid, elems.ssid, elems.ssid_len); recv_beacon->ssid_len = elems.ssid_len; @@ -2233,7 +2233,7 @@ int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len, } else if (capability & BIT(4)) recv_beacon->encryp_protocol = ENCRYP_PROTOCOL_WEP; - return _TRUE; + return true; } void rtw_dump_bcn_keys(struct beacon_keys *recv_beacon) @@ -2262,8 +2262,8 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len) struct wlan_network *cur_network = &(Adapter->mlmepriv.cur_network); struct beacon_keys recv_beacon; - 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); @@ -2272,14 +2272,14 @@ 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) { RTW_WARN("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; } - if (rtw_get_bcn_keys(Adapter, pframe, packet_len, &recv_beacon) == _FALSE) - return _TRUE; /* parsing failed => broken IE */ + if (rtw_get_bcn_keys(Adapter, pframe, packet_len, &recv_beacon) == false) + return true; /* parsing failed => broken IE */ /* don't care hidden ssid, use current beacon ssid directly */ if (recv_beacon.ssid_len == 0) { @@ -2288,10 +2288,10 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len) recv_beacon.ssid_len = pmlmepriv->cur_beacon_keys.ssid_len; } - if (_rtw_memcmp(&recv_beacon, &pmlmepriv->cur_beacon_keys, sizeof(recv_beacon)) == _TRUE) + if (_rtw_memcmp(&recv_beacon, &pmlmepriv->cur_beacon_keys, sizeof(recv_beacon)) == true) pmlmepriv->new_beacon_cnts = 0; else if ((pmlmepriv->new_beacon_cnts == 0) || - _rtw_memcmp(&recv_beacon, &pmlmepriv->new_beacon_keys, sizeof(recv_beacon)) == _FALSE) { + _rtw_memcmp(&recv_beacon, &pmlmepriv->new_beacon_keys, sizeof(recv_beacon)) == false) { RTW_DBG("%s: start new beacon (seq=%d)\n", __func__, GetSequence(pframe)); if (pmlmepriv->new_beacon_cnts == 0) { @@ -2315,7 +2315,7 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len) pmlmepriv->cur_beacon_keys.ht_cap_info = recv_beacon.ht_cap_info; pmlmepriv->cur_beacon_keys.ht_info_infos_0_sco = recv_beacon.ht_info_infos_0_sco; if (_rtw_memcmp(&recv_beacon, &pmlmepriv->cur_beacon_keys, - sizeof(recv_beacon)) == _FALSE) { + sizeof(recv_beacon)) == false) { /* beacon is changed, have to do disconnect/connect */ RTW_WARN("%s: new beacon occur!!\n", __func__); return _FAIL; @@ -2376,10 +2376,10 @@ 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_ch_switching_prohibited(pIE->data, pIE->Length) == _TRUE) - ptdlsinfo->ch_switch_prohibited = _TRUE; + if (check_ap_tdls_prohibited(pIE->data, pIE->Length) == true) + ptdlsinfo->ap_prohibited = true; + if (check_ap_tdls_ch_switching_prohibited(pIE->data, pIE->Length) == true) + ptdlsinfo->ch_switch_prohibited = true; break; #endif /* CONFIG_TDLS */ default: @@ -2398,7 +2398,7 @@ void process_csa_ie(_adapter *padapter, u8 *pframe, uint pkt_len) PNDIS_802_11_VARIABLE_IEs pIE; u8 new_ch_no = 0; - if (padapter->mlmepriv.handle_dfs == _TRUE) + if (padapter->mlmepriv.handle_dfs == true) return; len = pkt_len - (_BEACON_IE_OFFSET_ + WLAN_HDR_A3_LEN); @@ -2408,7 +2408,7 @@ void process_csa_ie(_adapter *padapter, u8 *pframe, uint pkt_len) switch (pIE->ElementID) { case _CH_SWTICH_ANNOUNCE_: - padapter->mlmepriv.handle_dfs = _TRUE; + padapter->mlmepriv.handle_dfs = true; _rtw_memcpy(&new_ch_no, pIE->data + 1, 1); rtw_set_csa_cmd(padapter, new_ch_no); break; @@ -2436,12 +2436,12 @@ unsigned int is_ap_in_tkip(_adapter *padapter) switch (pIE->ElementID) { 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: break; @@ -2450,9 +2450,9 @@ unsigned int is_ap_in_tkip(_adapter *padapter) i += (pIE->Length + 2); } - return _FALSE; + return false; } else - return _FALSE; + return false; } @@ -2472,13 +2472,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; @@ -2487,9 +2487,9 @@ unsigned int should_forbid_n_rate(_adapter *padapter) i += (pIE->Length + 2); } - return _TRUE; + return true; } else - return _FALSE; + return false; } @@ -2509,11 +2509,11 @@ unsigned int is_ap_in_wep(_adapter *padapter) switch (pIE->ElementID) { 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; @@ -2522,9 +2522,9 @@ unsigned int is_ap_in_wep(_adapter *padapter) i += (pIE->Length + 2); } - return _TRUE; + return true; } else - return _FALSE; + return false; } @@ -2646,13 +2646,13 @@ unsigned char get_highest_rate_idx(u32 mask) void Update_RA_Entry(_adapter *padapter, struct sta_info *psta) { - rtw_hal_update_ra_mask(psta, psta->rssi_level, _TRUE); + rtw_hal_update_ra_mask(psta, psta->rssi_level, true); } void set_sta_rate(_adapter *padapter, struct sta_info *psta) { /* rate adaptive */ - rtw_hal_update_ra_mask(psta, psta->rssi_level, _TRUE); + rtw_hal_update_ra_mask(psta, psta->rssi_level, true); } /* Update RRSR and Rate for USERATE */ @@ -2784,14 +2784,14 @@ void update_capinfo(PADAPTER Adapter, u16 updateCap) if (updateCap & cShortPreamble) { /* 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); } } else { /* 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); } @@ -2859,9 +2859,9 @@ void update_wireless_mode(_adapter *padapter) else if (pmlmeinfo->HT_enable) 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; else network_type |= WIRELESS_11G; @@ -2912,7 +2912,7 @@ int rtw_ies_get_supported_rate(u8 *ies, uint ies_len, u8 *rate_set, u8 *rate_num unsigned int ie_len; if (!rate_set || !rate_num) - return _FALSE; + return false; *rate_num = 0; @@ -2951,7 +2951,7 @@ void process_addba_req(_adapter *padapter, u8 *paddba_req, u8 *addr) struct ADDBA_request *preq = (struct ADDBA_request *)paddba_req; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - u8 size, accept = _FALSE; + u8 size, accept = false; psta = rtw_get_stainfo(pstapriv, addr); if (!psta) @@ -2966,7 +2966,7 @@ void process_addba_req(_adapter *padapter, u8 *paddba_req, u8 *addr) accept = rtw_rx_ampdu_is_accept(padapter); size = rtw_rx_ampdu_size(padapter); - if (accept == _TRUE) + if (accept == true) rtw_addbarsp_cmd(padapter, addr, tid, 0, size, start_seq); else rtw_addbarsp_cmd(padapter, addr, tid, 37, size, start_seq); /* reject ADDBA Req */ @@ -3040,7 +3040,7 @@ void adaptive_early_32k(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len) */ /* dump for adaptive_early_32k */ - if (pmlmeext->bcn_cnt > 100 && (pmlmeext->adaptive_tsf_done == _TRUE)) { + if (pmlmeext->bcn_cnt > 100 && (pmlmeext->adaptive_tsf_done == true)) { u8 ratio_20_delay, ratio_80_delay; u8 DrvBcnEarly, DrvBcnTimeOut; @@ -3238,7 +3238,7 @@ void rtw_alloc_macid(_adapter *padapter, struct sta_info *psta) struct macid_bmp *used_map = &macid_ctl->used; /* static u8 last_id = 0; for testing */ u8 last_id = 0; - u8 is_bc_sta = _FALSE; + u8 is_bc_sta = false; if (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(padapter), ETH_ALEN)) { psta->mac_id = macid_ctl->num; @@ -3246,7 +3246,7 @@ void rtw_alloc_macid(_adapter *padapter, struct sta_info *psta) } if (_rtw_memcmp(psta->hwaddr, bc_addr, ETH_ALEN)) { - is_bc_sta = _TRUE; + is_bc_sta = true; rtw_iface_bcmc_id_set(padapter, INVALID_SEC_MAC_CAM_ID); /*init default value*/ } @@ -3354,13 +3354,13 @@ void rtw_release_macid(_adapter *padapter, struct sta_info *psta) u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); struct macid_ctl_t *macid_ctl = dvobj_to_macidctl(dvobj); - u8 is_bc_sta = _FALSE; + u8 is_bc_sta = false; if (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(padapter), ETH_ALEN)) return; if (_rtw_memcmp(psta->hwaddr, bc_addr, ETH_ALEN)) - is_bc_sta = _TRUE; + is_bc_sta = true; #ifdef CONFIG_SHARED_BMC_MACID if (is_bc_sta @@ -3546,7 +3546,7 @@ _adapter *dvobj_get_adapter_by_addr(struct dvobj_priv *dvobj, u8 *addr) int i; for (i = 0; i < dvobj->iface_nums; i++) { - if (_rtw_memcmp(dvobj->padapters[i]->mac_addr, addr, ETH_ALEN) == _TRUE) + if (_rtw_memcmp(dvobj->padapters[i]->mac_addr, addr, ETH_ALEN) == true) break; } @@ -3636,21 +3636,21 @@ bool rtw_wowlan_parser_pattern_cmd(u8 *input, char *pattern, (*pattern_len) = pos; - return _TRUE; + return true; error: - return _FALSE; + return false; } bool rtw_check_pattern_valid(u8 *input, u8 len) { int i = 0; - bool res = _FALSE; + bool res = false; if (len != 2) goto exit; for (i = 0 ; i < len ; i++) - if (IsHexDigit(input[i]) == _FALSE) + if (IsHexDigit(input[i]) == false) goto exit; res = _SUCCESS; @@ -3687,7 +3687,7 @@ u8 rtw_set_default_pattern(_adapter *adapter) u8 tcp_protocol[1] = {0x06}; u8 udp_protocol[1] = {0x11}; - if (pregistrypriv->default_patterns_en == _FALSE) + if (pregistrypriv->default_patterns_en == false) return 0; for (index = 0 ; index < DEFAULT_PATTERN_NUM ; index++) { @@ -4085,9 +4085,9 @@ int rtw_dev_pno_set(struct net_device *net, pno_ssid_t *ssid, int num, goto failing; } - pwrctl->wowlan_in_resume = _FALSE; + pwrctl->wowlan_in_resume = false; - pwrctl->pno_inited = _TRUE; + pwrctl->pno_inited = true; /* NLO Info */ ret = rtw_dev_nlo_info_set(pwrctl->pnlo_info, ssid, num, pno_time, pno_repeat, pno_freq_expo_max); diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c index e37ad88..90d47c6 100644 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -151,10 +151,10 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter) pxmitbuf->buf_tag = XMITBUF_DATA; /* Tx buf allocation may fail sometimes, so sleep and retry. */ - res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, (MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), _TRUE); + res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, (MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), true); if (res == _FAIL) { rtw_msleep_os(10); - res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, (MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), _TRUE); + res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, (MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), true); if (res == _FAIL) goto exit; } @@ -224,7 +224,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter) pxmitbuf->padapter = padapter; pxmitbuf->buf_tag = XMITBUF_MGNT; - res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, MAX_XMIT_EXTBUF_SZ + XMITBUF_ALIGN_SZ, _TRUE); + res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, MAX_XMIT_EXTBUF_SZ + XMITBUF_ALIGN_SZ, true); if (res == _FAIL) { res = _FAIL; goto exit; @@ -249,7 +249,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter) pxmitbuf->padapter = padapter; pxmitbuf->buf_tag = XMITBUF_CMD; - res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, MAX_CMDBUF_SZ + XMITBUF_ALIGN_SZ, _TRUE); + res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, MAX_CMDBUF_SZ + XMITBUF_ALIGN_SZ, true); if (res == _FAIL) { res = _FAIL; goto exit; @@ -275,7 +275,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter) pxmitpriv->voq_cnt = 0; #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 @@ -351,7 +351,7 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv) } for (i = 0; i < NR_XMITBUFF; i++) { - rtw_os_xmit_resource_free(padapter, pxmitbuf, (MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), _TRUE); + rtw_os_xmit_resource_free(padapter, pxmitbuf, (MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), true); pxmitbuf++; } @@ -378,7 +378,7 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv) pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmit_extbuf; for (i = 0; i < NR_XMIT_EXTBUFF; i++) { - rtw_os_xmit_resource_free(padapter, pxmitbuf, (MAX_XMIT_EXTBUF_SZ + XMITBUF_ALIGN_SZ), _TRUE); + rtw_os_xmit_resource_free(padapter, pxmitbuf, (MAX_XMIT_EXTBUF_SZ + XMITBUF_ALIGN_SZ), true); pxmitbuf++; } @@ -389,7 +389,7 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv) for (i = 0; i < CMDBUF_MAX; i++) { pxmitbuf = &pxmitpriv->pcmd_xmitbuf[i]; if (pxmitbuf != NULL) - rtw_os_xmit_resource_free(padapter, pxmitbuf, MAX_CMDBUF_SZ + XMITBUF_ALIGN_SZ , _TRUE); + rtw_os_xmit_resource_free(padapter, pxmitbuf, MAX_CMDBUF_SZ + XMITBUF_ALIGN_SZ , true); } rtw_free_hwxmits(padapter); @@ -552,8 +552,8 @@ void rtw_update_tx_rate_bmp(struct dvobj_priv *dvobj) { u8 highest_rate_bw; u8 highest_rate_bw_bmp; - u8 update_ht_rs = _FALSE; - u8 update_vht_rs = _FALSE; + u8 update_ht_rs = false; + u8 update_vht_rs = false; highest_rate_bw_bmp = BW_CAP_20M; highest_rate_bw = CHANNEL_WIDTH_20; @@ -573,7 +573,7 @@ void rtw_update_tx_rate_bmp(struct dvobj_priv *dvobj) RTW_INFO("highest_ht_rate_bw_bmp:0x%02x=>0x%02x\n", ori_highest_ht_rate_bw_bmp, rf_ctl->highest_ht_rate_bw_bmp); RTW_INFO("rate_bmp_ht_by_bw[%u]:0x%08x=>0x%08x\n", highest_rate_bw, ori_bmp_ht[highest_rate_bw], rf_ctl->rate_bmp_ht_by_bw[highest_rate_bw]); } - update_ht_rs = _TRUE; + update_ht_rs = true; } highest_rate_bw_bmp = BW_CAP_20M; @@ -594,11 +594,11 @@ void rtw_update_tx_rate_bmp(struct dvobj_priv *dvobj) RTW_INFO("highest_vht_rate_bw_bmp:0x%02x=>0x%02x\n", ori_highest_vht_rate_bw_bmp, rf_ctl->highest_vht_rate_bw_bmp); RTW_INFO("rate_bmp_vht_by_bw[%u]:0x%08x=>0x%08x\n", highest_rate_bw, ori_bmp_vht[highest_rate_bw], rf_ctl->rate_bmp_vht_by_bw[highest_rate_bw]); } - update_vht_rs = _TRUE; + update_vht_rs = true; } /* TODO: per rfpath and rate section handling? */ - if (update_ht_rs == _TRUE || update_vht_rs == _TRUE) + if (update_ht_rs == true || update_vht_rs == true) rtw_hal_set_tx_power_level(dvobj_get_primary_adapter(dvobj), hal_data->current_channel); } } @@ -680,7 +680,7 @@ exit: u8 query_ra_short_GI(struct sta_info *psta, u8 bw) { - u8 sgi = _FALSE, sgi_20m = _FALSE, sgi_40m = _FALSE, sgi_80m = _FALSE; + u8 sgi = false, sgi_20m = false, sgi_40m = false, sgi_80m = false; sgi_20m = psta->htpriv.sgi_20m; sgi_40m = psta->htpriv.sgi_40m; @@ -754,9 +754,9 @@ static void update_attrib_vcs_info(_adapter *padapter, struct xmit_frame *pxmitf pattrib->vcs_mode = NONE_VCS; } } 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; break; @@ -791,7 +791,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; } @@ -837,7 +837,7 @@ static void update_attrib_phy_info(_adapter *padapter, struct pkt_attrib *pattri pattrib->ht_en = psta->htpriv.ht_option; pattrib->ch_offset = psta->htpriv.ch_offset; - pattrib->ampdu_en = _FALSE; + pattrib->ampdu_en = false; if (padapter->driver_ampdu_spacing != 0xFF) /* driver control AMPDU Density for peer sta's rx */ pattrib->ampdu_spacing = padapter->driver_ampdu_spacing; @@ -847,21 +847,21 @@ static void update_attrib_phy_info(_adapter *padapter, struct pkt_attrib *pattri /* check if enable ampdu */ if (pattrib->ht_en && psta->htpriv.ampdu_enable) { if (psta->htpriv.agg_enable_bitmap & BIT(pattrib->priority)) { - pattrib->ampdu_en = _TRUE; - if (psta->htpriv.tx_amsdu_enable == _TRUE) - pattrib->amsdu_ampdu_en = _TRUE; + pattrib->ampdu_en = true; + if (psta->htpriv.tx_amsdu_enable == true) + pattrib->amsdu_ampdu_en = true; else - pattrib->amsdu_ampdu_en = _FALSE; + pattrib->amsdu_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; */ /* } */ #ifdef CONFIG_TDLS - if (pattrib->direct_link == _TRUE) { + if (pattrib->direct_link == true) { psta = pattrib->ptdls_sta; pattrib->raid = psta->raid; @@ -872,11 +872,11 @@ static void update_attrib_phy_info(_adapter *padapter, struct pkt_attrib *pattri } #endif /* CONFIG_TDLS */ - pattrib->retry_ctrl = _FALSE; + pattrib->retry_ctrl = false; #ifdef CONFIG_AUTO_AP_MODE if (psta->isrc && psta->pid > 0) - pattrib->pctrl = _TRUE; + pattrib->pctrl = true; #endif } @@ -892,13 +892,13 @@ static s32 update_attrib_sec_info(_adapter *padapter, struct pkt_attrib *pattrib memset(pattrib->dot11tkiptxmickey.skey, 0, 16); pattrib->mac_id = psta->mac_id; - if (psta->ieee8021x_blocked == _TRUE) { + if (psta->ieee8021x_blocked == true) { 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)) { #ifdef DBG_TX_DROP_FRAME - RTW_INFO("DBG_TX_DROP_FRAME %s psta->ieee8021x_blocked == _TRUE, pattrib->ether_type(%04x) != 0x888e\n", __func__, pattrib->ether_type); + RTW_INFO("DBG_TX_DROP_FRAME %s psta->ieee8021x_blocked == true, pattrib->ether_type(%04x) != 0x888e\n", __func__, pattrib->ether_type); #endif res = _FAIL; goto exit; @@ -935,7 +935,7 @@ static s32 update_attrib_sec_info(_adapter *padapter, struct pkt_attrib *pattrib } #ifdef CONFIG_TDLS - if (pattrib->direct_link == _TRUE) { + if (pattrib->direct_link == true) { if (pattrib->encrypt > 0) pattrib->encrypt = _AES_; } @@ -999,10 +999,10 @@ static s32 update_attrib_sec_info(_adapter *padapter, struct pkt_attrib *pattrib _rtw_memcpy(pattrib->dot118021x_UncstKey.skey, psta->dot118021x_UncstKey.skey, 16); if (pattrib->encrypt && - ((padapter->securitypriv.sw_encrypt == _TRUE) || (psecuritypriv->hw_decrypted == _FALSE))) { - pattrib->bswenc = _TRUE; + ((padapter->securitypriv.sw_encrypt == true) || (psecuritypriv->hw_decrypted == false))) { + pattrib->bswenc = true; } else { - pattrib->bswenc = _FALSE; + pattrib->bswenc = false; } #if defined(CONFIG_CONCURRENT_MODE) @@ -1010,11 +1010,11 @@ static s32 update_attrib_sec_info(_adapter *padapter, struct pkt_attrib *pattrib #endif if (pattrib->encrypt && bmcast && _rtw_camctl_chk_flags(padapter, SEC_STATUS_STA_PK_GK_CONFLICT_DIS_BMC_SEARCH)) - pattrib->bswenc = _TRUE; + pattrib->bswenc = true; #ifdef CONFIG_WAPI_SUPPORT if (pattrib->encrypt == _SMS4_) - pattrib->bswenc = _FALSE; + pattrib->bswenc = false; #endif exit: @@ -1085,13 +1085,13 @@ u8 rtw_check_tdls_established(_adapter *padapter, struct pkt_attrib *pattrib) { pattrib->ptdls_sta = NULL; - pattrib->direct_link = _FALSE; - if (padapter->tdlsinfo.link_established == _TRUE) { + pattrib->direct_link = false; + if (padapter->tdlsinfo.link_established == true) { pattrib->ptdls_sta = rtw_get_stainfo(&padapter->stapriv, pattrib->dst); if ((pattrib->ptdls_sta != NULL) && (pattrib->ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE) && (pattrib->ether_type != 0x0806)) { - pattrib->direct_link = _TRUE; + pattrib->direct_link = true; } } @@ -1184,14 +1184,14 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr _rtw_memcpy(pattrib->dst, ðerhdr.h_dest, ETH_ALEN); _rtw_memcpy(pattrib->src, ðerhdr.h_source, ETH_ALEN); - 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, adapter_mac_addr(padapter), ETH_ALEN); DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_adhoc); } else if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) { #ifdef CONFIG_TDLS - if (rtw_check_tdls_established(padapter, pattrib) == _TRUE) + if (rtw_check_tdls_established(padapter, pattrib) == true) _rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); /* For TDLS direct link Tx, set ra to be same to dst */ else #endif @@ -1225,7 +1225,7 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr #endif 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)) { DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_err_ucast_ap_link); res = _FAIL; goto exit; @@ -1277,13 +1277,13 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr } } else if (GET_IPV4_PROTOCOL(ip) == 0x06 /* TCP */ - && rtw_st_ctl_chk_reg_s_proto(&psta->st_ctl, 0x06) == _TRUE + && rtw_st_ctl_chk_reg_s_proto(&psta->st_ctl, 0x06) == true ) { u8 tcp[20]; _rtw_pktfile_read(&pktfile, tcp, 20); - if (rtw_st_ctl_chk_reg_rule(&psta->st_ctl, padapter, IPV4_SRC(ip), TCP_SRC(tcp), IPV4_DST(ip), TCP_DST(tcp)) == _TRUE) { + if (rtw_st_ctl_chk_reg_rule(&psta->st_ctl, padapter, IPV4_SRC(ip), TCP_SRC(tcp), IPV4_DST(ip), TCP_DST(tcp)) == true) { if (GET_TCP_SYN(tcp) && GET_TCP_ACK(tcp)) { session_tracker_add_cmd(padapter, psta , IPV4_SRC(ip), TCP_SRC(tcp) @@ -1361,7 +1361,7 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr set_qos(&pktfile, pattrib); } else { #ifdef CONFIG_TDLS - if (pattrib->direct_link == _TRUE) { + if (pattrib->direct_link == true) { if (pattrib->qos_en) set_qos(&pktfile, pattrib); } else @@ -1442,7 +1442,7 @@ static s32 xmitframe_addmic(_adapter *padapter, struct xmit_frame *pxmitframe) pframe = pxmitframe->buf_addr + hw_hdr_offset; 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; @@ -1450,7 +1450,7 @@ static s32 xmitframe_addmic(_adapter *padapter, struct xmit_frame *pxmitframe) /* start to calculate the mic code */ rtw_secmicsetkey(&micdata, psecuritypriv->dot118021XGrptxmickey[psecuritypriv->dot118021XGrpKeyid].skey); } else { - if (_rtw_memcmp(&pattrib->dot11tkiptxmickey.skey[0], null_key, 16) == _TRUE) { + if (_rtw_memcmp(&pattrib->dot11tkiptxmickey.skey[0], null_key, 16) == true) { /* DbgPrint("\nxmitframe_addmic:stainfo->dot11tkiptxmickey==0\n"); */ /* rtw_msleep_os(10); */ return _FAIL; @@ -1555,7 +1555,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; sint res = _SUCCESS; __le16 *fctrl = &pwlanhdr->frame_ctl; @@ -1589,16 +1589,16 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib) set_frame_sub_type(fctrl, pattrib->subtype); if (pattrib->subtype & WIFI_DATA_TYPE) { - if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)) { + if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)) { #ifdef CONFIG_TDLS - if (pattrib->direct_link == _TRUE) { + if (pattrib->direct_link == true) { /* TDLS data transfer, ToDS=0, FrDs=0 */ _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 (pattrib->qos_en) - qos_option = _TRUE; + qos_option = true; } else #endif /* CONFIG_TDLS */ { @@ -1611,9 +1611,9 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib) _rtw_memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN); 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); @@ -1621,15 +1621,15 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib) _rtw_memcpy(pwlanhdr->addr3, pattrib->src, ETH_ALEN); if (pattrib->qos_en) - qos_option = _TRUE; - } else if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) || - (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) { + qos_option = 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->ta, ETH_ALEN); _rtw_memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN); if (pattrib->qos_en) - qos_option = _TRUE; + qos_option = true; } else { res = _FAIL; goto exit; @@ -1684,7 +1684,7 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib) SetSeqNum(hdr, pattrib->seqnum); /* re-check if enable ampdu by BA_starting_seqctrl */ - if (pattrib->ampdu_en == _TRUE) { + if (pattrib->ampdu_en == true) { u16 tx_seq; tx_seq = psta->BA_starting_seqctrl[pattrib->priority & 0x0f]; @@ -1692,15 +1692,15 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib) /* check BA_starting_seqctrl */ if (SN_LESS(pattrib->seqnum, tx_seq)) { /* RTW_INFO("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 { /* RTW_INFO("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 */ } } @@ -1719,10 +1719,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) @@ -1917,7 +1917,7 @@ s32 rtw_make_tdls_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattr pattrib->encrypt = _AES_; pattrib->iv_len = 8; pattrib->icv_len = 8; - pattrib->bswenc = _FALSE; + pattrib->bswenc = false; } pattrib->mac_id = ptdls_sta->mac_id; } else { @@ -2063,29 +2063,29 @@ u32 rtw_calculate_wlan_pkt_size_by_attribue(struct pkt_attrib *pattrib) s32 check_amsdu(struct xmit_frame *pxmitframe) { struct pkt_attrib *pattrib; - s32 ret = _TRUE; + s32 ret = true; if (!pxmitframe) - ret = _FALSE; + ret = false; pattrib = &pxmitframe->attrib; if (IS_MCAST(pattrib->ra)) - ret = _FALSE; + ret = false; if ((pattrib->ether_type == 0x888e) || (pattrib->ether_type == 0x0806) || (pattrib->ether_type == 0x88b4) || (pattrib->dhcp_pkt == 1)) - ret = _FALSE; + ret = false; if ((pattrib->encrypt == _WEP40_) || (pattrib->encrypt == _WEP104_) || (pattrib->encrypt == _TKIP_)) - ret = _FALSE; + ret = false; if (!pattrib->qos_en) - ret = _FALSE; + ret = false; return ret; } @@ -2096,7 +2096,7 @@ s32 check_amsdu_tx_support(_adapter *padapter) int tx_amsdu; int tx_amsdu_rate; int current_tx_rate; - s32 ret = _FALSE; + s32 ret = false; pdvobjpriv = adapter_to_dvobj(padapter); tx_amsdu = padapter->tx_amsdu; @@ -2104,11 +2104,11 @@ s32 check_amsdu_tx_support(_adapter *padapter) current_tx_rate = pdvobjpriv->traffic_stat.cur_tx_tp; if (tx_amsdu == 1) - ret = _TRUE; + ret = true; else if (tx_amsdu == 2 && (tx_amsdu_rate == 0 || current_tx_rate > tx_amsdu_rate)) - ret = _TRUE; + ret = true; else - ret = _FALSE; + ret = false; return ret; } @@ -2414,7 +2414,7 @@ s32 rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxm frg_inx++; - if (bmcst || (rtw_endofpktfile(&pktfile) == _TRUE)) { + if (bmcst || (rtw_endofpktfile(&pktfile) == true)) { pattrib->nr_frags = frg_inx; pattrib->last_txcmdsz = pattrib->hdrlen + pattrib->iv_len + ((pattrib->nr_frags == 1) ? llc_sz : 0) + @@ -2440,7 +2440,7 @@ s32 rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxm xmitframe_swencrypt(padapter, pxmitframe); - if (bmcst == _FALSE) + if (bmcst == false) update_attrib_vcs_info(padapter, pxmitframe); else pattrib->vcs_mode = NONE_VCS; @@ -2488,7 +2488,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame _enter_critical_bh(&padapter->security_key_mutex, &irqL); /* IGTK key is not install, it may not support 802.11w */ - if (padapter->securitypriv.binstallBIPkey != _TRUE) { + if (padapter->securitypriv.binstallBIPkey != true) { RTW_INFO("no instll BIP key\n"); goto xmitframe_coalesce_success; } @@ -2743,7 +2743,7 @@ void rtw_count_tx_stats(PADAPTER padapter, struct xmit_frame *pxmitframe, int sz } #ifdef CONFIG_CHECK_LEAVE_LPS - /* traffic_check_for_leave_lps(padapter, _TRUE); */ + /* traffic_check_for_leave_lps(padapter, true); */ #endif /* CONFIG_LPS */ } @@ -2812,7 +2812,7 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv) _enter_critical(&pfree_queue->lock, &irqL); - if (_rtw_queue_empty(pfree_queue) == _TRUE) + if (_rtw_queue_empty(pfree_queue) == true) pxmitbuf = NULL; else { @@ -2879,7 +2879,7 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv) _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 { @@ -3007,7 +3007,7 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* (_queue *p _enter_critical_bh(&pfree_xmit_queue->lock, &irqL); - if (_rtw_queue_empty(pfree_xmit_queue) == _TRUE) { + if (_rtw_queue_empty(pfree_xmit_queue) == true) { pxframe = NULL; } else { phead = get_list_head(pfree_xmit_queue); @@ -3036,7 +3036,7 @@ struct xmit_frame *rtw_alloc_xmitframe_ext(struct xmit_priv *pxmitpriv) _enter_critical_bh(&queue->lock, &irqL); - if (_rtw_queue_empty(queue) == _TRUE) { + if (_rtw_queue_empty(queue) == true) { pxframe = NULL; } else { phead = get_list_head(queue); @@ -3146,7 +3146,7 @@ void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, _queue *pframequeue) 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); @@ -3178,7 +3178,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); rtw_list_delete(&pxmitframe->list); @@ -3198,7 +3198,7 @@ static struct xmit_frame *get_one_xmitframe(struct xmit_priv *pxmitpriv, struct 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); break; } @@ -3241,7 +3241,7 @@ static struct xmit_frame *rtw_get_xframe(struct xmit_priv *pxmitpriv, int *num_f 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); pframe_queue = &ptxservq->sta_pending; @@ -3297,7 +3297,7 @@ struct xmit_frame *rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmi 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); @@ -3524,7 +3524,7 @@ static int rtw_br_client_tx(_adapter *padapter, struct sk_buff **pskb) struct sk_buff *skb = *pskb; struct xmit_priv *pxmitpriv = &padapter->xmitpriv; unsigned long irqL; - /* if(check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == _TRUE) */ + /* if(check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true) */ { int res, is_vlan_tag = 0, i, do_nat25 = 1; unsigned short vlan_hdr = 0; @@ -3722,7 +3722,7 @@ static void do_queue_select(_adapter *padapter, struct pkt_attrib *pattrib) qsel = pattrib->priority; #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 @@ -3819,7 +3819,7 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev) update_monitor_frame_attrib(padapter, pattrib); - pattrib->retry_ctrl = _FALSE; + pattrib->retry_ctrl = false; memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); @@ -3860,7 +3860,7 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev) pattrib = &pmgntframe->attrib; update_mgntframe_attrib(padapter, pattrib); - pattrib->retry_ctrl = _FALSE; + pattrib->retry_ctrl = false; memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); @@ -3944,7 +3944,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) { rtw_free_xmitframe(pxmitpriv, pxmitframe); @@ -3986,7 +3986,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); DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue); return 1; @@ -3995,7 +3995,7 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt) #endif /* pre_xmitframe */ - if (rtw_hal_xmit(padapter, pxmitframe) == _FALSE) + if (rtw_hal_xmit(padapter, pxmitframe) == false) return 1; return 0; @@ -4004,7 +4004,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; unsigned long irqL; struct sta_info *ptdls_sta = NULL; @@ -4019,7 +4019,7 @@ sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_fra else if (ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE) { if (pattrib->triggered == 1) { - ret = _TRUE; + ret = true; return ret; } @@ -4060,7 +4060,7 @@ sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_fra if (ptdls_sta->sleepq_len == 1) rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_ISSUE_PTI); - ret = _TRUE; + ret = true; } _exit_critical_bh(&ptdls_sta->sleep_q.lock, &irqL); @@ -4077,14 +4077,14 @@ sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_fra inline bool xmitframe_hiq_filter(struct xmit_frame *xmitframe) { - bool allow = _FALSE; + bool allow = false; _adapter *adapter = xmitframe->padapter; struct registry_priv *registry = &adapter->registrypriv; if (rtw_get_intf_type(adapter) != RTW_PCIE) { if (adapter->registrypriv.wifi_spec == 1) - allow = _TRUE; + allow = true; else if (registry->hiq_filter == RTW_HIQ_FILTER_ALLOW_SPECIAL) { struct pkt_attrib *attrib = &xmitframe->attrib; @@ -4099,10 +4099,10 @@ inline bool xmitframe_hiq_filter(struct xmit_frame *xmitframe) if (0) RTW_INFO(FUNC_ADPT_FMT" ether_type:0x%04x%s\n", FUNC_ADPT_ARG(xmitframe->padapter) , attrib->ether_type, attrib->dhcp_pkt ? " DHCP" : ""); - allow = _TRUE; + allow = true; } } else if (registry->hiq_filter == RTW_HIQ_FILTER_ALLOW_ALL) - allow = _TRUE; + allow = true; else if (registry->hiq_filter == RTW_HIQ_FILTER_DENY_ALL) { } else rtw_warn_on(1); @@ -4115,20 +4115,20 @@ inline bool xmitframe_hiq_filter(struct xmit_frame *xmitframe) sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe) { unsigned long irqL; - sint ret = _FALSE; + sint ret = false; struct sta_info *psta = NULL; struct sta_priv *pstapriv = &padapter->stapriv; struct pkt_attrib *pattrib = &pxmitframe->attrib; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; sint bmcst = IS_MCAST(pattrib->ra); - bool update_tim = _FALSE; + bool update_tim = false; #ifdef CONFIG_TDLS - if (padapter->tdlsinfo.link_established == _TRUE) + if (padapter->tdlsinfo.link_established == true) ret = xmitframe_enqueue_for_tdls_sleeping_sta(padapter, pxmitframe); #endif /* CONFIG_TDLS */ - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _FALSE) { + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == false) { DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue_warn_fwstate); return ret; } @@ -4147,19 +4147,19 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p if (pattrib->psta != psta) { DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue_warn_sta); RTW_INFO("%s, pattrib->psta(%p) != psta(%p)\n", __func__, pattrib->psta, psta); - return _FALSE; + return false; } if (psta == NULL) { DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue_warn_nosta); RTW_INFO("%s, psta==NUL\n", __func__); - return _FALSE; + return false; } if (!(psta->state & _FW_LINKED)) { DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue_warn_link); RTW_INFO("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, psta->state); - return _FALSE; + return false; } if (pattrib->triggered == 1) { @@ -4167,7 +4167,7 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p /* RTW_INFO("directly xmit pspoll_triggered packet\n"); */ /* pattrib->triggered=0; */ - if (bmcst && xmitframe_hiq_filter(pxmitframe) == _TRUE) + if (bmcst && xmitframe_hiq_filter(pxmitframe) == true) pattrib->qsel = QSLT_HIGH;/* HIQ */ return ret; @@ -4188,23 +4188,23 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p psta->sleepq_len++; if (!(pstapriv->tim_bitmap & BIT(0))) - update_tim = _TRUE; + update_tim = true; pstapriv->tim_bitmap |= BIT(0); pstapriv->sta_dz_bitmap |= BIT(0); /* RTW_INFO("enqueue, sq_len=%d, tim=%x\n", psta->sleepq_len, pstapriv->tim_bitmap); */ - if (update_tim == _TRUE) { + if (update_tim == true) { if (is_broadcast_mac_addr(pattrib->ra)) - _update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "buffer BC"); + _update_beacon(padapter, _TIM_IE_, NULL, true, "buffer BC"); else - _update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "buffer MC"); + _update_beacon(padapter, _TIM_IE_, NULL, true, "buffer MC"); } else chk_bmc_sleepq_cmd(padapter); /*_exit_critical_bh(&psta->sleep_q.lock, &irqL);*/ - ret = _TRUE; + ret = true; DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue_mcast); @@ -4255,16 +4255,16 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p if (((psta->has_legacy_ac) && (!wmmps_ac)) || ((!psta->has_legacy_ac) && (wmmps_ac))) { if (!(pstapriv->tim_bitmap & BIT(psta->aid))) - update_tim = _TRUE; + update_tim = true; pstapriv->tim_bitmap |= BIT(psta->aid); /* RTW_INFO("enqueue, sq_len=%d, tim=%x\n", psta->sleepq_len, pstapriv->tim_bitmap); */ - if (update_tim == _TRUE) { + if (update_tim == true) { /* RTW_INFO("sleepq_len==1, update BCNTIM\n"); */ /* upate BCN for TIM IE */ - _update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "buffer UC"); + _update_beacon(padapter, _TIM_IE_, NULL, true, "buffer UC"); } } @@ -4275,7 +4275,7 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p /* wakeup_sta_to_xmit(padapter, psta); */ /* } */ - ret = _TRUE; + ret = true; DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue_ucast); } @@ -4301,7 +4301,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); plist = get_next(plist); @@ -4312,13 +4312,13 @@ static void dequeue_xmitframes_to_sleeping_queue(_adapter *padapter, struct sta_ ret = xmitframe_enqueue_for_sleeping_sta(padapter, pxmitframe); - if (_TRUE == ret) { + if (true == ret) { ptxservq = rtw_get_sta_pending(padapter, psta, pattrib->priority, (u8 *)(&ac_index)); ptxservq->qcnt--; phwxmits[ac_index].accnt--; } else { - /* RTW_INFO("xmitframe_enqueue_for_sleeping_sta return _FALSE\n"); */ + /* RTW_INFO("xmitframe_enqueue_for_sleeping_sta return false\n"); */ } } @@ -4393,7 +4393,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); xmitframe_plist = get_next(xmitframe_plist); @@ -4441,7 +4441,7 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta) /* _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); } @@ -4491,7 +4491,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); xmitframe_plist = get_next(xmitframe_plist); @@ -4507,7 +4507,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); } @@ -4539,11 +4539,11 @@ _exit: if (update_mask) { /* update_BCNTIM(padapter); */ if ((update_mask & (BIT(0) | BIT(1))) == (BIT(0) | BIT(1))) - _update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "clear UC&BMC"); + _update_beacon(padapter, _TIM_IE_, NULL, true, "clear UC&BMC"); else if ((update_mask & BIT(1)) == BIT(1)) - _update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "clear BMC"); + _update_beacon(padapter, _TIM_IE_, NULL, true, "clear BMC"); else - _update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "clear UC"); + _update_beacon(padapter, _TIM_IE_, NULL, true, "clear UC"); } } @@ -4563,7 +4563,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); xmitframe_plist = get_next(xmitframe_plist); @@ -4619,7 +4619,7 @@ void xmit_delivery_enabled_frames(_adapter *padapter, struct sta_info *psta) /* RTW_INFO("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, _TRUE); + update_beacon(padapter, _TIM_IE_, NULL, true); /* update_mask = BIT(0); */ } @@ -4677,7 +4677,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; phead = get_list_head(pqueue); @@ -4704,7 +4704,7 @@ static 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 = 0; @@ -4750,7 +4750,7 @@ static struct xmit_buf *dequeue_pending_xmitbuf_ext( _enter_critical_bh(&pqueue->lock, &irql); - if (_rtw_queue_empty(pqueue) == _FALSE) { + if (_rtw_queue_empty(pqueue) == false) { _list *plist, *phead; u8 type = 0; @@ -4781,7 +4781,7 @@ struct xmit_buf *select_and_dequeue_pending_xmitbuf(_adapter *padapter) struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_buf *pxmitbuf = NULL; - if (rtw_xmit_ac_blocked(padapter) == _TRUE) + if (rtw_xmit_ac_blocked(padapter) == true) pxmitbuf = dequeue_pending_xmitbuf_under_survey(pxmitpriv); else { pxmitbuf = dequeue_pending_xmitbuf_ext(pxmitpriv); @@ -4797,14 +4797,14 @@ sint check_pending_xmitbuf( { unsigned long irql; _queue *pqueue; - sint ret = _FALSE; + sint ret = false; pqueue = &pxmitpriv->pending_xmitbuf_queue; _enter_critical_bh(&pqueue->lock, &irql); - if (_rtw_queue_empty(pqueue) == _FALSE) - ret = _TRUE; + if (_rtw_queue_empty(pqueue) == false) + ret = true; _exit_critical_bh(&pqueue->lock, &irql); @@ -4838,7 +4838,7 @@ bool rtw_xmit_ac_blocked(_adapter *adapter) _adapter *iface; struct mlme_ext_priv *mlmeext; struct mlme_ext_info *mlmeextinfo; - bool blocked = _FALSE; + bool blocked = false; int i; for (i = 0; i < dvobj->iface_nums; i++) { @@ -4849,14 +4849,14 @@ bool rtw_xmit_ac_blocked(_adapter *adapter) if (mlmeext_scan_state(mlmeext) != SCAN_DISABLE && mlmeext_scan_state(mlmeext) != SCAN_BACK_OP ) { - blocked = _TRUE; + blocked = true; goto exit; } if (mlmeext_scan_state(mlmeext) == SCAN_BACK_OP && !mlmeext_chk_scan_backop_flags(mlmeext, SS_BACKOP_TX_RESUME) ) { - blocked = _TRUE; + blocked = true; goto exit; } } @@ -4865,7 +4865,7 @@ bool rtw_xmit_ac_blocked(_adapter *adapter) if (MCC_EN(adapter)) { if (rtw_hal_check_mcc_status(adapter, MCC_STATUS_DOING_MCC)) { if (MCC_STOP(adapter)) { - blocked = _TRUE; + blocked = true; goto exit; } } @@ -5067,9 +5067,9 @@ static 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; } } diff --git a/hal/HalPwrSeqCmd.c b/hal/HalPwrSeqCmd.c index de709b1..e030911 100644 --- a/hal/HalPwrSeqCmd.c +++ b/hal/HalPwrSeqCmd.c @@ -53,7 +53,7 @@ u8 HalPwrSeqCmdParsing( WLAN_PWR_CFG PwrSeqCmd[]) { WLAN_PWR_CFG PwrCfgCmd = {0}; - u8 bPollingBit = _FALSE; + u8 bPollingBit = false; u32 AryIdx = 0; u8 value = 0; u32 offset = 0; @@ -109,7 +109,7 @@ u8 HalPwrSeqCmdParsing( case PWR_CMD_POLLING: - bPollingBit = _FALSE; + bPollingBit = false; offset = GET_PWR_CFG_OFFSET(PwrCfgCmd); #ifdef CONFIG_GSPI_HCI if (GET_PWR_CFG_BASE(PwrCfgCmd) == PWR_BASEADDR_SDIO) @@ -125,13 +125,13 @@ u8 HalPwrSeqCmdParsing( value = value & GET_PWR_CFG_MASK(PwrCfgCmd); if (value == (GET_PWR_CFG_VALUE(PwrCfgCmd) & GET_PWR_CFG_MASK(PwrCfgCmd))) - bPollingBit = _TRUE; + bPollingBit = true; else rtw_udelay_os(10); if (pollingCount++ > maxPollingCnt) { RTW_ERR("HalPwrSeqCmdParsing: Fail to polling Offset[%#x]=%02x\n", offset, value); - return _FALSE; + return false; } } while (!bPollingBit); @@ -146,7 +146,7 @@ u8 HalPwrSeqCmdParsing( case PWR_CMD_END: /* When this command is parsed, end the process */ - return _TRUE; + return true; break; default: @@ -157,5 +157,5 @@ u8 HalPwrSeqCmdParsing( AryIdx++;/* Add Array Index */ } while (1); - return _TRUE; + return true; } diff --git a/hal/hal_btcoex.c b/hal/hal_btcoex.c index ea2fcd1..99021d3 100644 --- a/hal/hal_btcoex.c +++ b/hal/hal_btcoex.c @@ -214,7 +214,7 @@ typedef struct _btcoexdbginfo { BTCDBGINFO GLBtcDbgInfo; -#define BT_Operation(Adapter) _FALSE +#define BT_Operation(Adapter) false static void DBG_BT_INFO_INIT(PBTCDBGINFO pinfo, u8 *pbuf, u32 size) { @@ -257,8 +257,8 @@ static u8 halbtcoutsrc_IsBtCoexistAvailable(PBTC_COEXIST pBtCoexist) { if (!pBtCoexist->bBinded || NULL == pBtCoexist->Adapter) - return _FALSE; - return _TRUE; + return false; + return true; } static void halbtcoutsrc_DbgInit(void) @@ -274,8 +274,8 @@ static u8 halbtcoutsrc_IsCsrBtCoex(PBTC_COEXIST pBtCoexist) if (pBtCoexist->board_info.bt_chip_type == BTC_CHIP_CSR_BC4 || pBtCoexist->board_info.bt_chip_type == BTC_CHIP_CSR_BC8 ) - return _TRUE; - return _FALSE; + return true; + return false; } static u8 halbtcoutsrc_IsHwMailboxExist(PBTC_COEXIST pBtCoexist) @@ -283,11 +283,11 @@ static u8 halbtcoutsrc_IsHwMailboxExist(PBTC_COEXIST pBtCoexist) if (pBtCoexist->board_info.bt_chip_type == BTC_CHIP_CSR_BC4 || pBtCoexist->board_info.bt_chip_type == BTC_CHIP_CSR_BC8 ) - return _FALSE; + return false; else if (IS_HARDWARE_TYPE_8812(pBtCoexist->Adapter)) - return _FALSE; + return false; else - return _TRUE; + return true; } static void halbtcoutsrc_LeaveLps(PBTC_COEXIST pBtCoexist) @@ -297,8 +297,8 @@ static void halbtcoutsrc_LeaveLps(PBTC_COEXIST pBtCoexist) padapter = pBtCoexist->Adapter; - pBtCoexist->bt_info.bt_ctrl_lps = _TRUE; - pBtCoexist->bt_info.bt_lps_on = _FALSE; + pBtCoexist->bt_info.bt_ctrl_lps = true; + pBtCoexist->bt_info.bt_lps_on = false; rtw_btcoex_LPS_Leave(padapter); } @@ -310,9 +310,9 @@ void halbtcoutsrc_EnterLps(PBTC_COEXIST pBtCoexist) padapter = pBtCoexist->Adapter; - if (pBtCoexist->bdontenterLPS == _FALSE) { - pBtCoexist->bt_info.bt_ctrl_lps = _TRUE; - pBtCoexist->bt_info.bt_lps_on = _TRUE; + if (pBtCoexist->bdontenterLPS == false) { + pBtCoexist->bt_info.bt_ctrl_lps = true; + pBtCoexist->bt_info.bt_lps_on = true; rtw_btcoex_LPS_Enter(padapter); } @@ -327,9 +327,9 @@ void halbtcoutsrc_NormalLps(PBTC_COEXIST pBtCoexist) padapter = pBtCoexist->Adapter; if (pBtCoexist->bt_info.bt_ctrl_lps) { - pBtCoexist->bt_info.bt_lps_on = _FALSE; + pBtCoexist->bt_info.bt_lps_on = false; rtw_btcoex_LPS_Leave(padapter); - pBtCoexist->bt_info.bt_ctrl_lps = _FALSE; + pBtCoexist->bt_info.bt_ctrl_lps = false; } } @@ -359,7 +359,7 @@ void halbtcoutsrc_LeaveLowPower(PBTC_COEXIST pBtCoexist) timeout = 30; #endif /* !LPS_RPWM_WAIT_MS */ - if (GLBtcBtCoexAliveRegistered == _TRUE) + if (GLBtcBtCoexAliveRegistered == true) return; stime = rtw_get_current_time(); @@ -375,7 +375,7 @@ void halbtcoutsrc_LeaveLowPower(PBTC_COEXIST pBtCoexist) rtw_msleep_os(1); } while (1); - GLBtcBtCoexAliveRegistered = _TRUE; + GLBtcBtCoexAliveRegistered = true; #endif /* CONFIG_LPS_LCLK */ } @@ -388,13 +388,13 @@ void halbtcoutsrc_NormalLowPower(PBTC_COEXIST pBtCoexist) #ifdef CONFIG_LPS_LCLK PADAPTER padapter; - if (GLBtcBtCoexAliveRegistered == _FALSE) + if (GLBtcBtCoexAliveRegistered == false) return; padapter = pBtCoexist->Adapter; rtw_unregister_task_alive(padapter, BTCOEX_ALIVE); - GLBtcBtCoexAliveRegistered = _FALSE; + GLBtcBtCoexAliveRegistered = false; #endif /* CONFIG_LPS_LCLK */ } @@ -410,7 +410,7 @@ void halbtcoutsrc_DisableLowPower(PBTC_COEXIST pBtCoexist, u8 bLowPwrDisable) void halbtcoutsrc_AggregationCheck(PBTC_COEXIST pBtCoexist) { PADAPTER padapter; - bool bNeedToAct = _FALSE; + bool bNeedToAct = false; static u32 preTime = 0; u32 curTime = 0; @@ -429,24 +429,24 @@ void halbtcoutsrc_AggregationCheck(PBTC_COEXIST pBtCoexist) preTime = curTime; if (pBtCoexist->bt_info.reject_agg_pkt) { - bNeedToAct = _TRUE; + bNeedToAct = true; pBtCoexist->bt_info.pre_reject_agg_pkt = pBtCoexist->bt_info.reject_agg_pkt; } else { if (pBtCoexist->bt_info.pre_reject_agg_pkt) { - bNeedToAct = _TRUE; + bNeedToAct = true; pBtCoexist->bt_info.pre_reject_agg_pkt = pBtCoexist->bt_info.reject_agg_pkt; } if (pBtCoexist->bt_info.pre_bt_ctrl_agg_buf_size != pBtCoexist->bt_info.bt_ctrl_agg_buf_size) { - bNeedToAct = _TRUE; + bNeedToAct = true; pBtCoexist->bt_info.pre_bt_ctrl_agg_buf_size = pBtCoexist->bt_info.bt_ctrl_agg_buf_size; } if (pBtCoexist->bt_info.bt_ctrl_agg_buf_size) { if (pBtCoexist->bt_info.pre_agg_buf_size != pBtCoexist->bt_info.agg_buf_size) - bNeedToAct = _TRUE; + bNeedToAct = true; pBtCoexist->bt_info.pre_agg_buf_size = pBtCoexist->bt_info.agg_buf_size; } } @@ -478,11 +478,11 @@ u8 halbtcoutsrc_is_fw_ready(PBTC_COEXIST pBtCoexist) u8 halbtcoutsrc_IsWifiBusy(PADAPTER padapter) { if (rtw_mi_check_status(padapter, MI_AP_MODE)) - return _TRUE; - if (rtw_mi_busy_traffic_check(padapter, _FALSE)) - return _TRUE; + return true; + if (rtw_mi_busy_traffic_check(padapter, false)) + return true; - return _FALSE; + return false; } static u32 _halbtcoutsrc_GetWifiLinkStatus(PADAPTER padapter) @@ -493,22 +493,22 @@ static u32 _halbtcoutsrc_GetWifiLinkStatus(PADAPTER padapter) pmlmepriv = &padapter->mlmepriv; - bp2p = _FALSE; + bp2p = false; portConnectedStatus = 0; #ifdef CONFIG_P2P if (!rtw_p2p_chk_state(&padapter->wdinfo, P2P_STATE_NONE)) - bp2p = _TRUE; + bp2p = true; #endif /* CONFIG_P2P */ - if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE) == _TRUE) { - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) { - if (_TRUE == bp2p) + if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE) == true) { + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) { + if (true == bp2p) portConnectedStatus |= WIFI_P2P_GO_CONNECTED; else portConnectedStatus |= WIFI_AP_CONNECTED; } else { - if (_TRUE == bp2p) + if (true == bp2p) portConnectedStatus |= WIFI_P2P_GC_CONNECTED; else portConnectedStatus |= WIFI_STA_CONNECTED; @@ -654,7 +654,7 @@ exit: u32 halbtcoutsrc_GetBtPatchVer(PBTC_COEXIST pBtCoexist) { if (pBtCoexist->bt_info.get_bt_fw_ver_cnt <= 5) { - if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) { + if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == true) { unsigned long irqL; u8 ret; @@ -675,7 +675,7 @@ u32 halbtcoutsrc_GetBtPatchVer(PBTC_COEXIST pBtCoexist) buf[0] = 0x0; /* OP_Code */ buf[1] = 0x0; /* OP_Code_Length */ - BT_SendEventExtBtCoexControl(pBtCoexist->Adapter, _FALSE, dataLen, &buf[0]); + BT_SendEventExtBtCoexControl(pBtCoexist->Adapter, false, dataLen, &buf[0]); #endif /* !CONFIG_BT_COEXIST_SOCKET_TRX */ } } @@ -704,7 +704,7 @@ u32 halbtcoutsrc_GetBtCoexSupportedFeature(void *pBtcContext) pBtCoexist = (PBTC_COEXIST)pBtcContext; - if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) { + if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == true) { u8 buf[3] = {0}; unsigned long irqL; u8 op_code; @@ -735,7 +735,7 @@ u32 halbtcoutsrc_GetBtCoexSupportedVersion(void *pBtcContext) pBtCoexist = (PBTC_COEXIST)pBtcContext; - if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) { + if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == true) { u8 buf[3] = {0}; unsigned long irqL; u8 op_code; @@ -768,7 +768,7 @@ static u8 halbtcoutsrc_GetWifiScanAPNum(PADAPTER padapter) pmlmepriv = &padapter->mlmepriv; pmlmeext = &padapter->mlmeextpriv; - if (GLBtcWiFiInScanState == _FALSE) { + if (GLBtcWiFiInScanState == false) { if (pmlmepriv->num_of_scanned > 0xFF) scan_AP_num = 0xFF; else @@ -794,28 +794,28 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf) pBtCoexist = (PBTC_COEXIST)pBtcContext; if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist)) - return _FALSE; + return false; padapter = pBtCoexist->Adapter; pHalData = GET_HAL_DATA(padapter); mlmeext = &padapter->mlmeextpriv; - bSoftApExist = _FALSE; - bVwifiExist = _FALSE; + bSoftApExist = false; + bVwifiExist = false; pu8 = (u8 *)pOutBuf; pS4Tmp = (s32 *)pOutBuf; pU4Tmp = (u32 *)pOutBuf; pU1Tmp = (u8 *)pOutBuf; - ret = _TRUE; + ret = true; switch (getType) { case BTC_GET_BL_HS_OPERATION: - *pu8 = _FALSE; - ret = _FALSE; + *pu8 = false; + ret = false; break; case BTC_GET_BL_HS_CONNECTING: - *pu8 = _FALSE; - ret = _FALSE; + *pu8 = false; + ret = false; break; case BTC_GET_BL_WIFI_FW_READY: @@ -823,7 +823,7 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf) break; case BTC_GET_BL_WIFI_CONNECTED: - *pu8 = (rtw_mi_check_status(padapter, MI_LINKED)) ? _TRUE : _FALSE; + *pu8 = (rtw_mi_check_status(padapter, MI_LINKED)) ? true : false; break; case BTC_GET_BL_WIFI_BUSY: @@ -837,49 +837,49 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf) break; case BTC_GET_BL_WIFI_LINK: - *pu8 = (rtw_mi_check_status(padapter, MI_STA_LINKING)) ? _TRUE : _FALSE; + *pu8 = (rtw_mi_check_status(padapter, MI_STA_LINKING)) ? true : false; break; case BTC_GET_BL_WIFI_ROAM: - *pu8 = (rtw_mi_check_status(padapter, MI_STA_LINKING)) ? _TRUE : _FALSE; + *pu8 = (rtw_mi_check_status(padapter, MI_STA_LINKING)) ? true : false; break; case BTC_GET_BL_WIFI_4_WAY_PROGRESS: - *pu8 = _FALSE; + *pu8 = false; break; case BTC_GET_BL_WIFI_UNDER_5G: - *pu8 = (pHalData->current_band_type == 1) ? _TRUE : _FALSE; + *pu8 = (pHalData->current_band_type == 1) ? true : false; break; case BTC_GET_BL_WIFI_AP_MODE_ENABLE: - *pu8 = (rtw_mi_check_status(padapter, MI_AP_MODE)) ? _TRUE : _FALSE; + *pu8 = (rtw_mi_check_status(padapter, MI_AP_MODE)) ? true : false; break; case BTC_GET_BL_WIFI_ENABLE_ENCRYPTION: - *pu8 = padapter->securitypriv.dot11PrivacyAlgrthm == 0 ? _FALSE : _TRUE; + *pu8 = padapter->securitypriv.dot11PrivacyAlgrthm == 0 ? false : true; break; case BTC_GET_BL_WIFI_UNDER_B_MODE: if (mlmeext->cur_wireless_mode == WIRELESS_11B) - *pu8 = _TRUE; + *pu8 = true; else - *pu8 = _FALSE; + *pu8 = false; break; case BTC_GET_BL_WIFI_IS_IN_MP_MODE: if (padapter->registrypriv.mp_mode == 0) - *pu8 = _FALSE; + *pu8 = false; else - *pu8 = _TRUE; + *pu8 = true; break; case BTC_GET_BL_EXT_SWITCH: - *pu8 = _FALSE; + *pu8 = false; break; case BTC_GET_BL_IS_ASUS_8723B: - /* Always return FALSE in linux driver since this case is added only for windows driver */ - *pu8 = _FALSE; + /* Always return false in linux driver since this case is added only for windows driver */ + *pu8 = false; break; case BTC_GET_S4_WIFI_RSSI: @@ -888,7 +888,7 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf) case BTC_GET_S4_HS_RSSI: *pS4Tmp = 0; - ret = _FALSE; + ret = false; break; case BTC_GET_U4_WIFI_BW: @@ -974,7 +974,7 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf) case BTC_GET_U1_WIFI_HS_CHNL: *pU1Tmp = 0; - ret = _FALSE; + ret = false; break; case BTC_GET_U1_WIFI_P2P_CHNL: @@ -1033,7 +1033,7 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf) break; default: - ret = _FALSE; + ret = false; break; } @@ -1057,10 +1057,10 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf) pu8 = (u8 *)pInBuf; pU1Tmp = (u8 *)pInBuf; pU4Tmp = (u32 *)pInBuf; - ret = _TRUE; + ret = true; if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist)) - return _FALSE; + return false; switch (setType) { /* set some u8 type variables. */ @@ -1115,7 +1115,7 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf) /* the following are some action which will be triggered */ case BTC_SET_ACT_GET_BT_RSSI: - ret = _FALSE; + ret = false; break; case BTC_SET_ACT_AGGREGATE_CTRL: @@ -1156,13 +1156,13 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf) case BTC_SET_ACT_UPDATE_RAMASK: pBtCoexist->bt_info.ra_mask = *pU4Tmp; - if (check_fwstate(&padapter->mlmepriv, WIFI_ASOC_STATE) == _TRUE) { + if (check_fwstate(&padapter->mlmepriv, WIFI_ASOC_STATE) == true) { struct sta_info *psta; PWLAN_BSSID_EX cur_network; cur_network = &padapter->mlmeextpriv.mlmext_info.network; psta = rtw_get_stainfo(&padapter->stapriv, cur_network->MacAddress); - rtw_hal_update_ra_mask(psta, psta->rssi_level, _FALSE); + rtw_hal_update_ra_mask(psta, psta->rssi_level, false); } break; @@ -1178,7 +1178,7 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf) else if (*pU1Tmp == 1) newMimoPsMode = WLAN_HT_CAP_SM_PS_DISABLED; - if (check_fwstate(&padapter->mlmepriv , WIFI_ASOC_STATE) == _TRUE) { + if (check_fwstate(&padapter->mlmepriv , WIFI_ASOC_STATE) == true) { /* issue_action_SM_PS(padapter, get_my_bssid(&(pmlmeinfo->network)), newMimoPsMode); */ issue_action_SM_PS_wait_ack(padapter , get_my_bssid(&(pmlmeinfo->network)) , newMimoPsMode, 3 , 1); } @@ -1195,7 +1195,7 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf) BT_SendEventExtBtInfoControl(padapter, dataLen, &tmpBuf[0]); } #else /* !CONFIG_BT_COEXIST_SOCKET_TRX */ - ret = _FALSE; + ret = false; #endif /* CONFIG_BT_COEXIST_SOCKET_TRX */ break; @@ -1206,18 +1206,18 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf) u8 tmpBuf[BTC_TMP_BUF_SHORT]; if (dataLen) _rtw_memcpy(tmpBuf, pU1Tmp + 1, dataLen); - BT_SendEventExtBtCoexControl(padapter, _FALSE, dataLen, &tmpBuf[0]); + BT_SendEventExtBtCoexControl(padapter, false, dataLen, &tmpBuf[0]); } #else /* !CONFIG_BT_COEXIST_SOCKET_TRX */ - ret = _FALSE; + ret = false; #endif /* CONFIG_BT_COEXIST_SOCKET_TRX */ break; case BTC_SET_ACT_CTRL_8723B_ANT: - ret = _FALSE; + ret = false; break; /* ===================== */ default: - ret = _FALSE; + ret = false; break; } @@ -1232,21 +1232,21 @@ u8 halbtcoutsrc_UnderIps(PBTC_COEXIST pBtCoexist) padapter = pBtCoexist->Adapter; pwrpriv = &padapter->dvobj->pwrctl_priv; - bMacPwrCtrlOn = _FALSE; + bMacPwrCtrlOn = false; - if ((_TRUE == pwrpriv->bips_processing) + if ((true == pwrpriv->bips_processing) && (IPS_NONE != pwrpriv->ips_mode_req) ) - return _TRUE; + return true; if (rf_off == pwrpriv->rf_pwrstate) - return _TRUE; + return true; rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); - if (_FALSE == bMacPwrCtrlOn) - return _TRUE; + if (false == bMacPwrCtrlOn) + return true; - return _FALSE; + return false; } u8 halbtcoutsrc_UnderLps(PBTC_COEXIST pBtCoexist) @@ -1257,7 +1257,7 @@ u8 halbtcoutsrc_UnderLps(PBTC_COEXIST pBtCoexist) u8 halbtcoutsrc_Under32K(PBTC_COEXIST pBtCoexist) { /* todo: the method to check whether wifi is under 32K or not */ - return _FALSE; + return false; } void halbtcoutsrc_DisplayCoexStatistics(PBTC_COEXIST pBtCoexist) @@ -1286,10 +1286,10 @@ void halbtcoutsrc_DisplayWifiStatus(PBTC_COEXIST pBtCoexist) struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); u8 *cliBuf = pBtCoexist->cli_buf; s32 wifiRssi = 0, btHsRssi = 0; - bool bScan = _FALSE, bLink = _FALSE, bRoam = _FALSE, bWifiBusy = _FALSE, bWifiUnderBMode = _FALSE; + bool bScan = false, bLink = false, bRoam = false, bWifiBusy = false, bWifiUnderBMode = false; u32 wifiBw = BTC_WIFI_BW_HT20, wifiTrafficDir = BTC_WIFI_TRAFFIC_TX, wifiFreq = BTC_FREQ_2_4G; u32 wifiLinkStatus = 0x0; - bool bBtHsOn = _FALSE, bLowPower = _FALSE; + bool bBtHsOn = false, bLowPower = false; u8 wifiChnl = 0, wifiP2PChnl = 0, nScanAPNum = 0, FwPSState; u32 iqk_cnt_total = 0, iqk_cnt_ok = 0, iqk_cnt_fail = 0; @@ -1312,7 +1312,7 @@ void halbtcoutsrc_DisplayWifiStatus(PBTC_COEXIST pBtCoexist) pBtCoexist->btc_get(pBtCoexist, BTC_GET_U4_WIFI_IQK_FAIL, &iqk_cnt_fail); CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d/ %d/ %d %s %s", "IQK All/ OK/ Fail/AutoLoad/FWDL", iqk_cnt_total, iqk_cnt_ok, iqk_cnt_fail, - ((halbtcoutsrc_is_autoload_fail(pBtCoexist) == _TRUE) ? "fail":"ok"), ((halbtcoutsrc_is_fw_ready(pBtCoexist) == _TRUE) ? "ok":"fail")); + ((halbtcoutsrc_is_autoload_fail(pBtCoexist) == true) ? "fail":"ok"), ((halbtcoutsrc_is_fw_ready(pBtCoexist) == true) ? "ok":"fail")); CL_PRINTF(cliBuf); if (wifiLinkStatus & WIFI_STA_CONNECTED) { @@ -1342,9 +1342,9 @@ void halbtcoutsrc_DisplayWifiStatus(PBTC_COEXIST pBtCoexist) /* power status */ CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %s%s%s", "Power Status", \ - ((halbtcoutsrc_UnderIps(pBtCoexist) == _TRUE) ? "IPS ON" : "IPS OFF"), - ((halbtcoutsrc_UnderLps(pBtCoexist) == _TRUE) ? ", LPS ON" : ", LPS OFF"), - ((halbtcoutsrc_Under32K(pBtCoexist) == _TRUE) ? ", 32k" : "")); + ((halbtcoutsrc_UnderIps(pBtCoexist) == true) ? "IPS ON" : "IPS OFF"), + ((halbtcoutsrc_UnderLps(pBtCoexist) == true) ? ", LPS ON" : ", LPS OFF"), + ((halbtcoutsrc_Under32K(pBtCoexist) == true) ? ", 32k" : "")); CL_PRINTF(cliBuf); CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %02x %02x %02x %02x %02x %02x (0x%x/0x%x)", "Power mode cmd(lps/rpwm)", \ @@ -1547,7 +1547,7 @@ u16 halbtcoutsrc_SetBtReg(void *pBtcContext, u8 RegType, u32 RegAddr, u32 Data) pBtCoexist = (PBTC_COEXIST)pBtcContext; - if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) { + if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == true) { u8 buf[3] = {0}; unsigned long irqL; u8 op_code; @@ -1578,8 +1578,8 @@ u16 halbtcoutsrc_SetBtReg(void *pBtcContext, u8 RegType, u32 RegAddr, u32 Data) u8 halbtcoutsrc_SetBtAntDetection(void *pBtcContext, u8 txTime, u8 btChnl) { - /* Always return _FALSE since we don't implement this yet */ - return _FALSE; + /* Always return false since we don't implement this yet */ + return false; } bool @@ -1588,8 +1588,8 @@ halbtcoutsrc_SetBtTRXMASK( IN u8 bt_trx_mask ) { - /* Always return _FALSE since we don't implement this yet */ - return _FALSE; + /* Always return false since we don't implement this yet */ + return false; } u16 halbtcoutsrc_GetBtReg_with_status(void *pBtcContext, u8 RegType, u32 RegAddr, u32 *data) @@ -1599,7 +1599,7 @@ u16 halbtcoutsrc_GetBtReg_with_status(void *pBtcContext, u8 RegType, u32 RegAddr pBtCoexist = (PBTC_COEXIST)pBtcContext; - if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) { + if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == true) { u8 buf[3] = {0}; unsigned long irqL; u8 op_code; @@ -1762,7 +1762,7 @@ u8 halbtcoutsrc_GetBleScanTypeFromBt(void *pBtcContext) pBtCoexist = (PBTC_COEXIST)pBtcContext; - if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) { + if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == true) { u8 buf[3] = {0}; unsigned long irqL; u8 op_code; @@ -1794,7 +1794,7 @@ u32 halbtcoutsrc_GetBleScanParaFromBt(void *pBtcContext, u8 scanType) pBtCoexist = (PBTC_COEXIST)pBtcContext; - if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) { + if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == true) { u8 buf[3] = {0}; unsigned long irqL; u8 op_code; @@ -1830,8 +1830,8 @@ u8 halbtcoutsrc_GetBtAFHMapFromBt(void *pBtcContext, u8 mapType, u8 *afhMap) u8 status; u32 ret = BT_STATUS_BT_OP_SUCCESS; - if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _FALSE) - return _FALSE; + if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == false) + return false; buf[0] = 0; buf[1] = mapType; @@ -1869,7 +1869,7 @@ exit: _exit_critical_mutex(&GLBtcBtMpOperLock, &irqL); - return (ret == BT_STATUS_BT_OP_SUCCESS) ? _TRUE : _FALSE; + return (ret == BT_STATUS_BT_OP_SUCCESS) ? true : false; } u32 halbtcoutsrc_GetPhydmVersion(void *pBtcContext) @@ -1904,22 +1904,22 @@ u8 EXhalbtcoutsrc_BindBtCoexWithAdapter(void *padapter) HAL_DATA_TYPE *pHalData = GET_HAL_DATA((PADAPTER)padapter); if (pBtCoexist->bBinded) - return _FALSE; + return false; else - pBtCoexist->bBinded = _TRUE; + pBtCoexist->bBinded = true; pBtCoexist->statistics.cnt_bind++; pBtCoexist->Adapter = padapter; pBtCoexist->odm_priv = (void *)&(pHalData->odmpriv); - pBtCoexist->stack_info.profile_notified = _FALSE; + pBtCoexist->stack_info.profile_notified = false; - pBtCoexist->bt_info.bt_ctrl_agg_buf_size = _FALSE; + pBtCoexist->bt_info.bt_ctrl_agg_buf_size = false; pBtCoexist->bt_info.agg_buf_size = 5; - pBtCoexist->bt_info.increase_scan_dev_num = _FALSE; - pBtCoexist->bt_info.miracast_plus_bt = _FALSE; + pBtCoexist->bt_info.increase_scan_dev_num = false; + pBtCoexist->bt_info.miracast_plus_bt = false; antNum = rtw_btcoex_get_pg_ant_num((PADAPTER)padapter); EXhalbtcoutsrc_SetAntNum(BT_COEX_ANT_TYPE_PG, antNum); @@ -1932,7 +1932,7 @@ u8 EXhalbtcoutsrc_BindBtCoexWithAdapter(void *padapter) /* set default antenna position to main port */ pBtCoexist->board_info.btdm_ant_pos = BTC_ANTENNA_AT_MAIN_PORT; - pBtCoexist->board_info.btdm_ant_det_finish = _FALSE; + pBtCoexist->board_info.btdm_ant_det_finish = false; pBtCoexist->board_info.btdm_ant_num_by_ant_det = 1; pBtCoexist->board_info.tfbga_package = rtw_btcoex_is_tfbga_package_type((PADAPTER)padapter); @@ -1941,7 +1941,7 @@ u8 EXhalbtcoutsrc_BindBtCoexWithAdapter(void *padapter) pBtCoexist->board_info.ant_div_cfg = rtw_btcoex_get_ant_div_cfg((PADAPTER)padapter); - return _TRUE; + return true; } u8 EXhalbtcoutsrc_InitlizeVariables(void *padapter) @@ -1995,15 +1995,15 @@ u8 EXhalbtcoutsrc_InitlizeVariables(void *padapter) pBtCoexist->cli_buf = &GLBtcDbgBuf[0]; - GLBtcWiFiInScanState = _FALSE; + GLBtcWiFiInScanState = false; - GLBtcWiFiInIQKState = _FALSE; + GLBtcWiFiInIQKState = false; - GLBtcWiFiInIPS = _FALSE; + GLBtcWiFiInIPS = false; - GLBtcWiFiInLPS = _FALSE; + GLBtcWiFiInLPS = false; - GLBtcBtCoexAliveRegistered = _FALSE; + GLBtcBtCoexAliveRegistered = false; /* BT Control H2C/C2H*/ GLBtcBtMpOperSeq = 0; @@ -2018,7 +2018,7 @@ u8 EXhalbtcoutsrc_InitlizeVariables(void *padapter) GLBtcBtMpRptWiFiOK = 0; GLBtcBtMpRptBTOK = 0; - return _TRUE; + return true; } void EXhalbtcoutsrc_PowerOnSetting(PBTC_COEXIST pBtCoexist) @@ -2188,7 +2188,7 @@ void EXhalbtcoutsrc_init_coex_dm(PBTC_COEXIST pBtCoexist) ex_halbtc8821c1ant_init_coex_dm(pBtCoexist); } - pBtCoexist->initilized = _TRUE; + pBtCoexist->initilized = true; } void EXhalbtcoutsrc_ips_notify(PBTC_COEXIST pBtCoexist, u8 type) @@ -2204,10 +2204,10 @@ void EXhalbtcoutsrc_ips_notify(PBTC_COEXIST pBtCoexist, u8 type) if (IPS_NONE == type) { ipsType = BTC_IPS_LEAVE; - GLBtcWiFiInIPS = _FALSE; + GLBtcWiFiInIPS = false; } else { ipsType = BTC_IPS_ENTER; - GLBtcWiFiInIPS = _TRUE; + GLBtcWiFiInIPS = true; } /* All notify is called in cmd thread, don't need to leave low power again @@ -2270,10 +2270,10 @@ void EXhalbtcoutsrc_lps_notify(PBTC_COEXIST pBtCoexist, u8 type) if (PS_MODE_ACTIVE == type) { lpsType = BTC_LPS_DISABLE; - GLBtcWiFiInLPS = _FALSE; + GLBtcWiFiInLPS = false; } else { lpsType = BTC_LPS_ENABLE; - GLBtcWiFiInLPS = _TRUE; + GLBtcWiFiInLPS = true; } if (IS_HARDWARE_TYPE_8821(pBtCoexist->Adapter)) { @@ -2329,10 +2329,10 @@ void EXhalbtcoutsrc_scan_notify(PBTC_COEXIST pBtCoexist, u8 type) if (type) { scanType = BTC_SCAN_START; - GLBtcWiFiInScanState = _TRUE; + GLBtcWiFiInScanState = true; } else { scanType = BTC_SCAN_FINISH; - GLBtcWiFiInScanState = _FALSE; + GLBtcWiFiInScanState = false; } /* All notify is called in cmd thread, don't need to leave low power again @@ -2781,21 +2781,21 @@ void EXhalbtcoutsrc_CoexDmSwitch(PBTC_COEXIST pBtCoexist) if (IS_HARDWARE_TYPE_8723B(pBtCoexist->Adapter)) { if (pBtCoexist->board_info.btdm_ant_num == 1) { - pBtCoexist->stop_coex_dm = TRUE; + pBtCoexist->stop_coex_dm = true; ex_halbtc8723b1ant_coex_dm_reset(pBtCoexist); EXhalbtcoutsrc_SetAntNum(BT_COEX_ANT_TYPE_DETECTED, 2); - ex_halbtc8723b2ant_init_hw_config(pBtCoexist, FALSE); + ex_halbtc8723b2ant_init_hw_config(pBtCoexist, false); ex_halbtc8723b2ant_init_coex_dm(pBtCoexist); - pBtCoexist->stop_coex_dm = FALSE; + pBtCoexist->stop_coex_dm = false; } } else if (IS_HARDWARE_TYPE_8723D(pBtCoexist->Adapter)) { if (pBtCoexist->board_info.btdm_ant_num == 1) { - pBtCoexist->stop_coex_dm = TRUE; + pBtCoexist->stop_coex_dm = true; ex_halbtc8723d1ant_coex_dm_reset(pBtCoexist); EXhalbtcoutsrc_SetAntNum(BT_COEX_ANT_TYPE_DETECTED, 2); - ex_halbtc8723d2ant_init_hw_config(pBtCoexist, FALSE); + ex_halbtc8723d2ant_init_hw_config(pBtCoexist, false); ex_halbtc8723d2ant_init_coex_dm(pBtCoexist); - pBtCoexist->stop_coex_dm = FALSE; + pBtCoexist->stop_coex_dm = false; } } @@ -2894,41 +2894,41 @@ void EXhalbtcoutsrc_StackUpdateProfileInfo(void) if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist)) return; - pBtCoexist->stack_info.profile_notified = _TRUE; + pBtCoexist->stack_info.profile_notified = true; pBtCoexist->stack_info.num_of_link = pBtMgnt->ExtConfig.NumberOfACL + pBtMgnt->ExtConfig.NumberOfSCO; /* reset first */ - pBtCoexist->stack_info.bt_link_exist = _FALSE; - pBtCoexist->stack_info.sco_exist = _FALSE; - pBtCoexist->stack_info.acl_exist = _FALSE; - pBtCoexist->stack_info.a2dp_exist = _FALSE; - pBtCoexist->stack_info.hid_exist = _FALSE; + pBtCoexist->stack_info.bt_link_exist = false; + pBtCoexist->stack_info.sco_exist = false; + pBtCoexist->stack_info.acl_exist = false; + pBtCoexist->stack_info.a2dp_exist = false; + pBtCoexist->stack_info.hid_exist = false; pBtCoexist->stack_info.num_of_hid = 0; - pBtCoexist->stack_info.pan_exist = _FALSE; + pBtCoexist->stack_info.pan_exist = false; if (!pBtMgnt->ExtConfig.NumberOfACL) pBtCoexist->stack_info.min_bt_rssi = 0; if (pBtCoexist->stack_info.num_of_link) { - pBtCoexist->stack_info.bt_link_exist = _TRUE; + pBtCoexist->stack_info.bt_link_exist = true; if (pBtMgnt->ExtConfig.NumberOfSCO) - pBtCoexist->stack_info.sco_exist = _TRUE; + pBtCoexist->stack_info.sco_exist = true; if (pBtMgnt->ExtConfig.NumberOfACL) - pBtCoexist->stack_info.acl_exist = _TRUE; + pBtCoexist->stack_info.acl_exist = true; } for (i = 0; i < pBtMgnt->ExtConfig.NumberOfACL; i++) { if (BT_PROFILE_A2DP == pBtMgnt->ExtConfig.aclLink[i].BTProfile) - pBtCoexist->stack_info.a2dp_exist = _TRUE; + pBtCoexist->stack_info.a2dp_exist = true; else if (BT_PROFILE_PAN == pBtMgnt->ExtConfig.aclLink[i].BTProfile) - pBtCoexist->stack_info.pan_exist = _TRUE; + pBtCoexist->stack_info.pan_exist = true; else if (BT_PROFILE_HID == pBtMgnt->ExtConfig.aclLink[i].BTProfile) { - pBtCoexist->stack_info.hid_exist = _TRUE; + pBtCoexist->stack_info.hid_exist = true; pBtCoexist->stack_info.num_of_hid++; } else - pBtCoexist->stack_info.unknown_acl_exist = _TRUE; + pBtCoexist->stack_info.unknown_acl_exist = true; } #endif /* CONFIG_BT_COEXIST_SOCKET_TRX */ } @@ -3086,7 +3086,7 @@ void ex_halbtcoutsrc_pta_off_on_notify(PBTC_COEXIST pBtCoexist, u8 bBTON) { if (IS_HARDWARE_TYPE_8812(pBtCoexist->Adapter)) { if (pBtCoexist->board_info.btdm_ant_num == 2) - ex_halbtc8812a2ant_pta_off_on_notify(pBtCoexist, (bBTON == _TRUE) ? BTC_BT_ON : BTC_BT_OFF); + ex_halbtc8812a2ant_pta_off_on_notify(pBtCoexist, (bBTON == true) ? BTC_BT_ON : BTC_BT_OFF); } } @@ -3187,8 +3187,8 @@ void hal_btcoex_SetBTCoexist(PADAPTER padapter, u8 bBtExist) * Check is co-exist mechanism enabled or not * * Return: - * _TRUE Enable BT co-exist mechanism - * _FALSE Disable BT co-exist mechanism + * true Enable BT co-exist mechanism + * false Disable BT co-exist mechanism */ u8 hal_btcoex_IsBtExist(PADAPTER padapter) { @@ -3202,12 +3202,12 @@ u8 hal_btcoex_IsBtExist(PADAPTER padapter) u8 hal_btcoex_IsBtDisabled(PADAPTER padapter) { if (!hal_btcoex_IsBtExist(padapter)) - return _TRUE; + return true; if (GLBtCoexist.bt_info.bt_disabled) - return _TRUE; + return true; else - return _FALSE; + return false; } void hal_btcoex_SetChipType(PADAPTER padapter, u8 chipType) @@ -3299,7 +3299,7 @@ void hal_btcoex_IQKNotify(PADAPTER padapter, u8 state) void hal_btcoex_BtInfoNotify(PADAPTER padapter, u8 length, u8 *tmpBuf) { - if (GLBtcWiFiInIQKState == _TRUE) + if (GLBtcWiFiInIQKState == true) return; EXhalbtcoutsrc_bt_info_notify(&GLBtCoexist, tmpBuf, length); @@ -3366,7 +3366,7 @@ void hal_btcoex_HaltNotify(PADAPTER padapter, u8 do_halt) if (do_halt == 1) EXhalbtcoutsrc_halt_notify(&GLBtCoexist); - GLBtCoexist.bBinded = _FALSE; + GLBtCoexist.bBinded = false; GLBtCoexist.Adapter = NULL; } @@ -3409,47 +3409,47 @@ void hal_btcoex_SetManualControl(PADAPTER padapter, u8 bmanual) u8 hal_btcoex_1Ant(PADAPTER padapter) { - if (hal_btcoex_IsBtExist(padapter) == _FALSE) - return _FALSE; + if (hal_btcoex_IsBtExist(padapter) == false) + return false; if (GLBtCoexist.board_info.btdm_ant_num == 1) - return _TRUE; + return true; - return _FALSE; + return false; } u8 hal_btcoex_IsBtControlLps(PADAPTER padapter) { - if (GLBtCoexist.bdontenterLPS == _TRUE) - return _TRUE; + if (GLBtCoexist.bdontenterLPS == true) + return true; - if (hal_btcoex_IsBtExist(padapter) == _FALSE) - return _FALSE; + if (hal_btcoex_IsBtExist(padapter) == false) + return false; if (GLBtCoexist.bt_info.bt_disabled) - return _FALSE; + return false; if (GLBtCoexist.bt_info.bt_ctrl_lps) - return _TRUE; + return true; - return _FALSE; + return false; } u8 hal_btcoex_IsLpsOn(PADAPTER padapter) { - if (GLBtCoexist.bdontenterLPS == _TRUE) - return _FALSE; + if (GLBtCoexist.bdontenterLPS == true) + return false; - if (hal_btcoex_IsBtExist(padapter) == _FALSE) - return _FALSE; + if (hal_btcoex_IsBtExist(padapter) == false) + return false; if (GLBtCoexist.bt_info.bt_disabled) - return _FALSE; + return false; if (GLBtCoexist.bt_info.bt_lps_on) - return _TRUE; + return true; - return _FALSE; + return false; } u8 hal_btcoex_RpwmVal(PADAPTER padapter) @@ -3551,20 +3551,20 @@ exit: u8 hal_btcoex_IncreaseScanDeviceNum(PADAPTER padapter) { if (!hal_btcoex_IsBtExist(padapter)) - return _FALSE; + return false; if (GLBtCoexist.bt_info.increase_scan_dev_num) - return _TRUE; + return true; - return _FALSE; + return false; } u8 hal_btcoex_IsBtLinkExist(PADAPTER padapter) { if (GLBtCoexist.bt_link_info.bt_link_exist) - return _TRUE; + return true; - return _FALSE; + return false; } void hal_btcoex_SetBtPatchVersion(PADAPTER padapter, u16 btHciVer, u16 btPatchVer) @@ -3735,7 +3735,7 @@ hal_btcoex_AntIsolationConfig_ParaFile( memset(pHalData->para_file_buf , 0 , MAX_PARA_FILE_BUF_LEN); rtw_get_phy_file_path(Adapter, pFileName); - if (rtw_is_file_readable(rtw_phy_para_file_path) == _TRUE) { + if (rtw_is_file_readable(rtw_phy_para_file_path) == true) { rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); if (rlen > 0) rtStatus = _SUCCESS; diff --git a/hal/hal_btcoex_wifionly.c b/hal/hal_btcoex_wifionly.c index feeb3d5..856ebd5 100644 --- a/hal/hal_btcoex_wifionly.c +++ b/hal/hal_btcoex_wifionly.c @@ -90,19 +90,19 @@ void halwifionly_phy_set_bb_reg(void * pwifionlyContext, u32 RegAddr, u32 BitMas void hal_btcoex_wifionly_switchband_notify(PADAPTER padapter) { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); - u8 is_5g = _FALSE; + u8 is_5g = false; if (pHalData->current_band_type == BAND_ON_5G) - is_5g = _TRUE; + is_5g = true; } void hal_btcoex_wifionly_scan_notify(PADAPTER padapter) { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); - u8 is_5g = _FALSE; + u8 is_5g = false; if (pHalData->current_band_type == BAND_ON_5G) - is_5g = _TRUE; + is_5g = true; } void hal_btcoex_wifionly_hw_config(PADAPTER padapter) diff --git a/hal/hal_com.c b/hal/hal_com.c index 9021981..11f0bd5 100644 --- a/hal/hal_com.c +++ b/hal/hal_com.c @@ -52,7 +52,7 @@ void rtw_hal_move_sta_gk_to_dk(_adapter *adapter) int cam_id, index = 0; u8 *addr = NULL; - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) return; addr = get_bssid(pmlmepriv); @@ -248,7 +248,7 @@ u8 hal_com_config_channel_plan( ) { PHAL_DATA_TYPE pHalData; - u8 force_hw_chplan = _FALSE; + u8 force_hw_chplan = false; int chplan = -1; const struct country_chplan *country_ent = NULL, *ent; @@ -258,12 +258,12 @@ u8 hal_com_config_channel_plan( if (hw_chplan == 0xFF) goto chk_hw_country_code; - if (AutoLoadFail == _TRUE) + if (AutoLoadFail == true) goto chk_sw_config; #ifndef CONFIG_FORCE_SW_CHANNEL_PLAN if (hw_chplan & EEPROM_CHANNEL_PLAN_BY_HW_MASK) - force_hw_chplan = _TRUE; + force_hw_chplan = true; #endif hw_chplan &= (~EEPROM_CHANNEL_PLAN_BY_HW_MASK); @@ -282,14 +282,14 @@ chk_hw_country_code: if (rtw_is_channel_plan_valid(hw_chplan)) chplan = hw_chplan; - else if (force_hw_chplan == _TRUE) { + else if (force_hw_chplan == true) { RTW_PRINT("%s unsupported hw_chplan:0x%02X\n", __func__, hw_chplan); /* hw infomaton invalid, refer to sw information */ - force_hw_chplan = _FALSE; + force_hw_chplan = false; } chk_sw_config: - if (force_hw_chplan == _TRUE) + if (force_hw_chplan == true) goto done; if (sw_alpha2 && !IS_ALPHA2_NO_SPECIFIED(sw_alpha2)) { @@ -332,20 +332,20 @@ HAL_IsLegalChannel( u32 Channel ) { - bool bLegalChannel = _TRUE; + bool bLegalChannel = true; if (Channel > 14) { - if (is_supported_5g(Adapter->registrypriv.wireless_mode) == _FALSE) { - bLegalChannel = _FALSE; + if (is_supported_5g(Adapter->registrypriv.wireless_mode) == false) { + bLegalChannel = false; RTW_INFO("Channel > 14 but wireless_mode do not support 5G\n"); } } else if ((Channel <= 14) && (Channel >= 1)) { - if (IsSupported24G(Adapter->registrypriv.wireless_mode) == _FALSE) { - bLegalChannel = _FALSE; + if (IsSupported24G(Adapter->registrypriv.wireless_mode) == false) { + bLegalChannel = false; RTW_INFO("(Channel <= 14) && (Channel >=1) but wireless_mode do not support 2.4G\n"); } } else { - bLegalChannel = _FALSE; + bLegalChannel = false; RTW_INFO("Channel is Invalid !!!\n"); } @@ -1094,9 +1094,9 @@ Hal_MappingOutPipe( { struct registry_priv *pregistrypriv = &pAdapter->registrypriv; - bool bWIFICfg = (pregistrypriv->wifi_spec) ? _TRUE : _FALSE; + bool bWIFICfg = (pregistrypriv->wifi_spec) ? true : false; - bool result = _TRUE; + bool result = true; switch (NumOutPipe) { case 2: @@ -1110,7 +1110,7 @@ Hal_MappingOutPipe( _OneOutPipeMapping(pAdapter); break; default: - result = _FALSE; + result = false; break; } @@ -1173,7 +1173,7 @@ void rtw_init_hal_com_default_value(PADAPTER Adapter) struct registry_priv *regsty = adapter_to_regsty(Adapter); pHalData->AntDetection = 1; - pHalData->antenna_test = _FALSE; + pHalData->antenna_test = false; pHalData->u1ForcedIgiLb = regsty->force_igi_lb; } @@ -1255,7 +1255,7 @@ void rtw_hal_c2h_pkt_pre_hdl(_adapter *adapter, u8 *buf, u16 len) goto exit; } - hdl_here = rtw_hal_c2h_id_handle_directly(adapter, id, seq, plen, payload) == _TRUE ? 1 : 0; + hdl_here = rtw_hal_c2h_id_handle_directly(adapter, id, seq, plen, payload) == true ? 1 : 0; if (hdl_here) ret = rtw_hal_c2h_handler(adapter, id, seq, plen, payload); else @@ -1292,7 +1292,7 @@ void rtw_hal_c2h_pkt_hdl(_adapter *adapter, u8 *buf, u16 len) } #ifdef CONFIG_WOWLAN - if (adapter_to_pwrctl(adapter)->wowlan_mode == _TRUE) { + if (adapter_to_pwrctl(adapter)->wowlan_mode == true) { bypass = 1; ret = _SUCCESS; goto exit; @@ -1498,7 +1498,7 @@ int hal_read_mac_hidden_rpt(_adapter *adapter) /* download FW */ pHalData->not_xmitframe_fw_dl = 1; - ret_fwdl = rtw_hal_fw_dl(adapter, _FALSE); + ret_fwdl = rtw_hal_fw_dl(adapter, false); pHalData->not_xmitframe_fw_dl = 0; if (ret_fwdl != _SUCCESS) goto mac_hidden_rpt_hdl; @@ -1772,7 +1772,7 @@ s32 rtw_hal_customer_str_write(_adapter *adapter, const u8 *cs) _enter_critical_mutex(&dvobj->customer_str_mutex, NULL); dvobj->customer_str_sctx = NULL; if (sctx.status == RTW_SCTX_DONE_SUCCESS) { - if (_rtw_memcmp(cs, dvobj->customer_str, RTW_CUSTOMER_STR_LEN) != _TRUE) { + if (_rtw_memcmp(cs, dvobj->customer_str, RTW_CUSTOMER_STR_LEN) != true) { RTW_WARN("%s read back check fail\n", __func__); RTW_INFO_DUMP("write req: ", cs, RTW_CUSTOMER_STR_LEN); RTW_INFO_DUMP("read back: ", dvobj->customer_str, RTW_CUSTOMER_STR_LEN); @@ -1841,7 +1841,7 @@ void rtw_hal_update_sta_rate_mask(PADAPTER padapter, struct sta_info *psta) /* n mode ra_bitmap */ /* Handling SMPS mode for AP MODE only*/ - if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == _TRUE) { + if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true) { /*0:static SMPS, 1:dynamic SMPS, 3:SMPS disabled, 2:reserved*/ if (psta->htpriv.smps_cap == 0 || psta->htpriv.smps_cap == 1) { /*operate with only one active receive chain // 11n-MCS rate <= MSC7*/ @@ -2043,7 +2043,7 @@ bool rtw_sec_read_cam_is_gk(_adapter *adapter, u8 id) rtw_sec_read_cam_ent(adapter, id, (u8 *)&ctrl, NULL, NULL); - res = (ctrl & BIT6) ? _TRUE : _FALSE; + res = (ctrl & BIT6) ? true : false; return res; } #ifdef CONFIG_MBSSID_CAM @@ -2084,7 +2084,7 @@ static u8 _rtw_mbid_cam_search_by_macaddr(_adapter *adapter, u8 *mac_addr) struct dvobj_priv *dvobj = adapter_to_dvobj(adapter); for (i = 0; i < TOTAL_MBID_CAM_NUM; i++) { - if (mac_addr && _rtw_memcmp(dvobj->mbid_cam_cache[i].mac_addr, mac_addr, ETH_ALEN) == _TRUE) { + if (mac_addr && _rtw_memcmp(dvobj->mbid_cam_cache[i].mac_addr, mac_addr, ETH_ALEN) == true) { cam_id = i; break; } @@ -2243,7 +2243,7 @@ u8 rtw_mbid_cam_info_change(_adapter *adapter, u8 *mac_addr) u8 rtw_mbid_cam_assign(_adapter *adapter, u8 *mac_addr, u8 camid) { unsigned long irqL; - u8 ret = _FALSE; + u8 ret = false; struct dvobj_priv *dvobj = adapter_to_dvobj(adapter); struct mbid_cam_ctl_t *mbid_cam_ctl = &dvobj->mbid_cam_ctl; @@ -2259,12 +2259,12 @@ u8 rtw_mbid_cam_assign(_adapter *adapter, u8 *mac_addr, u8 camid) if (mac_addr) { mbid_cam_ctl->bitmap |= BIT(camid); mbid_cam_cache_init(adapter, &dvobj->mbid_cam_cache[camid], mac_addr); - ret = _TRUE; + ret = true; } } _exit_critical_bh(&mbid_cam_ctl->lock, &irqL); - if (ret == _TRUE) { + if (ret == true) { ATOMIC_INC(&mbid_cam_ctl->mbid_entry_num); RTW_INFO("%s mac:"MAC_FMT" - cam_id:%d\n", __func__, MAC_ARG(mac_addr), camid); #ifdef DBG_MBID_CAM_DUMP @@ -2319,9 +2319,9 @@ int rtw_mbid_cam_cache_dump(void *sel, const char *fun_name, _adapter *adapter) iface = dvobj->padapters[iface_id]; if (iface) { - if (check_fwstate(&iface->mlmepriv, WIFI_STATION_STATE) == _TRUE) + if (check_fwstate(&iface->mlmepriv, WIFI_STATION_STATE) == true) RTW_PRINT_SEL(sel, "ROLE:%s\n", "STA"); - else if (check_fwstate(&iface->mlmepriv, WIFI_AP_STATE) == _TRUE) + else if (check_fwstate(&iface->mlmepriv, WIFI_AP_STATE) == true) RTW_PRINT_SEL(sel, "ROLE:%s\n", "AP"); else RTW_PRINT_SEL(sel, "ROLE:%s\n", "NONE"); @@ -2337,7 +2337,7 @@ int rtw_mbid_cam_cache_dump(void *sel, const char *fun_name, _adapter *adapter) static void read_mbssid_cam(_adapter *padapter, u8 cam_addr, u8 *mac) { u8 poll = 1; - u8 cam_ready = _FALSE; + u8 cam_ready = false; u32 cam_data1 = 0; u16 cam_data2 = 0; @@ -2348,7 +2348,7 @@ static void read_mbssid_cam(_adapter *padapter, u8 cam_addr, u8 *mac) do { if (0 == (rtw_read32(padapter, REG_MBIDCAMCFG_2) & BIT_MBIDCAM_POLL)) { - cam_ready = _TRUE; + cam_ready = true; break; } poll++; @@ -2830,11 +2830,11 @@ s32 rtw_set_default_port_id(_adapter *adapter) if (adapter->hw_port == dvobj->default_port_id) return ret; - if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE) { + if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) { psta = rtw_get_stainfo(&adapter->stapriv, get_bssid(pmlmepriv)); if (psta) ret = rtw_hal_set_default_port_id_cmd(adapter, psta->mac_id); - } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) { + } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) { } else { } @@ -2921,7 +2921,7 @@ post_action: /* for 8188E RA */ #if (RATE_ADAPTIVE_SUPPORT == 1) - if (hal_data->fw_ractrl == _FALSE) { + if (hal_data->fw_ractrl == false) { u8 max_macid; max_macid = rtw_search_max_mac_id(adapter); @@ -3122,7 +3122,7 @@ int rtw_hal_get_rsvd_page(_adapter *adapter, u32 page_offset, u32 page_size = 0, data_low = 0, data_high = 0; u16 txbndy = 0, offset = 0; u8 i = 0; - bool rst = _FALSE; + bool rst = false; rtw_hal_get_def_var(adapter, HAL_DEF_TX_PAGE_SIZE, &page_size); @@ -3136,9 +3136,9 @@ int rtw_hal_get_rsvd_page(_adapter *adapter, u32 page_offset, } #ifdef RTW_HALMAC if (rtw_halmac_dump_fifo(adapter_to_dvobj(adapter), 2, addr, size, buffer) < 0) - rst = _FALSE; + rst = false; else - rst = _TRUE; + rst = true; #else txbndy = rtw_read8(adapter, REG_TDECTRL + 1); @@ -3157,7 +3157,7 @@ int rtw_hal_get_rsvd_page(_adapter *adapter, u32 page_offset, &data_high, sizeof(data_high)); } rtw_write8(adapter, REG_PKT_BUFF_ACCESS_CTRL, 0x0); - rst = _TRUE; + rst = true; #endif /*RTW_HALMAC*/ #ifdef DBG_GET_RSVD_PAGE @@ -3248,7 +3248,7 @@ static u8 rtw_hal_pause_rx_dma(_adapter *adapter) do { if ((rtw_read32(adapter, REG_RXPKT_NUM) & RXDMA_IDLE)) { /* stop interface before leave */ - if (_TRUE == hal->usb_intf_start) { + if (true == hal->usb_intf_start) { rtw_intf_stop(adapter); RTW_ENABLE_FUNC(adapter, DF_RX_BIT); RTW_ENABLE_FUNC(adapter, DF_TX_BIT); @@ -3260,7 +3260,7 @@ static u8 rtw_hal_pause_rx_dma(_adapter *adapter) } else { /* to avoid interface start repeatedly */ - if (_FALSE == hal->usb_intf_start) + if (false == hal->usb_intf_start) rtw_intf_start(adapter); } } while (trycnt--); @@ -3289,14 +3289,14 @@ static u8 rtw_hal_pause_rx_dma(_adapter *adapter) #ifdef CONFIG_WOWLAN /* * rtw_hal_check_wow_ctrl - * chk_type: _TRUE means to check enable, if 0x690 & bit1, WOW enable successful - * _FALSE means to check disable, if 0x690 & bit1, WOW disable fail + * chk_type: true means to check enable, if 0x690 & bit1, WOW enable successful + * false means to check disable, if 0x690 & bit1, WOW disable fail */ static u8 rtw_hal_check_wow_ctrl(_adapter *adapter, u8 chk_type) { u8 mstatus = 0; u8 trycnt = 25; - u8 res = _FALSE; + u8 res = false; mstatus = rtw_read8(adapter, REG_WOW_CTRL); RTW_INFO("%s mstatus:0x%02x\n", __func__, mstatus); @@ -3310,9 +3310,9 @@ static u8 rtw_hal_check_wow_ctrl(_adapter *adapter, u8 chk_type) rtw_msleep_os(20); } if (mstatus & BIT1) - res = _TRUE; + res = true; else - res = _FALSE; + res = false; } else { while (mstatus & BIT1 && trycnt > 1) { mstatus = rtw_read8(adapter, REG_WOW_CTRL); @@ -3323,9 +3323,9 @@ static u8 rtw_hal_check_wow_ctrl(_adapter *adapter, u8 chk_type) } if (mstatus & BIT1) - res = _FALSE; + res = false; else - res = _TRUE; + res = true; } RTW_PRINT("%s check_type: %d res: %d trycnt: %d\n", __func__, chk_type, res, (25 - trycnt)); @@ -3337,9 +3337,9 @@ static u8 rtw_hal_check_pno_enabled(_adapter *adapter) { struct pwrctrl_priv *ppwrpriv = adapter_to_pwrctl(adapter); u8 res = 0, count = 0; - u8 ret = _FALSE; + u8 ret = false; - if (ppwrpriv->wowlan_pno_enable && ppwrpriv->wowlan_in_resume == _FALSE) { + if (ppwrpriv->wowlan_pno_enable && ppwrpriv->wowlan_in_resume == false) { res = rtw_read8(adapter, REG_PNO_STATUS); while (!(res & BIT(7)) && count < 25) { RTW_INFO("[%d] cmd: 0x81 REG_PNO_STATUS: 0x%02x\n", @@ -3349,9 +3349,9 @@ static u8 rtw_hal_check_pno_enabled(_adapter *adapter) rtw_msleep_os(2); } if (res & BIT(7)) - ret = _TRUE; + ret = true; else - ret = _FALSE; + ret = false; RTW_INFO("cmd: 0x81 REG_PNO_STATUS: ret(%d)\n", ret); } return ret; @@ -3375,7 +3375,7 @@ static void rtw_hal_fw_sync_cam_id(_adapter *adapter) int cam_id, index = 0; u8 *addr = NULL; - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) return; addr = get_bssid(pmlmepriv); @@ -3444,7 +3444,7 @@ static void rtw_hal_get_aoac_rpt(_adapter *adapter) ret = rtw_hal_get_rsvd_page(adapter, page_offset, page_number, buffer, buf_size); - if (ret == _FALSE) { + if (ret == false) { RTW_ERR("%s get aoac report failed\n", __func__); rtw_warn_on(1); goto _exit; @@ -3480,7 +3480,7 @@ static void rtw_hal_update_gtk_offload_info(_adapter *adapter) u8 gtk_id = 0, offset = 0, i = 0, sz = 0; u64 replay_count = 0; - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) return; memset(get_key, 0, sizeof(get_key)); @@ -3709,7 +3709,7 @@ static u8 rtw_hal_set_wowlan_ctrl_cmd(_adapter *adapter, u8 enable, u8 change_un #ifdef CONFIG_GTK_OL /* GTK rekey only for AES, if GTK rekey is TKIP, then wake up*/ - if (psecpriv->binstallKCK_KEK == _TRUE) + if (psecpriv->binstallKCK_KEK == true) SET_H2CCMD_WOWLAN_REKEY_WAKE_UP(u1H2CWoWlanCtrlParm, 0); else SET_H2CCMD_WOWLAN_REKEY_WAKE_UP(u1H2CWoWlanCtrlParm, 1); @@ -3750,7 +3750,7 @@ static u8 rtw_hal_set_remote_wake_ctrl_cmd(_adapter *adapter, u8 enable) SET_H2CCMD_REMOTE_WAKE_CTRL_ARP_OFFLOAD_EN( u1H2CRemoteWakeCtrlParm, 1); #ifdef CONFIG_GTK_OL - if (psecuritypriv->binstallKCK_KEK == _TRUE) { + if (psecuritypriv->binstallKCK_KEK == true) { SET_H2CCMD_REMOTE_WAKE_CTRL_GTK_OFFLOAD_EN( u1H2CRemoteWakeCtrlParm, 1); } else { @@ -3760,7 +3760,7 @@ static u8 rtw_hal_set_remote_wake_ctrl_cmd(_adapter *adapter, u8 enable) } #endif /* CONFIG_GTK_OL */ - if (pregistrypriv->default_patterns_en == _FALSE) { + if (pregistrypriv->default_patterns_en == false) { SET_H2CCMD_REMOTE_WAKE_CTRL_FW_UNICAST_EN( u1H2CRemoteWakeCtrlParm, enable); /* @@ -3807,7 +3807,7 @@ static u8 rtw_hal_set_remote_wake_ctrl_cmd(_adapter *adapter, u8 enable) #endif #ifdef CONFIG_P2P_WOWLAN - if (_TRUE == ppwrpriv->wowlan_p2p_mode) { + if (true == ppwrpriv->wowlan_p2p_mode) { RTW_INFO("P2P OFFLOAD ENABLE\n"); SET_H2CCMD_REMOTE_WAKE_CTRL_P2P_OFFLAD_EN(u1H2CRemoteWakeCtrlParm, 1); } else { @@ -3889,7 +3889,7 @@ void rtw_hal_set_fw_wow_related_cmd(_adapter *padapter, u8 enable) RTW_PRINT("+%s()+: enable=%d\n", __func__, enable); - rtw_hal_set_wowlan_ctrl_cmd(padapter, enable, _FALSE); + rtw_hal_set_wowlan_ctrl_cmd(padapter, enable, false); if (enable) { rtw_hal_set_global_info_cmd(padapter, @@ -4077,7 +4077,7 @@ static void rtw_hal_ap_wow_enable(_adapter *padapter) #endif /*DBG_CHECK_FW_PS_STATE*/ /* 1. Download WOWLAN FW*/ - rtw_hal_fw_dl(padapter, _TRUE); + rtw_hal_fw_dl(padapter, true); media_status_rpt = RT_MEDIA_CONNECT; rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_JOINBSSRPT, @@ -4101,7 +4101,7 @@ static void rtw_hal_ap_wow_enable(_adapter *padapter) rtw_mi_intf_stop(padapter); /* Invoid SE0 reset signal during suspending*/ rtw_write8(padapter, REG_RSV_CTRL, 0x20); - if (IS_8188F(pHalData->version_id) == FALSE) + if (IS_8188F(pHalData->version_id) == false) rtw_write8(padapter, REG_RSV_CTRL, 0x60); } @@ -4138,14 +4138,14 @@ static void rtw_hal_ap_wow_disable(_adapter *padapter) rtw_hal_force_enable_rxdma(padapter); - rtw_hal_fw_dl(padapter, _FALSE); + rtw_hal_fw_dl(padapter, false); #ifdef CONFIG_GPIO_WAKEUP val8 = (pwrctl->is_high_active == 0) ? 1 : 0; RTW_PRINT("Set Wake GPIO to default(%d).\n", val8); rtw_hal_set_output_gpio(padapter, WAKEUP_GPIO_IDX, val8); - rtw_hal_switch_gpio_wl_ctrl(padapter, WAKEUP_GPIO_IDX, _FALSE); + rtw_hal_switch_gpio_wl_ctrl(padapter, WAKEUP_GPIO_IDX, false); #endif media_status_rpt = RT_MEDIA_CONNECT; @@ -4434,7 +4434,7 @@ static void rtw_hal_construct_P2PBeacon(_adapter *padapter, u8 *pframe, u32 *pLe _issue_bcn: /* #if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) */ - /* pmlmepriv->update_bcn = _FALSE; + /* pmlmepriv->update_bcn = false; * * _exit_critical_bh(&pmlmepriv->bcn_update_lock, &irqL); * #endif */ /* #if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) */ @@ -4575,7 +4575,7 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p #ifdef CONFIG_INTEL_WIDI /* Commented by Kurt */ /* Appended WiDi info. only if we did issued_probereq_widi(), and then we saved ven. ext. in pmlmepriv->sa_ext. */ - if (_rtw_memcmp(pmlmepriv->sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN) == _FALSE + if (_rtw_memcmp(pmlmepriv->sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN) == false || pmlmepriv->num_p2p_sdt != 0) { /* Sec dev type */ *(u16 *)(wpsie + wpsielen) = cpu_to_be16(WPS_ATTR_SEC_DEV_TYPE_LIST); @@ -4597,7 +4597,7 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p *(u16 *)(wpsie + wpsielen) = cpu_to_be16(WPS_PDT_SCID_WIDI_CONSUMER_SINK); wpsielen += 2; - if (_rtw_memcmp(pmlmepriv->sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN) == _FALSE) { + if (_rtw_memcmp(pmlmepriv->sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN) == false) { /* Vendor Extension */ _rtw_memcpy(wpsie + wpsielen, pmlmepriv->sa_ext, L2SDTA_SERVICE_VE_LEN); wpsielen += L2SDTA_SERVICE_VE_LEN; @@ -5614,7 +5614,7 @@ void rtw_hal_construct_NullFunctionData( SetSeqNum(pwlanhdr, 0); - if (bQoS == _TRUE) { + if (bQoS == true) { struct rtw_ieee80211_hdr_3addr_qos *pwlanqoshdr; set_frame_sub_type(pframe, WIFI_QOS_DATA_NULL); @@ -5699,7 +5699,7 @@ static void rtw_hal_append_tkip_mic(PADAPTER padapter, if (psta != NULL) { res = _rtw_memcmp(&psta->dot11tkiptxmickey.skey[0], null_key, 16); - if (res == _TRUE) + if (res == true) RTW_INFO("%s(): STA dot11tkiptxmickey==0\n", __func__); rtw_secmicsetkey(&micdata, &psta->dot11tkiptxmickey.skey[0]); } @@ -6167,7 +6167,7 @@ void rtw_hal_set_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index, pmlmeext = &adapter->mlmeextpriv; pmlmeinfo = &pmlmeext->mlmext_info; - if (pwrctl->wowlan_pno_enable == _FALSE) { + if (pwrctl->wowlan_pno_enable == false) { /* ARP RSP * 1 page */ rtw_get_current_ip_address(adapter, currentip); @@ -6180,7 +6180,7 @@ void rtw_hal_set_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index, rtw_hal_fill_fake_txdesc(adapter, &pframe[index - tx_desc], - ARPLength, _FALSE, _FALSE, _TRUE); + ARPLength, false, false, true); CurtPktPageNum = (u8)PageNum(tx_desc + ARPLength, page_size); @@ -6260,7 +6260,7 @@ void rtw_hal_set_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index, rtw_hal_construct_GTKRsp(adapter, &pframe[index], >KLength); rtw_hal_fill_fake_txdesc(adapter, &pframe[index - tx_desc], - GTKLength, _FALSE, _FALSE, _TRUE); + GTKLength, false, false, true); CurtPktPageNum = (u8)PageNum(tx_desc + GTKLength, page_size); @@ -6291,8 +6291,8 @@ void rtw_hal_set_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index, *total_pkt_len = index + (page_size * 1); } else { #ifdef CONFIG_PNO_SUPPORT - if (pwrctl->wowlan_in_resume == _FALSE && - pwrctl->pno_inited == _TRUE) { + if (pwrctl->wowlan_in_resume == false && + pwrctl->pno_inited == true) { /* Broadcast Probe Request */ rsvd_page_loc->LocProbePacket = *page_num; @@ -6308,7 +6308,7 @@ void rtw_hal_set_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index, rtw_hal_fill_fake_txdesc(adapter, &pframe[index - tx_desc], - ProbeReqLength, _FALSE, _FALSE, _FALSE); + ProbeReqLength, false, false, false); CurtPktPageNum = (u8)PageNum(tx_desc + ProbeReqLength, page_size); @@ -6332,7 +6332,7 @@ void rtw_hal_set_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index, rtw_hal_fill_fake_txdesc(adapter, &pframe[index - tx_desc], - ProbeReqLength, _FALSE, _FALSE, _FALSE); + ProbeReqLength, false, false, false); CurtPktPageNum = (u8)PageNum(tx_desc + ProbeReqLength, page_size); @@ -6558,12 +6558,12 @@ bool rtw_read_from_frame_mask(_adapter *adapter, u8 idx) u16 ctrl_l = 0, ctrl_h = 0; u8 count = 0, tmp = 0; int i = 0; - bool res = _TRUE; + bool res = true; if (idx > MAX_WKFM_CAM_NUM) { RTW_INFO("[Error]: %s, pattern index is out of range\n", __func__); - return _FALSE; + return false; } rtw_hal_get_def_var(adapter, HAL_DEF_RX_DMA_SZ_WOW, @@ -6571,14 +6571,14 @@ bool rtw_read_from_frame_mask(_adapter *adapter, u8 idx) if (rx_dma_buff_sz == 0) { RTW_INFO("[Error]: %s, rx_dma_buff_sz is 0!!\n", __func__); - return _FALSE; + return false; } rtw_hal_get_def_var(adapter, HAL_DEF_RX_PAGE_SIZE, (u8 *)&page_sz); if (page_sz == 0) { RTW_INFO("[Error]: %s, page_sz is 0!!\n", __func__); - return _FALSE; + return false; } offset = (u16)PageNum(rx_dma_buff_sz, page_sz); @@ -6621,7 +6621,7 @@ bool rtw_read_from_frame_mask(_adapter *adapter, u8 idx) if (count >= 100) { RTW_INFO("%s count:%d\n", __func__, count); - res = _FALSE; + res = false; } } @@ -6644,7 +6644,7 @@ bool rtw_write_to_frame_mask(_adapter *adapter, u8 idx, if (idx > MAX_WKFM_CAM_NUM) { RTW_INFO("[Error]: %s, pattern index is out of range\n", __func__); - return _FALSE; + return false; } rtw_hal_get_def_var(adapter, HAL_DEF_RX_DMA_SZ_WOW, @@ -6652,14 +6652,14 @@ bool rtw_write_to_frame_mask(_adapter *adapter, u8 idx, if (rx_dma_buff_sz == 0) { RTW_INFO("[Error]: %s, rx_dma_buff_sz is 0!!\n", __func__); - return _FALSE; + return false; } rtw_hal_get_def_var(adapter, HAL_DEF_RX_PAGE_SIZE, (u8 *)&page_sz); if (page_sz == 0) { RTW_INFO("[Error]: %s, page_sz is 0!!\n", __func__); - return _FALSE; + return false; } offset = (u16)PageNum(rx_dma_buff_sz, page_sz); @@ -6731,9 +6731,9 @@ bool rtw_write_to_frame_mask(_adapter *adapter, u8 idx, } while (tmp && count < 100); if (count >= 100) - res = _FALSE; + res = false; else - res = _TRUE; + res = true; } /* Disable RX packet buffer access */ @@ -6769,7 +6769,7 @@ static int rtw_hal_set_pattern(_adapter *adapter, u8 *pattern, u8 broadcast_addr[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; u8 multicast_addr1[2] = {0x33, 0x33}; u8 multicast_addr2[3] = {0x01, 0x00, 0x5e}; - u8 res = _FALSE, index = 0, mask_len = 0; + u8 res = false, index = 0, mask_len = 0; u8 mac_addr[ETH_ALEN] = {0}; u16 count = 0; int i, j; @@ -6777,7 +6777,7 @@ static int rtw_hal_set_pattern(_adapter *adapter, u8 *pattern, if (pwrctl->wowlan_pattern_idx > MAX_WKFM_CAM_NUM) { RTW_INFO("%s pattern_idx is more than MAX_FMC_NUM: %d\n", __func__, MAX_WKFM_CAM_NUM); - return _FALSE; + return false; } pmlmeext = &adapter->mlmeextpriv; @@ -6864,7 +6864,7 @@ static int rtw_hal_set_pattern(_adapter *adapter, u8 *pattern, /* write pattern */ res = rtw_write_to_frame_mask(adapter, index, &wow_pattern); - if (res == _FALSE) + if (res == false) RTW_INFO("%s: ERROR!! idx: %d write_to_frame_mask_cam fail\n", __func__, idx); @@ -6888,7 +6888,7 @@ void rtw_fill_pattern(_adapter *adapter) if (!pwrpriv->bInSuspend) index += 2; - if (rtw_write_to_frame_mask(adapter, index, &wow_pattern) == _FALSE) + if (rtw_write_to_frame_mask(adapter, index, &wow_pattern) == false) RTW_INFO("%s: ERROR!! idx: %d write_to_frame_mask_cam fail\n", __func__, i); } @@ -6914,7 +6914,7 @@ static u32 _rtw_wow_pattern_read_cam(_adapter *adapter, u8 addr) u32 cnt = 0; u32 start = 0; u8 timeout = 0; - u8 rst = _FALSE; + u8 rst = false; _enter_critical_mutex(mutex, NULL); @@ -7179,9 +7179,9 @@ static void rtw_hal_wow_enable(_adapter *adapter) RTW_PRINT("%s, WOWLAN_ENABLE\n", __func__); - rtw_hal_gate_bb(adapter, _TRUE); + rtw_hal_gate_bb(adapter, true); #ifdef CONFIG_GTK_OL - if (psecuritypriv->binstallKCK_KEK == _TRUE) + if (psecuritypriv->binstallKCK_KEK == true) rtw_hal_fw_sync_cam_id(adapter); #endif /* RX DMA stop */ @@ -7194,13 +7194,13 @@ static void rtw_hal_wow_enable(_adapter *adapter) #ifndef CONFIG_WOW_PATTERN_HW_CAM /* Reconfig RX_FF Boundary */ - rtw_hal_set_wow_rxff_boundary(adapter, _TRUE); + rtw_hal_set_wow_rxff_boundary(adapter, true); #endif /* redownload wow pattern */ rtw_hal_dl_pattern(adapter, 1); - rtw_hal_fw_dl(adapter, _TRUE); + rtw_hal_fw_dl(adapter, true); media_status_rpt = RT_MEDIA_CONNECT; rtw_hal_set_hwreg(adapter, HW_VAR_H2C_FW_JOINBSSRPT, (u8 *)&media_status_rpt); @@ -7221,9 +7221,9 @@ static void rtw_hal_wow_enable(_adapter *adapter) RTW_PRINT("Set WOWLan cmd\n"); rtw_hal_set_fw_wow_related_cmd(adapter, 1); - res = rtw_hal_check_wow_ctrl(adapter, _TRUE); + res = rtw_hal_check_wow_ctrl(adapter, true); - if (res == _FALSE) + if (res == false) RTW_INFO("[Error]%s: set wowlan CMD fail!!\n", __func__); pwrctl->wowlan_wake_reason = @@ -7240,10 +7240,10 @@ static void rtw_hal_wow_enable(_adapter *adapter) /* Invoid SE0 reset signal during suspending*/ rtw_write8(adapter, REG_RSV_CTRL, 0x20); - if (IS_8188F(pHalData->version_id) == FALSE) + if (IS_8188F(pHalData->version_id) == false) rtw_write8(adapter, REG_RSV_CTRL, 0x60); - rtw_hal_gate_bb(adapter, _FALSE); + rtw_hal_gate_bb(adapter, false); } #define DBG_WAKEUP_REASON @@ -7335,14 +7335,14 @@ static void rtw_hal_wow_disable(_adapter *adapter) rtw_hal_set_fw_wow_related_cmd(adapter, 0); - res = rtw_hal_check_wow_ctrl(adapter, _FALSE); + res = rtw_hal_check_wow_ctrl(adapter, false); - if (res == _FALSE) { + if (res == false) { RTW_INFO("[Error]%s: disable WOW cmd fail\n!!", __func__); rtw_hal_force_enable_rxdma(adapter); } - rtw_hal_gate_bb(adapter, _TRUE); + rtw_hal_gate_bb(adapter, true); res = rtw_hal_pause_rx_dma(adapter); if (res == _FAIL) @@ -7353,7 +7353,7 @@ static void rtw_hal_wow_disable(_adapter *adapter) #ifndef CONFIG_WOW_PATTERN_HW_CAM /* config RXFF boundary to original */ - rtw_hal_set_wow_rxff_boundary(adapter, _FALSE); + rtw_hal_set_wow_rxff_boundary(adapter, false); #endif rtw_hal_release_rx_dma(adapter); @@ -7364,20 +7364,20 @@ static void rtw_hal_wow_disable(_adapter *adapter) if (((pwrctl->wowlan_wake_reason != RX_DISASSOC) || (pwrctl->wowlan_wake_reason != RX_DEAUTH) || (pwrctl->wowlan_wake_reason != FW_DECISION_DISCONNECT)) && - psecuritypriv->binstallKCK_KEK == _TRUE) { + psecuritypriv->binstallKCK_KEK == true) { rtw_hal_get_aoac_rpt(adapter); rtw_hal_update_sw_security_info(adapter); } #endif /*CONFIG_GTK_OL*/ - rtw_hal_fw_dl(adapter, _FALSE); + rtw_hal_fw_dl(adapter, false); #ifdef CONFIG_GPIO_WAKEUP val8 = (pwrctl->is_high_active == 0) ? 1 : 0; RTW_PRINT("Set Wake GPIO to default(%d).\n", val8); rtw_hal_set_output_gpio(adapter, WAKEUP_GPIO_IDX, val8); - rtw_hal_switch_gpio_wl_ctrl(adapter, WAKEUP_GPIO_IDX, _FALSE); + rtw_hal_switch_gpio_wl_ctrl(adapter, WAKEUP_GPIO_IDX, false); #endif if ((pwrctl->wowlan_wake_reason != FW_DECISION_DISCONNECT) && @@ -7396,7 +7396,7 @@ static void rtw_hal_wow_disable(_adapter *adapter) rtw_sta_media_status_rpt(adapter, psta, 1); } } - rtw_hal_gate_bb(adapter, _FALSE); + rtw_hal_gate_bb(adapter, false); } #endif /*CONFIG_WOWLAN*/ @@ -7413,7 +7413,7 @@ void rtw_hal_set_p2p_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index, rsvd_page_loc->LocP2PBeacon = *page_num; rtw_hal_construct_P2PBeacon(adapter, &pframe[index], &P2PBCNLength); rtw_hal_fill_fake_txdesc(adapter, &pframe[index - tx_desc], - P2PBCNLength, _FALSE, _FALSE, _FALSE); + P2PBCNLength, false, false, false); CurtPktPageNum = (u8)PageNum(tx_desc + P2PBCNLength, page_size); @@ -7426,7 +7426,7 @@ void rtw_hal_set_p2p_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index, rtw_hal_construct_P2PProbeRsp(adapter, &pframe[index], &P2PProbeRspLength); rtw_hal_fill_fake_txdesc(adapter, &pframe[index - tx_desc], - P2PProbeRspLength, _FALSE, _FALSE, _FALSE); + P2PProbeRspLength, false, false, false); CurtPktPageNum = (u8)PageNum(tx_desc + P2PProbeRspLength, page_size); @@ -7439,7 +7439,7 @@ void rtw_hal_set_p2p_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index, rtw_hal_construct_P2PNegoRsp(adapter, &pframe[index], &P2PNegoRspLength); rtw_hal_fill_fake_txdesc(adapter, &pframe[index - tx_desc], - P2PNegoRspLength, _FALSE, _FALSE, _FALSE); + P2PNegoRspLength, false, false, false); /* RTW_INFO("%s(): HW_VAR_SET_TX_CMD: QOS NULL DATA %p %d\n", */ /* __func__, &pframe[index-tx_desc], (NegoRspLength+tx_desc)); */ @@ -7455,7 +7455,7 @@ void rtw_hal_set_p2p_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index, rtw_hal_construct_P2PInviteRsp(adapter, &pframe[index], &P2PInviteRspLength); rtw_hal_fill_fake_txdesc(adapter, &pframe[index - tx_desc], - P2PInviteRspLength, _FALSE, _FALSE, _FALSE); + P2PInviteRspLength, false, false, false); /* RTW_INFO("%s(): HW_VAR_SET_TX_CMD: QOS NULL DATA %p %d\n", */ /* __func__, &pframe[index-tx_desc], (InviteRspLength+tx_desc)); */ @@ -7472,7 +7472,7 @@ void rtw_hal_set_p2p_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index, &pframe[index], &P2PPDRspLength); rtw_hal_fill_fake_txdesc(adapter, &pframe[index - tx_desc], - P2PPDRspLength, _FALSE, _FALSE, _FALSE); + P2PPDRspLength, false, false, false); /* RTW_INFO("%s(): HW_VAR_SET_TX_CMD: QOS NULL DATA %p %d\n", */ /* __func__, &pframe[index-tx_desc], (PDRspLength+tx_desc)); */ @@ -7530,8 +7530,8 @@ static void rtw_hal_set_lps_pg_info_rsvd_page(_adapter *adapter) #ifdef CONFIG_WOWLAN /*&& pattern match cam used*/ /*Btye 2 - Max used Pattern Match CAM entry*/ - if (pwrpriv->wowlan_mode == _TRUE && - check_fwstate(&adapter->mlmepriv, _FW_LINKED) == _TRUE) { + if (pwrpriv->wowlan_mode == true && + check_fwstate(&adapter->mlmepriv, _FW_LINKED) == true) { LPSPG_RSVD_PAGE_SET_PMC_NUM(lps_pg_info, pwrpriv->wowlan_pattern_idx); RTW_INFO("[LPSPG-INFO] Max Pattern Match CAM entry :%d\n", pwrpriv->wowlan_pattern_idx); } @@ -7600,8 +7600,8 @@ static u8 rtw_hal_set_lps_pg_info_cmd(_adapter *adapter) #endif #if defined(CONFIG_WOWLAN) && defined(CONFIG_WOW_PATTERN_HW_CAM) - if (pwrpriv->wowlan_mode == _TRUE && - check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { + if (pwrpriv->wowlan_mode == true && + check_fwstate(pmlmepriv, _FW_LINKED) == true) { SET_H2CCMD_LPSPG_PMC_CAM_EN(lpspg_info, 1); /*PatternMatchCAM_En*/ } @@ -7648,7 +7648,7 @@ u8 rtw_hal_set_lps_pg_info(_adapter *adapter) rtw_hal_set_lps_pg_info_rsvd_page(adapter); ret = rtw_hal_set_lps_pg_info_cmd(adapter); if (_SUCCESS == ret) - pwrpriv->blpspg_info_up = _FALSE; + pwrpriv->blpspg_info_up = false; return ret; } @@ -7692,9 +7692,9 @@ void rtw_hal_lps_pg_handler(_adapter *adapter, enum lps_pg_hdl_id hdl_id) * Now we just send 4 types packet to rsvd page. * (1)Beacon, (2)Ps-poll, (3)Null data, (4)ProbeRsp. * Input: - * finished - FALSE:At the first time we will send all the packets as a large packet to Hw, + * finished - false:At the first time we will send all the packets as a large packet to Hw, * so we need to set the packet length to total lengh. - * TRUE: At the second time, we should send the first packet (default:beacon) + * true: At the second time, we should send the first packet (default:beacon) * to Hw again and set the lengh in descriptor to the real beacon lengh. * 2009.10.15 by tynli. * @@ -7749,10 +7749,10 @@ void rtw_hal_set_fw_rsvd_page(_adapter *adapter, bool finished) return; } - if (pwrctl->wowlan_mode == _TRUE || pwrctl->wowlan_ap_mode == _TRUE) - RsvdPageNum = rtw_hal_get_txbuff_rsvd_page_num(adapter, _TRUE); + if (pwrctl->wowlan_mode == true || pwrctl->wowlan_ap_mode == true) + RsvdPageNum = rtw_hal_get_txbuff_rsvd_page_num(adapter, true); else - RsvdPageNum = rtw_hal_get_txbuff_rsvd_page_num(adapter, _FALSE); + RsvdPageNum = rtw_hal_get_txbuff_rsvd_page_num(adapter, false); RTW_INFO("%s PageSize: %d, RsvdPageNUm: %d\n", __func__, PageSize, RsvdPageNum); @@ -7793,16 +7793,16 @@ void rtw_hal_set_fw_rsvd_page(_adapter *adapter, bool finished) BufIndex += (CurtPktPageNum * PageSize); - if (pwrctl->wowlan_ap_mode == _TRUE) { + if (pwrctl->wowlan_ap_mode == true) { /* (4) probe response*/ RsvdPageLoc.LocProbeRsp = TotalPageNum; rtw_hal_construct_ProbeRsp( adapter, &ReservedPagePacket[BufIndex], &ProbeRspLength, - get_my_bssid(&pmlmeinfo->network), _FALSE); + get_my_bssid(&pmlmeinfo->network), false); rtw_hal_fill_fake_txdesc(adapter, &ReservedPagePacket[BufIndex - TxDescLen], - ProbeRspLength, _FALSE, _FALSE, _FALSE); + ProbeRspLength, false, false, false); CurtPktPageNum = (u8)PageNum(TxDescLen + ProbeRspLength, PageSize); TotalPageNum += CurtPktPageNum; @@ -7818,7 +7818,7 @@ void rtw_hal_set_fw_rsvd_page(_adapter *adapter, bool finished) &ReservedPagePacket[BufIndex], &PSPollLength); rtw_hal_fill_fake_txdesc(adapter, &ReservedPagePacket[BufIndex - TxDescLen], - PSPollLength, _TRUE, _FALSE, _FALSE); + PSPollLength, true, false, false); CurtPktPageNum = (u8)PageNum((TxDescLen + PSPollLength), PageSize); @@ -7835,10 +7835,10 @@ void rtw_hal_set_fw_rsvd_page(_adapter *adapter, bool finished) &ReservedPagePacket[BufIndex], &BTQosNullLength, get_my_bssid(&pmlmeinfo->network), - _TRUE, 0, 0, _FALSE); + true, 0, 0, false); rtw_hal_fill_fake_txdesc(adapter, &ReservedPagePacket[BufIndex - TxDescLen], - BTQosNullLength, _FALSE, _TRUE, _FALSE); + BTQosNullLength, false, true, false); CurtPktPageNum = (u8)PageNum(TxDescLen + BTQosNullLength, PageSize); @@ -7866,10 +7866,10 @@ void rtw_hal_set_fw_rsvd_page(_adapter *adapter, bool finished) &ReservedPagePacket[BufIndex], &NullDataLength, get_my_bssid(&pmlmeinfo->network), - _FALSE, 0, 0, _FALSE); + false, 0, 0, false); rtw_hal_fill_fake_txdesc(adapter, &ReservedPagePacket[BufIndex - TxDescLen], - NullDataLength, _FALSE, _FALSE, _FALSE); + NullDataLength, false, false, false); CurtPktPageNum = (u8)PageNum(TxDescLen + NullDataLength, PageSize); @@ -7888,10 +7888,10 @@ void rtw_hal_set_fw_rsvd_page(_adapter *adapter, bool finished) &ReservedPagePacket[BufIndex], &QosNullLength, get_my_bssid(&pmlmeinfo->network), - _TRUE, 0, 0, _FALSE); + true, 0, 0, false); rtw_hal_fill_fake_txdesc(adapter, &ReservedPagePacket[BufIndex - TxDescLen], - QosNullLength, _FALSE, _FALSE, _FALSE); + QosNullLength, false, false, false); CurtPktPageNum = (u8)PageNum(TxDescLen + QosNullLength, PageSize); @@ -7902,8 +7902,8 @@ void rtw_hal_set_fw_rsvd_page(_adapter *adapter, bool finished) BufIndex += (CurtPktPageNum * PageSize); #ifdef CONFIG_WOWLAN - if (pwrctl->wowlan_mode == _TRUE && - pwrctl->wowlan_in_resume == _FALSE) { + if (pwrctl->wowlan_mode == true && + pwrctl->wowlan_in_resume == false) { rtw_hal_set_wow_fw_rsvd_page(adapter, ReservedPagePacket, BufIndex, TxDescLen, PageSize, &TotalPageNum, &TotalPacketLen, &RsvdPageLoc); @@ -7911,7 +7911,7 @@ void rtw_hal_set_fw_rsvd_page(_adapter *adapter, bool finished) #endif /* CONFIG_WOWLAN */ #ifdef CONFIG_P2P_WOWLAN - if (_TRUE == pwrctl->wowlan_p2p_mode) { + if (true == pwrctl->wowlan_p2p_mode) { rtw_hal_set_p2p_wow_fw_rsvd_page(adapter, ReservedPagePacket, BufIndex, TxDescLen, PageSize, &TotalPageNum, &TotalPacketLen, &RsvdPageLoc); @@ -7921,7 +7921,7 @@ void rtw_hal_set_fw_rsvd_page(_adapter *adapter, bool finished) #ifdef CONFIG_LPS_PG /* must reserved last 1 x page for LPS PG Info*/ pwrctl->lpspg_rsvd_page_locate = TotalPageNum; - pwrctl->blpspg_info_up = _TRUE; + pwrctl->blpspg_info_up = true; #endif download_page: @@ -7932,7 +7932,7 @@ download_page: #ifdef CONFIG_LPS_PG if ((TotalPacketLen + (LPS_PG_INFO_RSVD_PAGE_NUM * PageSize)) > MaxRsvdPageBufSize) { pwrctl->lpspg_rsvd_page_locate = 0; - pwrctl->blpspg_info_up = _FALSE; + pwrctl->blpspg_info_up = false; RTW_ERR("%s rsvd page size is not enough!!TotalPacketLen+LPS_PG_INFO_LEN %d, MaxRsvdPageBufSize %d\n", __func__, (TotalPacketLen + (LPS_PG_INFO_RSVD_PAGE_NUM * PageSize)), MaxRsvdPageBufSize); @@ -7962,15 +7962,15 @@ download_page: RTW_INFO_DUMP("\n", ReservedPagePacket, TotalPacketLen); RTW_INFO(" ==================================================\n"); #endif - if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { + if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { rtw_hal_set_FwRsvdPage_cmd(adapter, &RsvdPageLoc); #ifdef CONFIG_WOWLAN - if (pwrctl->wowlan_mode == _TRUE && - pwrctl->wowlan_in_resume == _FALSE) + if (pwrctl->wowlan_mode == true && + pwrctl->wowlan_in_resume == false) rtw_hal_set_FwAoacRsvdPage_cmd(adapter, &RsvdPageLoc); #endif /* CONFIG_WOWLAN */ #ifdef CONFIG_AP_WOWLAN - if (pwrctl->wowlan_ap_mode == _TRUE) + if (pwrctl->wowlan_ap_mode == true) rtw_hal_set_ap_rsvdpage_loc_cmd(adapter, &RsvdPageLoc); #endif /* CONFIG_AP_WOWLAN */ } else if (pwrctl->wowlan_pno_enable) { @@ -7985,7 +7985,7 @@ download_page: #endif /* CONFIG_PNO_SUPPORT */ } #ifdef CONFIG_P2P_WOWLAN - if (_TRUE == pwrctl->wowlan_p2p_mode) + if (true == pwrctl->wowlan_p2p_mode) rtw_hal_set_FwP2PRsvdPage_cmd(adapter, &RsvdPageLoc); #endif /* CONFIG_P2P_WOWLAN */ return; @@ -8012,7 +8012,7 @@ static void rtw_hal_set_hw_update_tsf(PADAPTER padapter) /* enable hw update tsf function for non-AP */ if (rtw_linked_check(padapter) && - check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE) { + check_fwstate(pmlmepriv, WIFI_AP_STATE) != true) { #ifdef CONFIG_CONCURRENT_MODE if (padapter->hw_port == HW_PORT1) rtw_write8(padapter, REG_BCN_CTRL_1, rtw_read8(padapter, REG_BCN_CTRL_1) & (~DIS_TSF_UDT)); @@ -8020,7 +8020,7 @@ static void rtw_hal_set_hw_update_tsf(PADAPTER padapter) #endif rtw_write8(padapter, REG_BCN_CTRL, rtw_read8(padapter, REG_BCN_CTRL) & (~DIS_TSF_UDT)); } - pmlmeext->en_hw_update_tsf = _FALSE; + pmlmeext->en_hw_update_tsf = false; } #ifdef CONFIG_TDLS @@ -8176,7 +8176,7 @@ void SetHwReg(_adapter *adapter, u8 variable, u8 *val) case HW_VAR_ASIX_IOT: /* enable ASIX IOT function */ - if (*((u8 *)val) == _TRUE) { + if (*((u8 *)val) == true) { /* 0xa2e[0]=0 (disable rake receiver) */ rtw_write8(adapter, rCCK0_FalseAlarmReport + 2, rtw_read8(adapter, rCCK0_FalseAlarmReport + 2) & ~(BIT0)); @@ -8269,9 +8269,9 @@ void GetHwReg(_adapter *adapter, u8 variable, u8 *val) break; case HW_VAR_CH_SW_NEED_TO_TAKE_CARE_IQK_INFO: if (hal_is_band_support(adapter, BAND_ON_5G)) - *val = _TRUE; + *val = true; else - *val = _FALSE; + *val = false; break; case HW_VAR_APFM_ON_MAC: *val = hal_data->bMacPwrCtrlOn; @@ -8364,7 +8364,7 @@ GetHalDefVar(_adapter *adapter, HAL_DEF_VARIABLE variable, void *value) *((u8 *)value) = hal_data->AntDetection; break; case HAL_DEF_MACID_SLEEP: - *(u8 *)value = _FALSE; + *(u8 *)value = false; break; case HAL_DEF_TX_PAGE_SIZE: *((u32 *)value) = PAGE_SIZE_128; @@ -8376,7 +8376,7 @@ GetHalDefVar(_adapter *adapter, HAL_DEF_VARIABLE variable, void *value) case HAL_DEF_EXPLICIT_BEAMFORMEE: case HAL_DEF_VHT_MU_BEAMFORMER: case HAL_DEF_VHT_MU_BEAMFORMEE: - *(u8 *)value = _FALSE; + *(u8 *)value = false; break; #ifdef CONFIG_BEAMFORMING case HAL_DEF_BEAMFORMER_CAP: @@ -8477,7 +8477,7 @@ void SetHalODMVar( odm_cmn_info_update(podmpriv, ODM_CMNINFO_DBG_LEVEL, *((u32 *)pValue1)); break; case HAL_ODM_RX_INFO_DUMP: { - struct _FALSE_ALARM_STATISTICS *false_alm_cnt = (struct _FALSE_ALARM_STATISTICS *)phydm_get_structure(podmpriv , PHYDM_FALSEALMCNT); + struct false_ALARM_STATISTICS *false_alm_cnt = (struct false_ALARM_STATISTICS *)phydm_get_structure(podmpriv , PHYDMfalseALMCNT); struct _dynamic_initial_gain_threshold_ *pDM_DigTable = &podmpriv->dm_dig_table; void *sel; @@ -8657,13 +8657,13 @@ eqNByte( ) { if (num == 0) - return _FALSE; + return false; while (num > 0) { num--; if (str1[num] != str2[num]) - return _FALSE; + return false; } - return _TRUE; + return true; } /* @@ -8703,7 +8703,7 @@ GetHexValueFromString( /* Check input parameter. */ if (szStr == NULL || pu4bVal == NULL || pu4bMove == NULL) { RTW_INFO("GetHexValueFromString(): Invalid inpur argumetns! szStr: %p, pu4bVal: %p, pu4bMove: %p\n", szStr, pu4bVal, pu4bMove); - return _FALSE; + return false; } /* Initialize output. */ @@ -8726,7 +8726,7 @@ GetHexValueFromString( /* Check if szScan is now pointer to a character for hex digit, */ /* if not, it means this is not a valid hex number. */ if (!IsHexDigit(*szScan)) - return _FALSE; + return false; /* Parse each digit. */ do { @@ -8737,7 +8737,7 @@ GetHexValueFromString( (*pu4bMove)++; } while (IsHexDigit(*szScan)); - return _TRUE; + return true; } bool @@ -8774,22 +8774,22 @@ GetFractionValueFromString( ++(*pu4bMove); if (*szScan < '0' || *szScan > '9') - return _FALSE; + return false; else { *pFraction = *szScan - '0'; ++szScan; ++(*pu4bMove); - return _TRUE; + return true; } } } while (*szScan >= '0' && *szScan <= '9'); - return _TRUE; + return true; } /* * Description: - * Return TRUE if szStr is comment out with leading " */ /* ". + * Return true if szStr is comment out with leading " */ /* ". * */ bool IsCommentString( @@ -8797,9 +8797,9 @@ IsCommentString( ) { if (*szStr == '/' && *(szStr + 1) == '/') - return _TRUE; + return true; else - return _FALSE; + return false; } bool @@ -8816,11 +8816,11 @@ GetU1ByteIntegerFromStringInDecimal( *pInt *= 10; *pInt += (Str[i] - '0'); } else - return _FALSE; + return false; ++i; } - return _TRUE; + return true; } /* <20121004, Kordan> For example, @@ -8839,7 +8839,7 @@ ParseQualifiedString( char c = In[(*Start)++]; if (c != LeftQualifier) - return _FALSE; + return false; i = (*Start); while ((c = In[(*Start)++]) != RightQualifier) @@ -8847,7 +8847,7 @@ ParseQualifiedString( j = (*Start) - 2; strncpy((char *)Out, (const char *)(In + i), j - i + 1); - return _TRUE; + return true; } bool @@ -8875,7 +8875,7 @@ void rtw_hal_check_rxfifo_full(_adapter *adapter) struct debug_priv *pdbgpriv = &psdpriv->drv_dbg; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(adapter); struct registry_priv *regsty = &adapter->registrypriv; - int save_cnt = _FALSE; + int save_cnt = false; if (regsty->check_hw_status == 1) { /* switch counter to RX fifo */ @@ -8888,7 +8888,7 @@ void rtw_hal_check_rxfifo_full(_adapter *adapter) IS_8703B_SERIES(pHalData->version_id) || IS_8723D_SERIES(pHalData->version_id)) { rtw_write8(adapter, REG_RXERR_RPT + 3, rtw_read8(adapter, REG_RXERR_RPT + 3) | 0xa0); - save_cnt = _TRUE; + save_cnt = true; } else { /* todo: other chips */ } @@ -8946,7 +8946,7 @@ void rtw_get_raw_rssi_info(void *sel, _adapter *padapter) struct rx_raw_rssi *psample_pkt_rssi = &padapter->recvpriv.raw_rssi_info; RTW_PRINT_SEL(sel, "RxRate = %s, PWDBALL = %d(%%), rx_pwr_all = %d(dBm)\n", HDATA_RATE(psample_pkt_rssi->data_rate), psample_pkt_rssi->pwdball, psample_pkt_rssi->pwr_all); - isCCKrate = (psample_pkt_rssi->data_rate <= DESC_RATE11M) ? TRUE : FALSE; + isCCKrate = (psample_pkt_rssi->data_rate <= DESC_RATE11M) ? true : false; if (isCCKrate) psample_pkt_rssi->mimo_signal_strength[0] = psample_pkt_rssi->pwdball; @@ -8970,7 +8970,7 @@ void rtw_dump_raw_rssi_info(_adapter *padapter, void *sel) _RTW_PRINT_SEL(sel, "============ RAW Rx Info dump ===================\n"); _RTW_PRINT_SEL(sel, "RxRate = %s, PWDBALL = %d(%%), rx_pwr_all = %d(dBm)\n", HDATA_RATE(psample_pkt_rssi->data_rate), psample_pkt_rssi->pwdball, psample_pkt_rssi->pwr_all); - isCCKrate = (psample_pkt_rssi->data_rate <= DESC_RATE11M) ? TRUE : FALSE; + isCCKrate = (psample_pkt_rssi->data_rate <= DESC_RATE11M) ? true : false; if (isCCKrate) psample_pkt_rssi->mimo_signal_strength[0] = psample_pkt_rssi->pwdball; @@ -9012,19 +9012,19 @@ void rtw_dump_rx_dframe_info(_adapter *padapter, void *sel) 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); plist = get_next(plist); if (psta) { psta_dframe_info = &psta->sta_dframe_info; - if ((_rtw_memcmp(psta->hwaddr, bc_addr, 6) != _TRUE) - && (_rtw_memcmp(psta->hwaddr, null_addr, 6) != _TRUE) - && (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(padapter), 6) != _TRUE)) { + if ((_rtw_memcmp(psta->hwaddr, bc_addr, 6) != true) + && (_rtw_memcmp(psta->hwaddr, null_addr, 6) != true) + && (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(padapter), 6) != true)) { - isCCKrate = (psta_dframe_info->sta_data_rate <= DESC_RATE11M) ? TRUE : FALSE; + isCCKrate = (psta_dframe_info->sta_data_rate <= DESC_RATE11M) ? true : false; switch (psta_dframe_info->sta_bw_mode) { @@ -9094,7 +9094,7 @@ void rtw_store_phy_info(_adapter *padapter, union recv_frame *prframe) if (precvpriv->store_law_data_flag) { - isCCKrate = (pattrib->data_rate <= DESC_RATE11M) ? TRUE : FALSE; + isCCKrate = (pattrib->data_rate <= DESC_RATE11M) ? true : false; psample_pkt_rssi->pwdball = p_phy_info->rx_pwdb_all; psample_pkt_rssi->pwr_all = p_phy_info->recv_signal_power; @@ -9114,7 +9114,7 @@ void rtw_store_phy_info(_adapter *padapter, union recv_frame *prframe) if (psta) { psta_dframe_info = &psta->sta_dframe_info; /*RTW_INFO("=>%s psta->hwaddr="MAC_FMT" !\n", __func__, MAC_ARG(psta->hwaddr));*/ - if ((_rtw_memcmp(psta->hwaddr, bc_addr, ETH_ALEN) != _TRUE) || (padapter->registrypriv.mp_mode == 1)) { + if ((_rtw_memcmp(psta->hwaddr, bc_addr, ETH_ALEN) != true) || (padapter->registrypriv.mp_mode == 1)) { psta_dframe_info->sta_data_rate = pattrib->data_rate; psta_dframe_info->sta_sgi = pattrib->sgi; psta_dframe_info->sta_bw_mode = pattrib->bw; @@ -9185,9 +9185,9 @@ int check_phy_efuse_tx_power_info_valid(PADAPTER padapter) /* TODO: chacking length by ICs */ for (index = 0 ; index < 11 ; index++) { if (pContent[tx_index_offset + index] == 0xFF) - return _FALSE; + return false; } - return _TRUE; + return true; } int hal_efuse_macaddr_offset(_adapter *adapter) @@ -9237,7 +9237,7 @@ void rtw_dump_cur_efuse(PADAPTER padapter) u16 mapsize =0; HAL_DATA_TYPE *hal_data = GET_HAL_DATA(padapter); - EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN , (void *)&mapsize, _FALSE); + EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN , (void *)&mapsize, false); if (mapsize <= 0 || mapsize > EEPROM_MAX_SIZE) { RTW_ERR("wrong map size %d\n", mapsize); @@ -9254,14 +9254,14 @@ void rtw_dump_cur_efuse(PADAPTER padapter) u32 Hal_readPGDataFromConfigFile(PADAPTER padapter) { HAL_DATA_TYPE *hal_data = GET_HAL_DATA(padapter); - u32 ret = _FALSE; + u32 ret = false; 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 (maplen < 256 || maplen > EEPROM_MAX_SIZE) { RTW_ERR("eFuse length error :%d\n", maplen); - return _FALSE; + return false; } ret = rtw_read_efuse_from_file(EFUSE_MAP_PATH, hal_data->efuse_eeprom_data, maplen); @@ -9280,7 +9280,7 @@ u32 Hal_ReadMACAddrFromFile(PADAPTER padapter, u8 *mac_addr) u32 ret = _FAIL; if (rtw_read_macaddr_from_file(WIFIMAC_PATH, mac_addr) == _SUCCESS - && rtw_check_invalid_mac_address(mac_addr, _TRUE) == _FALSE + && rtw_check_invalid_mac_address(mac_addr, true) == false ) { hal_data->macaddr_file_status = MACADDR_FILE_LOADED; ret = _SUCCESS; @@ -9318,7 +9318,7 @@ int hal_config_macaddr(_adapter *adapter, bool autoload_fail) } /* check hw pg data */ - if (hw_addr && rtw_check_invalid_mac_address(hw_addr, _TRUE) == _FALSE) { + if (hw_addr && rtw_check_invalid_mac_address(hw_addr, true) == false) { _rtw_memcpy(hal_data->EEPROMMACAddr, hw_addr, ETH_ALEN); goto exit; } @@ -9539,7 +9539,7 @@ inline u8 rtw_hal_busagg_qsel_check(_adapter *padapter, u8 pre_qsel, u8 next_qse struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); u8 chk_rst = _SUCCESS; - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE) + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true) return chk_rst; /* if((pre_qsel == 0xFF)||(next_qsel== 0xFF)) */ @@ -9967,7 +9967,7 @@ void rtw_dump_phy_rxcnts_preprocess(_adapter *padapter, u8 rx_cnt_mode) if ((!(padapter->dump_rx_cnt_mode & DUMP_PHY_RX_COUNTER)) && (rx_cnt_mode & DUMP_PHY_RX_COUNTER)) { rtw_hal_get_odm_var(padapter, HAL_ODM_INITIAL_GAIN, &initialgain, NULL); RTW_INFO("%s CurIGValue:0x%02x\n", __func__, initialgain); - rtw_hal_set_odm_var(padapter, HAL_ODM_INITIAL_GAIN, &initialgain, _FALSE); + rtw_hal_set_odm_var(padapter, HAL_ODM_INITIAL_GAIN, &initialgain, false); /*disable dynamic functions, such as high power, DIG*/ rtw_phydm_ability_backup(padapter); rtw_phydm_func_clr(padapter, (ODM_BB_DIG | ODM_BB_FA_CNT)); @@ -9975,7 +9975,7 @@ void rtw_dump_phy_rxcnts_preprocess(_adapter *padapter, u8 rx_cnt_mode) /* turn on phy-dynamic functions */ rtw_phydm_ability_restore(padapter); initialgain = 0xff; /* restore RX GAIN */ - rtw_hal_set_odm_var(padapter, HAL_ODM_INITIAL_GAIN, &initialgain, _FALSE); + rtw_hal_set_odm_var(padapter, HAL_ODM_INITIAL_GAIN, &initialgain, false); } } @@ -10019,15 +10019,15 @@ void rtw_get_noise(_adapter *padapter) struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct noise_info info; if (rtw_linked_check(padapter)) { - info.bPauseDIG = _TRUE; + info.bPauseDIG = true; info.IGIValue = 0x1e; info.max_time = 100;/* ms */ info.chan = pmlmeext->cur_channel ;/* rtw_get_oper_ch(padapter); */ rtw_ps_deny(padapter, PS_DENY_IOCTL); LeaveAllPowerSaveModeDirect(padapter); - rtw_hal_set_odm_var(padapter, HAL_ODM_NOISE_MONITOR, &info, _FALSE); - /* odm_inband_noise_monitor(podmpriv,_TRUE,0x20,100); */ + rtw_hal_set_odm_var(padapter, HAL_ODM_NOISE_MONITOR, &info, false); + /* odm_inband_noise_monitor(podmpriv,true,0x20,100); */ rtw_ps_deny_cancel(padapter, PS_DENY_IOCTL); rtw_hal_get_odm_var(padapter, HAL_ODM_NOISE_MONITOR, &(info.chan), &(padapter->recvpriv.noise)); #ifdef DBG_NOISE_MONITOR @@ -10099,10 +10099,10 @@ void update_IOT_info(_adapter *padapter) #ifdef CONFIG_AUTO_CHNL_SEL_NHM void rtw_acs_start(_adapter *padapter, bool bStart) { - if (_TRUE == bStart) { + if (true == bStart) { ACS_OP acs_op = ACS_INIT; - rtw_hal_set_odm_var(padapter, HAL_ODM_AUTO_CHNL_SEL, &acs_op, _TRUE); + rtw_hal_set_odm_var(padapter, HAL_ODM_AUTO_CHNL_SEL, &acs_op, true); rtw_set_acs_channel(padapter, 0); SET_ACS_STATE(padapter, ACS_ENABLE); } else { @@ -10426,7 +10426,7 @@ u8 rtw_hal_antdiv_before_linked(_adapter *padapter) u8 cur_ant, change_ant; if (!pHalData->AntDivCfg) - return _FALSE; + return false; if (pHalData->sw_antdiv_bl_state == 0) { pHalData->sw_antdiv_bl_state = 1; @@ -10434,11 +10434,11 @@ u8 rtw_hal_antdiv_before_linked(_adapter *padapter) rtw_hal_get_odm_var(padapter, HAL_ODM_ANTDIV_SELECT, &cur_ant, NULL); change_ant = (cur_ant == MAIN_ANT) ? AUX_ANT : MAIN_ANT; - return rtw_antenna_select_cmd(padapter, change_ant, _FALSE); + return rtw_antenna_select_cmd(padapter, change_ant, false); } pHalData->sw_antdiv_bl_state = 0; - return _FALSE; + return false; } void rtw_hal_antdiv_rssi_compared(_adapter *padapter, WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src) @@ -10509,41 +10509,41 @@ static void rtw_dump_phy_cap_by_phydmapi(void *sel, _adapter *adapter) #else static void rtw_dump_phy_cap_by_hal(void *sel, _adapter *adapter) { - u8 phy_cap = _FALSE; + u8 phy_cap = false; /* STBC */ rtw_hal_get_def_var(adapter, HAL_DEF_TX_STBC, (u8 *)&phy_cap); - RTW_PRINT_SEL(sel, "[HAL] STBC Tx : %s\n", (_TRUE == phy_cap) ? "Supported" : "N/A"); + RTW_PRINT_SEL(sel, "[HAL] STBC Tx : %s\n", (true == phy_cap) ? "Supported" : "N/A"); - phy_cap = _FALSE; + phy_cap = false; rtw_hal_get_def_var(adapter, HAL_DEF_RX_STBC, (u8 *)&phy_cap); - RTW_PRINT_SEL(sel, "[HAL] STBC Rx : %s\n\n", (_TRUE == phy_cap) ? "Supported" : "N/A"); + RTW_PRINT_SEL(sel, "[HAL] STBC Rx : %s\n\n", (true == phy_cap) ? "Supported" : "N/A"); /* LDPC support */ - phy_cap = _FALSE; + phy_cap = false; rtw_hal_get_def_var(adapter, HAL_DEF_TX_LDPC, (u8 *)&phy_cap); - RTW_PRINT_SEL(sel, "[HAL] LDPC Tx : %s\n", (_TRUE == phy_cap) ? "Supported" : "N/A"); + RTW_PRINT_SEL(sel, "[HAL] LDPC Tx : %s\n", (true == phy_cap) ? "Supported" : "N/A"); - phy_cap = _FALSE; + phy_cap = false; rtw_hal_get_def_var(adapter, HAL_DEF_RX_LDPC, (u8 *)&phy_cap); - RTW_PRINT_SEL(sel, "[HAL] LDPC Rx : %s\n\n", (_TRUE == phy_cap) ? "Supported" : "N/A"); + RTW_PRINT_SEL(sel, "[HAL] LDPC Rx : %s\n\n", (true == phy_cap) ? "Supported" : "N/A"); #ifdef CONFIG_BEAMFORMING - phy_cap = _FALSE; + phy_cap = false; rtw_hal_get_def_var(adapter, HAL_DEF_EXPLICIT_BEAMFORMER, (u8 *)&phy_cap); - RTW_PRINT_SEL(sel, "[HAL] Beamformer: %s\n", (_TRUE == phy_cap) ? "Supported" : "N/A"); + RTW_PRINT_SEL(sel, "[HAL] Beamformer: %s\n", (true == phy_cap) ? "Supported" : "N/A"); - phy_cap = _FALSE; + phy_cap = false; rtw_hal_get_def_var(adapter, HAL_DEF_EXPLICIT_BEAMFORMEE, (u8 *)&phy_cap); - RTW_PRINT_SEL(sel, "[HAL] Beamformee: %s\n", (_TRUE == phy_cap) ? "Supported" : "N/A"); + RTW_PRINT_SEL(sel, "[HAL] Beamformee: %s\n", (true == phy_cap) ? "Supported" : "N/A"); - phy_cap = _FALSE; + phy_cap = false; rtw_hal_get_def_var(adapter, HAL_DEF_VHT_MU_BEAMFORMER, &phy_cap); - RTW_PRINT_SEL(sel, "[HAL] VHT MU Beamformer: %s\n", (_TRUE == phy_cap) ? "Supported" : "N/A"); + RTW_PRINT_SEL(sel, "[HAL] VHT MU Beamformer: %s\n", (true == phy_cap) ? "Supported" : "N/A"); - phy_cap = _FALSE; + phy_cap = false; rtw_hal_get_def_var(adapter, HAL_DEF_VHT_MU_BEAMFORMEE, &phy_cap); - RTW_PRINT_SEL(sel, "[HAL] VHT MU Beamformee: %s\n", (_TRUE == phy_cap) ? "Supported" : "N/A"); + RTW_PRINT_SEL(sel, "[HAL] VHT MU Beamformee: %s\n", (true == phy_cap) ? "Supported" : "N/A"); #endif } #endif diff --git a/hal/hal_com_phycfg.c b/hal/hal_com_phycfg.c index 539bb0a..0513da4 100644 --- a/hal/hal_com_phycfg.c +++ b/hal/hal_com_phycfg.c @@ -778,7 +778,7 @@ void hal_load_txpwr_info( u8 rfpath, ch_idx, group, tx_idx; /* load from pg data (or default value) */ - hal_load_pg_txpwr_info(adapter, pwr_info_2g, pwr_info_5g, pg_data, _FALSE); + hal_load_pg_txpwr_info(adapter, pwr_info_2g, pwr_info_5g, pg_data, false); /* transform to hal_data */ for (rfpath = 0; rfpath < MAX_RF_PATH; rfpath++) { @@ -1115,14 +1115,14 @@ static bool rtw_regsty_chk_target_tx_power_valid(_adapter *adapter) target = rtw_regsty_get_target_tx_power(adapter, band, path, rs); if (target == -1) { - RTW_PRINT("%s return _FALSE for band:%d, path:%d, rs:%d, t:%d\n", __func__, band, path, rs, target); - return _FALSE; + RTW_PRINT("%s return false for band:%d, path:%d, rs:%d, t:%d\n", __func__, band, path, rs, target); + return false; } } } } - return _TRUE; + return true; } /* @@ -1220,7 +1220,7 @@ static inline bool phy_is_txpwr_by_rate_undefined_of_band_path(_adapter *adapter } exit: - return (tx_num >= hal_spec->max_tx_cnt || tx_num >= hal_spec->tx_nss_num) ? _TRUE : _FALSE; + return (tx_num >= hal_spec->max_tx_cnt || tx_num >= hal_spec->tx_nss_num) ? true : false; } static inline void phy_txpwr_by_rate_duplicate_band_path(_adapter *adapter, u8 band, u8 s_path, u8 t_path) @@ -1333,7 +1333,7 @@ phy_StoreTxPowerByRateBase( if (IS_VHT_RATE_SECTION(rs)) continue; - if (regsty->target_tx_pwr_valid == _TRUE) + if (regsty->target_tx_pwr_valid == true) base = 2 * rtw_regsty_get_target_tx_power(pAdapter, band, path, rs); else base = _PHY_GetTxPowerByRate(pAdapter, band, path, tx_num, rate_sec_base[rs]); @@ -1952,13 +1952,13 @@ exit: static bool phy_GetChnlIndex(u8 Channel, u8 *ChannelIdx) { u8 i = 0; - bool bIn24G = _TRUE; + bool bIn24G = true; if (Channel <= 14) { - bIn24G = _TRUE; + bIn24G = true; *ChannelIdx = Channel - 1; } else { - bIn24G = _FALSE; + bIn24G = false; for (i = 0; i < CENTER_CH_5G_ALL_NUM; ++i) { if (center_ch_5g_all[i] == Channel) { @@ -1987,7 +1987,7 @@ PHY_GetTxPowerIndexBase( u8 txPower = 0; u8 chnlIdx = (Channel - 1); - if (HAL_IsLegalChannel(pAdapter, Channel) == _FALSE) { + if (HAL_IsLegalChannel(pAdapter, Channel) == false) { chnlIdx = 0; RTW_INFO("Illegal channel!!\n"); } @@ -2143,7 +2143,7 @@ PHY_GetTxPowerTrackingOffset( struct PHY_DM_STRUCT *pDM_Odm = &pHalData->odmpriv; s8 offset = 0; - if (pDM_Odm->rf_calibrate_info.txpowertrack_control == _FALSE) + if (pDM_Odm->rf_calibrate_info.txpowertrack_control == false) return offset; if ((Rate == MGN_1M) || (Rate == MGN_2M) || (Rate == MGN_5_5M) || (Rate == MGN_11M)) { @@ -2722,7 +2722,7 @@ static s8 _phy_get_txpwr_lmt( goto exit; } - if (no_sc == _TRUE) { + if (no_sc == true) { /* use the input center channel and bandwidth directly */ cch = Channel; bw_bmp = ch_width_to_bw_cap(Bandwidth); @@ -2755,7 +2755,7 @@ static s8 _phy_get_txpwr_lmt( if (!(ch_width_to_bw_cap(bw) & bw_bmp)) continue; - if (no_sc == _FALSE) { + if (no_sc == false) { if (bw == CHANNEL_WIDTH_20) cch = hal_data->cch_20; else if (bw == CHANNEL_WIDTH_40) @@ -2816,11 +2816,11 @@ PHY_GetTxPowerLimit( u8 Channel ) { - bool no_sc = _FALSE; + bool no_sc = false; /* MP mode channel don't use secondary channel */ - if (rtw_mi_mp_mode_check(Adapter) == _TRUE) - no_sc = _TRUE; + if (rtw_mi_mp_mode_check(Adapter) == true) + no_sc = true; return _phy_get_txpwr_lmt(Adapter, RegPwrTblSel, Band, Bandwidth, RfPath, DataRate, Channel, no_sc); } @@ -2836,7 +2836,7 @@ PHY_GetTxPowerLimit_no_sc( u8 Channel ) { - return _phy_get_txpwr_lmt(Adapter, RegPwrTblSel, Band, Bandwidth, RfPath, DataRate, Channel, _TRUE); + return _phy_get_txpwr_lmt(Adapter, RegPwrTblSel, Band, Bandwidth, RfPath, DataRate, Channel, true); } #ifdef CONFIG_PHYDM_POWERTRACK_BY_TSSI @@ -3281,8 +3281,8 @@ phy_set_tx_power_limit( RTW_INFO("Index of power limit table [band %s][regulation %s][bw %s][rate section %s][rf path %s][chnl %s][val %s]\n" , Band, Regulation, Bandwidth, RateSection, RfPath, Channel, PowerLimit); - if (GetU1ByteIntegerFromStringInDecimal((s8 *)Channel, &channel) == _FALSE - || GetU1ByteIntegerFromStringInDecimal((s8 *)PowerLimit, &powerLimit) == _FALSE + if (GetU1ByteIntegerFromStringInDecimal((s8 *)Channel, &channel) == false + || GetU1ByteIntegerFromStringInDecimal((s8 *)PowerLimit, &powerLimit) == false ) { RTW_PRINT("Illegal index of power limit table [ch %s][val %s]\n", Channel, PowerLimit); return; @@ -3484,8 +3484,8 @@ bool phy_is_tx_power_limit_needed(_adapter *adapter) if (regsty->RegEnableTxPowerLimit == 1 || (regsty->RegEnableTxPowerLimit == 2 && hal_data->EEPROMRegulatory == 1)) - return _TRUE; - return _FALSE; + return true; + return false; } bool phy_is_tx_power_by_rate_needed(_adapter *adapter) @@ -3495,8 +3495,8 @@ bool phy_is_tx_power_by_rate_needed(_adapter *adapter) if (regsty->RegEnableTxPowerByRate == 1 || (regsty->RegEnableTxPowerByRate == 2 && hal_data->EEPROMRegulatory != 2)) - return _TRUE; - return _FALSE; + return true; + return false; } int phy_load_tx_power_by_rate(_adapter *adapter, u8 chk_file) @@ -3555,7 +3555,7 @@ int phy_load_tx_power_limit(_adapter *adapter, u8 chk_file) hal_data->txpwr_limit_loaded = 0; PHY_InitTxPowerLimit(adapter); - if (!hal_data->txpwr_by_rate_loaded && regsty->target_tx_pwr_valid != _TRUE) { + if (!hal_data->txpwr_by_rate_loaded && regsty->target_tx_pwr_valid != true) { RTW_ERR("%s():Read Tx power limit before target tx power is specify\n", __func__); goto exit; } @@ -3598,7 +3598,7 @@ void phy_load_tx_power_ext_info(_adapter *adapter, u8 chk_file) /* power by rate and limit */ if (phy_is_tx_power_by_rate_needed(adapter) - || (phy_is_tx_power_limit_needed(adapter) && regsty->target_tx_pwr_valid != _TRUE) + || (phy_is_tx_power_limit_needed(adapter) && regsty->target_tx_pwr_valid != true) ) phy_load_tx_power_by_rate(adapter, chk_file); @@ -3621,7 +3621,7 @@ void dump_tx_power_ext_info(void *sel, _adapter *adapter) struct registry_priv *regsty = adapter_to_regsty(adapter); HAL_DATA_TYPE *hal_data = GET_HAL_DATA(adapter); - if (regsty->target_tx_pwr_valid == _TRUE) + if (regsty->target_tx_pwr_valid == true) RTW_PRINT_SEL(sel, "target_tx_power: from registry\n"); else if (phy_is_tx_power_by_rate_needed(adapter)) RTW_PRINT_SEL(sel, "target_tx_power: from power by rate\n"); @@ -3658,7 +3658,7 @@ void dump_target_tx_power(void *sel, _adapter *adapter) break; RTW_PRINT_SEL(sel, "[%s][%c]%s\n", band_str(band), rf_path_char(path) - , (regsty->target_tx_pwr_valid == _FALSE && hal_data->txpwr_by_rate_undefined_band_path[band][path]) ? "(dup)" : ""); + , (regsty->target_tx_pwr_valid == false && hal_data->txpwr_by_rate_undefined_band_path[band][path]) ? "(dup)" : ""); for (rs = 0; rs < RATE_SECTION_NUM; rs++) { tx_num = rate_section_to_tx_num(rs); @@ -3936,10 +3936,10 @@ int rtw_get_phy_file_path(_adapter *adapter, const char *file_name) #endif len += snprintf(rtw_phy_para_file_path + len, PATH_LENGTH_MAX - len, "%s", file_name); - return _TRUE; + return true; } #endif - return _FALSE; + return false; } #ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE @@ -3961,7 +3961,7 @@ phy_ConfigMACWithParaFile( if ((pHalData->mac_reg_len == 0) && (pHalData->mac_reg == NULL)) { rtw_get_phy_file_path(Adapter, pFileName); - if (rtw_is_file_readable(rtw_phy_para_file_path) == _TRUE) { + if (rtw_is_file_readable(rtw_phy_para_file_path) == true) { rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); if (rlen > 0) { rtStatus = _SUCCESS; @@ -4040,7 +4040,7 @@ phy_ConfigBBWithParaFile( if ((pBufLen != NULL) && (*pBufLen == 0) && (pBuf == NULL)) { rtw_get_phy_file_path(Adapter, pFileName); - if (rtw_is_file_readable(rtw_phy_para_file_path) == _TRUE) { + if (rtw_is_file_readable(rtw_phy_para_file_path) == true) { rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); if (rlen > 0) { rtStatus = _SUCCESS; @@ -4157,7 +4157,7 @@ static int phy_ParseBBPgParaFile(PADAPTER Adapter, char *buffer) char *szLine, *ptmp; u32 u4bRegOffset, u4bRegMask, u4bRegValue; u32 u4bMove; - bool firstLine = _TRUE; + bool firstLine = true; u8 tx_num = 0; u8 band = 0, rf_path = 0; @@ -4189,12 +4189,12 @@ static int phy_ParseBBPgParaFile(PADAPTER Adapter, char *buffer) if (eqNByte(szLine + 5, (u8 *)("[Exact]#"), 8)) { pHalData->odmpriv.phy_reg_pg_value_type = PHY_REG_PG_EXACT_VALUE; /* RTW_INFO("The values in PHY_REG_PG are exact values ok\n"); */ - firstLine = _FALSE; + firstLine = false; continue; } else if (eqNByte(szLine + 5, (u8 *)("[Relative]#"), 11)) { pHalData->odmpriv.phy_reg_pg_value_type = PHY_REG_PG_RELATIVE_VALUE; /* RTW_INFO("The values in PHY_REG_PG are relative values ok\n"); */ - firstLine = _FALSE; + firstLine = false; continue; } else { RTW_INFO("The values in PHY_REG_PG are invalid %s\n", szLine); @@ -4418,7 +4418,7 @@ phy_ConfigBBWithPgParaFile( if (pHalData->bb_phy_reg_pg == NULL) { rtw_get_phy_file_path(Adapter, pFileName); - if (rtw_is_file_readable(rtw_phy_para_file_path) == _TRUE) { + if (rtw_is_file_readable(rtw_phy_para_file_path) == true) { rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); if (rlen > 0) { rtStatus = _SUCCESS; @@ -4467,7 +4467,7 @@ phy_ConfigBBWithMpParaFile( if ((pHalData->bb_phy_reg_mp_len == 0) && (pHalData->bb_phy_reg_mp == NULL)) { rtw_get_phy_file_path(Adapter, pFileName); - if (rtw_is_file_readable(rtw_phy_para_file_path) == _TRUE) { + if (rtw_is_file_readable(rtw_phy_para_file_path) == true) { rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); if (rlen > 0) { rtStatus = _SUCCESS; @@ -4571,7 +4571,7 @@ PHY_ConfigRFWithParaFile( if ((pBufLen != NULL) && (*pBufLen == 0) && (pBuf == NULL)) { rtw_get_phy_file_path(Adapter, pFileName); - if (rtw_is_file_readable(rtw_phy_para_file_path) == _TRUE) { + if (rtw_is_file_readable(rtw_phy_para_file_path) == true) { rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); if (rlen > 0) { rtStatus = _SUCCESS; @@ -4766,7 +4766,7 @@ PHY_ConfigRFWithTxPwrTrackParaFile( if ((pHalData->rf_tx_pwr_track_len == 0) && (pHalData->rf_tx_pwr_track == NULL)) { rtw_get_phy_file_path(Adapter, pFileName); - if (rtw_is_file_readable(rtw_phy_para_file_path) == _TRUE) { + if (rtw_is_file_readable(rtw_phy_para_file_path) == true) { rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); if (rlen > 0) { rtStatus = _SUCCESS; @@ -5083,7 +5083,7 @@ PHY_ConfigRFWithPowerLimitTableParaFile( if (pHalData->rf_tx_pwr_lmt == NULL) { rtw_get_phy_file_path(Adapter, pFileName); - if (rtw_is_file_readable(rtw_phy_para_file_path) == _TRUE) { + if (rtw_is_file_readable(rtw_phy_para_file_path) == true) { rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); if (rlen > 0) { rtStatus = _SUCCESS; diff --git a/hal/hal_dm.c b/hal/hal_dm.c index 2e0bb2d..4c81390 100644 --- a/hal/hal_dm.c +++ b/hal/hal_dm.c @@ -158,9 +158,9 @@ void Init_ODM_ComInfo(_adapter *adapter) /*Add by YuChen for adaptivity init*/ odm_cmn_info_hook(pDM_Odm, ODM_CMNINFO_ADAPTIVITY, &(adapter->registrypriv.adaptivity_en)); - phydm_adaptivity_info_init(pDM_Odm, PHYDM_ADAPINFO_CARRIER_SENSE_ENABLE, (adapter->registrypriv.adaptivity_mode != 0) ? TRUE : FALSE); + phydm_adaptivity_info_init(pDM_Odm, PHYDM_ADAPINFO_CARRIER_SENSE_ENABLE, (adapter->registrypriv.adaptivity_mode != 0) ? true : false); phydm_adaptivity_info_init(pDM_Odm, PHYDM_ADAPINFO_DCBACKOFF, adapter->registrypriv.adaptivity_dc_backoff); - phydm_adaptivity_info_init(pDM_Odm, PHYDM_ADAPINFO_DYNAMICLINKADAPTIVITY, (adapter->registrypriv.adaptivity_dml != 0) ? TRUE : FALSE); + phydm_adaptivity_info_init(pDM_Odm, PHYDM_ADAPINFO_DYNAMICLINKADAPTIVITY, (adapter->registrypriv.adaptivity_dml != 0) ? true : false); phydm_adaptivity_info_init(pDM_Odm, PHYDM_ADAPINFO_TH_L2H_INI, adapter->registrypriv.adaptivity_th_l2h_ini); phydm_adaptivity_info_init(pDM_Odm, PHYDM_ADAPINFO_TH_EDCCA_HL_DIFF, adapter->registrypriv.adaptivity_th_edcca_hl_diff); @@ -197,6 +197,6 @@ void Init_ODM_ComInfo(_adapter *adapter) phydm_init_debug_setting(pDM_Odm); /* TODO */ - /* odm_cmn_info_hook(pDM_Odm, ODM_CMNINFO_BT_OPERATION, _FALSE); */ - /* odm_cmn_info_hook(pDM_Odm, ODM_CMNINFO_BT_DISABLE_EDCA, _FALSE); */ + /* odm_cmn_info_hook(pDM_Odm, ODM_CMNINFO_BT_OPERATION, false); */ + /* odm_cmn_info_hook(pDM_Odm, ODM_CMNINFO_BT_DISABLE_EDCA, false); */ } diff --git a/hal/hal_intf.c b/hal/hal_intf.c index ca2dad7..6e250dd 100644 --- a/hal/hal_intf.c +++ b/hal/hal_intf.c @@ -197,7 +197,7 @@ void rtw_hal_init_opmode(_adapter *padapter) else return; - rtw_setopmode_cmd(padapter, networkType, _FALSE); + rtw_setopmode_cmd(padapter, networkType, false); } uint rtw_hal_init(_adapter *padapter) @@ -210,7 +210,7 @@ uint rtw_hal_init(_adapter *padapter) status = padapter->hal_func.hal_init(padapter); if (status == _SUCCESS) { - pHalData->hw_init_completed = _TRUE; + pHalData->hw_init_completed = true; rtw_restore_mac_addr(padapter); if (padapter->registrypriv.notch_filter == 1) @@ -230,7 +230,7 @@ uint rtw_hal_init(_adapter *padapter) #endif /*CONFIG_RF_POWER_TRIM*/ } else { - pHalData->hw_init_completed = _FALSE; + pHalData->hw_init_completed = false; RTW_INFO("rtw_hal_init: hal_init fail\n"); } @@ -250,7 +250,7 @@ uint rtw_hal_deinit(_adapter *padapter) if (status == _SUCCESS) { rtw_led_control(padapter, LED_CTL_POWER_OFF); - pHalData->hw_init_completed = _FALSE; + pHalData->hw_init_completed = false; } else RTW_INFO("\n rtw_hal_deinit: hal_init fail\n"); @@ -298,7 +298,7 @@ void rtw_hal_disable_interrupt(_adapter *padapter) u8 rtw_hal_check_ips_status(_adapter *padapter) { - u8 val = _FALSE; + u8 val = false; if (padapter->hal_func.check_ips_status) val = padapter->hal_func.check_ips_status(padapter); else @@ -370,18 +370,18 @@ s32 rtw_hal_mgnt_xmit(_adapter *padapter, struct xmit_frame *pmgntframe) /* _rtw_memcpy(pmgntframe->attrib.ra, pwlanhdr->addr1, ETH_ALEN); */ #ifdef CONFIG_IEEE80211W - if (padapter->securitypriv.binstallBIPkey == _TRUE && (subtype == WIFI_DEAUTH || subtype == WIFI_DISASSOC || + if (padapter->securitypriv.binstallBIPkey == true && (subtype == WIFI_DEAUTH || subtype == WIFI_DISASSOC || subtype == WIFI_ACTION)) { if (IS_MCAST(pmgntframe->attrib.ra) && pmgntframe->attrib.key_type != IEEE80211W_NO_KEY) { pmgntframe->attrib.encrypt = _BIP_; - /* pmgntframe->attrib.bswenc = _TRUE; */ + /* pmgntframe->attrib.bswenc = true; */ } else if (pmgntframe->attrib.key_type != IEEE80211W_NO_KEY) { psta = rtw_get_stainfo(pstapriv, pmgntframe->attrib.ra); - if (psta && psta->bpairwise_key_installed == _TRUE) { + if (psta && psta->bpairwise_key_installed == true) { pmgntframe->attrib.encrypt = _AES_; - pmgntframe->attrib.bswenc = _TRUE; + pmgntframe->attrib.bswenc = true; } else { - RTW_INFO("%s, %d, bpairwise_key_installed is FALSE\n", __func__, __LINE__); + RTW_INFO("%s, %d, bpairwise_key_installed is false\n", __func__, __LINE__); goto no_mgmt_coalesce; } } @@ -420,7 +420,7 @@ void rtw_update_ramask(_adapter *padapter, struct sta_info *psta, u32 mac_id, u8 struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); HAL_DATA_TYPE *hal_data = GET_HAL_DATA(padapter); - u8 disable_cck_rate = FALSE, MimoPs_enable = FALSE; + u8 disable_cck_rate = false, MimoPs_enable = false; u32 ratr_bitmap_msb = 0, ratr_bitmap_lsb = 0; u64 mask = 0, rate_bitmap = 0; u8 bw, short_gi; @@ -497,7 +497,7 @@ void rtw_hal_update_ra_mask(struct sta_info *psta, u8 rssi_level, u8 is_update_b pmlmepriv = &(padapter->mlmepriv); - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) add_RATid(padapter, psta, rssi_level, is_update_bw); else { psta->raid = rtw_hal_networktype_to_raid(padapter, psta); @@ -574,12 +574,12 @@ void rtw_hal_set_chnl_bw(_adapter *padapter, u8 channel, CHANNEL_WIDTH Bandwidth u8 cch_20 = Bandwidth == CHANNEL_WIDTH_20 ? channel : 0; odm_acquire_spin_lock(pDM_Odm, RT_IQK_SPINLOCK); - if (pDM_Odm->rf_calibrate_info.is_iqk_in_progress == _TRUE) + if (pDM_Odm->rf_calibrate_info.is_iqk_in_progress == true) RTW_ERR("%s, %d, IQK may race condition\n", __func__, __LINE__); odm_release_spin_lock(pDM_Odm, RT_IQK_SPINLOCK); /* MP mode channel don't use secondary channel */ - if (rtw_mi_mp_mode_check(padapter) == _FALSE) { + if (rtw_mi_mp_mode_check(padapter) == false) { if (cch_80 != 0) cch_40 = rtw_get_scch_by_cch_offset(cch_80, CHANNEL_WIDTH_80, Offset80); if (cch_40 != 0) @@ -633,7 +633,7 @@ void rtw_hal_dm_watchdog_in_lps(_adapter *padapter) #endif #endif - if (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode == _TRUE) { + if (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode == true) { padapter->hal_func.hal_dm_watchdog_in_lps(padapter);/* this function caller is in interrupt context */ } } @@ -847,7 +847,7 @@ s32 c2h_handler(_adapter *adapter, u8 id, u8 seq, u8 plen, u8 *payload) /* no handle, goto default */ default: - if (phydm_c2H_content_parsing(odm, id, plen, payload) != TRUE) + if (phydm_c2H_content_parsing(odm, id, plen, payload) != true) ret = _FAIL; break; } @@ -886,9 +886,9 @@ s32 rtw_hal_c2h_id_handle_directly(_adapter *adapter, u8 id, u8 seq, u8 plen, u8 case C2H_BCN_EARLY_RPT: case C2H_AP_REQ_TXRPT: case C2H_SPC_STAT: - return _TRUE; + return true; default: - return _FALSE; + return false; } } #endif /* !RTW_HALMAC */ @@ -904,9 +904,9 @@ s32 rtw_hal_macid_sleep(PADAPTER padapter, u8 macid) struct macid_ctl_t *macid_ctl = dvobj_to_macidctl(dvobj); u8 support; - support = _FALSE; + support = false; rtw_hal_get_def_var(padapter, HAL_DEF_MACID_SLEEP, &support); - if (_FALSE == support) + if (false == support) return _FAIL; if (macid >= macid_ctl->num) { @@ -926,9 +926,9 @@ s32 rtw_hal_macid_wakeup(PADAPTER padapter, u8 macid) struct macid_ctl_t *macid_ctl = dvobj_to_macidctl(dvobj); u8 support; - support = _FALSE; + support = false; rtw_hal_get_def_var(padapter, HAL_DEF_MACID_SLEEP, &support); - if (_FALSE == support) + if (false == support) return _FAIL; if (macid >= macid_ctl->num) { @@ -946,7 +946,7 @@ s32 rtw_hal_fill_h2c_cmd(PADAPTER padapter, u8 ElementID, u32 CmdLen, u8 *pCmdBu { _adapter *pri_adapter = GET_PRIMARY_ADAPTER(padapter); - if (pri_adapter->bFWReady == _TRUE) + if (pri_adapter->bFWReady == true) return padapter->hal_func.fill_h2c_cmd(padapter, ElementID, CmdLen, pCmdBuffer); else if (padapter->registrypriv.mp_mode == 0) RTW_PRINT(FUNC_ADPT_FMT" FW doesn't exit when no MP mode, by pass H2C id:0x%02x\n" @@ -1011,8 +1011,8 @@ u8 rtw_hal_get_tx_power_index(PADAPTER padapter, u8 rfpath, u8 rate, u8 bandwidt * Initialize MAC registers * * Return: - * _TRUE success - * _FALSE fail + * true success + * false fail */ u8 rtw_hal_init_mac_register(PADAPTER adapter) { @@ -1024,8 +1024,8 @@ u8 rtw_hal_init_mac_register(PADAPTER adapter) * Initialize PHY(BB/RF) related functions * * Return: - * _TRUE success - * _FALSE fail + * true success + * false fail */ u8 rtw_hal_init_phy(PADAPTER adapter) { @@ -1042,7 +1042,7 @@ bool rtw_hal_rfkill_poll(_adapter *adapter, u8 *valid) ret = adapter->hal_func.hal_radio_onoff_check(adapter, valid); else { *valid = 0; - ret = _FALSE; + ret = false; } return ret; } diff --git a/hal/hal_mcc.c b/hal/hal_mcc.c index 81f8f85..5512119 100644 --- a/hal/hal_mcc.c +++ b/hal/hal_mcc.c @@ -178,7 +178,7 @@ static void rtw_hal_mcc_update_go_p2p_ie(PADAPTER padapter) } printk("\n"); } - update_beacon(padapter, _VENDOR_SPECIFIC_IE_, P2P_OUI, _TRUE); + update_beacon(padapter, _VENDOR_SPECIFIC_IE_, P2P_OUI, true); } /** @@ -195,19 +195,19 @@ static void rtw_hal_mcc_remove_go_p2p_ie(PADAPTER padapter) return; pmccadapriv->p2p_go_noa_ie_len = 0; - update_beacon(padapter, _VENDOR_SPECIFIC_IE_, P2P_OUI, _TRUE); + update_beacon(padapter, _VENDOR_SPECIFIC_IE_, P2P_OUI, true); } /* restore IQK value for all interface */ void rtw_hal_mcc_restore_iqk_val(PADAPTER padapter) { - u8 take_care_iqk = _FALSE; + u8 take_care_iqk = false; struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); _adapter *iface = NULL; u8 i = 0; rtw_hal_get_hwreg(padapter, HW_VAR_CH_SW_NEED_TO_TAKE_CARE_IQK_INFO, &take_care_iqk); - if (take_care_iqk == _TRUE && MCC_EN(padapter)) { + if (take_care_iqk == true && MCC_EN(padapter)) { for (i = 0; i < dvobj->iface_nums; i++) { iface = dvobj->padapters[i]; if (iface == NULL) @@ -226,9 +226,9 @@ u8 rtw_hal_check_mcc_status(PADAPTER padapter, u8 mcc_status) struct mcc_obj_priv *pmccobjpriv = &(adapter_to_dvobj(padapter)->mcc_objpriv); if (pmccobjpriv->mcc_status & (mcc_status)) - return _TRUE; + return true; else - return _FALSE; + return false; } void rtw_hal_set_mcc_status(PADAPTER padapter, u8 mcc_status) @@ -553,9 +553,9 @@ u8 rtw_hal_dl_mcc_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 *index, _rtw_memcpy(bssid, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); rtw_hal_construct_NullFunctionData(iface - , &pframe[*index], &len, bssid, _FALSE, 0, 0, _FALSE); + , &pframe[*index], &len, bssid, false, 0, 0, false); rtw_hal_fill_fake_txdesc(iface, &pframe[*index-tx_desc], - len, _FALSE, _FALSE, _FALSE); + len, false, false, false); CurtPktPageNum = (u8)PageNum(tx_desc + len, page_size); *page_num += CurtPktPageNum; @@ -570,7 +570,7 @@ u8 rtw_hal_dl_mcc_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 *index, len = 0; rtw_hal_construct_CTS(iface, &pframe[*index], &len); rtw_hal_fill_fake_txdesc(iface, &pframe[*index-tx_desc], - len, _FALSE, _FALSE, _FALSE); + len, false, false, false); CurtPktPageNum = (u8)PageNum(tx_desc + len, page_size); *page_num += CurtPktPageNum; @@ -858,7 +858,7 @@ static void rtw_hal_set_mcc_ctrl_cmd(PADAPTER padapter, u8 stop) duration = iface->mcc_adapterpriv.mcc_duration; role = iface->mcc_adapterpriv.role; - incurch = _FALSE; + incurch = false; if (IS_HARDWARE_TYPE_8812(padapter)) rfetype = pHalData->rfe_type; /* RFETYPE (only for 8812)*/ @@ -957,7 +957,7 @@ static u8 rtw_hal_set_mcc_start_setting(PADAPTER padapter, u8 status) rtw_hal_set_mcc_macid_cmd(padapter); /* set mcc parameter */ - rtw_hal_set_mcc_ctrl_cmd(padapter, _FALSE); + rtw_hal_set_mcc_ctrl_cmd(padapter, false); exit: return ret; @@ -982,7 +982,7 @@ static void rtw_hal_set_mcc_stop_setting(PADAPTER padapter, u8 status) continue; /* use other interface to set cmd */ if (iface != padapter) { - rtw_hal_set_mcc_ctrl_cmd(iface, _TRUE); + rtw_hal_set_mcc_ctrl_cmd(iface, true); break; } } @@ -1058,7 +1058,7 @@ static u8 rtw_hal_set_mcc_setting(PADAPTER padapter, u8 status) { u8 ret = _FAIL; struct mcc_obj_priv *pmccobjpriv = &(adapter_to_dvobj(padapter)->mcc_objpriv); - u8 stop = (status < MCC_SETCMD_STATUS_START_CONNECT) ? _TRUE : _FALSE; + u8 stop = (status < MCC_SETCMD_STATUS_START_CONNECT) ? true : false; u32 start_time = rtw_get_current_time(); RTW_INFO("===> "FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter)); @@ -1066,7 +1066,7 @@ static u8 rtw_hal_set_mcc_setting(PADAPTER padapter, u8 status) rtw_sctx_init(&pmccobjpriv->mcc_sctx, MCC_EXPIRE_TIME); pmccobjpriv->mcc_c2h_status = MCC_RPT_MAX; - if (stop == _FALSE) { + if (stop == false) { /* handle mcc start */ if (rtw_hal_set_mcc_start_setting(padapter, status) == _FAIL) goto exit; @@ -1122,8 +1122,8 @@ static void rtw_hal_mcc_check_case_not_limit_traffic(PADAPTER cur_iface, PADAPTE /* for both interface are VHT80, doesn't limit_traffic according to iperf results */ if (cur_bw == CHANNEL_WIDTH_80 && next_bw == CHANNEL_WIDTH_80) { - cur_iface->mcc_adapterpriv.mcc_tp_limit = _FALSE; - next_iface->mcc_adapterpriv.mcc_tp_limit = _FALSE; + cur_iface->mcc_adapterpriv.mcc_tp_limit = false; + next_iface->mcc_adapterpriv.mcc_tp_limit = false; } } @@ -1173,20 +1173,20 @@ static void rtw_hal_mcc_sw_ch_fw_notify_hdl(PADAPTER padapter) /* check single TX or cuncurrnet TX */ if (next_mccadapriv->mcc_tp < single_tx_cri) { /* single TX, does not stop */ - cur_mccadapriv->mcc_tx_stop = _FALSE; - cur_mccadapriv->mcc_tp_limit = _FALSE; + cur_mccadapriv->mcc_tx_stop = false; + cur_mccadapriv->mcc_tp_limit = false; } else { /* concurrent TX, stop */ - cur_mccadapriv->mcc_tx_stop = _TRUE; - cur_mccadapriv->mcc_tp_limit = _TRUE; + cur_mccadapriv->mcc_tx_stop = true; + cur_mccadapriv->mcc_tp_limit = true; } if (cur_mccadapriv->mcc_tp < single_tx_cri) { - next_mccadapriv->mcc_tx_stop = _FALSE; - next_mccadapriv->mcc_tp_limit = _FALSE; + next_mccadapriv->mcc_tx_stop = false; + next_mccadapriv->mcc_tp_limit = false; } else { - next_mccadapriv->mcc_tx_stop = _FALSE; - next_mccadapriv->mcc_tp_limit = _TRUE; + next_mccadapriv->mcc_tx_stop = false; + next_mccadapriv->mcc_tp_limit = true; next_mccadapriv->mcc_tx_bytes_to_port = 0; } @@ -1402,7 +1402,7 @@ void rtw_hal_mcc_sw_status_check(PADAPTER padapter) */ u8 rtw_hal_mcc_change_scan_flag(PADAPTER padapter, u8 *ch, u8 *bw, u8 *offset) { - u8 need_ch_setting_union = _TRUE, i = 0, flags = 0, role = 0; + u8 need_ch_setting_union = true, i = 0, flags = 0, role = 0; struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); struct mcc_adapter_priv *pmccadapriv = NULL; struct mlme_ext_priv *pmlmeext = NULL; @@ -1427,7 +1427,7 @@ u8 rtw_hal_mcc_change_scan_flag(PADAPTER padapter, u8 *ch, u8 *bw, u8 *offset) *ch = pmlmeext->cur_channel; *bw = pmlmeext->cur_bwmode; *offset = pmlmeext->cur_ch_offset; - need_ch_setting_union = _FALSE; + need_ch_setting_union = false; break; case MCC_ROLE_STA: case MCC_ROLE_GC: @@ -1505,15 +1505,15 @@ inline u8 rtw_hal_mcc_stop_tx_bytes_to_port(PADAPTER padapter) if (rtw_hal_check_mcc_status(padapter, MCC_STATUS_DOING_MCC)) { if (pmccadapriv->mcc_tp_limit) { if (pmccadapriv->mcc_tx_bytes_to_port >= pmccadapriv->mcc_target_tx_bytes_to_port) { - pmccadapriv->mcc_tx_stop = _TRUE; + pmccadapriv->mcc_tx_stop = true; rtw_netif_stop_queue(padapter->pnetdev); - return _TRUE; + return true; } } } } - return _FALSE; + return false; } /** @@ -1577,7 +1577,7 @@ u8 rtw_hal_set_mcc_setting_start_bss_network(PADAPTER padapter, u8 chbw_allow) if (MCC_EN(padapter)) { /* channel bw offset can not be allowed, start MCC */ - if (chbw_allow == _FALSE) { + if (chbw_allow == false) { struct mcc_obj_priv *pmccobjpriv = &(adapter_to_dvobj(padapter)->mcc_objpriv); rtw_hal_mcc_restore_iqk_val(padapter); @@ -1626,7 +1626,7 @@ u8 rtw_hal_set_mcc_setting_join_done_chk_ch(PADAPTER padapter) rtw_mi_status_no_self(padapter, &mstate); if (MSTATE_STA_LD_NUM(&mstate) || MSTATE_STA_LG_NUM(&mstate) || MSTATE_AP_NUM(&mstate)) { - bool chbw_allow = _TRUE; + bool chbw_allow = true; u8 u_ch, u_offset, u_bw; struct mlme_ext_priv *cur_mlmeext = &padapter->mlmeextpriv; struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); @@ -1648,7 +1648,7 @@ u8 rtw_hal_set_mcc_setting_join_done_chk_ch(PADAPTER padapter) , FUNC_ADPT_ARG(padapter), chbw_allow); /* if chbw_allow = false, start MCC setting */ - if (chbw_allow == _FALSE) { + if (chbw_allow == false) { struct mcc_obj_priv *pmccobjpriv = &dvobj->mcc_objpriv; rtw_hal_mcc_restore_iqk_val(padapter); @@ -1674,10 +1674,10 @@ u8 rtw_hal_set_mcc_setting_chk_start_clnt_join(PADAPTER padapter, u8 *ch, u8 *bw { u8 ret = _FAIL; - /* if chbw_allow = false under en_mcc = TRUE, we do not change channel related setting */ + /* if chbw_allow = false under en_mcc = true, we do not change channel related setting */ if (MCC_EN(padapter)) { /* restore union channel related setting to current channel related setting */ - if (chbw_allow == _FALSE) { + if (chbw_allow == false) { struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; *ch = pmlmeext->cur_channel; @@ -1782,7 +1782,7 @@ inline void update_mcc_mgntframe_attrib(_adapter *padapter, struct pkt_attrib *p inline u8 rtw_hal_mcc_link_status_chk(_adapter *padapter, const char *msg) { - u8 ret = _TRUE, i = 0; + u8 ret = true, i = 0; struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); _adapter *iface; struct mlme_ext_priv *mlmeext; @@ -1796,7 +1796,7 @@ inline u8 rtw_hal_mcc_link_status_chk(_adapter *padapter, const char *msg) #ifdef DBG_EXPIRATION_CHK RTW_INFO(FUNC_ADPT_FMT" don't enter %s under scan for MCC mode\n", FUNC_ADPT_ARG(padapter), msg); #endif - ret = _FALSE; + ret = false; goto exit; } } @@ -1820,7 +1820,7 @@ void rtw_hal_mcc_issue_null_data(_adapter *padapter, u8 chbw_allow, u8 ps_mode) if (rtw_hal_check_mcc_status(padapter, MCC_STATUS_DOING_MCC)) return; - if (chbw_allow == _TRUE) + if (chbw_allow == true) return; for (i = 0; i < dvobj->iface_nums; i++) { diff --git a/hal/hal_mp.c b/hal/hal_mp.c index 6a2dab2..837224f 100644 --- a/hal/hal_mp.c +++ b/hal/hal_mp.c @@ -74,13 +74,13 @@ s32 hal_mpt_SetPowerTracking(PADAPTER padapter, u8 enable) return _FAIL; } - if (check_fwstate(&padapter->mlmepriv, WIFI_MP_STATE) == _FALSE) { + if (check_fwstate(&padapter->mlmepriv, WIFI_MP_STATE) == false) { return _FAIL; } if (enable) - pDM_Odm->rf_calibrate_info.txpowertrack_control = _TRUE; + pDM_Odm->rf_calibrate_info.txpowertrack_control = true; else - pDM_Odm->rf_calibrate_info.txpowertrack_control = _FALSE; + pDM_Odm->rf_calibrate_info.txpowertrack_control = false; return _SUCCESS; } @@ -109,9 +109,9 @@ void hal_mpt_CCKTxPowerAdjust(PADAPTER Adapter, bool bInCH14) DataRate = mpt_to_mgnt_rate(ulRateIdx); if (u1Channel == 14 && IS_CCK_RATE(DataRate)) - pHalData->bCCKinCH14 = TRUE; + pHalData->bCCKinCH14 = true; else - pHalData->bCCKinCH14 = FALSE; + pHalData->bCCKinCH14 = false; /* get current cck swing value and check 0xa22 & 0xa23 later to match the table.*/ CurrCCKSwingVal = read_bbreg(Adapter, rCCK0_TxFilter1, bMaskHWord); @@ -185,8 +185,8 @@ void hal_mpt_SetChannel(PADAPTER pAdapter) hal_mpt_SwitchRfSetting(pAdapter); - pHalData->bSwChnl = _TRUE; - pHalData->bSetChnlBW = _TRUE; + pHalData->bSwChnl = true; + pHalData->bSetChnlBW = true; rtw_hal_set_chnl_bw(pAdapter, channel, bandwidth, 0, 0); hal_mpt_CCKTxPowerAdjust(pAdapter, pHalData->bCCKinCH14); @@ -205,8 +205,8 @@ void hal_mpt_SetBandwidth(PADAPTER pAdapter) u8 channel = pmp->channel; u8 bandwidth = pmp->bandwidth; - pHalData->bSwChnl = _TRUE; - pHalData->bSetChnlBW = _TRUE; + pHalData->bSwChnl = true; + pHalData->bSetChnlBW = true; rtw_hal_set_chnl_bw(pAdapter, channel, bandwidth, 0, 0); hal_mpt_SwitchRfSetting(pAdapter); @@ -568,7 +568,7 @@ s32 hal_mpt_SetThermalMeter(PADAPTER pAdapter, u8 target_ther) } - if (check_fwstate(&pAdapter->mlmepriv, WIFI_MP_STATE) == _FALSE) { + if (check_fwstate(&pAdapter->mlmepriv, WIFI_MP_STATE) == false) { return _FAIL; } @@ -765,8 +765,8 @@ static void mpt_StopCckContTx( PMPT_CONTEXT pMptCtx = &(pAdapter->mppriv.mpt_ctx); u8 u1bReg; - pMptCtx->bCckContTx = FALSE; - pMptCtx->bOfdmContTx = FALSE; + pMptCtx->bCckContTx = false; + pMptCtx->bOfdmContTx = false; phy_set_bb_reg(pAdapter, rCCK0_System, bCCKBBMode, 0x0); /*normal mode*/ phy_set_bb_reg(pAdapter, rCCK0_System, bCCKScramble, 0x1); /*turn on scramble setting*/ @@ -790,8 +790,8 @@ static void mpt_StopOfdmContTx( u8 u1bReg; u32 data; - pMptCtx->bCckContTx = FALSE; - pMptCtx->bOfdmContTx = FALSE; + pMptCtx->bCckContTx = false; + pMptCtx->bOfdmContTx = false; phy_set_bb_reg(pAdapter, rOFDM1_LSTF, BIT30 | BIT29 | BIT28, OFDM_ALL_OFF); @@ -837,8 +837,8 @@ static void mpt_StartCckContTx( phy_set_bb_reg(pAdapter, rFPGA0_XA_HSSIParameter1, bMaskDWord, 0x01000500); phy_set_bb_reg(pAdapter, rFPGA0_XB_HSSIParameter1, bMaskDWord, 0x01000500); - pMptCtx->bCckContTx = TRUE; - pMptCtx->bOfdmContTx = FALSE; + pMptCtx->bCckContTx = true; + pMptCtx->bOfdmContTx = false; } /* mpt_StartCckContTx */ @@ -869,8 +869,8 @@ static void mpt_StartOfdmContTx( phy_set_bb_reg(pAdapter, rFPGA0_XA_HSSIParameter1, bMaskDWord, 0x01000500); phy_set_bb_reg(pAdapter, rFPGA0_XB_HSSIParameter1, bMaskDWord, 0x01000500); - pMptCtx->bCckContTx = FALSE; - pMptCtx->bOfdmContTx = TRUE; + pMptCtx->bCckContTx = false; + pMptCtx->bOfdmContTx = true; } /* mpt_StartOfdmContTx */ void hal_mpt_SetContinuousTx(PADAPTER pAdapter, u8 bStart) diff --git a/hal/hal_phy.c b/hal/hal_phy.c index ff07c91..cb56f3c 100644 --- a/hal/hal_phy.c +++ b/hal/hal_phy.c @@ -101,7 +101,7 @@ PHY_RFShadowWrite( u32 Data) { RF_Shadow[eRFPath][Offset].Value = (Data & bRFRegOffsetMask); - RF_Shadow[eRFPath][Offset].Driver_Write = _TRUE; + RF_Shadow[eRFPath][Offset].Driver_Write = true; } /* PHY_RFShadowWrite */ @@ -114,16 +114,16 @@ PHY_RFShadowCompare( { u32 reg; /* Check if we need to check the register */ - if (RF_Shadow[eRFPath][Offset].Compare == _TRUE) { + if (RF_Shadow[eRFPath][Offset].Compare == true) { reg = rtw_hal_read_rfreg(Adapter, eRFPath, Offset, bRFRegOffsetMask); /* Compare shadow and real rf register for 20bits!! */ if (RF_Shadow[eRFPath][Offset].Value != reg) { /* Locate error position. */ - RF_Shadow[eRFPath][Offset].ErrorOrNot = _TRUE; + RF_Shadow[eRFPath][Offset].ErrorOrNot = true; } return RF_Shadow[eRFPath][Offset].ErrorOrNot ; } - return _FALSE; + return false; } /* PHY_RFShadowCompare */ @@ -134,9 +134,9 @@ PHY_RFShadowRecorver( u32 Offset) { /* Check if the address is error */ - if (RF_Shadow[eRFPath][Offset].ErrorOrNot == _TRUE) { + if (RF_Shadow[eRFPath][Offset].ErrorOrNot == true) { /* Check if we need to recorver the register. */ - if (RF_Shadow[eRFPath][Offset].Recorver == _TRUE) { + if (RF_Shadow[eRFPath][Offset].Recorver == true) { rtw_hal_write_rfreg(Adapter, eRFPath, Offset, bRFRegOffsetMask, RF_Shadow[eRFPath][Offset].Value); } @@ -212,9 +212,9 @@ PHY_RFShadowCompareFlagSetAll( for (Offset = 0; Offset < maxReg; Offset++) { /* 2008/11/20 MH For S3S4 test, we only check reg 26/27 now!!!! */ if (Offset != 0x26 && Offset != 0x27) - PHY_RFShadowCompareFlagSet(Adapter, eRFPath, Offset, _FALSE); + PHY_RFShadowCompareFlagSet(Adapter, eRFPath, Offset, false); else - PHY_RFShadowCompareFlagSet(Adapter, eRFPath, Offset, _TRUE); + PHY_RFShadowCompareFlagSet(Adapter, eRFPath, Offset, true); } } @@ -232,9 +232,9 @@ PHY_RFShadowRecorverFlagSetAll( for (Offset = 0; Offset < maxReg; Offset++) { /* 2008/11/20 MH For S3S4 test, we only check reg 26/27 now!!!! */ if (Offset != 0x26 && Offset != 0x27) - PHY_RFShadowRecorverFlagSet(Adapter, eRFPath, Offset, _FALSE); + PHY_RFShadowRecorverFlagSet(Adapter, eRFPath, Offset, false); else - PHY_RFShadowRecorverFlagSet(Adapter, eRFPath, Offset, _TRUE); + PHY_RFShadowRecorverFlagSet(Adapter, eRFPath, Offset, true); } } @@ -250,10 +250,10 @@ PHY_RFShadowRefresh( for (eRFPath = 0; eRFPath < RF6052_MAX_PATH; eRFPath++) { for (Offset = 0; Offset < maxReg; Offset++) { RF_Shadow[eRFPath][Offset].Value = 0; - RF_Shadow[eRFPath][Offset].Compare = _FALSE; - RF_Shadow[eRFPath][Offset].Recorver = _FALSE; - RF_Shadow[eRFPath][Offset].ErrorOrNot = _FALSE; - RF_Shadow[eRFPath][Offset].Driver_Write = _FALSE; + RF_Shadow[eRFPath][Offset].Compare = false; + RF_Shadow[eRFPath][Offset].Recorver = false; + RF_Shadow[eRFPath][Offset].ErrorOrNot = false; + RF_Shadow[eRFPath][Offset].Driver_Write = false; } } diff --git a/hal/hal_usb_led.c b/hal/hal_usb_led.c index 62a8669..05d64b1 100644 --- a/hal/hal_usb_led.c +++ b/hal/hal_usb_led.c @@ -33,7 +33,7 @@ SwLedBlink( { _adapter *padapter = pLed->padapter; struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - u8 bStopBlinking = _FALSE; + u8 bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ if (pLed->BlinkingLedState == RTW_LED_ON) { @@ -48,27 +48,27 @@ SwLedBlink( case LED_BLINK_NORMAL: if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; break; case LED_BLINK_StartToBlink: if (check_fwstate(pmlmepriv, _FW_LINKED) && check_fwstate(pmlmepriv, WIFI_STATION_STATE)) - bStopBlinking = _TRUE; + bStopBlinking = true; if (check_fwstate(pmlmepriv, _FW_LINKED) && (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) || check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))) - bStopBlinking = _TRUE; + bStopBlinking = true; else if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; break; case LED_BLINK_WPS: if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; break; default: - bStopBlinking = _TRUE; + bStopBlinking = true; break; } @@ -76,13 +76,13 @@ SwLedBlink( if (bStopBlinking) { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on) SwLedOff(padapter, pLed); - else if ((check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) && (pLed->bLedOn == _FALSE)) + else if ((check_fwstate(pmlmepriv, _FW_LINKED) == true) && (pLed->bLedOn == false)) SwLedOn(padapter, pLed); - else if ((check_fwstate(pmlmepriv, _FW_LINKED) == _FALSE) && pLed->bLedOn == _TRUE) + else if ((check_fwstate(pmlmepriv, _FW_LINKED) == false) && pLed->bLedOn == true) SwLedOff(padapter, pLed); pLed->BlinkTimes = 0; - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } else { /* Assign LED state to toggle. */ if (pLed->BlinkingLedState == RTW_LED_ON) @@ -126,7 +126,7 @@ SwLedBlink1( struct led_priv *ledpriv = &(padapter->ledpriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); PLED_USB pLed1 = &(ledpriv->SwLed1); - u8 bStopBlinking = _FALSE; + u8 bStopBlinking = false; u32 uLedBlinkNoLinkInterval = LED_BLINK_NO_LINK_INTERVAL_ALPHA; /* add by ylb 20121012 for customer led for alpha */ if (pHalData->CustomerID == RT_CID_819x_ALPHA_Dlink) @@ -144,16 +144,16 @@ SwLedBlink1( if (pHalData->CustomerID == RT_CID_DEFAULT) { - if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { + if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { if (!pLed1->bSWLedCtrl) { SwLedOn(padapter, pLed1); - pLed1->bSWLedCtrl = _TRUE; + pLed1->bSWLedCtrl = true; } else if (!pLed1->bLedOn) SwLedOn(padapter, pLed1); } else { if (!pLed1->bSWLedCtrl) { SwLedOff(padapter, pLed1); - pLed1->bSWLedCtrl = _TRUE; + pLed1->bSWLedCtrl = true; } else if (pLed1->bLedOn) SwLedOff(padapter, pLed1); } @@ -179,13 +179,13 @@ SwLedBlink1( case LED_BLINK_SCAN: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on) SwLedOff(padapter, pLed); - else if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { - pLed->bLedLinkBlinkInProgress = _TRUE; + else if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { + pLed->bLedLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_NORMAL; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -193,8 +193,8 @@ SwLedBlink1( pLed->BlinkingLedState = RTW_LED_ON; _set_timer(&(pLed->BlinkTimer), LED_BLINK_LINK_INTERVAL_ALPHA); - } else if (check_fwstate(pmlmepriv, _FW_LINKED) == _FALSE) { - pLed->bLedNoLinkBlinkInProgress = _TRUE; + } else if (check_fwstate(pmlmepriv, _FW_LINKED) == false) { + pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -202,7 +202,7 @@ SwLedBlink1( pLed->BlinkingLedState = RTW_LED_ON; _set_timer(&(pLed->BlinkTimer), uLedBlinkNoLinkInterval); } - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } else { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on) SwLedOff(padapter, pLed); @@ -219,20 +219,20 @@ SwLedBlink1( case LED_BLINK_TXRX: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on) SwLedOff(padapter, pLed); - else if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { - pLed->bLedLinkBlinkInProgress = _TRUE; + else if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { + pLed->bLedLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_NORMAL; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; else pLed->BlinkingLedState = RTW_LED_ON; _set_timer(&(pLed->BlinkTimer), LED_BLINK_LINK_INTERVAL_ALPHA); - } else if (check_fwstate(pmlmepriv, _FW_LINKED) == _FALSE) { - pLed->bLedNoLinkBlinkInProgress = _TRUE; + } else if (check_fwstate(pmlmepriv, _FW_LINKED) == false) { + pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -241,7 +241,7 @@ SwLedBlink1( _set_timer(&(pLed->BlinkTimer), uLedBlinkNoLinkInterval); } pLed->BlinkTimes = 0; - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } else { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on) SwLedOff(padapter, pLed); @@ -267,15 +267,15 @@ SwLedBlink1( if (pLed->BlinkingLedState == RTW_LED_ON) { pLed->BlinkingLedState = RTW_LED_OFF; _set_timer(&(pLed->BlinkTimer), LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA); - bStopBlinking = _FALSE; + bStopBlinking = false; } else - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on) SwLedOff(padapter, pLed); else { - pLed->bLedLinkBlinkInProgress = _TRUE; + pLed->bLedLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_NORMAL; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -283,7 +283,7 @@ SwLedBlink1( pLed->BlinkingLedState = RTW_LED_ON; _set_timer(&(pLed->BlinkTimer), LED_BLINK_LINK_INTERVAL_ALPHA); } - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } break; @@ -300,7 +300,7 @@ SwLedBlink2( { _adapter *padapter = pLed->padapter; struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - u8 bStopBlinking = _FALSE; + u8 bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ if (pLed->BlinkingLedState == RTW_LED_ON) { @@ -313,22 +313,22 @@ SwLedBlink2( case LED_BLINK_SCAN: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on) SwLedOff(padapter, pLed); - else if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { + else if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { pLed->CurrLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON; SwLedOn(padapter, pLed); - } else if (check_fwstate(pmlmepriv, _FW_LINKED) == _FALSE) { + } else if (check_fwstate(pmlmepriv, _FW_LINKED) == false) { pLed->CurrLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF; SwLedOff(padapter, pLed); } - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } else { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on) SwLedOff(padapter, pLed); @@ -345,21 +345,21 @@ SwLedBlink2( case LED_BLINK_TXRX: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on) SwLedOff(padapter, pLed); - else if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { + else if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { pLed->CurrLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON; SwLedOn(padapter, pLed); - } else if (check_fwstate(pmlmepriv, _FW_LINKED) == _FALSE) { + } else if (check_fwstate(pmlmepriv, _FW_LINKED) == false) { pLed->CurrLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF; SwLedOff(padapter, pLed); } - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } else { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on) SwLedOff(padapter, pLed); @@ -386,7 +386,7 @@ SwLedBlink3( { _adapter *padapter = pLed->padapter; struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - u8 bStopBlinking = _FALSE; + u8 bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ if (pLed->BlinkingLedState == RTW_LED_ON) { @@ -400,25 +400,25 @@ SwLedBlink3( case LED_BLINK_SCAN: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on) SwLedOff(padapter, pLed); - else if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { + else if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { pLed->CurrLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON; if (!pLed->bLedOn) SwLedOn(padapter, pLed); - } else if (check_fwstate(pmlmepriv, _FW_LINKED) == _FALSE) { + } else if (check_fwstate(pmlmepriv, _FW_LINKED) == false) { pLed->CurrLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF; if (pLed->bLedOn) SwLedOff(padapter, pLed); } - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } else { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on) SwLedOff(padapter, pLed); @@ -435,18 +435,18 @@ SwLedBlink3( case LED_BLINK_TXRX: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on) SwLedOff(padapter, pLed); - else if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { + else if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { pLed->CurrLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON; if (!pLed->bLedOn) SwLedOn(padapter, pLed); - } else if (check_fwstate(pmlmepriv, _FW_LINKED) == _FALSE) { + } else if (check_fwstate(pmlmepriv, _FW_LINKED) == false) { pLed->CurrLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF; @@ -455,7 +455,7 @@ SwLedBlink3( } - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } else { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on) SwLedOff(padapter, pLed); @@ -481,9 +481,9 @@ SwLedBlink3( if (pLed->BlinkingLedState == RTW_LED_ON) { pLed->BlinkingLedState = RTW_LED_OFF; _set_timer(&(pLed->BlinkTimer), LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA); - bStopBlinking = _FALSE; + bStopBlinking = false; } else - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on) @@ -493,7 +493,7 @@ SwLedBlink3( pLed->BlinkingLedState = RTW_LED_ON; SwLedOn(padapter, pLed); } - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } break; @@ -514,7 +514,7 @@ SwLedBlink4( struct led_priv *ledpriv = &(padapter->ledpriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); PLED_USB pLed1 = &(ledpriv->SwLed1); - u8 bStopBlinking = _FALSE; + u8 bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ if (pLed->BlinkingLedState == RTW_LED_ON) { @@ -551,13 +551,13 @@ SwLedBlink4( case LED_BLINK_SCAN: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _FALSE; + bStopBlinking = false; if (bStopBlinking) { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(padapter)->rfoff_reason > RF_CHANGE_BY_PS) SwLedOff(padapter, pLed); else { - pLed->bLedNoLinkBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -565,7 +565,7 @@ SwLedBlink4( pLed->BlinkingLedState = RTW_LED_ON; _set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA); } - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } else { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(padapter)->rfoff_reason > RF_CHANGE_BY_PS) SwLedOff(padapter, pLed); @@ -582,12 +582,12 @@ SwLedBlink4( case LED_BLINK_TXRX: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(padapter)->rfoff_reason > RF_CHANGE_BY_PS) SwLedOff(padapter, pLed); else { - pLed->bLedNoLinkBlinkInProgress = _TRUE; + pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -595,7 +595,7 @@ SwLedBlink4( pLed->BlinkingLedState = RTW_LED_ON; _set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA); } - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } else { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(padapter)->rfoff_reason > RF_CHANGE_BY_PS) SwLedOff(padapter, pLed); @@ -636,7 +636,7 @@ SwLedBlink4( if (pLed->bLedOn) pLed->BlinkTimes = 1; else - bStopBlinking = _TRUE; + bStopBlinking = true; } if (bStopBlinking) { @@ -656,12 +656,12 @@ SwLedBlink4( case LED_BLINK_ALWAYS_ON: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(padapter)->rfoff_reason > RF_CHANGE_BY_PS) SwLedOff(padapter, pLed); else { - pLed->bLedNoLinkBlinkInProgress = _TRUE; + pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -670,7 +670,7 @@ SwLedBlink4( _set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA); } - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } else { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(padapter)->rfoff_reason > RF_CHANGE_BY_PS) { SwLedOff(padapter, pLed); @@ -700,7 +700,7 @@ SwLedBlink5( { _adapter *padapter = pLed->padapter; struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - u8 bStopBlinking = _FALSE; + u8 bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ if (pLed->BlinkingLedState == RTW_LED_ON) { @@ -713,7 +713,7 @@ SwLedBlink5( case LED_BLINK_SCAN: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(padapter)->rfoff_reason > RF_CHANGE_BY_PS) { @@ -728,7 +728,7 @@ SwLedBlink5( _set_timer(&(pLed->BlinkTimer), LED_BLINK_FASTER_INTERVAL_ALPHA); } - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } else { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(padapter)->rfoff_reason > RF_CHANGE_BY_PS) SwLedOff(padapter, pLed); @@ -746,7 +746,7 @@ SwLedBlink5( case LED_BLINK_TXRX: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(padapter)->rfoff_reason > RF_CHANGE_BY_PS) { @@ -761,7 +761,7 @@ SwLedBlink5( _set_timer(&(pLed->BlinkTimer), LED_BLINK_FASTER_INTERVAL_ALPHA); } - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } else { if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(padapter)->rfoff_reason > RF_CHANGE_BY_PS) SwLedOff(padapter, pLed); @@ -790,7 +790,7 @@ SwLedBlink6( { _adapter *padapter = pLed->padapter; struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - u8 bStopBlinking = _FALSE; + u8 bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ if (pLed->BlinkingLedState == RTW_LED_ON) { @@ -808,7 +808,7 @@ SwLedBlink7( { PADAPTER Adapter = pLed->padapter; struct mlme_priv *pmlmepriv = &(Adapter->mlmepriv); - bool bStopBlinking = _FALSE; + bool bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ if (pLed->BlinkingLedState == RTW_LED_ON) { @@ -822,25 +822,25 @@ SwLedBlink7( case LED_BLINK_SCAN: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(Adapter)->rf_pwrstate != rf_on) SwLedOff(Adapter, pLed); - else if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { + else if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { pLed->CurrLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON; if (!pLed->bLedOn) SwLedOn(Adapter, pLed); - } else if (check_fwstate(pmlmepriv, _FW_LINKED) == _FALSE) { + } else if (check_fwstate(pmlmepriv, _FW_LINKED) == false) { pLed->CurrLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF; if (pLed->bLedOn) SwLedOff(Adapter, pLed); } - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } else { if (adapter_to_pwrctl(Adapter)->rf_pwrstate != rf_on) SwLedOff(Adapter, pLed); @@ -866,9 +866,9 @@ SwLedBlink7( if (pLed->BlinkingLedState == RTW_LED_ON) { pLed->BlinkingLedState = RTW_LED_OFF; _set_timer(&(pLed->BlinkTimer), LED_BLINK_LINK_INTERVAL_NETGEAR); - bStopBlinking = _FALSE; + bStopBlinking = false; } else - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(Adapter)->rf_pwrstate != rf_on) @@ -878,7 +878,7 @@ SwLedBlink7( pLed->BlinkingLedState = RTW_LED_ON; SwLedOn(Adapter, pLed); } - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } break; @@ -915,7 +915,7 @@ SwLedBlink9( { PADAPTER Adapter = pLed->padapter; struct mlme_priv *pmlmepriv = &(Adapter->mlmepriv); - bool bStopBlinking = _FALSE; + bool bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ if (pLed->BlinkingLedState == RTW_LED_ON) { @@ -956,18 +956,18 @@ SwLedBlink9( case LED_BLINK_SCAN: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(Adapter)->rf_pwrstate != rf_on) SwLedOff(Adapter, pLed); - else if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { - pLed->bLedLinkBlinkInProgress = _TRUE; + else if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { + pLed->bLedLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; _set_timer(&(pLed->BlinkTimer), LED_BLINK_LINK_INTERVAL_ALPHA); - } else if (check_fwstate(pmlmepriv, _FW_LINKED) == _FALSE) { - pLed->bLedNoLinkBlinkInProgress = _TRUE; + } else if (check_fwstate(pmlmepriv, _FW_LINKED) == false) { + pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -976,7 +976,7 @@ SwLedBlink9( _set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA); } pLed->BlinkTimes = 0; - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } else { if (adapter_to_pwrctl(Adapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(Adapter)->rfoff_reason > RF_CHANGE_BY_PS) SwLedOff(Adapter, pLed); @@ -993,7 +993,7 @@ SwLedBlink9( case LED_BLINK_TXRX: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(Adapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(Adapter)->rfoff_reason > RF_CHANGE_BY_PS) SwLedOff(Adapter, pLed); @@ -1005,7 +1005,7 @@ SwLedBlink9( pLed->BlinkingLedState = RTW_LED_ON; _set_timer(&(pLed->BlinkTimer), LED_BLINK_FASTER_INTERVAL_ALPHA); } - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } else { if (adapter_to_pwrctl(Adapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(Adapter)->rfoff_reason > RF_CHANGE_BY_PS) SwLedOff(Adapter, pLed); @@ -1051,7 +1051,7 @@ SwLedBlink9( if (pLed->bLedOn) pLed->BlinkTimes = 1; else - bStopBlinking = _TRUE; + bStopBlinking = true; } if (bStopBlinking) { @@ -1072,12 +1072,12 @@ SwLedBlink9( case LED_BLINK_ALWAYS_ON: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(Adapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(Adapter)->rfoff_reason > RF_CHANGE_BY_PS) SwLedOff(Adapter, pLed); else { - pLed->bLedNoLinkBlinkInProgress = _TRUE; + pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -1085,7 +1085,7 @@ SwLedBlink9( pLed->BlinkingLedState = RTW_LED_ON; _set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA); } - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } else { if (adapter_to_pwrctl(Adapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(Adapter)->rfoff_reason > RF_CHANGE_BY_PS) { SwLedOff(Adapter, pLed); @@ -1112,8 +1112,8 @@ SwLedBlink9( case LED_BLINK_AUTH_ERROR: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; - if (bStopBlinking == _FALSE) { + bStopBlinking = true; + if (bStopBlinking == false) { if (pLed->bLedOn) { pLed->BlinkingLedState = RTW_LED_OFF; _set_timer(&(pLed->BlinkTimer), LED_BLINK_ERROR_INTERVAL_BELKIN); @@ -1142,7 +1142,7 @@ SwLedBlink10( { PADAPTER Adapter = pLed->padapter; struct mlme_priv *pmlmepriv = &(Adapter->mlmepriv); - bool bStopBlinking = _FALSE; + bool bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ if (pLed->BlinkingLedState == RTW_LED_ON) { @@ -1182,20 +1182,20 @@ SwLedBlink10( case LED_BLINK_SCAN: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(Adapter)->rf_pwrstate != rf_on) SwLedOff(Adapter, pLed); - else if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { - pLed->bLedNoLinkBlinkInProgress = _FALSE; + else if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { + pLed->bLedNoLinkBlinkInProgress = false; pLed->CurrLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF; _set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA); } pLed->BlinkTimes = 0; - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } else { if (adapter_to_pwrctl(Adapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(Adapter)->rfoff_reason > RF_CHANGE_BY_PS) SwLedOff(Adapter, pLed); @@ -1242,7 +1242,7 @@ SwLedBlink10( if (pLed->bLedOn) pLed->BlinkTimes = 1; else - bStopBlinking = _TRUE; + bStopBlinking = true; } if (bStopBlinking) { @@ -1263,12 +1263,12 @@ SwLedBlink10( case LED_BLINK_ALWAYS_ON: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(Adapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(Adapter)->rfoff_reason > RF_CHANGE_BY_PS) SwLedOff(Adapter, pLed); else { - pLed->bLedNoLinkBlinkInProgress = _TRUE; + pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -1276,7 +1276,7 @@ SwLedBlink10( pLed->BlinkingLedState = RTW_LED_ON; _set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA); } - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } else { if (adapter_to_pwrctl(Adapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(Adapter)->rfoff_reason > RF_CHANGE_BY_PS) { SwLedOff(Adapter, pLed); @@ -1303,8 +1303,8 @@ SwLedBlink10( case LED_BLINK_AUTH_ERROR: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; - if (bStopBlinking == _FALSE) { + bStopBlinking = true; + if (bStopBlinking == false) { if (pLed->bLedOn) { pLed->BlinkingLedState = RTW_LED_OFF; _set_timer(&(pLed->BlinkTimer), LED_BLINK_ERROR_INTERVAL_BELKIN); @@ -1331,7 +1331,7 @@ SwLedBlink11( { PADAPTER Adapter = pLed->padapter; struct mlme_priv *pmlmepriv = &(Adapter->mlmepriv); - bool bStopBlinking = _FALSE; + bool bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ if (pLed->BlinkingLedState == RTW_LED_ON) { @@ -1369,13 +1369,13 @@ SwLedBlink11( } pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; - if (bStopBlinking == _TRUE) + bStopBlinking = true; + if (bStopBlinking == true) pLed->BlinkTimes = 5; break; case LED_BLINK_WPS_STOP: /* WPS authentication fail */ - if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { + if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; else @@ -1402,7 +1402,7 @@ SwLedBlink12( { PADAPTER Adapter = pLed->padapter; struct mlme_priv *pmlmepriv = &(Adapter->mlmepriv); - bool bStopBlinking = _FALSE; + bool bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ if (pLed->BlinkingLedState == RTW_LED_ON) { @@ -1423,7 +1423,7 @@ SwLedBlink12( case LED_BLINK_TXRX: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(Adapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(Adapter)->rfoff_reason > RF_CHANGE_BY_PS) { @@ -1432,7 +1432,7 @@ SwLedBlink12( if (pLed->bLedOn) SwLedOff(Adapter, pLed); } else { - pLed->bLedNoLinkBlinkInProgress = _TRUE; + pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -1441,7 +1441,7 @@ SwLedBlink12( _set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA); } - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } else { if (adapter_to_pwrctl(Adapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(Adapter)->rfoff_reason > RF_CHANGE_BY_PS) SwLedOff(Adapter, pLed); @@ -1470,7 +1470,7 @@ SwLedBlink13( { PADAPTER Adapter = pLed->padapter; struct mlme_priv *pmlmepriv = &(Adapter->mlmepriv); - bool bStopBlinking = _FALSE; + bool bStopBlinking = false; static u8 LinkBlinkCnt = 0; /* Change LED according to BlinkingLedState specified. */ @@ -1487,7 +1487,7 @@ SwLedBlink13( if (LinkBlinkCnt > 15) { LinkBlinkCnt = 0; - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; break; } if (pLed->bLedOn) { @@ -1513,7 +1513,7 @@ SwLedBlink13( case LED_BLINK_WPS_STOP: /* WPS success */ SwLedOff(Adapter, pLed); - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; break; default: @@ -1531,7 +1531,7 @@ SwLedBlink14( { PADAPTER Adapter = pLed->padapter; struct mlme_priv *pmlmepriv = &(Adapter->mlmepriv); - bool bStopBlinking = _FALSE; + bool bStopBlinking = false; static u8 LinkBlinkCnt = 0; /* Change LED according to BlinkingLedState specified. */ @@ -1545,13 +1545,13 @@ SwLedBlink14( case LED_BLINK_TXRX: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(Adapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(Adapter)->rfoff_reason > RF_CHANGE_BY_PS) SwLedOff(Adapter, pLed); else SwLedOn(Adapter, pLed); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } else { if (adapter_to_pwrctl(Adapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(Adapter)->rfoff_reason > RF_CHANGE_BY_PS) SwLedOff(Adapter, pLed); @@ -1582,7 +1582,7 @@ SwLedBlink15( { PADAPTER Adapter = pLed->padapter; struct mlme_priv *pmlmepriv = &(Adapter->mlmepriv); - bool bStopBlinking = _FALSE; + bool bStopBlinking = false; static u8 LinkBlinkCnt = 0; /* Change LED according to BlinkingLedState specified. */ @@ -1606,7 +1606,7 @@ SwLedBlink15( case LED_BLINK_WPS_STOP: /* WPS success */ if (pLed->BlinkingLedState == RTW_LED_OFF) { - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; return; } @@ -1617,30 +1617,30 @@ SwLedBlink15( break; case LED_BLINK_NO_LINK: { - static bool bLedOn = _TRUE; + static bool bLedOn = true; if (bLedOn) { - bLedOn = _FALSE; + bLedOn = false; pLed->BlinkingLedState = RTW_LED_OFF; } else { - bLedOn = _TRUE; + bLedOn = true; pLed->BlinkingLedState = RTW_LED_ON; } - pLed->bLedBlinkInProgress = _TRUE; + pLed->bLedBlinkInProgress = true; _set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL); } break; case LED_BLINK_LINK_IDEL: { - static bool bLedOn = _TRUE; + static bool bLedOn = true; if (bLedOn) { - bLedOn = _FALSE; + bLedOn = false; pLed->BlinkingLedState = RTW_LED_OFF; } else { - bLedOn = _TRUE; + bLedOn = true; pLed->BlinkingLedState = RTW_LED_ON; } - pLed->bLedBlinkInProgress = _TRUE; + pLed->bLedBlinkInProgress = true; _set_timer(&(pLed->BlinkTimer), LED_BLINK_LINK_IDEL_INTERVAL); } break; @@ -1654,7 +1654,7 @@ SwLedBlink15( BlinkTime++; if (BlinkTime < 24) { - pLed->bLedBlinkInProgress = _TRUE; + pLed->bLedBlinkInProgress = true; if (pLed->BlinkingLedState == RTW_LED_ON) _set_timer(&(pLed->BlinkTimer), LED_BLINK_SCAN_OFF_INTERVAL); @@ -1662,7 +1662,7 @@ SwLedBlink15( _set_timer(&(pLed->BlinkTimer), LED_BLINK_SCAN_ON_INTERVAL); } else { /* if(pLed->OLDLedState ==LED_NO_LINK_BLINK) */ - if (check_fwstate(pmlmepriv, _FW_LINKED) == _FALSE) { + if (check_fwstate(pmlmepriv, _FW_LINKED) == false) { pLed->CurrLedState = LED_BLINK_NO_LINK; pLed->BlinkingLedState = RTW_LED_ON; @@ -1676,13 +1676,13 @@ SwLedBlink15( case LED_BLINK_TXRX: pLed->BlinkTimes--; if (pLed->BlinkTimes == 0) - bStopBlinking = _TRUE; + bStopBlinking = true; if (bStopBlinking) { if (adapter_to_pwrctl(Adapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(Adapter)->rfoff_reason > RF_CHANGE_BY_PS) SwLedOff(Adapter, pLed); else SwLedOn(Adapter, pLed); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } else { if (adapter_to_pwrctl(Adapter)->rf_pwrstate != rf_on && adapter_to_pwrctl(Adapter)->rfoff_reason > RF_CHANGE_BY_PS) SwLedOff(Adapter, pLed); @@ -1853,8 +1853,8 @@ SwLedControlMode0( switch (LedAction) { case LED_CTL_TX: case LED_CTL_RX: - if (pLed->bLedBlinkInProgress == _FALSE) { - pLed->bLedBlinkInProgress = _TRUE; + if (pLed->bLedBlinkInProgress == false) { + pLed->bLedBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_NORMAL; pLed->BlinkTimes = 2; @@ -1868,8 +1868,8 @@ SwLedControlMode0( break; case LED_CTL_START_TO_LINK: - if (pLed->bLedBlinkInProgress == _FALSE) { - pLed->bLedBlinkInProgress = _TRUE; + if (pLed->bLedBlinkInProgress == false) { + pLed->bLedBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_StartToBlink; pLed->BlinkTimes = 24; @@ -1885,7 +1885,7 @@ SwLedControlMode0( case LED_CTL_LINK: pLed->CurrLedState = RTW_LED_ON; - if (pLed->bLedBlinkInProgress == _FALSE) { + if (pLed->bLedBlinkInProgress == false) { pLed->BlinkingLedState = RTW_LED_ON; _set_timer(&(pLed->BlinkTimer), 0); } @@ -1893,7 +1893,7 @@ SwLedControlMode0( case LED_CTL_NO_LINK: pLed->CurrLedState = RTW_LED_OFF; - if (pLed->bLedBlinkInProgress == _FALSE) { + if (pLed->bLedBlinkInProgress == false) { pLed->BlinkingLedState = RTW_LED_OFF; _set_timer(&(pLed->BlinkTimer), 0); } @@ -1903,14 +1903,14 @@ SwLedControlMode0( pLed->CurrLedState = RTW_LED_OFF; if (pLed->bLedBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } SwLedOff(padapter, pLed); break; case LED_CTL_START_WPS: - if (pLed->bLedBlinkInProgress == _FALSE || pLed->CurrLedState == RTW_LED_ON) { - pLed->bLedBlinkInProgress = _TRUE; + if (pLed->bLedBlinkInProgress == false || pLed->CurrLedState == RTW_LED_ON) { + pLed->bLedBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_WPS; pLed->BlinkTimes = 20; @@ -1929,7 +1929,7 @@ SwLedControlMode0( if (pLed->bLedBlinkInProgress) { pLed->CurrLedState = RTW_LED_OFF; _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } break; @@ -1964,19 +1964,19 @@ SwLedControlMode1( case LED_CTL_POWER_ON: case LED_CTL_START_TO_LINK: case LED_CTL_NO_LINK: - if (pLed->bLedNoLinkBlinkInProgress == _FALSE) { + if (pLed->bLedNoLinkBlinkInProgress == false) { if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed)) return; - if (pLed->bLedLinkBlinkInProgress == _TRUE) { + if (pLed->bLedLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedLinkBlinkInProgress = _FALSE; + pLed->bLedLinkBlinkInProgress = false; } - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - pLed->bLedNoLinkBlinkInProgress = _TRUE; + pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -1987,18 +1987,18 @@ SwLedControlMode1( break; case LED_CTL_LINK: - if (pLed->bLedLinkBlinkInProgress == _FALSE) { + if (pLed->bLedLinkBlinkInProgress == false) { if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed)) return; - if (pLed->bLedNoLinkBlinkInProgress == _TRUE) { + if (pLed->bLedNoLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedNoLinkBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; } - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - pLed->bLedLinkBlinkInProgress = _TRUE; + pLed->bLedLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_NORMAL; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -2009,25 +2009,25 @@ SwLedControlMode1( break; case LED_CTL_SITE_SURVEY: - if ((pmlmepriv->LinkDetectInfo.bBusyTraffic) && (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) + if ((pmlmepriv->LinkDetectInfo.bBusyTraffic) && (check_fwstate(pmlmepriv, _FW_LINKED) == true)) ; - else if (pLed->bLedScanBlinkInProgress == _FALSE) { + else if (pLed->bLedScanBlinkInProgress == false) { if (IS_LED_WPS_BLINKING(pLed)) return; - if (pLed->bLedNoLinkBlinkInProgress == _TRUE) { + if (pLed->bLedNoLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedNoLinkBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; } - if (pLed->bLedLinkBlinkInProgress == _TRUE) { + if (pLed->bLedLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedLinkBlinkInProgress = _FALSE; + pLed->bLedLinkBlinkInProgress = false; } - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - pLed->bLedScanBlinkInProgress = _TRUE; + pLed->bLedScanBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SCAN; pLed->BlinkTimes = 24; if (pLed->bLedOn) @@ -2045,18 +2045,18 @@ SwLedControlMode1( case LED_CTL_TX: case LED_CTL_RX: - if (pLed->bLedBlinkInProgress == _FALSE) { + if (pLed->bLedBlinkInProgress == false) { if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed)) return; - if (pLed->bLedNoLinkBlinkInProgress == _TRUE) { + if (pLed->bLedNoLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedNoLinkBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; } - if (pLed->bLedLinkBlinkInProgress == _TRUE) { + if (pLed->bLedLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedLinkBlinkInProgress = _FALSE; + pLed->bLedLinkBlinkInProgress = false; } - pLed->bLedBlinkInProgress = _TRUE; + pLed->bLedBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_TXRX; pLed->BlinkTimes = 2; if (pLed->bLedOn) @@ -2069,24 +2069,24 @@ SwLedControlMode1( case LED_CTL_START_WPS: /* wait until xinpin finish */ case LED_CTL_START_WPS_BOTTON: - if (pLed->bLedWPSBlinkInProgress == _FALSE) { - if (pLed->bLedNoLinkBlinkInProgress == _TRUE) { + if (pLed->bLedWPSBlinkInProgress == false) { + if (pLed->bLedNoLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedNoLinkBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; } - if (pLed->bLedLinkBlinkInProgress == _TRUE) { + if (pLed->bLedLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedLinkBlinkInProgress = _FALSE; + pLed->bLedLinkBlinkInProgress = false; } - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - if (pLed->bLedScanBlinkInProgress == _TRUE) { + if (pLed->bLedScanBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } - pLed->bLedWPSBlinkInProgress = _TRUE; + pLed->bLedWPSBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_WPS; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -2098,26 +2098,26 @@ SwLedControlMode1( case LED_CTL_STOP_WPS: - if (pLed->bLedNoLinkBlinkInProgress == _TRUE) { + if (pLed->bLedNoLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedNoLinkBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; } - if (pLed->bLedLinkBlinkInProgress == _TRUE) { + if (pLed->bLedLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedLinkBlinkInProgress = _FALSE; + pLed->bLedLinkBlinkInProgress = false; } - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - if (pLed->bLedScanBlinkInProgress == _TRUE) { + if (pLed->bLedScanBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } if (pLed->bLedWPSBlinkInProgress) _cancel_timer_ex(&(pLed->BlinkTimer)); else - pLed->bLedWPSBlinkInProgress = _TRUE; + pLed->bLedWPSBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_WPS_STOP; if (pLed->bLedOn) { @@ -2132,10 +2132,10 @@ SwLedControlMode1( case LED_CTL_STOP_WPS_FAIL: if (pLed->bLedWPSBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } - pLed->bLedNoLinkBlinkInProgress = _TRUE; + pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -2149,23 +2149,23 @@ SwLedControlMode1( pLed->BlinkingLedState = RTW_LED_OFF; if (pLed->bLedNoLinkBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedNoLinkBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; } if (pLed->bLedLinkBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedLinkBlinkInProgress = _FALSE; + pLed->bLedLinkBlinkInProgress = false; } if (pLed->bLedBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } if (pLed->bLedWPSBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } if (pLed->bLedScanBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } SwLedOff(padapter, pLed); @@ -2193,15 +2193,15 @@ SwLedControlMode2( case LED_CTL_SITE_SURVEY: if (pmlmepriv->LinkDetectInfo.bBusyTraffic) ; - else if (pLed->bLedScanBlinkInProgress == _FALSE) { + else if (pLed->bLedScanBlinkInProgress == false) { if (IS_LED_WPS_BLINKING(pLed)) return; - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - pLed->bLedScanBlinkInProgress = _TRUE; + pLed->bLedScanBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SCAN; pLed->BlinkTimes = 24; if (pLed->bLedOn) @@ -2214,11 +2214,11 @@ SwLedControlMode2( case LED_CTL_TX: case LED_CTL_RX: - if ((pLed->bLedBlinkInProgress == _FALSE) && (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) { + if ((pLed->bLedBlinkInProgress == false) && (check_fwstate(pmlmepriv, _FW_LINKED) == true)) { if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed)) return; - pLed->bLedBlinkInProgress = _TRUE; + pLed->bLedBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_TXRX; pLed->BlinkTimes = 2; if (pLed->bLedOn) @@ -2234,11 +2234,11 @@ SwLedControlMode2( pLed->BlinkingLedState = RTW_LED_ON; if (pLed->bLedBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } if (pLed->bLedScanBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } _set_timer(&(pLed->BlinkTimer), 0); @@ -2246,16 +2246,16 @@ SwLedControlMode2( case LED_CTL_START_WPS: /* wait until xinpin finish */ case LED_CTL_START_WPS_BOTTON: - if (pLed->bLedWPSBlinkInProgress == _FALSE) { - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedWPSBlinkInProgress == false) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - if (pLed->bLedScanBlinkInProgress == _TRUE) { + if (pLed->bLedScanBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } - pLed->bLedWPSBlinkInProgress = _TRUE; + pLed->bLedWPSBlinkInProgress = true; pLed->CurrLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON; _set_timer(&(pLed->BlinkTimer), 0); @@ -2263,7 +2263,7 @@ SwLedControlMode2( break; case LED_CTL_STOP_WPS: - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on) { pLed->CurrLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF; @@ -2276,7 +2276,7 @@ SwLedControlMode2( break; case LED_CTL_STOP_WPS_FAIL: - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; pLed->CurrLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF; _set_timer(&(pLed->BlinkTimer), 0); @@ -2296,15 +2296,15 @@ SwLedControlMode2( pLed->BlinkingLedState = RTW_LED_OFF; if (pLed->bLedBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } if (pLed->bLedScanBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } if (pLed->bLedWPSBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } SwLedOff(padapter, pLed); @@ -2332,15 +2332,15 @@ SwLedControlMode3( case LED_CTL_SITE_SURVEY: if (pmlmepriv->LinkDetectInfo.bBusyTraffic) ; - else if (pLed->bLedScanBlinkInProgress == _FALSE) { + else if (pLed->bLedScanBlinkInProgress == false) { if (IS_LED_WPS_BLINKING(pLed)) return; - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - pLed->bLedScanBlinkInProgress = _TRUE; + pLed->bLedScanBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SCAN; pLed->BlinkTimes = 24; if (pLed->bLedOn) @@ -2353,11 +2353,11 @@ SwLedControlMode3( case LED_CTL_TX: case LED_CTL_RX: - if ((pLed->bLedBlinkInProgress == _FALSE) && (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) { + if ((pLed->bLedBlinkInProgress == false) && (check_fwstate(pmlmepriv, _FW_LINKED) == true)) { if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed)) return; - pLed->bLedBlinkInProgress = _TRUE; + pLed->bLedBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_TXRX; pLed->BlinkTimes = 2; if (pLed->bLedOn) @@ -2376,11 +2376,11 @@ SwLedControlMode3( pLed->BlinkingLedState = RTW_LED_ON; if (pLed->bLedBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } if (pLed->bLedScanBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } _set_timer(&(pLed->BlinkTimer), 0); @@ -2388,16 +2388,16 @@ SwLedControlMode3( case LED_CTL_START_WPS: /* wait until xinpin finish */ case LED_CTL_START_WPS_BOTTON: - if (pLed->bLedWPSBlinkInProgress == _FALSE) { - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedWPSBlinkInProgress == false) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - if (pLed->bLedScanBlinkInProgress == _TRUE) { + if (pLed->bLedScanBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } - pLed->bLedWPSBlinkInProgress = _TRUE; + pLed->bLedWPSBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_WPS; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -2410,9 +2410,9 @@ SwLedControlMode3( case LED_CTL_STOP_WPS: if (pLed->bLedWPSBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } else - pLed->bLedWPSBlinkInProgress = _TRUE; + pLed->bLedWPSBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_WPS_STOP; if (pLed->bLedOn) { @@ -2428,7 +2428,7 @@ SwLedControlMode3( case LED_CTL_STOP_WPS_FAIL: if (pLed->bLedWPSBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } pLed->CurrLedState = RTW_LED_OFF; @@ -2450,15 +2450,15 @@ SwLedControlMode3( pLed->BlinkingLedState = RTW_LED_OFF; if (pLed->bLedBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } if (pLed->bLedScanBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } if (pLed->bLedWPSBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } SwLedOff(padapter, pLed); @@ -2487,7 +2487,7 @@ SwLedControlMode4( switch (LedAction) { case LED_CTL_START_TO_LINK: if (pLed1->bLedWPSBlinkInProgress) { - pLed1->bLedWPSBlinkInProgress = _FALSE; + pLed1->bLedWPSBlinkInProgress = false; _cancel_timer_ex(&(pLed1->BlinkTimer)); pLed1->BlinkingLedState = RTW_LED_OFF; @@ -2497,19 +2497,19 @@ SwLedControlMode4( _set_timer(&(pLed->BlinkTimer), 0); } - if (pLed->bLedStartToLinkBlinkInProgress == _FALSE) { + if (pLed->bLedStartToLinkBlinkInProgress == false) { if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed)) return; - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - if (pLed->bLedNoLinkBlinkInProgress == _TRUE) { + if (pLed->bLedNoLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedNoLinkBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; } - pLed->bLedStartToLinkBlinkInProgress = _TRUE; + pLed->bLedStartToLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_StartToBlink; if (pLed->bLedOn) { pLed->BlinkingLedState = RTW_LED_OFF; @@ -2526,7 +2526,7 @@ SwLedControlMode4( /* LED1 settings */ if (LedAction == LED_CTL_LINK) { if (pLed1->bLedWPSBlinkInProgress) { - pLed1->bLedWPSBlinkInProgress = _FALSE; + pLed1->bLedWPSBlinkInProgress = false; _cancel_timer_ex(&(pLed1->BlinkTimer)); pLed1->BlinkingLedState = RTW_LED_OFF; @@ -2537,15 +2537,15 @@ SwLedControlMode4( } } - if (pLed->bLedNoLinkBlinkInProgress == _FALSE) { + if (pLed->bLedNoLinkBlinkInProgress == false) { if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed)) return; - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - pLed->bLedNoLinkBlinkInProgress = _TRUE; + pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -2557,21 +2557,21 @@ SwLedControlMode4( break; case LED_CTL_SITE_SURVEY: - if ((pmlmepriv->LinkDetectInfo.bBusyTraffic) && (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) + if ((pmlmepriv->LinkDetectInfo.bBusyTraffic) && (check_fwstate(pmlmepriv, _FW_LINKED) == true)) ; - else if (pLed->bLedScanBlinkInProgress == _FALSE) { + else if (pLed->bLedScanBlinkInProgress == false) { if (IS_LED_WPS_BLINKING(pLed)) return; - if (pLed->bLedNoLinkBlinkInProgress == _TRUE) { + if (pLed->bLedNoLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedNoLinkBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; } - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - pLed->bLedScanBlinkInProgress = _TRUE; + pLed->bLedScanBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SCAN; pLed->BlinkTimes = 24; if (pLed->bLedOn) @@ -2584,14 +2584,14 @@ SwLedControlMode4( case LED_CTL_TX: case LED_CTL_RX: - if (pLed->bLedBlinkInProgress == _FALSE) { + if (pLed->bLedBlinkInProgress == false) { if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed)) return; - if (pLed->bLedNoLinkBlinkInProgress == _TRUE) { + if (pLed->bLedNoLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedNoLinkBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; } - pLed->bLedBlinkInProgress = _TRUE; + pLed->bLedBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_TXRX; pLed->BlinkTimes = 2; if (pLed->bLedOn) @@ -2605,7 +2605,7 @@ SwLedControlMode4( case LED_CTL_START_WPS: /* wait until xinpin finish */ case LED_CTL_START_WPS_BOTTON: if (pLed1->bLedWPSBlinkInProgress) { - pLed1->bLedWPSBlinkInProgress = _FALSE; + pLed1->bLedWPSBlinkInProgress = false; _cancel_timer_ex(&(pLed1->BlinkTimer)); pLed1->BlinkingLedState = RTW_LED_OFF; @@ -2615,20 +2615,20 @@ SwLedControlMode4( _set_timer(&(pLed->BlinkTimer), 0); } - if (pLed->bLedWPSBlinkInProgress == _FALSE) { - if (pLed->bLedNoLinkBlinkInProgress == _TRUE) { + if (pLed->bLedWPSBlinkInProgress == false) { + if (pLed->bLedNoLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedNoLinkBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; } - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - if (pLed->bLedScanBlinkInProgress == _TRUE) { + if (pLed->bLedScanBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } - pLed->bLedWPSBlinkInProgress = _TRUE; + pLed->bLedWPSBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_WPS; if (pLed->bLedOn) { pLed->BlinkingLedState = RTW_LED_OFF; @@ -2643,10 +2643,10 @@ SwLedControlMode4( case LED_CTL_STOP_WPS: /* WPS connect success */ if (pLed->bLedWPSBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } - pLed->bLedNoLinkBlinkInProgress = _TRUE; + pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -2659,10 +2659,10 @@ SwLedControlMode4( case LED_CTL_STOP_WPS_FAIL: /* WPS authentication fail */ if (pLed->bLedWPSBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } - pLed->bLedNoLinkBlinkInProgress = _TRUE; + pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -2674,7 +2674,7 @@ SwLedControlMode4( if (pLed1->bLedWPSBlinkInProgress) _cancel_timer_ex(&(pLed1->BlinkTimer)); else - pLed1->bLedWPSBlinkInProgress = _TRUE; + pLed1->bLedWPSBlinkInProgress = true; pLed1->CurrLedState = LED_BLINK_WPS_STOP; if (pLed1->bLedOn) @@ -2688,10 +2688,10 @@ SwLedControlMode4( case LED_CTL_STOP_WPS_FAIL_OVERLAP: /* WPS session overlap */ if (pLed->bLedWPSBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } - pLed->bLedNoLinkBlinkInProgress = _TRUE; + pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -2703,7 +2703,7 @@ SwLedControlMode4( if (pLed1->bLedWPSBlinkInProgress) _cancel_timer_ex(&(pLed1->BlinkTimer)); else - pLed1->bLedWPSBlinkInProgress = _TRUE; + pLed1->bLedWPSBlinkInProgress = true; pLed1->CurrLedState = LED_BLINK_WPS_STOP_OVERLAP; pLed1->BlinkTimes = 10; @@ -2721,32 +2721,32 @@ SwLedControlMode4( if (pLed->bLedNoLinkBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedNoLinkBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; } if (pLed->bLedLinkBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedLinkBlinkInProgress = _FALSE; + pLed->bLedLinkBlinkInProgress = false; } if (pLed->bLedBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } if (pLed->bLedWPSBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } if (pLed->bLedScanBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } if (pLed->bLedStartToLinkBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedStartToLinkBlinkInProgress = _FALSE; + pLed->bLedStartToLinkBlinkInProgress = false; } if (pLed1->bLedWPSBlinkInProgress) { _cancel_timer_ex(&(pLed1->BlinkTimer)); - pLed1->bLedWPSBlinkInProgress = _FALSE; + pLed1->bLedWPSBlinkInProgress = false; } pLed1->BlinkingLedState = LED_UNKNOWN; @@ -2755,12 +2755,12 @@ SwLedControlMode4( break; case LED_CTL_CONNECTION_NO_TRANSFER: - if (pLed->bLedBlinkInProgress == _FALSE) { - if (pLed->bLedNoLinkBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == false) { + if (pLed->bLedNoLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedNoLinkBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; } - pLed->bLedBlinkInProgress = _TRUE; + pLed->bLedBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_ALWAYS_ON; pLed->BlinkingLedState = RTW_LED_ON; @@ -2803,14 +2803,14 @@ SwLedControlMode5( break; case LED_CTL_SITE_SURVEY: - if ((pmlmepriv->LinkDetectInfo.bBusyTraffic) && (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) + if ((pmlmepriv->LinkDetectInfo.bBusyTraffic) && (check_fwstate(pmlmepriv, _FW_LINKED) == true)) ; - else if (pLed->bLedScanBlinkInProgress == _FALSE) { - if (pLed->bLedBlinkInProgress == _TRUE) { + else if (pLed->bLedScanBlinkInProgress == false) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - pLed->bLedScanBlinkInProgress = _TRUE; + pLed->bLedScanBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SCAN; pLed->BlinkTimes = 24; if (pLed->bLedOn) @@ -2823,10 +2823,10 @@ SwLedControlMode5( case LED_CTL_TX: case LED_CTL_RX: - if (pLed->bLedBlinkInProgress == _FALSE) { + if (pLed->bLedBlinkInProgress == false) { if (pLed->CurrLedState == LED_BLINK_SCAN) return; - pLed->bLedBlinkInProgress = _TRUE; + pLed->bLedBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_TXRX; pLed->BlinkTimes = 2; if (pLed->bLedOn) @@ -2843,7 +2843,7 @@ SwLedControlMode5( if (pLed->bLedBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } SwLedOff(padapter, pLed); @@ -2902,15 +2902,15 @@ SwLedControlMode7( case LED_CTL_SITE_SURVEY: if (pmlmepriv->LinkDetectInfo.bBusyTraffic) ; - else if (pLed->bLedScanBlinkInProgress == _FALSE) { + else if (pLed->bLedScanBlinkInProgress == false) { if (IS_LED_WPS_BLINKING(pLed)) return; - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - pLed->bLedScanBlinkInProgress = _TRUE; + pLed->bLedScanBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SCAN; pLed->BlinkTimes = 6; if (pLed->bLedOn) @@ -2929,11 +2929,11 @@ SwLedControlMode7( pLed->BlinkingLedState = RTW_LED_ON; if (pLed->bLedBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } if (pLed->bLedScanBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } _set_timer(&(pLed->BlinkTimer), 0); @@ -2941,16 +2941,16 @@ SwLedControlMode7( case LED_CTL_START_WPS: /* wait until xinpin finish */ case LED_CTL_START_WPS_BOTTON: - if (pLed->bLedWPSBlinkInProgress == _FALSE) { - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedWPSBlinkInProgress == false) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - if (pLed->bLedScanBlinkInProgress == _TRUE) { + if (pLed->bLedScanBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } - pLed->bLedWPSBlinkInProgress = _TRUE; + pLed->bLedWPSBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_WPS; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -2963,9 +2963,9 @@ SwLedControlMode7( case LED_CTL_STOP_WPS: if (pLed->bLedWPSBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } else - pLed->bLedWPSBlinkInProgress = _TRUE; + pLed->bLedWPSBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_WPS_STOP; if (pLed->bLedOn) { @@ -2983,7 +2983,7 @@ SwLedControlMode7( case LED_CTL_STOP_WPS_FAIL_OVERLAP: /* WPS session overlap */ if (pLed->bLedWPSBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } pLed->CurrLedState = RTW_LED_OFF; @@ -3006,15 +3006,15 @@ SwLedControlMode7( pLed->BlinkingLedState = RTW_LED_OFF; if (pLed->bLedBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } if (pLed->bLedScanBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } if (pLed->bLedWPSBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } _set_timer(&(pLed->BlinkTimer), 0); @@ -3075,12 +3075,12 @@ SwLedControlMode9( PLED_USB pLed = &(ledpriv->SwLed0); PLED_USB pLed1 = &(ledpriv->SwLed1); PLED_USB pLed2 = &(ledpriv->SwLed2); - bool bWPSOverLap = _FALSE; + bool bWPSOverLap = false; /* RTW_INFO("LedAction=%d\n", LedAction); */ switch (LedAction) { case LED_CTL_START_TO_LINK: - if (pLed2->bLedBlinkInProgress == _FALSE) { - pLed2->bLedBlinkInProgress = _TRUE; + if (pLed2->bLedBlinkInProgress == false) { + pLed2->bLedBlinkInProgress = true; pLed2->BlinkingLedState = RTW_LED_ON; pLed2->CurrLedState = LED_BLINK_LINK_IN_PROCESS; @@ -3116,16 +3116,16 @@ SwLedControlMode9( /* LED2 settings */ if (LedAction == LED_CTL_LINK) { if (Adapter->securitypriv.dot11PrivacyAlgrthm != _NO_PRIVACY_) { - if (pLed2->bLedBlinkInProgress == _TRUE) { + if (pLed2->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed2->BlinkTimer)); - pLed2->bLedBlinkInProgress = _FALSE; + pLed2->bLedBlinkInProgress = false; } pLed2->CurrLedState = RTW_LED_ON; - pLed2->bLedNoLinkBlinkInProgress = _TRUE; + pLed2->bLedNoLinkBlinkInProgress = true; if (!pLed2->bLedOn) _set_timer(&(pLed2->BlinkTimer), 0); } else { - if (pLed2->bLedWPSBlinkInProgress != _TRUE) { + if (pLed2->bLedWPSBlinkInProgress != true) { pLed2->CurrLedState = RTW_LED_OFF; pLed2->BlinkingLedState = RTW_LED_OFF; if (pLed2->bLedOn) @@ -3133,7 +3133,7 @@ SwLedControlMode9( } } } else { /* NO_LINK */ - if (pLed2->bLedWPSBlinkInProgress == _FALSE) { + if (pLed2->bLedWPSBlinkInProgress == false) { pLed2->CurrLedState = RTW_LED_OFF; pLed2->BlinkingLedState = RTW_LED_OFF; if (pLed2->bLedOn) @@ -3142,15 +3142,15 @@ SwLedControlMode9( } /* LED0 settings */ - if (pLed->bLedNoLinkBlinkInProgress == _FALSE) { + if (pLed->bLedNoLinkBlinkInProgress == false) { if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed)) return; - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - pLed->bLedNoLinkBlinkInProgress = _TRUE; + pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -3162,21 +3162,21 @@ SwLedControlMode9( break; case LED_CTL_SITE_SURVEY: - if ((pmlmepriv->LinkDetectInfo.bBusyTraffic) && (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) + if ((pmlmepriv->LinkDetectInfo.bBusyTraffic) && (check_fwstate(pmlmepriv, _FW_LINKED) == true)) ; - else { /* if(pLed->bLedScanBlinkInProgress ==FALSE) */ + else { /* if(pLed->bLedScanBlinkInProgress ==false) */ if (IS_LED_WPS_BLINKING(pLed)) return; - if (pLed->bLedNoLinkBlinkInProgress == _TRUE) { + if (pLed->bLedNoLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedNoLinkBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; } - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - pLed->bLedScanBlinkInProgress = _TRUE; + pLed->bLedScanBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SCAN; pLed->BlinkTimes = 24; if (pLed->bLedOn) @@ -3190,14 +3190,14 @@ SwLedControlMode9( case LED_CTL_TX: case LED_CTL_RX: - if (pLed->bLedBlinkInProgress == _FALSE) { + if (pLed->bLedBlinkInProgress == false) { if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed)) return; - if (pLed->bLedNoLinkBlinkInProgress == _TRUE) { + if (pLed->bLedNoLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedNoLinkBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; } - pLed->bLedBlinkInProgress = _TRUE; + pLed->bLedBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_TXRX; pLed->BlinkTimes = 2; if (pLed->bLedOn) @@ -3210,10 +3210,10 @@ SwLedControlMode9( case LED_CTL_START_WPS: /* wait until xinpin finish */ case LED_CTL_START_WPS_BOTTON: - pLed2->bLedBlinkInProgress = _TRUE; + pLed2->bLedBlinkInProgress = true; pLed2->BlinkingLedState = RTW_LED_ON; pLed2->CurrLedState = LED_BLINK_LINK_IN_PROCESS; - pLed2->bLedWPSBlinkInProgress = _TRUE; + pLed2->bLedWPSBlinkInProgress = true; _set_timer(&(pLed2->BlinkTimer), 500); @@ -3221,13 +3221,13 @@ SwLedControlMode9( case LED_CTL_STOP_WPS: /* WPS connect success */ /* LED2 settings */ - if (pLed2->bLedWPSBlinkInProgress == _TRUE) { + if (pLed2->bLedWPSBlinkInProgress == true) { _cancel_timer_ex(&(pLed2->BlinkTimer)); - pLed2->bLedBlinkInProgress = _FALSE; - pLed2->bLedWPSBlinkInProgress = _FALSE; + pLed2->bLedBlinkInProgress = false; + pLed2->bLedWPSBlinkInProgress = false; } pLed2->CurrLedState = RTW_LED_ON; - pLed2->bLedNoLinkBlinkInProgress = _TRUE; + pLed2->bLedNoLinkBlinkInProgress = true; if (!pLed2->bLedOn) _set_timer(&(pLed2->BlinkTimer), 0); @@ -3243,7 +3243,7 @@ SwLedControlMode9( case LED_CTL_STOP_WPS_FAIL: /* WPS authentication fail */ /* LED1 settings */ - /* if(bWPSOverLap == _FALSE) */ + /* if(bWPSOverLap == false) */ { pLed1->CurrLedState = LED_BLINK_AUTH_ERROR; pLed1->BlinkTimes = 50; @@ -3255,7 +3255,7 @@ SwLedControlMode9( } /* else */ /* { */ - /* bWPSOverLap = _FALSE; */ + /* bWPSOverLap = false; */ /* pLed1->CurrLedState = RTW_LED_OFF; */ /* pLed1->BlinkingLedState = RTW_LED_OFF; */ /* _set_timer(&(pLed1->BlinkTimer), 0); */ @@ -3264,7 +3264,7 @@ SwLedControlMode9( /* LED2 settings */ pLed2->CurrLedState = RTW_LED_OFF; pLed2->BlinkingLedState = RTW_LED_OFF; - pLed2->bLedWPSBlinkInProgress = _FALSE; + pLed2->bLedWPSBlinkInProgress = false; if (pLed2->bLedOn) _set_timer(&(pLed2->BlinkTimer), 0); @@ -3272,7 +3272,7 @@ SwLedControlMode9( case LED_CTL_STOP_WPS_FAIL_OVERLAP: /* WPS session overlap */ /* LED1 settings */ - bWPSOverLap = _TRUE; + bWPSOverLap = true; pLed1->CurrLedState = LED_BLINK_WPS_STOP_OVERLAP; pLed1->BlinkTimes = 10; pLed1->BlinkCounter = 50; @@ -3285,7 +3285,7 @@ SwLedControlMode9( /* LED2 settings */ pLed2->CurrLedState = RTW_LED_OFF; pLed2->BlinkingLedState = RTW_LED_OFF; - pLed2->bLedWPSBlinkInProgress = _FALSE; + pLed2->bLedWPSBlinkInProgress = false; if (pLed2->bLedOn) _set_timer(&(pLed2->BlinkTimer), 0); @@ -3297,32 +3297,32 @@ SwLedControlMode9( if (pLed->bLedNoLinkBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedNoLinkBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; } if (pLed->bLedLinkBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedLinkBlinkInProgress = _FALSE; + pLed->bLedLinkBlinkInProgress = false; } if (pLed->bLedBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } if (pLed->bLedWPSBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } if (pLed->bLedScanBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } if (pLed->bLedStartToLinkBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedStartToLinkBlinkInProgress = _FALSE; + pLed->bLedStartToLinkBlinkInProgress = false; } if (pLed1->bLedWPSBlinkInProgress) { _cancel_timer_ex(&(pLed1->BlinkTimer)); - pLed1->bLedWPSBlinkInProgress = _FALSE; + pLed1->bLedWPSBlinkInProgress = false; } @@ -3332,12 +3332,12 @@ SwLedControlMode9( break; case LED_CTL_CONNECTION_NO_TRANSFER: - if (pLed->bLedBlinkInProgress == _FALSE) { - if (pLed->bLedNoLinkBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == false) { + if (pLed->bLedNoLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedNoLinkBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; } - pLed->bLedBlinkInProgress = _TRUE; + pLed->bLedBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_ALWAYS_ON; pLed->BlinkingLedState = RTW_LED_ON; @@ -3367,8 +3367,8 @@ SwLedControlMode10( switch (LedAction) { case LED_CTL_START_TO_LINK: - if (pLed1->bLedBlinkInProgress == _FALSE) { - pLed1->bLedBlinkInProgress = _TRUE; + if (pLed1->bLedBlinkInProgress == false) { + pLed1->bLedBlinkInProgress = true; pLed1->BlinkingLedState = RTW_LED_ON; pLed1->CurrLedState = LED_BLINK_LINK_IN_PROCESS; @@ -3379,7 +3379,7 @@ SwLedControlMode10( case LED_CTL_LINK: case LED_CTL_NO_LINK: if (LedAction == LED_CTL_LINK) { - if (pLed->bLedWPSBlinkInProgress == _TRUE || pLed1->bLedWPSBlinkInProgress == _TRUE) + if (pLed->bLedWPSBlinkInProgress == true || pLed1->bLedWPSBlinkInProgress == true) ; else { if (pHalData->current_band_type == BAND_ON_2_4G) @@ -3387,9 +3387,9 @@ SwLedControlMode10( { pLed->CurrLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON; - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } _set_timer(&(pLed->BlinkTimer), 0); @@ -3401,9 +3401,9 @@ SwLedControlMode10( { pLed1->CurrLedState = RTW_LED_ON; pLed1->BlinkingLedState = RTW_LED_ON; - if (pLed1->bLedBlinkInProgress == _TRUE) { + if (pLed1->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed1->BlinkTimer)); - pLed1->bLedBlinkInProgress = _FALSE; + pLed1->bLedBlinkInProgress = false; } _set_timer(&(pLed1->BlinkTimer), 0); @@ -3413,7 +3413,7 @@ SwLedControlMode10( } } } else if (LedAction == LED_CTL_NO_LINK) { /* TODO by page */ - if (pLed->bLedWPSBlinkInProgress == _TRUE || pLed1->bLedWPSBlinkInProgress == _TRUE) + if (pLed->bLedWPSBlinkInProgress == true || pLed1->bLedWPSBlinkInProgress == true) ; else { pLed->CurrLedState = RTW_LED_OFF; @@ -3431,35 +3431,35 @@ SwLedControlMode10( break; case LED_CTL_SITE_SURVEY: - if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) + if (check_fwstate(pmlmepriv, _FW_LINKED) == true) ; /* don't blink when media connect */ - else { /* if(pLed->bLedScanBlinkInProgress ==FALSE) */ + else { /* if(pLed->bLedScanBlinkInProgress ==false) */ if (IS_LED_WPS_BLINKING(pLed) || IS_LED_WPS_BLINKING(pLed1)) return; - if (pLed->bLedNoLinkBlinkInProgress == _TRUE) { + if (pLed->bLedNoLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedNoLinkBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; } - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - pLed->bLedScanBlinkInProgress = _TRUE; + pLed->bLedScanBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SCAN; pLed->BlinkTimes = 12; pLed->BlinkingLedState = LED_BLINK_SCAN; _set_timer(&(pLed->BlinkTimer), 0); - if (pLed1->bLedNoLinkBlinkInProgress == _TRUE) { + if (pLed1->bLedNoLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed1->BlinkTimer)); - pLed1->bLedNoLinkBlinkInProgress = _FALSE; + pLed1->bLedNoLinkBlinkInProgress = false; } - if (pLed1->bLedBlinkInProgress == _TRUE) { + if (pLed1->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed1->BlinkTimer)); - pLed1->bLedBlinkInProgress = _FALSE; + pLed1->bLedBlinkInProgress = false; } - pLed1->bLedScanBlinkInProgress = _TRUE; + pLed1->bLedScanBlinkInProgress = true; pLed1->CurrLedState = LED_BLINK_SCAN; pLed1->BlinkTimes = 12; pLed1->BlinkingLedState = LED_BLINK_SCAN; @@ -3471,18 +3471,18 @@ SwLedControlMode10( case LED_CTL_START_WPS: /* wait until xinpin finish */ case LED_CTL_START_WPS_BOTTON: /* LED0 settings */ - if (pLed->bLedBlinkInProgress == _FALSE) { - pLed->bLedBlinkInProgress = _TRUE; - pLed->bLedWPSBlinkInProgress = _TRUE; + if (pLed->bLedBlinkInProgress == false) { + pLed->bLedBlinkInProgress = true; + pLed->bLedWPSBlinkInProgress = true; pLed->BlinkingLedState = LED_BLINK_WPS; pLed->CurrLedState = LED_BLINK_WPS; _set_timer(&(pLed->BlinkTimer), 0); } /* LED1 settings */ - if (pLed1->bLedBlinkInProgress == _FALSE) { - pLed1->bLedBlinkInProgress = _TRUE; - pLed1->bLedWPSBlinkInProgress = _TRUE; + if (pLed1->bLedBlinkInProgress == false) { + pLed1->bLedBlinkInProgress = true; + pLed1->bLedWPSBlinkInProgress = true; pLed1->BlinkingLedState = LED_BLINK_WPS; pLed1->CurrLedState = LED_BLINK_WPS; _set_timer(&(pLed1->BlinkTimer), LED_BLINK_NORMAL_INTERVAL + LED_BLINK_LINK_INTERVAL_NETGEAR); @@ -3495,12 +3495,12 @@ SwLedControlMode10( if (pHalData->current_band_type == BAND_ON_2_4G) /* LED0 settings */ { - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; pLed->CurrLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON; - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } _set_timer(&(pLed->BlinkTimer), 0); @@ -3510,12 +3510,12 @@ SwLedControlMode10( } else if (pHalData->current_band_type == BAND_ON_5G) /* LED1 settings */ { - pLed1->bLedWPSBlinkInProgress = _FALSE; + pLed1->bLedWPSBlinkInProgress = false; pLed1->CurrLedState = RTW_LED_ON; pLed1->BlinkingLedState = RTW_LED_ON; - if (pLed1->bLedBlinkInProgress == _TRUE) { + if (pLed1->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed1->BlinkTimer)); - pLed1->bLedBlinkInProgress = _FALSE; + pLed1->bLedBlinkInProgress = false; } _set_timer(&(pLed1->BlinkTimer), 0); @@ -3528,13 +3528,13 @@ SwLedControlMode10( case LED_CTL_STOP_WPS_FAIL: /* WPS authentication fail */ /* LED1 settings */ - pLed1->bLedWPSBlinkInProgress = _FALSE; + pLed1->bLedWPSBlinkInProgress = false; pLed1->CurrLedState = RTW_LED_OFF; pLed1->BlinkingLedState = RTW_LED_OFF; _set_timer(&(pLed1->BlinkTimer), 0); /* LED0 settings */ - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; pLed->CurrLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF; if (pLed->bLedOn) @@ -3571,11 +3571,11 @@ SwLedControlMode11( break; case LED_CTL_LINK: - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - pLed->bLedBlinkInProgress = _TRUE; + pLed->bLedBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_TXRX; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -3586,12 +3586,12 @@ SwLedControlMode11( case LED_CTL_START_WPS: /* wait until xinpin finish */ case LED_CTL_START_WPS_BOTTON: - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - pLed->bLedWPSBlinkInProgress = _TRUE; - pLed->bLedBlinkInProgress = _TRUE; + pLed->bLedWPSBlinkInProgress = true; + pLed->bLedBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_WPS; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -3605,9 +3605,9 @@ SwLedControlMode11( case LED_CTL_STOP_WPS: case LED_CTL_STOP_WPS_FAIL: - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } pLed->CurrLedState = LED_BLINK_WPS_STOP; _set_timer(&(pLed->BlinkTimer), 0); @@ -3619,23 +3619,23 @@ SwLedControlMode11( if (pLed->bLedNoLinkBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedNoLinkBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; } if (pLed->bLedLinkBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedLinkBlinkInProgress = _FALSE; + pLed->bLedLinkBlinkInProgress = false; } if (pLed->bLedBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } if (pLed->bLedWPSBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } if (pLed->bLedScanBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } SwLedOff(Adapter, pLed); @@ -3666,13 +3666,13 @@ SwLedControlMode12( case LED_CTL_LINK: case LED_CTL_SITE_SURVEY: - if (pLed->bLedNoLinkBlinkInProgress == _FALSE) { - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedNoLinkBlinkInProgress == false) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - pLed->bLedNoLinkBlinkInProgress = _TRUE; + pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) pLed->BlinkingLedState = RTW_LED_OFF; @@ -3684,12 +3684,12 @@ SwLedControlMode12( case LED_CTL_TX: case LED_CTL_RX: - if (pLed->bLedBlinkInProgress == _FALSE) { - if (pLed->bLedNoLinkBlinkInProgress == _TRUE) { + if (pLed->bLedBlinkInProgress == false) { + if (pLed->bLedNoLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedNoLinkBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; } - pLed->bLedBlinkInProgress = _TRUE; + pLed->bLedBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_TXRX; pLed->BlinkTimes = 2; if (pLed->bLedOn) @@ -3706,17 +3706,17 @@ SwLedControlMode12( if (pLed->bLedBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } if (pLed->bLedScanBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } - if (pLed->bLedNoLinkBlinkInProgress == _TRUE) { + if (pLed->bLedNoLinkBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedNoLinkBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; } SwLedOff(Adapter, pLed); @@ -3751,11 +3751,11 @@ SwLedControlMode13( pLed->BlinkingLedState = RTW_LED_ON; if (pLed->bLedBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } if (pLed->bLedScanBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } _set_timer(&(pLed->BlinkTimer), 0); @@ -3763,16 +3763,16 @@ SwLedControlMode13( case LED_CTL_START_WPS: /* wait until xinpin finish */ case LED_CTL_START_WPS_BOTTON: - if (pLed->bLedWPSBlinkInProgress == _FALSE) { - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedWPSBlinkInProgress == false) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - if (pLed->bLedScanBlinkInProgress == _TRUE) { + if (pLed->bLedScanBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } - pLed->bLedWPSBlinkInProgress = _TRUE; + pLed->bLedWPSBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_WPS; if (pLed->bLedOn) { pLed->BlinkingLedState = RTW_LED_OFF; @@ -3787,11 +3787,11 @@ SwLedControlMode13( case LED_CTL_STOP_WPS: if (pLed->bLedWPSBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } else - pLed->bLedWPSBlinkInProgress = _TRUE; + pLed->bLedWPSBlinkInProgress = true; - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; pLed->CurrLedState = LED_BLINK_WPS_STOP; if (pLed->bLedOn) { pLed->BlinkingLedState = RTW_LED_OFF; @@ -3806,7 +3806,7 @@ SwLedControlMode13( case LED_CTL_STOP_WPS_FAIL_OVERLAP: /* WPS session overlap */ if (pLed->bLedWPSBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } pLed->CurrLedState = RTW_LED_OFF; @@ -3815,8 +3815,8 @@ SwLedControlMode13( break; case LED_CTL_START_TO_LINK: - if ((pLed->bLedBlinkInProgress == _FALSE) && (pLed->bLedWPSBlinkInProgress == _FALSE)) { - pLed->bLedBlinkInProgress = _TRUE; + if ((pLed->bLedBlinkInProgress == false) && (pLed->bLedWPSBlinkInProgress == false)) { + pLed->bLedBlinkInProgress = true; pLed->BlinkingLedState = RTW_LED_ON; pLed->CurrLedState = LED_BLINK_LINK_IN_PROCESS; @@ -3830,11 +3830,11 @@ SwLedControlMode13( return; if (pLed->bLedBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } if (pLed->bLedScanBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } /* if(!IS_LED_BLINKING(pLed)) */ { @@ -3850,15 +3850,15 @@ SwLedControlMode13( pLed->BlinkingLedState = RTW_LED_OFF; if (pLed->bLedBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } if (pLed->bLedScanBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } if (pLed->bLedWPSBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } if (LedAction == LED_CTL_POWER_ON) @@ -3892,7 +3892,7 @@ SwLedControlMode14( pLed->BlinkingLedState = RTW_LED_OFF; if (pLed->bLedBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } SwLedOff(Adapter, pLed); break; @@ -3906,8 +3906,8 @@ SwLedControlMode14( break; case LED_CTL_TX: case LED_CTL_RX: - if (pLed->bLedBlinkInProgress == _FALSE) { - pLed->bLedBlinkInProgress = _TRUE; + if (pLed->bLedBlinkInProgress == false) { + pLed->bLedBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_TXRX; pLed->BlinkTimes = 2; if (pLed->bLedOn) { @@ -3940,16 +3940,16 @@ SwLedControlMode15( switch (LedAction) { case LED_CTL_START_WPS: /* wait until xinpin finish */ case LED_CTL_START_WPS_BOTTON: - if (pLed->bLedWPSBlinkInProgress == _FALSE) { - if (pLed->bLedBlinkInProgress == _TRUE) { + if (pLed->bLedWPSBlinkInProgress == false) { + if (pLed->bLedBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - if (pLed->bLedScanBlinkInProgress == _TRUE) { + if (pLed->bLedScanBlinkInProgress == true) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } - pLed->bLedWPSBlinkInProgress = _TRUE; + pLed->bLedWPSBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_WPS; if (pLed->bLedOn) { pLed->BlinkingLedState = RTW_LED_OFF; @@ -3966,7 +3966,7 @@ SwLedControlMode15( _cancel_timer_ex(&(pLed->BlinkTimer)); pLed->CurrLedState = LED_BLINK_WPS_STOP; - /* if(check_fwstate(pmlmepriv, _FW_LINKED)== _TRUE) */ + /* if(check_fwstate(pmlmepriv, _FW_LINKED)== true) */ { pLed->BlinkingLedState = RTW_LED_ON; @@ -3979,7 +3979,7 @@ SwLedControlMode15( case LED_CTL_STOP_WPS_FAIL_OVERLAP: /* WPS session overlap */ if (pLed->bLedWPSBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedWPSBlinkInProgress = false; } pLed->CurrLedState = RTW_LED_OFF; @@ -4005,11 +4005,11 @@ SwLedControlMode15( if (pLed->bLedBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } if (pLed->bLedScanBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedScanBlinkInProgress = false; } /* if(!IS_LED_BLINKING(pLed)) */ { @@ -4026,7 +4026,7 @@ SwLedControlMode15( if (pLed->bLedBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } pLed->CurrLedState = LED_BLINK_LINK_IDEL; @@ -4036,15 +4036,15 @@ SwLedControlMode15( break; case LED_CTL_SITE_SURVEY: - if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) + if (check_fwstate(pmlmepriv, _FW_LINKED) == true) return; - if (pLed->bLedWPSBlinkInProgress == _TRUE) + if (pLed->bLedWPSBlinkInProgress == true) return; if (pLed->bLedBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } pLed->CurrLedState = LED_BLINK_SCAN; pLed->BlinkingLedState = RTW_LED_ON; @@ -4058,10 +4058,10 @@ SwLedControlMode15( if (pLed->bLedBlinkInProgress) { _cancel_timer_ex(&(pLed->BlinkTimer)); - pLed->bLedBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; } - pLed->bLedBlinkInProgress = _TRUE; + pLed->bLedBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_TXRX; pLed->BlinkTimes = 2; if (pLed->bLedOn) @@ -4097,7 +4097,7 @@ LedControlUSB( return; } - if (ledpriv->bRegUseLed == _FALSE) + if (ledpriv->bRegUseLed == false) return; /* if(priv->bInHctTest) */ @@ -4197,19 +4197,19 @@ void ResetLedStatus(PLED_USB pLed) { pLed->CurrLedState = RTW_LED_OFF; /* Current LED state. */ - pLed->bLedOn = _FALSE; /* true if LED is ON, false if LED is OFF. */ + pLed->bLedOn = false; /* true if LED is ON, false if LED is OFF. */ - pLed->bLedBlinkInProgress = _FALSE; /* true if it is blinking, false o.w.. */ - pLed->bLedWPSBlinkInProgress = _FALSE; + pLed->bLedBlinkInProgress = false; /* true if it is blinking, false o.w.. */ + pLed->bLedWPSBlinkInProgress = false; pLed->BlinkTimes = 0; /* Number of times to toggle led state for blinking. */ pLed->BlinkCounter = 0; pLed->BlinkingLedState = LED_UNKNOWN; /* Next state for blinking, either RTW_LED_ON or RTW_LED_OFF are. */ - pLed->bLedNoLinkBlinkInProgress = _FALSE; - pLed->bLedLinkBlinkInProgress = _FALSE; - pLed->bLedStartToLinkBlinkInProgress = _FALSE; - pLed->bLedScanBlinkInProgress = _FALSE; + pLed->bLedNoLinkBlinkInProgress = false; + pLed->bLedLinkBlinkInProgress = false; + pLed->bLedStartToLinkBlinkInProgress = false; + pLed->bLedScanBlinkInProgress = false; } /* diff --git a/hal/phydm/phydm.c b/hal/phydm/phydm.c index fee6b86..c33938f 100644 --- a/hal/phydm/phydm.c +++ b/hal/phydm/phydm.c @@ -481,7 +481,7 @@ phydm_get_structure( void *p_struct = NULL; switch (structure_type) { - case PHYDM_FALSEALMCNT: + case PHYDMfalseALMCNT: p_struct = &(p_dm_odm->false_alm_cnt); break; case PHYDM_CFOTRACK: @@ -1371,7 +1371,7 @@ phydm_cmn_info_query( enum phydm_info_query_e info_type ) { - struct _FALSE_ALARM_STATISTICS *false_alm_cnt = (struct _FALSE_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDM_FALSEALMCNT); + struct false_ALARM_STATISTICS *false_alm_cnt = (struct false_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDMfalseALMCNT); switch (info_type) { case PHYDM_INFO_FA_OFDM: @@ -1658,7 +1658,7 @@ odm_update_power_training_state( struct PHY_DM_STRUCT *p_dm_odm ) { - struct _FALSE_ALARM_STATISTICS *false_alm_cnt = (struct _FALSE_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDM_FALSEALMCNT); + struct false_ALARM_STATISTICS *false_alm_cnt = (struct false_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDMfalseALMCNT); struct _dynamic_initial_gain_threshold_ *p_dm_dig_table = &p_dm_odm->dm_dig_table; u32 score = 0; diff --git a/hal/phydm/phydm.h b/hal/phydm/phydm.h index ecad6c1..e1d493d 100644 --- a/hal/phydm/phydm.h +++ b/hal/phydm/phydm.h @@ -703,8 +703,8 @@ struct PHY_DM_STRUCT { #endif struct _dynamic_primary_cca dm_pri_cca; struct _rate_adaptive_table_ dm_ra_table; - struct _FALSE_ALARM_STATISTICS false_alm_cnt; - struct _FALSE_ALARM_STATISTICS flase_alm_cnt_buddy_adapter; + struct false_ALARM_STATISTICS false_alm_cnt; + struct false_ALARM_STATISTICS flase_alm_cnt_buddy_adapter; struct _sw_antenna_switch_ dm_swat_table; struct _CFO_TRACKING_ dm_cfo_track; struct _ACS_ dm_acs; @@ -793,7 +793,7 @@ struct PHY_DM_STRUCT { }; enum phydm_structure_type { - PHYDM_FALSEALMCNT, + PHYDMfalseALMCNT, PHYDM_CFOTRACK, PHYDM_ADAPTIVITY, PHYDM_ROMINFO, diff --git a/hal/phydm/phydm_antdiv.c b/hal/phydm/phydm_antdiv.c index b6cd44b..21fee73 100644 --- a/hal/phydm/phydm_antdiv.c +++ b/hal/phydm/phydm_antdiv.c @@ -1335,7 +1335,7 @@ void odm_sw_antdiv_callback(istruct timer_list *t) struct PHY_DM_STRUCT *p_dm_odm = timer_list(p_dm_odm, t, dm_swat_table.phydm_sw_antenna_switch_timer); #endif struct _ADAPTER *padapter = p_dm_odm->adapter; - if (padapter->net_closed == _TRUE) + if (padapter->net_closed == true) return; rtw_run_in_thread_cmd(padapter, odm_sw_antdiv_workitem_callback, padapter); @@ -1650,7 +1650,7 @@ void odm_fast_ant_training_callback(struct timer_list *t) #endif struct _ADAPTER *padapter = p_dm_odm->adapter; - if (padapter->net_closed == _TRUE) + if (padapter->net_closed == true) return; /* if(*p_dm_odm->p_is_net_closed == true) */ /* return; */ diff --git a/hal/phydm/phydm_debug.c b/hal/phydm/phydm_debug.c index 12b6045..920cbc6 100644 --- a/hal/phydm/phydm_debug.c +++ b/hal/phydm/phydm_debug.c @@ -875,7 +875,7 @@ phydm_basic_dbg_message ) { struct PHY_DM_STRUCT *p_dm_odm = (struct PHY_DM_STRUCT *)p_dm_void; - struct _FALSE_ALARM_STATISTICS *false_alm_cnt = (struct _FALSE_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDM_FALSEALMCNT); + struct false_ALARM_STATISTICS *false_alm_cnt = (struct false_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDMfalseALMCNT); struct _CFO_TRACKING_ *p_cfo_track = (struct _CFO_TRACKING_ *)phydm_get_structure(p_dm_odm, PHYDM_CFOTRACK); struct _dynamic_initial_gain_threshold_ *p_dm_dig_table = &p_dm_odm->dm_dig_table; struct _rate_adaptive_table_ *p_ra_table = &p_dm_odm->dm_ra_table; diff --git a/hal/phydm/phydm_dig.c b/hal/phydm/phydm_dig.c index a5ad9ec..0de6700 100644 --- a/hal/phydm/phydm_dig.c +++ b/hal/phydm/phydm_dig.c @@ -114,7 +114,7 @@ odm_forbidden_igi_check( { struct PHY_DM_STRUCT *p_dm_odm = (struct PHY_DM_STRUCT *)p_dm_void; struct _dynamic_initial_gain_threshold_ *p_dm_dig_table = &p_dm_odm->dm_dig_table; - struct _FALSE_ALARM_STATISTICS *p_false_alm_cnt = (struct _FALSE_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDM_FALSEALMCNT); + struct false_ALARM_STATISTICS *p_false_alm_cnt = (struct false_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDMfalseALMCNT); u8 rx_gain_range_min = p_dm_dig_table->rx_gain_range_min; if (p_dm_dig_table->large_fa_timeout) { @@ -502,8 +502,8 @@ odm_dig_init( p_dm_dig_table->pre_ig_value = 0; p_dm_dig_table->rssi_low_thresh = DM_DIG_THRESH_LOW; p_dm_dig_table->rssi_high_thresh = DM_DIG_THRESH_HIGH; - p_dm_dig_table->fa_low_thresh = DM_FALSEALARM_THRESH_LOW; - p_dm_dig_table->fa_high_thresh = DM_FALSEALARM_THRESH_HIGH; + p_dm_dig_table->fa_low_thresh = DMfalseALARM_THRESH_LOW; + p_dm_dig_table->fa_high_thresh = DMfalseALARM_THRESH_HIGH; p_dm_dig_table->backoff_val = DM_DIG_BACKOFF_DEFAULT; p_dm_dig_table->backoff_val_range_max = DM_DIG_BACKOFF_MAX; p_dm_dig_table->backoff_val_range_min = DM_DIG_BACKOFF_MIN; @@ -549,7 +549,7 @@ odm_DIG( /* Common parameters */ struct _dynamic_initial_gain_threshold_ *p_dm_dig_table = &p_dm_odm->dm_dig_table; - struct _FALSE_ALARM_STATISTICS *p_false_alm_cnt = (struct _FALSE_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDM_FALSEALMCNT); + struct false_ALARM_STATISTICS *p_false_alm_cnt = (struct false_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDMfalseALMCNT); bool first_connect, first_dis_connect; u8 dig_max_of_min, dig_dynamic_min; u8 dm_dig_max, dm_dig_min; @@ -813,7 +813,7 @@ odm_dig_by_rssi_lps( ) { struct PHY_DM_STRUCT *p_dm_odm = (struct PHY_DM_STRUCT *)p_dm_void; - struct _FALSE_ALARM_STATISTICS *p_false_alm_cnt = (struct _FALSE_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDM_FALSEALMCNT); + struct false_ALARM_STATISTICS *p_false_alm_cnt = (struct false_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDMfalseALMCNT); u8 rssi_lower = DM_DIG_MIN_NIC; /* 0x1E or 0x1C */ u8 current_igi = p_dm_odm->rssi_min; @@ -866,7 +866,7 @@ odm_false_alarm_counter_statistics( ) { struct PHY_DM_STRUCT *p_dm_odm = (struct PHY_DM_STRUCT *)p_dm_void; - struct _FALSE_ALARM_STATISTICS *false_alm_cnt = (struct _FALSE_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDM_FALSEALMCNT); + struct false_ALARM_STATISTICS *false_alm_cnt = (struct false_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDMfalseALMCNT); #if (PHYDM_LA_MODE_SUPPORT == 1) struct _RT_ADCSMP *adc_smp = &(p_dm_odm->adcsmp); #endif @@ -1235,7 +1235,7 @@ odm_cck_packet_detection_thresh( { struct PHY_DM_STRUCT *p_dm_odm = (struct PHY_DM_STRUCT *)p_dm_void; struct _dynamic_initial_gain_threshold_ *p_dm_dig_table = &p_dm_odm->dm_dig_table; - struct _FALSE_ALARM_STATISTICS *false_alm_cnt = (struct _FALSE_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDM_FALSEALMCNT); + struct false_ALARM_STATISTICS *false_alm_cnt = (struct false_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDMfalseALMCNT); u8 cur_cck_cca_thres = p_dm_dig_table->cur_cck_cca_thres, RSSI_thd = 35; if ((!(p_dm_odm->support_ability & ODM_BB_CCK_PD)) || (!(p_dm_odm->support_ability & ODM_BB_FA_CNT))) { diff --git a/hal/phydm/phydm_dig.h b/hal/phydm/phydm_dig.h index f6fb74d..ec7c9ec 100644 --- a/hal/phydm/phydm_dig.h +++ b/hal/phydm/phydm_dig.h @@ -95,7 +95,7 @@ struct _dynamic_initial_gain_threshold_ { enum dig_goupcheck_level dig_go_up_check_level; }; -struct _FALSE_ALARM_STATISTICS { +struct false_ALARM_STATISTICS { u32 cnt_parity_fail; u32 cnt_rate_illegal; u32 cnt_crc8_fail; @@ -196,8 +196,8 @@ enum phydm_pause_level { #define DM_DIG_THRESH_HIGH 40 #define DM_DIG_THRESH_LOW 35 -#define DM_FALSEALARM_THRESH_LOW 400 -#define DM_FALSEALARM_THRESH_HIGH 1000 +#define DMfalseALARM_THRESH_LOW 400 +#define DMfalseALARM_THRESH_HIGH 1000 #define DM_DIG_MAX_NIC 0x3e #define DM_DIG_MIN_NIC 0x20 diff --git a/hal/phydm/phydm_dynamic_rx_path.c b/hal/phydm/phydm_dynamic_rx_path.c index d6be9c0..feb6ec6 100644 --- a/hal/phydm/phydm_dynamic_rx_path.c +++ b/hal/phydm/phydm_dynamic_rx_path.c @@ -50,7 +50,7 @@ phydm_drp_get_statistic( { struct PHY_DM_STRUCT *p_dm_odm = (struct PHY_DM_STRUCT *)p_dm_void; struct _DYNAMIC_RX_PATH_ *p_dm_drp_table = &(p_dm_odm->dm_drp_table); - struct _FALSE_ALARM_STATISTICS *false_alm_cnt = (struct _FALSE_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDM_FALSEALMCNT); + struct false_ALARM_STATISTICS *false_alm_cnt = (struct false_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDMfalseALMCNT); odm_false_alarm_counter_statistics(p_dm_odm); @@ -72,7 +72,7 @@ phydm_dynamic_rx_path( u8 curr_drp_state; u32 rx_ok_cal; u32 RSSI = 0; - struct _FALSE_ALARM_STATISTICS *false_alm_cnt = (struct _FALSE_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDM_FALSEALMCNT); + struct false_ALARM_STATISTICS *false_alm_cnt = (struct false_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDMfalseALMCNT); if (!(p_dm_odm->support_ability & ODM_BB_DYNAMIC_RX_PATH)) { ODM_RT_TRACE(p_dm_odm, ODM_COMP_DYNAMIC_RX_PATH, ODM_DBG_LOUD, ("[Return Init] Not Support Dynamic RX PAth\n")); @@ -170,7 +170,7 @@ phydm_dynamic_rx_path_callback( struct PHY_DM_STRUCT *p_dm_odm = (struct PHY_DM_STRUCT *)function_context; struct _ADAPTER *padapter = p_dm_odm->adapter; - if (padapter->net_closed == _TRUE) + if (padapter->net_closed == true) return; } diff --git a/hal/phydm/phydm_edcaturbocheck.c b/hal/phydm/phydm_edcaturbocheck.c index a8b5d25..5ec57ae 100644 --- a/hal/phydm/phydm_edcaturbocheck.c +++ b/hal/phydm/phydm_edcaturbocheck.c @@ -91,8 +91,8 @@ odm_edca_turbo_check_ce( u32 edca_param; u64 cur_tx_bytes = 0; u64 cur_rx_bytes = 0; - u8 bbtchange = _TRUE; - u8 is_bias_on_rx = _FALSE; + u8 bbtchange = true; + u8 is_bias_on_rx = false; HAL_DATA_TYPE *p_hal_data = GET_HAL_DATA(adapter); struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(adapter); struct xmit_priv *pxmitpriv = &(adapter->xmitpriv); @@ -101,13 +101,13 @@ odm_edca_turbo_check_ce( struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - if (p_dm_odm->is_linked != _TRUE) { - precvpriv->is_any_non_be_pkts = _FALSE; + if (p_dm_odm->is_linked != true) { + precvpriv->is_any_non_be_pkts = false; return; } if ((pregpriv->wifi_spec == 1)) { /* || (pmlmeinfo->HT_enable == 0)) */ - precvpriv->is_any_non_be_pkts = _FALSE; + precvpriv->is_any_non_be_pkts = false; return; } @@ -117,13 +117,13 @@ odm_edca_turbo_check_ce( iot_peer = pmlmeinfo->assoc_AP_vendor; if (iot_peer >= HT_IOT_PEER_MAX) { - precvpriv->is_any_non_be_pkts = _FALSE; + precvpriv->is_any_non_be_pkts = false; return; } if (p_dm_odm->support_ic_type & ODM_RTL8188E) { if ((iot_peer == HT_IOT_PEER_RALINK) || (iot_peer == HT_IOT_PEER_ATHEROS)) - is_bias_on_rx = _TRUE; + is_bias_on_rx = true; } /* Check if the status needs to be changed. */ @@ -192,7 +192,7 @@ odm_edca_turbo_check_ce( p_dm_odm->dm_edca_table.prv_traffic_idx = traffic_index; } - p_dm_odm->dm_edca_table.is_current_turbo_edca = _TRUE; + p_dm_odm->dm_edca_table.is_current_turbo_edca = true; } else { /* */ /* Turn Off EDCA turbo here. */ @@ -200,7 +200,7 @@ odm_edca_turbo_check_ce( /* */ if (p_dm_odm->dm_edca_table.is_current_turbo_edca) { rtw_write32(adapter, REG_EDCA_BE_PARAM, p_hal_data->ac_param_be); - p_dm_odm->dm_edca_table.is_current_turbo_edca = _FALSE; + p_dm_odm->dm_edca_table.is_current_turbo_edca = false; } } } diff --git a/hal/phydm/phydm_powertracking_ce.c b/hal/phydm/phydm_powertracking_ce.c index 446e867..e1bffc4 100644 --- a/hal/phydm/phydm_powertracking_ce.c +++ b/hal/phydm/phydm_powertracking_ce.c @@ -534,17 +534,17 @@ odm_txpowertracking_thermal_meter_init( struct _ADAPTER *adapter = p_dm_odm->adapter; HAL_DATA_TYPE *p_hal_data = GET_HAL_DATA(adapter); - p_rf_calibrate_info->is_txpowertracking = _TRUE; + p_rf_calibrate_info->is_txpowertracking = true; p_rf_calibrate_info->tx_powercount = 0; - p_rf_calibrate_info->is_txpowertracking_init = _FALSE; + p_rf_calibrate_info->is_txpowertracking_init = false; if (p_dm_odm->mp_mode == false) - p_rf_calibrate_info->txpowertrack_control = _TRUE; + p_rf_calibrate_info->txpowertrack_control = true; else - p_rf_calibrate_info->txpowertrack_control = _FALSE; + p_rf_calibrate_info->txpowertrack_control = false; if (p_dm_odm->mp_mode == false) - p_rf_calibrate_info->txpowertrack_control = _TRUE; + p_rf_calibrate_info->txpowertrack_control = true; ODM_RT_TRACE(p_dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("p_dm_odm txpowertrack_control = %d\n", p_rf_calibrate_info->txpowertrack_control)); diff --git a/hal/phydm/phydm_rainfo.c b/hal/phydm/phydm_rainfo.c index 94b1bde..be1d8c1 100644 --- a/hal/phydm/phydm_rainfo.c +++ b/hal/phydm/phydm_rainfo.c @@ -811,7 +811,7 @@ static s8 phydm_rssi_report(struct PHY_DM_STRUCT *p_dm_odm, u8 mac_id) HAL_DATA_TYPE *p_hal_data = GET_HAL_DATA(adapter); u8 h2c_parameter[H2C_0X42_LENGTH] = {0}; u8 UL_DL_STATE = 0, STBC_TX = 0, tx_bf_en = 0; - u8 cmdlen = H2C_0X42_LENGTH, first_connect = _FALSE; + u8 cmdlen = H2C_0X42_LENGTH, first_connect = false; u64 cur_tx_ok_cnt = 0, cur_rx_ok_cnt = 0; struct sta_info *p_entry = p_dm_odm->p_odm_sta_info[mac_id]; @@ -872,11 +872,11 @@ static s8 phydm_rssi_report(struct PHY_DM_STRUCT *p_dm_odm, u8 mac_id) if (p_dm_odm->noisy_decision) h2c_parameter[3] |= RAINFO_NOISY_STATE; - if ((p_entry->ra_rpt_linked == _FALSE) && (p_entry->rssi_stat.is_send_rssi == RA_RSSI_STATE_SEND)) { + if ((p_entry->ra_rpt_linked == false) && (p_entry->rssi_stat.is_send_rssi == RA_RSSI_STATE_SEND)) { h2c_parameter[3] |= RAINFO_INIT_RSSI_RATE_STATE; - p_entry->ra_rpt_linked = _TRUE; + p_entry->ra_rpt_linked = true; p_entry->rssi_stat.is_send_rssi = RA_RSSI_STATE_HOLD; - first_connect = _TRUE; + first_connect = true; } h2c_parameter[4] = (p_ra_table->RA_threshold_offset & 0x7f) | (p_ra_table->RA_offset_direction << 7); @@ -891,7 +891,7 @@ static s8 phydm_rssi_report(struct PHY_DM_STRUCT *p_dm_odm, u8 mac_id) (p_dm_odm->noisy_decision) ? "True" : "False", (first_connect) ? "True" : "False")); } - if (p_hal_data->fw_ractrl == _TRUE) { + if (p_hal_data->fw_ractrl == true) { if (p_dm_odm->support_ic_type == ODM_RTL8188E) cmdlen = 3; odm_fill_h2c_cmd(p_dm_odm, ODM_H2C_RSSI_REPORT, cmdlen, h2c_parameter); @@ -916,7 +916,7 @@ static void phydm_ra_rssi_rpt_wk_hdl(void *p_context) if (IS_STA_VALID(p_entry)) { if (IS_MCAST(p_entry->hwaddr)) /*if(psta->mac_id ==1)*/ continue; - if (p_entry->ra_rpt_linked == _FALSE) { + if (p_entry->ra_rpt_linked == false) { mac_id = i; break; } @@ -945,7 +945,7 @@ odm_rssi_monitor_check_ce( int tmp_entry_max_pwdb = 0, tmp_entry_min_pwdb = 0xff; u8 sta_cnt = 0; - if (p_dm_odm->is_linked != _TRUE) + if (p_dm_odm->is_linked != true) return; for (i = 0; i < ODM_ASSOCIATE_ENTRY_NUM; i++) { @@ -1030,9 +1030,9 @@ odm_rate_adaptive_mask_init( p_odm_ra->type = dm_type_by_driver; if (p_odm_ra->type == dm_type_by_driver) - p_dm_odm->is_use_ra_mask = _TRUE; + p_dm_odm->is_use_ra_mask = true; else - p_dm_odm->is_use_ra_mask = _FALSE; + p_dm_odm->is_use_ra_mask = false; p_odm_ra->ratr_state = DM_RATR_STA_INIT; @@ -1593,7 +1593,7 @@ odm_refresh_rate_adaptive_mask_ce( p_entry->rssi_level, ratr_state_new, p_entry->rssi_stat.undecorated_smoothed_pwdb)); p_entry->rssi_level = ratr_state_new; - rtw_hal_update_ra_mask(p_entry, p_entry->rssi_level, _FALSE); + rtw_hal_update_ra_mask(p_entry, p_entry->rssi_level, false); } else { ODM_RT_TRACE(p_dm_odm, ODM_COMP_RA_MASK, ODM_DBG_LOUD, ("Stay in RA level = (( %d ))\n\n", ratr_state_new)); /**/ @@ -1602,10 +1602,10 @@ odm_refresh_rate_adaptive_mask_ce( if (true == odm_ra_state_check(p_dm_odm, p_entry->rssi_stat.undecorated_smoothed_pwdb, false, &p_entry->rssi_level)) { ODM_RT_TRACE(p_dm_odm, ODM_COMP_RA_MASK, ODM_DBG_LOUD, ("RSSI:%d, RSSI_LEVEL:%d\n", p_entry->rssi_stat.undecorated_smoothed_pwdb, p_entry->rssi_level)); /* printk("RSSI:%d, RSSI_LEVEL:%d\n", pstat->rssi_stat.undecorated_smoothed_pwdb, pstat->rssi_level); */ - rtw_hal_update_ra_mask(p_entry, p_entry->rssi_level, _FALSE); + rtw_hal_update_ra_mask(p_entry, p_entry->rssi_level, false); } else if (p_dm_odm->is_change_state) { ODM_RT_TRACE(p_dm_odm, ODM_COMP_RA_MASK, ODM_DBG_LOUD, ("Change Power Training state, is_disable_power_training = %d\n", p_dm_odm->is_disable_power_training)); - rtw_hal_update_ra_mask(p_entry, p_entry->rssi_level, _FALSE); + rtw_hal_update_ra_mask(p_entry, p_entry->rssi_level, false); } #endif @@ -1884,7 +1884,7 @@ find_minimum_rssi( /*Determine the minimum RSSI*/ - if ((p_dm_odm->is_linked != _TRUE) && + if ((p_dm_odm->is_linked != true) && (p_hal_data->entry_min_undecorated_smoothed_pwdb == 0)) { p_hal_data->min_undecorated_pwdb_for_dm = 0; /*ODM_RT_TRACE(p_dm_odm,COMP_BB_POWERSAVING, DBG_LOUD, ("Not connected to any\n"));*/ diff --git a/hal/phydm/phydm_types.h b/hal/phydm/phydm_types.h index a8a2a22..961e148 100644 --- a/hal/phydm/phydm_types.h +++ b/hal/phydm/phydm_types.h @@ -111,10 +111,6 @@ enum rt_spinlock_type { #define ODM_ENDIAN_TYPE ODM_ENDIAN_BIG #endif - #define true _TRUE - #define false _FALSE - - #define SET_TX_DESC_ANTSEL_A_88E(__ptx_desc, __value) SET_BITS_TO_LE_4BYTE(__ptx_desc+8, 24, 1, __value) #define SET_TX_DESC_ANTSEL_B_88E(__ptx_desc, __value) SET_BITS_TO_LE_4BYTE(__ptx_desc+8, 25, 1, __value) #define SET_TX_DESC_ANTSEL_C_88E(__ptx_desc, __value) SET_BITS_TO_LE_4BYTE(__ptx_desc+28, 29, 1, __value) diff --git a/hal/rtl8188e_cmd.c b/hal/rtl8188e_cmd.c index 2807881..4a89693 100644 --- a/hal/rtl8188e_cmd.c +++ b/hal/rtl8188e_cmd.c @@ -32,7 +32,7 @@ static u8 _is_fw_read_cmd_down(_adapter *padapter, u8 msgbox_num) { - u8 read_down = _FALSE; + u8 read_down = false; int retry_cnts = 100; u8 valid; @@ -42,7 +42,7 @@ static u8 _is_fw_read_cmd_down(_adapter *padapter, u8 msgbox_num) do { valid = rtw_read8(padapter, REG_HMETFR) & BIT(msgbox_num); if (0 == valid) - read_down = _TRUE; + read_down = true; else rtw_msleep_os(1); } while ((!read_down) && (retry_cnts--)); @@ -78,7 +78,7 @@ s32 FillH2CCmd_88E(PADAPTER padapter, u8 ElementID, u32 CmdLen, u8 *pCmdBuffer) padapter = GET_PRIMARY_ADAPTER(padapter); pHalData = GET_HAL_DATA(padapter); - if (padapter->bFWReady == _FALSE) { + if (padapter->bFWReady == false) { RTW_INFO("FillH2CCmd_88E(): return H2C cmd because fw is not ready\n"); return ret; } @@ -172,7 +172,7 @@ u8 rtl8188e_set_rssi_cmd(_adapter *padapter, u8 *param) u8 res = _SUCCESS; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); - if (pHalData->fw_ractrl == _FALSE) { + if (pHalData->fw_ractrl == false) { RTW_INFO("==>%s fw dont support RA\n", __func__); return _FAIL; } @@ -189,11 +189,11 @@ u8 rtl8188e_set_raid_cmd(_adapter *padapter, u32 bitmap, u8 *arg, u8 bw) HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); struct sta_info *psta = NULL; struct macid_ctl_t *macid_ctl = &padapter->dvobj->macid_ctl; - u8 macid, init_rate, raid, shortGIrate = _FALSE; + u8 macid, init_rate, raid, shortGIrate = false; u8 H2CCommand[7] = {0}; - u8 ignore_bw = _FALSE; + u8 ignore_bw = false; - if (pHalData->fw_ractrl == _FALSE) { + if (pHalData->fw_ractrl == false) { RTW_INFO("==>%s fw dont support RA\n", __func__); return _FAIL; } @@ -219,8 +219,8 @@ u8 rtl8188e_set_raid_cmd(_adapter *padapter, u32 bitmap, u8 *arg, u8 bw) H2CCommand[2] |= BIT(3); #ifdef CONFIG_INTEL_PROXIM - if (padapter->proximity.proxim_on == _TRUE) - pHalData->bDisableTXPowerTraining = _FALSE; + if (padapter->proximity.proxim_on == true) + pHalData->bDisableTXPowerTraining = false; #endif /* DisableTXPowerTraining */ @@ -484,7 +484,7 @@ static void ConstructNullFunctionData( SetSeqNum(pwlanhdr, 0); - if (bQoS == _TRUE) { + if (bQoS == true) { struct rtw_ieee80211_hdr_3addr_qos *pwlanqoshdr; set_frame_sub_type(pframe, WIFI_QOS_DATA_NULL); @@ -575,8 +575,8 @@ void rtl8188e_set_FwJoinBssReport_cmd(PADAPTER padapter, u8 mstatus) struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct sta_info *psta = NULL; #endif - bool bSendBeacon = _FALSE; - bool bcn_valid = _FALSE; + bool bSendBeacon = false; + bool bcn_valid = false; u8 DLBcnCount = 0; u32 poll = 0; @@ -607,7 +607,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(PADAPTER padapter, u8 mstatus) if (pHalData->RegFwHwTxQCtrl & BIT6) { RTW_INFO("HalDownloadRSVDPage(): There is an Adapter is sending beacon.\n"); - bSendBeacon = _TRUE; + bSendBeacon = true; } /* Set FWHW_TXQ_CTRL 0x422[6]=0 to tell Hw the packet is not a real beacon frame. */ @@ -620,7 +620,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(PADAPTER padapter, u8 mstatus) poll = 0; do { /* download rsvd page.*/ - rtw_hal_set_fw_rsvd_page(padapter, _FALSE); + rtw_hal_set_fw_rsvd_page(padapter, false); DLBcnCount++; do { rtw_yield_os(); @@ -789,7 +789,7 @@ int reset_tsf(PADAPTER Adapter, u8 reset_port) u32 reg_bcncrtl = (HW_PORT0 == reset_port) ? REG_BCN_CTRL_1 : REG_BCN_CTRL; - rtw_mi_buddy_scan_abort(Adapter, _FALSE); /* site survey will cause reset_tsf fail */ + rtw_mi_buddy_scan_abort(Adapter, false); /* site survey will cause reset_tsf fail */ reset_cnt_after = reset_cnt_before = rtw_read8(Adapter, reg_reset_tsf_cnt); rtl8188e_reset_tsf(Adapter, reset_port); @@ -799,7 +799,7 @@ int reset_tsf(PADAPTER Adapter, u8 reset_port) reset_cnt_after = rtw_read8(Adapter, reg_reset_tsf_cnt); } - return (loop_cnt >= 10) ? _FAIL : _TRUE; + return (loop_cnt >= 10) ? _FAIL : true; } diff --git a/hal/rtl8188e_dm.c b/hal/rtl8188e_dm.c index db62987..67ec504 100644 --- a/hal/rtl8188e_dm.c +++ b/hal/rtl8188e_dm.c @@ -55,7 +55,7 @@ dm_CheckStatistics( static void dm_CheckPbcGPIO(_adapter *padapter) { u8 tmp1byte; - u8 bPbcPressed = _FALSE; + u8 bPbcPressed = false; if (!padapter->registrypriv.hw_wps_pbc) return; @@ -77,9 +77,9 @@ static void dm_CheckPbcGPIO(_adapter *padapter) return ; if (tmp1byte & HAL_8188E_HW_GPIO_WPS_BIT) - bPbcPressed = _TRUE; + bPbcPressed = true; - if (_TRUE == bPbcPressed) { + if (true == bPbcPressed) { /* Here we only set bPbcPressed to true */ /* After trigger PBC, the variable will be set to false */ RTW_INFO("CheckPbcGPIO - PBC is pressed\n"); @@ -160,7 +160,7 @@ static void Update_ODM_ComInfo_88E(PADAPTER Adapter) /* | ODM_BB_PWR_TRAIN */ ; - if (rtw_odm_adaptivity_needed(Adapter) == _TRUE) { + if (rtw_odm_adaptivity_needed(Adapter) == true) { rtw_odm_adaptivity_config_msg(RTW_DBGDUMP, Adapter); SupportAbility |= ODM_BB_ADAPTIVITY; } @@ -212,8 +212,8 @@ rtl8188e_HalDmWatchDog( PADAPTER Adapter ) { - bool bFwCurrentInPSMode = _FALSE; - bool bFwPSAwake = _TRUE; + bool bFwCurrentInPSMode = false; + bool bFwPSAwake = true; PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter); struct PHY_DM_STRUCT *pDM_Odm = &(pHalData->odmpriv); @@ -230,7 +230,7 @@ rtl8188e_HalDmWatchDog( /* Fw is under p2p powersaving mode, driver should stop dynamic mechanism. */ /* modifed by thomas. 2011.06.11. */ if (Adapter->wdinfo.p2p_ps_mode) - bFwPSAwake = _FALSE; + bFwPSAwake = false; #endif /* CONFIG_P2P_PS */ if ((rtw_is_hw_init_completed(Adapter)) @@ -243,16 +243,16 @@ rtl8188e_HalDmWatchDog( /* ODM */ if (rtw_is_hw_init_completed(Adapter)) { - u8 bLinked = _FALSE; - u8 bsta_state = _FALSE; + u8 bLinked = false; + u8 bsta_state = false; #ifdef CONFIG_DISABLE_ODM pHalData->odmpriv.support_ability = 0; #endif if (rtw_mi_check_status(Adapter, MI_ASSOC)) { - bLinked = _TRUE; + bLinked = true; if (rtw_mi_check_status(Adapter, MI_STA_LINKED)) - bsta_state = _TRUE; + bsta_state = true; } odm_cmn_info_update(&pHalData->odmpriv , ODM_CMNINFO_LINK, bLinked); diff --git a/hal/rtl8188e_hal_init.c b/hal/rtl8188e_hal_init.c index cae87fb..a77987c 100644 --- a/hal/rtl8188e_hal_init.c +++ b/hal/rtl8188e_hal_init.c @@ -38,8 +38,8 @@ static void iol_mode_enable(PADAPTER padapter, u8 enable) /* RTW_INFO("%s reg_0xf0:0x%02x, write 0x%02x\n", __func__, reg_0xf0, reg_0xf0|SW_OFFLOAD_EN); */ rtw_write8(padapter, REG_SYS_CFG, reg_0xf0 | SW_OFFLOAD_EN); - if (padapter->bFWReady == _FALSE) { - RTW_INFO("bFWReady == _FALSE call reset 8051...\n"); + if (padapter->bFWReady == false) { + RTW_INFO("bFWReady == false call reset 8051...\n"); _8051Reset88E(padapter); } @@ -660,7 +660,7 @@ static void _MCUIO_Reset88E(PADAPTER padapter, u8 bReset) { u8 u1bTmp; - if (bReset == _TRUE) { + if (bReset == true) { u1bTmp = rtw_read8(padapter, REG_RSV_CTRL); rtw_write8(padapter, REG_RSV_CTRL, (u1bTmp & (~BIT1))); /* Reset MCU IO Wrapper- sugggest by SD1-Gimmy */ @@ -680,10 +680,10 @@ void _8051Reset88E(PADAPTER padapter) { u8 u1bTmp; - _MCUIO_Reset88E(padapter, _TRUE); + _MCUIO_Reset88E(padapter, true); u1bTmp = rtw_read8(padapter, REG_SYS_FUNC_EN + 1); rtw_write8(padapter, REG_SYS_FUNC_EN + 1, u1bTmp & (~BIT2)); - _MCUIO_Reset88E(padapter, _FALSE); + _MCUIO_Reset88E(padapter, false); rtw_write8(padapter, REG_SYS_FUNC_EN + 1, u1bTmp | (BIT2)); RTW_INFO("=====> _8051Reset88E(): 8051 reset success .\n"); @@ -811,7 +811,7 @@ s32 rtl8188e_FirmwareDownload(PADAPTER padapter, bool bUsedWoWLANFw) #endif /* CONFIG_FILE_FWIMG */ #ifdef CONFIG_FILE_FWIMG - if (rtw_is_file_readable(fwfilepath) == _TRUE) { + if (rtw_is_file_readable(fwfilepath) == true) { RTW_INFO("%s accquire FW from file:%s\n", __func__, fwfilepath); pFirmware->eFWSource = FW_SOURCE_IMG_FILE; } else @@ -908,7 +908,7 @@ s32 rtl8188e_FirmwareDownload(PADAPTER padapter, bool bUsedWoWLANFw) _8051Reset88E(padapter); } - _FWDownloadEnable_8188E(padapter, _TRUE); + _FWDownloadEnable_8188E(padapter, true); fwdl_start_time = rtw_get_current_time(); while (!RTW_CANNOT_IO(padapter) && (write_fw++ < 3 || rtw_get_passing_time_ms(fwdl_start_time) < 500)) { @@ -923,7 +923,7 @@ s32 rtl8188e_FirmwareDownload(PADAPTER padapter, bool bUsedWoWLANFw) if (rtStatus == _SUCCESS) break; } - _FWDownloadEnable_8188E(padapter, _FALSE); + _FWDownloadEnable_8188E(padapter, false); if (_SUCCESS != rtStatus) goto fwdl_stat; @@ -953,7 +953,7 @@ void rtl8188e_InitializeFirmwareVars(PADAPTER padapter) struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); /* Init Fw LPS related. */ - pwrpriv->bFwCurrentInPSMode = _FALSE; + pwrpriv->bFwCurrentInPSMode = false; /* Init H2C cmd. */ rtw_write8(padapter, REG_HMETFR, 0x0f); @@ -1001,7 +1001,7 @@ hal_EfusePowerSwitch_RTL8188E( u8 tempval; u16 tmpV16; - if (PwrState == _TRUE) { + if (PwrState == true) { rtw_write8(pAdapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_ON); /* Reset: 0x0000h[28], default valid */ tmpV16 = rtw_read16(pAdapter, REG_SYS_FUNC_EN); @@ -1017,7 +1017,7 @@ hal_EfusePowerSwitch_RTL8188E( rtw_write16(pAdapter, REG_SYS_CLKR, tmpV16); } - if (bWrite == _TRUE) { + if (bWrite == true) { /* Enable LDO 2.5V before read/write action */ tempval = rtw_read8(pAdapter, EFUSE_TEST + 3); if (IS_VENDOR_8188E_I_CUT_SERIES(pAdapter)) { @@ -1032,7 +1032,7 @@ hal_EfusePowerSwitch_RTL8188E( } else { rtw_write8(pAdapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_OFF); - if (bWrite == _TRUE) { + if (bWrite == true) { /* Disable LDO 2.5V after read/write action */ tempval = rtw_read8(pAdapter, EFUSE_TEST + 3); rtw_write8(pAdapter, EFUSE_TEST + 3, (tempval & 0x7F)); @@ -1060,7 +1060,7 @@ static bool efuse_read_phymap( u8 *pos = pbuf; u16 limit = *size; u16 addr = 0; - bool reach_end = _FALSE; + bool reach_end = false; /* */ /* Refresh efuse init map as all 0xFF. */ @@ -1072,12 +1072,12 @@ static bool efuse_read_phymap( /* Read physical efuse content. */ /* */ while (addr < limit) { - ReadEFuseByte(Adapter, addr, pos, _FALSE); + ReadEFuseByte(Adapter, addr, pos, false); if (*pos != 0xFF) { pos++; addr++; } else { - reach_end = _TRUE; + reach_end = true; break; } } @@ -1282,15 +1282,15 @@ Hal_EfuseSwitchToBank( bool bPseudoTest ) { - bool bRet = _FALSE; + bool bRet = false; u32 value32 = 0; /* RTPRINT(FEEPROM, EFUSE_PG, ("Efuse switch bank to %d\n", bank)); */ if (bPseudoTest) { fakeEfuseBank = bank; - bRet = _TRUE; + bRet = true; } else - bRet = _TRUE; + bRet = true; return bRet; } @@ -1335,7 +1335,7 @@ ReadEFuseByIC( exit: #ifdef DBG_IOL_READ_EFUSE_MAP - if (_rtw_memcmp(logical_map, pHalData->efuse_eeprom_data, 0x130) == _FALSE) { + if (_rtw_memcmp(logical_map, pHalData->efuse_eeprom_data, 0x130) == false) { int i; RTW_INFO("%s compare first 0x130 byte fail\n", __func__); for (i = 0; i < 512; i++) { @@ -1623,7 +1623,7 @@ static u16 hal_EfuseGetCurrentSize_8188e(PADAPTER pAdapter, bool bPseudoTest) { - int bContinual = _TRUE; + int bContinual = true; u16 efuse_addr = 0; u8 hoffset = 0, hworden = 0; @@ -1658,7 +1658,7 @@ hal_EfuseGetCurrentSize_8188e(PADAPTER pAdapter, /* read next header */ efuse_addr = efuse_addr + (word_cnts * 2) + 1; } else - bContinual = _FALSE ; + bContinual = false ; } if (bPseudoTest) { @@ -1711,8 +1711,8 @@ hal_EfusePgPacketRead_8188e( { u8 ReadState = PG_STATE_HEADER; - int bContinual = _TRUE; - int bDataEmpty = _TRUE ; + int bContinual = true; + int bDataEmpty = true ; u8 efuse_data, word_cnts = 0; u16 efuse_addr = 0; @@ -1725,9 +1725,9 @@ hal_EfusePgPacketRead_8188e( EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAX_SECTION, (void *)&max_section, bPseudoTest); if (data == NULL) - return _FALSE; + return false; if (offset > max_section) - return _FALSE; + return false; memset((void *)data, 0xff, sizeof(u8) * PGPKT_DATA_SIZE); memset((void *)tmpdata, 0xff, sizeof(u8) * PGPKT_DATA_SIZE); @@ -1759,17 +1759,17 @@ hal_EfusePgPacketRead_8188e( hworden = efuse_data & 0x0F; } word_cnts = Efuse_CalculateWordCnts(hworden); - bDataEmpty = _TRUE ; + bDataEmpty = true ; if (hoffset == offset) { for (tmpidx = 0; tmpidx < word_cnts * 2 ; tmpidx++) { if (efuse_OneByteRead(pAdapter, efuse_addr + 1 + tmpidx , &efuse_data, bPseudoTest)) { tmpdata[tmpidx] = efuse_data; if (efuse_data != 0xff) - bDataEmpty = _FALSE; + bDataEmpty = false; } } - if (bDataEmpty == _FALSE) + if (bDataEmpty == false) ReadState = PG_STATE_DATA; else { /* read next header */ efuse_addr = efuse_addr + (word_cnts * 2) + 1; @@ -1781,7 +1781,7 @@ hal_EfusePgPacketRead_8188e( } } else - bContinual = _FALSE ; + bContinual = false ; } /* ------- Data section Read ------------- */ else if (ReadState & PG_STATE_DATA) { @@ -1794,9 +1794,9 @@ hal_EfusePgPacketRead_8188e( if ((data[0] == 0xff) && (data[1] == 0xff) && (data[2] == 0xff) && (data[3] == 0xff) && (data[4] == 0xff) && (data[5] == 0xff) && (data[6] == 0xff) && (data[7] == 0xff)) - return _FALSE; + return false; else - return _TRUE; + return true; } @@ -1866,7 +1866,7 @@ hal_EfuseFixHeaderProcess( PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pFixPkt->offset, badworden, originaldata, bPseudoTest); if (!PgWriteSuccess) - return _FALSE; + return false; else efuse_addr = Efuse_GetCurrentSize(pAdapter, efuseType, bPseudoTest); } else @@ -1874,7 +1874,7 @@ hal_EfuseFixHeaderProcess( } else efuse_addr = efuse_addr + (pFixPkt->word_cnts * 2) + 1; *pAddr = efuse_addr; - return _TRUE; + return true; } static bool @@ -1885,7 +1885,7 @@ hal_EfusePgPacketWrite2ByteHeader( PPGPKT_STRUCT pTargetPkt, bool bPseudoTest) { - bool bRet = _FALSE, bContinual = _TRUE; + bool bRet = false, bContinual = true; u16 efuse_addr = *pAddr, efuse_max_available_len = 0; u8 pg_header = 0, tmp_header = 0, pg_header_temp = 0; u8 repeatcnt = 0; @@ -1903,7 +1903,7 @@ hal_EfusePgPacketWrite2ByteHeader( while (tmp_header == 0xFF || pg_header != tmp_header) { if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) { /* RTPRINT(FEEPROM, EFUSE_PG, ("Repeat over limit for pg_header!!\n")); */ - return _FALSE; + return false; } efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest); @@ -1923,7 +1923,7 @@ hal_EfusePgPacketWrite2ByteHeader( while (tmp_header == 0xFF || pg_header != tmp_header) { if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) { /* RTPRINT(FEEPROM, EFUSE_PG, ("Repeat over limit for ext_header!!\n")); */ - return _FALSE; + return false; } efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest); @@ -1933,7 +1933,7 @@ hal_EfusePgPacketWrite2ByteHeader( if ((tmp_header & 0x0F) == 0x0F) { /* word_en PG fail */ if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) { /* RTPRINT(FEEPROM, EFUSE_PG, ("Repeat over limit for word_en!!\n")); */ - return _FALSE; + return false; } else { efuse_addr++; continue; @@ -1945,9 +1945,9 @@ hal_EfusePgPacketWrite2ByteHeader( fixPkt.word_en = tmp_header & 0x0F; fixPkt.word_cnts = Efuse_CalculateWordCnts(fixPkt.word_en); if (!hal_EfuseFixHeaderProcess(pAdapter, efuseType, &fixPkt, &efuse_addr, bPseudoTest)) - return _FALSE; + return false; } else { - bRet = _TRUE; + bRet = true; break; } } else if ((tmp_header & 0x1F) == 0x0F) { /* wrong extended header */ @@ -1968,7 +1968,7 @@ hal_EfusePgPacketWrite1ByteHeader( PPGPKT_STRUCT pTargetPkt, bool bPseudoTest) { - bool bRet = _FALSE; + bool bRet = false; u8 pg_header = 0, tmp_header = 0; u16 efuse_addr = *pAddr; u8 repeatcnt = 0; @@ -1985,13 +1985,13 @@ hal_EfusePgPacketWrite1ByteHeader( while (tmp_header == 0xFF || pg_header != tmp_header) { if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) - return _FALSE; + return false; efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest); efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header, bPseudoTest); } if (pg_header == tmp_header) - bRet = _TRUE; + bRet = true; else { PGPKT_STRUCT fixPkt; /* RTPRINT(FEEPROM, EFUSE_PG, ("Error condition for fixed PG packet, need to cover the existed data\n")); */ @@ -1999,7 +1999,7 @@ hal_EfusePgPacketWrite1ByteHeader( fixPkt.word_en = tmp_header & 0x0F; fixPkt.word_cnts = Efuse_CalculateWordCnts(fixPkt.word_en); if (!hal_EfuseFixHeaderProcess(pAdapter, efuseType, &fixPkt, &efuse_addr, bPseudoTest)) - return _FALSE; + return false; } *pAddr = efuse_addr; @@ -2014,7 +2014,7 @@ hal_EfusePgPacketWriteData( PPGPKT_STRUCT pTargetPkt, bool bPseudoTest) { - bool bRet = _FALSE; + bool bRet = false; u16 efuse_addr = *pAddr; u8 badworden = 0; u32 PgWriteSuccess = 0; @@ -2024,7 +2024,7 @@ hal_EfusePgPacketWriteData( if (badworden == 0x0F) { /* write ok */ /* RTPRINT(FEEPROM, EFUSE_PG, ("hal_EfusePgPacketWriteData ok!!\n")); */ - return _TRUE; + return true; } else { /* RTPRINT(FEEPROM, EFUSE_PG, ("hal_EfusePgPacketWriteData Fail!!\n")); */ /* reorganize other pg packet */ @@ -2032,9 +2032,9 @@ hal_EfusePgPacketWriteData( PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data, bPseudoTest); if (!PgWriteSuccess) - return _FALSE; + return false; else - return _TRUE; + return true; } return bRet; @@ -2048,7 +2048,7 @@ hal_EfusePgPacketWriteHeader( PPGPKT_STRUCT pTargetPkt, bool bPseudoTest) { - bool bRet = _FALSE; + bool bRet = false; if (pTargetPkt->offset >= EFUSE_MAX_SECTION_BASE) bRet = hal_EfusePgPacketWrite2ByteHeader(pAdapter, efuseType, pAddr, pTargetPkt, bPseudoTest); @@ -2089,9 +2089,9 @@ wordEnMatched( *pWden = match_word_en; if (match_word_en != 0xf) - return _TRUE; + return true; else - return _FALSE; + return false; } static bool @@ -2102,12 +2102,12 @@ hal_EfuseCheckIfDatafollowed( bool bPseudoTest ) { - bool bRet = _FALSE; + bool bRet = false; u8 i, efuse_data; for (i = 0; i < (word_cnts * 2) ; i++) { if (efuse_OneByteRead(pAdapter, (startAddr + i) , &efuse_data, bPseudoTest) && (efuse_data != 0xFF)) - bRet = _TRUE; + bRet = true; } return bRet; @@ -2122,7 +2122,7 @@ hal_EfusePartialWriteCheck( bool bPseudoTest ) { - bool bRet = _FALSE; + bool bRet = false; u8 i, efuse_data = 0, cur_header = 0; u8 new_wden = 0, matched_wden = 0, badworden = 0; u16 startAddr = 0, efuse_max_available_len = 0, efuse_max = 0; @@ -2148,7 +2148,7 @@ hal_EfusePartialWriteCheck( while (1) { if (startAddr >= efuse_max_available_len) { - bRet = _FALSE; + bRet = false; break; } @@ -2159,7 +2159,7 @@ hal_EfusePartialWriteCheck( efuse_OneByteRead(pAdapter, startAddr, &efuse_data, bPseudoTest); if (ALL_WORDS_DISABLED(efuse_data)) { /* RTPRINT(FEEPROM, EFUSE_PG, ("Error condition, all words disabled")); */ - bRet = _FALSE; + bRet = false; break; } else { curPkt.offset = ((cur_header & 0xE0) >> 5) | ((efuse_data & 0xF0) >> 1); @@ -2187,7 +2187,7 @@ hal_EfusePartialWriteCheck( PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data, bPseudoTest); if (!PgWriteSuccess) { - bRet = _FALSE; /* write fail, return */ + bRet = false; /* write fail, return */ break; } } @@ -2205,7 +2205,7 @@ hal_EfusePartialWriteCheck( /* not used header, 0xff */ *pAddr = startAddr; /* RTPRINT(FEEPROM, EFUSE_PG, ("Started from unused header offset=%d\n", startAddr)); */ - bRet = _TRUE; + bRet = true; break; } } @@ -2222,16 +2222,16 @@ hal_EfusePgCheckAvailableAddr( u16 efuse_max_available_len = 0; /* Change to check TYPE_EFUSE_MAP_LEN ,beacuse 8188E raw 256,logic map over 256. */ - EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&efuse_max_available_len, _FALSE); + EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&efuse_max_available_len, false); /* EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&efuse_max_available_len, bPseudoTest); */ /* RTPRINT(FEEPROM, EFUSE_PG, ("efuse_max_available_len = %d\n", efuse_max_available_len)); */ if (Efuse_GetCurrentSize(pAdapter, efuseType, bPseudoTest) >= efuse_max_available_len) { /* RTPRINT(FEEPROM, EFUSE_PG, ("hal_EfusePgCheckAvailableAddr error!!\n")); */ - return _FALSE; + return false; } - return _TRUE; + return true; } static void @@ -2266,20 +2266,20 @@ hal_EfusePgPacketWrite_BT( u8 efuseType = EFUSE_BT; if (!hal_EfusePgCheckAvailableAddr(pAdapter, efuseType, bPseudoTest)) - return _FALSE; + return false; hal_EfuseConstructPGPkt(offset, word_en, pData, &targetPkt); if (!hal_EfusePartialWriteCheck(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest)) - return _FALSE; + return false; if (!hal_EfusePgPacketWriteHeader(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest)) - return _FALSE; + return false; if (!hal_EfusePgPacketWriteData(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest)) - return _FALSE; + return false; - return _TRUE; + return true; } static bool @@ -2296,20 +2296,20 @@ hal_EfusePgPacketWrite_8188e( u8 efuseType = EFUSE_WIFI; if (!hal_EfusePgCheckAvailableAddr(pAdapter, efuseType, bPseudoTest)) - return _FALSE; + return false; hal_EfuseConstructPGPkt(offset, word_en, pData, &targetPkt); if (!hal_EfusePartialWriteCheck(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest)) - return _FALSE; + return false; if (!hal_EfusePgPacketWriteHeader(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest)) - return _FALSE; + return false; if (!hal_EfusePgPacketWriteData(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest)) - return _FALSE; + return false; - return _TRUE; + return true; } @@ -2405,7 +2405,7 @@ static void update_ra_mask_8188e(_adapter *padapter, struct sta_info *psta, stru { HAL_DATA_TYPE *hal_data = GET_HAL_DATA(padapter); - if (hal_data->fw_ractrl == _TRUE) { + if (hal_data->fw_ractrl == true) { u8 arg[4] = {0}; arg[0] = h2c_macid_cfg->mac_id;/* MACID */ @@ -2461,7 +2461,7 @@ bool rtl8188e_gpio_radio_on_off_check(_adapter *adapter, u8 *valid) bool ret; *valid = 0; - return _FALSE; /* unblock */ + return false; /* unblock */ } #endif @@ -2653,7 +2653,7 @@ Hal_InitPGData88E(PADAPTER padapter) u32 i; u16 value16; - if (_FALSE == pHalData->bautoload_fail_flag) { + if (false == pHalData->bautoload_fail_flag) { /* autoload OK. */ if (is_boot_from_eeprom(padapter)) { /* Read all Content from EEPROM or EFUSE. */ @@ -2663,18 +2663,18 @@ Hal_InitPGData88E(PADAPTER padapter) } } else { /* Read EFUSE real map to shadow. */ - EFUSE_ShadowMapUpdate(padapter, EFUSE_WIFI, _FALSE); + EFUSE_ShadowMapUpdate(padapter, EFUSE_WIFI, false); } } else { /* autoload fail */ - /* pHalData->AutoloadFailFlag = _TRUE; */ + /* pHalData->AutoloadFailFlag = true; */ /* update to default value 0xFF */ if (!is_boot_from_eeprom(padapter)) - EFUSE_ShadowMapUpdate(padapter, EFUSE_WIFI, _FALSE); + EFUSE_ShadowMapUpdate(padapter, EFUSE_WIFI, false); } #ifdef CONFIG_EFUSE_CONFIG_FILE - if (check_phy_efuse_tx_power_info_valid(padapter) == _FALSE) { + if (check_phy_efuse_tx_power_info_valid(padapter) == false) { if (Hal_readPGDataFromConfigFile(padapter) != _SUCCESS) RTW_ERR("invalid phy efuse and read from file fail, will use driver default!!\n"); } @@ -2695,9 +2695,9 @@ Hal_EfuseParseIDCode88E( EEPROMId = le16_to_cpu(*((__le16 *)hwinfo)); if (EEPROMId != RTL_EEPROM_ID) { RTW_INFO("EEPROM ID(%#x) is invalid!!\n", EEPROMId); - pHalData->bautoload_fail_flag = _TRUE; + pHalData->bautoload_fail_flag = true; } else - pHalData->bautoload_fail_flag = _FALSE; + pHalData->bautoload_fail_flag = false; RTW_INFO("EEPROM ID=0x%04x\n", EEPROMId); } @@ -2713,8 +2713,8 @@ void Hal_ReadPowerSavingMode88E( u8 tmpvalue; if (AutoLoadFail) { - pwrctl->bHWPowerdown = _FALSE; - pwrctl->bSupportRemoteWakeup = _FALSE; + pwrctl->bHWPowerdown = false; + pwrctl->bSupportRemoteWakeup = false; } else { /* hw power down mode selection , 0:rf-off / 1:power down */ @@ -2726,7 +2726,7 @@ void Hal_ReadPowerSavingMode88E( /* decide hw if support remote wakeup function */ /* if hw supported, 8051 (SIE) will generate WeakUP signal( D+/D- toggle) when autoresume */ - pwrctl->bSupportRemoteWakeup = (hwinfo[EEPROM_USB_OPTIONAL_FUNCTION0] & BIT1) ? _TRUE : _FALSE; + pwrctl->bSupportRemoteWakeup = (hwinfo[EEPROM_USB_OPTIONAL_FUNCTION0] & BIT1) ? true : false; RTW_INFO("%s...bHWPwrPindetect(%x)-bHWPowerdown(%x) ,bSupportRemoteWakeup(%x)\n", __func__, pwrctl->bHWPwrPindetect, pwrctl->bHWPowerdown, pwrctl->bSupportRemoteWakeup); @@ -3057,7 +3057,7 @@ Hal_ReadThermalMeter_88E( /* pHalData->eeprom_thermal_meter = (tempval&0x1f); */ /* [4:0] */ if (pHalData->eeprom_thermal_meter == 0xff || AutoloadFail) { - pHalData->odmpriv.rf_calibrate_info.is_apk_thermal_meter_ignore = _TRUE; + pHalData->odmpriv.rf_calibrate_info.is_apk_thermal_meter_ignore = true; pHalData->eeprom_thermal_meter = EEPROM_Default_ThermalMeter_88E; } @@ -3083,7 +3083,7 @@ void Hal_ReadRFGainOffset( if ((pHalData->EEPROMRFGainOffset != 0xFF) && (pHalData->EEPROMRFGainOffset & BIT4)) - efuse_OneByteRead(Adapter, EEPROM_RF_GAIN_VAL, &pHalData->EEPROMRFGainVal, _FALSE); + efuse_OneByteRead(Adapter, EEPROM_RF_GAIN_VAL, &pHalData->EEPROMRFGainVal, false); else { pHalData->EEPROMRFGainOffset = 0; pHalData->EEPROMRFGainVal = 0; @@ -3091,7 +3091,7 @@ void Hal_ReadRFGainOffset( RTW_INFO("pHalData->EEPROMRFGainVal=%x\n", pHalData->EEPROMRFGainVal); } else { - efuse_OneByteRead(Adapter, EEPROM_RF_GAIN_VAL, &pHalData->EEPROMRFGainVal, _FALSE); + efuse_OneByteRead(Adapter, EEPROM_RF_GAIN_VAL, &pHalData->EEPROMRFGainVal, false); if (pHalData->EEPROMRFGainVal != 0xFF) pHalData->EEPROMRFGainOffset = BIT4; @@ -3101,7 +3101,7 @@ void Hal_ReadRFGainOffset( } if (Adapter->registrypriv.RegPwrTrimEnable == 1) { - efuse_OneByteRead(Adapter, EEPROM_RF_GAIN_VAL, &pHalData->EEPROMRFGainVal, _FALSE); + efuse_OneByteRead(Adapter, EEPROM_RF_GAIN_VAL, &pHalData->EEPROMRFGainVal, false); RTW_INFO("pHalData->EEPROMRFGainVal=%x\n", pHalData->EEPROMRFGainVal); } @@ -3110,7 +3110,7 @@ void Hal_ReadRFGainOffset( /* */ if (((pHalData->EEPROMRFGainOffset != 0xFF) && (pHalData->EEPROMRFGainOffset & BIT4)) || (Adapter->registrypriv.RegPwrTrimEnable == 1)) { - efuse_OneByteRead(Adapter, EEPROM_THERMAL_OFFSET, &thermal_offset, _FALSE); + efuse_OneByteRead(Adapter, EEPROM_THERMAL_OFFSET, &thermal_offset, false); if (thermal_offset != 0xFF) { if (thermal_offset & BIT0) pHalData->eeprom_thermal_meter += ((thermal_offset >> 1) & 0x0F); @@ -3138,9 +3138,9 @@ bool HalDetectPwrDownMode88E(PADAPTER Adapter) /* 2010/08/25 MH INF priority > PDN Efuse value. */ if (tmpvalue & BIT(4) && pwrctrlpriv->reg_pdnmode) - pHalData->pwrdown = _TRUE; + pHalData->pwrdown = true; else - pHalData->pwrdown = _FALSE; + pHalData->pwrdown = false; RTW_INFO("HalDetectPwrDownMode(): PDN=%d\n", pHalData->pwrdown); @@ -3150,7 +3150,7 @@ bool HalDetectPwrDownMode88E(PADAPTER Adapter) #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN) void Hal_DetectWoWMode(PADAPTER pAdapter) { - adapter_to_pwrctl(pAdapter)->bSupportRemoteWakeup = _TRUE; + adapter_to_pwrctl(pAdapter)->bSupportRemoteWakeup = true; } #endif @@ -3220,21 +3220,21 @@ static void hw_var_set_opmode(PADAPTER Adapter, u8 variable, u8 *val) { u8 val8; u8 mode = *((u8 *)val); - static u8 isMonitor = _FALSE; + static u8 isMonitor = false; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); - if (isMonitor == _TRUE) { + if (isMonitor == true) { /* reset RCR */ rtw_write32(Adapter, REG_RCR, pHalData->ReceiveConfig); - isMonitor = _FALSE; + isMonitor = false; } RTW_INFO(ADPT_FMT "- Port-%d set opmode = %d\n", ADPT_ARG(Adapter), get_hw_port(Adapter), mode); if (mode == _HW_STATE_MONITOR_) { - isMonitor = _TRUE; + isMonitor = true; /* set net_type */ Set_MSR(Adapter, _HW_STATE_NOLINK_); @@ -3258,12 +3258,12 @@ static void hw_var_set_opmode(PADAPTER Adapter, u8 variable, u8 *val) #ifdef CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT rtw_write8(Adapter, REG_DRVERLYINT, 0x05);/* restore early int time to 5ms */ - UpdateInterruptMask8188EU(Adapter, _TRUE, 0, IMR_BCNDMAINT0_88E); + UpdateInterruptMask8188EU(Adapter, true, 0, IMR_BCNDMAINT0_88E); #endif /* CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT */ #ifdef CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR - UpdateInterruptMask8188EU(Adapter, _TRUE , 0, (IMR_TBDER_88E | IMR_TBDOK_88E)); + UpdateInterruptMask8188EU(Adapter, true , 0, (IMR_TBDER_88E | IMR_TBDOK_88E)); #endif/* CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR */ #endif /* CONFIG_INTERRUPT_BASED_TXBCN */ @@ -3284,11 +3284,11 @@ static void hw_var_set_opmode(PADAPTER Adapter, u8 variable, u8 *val) } else if (mode == _HW_STATE_AP_) { #ifdef CONFIG_INTERRUPT_BASED_TXBCN #ifdef CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT - UpdateInterruptMask8188EU(Adapter, _TRUE , IMR_BCNDMAINT0_88E, 0); + UpdateInterruptMask8188EU(Adapter, true , IMR_BCNDMAINT0_88E, 0); #endif/* CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT */ #ifdef CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR - UpdateInterruptMask8188EU(Adapter, _TRUE , (IMR_TBDER_88E | IMR_TBDOK_88E), 0); + UpdateInterruptMask8188EU(Adapter, true , (IMR_TBDER_88E | IMR_TBDOK_88E), 0); #endif/* CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR */ #endif /* CONFIG_INTERRUPT_BASED_TXBCN */ @@ -3355,7 +3355,7 @@ static void hw_var_set_opmode(PADAPTER Adapter, u8 variable, u8 *val) #ifdef CONFIG_TSF_RESET_OFFLOAD /* Reset TSF for STA+AP concurrent mode */ if (rtw_mi_buddy_check_fwstate(Adapter, (WIFI_STATION_STATE | WIFI_ASOC_STATE))) { - if (reset_tsf(Adapter, HW_PORT1) == _FALSE) + if (reset_tsf(Adapter, HW_PORT1) == false) RTW_INFO("ERROR! %s()-%d: Reset port1 TSF fail\n", __func__, __LINE__); } @@ -3381,11 +3381,11 @@ static void hw_var_set_opmode(PADAPTER Adapter, u8 variable, u8 *val) #ifdef CONFIG_INTERRUPT_BASED_TXBCN #ifdef CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT rtw_write8(Adapter, REG_DRVERLYINT, 0x05);/* restore early int time to 5ms */ - UpdateInterruptMask8188EU(Adapter, _TRUE, 0, IMR_BCNDMAINT0_88E); + UpdateInterruptMask8188EU(Adapter, true, 0, IMR_BCNDMAINT0_88E); #endif/* CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT */ #ifdef CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR - UpdateInterruptMask8188EU(Adapter, _TRUE , 0, (IMR_TBDER_88E | IMR_TBDOK_88E)); + UpdateInterruptMask8188EU(Adapter, true , 0, (IMR_TBDER_88E | IMR_TBDOK_88E)); #endif /* CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR */ #endif /* CONFIG_INTERRUPT_BASED_TXBCN */ @@ -3405,11 +3405,11 @@ static void hw_var_set_opmode(PADAPTER Adapter, u8 variable, u8 *val) } else if (mode == _HW_STATE_AP_) { #ifdef CONFIG_INTERRUPT_BASED_TXBCN #ifdef CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT - UpdateInterruptMask8188EU(Adapter, _TRUE , IMR_BCNDMAINT0_88E, 0); + UpdateInterruptMask8188EU(Adapter, true , IMR_BCNDMAINT0_88E, 0); #endif/* CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT */ #ifdef CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR - UpdateInterruptMask8188EU(Adapter, _TRUE , (IMR_TBDER_88E | IMR_TBDOK_88E), 0); + UpdateInterruptMask8188EU(Adapter, true , (IMR_TBDER_88E | IMR_TBDOK_88E), 0); #endif/* CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR */ #endif /* CONFIG_INTERRUPT_BASED_TXBCN */ @@ -3476,7 +3476,7 @@ static void hw_var_set_opmode(PADAPTER Adapter, u8 variable, u8 *val) #ifdef CONFIG_TSF_RESET_OFFLOAD /* Reset TSF for STA+AP concurrent mode */ if (rtw_mi_buddy_check_fwstate(Adapter, (WIFI_STATION_STATE | WIFI_ASOC_STATE))) { - if (reset_tsf(Adapter, HW_PORT0) == _FALSE) + if (reset_tsf(Adapter, HW_PORT0) == false) RTW_INFO("ERROR! %s()-%d: Reset port0 TSF fail\n", __func__, __LINE__); } @@ -3542,12 +3542,12 @@ static void hw_var_set_correct_tsf(PADAPTER Adapter, u8 variable, u8 *val) if (iface == Adapter) continue; - if (check_fwstate(&iface->mlmepriv, WIFI_AP_STATE) == _TRUE - && check_fwstate(&iface->mlmepriv, WIFI_ASOC_STATE) == _TRUE + if (check_fwstate(&iface->mlmepriv, WIFI_AP_STATE) == true + && check_fwstate(&iface->mlmepriv, WIFI_ASOC_STATE) == true ) { rtw_hal_correct_tsf(iface, iface->hw_port, tsf); #ifdef CONFIG_TSF_RESET_OFFLOAD - if (reset_tsf(iface, iface->hw_port) == _FALSE) + if (reset_tsf(iface, iface->hw_port) == false) RTW_INFO("%s-[ERROR] "ADPT_FMT" Reset port%d TSF fail\n", __func__, ADPT_ARG(iface), iface->hw_port); #endif /* CONFIG_TSF_RESET_OFFLOAD*/ } @@ -3568,7 +3568,7 @@ static void hw_var_set_mlme_disconnect(PADAPTER Adapter, u8 variable, u8 *val) rtw_write32(Adapter, REG_RCR, rtw_read32(padapter, REG_RCR) & ~RCR_ADF); reject all data frames */ #ifdef CONFIG_CONCURRENT_MODE - if (rtw_mi_check_status(Adapter, MI_LINKED) == _FALSE) + if (rtw_mi_check_status(Adapter, MI_LINKED) == false) #endif rtw_write16(Adapter, REG_RXFLTMAP2, 0x00); @@ -3630,7 +3630,7 @@ static void hw_var_set_mlme_sitesurvey(PADAPTER Adapter, u8 variable, u8 *val) #ifdef CONFIG_TDLS /* TDLS will clear RCR_CBSSID_DATA bit for connection.*/ - else if (Adapter->tdlsinfo.link_established == _TRUE) + else if (Adapter->tdlsinfo.link_established == true) rcr_clear_bit = RCR_CBSSID_BCN; #endif /*CONFIG_TDLS*/ @@ -3656,13 +3656,13 @@ static void hw_var_set_mlme_sitesurvey(PADAPTER Adapter, u8 variable, u8 *val) continue; if (rtw_linked_check(iface) && - check_fwstate(&(iface->mlmepriv), WIFI_AP_STATE) != _TRUE) { + check_fwstate(&(iface->mlmepriv), WIFI_AP_STATE) != true) { if (iface->hw_port == HW_PORT1) rtw_write8(iface, REG_BCN_CTRL_1, rtw_read8(iface, REG_BCN_CTRL_1) | DIS_TSF_UDT); else rtw_write8(iface, REG_BCN_CTRL, rtw_read8(iface, REG_BCN_CTRL) | DIS_TSF_UDT); - iface->mlmeextpriv.en_hw_update_tsf = _FALSE; + iface->mlmeextpriv.en_hw_update_tsf = false; } } @@ -3708,14 +3708,14 @@ static void hw_var_set_mlme_sitesurvey(PADAPTER Adapter, u8 variable, u8 *val) if (!iface) continue; if (rtw_linked_check(iface) && - check_fwstate(&(iface->mlmepriv), WIFI_AP_STATE) != _TRUE) { + check_fwstate(&(iface->mlmepriv), WIFI_AP_STATE) != true) { /* enable HW TSF update when recive beacon*/ /*if (iface->hw_port == HW_PORT1) rtw_write8(iface, REG_BCN_CTRL_1, rtw_read8(iface, REG_BCN_CTRL_1)&(~(DIS_TSF_UDT))); else rtw_write8(iface, REG_BCN_CTRL, rtw_read8(iface, REG_BCN_CTRL)&(~(DIS_TSF_UDT))); */ - iface->mlmeextpriv.en_hw_update_tsf = _TRUE; + iface->mlmeextpriv.en_hw_update_tsf = true; } } #endif @@ -3759,12 +3759,12 @@ static void hw_var_set_mlme_join(PADAPTER Adapter, u8 variable, u8 *val) else rtw_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR) | RCR_CBSSID_DATA | RCR_CBSSID_BCN); #endif - if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE) + if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) RetryLimit = (pHalData->CustomerID == RT_CID_CCX) ? 7 : 48; else /* Ad-hoc Mode */ RetryLimit = 0x7; } else if (type == 1) { /* joinbss_event call back when join res < 0 */ - if (rtw_mi_check_status(Adapter, MI_LINKED) == _FALSE) + if (rtw_mi_check_status(Adapter, MI_LINKED) == false) rtw_write16(Adapter, REG_RXFLTMAP2, 0x00); if (rtw_mi_check_status(Adapter, MI_AP_MODE)) { @@ -3906,7 +3906,7 @@ void SetHwReg8188E(_adapter *adapter, u8 variable, u8 *val) } else rtw_write32(adapter, REG_RCR, rtw_read32(adapter, REG_RCR) | RCR_CBSSID_DATA | RCR_CBSSID_BCN); - if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE) + if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) RetryLimit = (pHalData->CustomerID == RT_CID_CCX) ? 7 : 48; else /* Ad-hoc Mode */ RetryLimit = 0x7; @@ -4072,7 +4072,7 @@ void SetHwReg8188E(_adapter *adapter, u8 variable, u8 *val) /* Forece leave RF low power mode for 1T1R to prevent conficting setting in Fw power */ /* saving sequence. 2010.06.07. Added by tynli. Suggested by SD3 yschang. */ if (psmode != PS_MODE_ACTIVE) - odm_rf_saving(podmpriv, _TRUE); + odm_rf_saving(podmpriv, true); rtl8188e_set_FwPwrMode_cmd(adapter, psmode); } break; @@ -4130,7 +4130,7 @@ void SetHwReg8188E(_adapter *adapter, u8 variable, u8 *val) /* keep sn */ adapter->xmitpriv.nqos_ssn = rtw_read16(adapter, REG_NQOS_SEQ); - if (pwrpriv->bkeepfwalive != _TRUE) { + if (pwrpriv->bkeepfwalive != true) { /* RX DMA stop */ rtw_write32(adapter, REG_RXPKT_NUM, (rtw_read32(adapter, REG_RXPKT_NUM) | RW_RELEASE_EN)); do { @@ -4451,22 +4451,22 @@ void GetHwReg8188E(_adapter *adapter, u8 variable, u8 *val) break; case HW_VAR_BCN_VALID: /* BCN_VALID, BIT16 of REG_TDECTRL = BIT0 of REG_TDECTRL+2 */ - val[0] = (BIT0 & rtw_read8(adapter, REG_TDECTRL + 2)) ? _TRUE : _FALSE; + val[0] = (BIT0 & rtw_read8(adapter, REG_TDECTRL + 2)) ? true : false; break; case HW_VAR_FWLPS_RF_ON: { /* When we halt NIC, we should check if FW LPS is leave. */ if (adapter_to_pwrctl(adapter)->rf_pwrstate == rf_off) { /* If it is in HW/SW Radio OFF or IPS state, we do not check Fw LPS Leave, */ /* because Fw is unload. */ - val[0] = _TRUE; + val[0] = true; } else { u32 valRCR; valRCR = rtw_read32(adapter, REG_RCR); valRCR &= 0x00070000; if (valRCR) - val[0] = _FALSE; + val[0] = false; else - val[0] = _TRUE; + val[0] = true; } } break; @@ -4474,7 +4474,7 @@ void GetHwReg8188E(_adapter *adapter, u8 variable, u8 *val) *((u16 *)(val)) = pHalData->EfuseUsedBytes; break; case HW_VAR_CHK_HI_QUEUE_EMPTY: - *val = ((rtw_read32(adapter, REG_HGQ_INFO) & 0x0000ff00) == 0) ? _TRUE : _FALSE; + *val = ((rtw_read32(adapter, REG_HGQ_INFO) & 0x0000ff00) == 0) ? true : false; break; case HW_VAR_DUMP_MAC_QUEUE_INFO: dump_mac_qinfo_88e(val, adapter); @@ -4490,7 +4490,7 @@ static void hal_ra_info_dump(_adapter *padapter , void *sel) { int i; u8 mac_id; - u8 bLinked = _FALSE; + u8 bLinked = false; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); struct macid_ctl_t *macid_ctl = dvobj_to_macidctl(dvobj); @@ -4500,7 +4500,7 @@ static void hal_ra_info_dump(_adapter *padapter , void *sel) iface = dvobj->padapters[i]; if ((iface) && rtw_is_adapter_up(iface)) { if (rtw_linked_check(iface)) { - bLinked = _TRUE; + bLinked = true; break; } } @@ -4514,7 +4514,7 @@ static void hal_ra_info_dump(_adapter *padapter , void *sel) if (bLinked) { _RTW_PRINT_SEL(sel , "============ RA status - Mac_id:%d ===================\n", mac_id); - if (pHalData->fw_ractrl == _FALSE) { + if (pHalData->fw_ractrl == false) { #if (RATE_ADAPTIVE_SUPPORT == 1) _RTW_PRINT_SEL(sel , "Mac_id:%d ,RSSI:%d(%%)\n", mac_id, pHalData->odmpriv.ra_info[mac_id].rssi_sta_ra); @@ -4528,7 +4528,7 @@ static void hal_ra_info_dump(_adapter *padapter , void *sel) #endif /* (RATE_ADAPTIVE_SUPPORT == 1)*/ } else { u8 cur_rate = rtw_read8(padapter, REG_ADAPTIVE_DATA_RATE_0 + mac_id); - u8 sgi = (cur_rate & BIT7) ? _TRUE : _FALSE; + u8 sgi = (cur_rate & BIT7) ? true : false; cur_rate &= 0x7f; @@ -4552,7 +4552,7 @@ GetHalDefVar8188E( switch (eVariable) { case HAL_DEF_IS_SUPPORT_ANT_DIV: #ifdef CONFIG_ANTENNA_DIVERSITY - *((u8 *)pValue) = (pHalData->AntDivCfg == 0) ? _FALSE : _TRUE; + *((u8 *)pValue) = (pHalData->AntDivCfg == 0) ? false : true; #endif break; case HAL_DEF_DRVINFO_SZ: @@ -4589,7 +4589,7 @@ GetHalDefVar8188E( break; case HAL_DEF_EXPLICIT_BEAMFORMEE: case HAL_DEF_EXPLICIT_BEAMFORMER: - *((u8 *)pValue) = _FALSE; + *((u8 *)pValue) = false; break; case HW_DEF_RA_INFO_DUMP: @@ -4606,7 +4606,7 @@ GetHalDefVar8188E( *(u8 *)pValue = WMM_NORMAL_TX_PAGE_BOUNDARY_88E(Adapter); break; case HAL_DEF_MACID_SLEEP: - *(u8 *)pValue = _TRUE; /* support macid sleep */ + *(u8 *)pValue = true; /* support macid sleep */ break; case HAL_DEF_RX_DMA_SZ_WOW: *(u32 *)pValue = RX_DMA_SIZE_88E(Adapter) - RESV_FMWF; diff --git a/hal/rtl8188e_phycfg.c b/hal/rtl8188e_phycfg.c index 930cc95..6054f45 100644 --- a/hal/rtl8188e_phycfg.c +++ b/hal/rtl8188e_phycfg.c @@ -54,18 +54,18 @@ sic_IsSICReady( PADAPTER Adapter ) { - bool bRet = _FALSE; + bool bRet = false; u32 retryCnt = 0; u8 sic_cmd = 0xff; while (1) { if (retryCnt++ >= SIC_MAX_POLL_CNT) { - /* RTPRINT(FPHY, (PHY_SICR|PHY_SICW), ("[SIC], sic_IsSICReady() return FALSE\n")); */ - return _FALSE; + /* RTPRINT(FPHY, (PHY_SICR|PHY_SICW), ("[SIC], sic_IsSICReady() return false\n")); */ + return false; } /* if(RT_SDIO_CANNOT_IO(Adapter)) */ - /* return _FALSE; */ + /* return false; */ sic_cmd = rtw_read8(Adapter, SIC_CMD_REG); /* sic_cmd = PlatformEFIORead1Byte(Adapter, SIC_CMD_REG); */ @@ -74,7 +74,7 @@ sic_IsSICReady( #endif /* RTPRINT(FPHY, (PHY_SICR|PHY_SICW), ("[SIC], sic_IsSICReady(), readback 0x%x=0x%x\n", SIC_CMD_REG, sic_cmd)); */ if (sic_cmd == SIC_CMD_READY) - return _TRUE; + return true; else { rtw_msleep_os(1); /* delay_ms(1); */ @@ -271,7 +271,7 @@ SIC_LedOff( { /* When SIC is enabled, led pin will be used as debug pin, */ /* so don't execute led function when SIC is enabled. */ - return _TRUE; + return true; } #endif @@ -758,7 +758,7 @@ phy_BB8190_Config_HardCode( PADAPTER Adapter ) { - /* RT_ASSERT(FALSE, ("This function is not implement yet!!\n")); */ + /* RT_ASSERT(false, ("This function is not implement yet!!\n")); */ return _SUCCESS; } @@ -1237,7 +1237,7 @@ PHY_GetTxPowerIndex_8188E( u8 base_idx = 0, power_idx = 0; s8 by_rate_diff = 0, limit = 0, tpt_offset = 0, extra_bias = 0; u8 txNum = phy_GetCurrentTxNum_8188E(pAdapter, Rate); - bool bIn24G = _FALSE; + bool bIn24G = false; base_idx = PHY_GetTxPowerIndexBase(pAdapter, RFPath, Rate, BandWidth, Channel, &bIn24G); @@ -1280,7 +1280,7 @@ PHY_UpdateTxPowerDbm8188E( int powerInDbm ) { - return _TRUE; + return true; } static void @@ -1347,7 +1347,7 @@ _PHY_SetBWMode88E( /* u64 BeginTime, EndTime; */ if (pHalData->rf_chip == RF_PSEUDO_11N) { - /* pHalData->SetBWModeInProgress= _FALSE; */ + /* pHalData->SetBWModeInProgress= false; */ return; } @@ -1457,11 +1457,11 @@ _PHY_SetBWMode88E( break; default: - /* RT_ASSERT(FALSE, ("Unknown RFChipID: %d\n", pHalData->RFChipID)); */ + /* RT_ASSERT(false, ("Unknown RFChipID: %d\n", pHalData->RFChipID)); */ break; } - /* pHalData->SetBWModeInProgress= FALSE; */ + /* pHalData->SetBWModeInProgress= false; */ } @@ -1495,7 +1495,7 @@ PHY_SetBWMode8188E( /* if(pHalData->SetBWModeInProgress) */ /* return; */ - /* pHalData->SetBWModeInProgress= TRUE; */ + /* pHalData->SetBWModeInProgress= true; */ pHalData->current_channel_bw = Bandwidth; @@ -1506,7 +1506,7 @@ PHY_SetBWMode8188E( if (IS_VENDOR_8188E_I_CUT_SERIES(Adapter)) phy_SpurCalibration_8188E(Adapter); } else { - /* pHalData->SetBWModeInProgress= FALSE; */ + /* pHalData->SetBWModeInProgress= false; */ pHalData->current_channel_bw = tmpBW; } @@ -1545,7 +1545,7 @@ PHY_SwChnl8188E(/* Call after initialization */ { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); u8 tmpchannel = pHalData->current_channel; - bool bResult = _TRUE; + bool bResult = true; if (pHalData->rf_chip == RF_PSEUDO_11N) return; /* return immediately if it is peudo-phy */ @@ -1635,7 +1635,7 @@ static void _PHY_SetRFPathSwitch( } -/* return value TRUE => Main; FALSE => Aux */ +/* return value true => Main; false => Aux */ static bool _PHY_QueryRFPathSwitch( PADAPTER pAdapter, @@ -1643,7 +1643,7 @@ static bool _PHY_QueryRFPathSwitch( ) { /* if(is2T) - * return _TRUE; */ + * return true; */ if (!rtw_is_hw_init_completed(pAdapter)) { phy_set_bb_reg(pAdapter, REG_LEDCFG0, BIT23, 0x01); @@ -1652,14 +1652,14 @@ static bool _PHY_QueryRFPathSwitch( if (is2T) { if (phy_query_bb_reg(pAdapter, rFPGA0_XB_RFInterfaceOE, BIT5 | BIT6) == 0x01) - return _TRUE; + return true; else - return _FALSE; + return false; } else { if (phy_query_bb_reg(pAdapter, rFPGA0_XA_RFInterfaceOE, 0x300) == 0x02) - return _TRUE; + return true; else - return _FALSE; + return false; } } diff --git a/hal/rtl8188e_xmit.c b/hal/rtl8188e_xmit.c index fef2521..d1c2558 100644 --- a/hal/rtl8188e_xmit.c +++ b/hal/rtl8188e_xmit.c @@ -64,17 +64,17 @@ void handle_txrpt_ccx_88e(_adapter *adapter, u8 *buf) void _dbg_dump_tx_info(_adapter *padapter, int frame_tag, struct tx_desc *ptxdesc) { u8 bDumpTxPkt; - u8 bDumpTxDesc = _FALSE; + u8 bDumpTxDesc = false; rtw_hal_get_def_var(padapter, HAL_DEF_DBG_DUMP_TXPKT, &(bDumpTxPkt)); if (bDumpTxPkt == 1) { /* dump txdesc for data frame */ RTW_INFO("dump tx_desc for data frame\n"); if ((frame_tag & 0x0f) == DATA_FRAMETAG) - bDumpTxDesc = _TRUE; + bDumpTxDesc = true; } else if (bDumpTxPkt == 2) { /* dump txdesc for mgnt frame */ RTW_INFO("dump tx_desc for mgnt frame\n"); if ((frame_tag & 0x0f) == MGNT_FRAMETAG) - bDumpTxDesc = _TRUE; + bDumpTxDesc = true; } else if (bDumpTxPkt == 3) { /* dump early info */ } diff --git a/hal/rtl8188eu_led.c b/hal/rtl8188eu_led.c index ad77a2e..c77a6e5 100644 --- a/hal/rtl8188eu_led.c +++ b/hal/rtl8188eu_led.c @@ -65,7 +65,7 @@ SwLedOn_8188EU( break; } - pLed->bLedOn = _TRUE; + pLed->bLedOn = true; } @@ -90,7 +90,7 @@ SwLedOff_8188EU( switch (pLed->LedPin) { case LED_PIN_LED0: - if (pHalData->bLedOpenDrain == _TRUE) { /* Open-drain arrangement for controlling the LED) */ + if (pHalData->bLedOpenDrain == true) { /* Open-drain arrangement for controlling the LED) */ LedCfg &= 0x90; /* Set to software control. */ rtw_write8(padapter, REG_LEDCFG2, (LedCfg | BIT3)); LedCfg = rtw_read8(padapter, REG_MAC_PINMUX_CFG); @@ -109,7 +109,7 @@ SwLedOff_8188EU( break; } exit: - pLed->bLedOn = _FALSE; + pLed->bLedOn = false; } diff --git a/hal/rtl8188eu_xmit.c b/hal/rtl8188eu_xmit.c index b62d14c..ee05c5b 100644 --- a/hal/rtl8188eu_xmit.c +++ b/hal/rtl8188eu_xmit.c @@ -105,7 +105,7 @@ void rtl8188e_fill_fake_txdesc( ptxdesc->txdw3 |= cpu_to_le32((8 << 28)); /* set bit3 to 1. Suugested by TimChen. 2009.12.29. */ } - if (_TRUE == IsBTQosNull) { + if (true == IsBTQosNull) { ptxdesc->txdw2 |= cpu_to_le32(BIT(23)); /* BT NULL */ } @@ -115,7 +115,7 @@ void rtl8188e_fill_fake_txdesc( /* */ /* Encrypt the data frame if under security mode excepct null data. Suggested by CCW. */ /* */ - if (_TRUE == bDataFrame) { + if (true == bDataFrame) { u32 EncAlg; EncAlg = padapter->securitypriv.dot11PrivacyAlgrthm; @@ -255,7 +255,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz , u8 ba #ifndef CONFIG_USE_USB_BUFFER_ALLOC_TX if (padapter->registrypriv.mp_mode == 0) { /* if((!bagg_pkt) &&(urb_zero_packet_chk(padapter, sz)==0)) */ /* (sz %512) != 0 */ - if ((PACKET_OFFSET_SZ != 0) && (!bagg_pkt) && (rtw_usb_bulk_size_boundary(padapter, TXDESC_SIZE + sz) == _FALSE)) { + if ((PACKET_OFFSET_SZ != 0) && (!bagg_pkt) && (rtw_usb_bulk_size_boundary(padapter, TXDESC_SIZE + sz) == false)) { ptxdesc = (struct tx_desc *)(pmem + PACKET_OFFSET_SZ); /* RTW_INFO("==> non-agg-pkt,shift pointer...\n"); */ pull = 1; @@ -316,7 +316,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz , u8 ba fill_txdesc_force_bmc_camid(pattrib, ptxdesc); #endif - if (pattrib->ampdu_en == _TRUE) { + if (pattrib->ampdu_en == true) { ptxdesc->txdw2 |= cpu_to_le32(AGG_EN);/* AGG EN */ ptxdesc->txdw2 |= cpu_to_le32((pattrib->ampdu_spacing << AMPDU_DENSITY_SHT) & 0x00700000); @@ -363,7 +363,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz , u8 ba ptxdesc->txdw5 |= cpu_to_le32(0x0001ff00);/* DATA/RTS Rate FB LMT */ #if (RATE_ADAPTIVE_SUPPORT == 1) - if (pHalData->fw_ractrl == _FALSE) { + if (pHalData->fw_ractrl == false) { /* driver-based RA*/ /* driver uses rate */ ptxdesc->txdw4 |= cpu_to_le32(USERATE);/* rate control always by driver */ @@ -472,7 +472,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz , u8 ba /* offset 20 */ ptxdesc->txdw5 |= cpu_to_le32(RTY_LMT_EN);/* retry limit enable */ - if (pattrib->retry_ctrl == _TRUE) + if (pattrib->retry_ctrl == true) ptxdesc->txdw5 |= cpu_to_le32(0x00180000);/* retry limit = 6 */ else ptxdesc->txdw5 |= cpu_to_le32(0x00300000);/* retry limit = 12 */ @@ -621,7 +621,7 @@ static s32 rtw_dump_xframe(_adapter *padapter, struct xmit_frame *pxmitframe) } else /* no frag */ sz = pattrib->last_txcmdsz; - pull = update_txdesc(pxmitframe, mem_addr, sz, _FALSE); + pull = update_txdesc(pxmitframe, mem_addr, sz, false); if (pull) { mem_addr += PACKET_OFFSET_SZ; /* pull txdesc head */ @@ -710,7 +710,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv u32 ff_hwaddr; _list *sta_plist, *sta_phead; - u8 single_sta_in_queue = _FALSE; + u8 single_sta_in_queue = false; #ifndef IDEA_CONDITION int res = _SUCCESS; @@ -723,7 +723,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv); if (pxmitbuf == NULL) { /* RTW_INFO("%s #1, connot alloc xmitbuf!!!!\n",__func__); */ - return _FALSE; + return false; } } @@ -737,7 +737,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv /* no more xmit frame, release xmit buffer */ /* RTW_INFO("no more xmit frame ,return\n"); */ rtw_free_xmitbuf(pxmitpriv, pxmitbuf); - return _FALSE; + return false; } #ifndef IDEA_CONDITION @@ -765,7 +765,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv pxmitframe->pkt_offset = (PACKET_OFFSET_SZ / 8); /* 1; */ /* first frame of aggregation, reserve offset */ #endif - if (rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe) == _FALSE) { + if (rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe) == false) { RTW_INFO("%s coalesce 1st xmitframe failed\n", __func__); continue; } @@ -842,7 +842,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv xmitframe_phead = get_list_head(&ptxservq->sta_pending); 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); xmitframe_plist = get_next(xmitframe_plist); @@ -888,7 +888,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv /* pxmitframe->pxmitbuf = pxmitbuf; */ pxmitframe->buf_addr = pxmitbuf->pbuf + pbuf; - if (rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe) == _FALSE) { + if (rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe) == false) { RTW_INFO("%s coalesce failed\n", __func__); rtw_free_xmitframe(pxmitpriv, pxmitframe); continue; @@ -899,7 +899,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv rtw_os_xmit_complete(padapter, pxmitframe); /* (len - TXDESC_SIZE) == pxmitframe->attrib.last_txcmdsz */ - update_txdesc(pxmitframe, pxmitframe->buf_addr, pxmitframe->attrib.last_txcmdsz, _TRUE); + update_txdesc(pxmitframe, pxmitframe->buf_addr, pxmitframe->attrib.last_txcmdsz, true); /* don't need xmitframe any more */ rtw_free_xmitframe(pxmitpriv, pxmitframe); @@ -926,9 +926,9 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv bulkPtr = ((pbuf / bulkSize) + 1) * bulkSize; } } /* end while( aggregate same priority and same DA(AP or STA) frames) */ - if (_rtw_queue_empty(&ptxservq->sta_pending) == _TRUE) + if (_rtw_queue_empty(&ptxservq->sta_pending) == true) rtw_list_delete(&ptxservq->tx_pending); - else if (single_sta_in_queue == _FALSE) { + else if (single_sta_in_queue == false) { /* Re-arrange the order of stations in this ac queue to balance the service for these stations */ rtw_list_delete(&ptxservq->tx_pending); rtw_list_insert_tail(&ptxservq->tx_pending, get_list_head(phwxmit->sta_queue)); @@ -954,7 +954,7 @@ agg_end: } #endif /* CONFIG_USE_USB_BUFFER_ALLOC_TX */ - update_txdesc(pfirstframe, pfirstframe->buf_addr, pfirstframe->attrib.last_txcmdsz, _TRUE); + update_txdesc(pfirstframe, pfirstframe->buf_addr, pfirstframe->attrib.last_txcmdsz, true); #ifdef CONFIG_TX_EARLY_MODE /* prepare EM info for first frame, agg_num value start from 1 */ @@ -980,7 +980,7 @@ agg_end: rtw_free_xmitframe(pxmitpriv, pfirstframe); - return _TRUE; + return true; } #else @@ -1000,7 +1000,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv if (pxmitbuf == NULL) { pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv); if (!pxmitbuf) - return _FALSE; + return false; } @@ -1035,14 +1035,14 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv } else { rtw_free_xmitbuf(pxmitpriv, pxmitbuf); - return _FALSE; + return false; } break; } while (0/*xcnt < (NR_XMITFRAME >> 3)*/); - return _TRUE; + return true; } #endif @@ -1065,8 +1065,8 @@ static s32 xmitframe_direct(_adapter *padapter, struct xmit_frame *pxmitframe) /* * Return - * _TRUE dump packet directly - * _FALSE enqueue packet + * true dump packet directly + * false enqueue packet */ static s32 pre_xmitframe(_adapter *padapter, struct xmit_frame *pxmitframe) { @@ -1086,7 +1086,7 @@ static s32 pre_xmitframe(_adapter *padapter, struct xmit_frame *pxmitframe) goto enqueue; } - if (rtw_xmit_ac_blocked(padapter) == _TRUE) + if (rtw_xmit_ac_blocked(padapter) == true) goto enqueue; if (DEV_STA_LG_NUM(padapter->dvobj)) @@ -1107,7 +1107,7 @@ static s32 pre_xmitframe(_adapter *padapter, struct xmit_frame *pxmitframe) rtw_free_xmitframe(pxmitpriv, pxmitframe); } - return _TRUE; + return true; enqueue: res = rtw_xmitframe_enqueue(padapter, pxmitframe); @@ -1117,10 +1117,10 @@ enqueue: rtw_free_xmitframe(pxmitpriv, pxmitframe); pxmitpriv->tx_drop++; - return _TRUE; + return true; } - return _FALSE; + return false; } s32 rtl8188eu_mgnt_xmit(_adapter *padapter, struct xmit_frame *pmgntframe) @@ -1130,8 +1130,8 @@ s32 rtl8188eu_mgnt_xmit(_adapter *padapter, struct xmit_frame *pmgntframe) /* * Return - * _TRUE dump packet directly ok - * _FALSE temporary can't transmit packets to hardware + * true dump packet directly ok + * false temporary can't transmit packets to hardware */ s32 rtl8188eu_hal_xmit(_adapter *padapter, struct xmit_frame *pxmitframe) { diff --git a/hal/usb_halinit.c b/hal/usb_halinit.c index 1961d49..04b27e5 100644 --- a/hal/usb_halinit.c +++ b/hal/usb_halinit.c @@ -59,7 +59,7 @@ static bool HalUsbSetQueuePipeMapping8188EUsb( ) { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); - bool result = _FALSE; + bool result = false; _ConfigNormalChipOutEP_8188E(pAdapter, NumOutPipe); @@ -123,10 +123,10 @@ static u32 _InitPowerOn_8188EU(_adapter *padapter) { u16 value16; /* HW Power on sequence */ - u8 bMacPwrCtrlOn = _FALSE; + u8 bMacPwrCtrlOn = false; rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); - if (bMacPwrCtrlOn == _TRUE) + if (bMacPwrCtrlOn == true) return _SUCCESS; if (!HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK, Rtl8188E_NIC_PWR_ON_FLOW)) { @@ -146,7 +146,7 @@ static u32 _InitPowerOn_8188EU(_adapter *padapter) rtw_write16(padapter, REG_CR, value16); - bMacPwrCtrlOn = _TRUE; + bMacPwrCtrlOn = true; rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); return _SUCCESS; @@ -172,7 +172,7 @@ static void _InitPABias(_adapter *padapter) /* FIXED PA current issue */ /* efuse_one_byte_read(padapter, 0x1FA, &pa_setting); */ - efuse_OneByteRead(padapter, 0x1FA, &pa_setting, _FALSE); + efuse_OneByteRead(padapter, 0x1FA, &pa_setting, false); if (!(pa_setting & BIT0)) { phy_set_rf_reg(padapter, RF_PATH_A, 0x15, 0x0FFFFF, 0x0F406); @@ -408,7 +408,7 @@ _InitNormalChipOneOutEpPriority( value = QUEUE_NORMAL; break; default: - /* RT_ASSERT(FALSE,("Shall not reach here!\n")); */ + /* RT_ASSERT(false,("Shall not reach here!\n")); */ break; } @@ -449,7 +449,7 @@ _InitNormalChipTwoOutEpPriority( valueLow = QUEUE_NORMAL; break; default: - /* RT_ASSERT(FALSE,("Shall not reach here!\n")); */ + /* RT_ASSERT(false,("Shall not reach here!\n")); */ break; } @@ -517,7 +517,7 @@ _InitQueuePriority( _InitNormalChipThreeOutEpPriority(Adapter); break; default: - /* RT_ASSERT(FALSE,("Shall not reach here!\n")); */ + /* RT_ASSERT(false,("Shall not reach here!\n")); */ break; } @@ -741,7 +741,7 @@ usb_AggSettingTxUpdate( u32 value32; if (Adapter->registrypriv.wifi_spec) - pHalData->UsbTxAggMode = _FALSE; + pHalData->UsbTxAggMode = false; if (pHalData->UsbTxAggMode) { value32 = rtw_read32(Adapter, REG_TDECTRL); @@ -846,7 +846,7 @@ usb_AggSettingRxUpdate( pHalData->HwRxPageSize = 1024; break; default: - /* RT_ASSERT(FALSE, ("RX_PAGE_SIZE_REG_VALUE definition is incorrect!\n")); */ + /* RT_ASSERT(false, ("RX_PAGE_SIZE_REG_VALUE definition is incorrect!\n")); */ break; } #endif @@ -866,7 +866,7 @@ InitUsbAggregationSetting( usb_AggSettingRxUpdate(Adapter); /* 201/12/10 MH Add for USB agg mode dynamic switch. */ - pHalData->UsbRxHighSpeedMode = _FALSE; + pHalData->UsbRxHighSpeedMode = false; } static void @@ -1144,12 +1144,12 @@ static u32 rtl8188eu_hal_init(PADAPTER Adapter) _ps_open_RF(Adapter); if (pHalData->bIQKInitialized) { - /* PHY_IQCalibrate(padapter, _TRUE); */ - phy_iq_calibrate_8188e(Adapter, _TRUE); + /* PHY_IQCalibrate(padapter, true); */ + phy_iq_calibrate_8188e(Adapter, true); } else { - /* PHY_IQCalibrate(padapter, _FALSE); */ - phy_iq_calibrate_8188e(Adapter, _FALSE); - pHalData->bIQKInitialized = _TRUE; + /* PHY_IQCalibrate(padapter, false); */ + phy_iq_calibrate_8188e(Adapter, false); + pHalData->bIQKInitialized = true; } /* dm_check_txpowertracking(padapter); @@ -1172,7 +1172,7 @@ static u32 rtl8188eu_hal_init(PADAPTER Adapter) /* Save target channel */ /* Current Channel will be updated again later. */ pHalData->current_channel = 6;/* default set to 6 */ - if (pwrctrlpriv->reg_rfoff == _TRUE) + if (pwrctrlpriv->reg_rfoff == true) pwrctrlpriv->rf_pwrstate = rf_off; /* 2010/08/09 MH We need to check if we need to turnon or off RF after detecting */ @@ -1200,18 +1200,18 @@ static u32 rtl8188eu_hal_init(PADAPTER Adapter) HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_DOWNLOAD_FW); if (Adapter->registrypriv.mp_mode == 0) { - status = rtl8188e_FirmwareDownload(Adapter, _FALSE); + status = rtl8188e_FirmwareDownload(Adapter, false); if (status != _SUCCESS) { RTW_INFO("%s: Download Firmware failed!!\n", __func__); - Adapter->bFWReady = _FALSE; - pHalData->fw_ractrl = _FALSE; + Adapter->bFWReady = false; + pHalData->fw_ractrl = false; return status; } else { - Adapter->bFWReady = _TRUE; + Adapter->bFWReady = true; #ifdef CONFIG_SFW_SUPPORTED - pHalData->fw_ractrl = IS_VENDOR_8188E_I_CUT_SERIES(Adapter) ? _TRUE : _FALSE; + pHalData->fw_ractrl = IS_VENDOR_8188E_I_CUT_SERIES(Adapter) ? true : false; #else - pHalData->fw_ractrl = _FALSE; + pHalData->fw_ractrl = false; #endif } } @@ -1277,7 +1277,7 @@ static u32 rtl8188eu_hal_init(PADAPTER Adapter) InitUsbAggregationSetting(Adapter); _InitOperationMode(Adapter);/* todo */ _InitBeaconParameters(Adapter); - _InitBeaconMaxError(Adapter, _TRUE); + _InitBeaconMaxError(Adapter, true); /* */ /* Init CR MACTXEN, MACRXEN after setting RxFF boundary REG_TRXFF_BNDY to patch */ @@ -1433,10 +1433,10 @@ static u32 rtl8188eu_hal_init(PADAPTER Adapter) /* 2010/08/26 MH Merge from 8192CE. */ if (pwrctrlpriv->rf_pwrstate == rf_on) { if (pHalData->bIQKInitialized) - phy_iq_calibrate_8188e(Adapter, _TRUE); + phy_iq_calibrate_8188e(Adapter, true); else { - phy_iq_calibrate_8188e(Adapter, _FALSE); - pHalData->bIQKInitialized = _TRUE; + phy_iq_calibrate_8188e(Adapter, false); + pHalData->bIQKInitialized = true; } HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_PW_TRACK); @@ -1499,10 +1499,10 @@ hal_poweroff_8188eu( u8 val8; u16 val16; u32 val32; - u8 bMacPwrCtrlOn = _FALSE; + u8 bMacPwrCtrlOn = false; rtw_hal_get_hwreg(Adapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); - if (bMacPwrCtrlOn == _FALSE) + if (bMacPwrCtrlOn == false) return ; /* Stop Tx Report Timer. 0x4EC[Bit1]=b'0 */ @@ -1562,9 +1562,9 @@ hal_poweroff_8188eu( rtw_write8(Adapter, REG_GPIO_IO_SEL + 1, val8 | 0x0F); /* Reg0x43 */ rtw_write32(Adapter, REG_BB_PAD_CTRL, 0x00080808);/* set LNA ,TRSW,EX_PA Pin to output mode */ - Adapter->bFWReady = _FALSE; + Adapter->bFWReady = false; - bMacPwrCtrlOn = _FALSE; + bMacPwrCtrlOn = false; rtw_hal_set_hwreg(Adapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); } static void rtl8188eu_hw_power_down(_adapter *padapter) @@ -1631,7 +1631,7 @@ static unsigned int rtl8188eu_inirp_init(PADAPTER Adapter) /* issue Rx irp to receive data */ precvbuf = (struct recv_buf *)precvpriv->precv_buf; for (i = 0; i < NR_RECVBUFF; i++) { - if (_read_port(pintfhdl, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf) == _FALSE) { + if (_read_port(pintfhdl, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf) == false) { status = _FAIL; goto exit; } @@ -1647,7 +1647,7 @@ static unsigned int rtl8188eu_inirp_init(PADAPTER Adapter) goto exit; } _read_interrupt = pintfhdl->io_ops._read_interrupt; - if (_read_interrupt(pintfhdl, RECV_INT_IN_ADDR) == _FALSE) { + if (_read_interrupt(pintfhdl, RECV_INT_IN_ADDR) == false) { status = _FAIL; } #endif @@ -1688,14 +1688,14 @@ _ReadLEDSetting( struct led_priv *pledpriv = &(Adapter->ledpriv); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); #ifdef CONFIG_SW_LED - pledpriv->bRegUseLed = _TRUE; + pledpriv->bRegUseLed = true; switch (pHalData->CustomerID) { default: pledpriv->LedStrategy = SW_LED_MODE1; break; } - pHalData->bLedOpenDrain = _TRUE;/* Support Open-drain arrangement for controlling the LED. Added by Roger, 2009.10.16. */ + pHalData->bLedOpenDrain = true;/* Support Open-drain arrangement for controlling the LED. Added by Roger, 2009.10.16. */ #else /* HW LED */ pledpriv->LedStrategy = HW_LED; #endif /* CONFIG_SW_LED */ @@ -1798,8 +1798,8 @@ static void _ReadPROMContent( /* check system boot selection */ eeValue = rtw_read8(Adapter, REG_9346CR); - pHalData->EepromOrEfuse = (eeValue & BOOT_FROM_EEPROM) ? _TRUE : _FALSE; - pHalData->bautoload_fail_flag = (eeValue & EEPROM_EN) ? _FALSE : _TRUE; + pHalData->EepromOrEfuse = (eeValue & BOOT_FROM_EEPROM) ? true : false; + pHalData->bautoload_fail_flag = (eeValue & EEPROM_EN) ? false : true; RTW_INFO("Boot from %s, Autoload %s !\n", (pHalData->EepromOrEfuse ? "EEPROM" : "EFUSE"), (pHalData->bautoload_fail_flag ? "Fail" : "OK")); @@ -1933,7 +1933,7 @@ GetHalDefVar8188EUsb( case HAL_DEF_TX_LDPC: case HAL_DEF_RX_LDPC: - *((u8 *)pValue) = _FALSE; + *((u8 *)pValue) = false; break; case HAL_DEF_TX_STBC: *((u8 *)pValue) = 0; @@ -2029,7 +2029,7 @@ static void SetBeaconRelatedRegisters8188EUsb(PADAPTER padapter) rtw_write8(padapter, REG_RXTSF_OFFSET_CCK, 0x50); rtw_write8(padapter, REG_RXTSF_OFFSET_OFDM, 0x50); - _BeaconFunctionEnable(padapter, _TRUE, _TRUE); + _BeaconFunctionEnable(padapter, true, true); ResumeTxBeacon(padapter); @@ -2055,14 +2055,14 @@ static void rtl8188eu_init_default_value(_adapter *padapter) rtl8188e_init_default_value(padapter); /* init default value */ - pHalData->fw_ractrl = _FALSE; + pHalData->fw_ractrl = false; if (!pwrctrlpriv->bkeepfwalive) pHalData->LastHMEBoxNum = 0; /* init dm default value */ - pHalData->bIQKInitialized = _FALSE; + pHalData->bIQKInitialized = false; pHalData->odmpriv.rf_calibrate_info.tm_trigger = 0;/* for IQK */ - /* pdmpriv->binitialized = _FALSE; + /* pdmpriv->binitialized = false; * pdmpriv->prv_traffic_idx = 3; * pdmpriv->initialize = 0; */ pHalData->odmpriv.rf_calibrate_info.thermal_value_hp_index = 0; @@ -2078,7 +2078,7 @@ static void rtl8188eu_init_default_value(_adapter *padapter) static u8 rtl8188eu_ps_func(PADAPTER Adapter, HAL_INTF_PS_FUNC efunc_id, u8 *val) { - u8 bResult = _TRUE; + u8 bResult = true; switch (efunc_id) { #if defined(CONFIG_AUTOSUSPEND) && defined(SUPPORT_HW_RFOFF_DETECTED) diff --git a/hal/usb_ops_linux.c b/hal/usb_ops_linux.c index ae0010f..4315a51 100644 --- a/hal/usb_ops_linux.c +++ b/hal/usb_ops_linux.c @@ -147,7 +147,7 @@ int recvbuf2recvframe(PADAPTER padapter, void *ptr) } #ifdef CONFIG_RX_PACKET_APPEND_FCS - if (check_fwstate(&padapter->mlmepriv, WIFI_MONITOR_STATE) == _FALSE) + if (check_fwstate(&padapter->mlmepriv, WIFI_MONITOR_STATE) == false) if ((pattrib->pkt_rpt_type == NORMAL_RX) && (pHalData->ReceiveConfig & RCR_APPFCS)) pattrib->pkt_len -= IEEE80211_FCS_LEN; #endif @@ -234,7 +234,7 @@ _exit_recvbuf2recvframe: void rtl8188eu_xmit_tasklet(void *priv) { - int ret = _FALSE; + int ret = false; _adapter *padapter = (_adapter *)priv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv; @@ -244,12 +244,12 @@ void rtl8188eu_xmit_tasklet(void *priv) break; } - if (rtw_xmit_ac_blocked(padapter) == _TRUE) + if (rtw_xmit_ac_blocked(padapter) == true) break; ret = rtl8188eu_xmitframe_complete(padapter, pxmitpriv, NULL); - if (ret == _FALSE) + if (ret == false) break; } diff --git a/include/Hal8188EPhyCfg.h b/include/Hal8188EPhyCfg.h index 8033a5d..1700d84 100644 --- a/include/Hal8188EPhyCfg.h +++ b/include/Hal8188EPhyCfg.h @@ -203,7 +203,7 @@ SetAntennaConfig92C( * 2) "#define RTL8723_FPGA_VERIFICATION 1" in Precomp.h.WlanE.Windows * 3) "#define RTL8190_Download_Firmware_From_Header 0" in Precomp.h.WlanE.Windows if needed. * */ -#if (RTL8188E_FPGA_TRUE_PHY_VERIFICATION == 1) +#if (RTL8188E_FPGAtrue_PHY_VERIFICATION == 1) #define SIC_ENABLE 1 #define SIC_HW_SUPPORT 1 #else diff --git a/include/HalVerDef.h b/include/HalVerDef.h index b157906..3477e0c 100644 --- a/include/HalVerDef.h +++ b/include/HalVerDef.h @@ -20,9 +20,6 @@ #ifndef __HAL_VERSION_DEF_H__ #define __HAL_VERSION_DEF_H__ -#define TRUE _TRUE -#define FALSE _FALSE - /* HAL_IC_TYPE_E */ typedef enum tag_HAL_IC_Type_Definition { CHIP_8192S = 0, @@ -109,67 +106,67 @@ typedef struct tag_HAL_VERSION { * HAL_VERSION VersionID */ /* HAL_IC_TYPE_E */ -#define IS_8188E(version) ((GET_CVID_IC_TYPE(version) == CHIP_8188E) ? TRUE : FALSE) -#define IS_8188F(version) ((GET_CVID_IC_TYPE(version) == CHIP_8188F) ? TRUE : FALSE) -#define IS_8192E(version) ((GET_CVID_IC_TYPE(version) == CHIP_8192E) ? TRUE : FALSE) -#define IS_8812_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8812) ? TRUE : FALSE) -#define IS_8821_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8821) ? TRUE : FALSE) -#define IS_8814A_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8814A) ? TRUE : FALSE) -#define IS_8723B_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8723B) ? TRUE : FALSE) -#define IS_8703B_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8703B) ? TRUE : FALSE) -#define IS_8822B_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8822B) ? TRUE : FALSE) -#define IS_8821C_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8821C) ? TRUE : FALSE) +#define IS_8188E(version) ((GET_CVID_IC_TYPE(version) == CHIP_8188E) ? true : false) +#define IS_8188F(version) ((GET_CVID_IC_TYPE(version) == CHIP_8188F) ? true : false) +#define IS_8192E(version) ((GET_CVID_IC_TYPE(version) == CHIP_8192E) ? true : false) +#define IS_8812_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8812) ? true : false) +#define IS_8821_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8821) ? true : false) +#define IS_8814A_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8814A) ? true : false) +#define IS_8723B_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8723B) ? true : false) +#define IS_8703B_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8703B) ? true : false) +#define IS_8822B_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8822B) ? true : false) +#define IS_8821C_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8821C) ? true : false) #define IS_8723D_SERIES(version)\ - ((GET_CVID_IC_TYPE(version) == CHIP_8723D) ? TRUE : FALSE) + ((GET_CVID_IC_TYPE(version) == CHIP_8723D) ? true : false) /* HAL_CHIP_TYPE_E */ -#define IS_TEST_CHIP(version) ((GET_CVID_CHIP_TYPE(version) == TEST_CHIP) ? TRUE : FALSE) -#define IS_NORMAL_CHIP(version) ((GET_CVID_CHIP_TYPE(version) == NORMAL_CHIP) ? TRUE : FALSE) +#define IS_TEST_CHIP(version) ((GET_CVID_CHIP_TYPE(version) == TEST_CHIP) ? true : false) +#define IS_NORMAL_CHIP(version) ((GET_CVID_CHIP_TYPE(version) == NORMAL_CHIP) ? true : false) /* HAL_CUT_VERSION_E */ -#define IS_A_CUT(version) ((GET_CVID_CUT_VERSION(version) == A_CUT_VERSION) ? TRUE : FALSE) -#define IS_B_CUT(version) ((GET_CVID_CUT_VERSION(version) == B_CUT_VERSION) ? TRUE : FALSE) -#define IS_C_CUT(version) ((GET_CVID_CUT_VERSION(version) == C_CUT_VERSION) ? TRUE : FALSE) -#define IS_D_CUT(version) ((GET_CVID_CUT_VERSION(version) == D_CUT_VERSION) ? TRUE : FALSE) -#define IS_E_CUT(version) ((GET_CVID_CUT_VERSION(version) == E_CUT_VERSION) ? TRUE : FALSE) -#define IS_F_CUT(version) ((GET_CVID_CUT_VERSION(version) == F_CUT_VERSION) ? TRUE : FALSE) -#define IS_I_CUT(version) ((GET_CVID_CUT_VERSION(version) == I_CUT_VERSION) ? TRUE : FALSE) -#define IS_J_CUT(version) ((GET_CVID_CUT_VERSION(version) == J_CUT_VERSION) ? TRUE : FALSE) -#define IS_K_CUT(version) ((GET_CVID_CUT_VERSION(version) == K_CUT_VERSION) ? TRUE : FALSE) +#define IS_A_CUT(version) ((GET_CVID_CUT_VERSION(version) == A_CUT_VERSION) ? true : false) +#define IS_B_CUT(version) ((GET_CVID_CUT_VERSION(version) == B_CUT_VERSION) ? true : false) +#define IS_C_CUT(version) ((GET_CVID_CUT_VERSION(version) == C_CUT_VERSION) ? true : false) +#define IS_D_CUT(version) ((GET_CVID_CUT_VERSION(version) == D_CUT_VERSION) ? true : false) +#define IS_E_CUT(version) ((GET_CVID_CUT_VERSION(version) == E_CUT_VERSION) ? true : false) +#define IS_F_CUT(version) ((GET_CVID_CUT_VERSION(version) == F_CUT_VERSION) ? true : false) +#define IS_I_CUT(version) ((GET_CVID_CUT_VERSION(version) == I_CUT_VERSION) ? true : false) +#define IS_J_CUT(version) ((GET_CVID_CUT_VERSION(version) == J_CUT_VERSION) ? true : false) +#define IS_K_CUT(version) ((GET_CVID_CUT_VERSION(version) == K_CUT_VERSION) ? true : false) /* HAL_VENDOR_E */ -#define IS_CHIP_VENDOR_TSMC(version) ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_TSMC) ? TRUE : FALSE) -#define IS_CHIP_VENDOR_UMC(version) ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_UMC) ? TRUE : FALSE) -#define IS_CHIP_VENDOR_SMIC(version) ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_SMIC) ? TRUE : FALSE) +#define IS_CHIP_VENDOR_TSMC(version) ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_TSMC) ? true : false) +#define IS_CHIP_VENDOR_UMC(version) ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_UMC) ? true : false) +#define IS_CHIP_VENDOR_SMIC(version) ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_SMIC) ? true : false) /* HAL_RF_TYPE_E */ -#define IS_1T1R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_1T1R) ? TRUE : FALSE) -#define IS_1T2R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_1T2R) ? TRUE : FALSE) -#define IS_2T2R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_2T2R) ? TRUE : FALSE) -#define IS_3T3R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_3T3R) ? TRUE : FALSE) -#define IS_3T4R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_3T4R) ? TRUE : FALSE) -#define IS_4T4R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_4T4R) ? TRUE : FALSE) +#define IS_1T1R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_1T1R) ? true : false) +#define IS_1T2R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_1T2R) ? true : false) +#define IS_2T2R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_2T2R) ? true : false) +#define IS_3T3R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_3T3R) ? true : false) +#define IS_3T4R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_3T4R) ? true : false) +#define IS_4T4R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_4T4R) ? true : false) /* ---------------------------------------------------------------------------- * Chip version Macro. -- * ---------------------------------------------------------------------------- */ -#define IS_VENDOR_8188E_I_CUT_SERIES(_Adapter) ((IS_8188E(GET_HAL_DATA(_Adapter)->version_id)) ? ((GET_CVID_CUT_VERSION(GET_HAL_DATA(_Adapter)->version_id) >= I_CUT_VERSION) ? TRUE : FALSE) : FALSE) -#define IS_VENDOR_8812A_TEST_CHIP(_Adapter) ((IS_8812_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? FALSE : TRUE) : FALSE) -#define IS_VENDOR_8812A_MP_CHIP(_Adapter) ((IS_8812_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? TRUE : FALSE) : FALSE) -#define IS_VENDOR_8812A_C_CUT(_Adapter) ((IS_8812_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((GET_CVID_CUT_VERSION(GET_HAL_DATA(_Adapter)->version_id) == C_CUT_VERSION) ? TRUE : FALSE) : FALSE) +#define IS_VENDOR_8188E_I_CUT_SERIES(_Adapter) ((IS_8188E(GET_HAL_DATA(_Adapter)->version_id)) ? ((GET_CVID_CUT_VERSION(GET_HAL_DATA(_Adapter)->version_id) >= I_CUT_VERSION) ? true : false) : false) +#define IS_VENDOR_8812A_TEST_CHIP(_Adapter) ((IS_8812_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? false : true) : false) +#define IS_VENDOR_8812A_MP_CHIP(_Adapter) ((IS_8812_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? true : false) : false) +#define IS_VENDOR_8812A_C_CUT(_Adapter) ((IS_8812_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((GET_CVID_CUT_VERSION(GET_HAL_DATA(_Adapter)->version_id) == C_CUT_VERSION) ? true : false) : false) -#define IS_VENDOR_8821A_TEST_CHIP(_Adapter) ((IS_8821_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? FALSE : TRUE) : FALSE) -#define IS_VENDOR_8821A_MP_CHIP(_Adapter) ((IS_8821_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? TRUE : FALSE) : FALSE) +#define IS_VENDOR_8821A_TEST_CHIP(_Adapter) ((IS_8821_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? false : true) : false) +#define IS_VENDOR_8821A_MP_CHIP(_Adapter) ((IS_8821_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? true : false) : false) -#define IS_VENDOR_8192E_B_CUT(_Adapter) ((GET_CVID_CUT_VERSION(GET_HAL_DATA(_Adapter)->version_id) == B_CUT_VERSION) ? TRUE : FALSE) +#define IS_VENDOR_8192E_B_CUT(_Adapter) ((GET_CVID_CUT_VERSION(GET_HAL_DATA(_Adapter)->version_id) == B_CUT_VERSION) ? true : false) -#define IS_VENDOR_8723B_TEST_CHIP(_Adapter) ((IS_8723B_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? FALSE : TRUE) : FALSE) -#define IS_VENDOR_8723B_MP_CHIP(_Adapter) ((IS_8723B_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? TRUE : FALSE) : FALSE) +#define IS_VENDOR_8723B_TEST_CHIP(_Adapter) ((IS_8723B_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? false : true) : false) +#define IS_VENDOR_8723B_MP_CHIP(_Adapter) ((IS_8723B_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? true : false) : false) -#define IS_VENDOR_8703B_TEST_CHIP(_Adapter) ((IS_8703B_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? FALSE : TRUE) : FALSE) -#define IS_VENDOR_8703B_MP_CHIP(_Adapter) ((IS_8703B_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? TRUE : FALSE) : FALSE) -#define IS_VENDOR_8814A_TEST_CHIP(_Adapter) ((IS_8814A_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? FALSE : TRUE) : FALSE) -#define IS_VENDOR_8814A_MP_CHIP(_Adapter) ((IS_8814A_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? TRUE : FALSE) : FALSE) +#define IS_VENDOR_8703B_TEST_CHIP(_Adapter) ((IS_8703B_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? false : true) : false) +#define IS_VENDOR_8703B_MP_CHIP(_Adapter) ((IS_8703B_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? true : false) : false) +#define IS_VENDOR_8814A_TEST_CHIP(_Adapter) ((IS_8814A_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? false : true) : false) +#define IS_VENDOR_8814A_MP_CHIP(_Adapter) ((IS_8814A_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? true : false) : false) #endif diff --git a/include/autoconf.h b/include/autoconf.h index 63b4aac..ad69e72 100644 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -22,7 +22,7 @@ /* #define CONFIG_DISABLE_ODM */ /* for FPGA VERIFICATION config */ -#define RTL8188E_FPGA_TRUE_PHY_VERIFICATION 0 +#define RTL8188E_FPGAtrue_PHY_VERIFICATION 0 /* ***** temporarily flag ******* */ /* diff --git a/include/basic_types.h b/include/basic_types.h index bc87a72..748fdda 100644 --- a/include/basic_types.h +++ b/include/basic_types.h @@ -24,18 +24,6 @@ #define SUCCESS 0 #define FAIL (-1) -#ifndef TRUE - #define _TRUE 1 -#else - #define _TRUE TRUE -#endif - -#ifndef FALSE - #define _FALSE 0 -#else - #define _FALSE FALSE -#endif - #include #include #include diff --git a/include/drv_types.h b/include/drv_types.h index 87217dd..432974a 100644 --- a/include/drv_types.h +++ b/include/drv_types.h @@ -966,22 +966,22 @@ struct dvobj_priv { static inline void dev_set_surprise_removed(struct dvobj_priv *dvobj) { - ATOMIC_SET(&dvobj->bSurpriseRemoved, _TRUE); + ATOMIC_SET(&dvobj->bSurpriseRemoved, true); } static inline void dev_clr_surprise_removed(struct dvobj_priv *dvobj) { - ATOMIC_SET(&dvobj->bSurpriseRemoved, _FALSE); + ATOMIC_SET(&dvobj->bSurpriseRemoved, false); } static inline void dev_set_drv_stopped(struct dvobj_priv *dvobj) { - ATOMIC_SET(&dvobj->bDriverStopped, _TRUE); + ATOMIC_SET(&dvobj->bDriverStopped, true); } static inline void dev_clr_drv_stopped(struct dvobj_priv *dvobj) { - ATOMIC_SET(&dvobj->bDriverStopped, _FALSE); + ATOMIC_SET(&dvobj->bDriverStopped, false); } -#define dev_is_surprise_removed(dvobj) (ATOMIC_READ(&dvobj->bSurpriseRemoved) == _TRUE) -#define dev_is_drv_stopped(dvobj) (ATOMIC_READ(&dvobj->bDriverStopped) == _TRUE) +#define dev_is_surprise_removed(dvobj) (ATOMIC_READ(&dvobj->bSurpriseRemoved) == true) +#define dev_is_drv_stopped(dvobj) (ATOMIC_READ(&dvobj->bDriverStopped) == true) static struct device *dvobj_to_dev(struct dvobj_priv *dvobj) { diff --git a/include/hal_com_led.h b/include/hal_com_led.h index 377e7d3..06e68cd 100644 --- a/include/hal_com_led.h +++ b/include/hal_com_led.h @@ -192,11 +192,11 @@ typedef struct _LED_USB { LED_PIN LedPin; /* Identify how to implement this SW led. */ LED_STATE CurrLedState; /* Current LED state. */ - bool bLedOn; /* TRUE if LED is ON, FALSE if LED is OFF. */ + bool bLedOn; /* true if LED is ON, false if LED is OFF. */ bool bSWLedCtrl; - bool bLedBlinkInProgress; /* TRUE if it is blinking, FALSE o.w.. */ + bool bLedBlinkInProgress; /* true if it is blinking, false o.w.. */ /* ALPHA, added by chiyoko, 20090106 */ bool bLedNoLinkBlinkInProgress; bool bLedLinkBlinkInProgress; diff --git a/include/hal_com_reg.h b/include/hal_com_reg.h index 74fa77c..ca0c74f 100644 --- a/include/hal_com_reg.h +++ b/include/hal_com_reg.h @@ -432,15 +432,15 @@ /* RXERR_RPT */ #define RXERR_TYPE_OFDM_PPDU 0 -#define RXERR_TYPE_OFDM_FALSE_ALARM 1 +#define RXERR_TYPE_OFDMfalse_ALARM 1 #define RXERR_TYPE_OFDM_MPDU_OK 2 #define RXERR_TYPE_OFDM_MPDU_FAIL 3 #define RXERR_TYPE_CCK_PPDU 4 -#define RXERR_TYPE_CCK_FALSE_ALARM 5 +#define RXERR_TYPE_CCKfalse_ALARM 5 #define RXERR_TYPE_CCK_MPDU_OK 6 #define RXERR_TYPE_CCK_MPDU_FAIL 7 #define RXERR_TYPE_HT_PPDU 8 -#define RXERR_TYPE_HT_FALSE_ALARM 9 +#define RXERR_TYPE_HTfalse_ALARM 9 #define RXERR_TYPE_HT_MPDU_TOTAL 10 #define RXERR_TYPE_HT_MPDU_OK 11 #define RXERR_TYPE_HT_MPDU_FAIL 12 @@ -823,8 +823,8 @@ Default: 00b. #define TOTAL_CAM_ENTRY 32 #define HALF_CAM_ENTRY 16 -#define CAM_CONFIG_USEDK _TRUE -#define CAM_CONFIG_NO_USEDK _FALSE +#define CAM_CONFIG_USEDK true +#define CAM_CONFIG_NO_USEDK false #define CAM_WRITE BIT(16) #define CAM_READ 0x00000000 diff --git a/include/hal_data.h b/include/hal_data.h index 7e98760..a1f6b30 100755 --- a/include/hal_data.h +++ b/include/hal_data.h @@ -635,7 +635,7 @@ typedef struct hal_com_data HAL_DATA_TYPE, *PHAL_DATA_TYPE; #define get_hal_mac_addr(adapter) (GET_HAL_DATA(adapter)->EEPROMMACAddr) #define is_boot_from_eeprom(adapter) (GET_HAL_DATA(adapter)->EepromOrEfuse) #define rtw_get_hw_init_completed(adapter) (GET_HAL_DATA(adapter)->hw_init_completed) -#define rtw_is_hw_init_completed(adapter) (GET_HAL_DATA(adapter)->hw_init_completed == _TRUE) +#define rtw_is_hw_init_completed(adapter) (GET_HAL_DATA(adapter)->hw_init_completed == true) #ifdef CONFIG_AUTO_CHNL_SEL_NHM #define GET_ACS_STATE(padapter) (ATOMIC_READ(&GET_HAL_DATA(padapter)->acs.state)) diff --git a/include/ieee80211.h b/include/ieee80211.h index bb13c53..d90d417 100644 --- a/include/ieee80211.h +++ b/include/ieee80211.h @@ -214,21 +214,21 @@ enum NETWORK_TYPE { #define IsLegacyOnly(NetType) ((NetType) == ((NetType) & (WIRELESS_11BG | WIRELESS_11A))) -#define IsSupported24G(NetType) ((NetType) & SUPPORTED_24G_NETTYPE_MSK ? _TRUE : _FALSE) -#define is_supported_5g(NetType) ((NetType) & SUPPORTED_5G_NETTYPE_MSK ? _TRUE : _FALSE) +#define IsSupported24G(NetType) ((NetType) & SUPPORTED_24G_NETTYPE_MSK ? true : false) +#define is_supported_5g(NetType) ((NetType) & SUPPORTED_5G_NETTYPE_MSK ? true : false) #define IsEnableHWCCK(NetType) IsSupported24G(NetType) -#define IsEnableHWOFDM(NetType) ((NetType) & (WIRELESS_11G | WIRELESS_11_24N | SUPPORTED_5G_NETTYPE_MSK) ? _TRUE : _FALSE) +#define IsEnableHWOFDM(NetType) ((NetType) & (WIRELESS_11G | WIRELESS_11_24N | SUPPORTED_5G_NETTYPE_MSK) ? true : false) #define IsSupportedRxCCK(NetType) IsEnableHWCCK(NetType) #define IsSupportedRxOFDM(NetType) IsEnableHWOFDM(NetType) #define IsSupportedRxHT(NetType) IsEnableHWOFDM(NetType) -#define IsSupportedTxCCK(NetType) ((NetType) & (WIRELESS_11B) ? _TRUE : _FALSE) -#define IsSupportedTxOFDM(NetType) ((NetType) & (WIRELESS_11G | WIRELESS_11A) ? _TRUE : _FALSE) -#define is_supported_ht(NetType) ((NetType) & (WIRELESS_11_24N | WIRELESS_11_5N) ? _TRUE : _FALSE) +#define IsSupportedTxCCK(NetType) ((NetType) & (WIRELESS_11B) ? true : false) +#define IsSupportedTxOFDM(NetType) ((NetType) & (WIRELESS_11G | WIRELESS_11A) ? true : false) +#define is_supported_ht(NetType) ((NetType) & (WIRELESS_11_24N | WIRELESS_11_5N) ? true : false) -#define is_supported_vht(NetType) ((NetType) & (WIRELESS_11AC) ? _TRUE : _FALSE) +#define is_supported_vht(NetType) ((NetType) & (WIRELESS_11AC) ? true : false) diff --git a/include/mp_custom_oid.h b/include/mp_custom_oid.h index 7ca76ad..9eb6ce9 100644 --- a/include/mp_custom_oid.h +++ b/include/mp_custom_oid.h @@ -98,7 +98,7 @@ /* by Owen for RTL8185 Phy Status Report Utility */ -#define OID_RT_UTILITY_FALSE_ALARM_COUNTERS 0xFF818580 +#define OID_RT_UTILITYfalse_ALARM_COUNTERS 0xFF818580 #define OID_RT_UTILITY_SELECT_DEBUG_MODE 0xFF818581 #define OID_RT_UTILITY_SELECT_SUBCARRIER_NUMBER 0xFF818582 #define OID_RT_UTILITY_GET_RSSI_STATUS 0xFF818583 diff --git a/include/osdep_service.h b/include/osdep_service.h index d595a76..cea0d43 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -29,15 +29,6 @@ #define RTW_RBUF_UNAVAIL 5 #define RTW_RBUF_PKT_UNAVAIL 6 -/* #define RTW_STATUS_TIMEDOUT -110 */ - -#undef _TRUE -#define _TRUE 1 - -#undef _FALSE -#define _FALSE 0 - - #include #define RTW_TIMER_HDL_NAME(name) rtw_##name##_timer_hdl @@ -352,7 +343,7 @@ __inline static void rtw_dump_stack(void) __inline static int rtw_bug_check(void *parg1, void *parg2, void *parg3, void *parg4) { - int ret = _TRUE; + int ret = true; return ret; } diff --git a/include/rtl8188e_hal.h b/include/rtl8188e_hal.h index f88133a..1ffc7d7 100644 --- a/include/rtl8188e_hal.h +++ b/include/rtl8188e_hal.h @@ -219,7 +219,7 @@ Total page numbers : 176(0xB0) / 256(0x100) #define INCLUDE_MULTI_FUNC_BT(_Adapter) (GET_HAL_DATA(_Adapter)->MultiFunc & RT_MULTI_FUNC_BT) #define INCLUDE_MULTI_FUNC_GPS(_Adapter) (GET_HAL_DATA(_Adapter)->MultiFunc & RT_MULTI_FUNC_GPS) -/* #define IS_MULTI_FUNC_CHIP(_Adapter) (((((PHAL_DATA_TYPE)(_Adapter->HalData))->MultiFunc) & (RT_MULTI_FUNC_BT|RT_MULTI_FUNC_GPS)) ? _TRUE : _FALSE) */ +/* #define IS_MULTI_FUNC_CHIP(_Adapter) (((((PHAL_DATA_TYPE)(_Adapter->HalData))->MultiFunc) & (RT_MULTI_FUNC_BT|RT_MULTI_FUNC_GPS)) ? true : false) */ /* #define RT_IS_FUNC_DISABLED(__pAdapter, __FuncBits) ( (__pAdapter)->DisabledFunctions & (__FuncBits) ) */ diff --git a/include/rtw_beamforming.h b/include/rtw_beamforming.h index 0923897..59f6622 100644 --- a/include/rtw_beamforming.h +++ b/include/rtw_beamforming.h @@ -93,7 +93,7 @@ enum _SOUNDING_STATE { }; struct beamformee_entry { - u8 used; /* _TRUE/_FALSE */ + u8 used; /* true/false */ u8 txbf; u8 sounding; /* Used to construct AID field of NDPA packet */ @@ -143,7 +143,7 @@ struct beamformee_entry { u8 user_position[16]; /* For 8822B C-cut workaround */ - /* If the flag set to _TRUE, do not sound this STA */ + /* If the flag set to true, do not sound this STA */ u8 bSuspendSUCap; }; diff --git a/include/rtw_io.h b/include/rtw_io.h index 5a1d28d..7bc1cc1 100644 --- a/include/rtw_io.h +++ b/include/rtw_io.h @@ -343,10 +343,10 @@ extern int dbg_rtw_writeN(_adapter *adapter, u32 addr , u32 length , u8 *data, c #define rtw_write_port_cancel(adapter) _rtw_write_port_cancel(adapter) #else /* DBG_IO */ -#define match_read_sniff_ranges(addr, len) _FALSE -#define match_write_sniff_ranges(addr, len) _FALSE -#define match_rf_read_sniff_ranges(path, addr, mask) _FALSE -#define match_rf_write_sniff_ranges(path, addr, mask) _FALSE +#define match_read_sniff_ranges(addr, len) false +#define match_write_sniff_ranges(addr, len) false +#define match_rf_read_sniff_ranges(path, addr, mask) false +#define match_rf_write_sniff_ranges(path, addr, mask) false #define rtw_read8(adapter, addr) _rtw_read8((adapter), (addr)) #define rtw_read16(adapter, addr) _rtw_read16((adapter), (addr)) #define rtw_read32(adapter, addr) _rtw_read32((adapter), (addr)) diff --git a/include/rtw_mlme.h b/include/rtw_mlme.h index 33091bf..3267775 100644 --- a/include/rtw_mlme.h +++ b/include/rtw_mlme.h @@ -106,7 +106,7 @@ void rtw_wfd_st_switch(struct sta_info *sta, bool on); #endif /* !CONFIG_P2P */ #if defined(CONFIG_IOCTL_CFG80211) && defined(CONFIG_P2P) -#define MLME_IS_ROCH(adapter) (rtw_cfg80211_get_is_roch(adapter) == _TRUE) +#define MLME_IS_ROCH(adapter) (rtw_cfg80211_get_is_roch(adapter) == true) #else #define MLME_IS_ROCH(adapter) 0 #endif @@ -446,7 +446,7 @@ struct wifidirect_info { struct tdls_ss_record { /* signal strength record */ u8 macaddr[ETH_ALEN]; u8 RxPWDBAll; - u8 is_tdls_sta; /* _TRUE: direct link sta, _FALSE: else */ + u8 is_tdls_sta; /* true: direct link sta, false: else */ }; struct tdls_temp_mgmt { @@ -920,12 +920,12 @@ __inline static sint check_fwstate(struct mlme_priv *pmlmepriv, sint state) { if ((state == WIFI_NULL_STATE) && (pmlmepriv->fw_state == WIFI_NULL_STATE)) - return _TRUE; + return true; if (pmlmepriv->fw_state & state) - return _TRUE; + return true; - return _FALSE; + return false; } __inline static sint get_fwstate(struct mlme_priv *pmlmepriv) @@ -948,7 +948,7 @@ static inline void set_fwstate(struct mlme_priv *pmlmepriv, sint state) /*bScanInProcess hook in phydm*/ if (_FW_UNDER_SURVEY == state) - pmlmepriv->bScanInProcess = _TRUE; + pmlmepriv->bScanInProcess = true; rtw_mi_update_iface_status(pmlmepriv, state); } @@ -958,7 +958,7 @@ static inline void init_fwstate(struct mlme_priv *pmlmepriv, sint state) /*bScanInProcess hook in phydm*/ if (_FW_UNDER_SURVEY == state) - pmlmepriv->bScanInProcess = _TRUE; + pmlmepriv->bScanInProcess = true; rtw_mi_update_iface_status(pmlmepriv, state); } @@ -969,7 +969,7 @@ static inline void _clr_fwstate_(struct mlme_priv *pmlmepriv, sint state) /*bScanInProcess hook in phydm*/ if (_FW_UNDER_SURVEY == state) - pmlmepriv->bScanInProcess = _FALSE; + pmlmepriv->bScanInProcess = false; rtw_mi_update_iface_status(pmlmepriv, state); } @@ -1052,7 +1052,7 @@ void rtw_clear_scan_deny(_adapter *adapter); void rtw_set_scan_deny_timer_hdl(_adapter *adapter); void rtw_set_scan_deny(_adapter *adapter, u32 ms); #else -#define rtw_is_scan_deny(adapter) _FALSE +#define rtw_is_scan_deny(adapter) false #define rtw_clear_scan_deny(adapter) do {} while (0) #define rtw_set_scan_deny_timer_hdl(adapter) do {} while (0) #define rtw_set_scan_deny(adapter, ms) do {} while (0) diff --git a/include/rtw_mlme_ext.h b/include/rtw_mlme_ext.h index ae3d0a4..73cd9a2 100644 --- a/include/rtw_mlme_ext.h +++ b/include/rtw_mlme_ext.h @@ -518,8 +518,8 @@ u32 rtw_get_ch_waiting_ms(_adapter *adapter, u8 ch, u8 bw, u8 offset, u32 *r_non void rtw_reset_cac(_adapter *adapter, u8 ch, u8 bw, u8 offset); #else #define CH_IS_NON_OCP(rt_ch_info) 0 -#define rtw_chset_is_ch_non_ocp(ch_set, ch, bw, offset) _FALSE -#define rtw_rfctl_is_tx_blocked_by_ch_waiting(rfctl) _FALSE +#define rtw_chset_is_ch_non_ocp(ch_set, ch, bw, offset) false +#define rtw_rfctl_is_tx_blocked_by_ch_waiting(rfctl) false #endif enum { @@ -664,9 +664,9 @@ struct mlme_ext_priv { static inline u8 check_mlmeinfo_state(struct mlme_ext_priv *plmeext, sint state) { if ((plmeext->mlmext_info.state & 0x03) == state) - return _TRUE; + return true; - return _FALSE; + return false; } #define mlmeext_msr(mlmeext) ((mlmeext)->mlmext_info.state & 0x03) diff --git a/include/rtw_mp.h b/include/rtw_mp.h index a7a4a27..90fe8b3 100644 --- a/include/rtw_mp.h +++ b/include/rtw_mp.h @@ -167,7 +167,7 @@ typedef struct _MPT_CONTEXT { WIRELESS_MODE MptWirelessModeToSw; /* Wireless mode to switch. */ u8 MptChannelToSw; /* Channel to switch. */ u8 MptInitGainToSet; /* Initial gain to set. */ - /* u32 bMptAntennaA; */ /* TRUE if we want to use antenna A. */ + /* u32 bMptAntennaA; */ /* true if we want to use antenna A. */ u32 MptBandWidth; /* bandwidth to switch. */ u32 mpt_rate_index;/* rate index. */ @@ -181,25 +181,25 @@ typedef struct _MPT_CONTEXT { u32 RegTxPwrLimit; /* Content of RCR Regsiter for Mass Production Test. */ u32 MptRCR; - /* TRUE if we only receive packets with specific pattern. */ + /* true if we only receive packets with specific pattern. */ bool bMptFilterPattern; /* Rx OK count, statistics used in Mass Production Test. */ u32 MptRxOkCnt; /* Rx CRC32 error count, statistics used in Mass Production Test. */ u32 MptRxCrcErrCnt; - bool bCckContTx; /* TRUE if we are in CCK Continuous Tx test. */ - bool bOfdmContTx; /* TRUE if we are in OFDM Continuous Tx test. */ - /* TRUE if we have start Continuous Tx test. */ + bool bCckContTx; /* true if we are in CCK Continuous Tx test. */ + bool bOfdmContTx; /* true if we are in OFDM Continuous Tx test. */ + /* true if we have start Continuous Tx test. */ bool is_start_cont_tx; - /* TRUE if we are in Single Carrier Tx test. */ + /* true if we are in Single Carrier Tx test. */ bool bSingleCarrier; - /* TRUE if we are in Carrier Suppression Tx Test. */ + /* true if we are in Carrier Suppression Tx Test. */ bool is_carrier_suppression; - /* TRUE if we are in Single Tone Tx test. */ + /* true if we are in Single Tone Tx test. */ bool is_single_tone; @@ -402,8 +402,8 @@ typedef struct _MP_FIRMWARE { /* *********************************************************************** */ -#define LOWER _TRUE -#define RAISE _FALSE +#define LOWER true +#define RAISE false /* Hardware Registers */ #define BB_REG_BASE_ADDR 0x800 diff --git a/include/rtw_pwrctrl.h b/include/rtw_pwrctrl.h index 50194e3..00c397d 100644 --- a/include/rtw_pwrctrl.h +++ b/include/rtw_pwrctrl.h @@ -199,7 +199,7 @@ typedef enum _rt_rf_power_state { #define RT_RF_LPS_DISALBE_2R BIT(30) /* When LPS is on, disable 2R if no packet is received or transmittd. */ #define RT_RF_LPS_LEVEL_ASPM BIT(31) /* LPS with ASPM */ -#define RT_IN_PS_LEVEL(ppsc, _PS_FLAG) ((ppsc->cur_ps_level & _PS_FLAG) ? _TRUE : _FALSE) +#define RT_IN_PS_LEVEL(ppsc, _PS_FLAG) ((ppsc->cur_ps_level & _PS_FLAG) ? true : false) #define RT_CLEAR_PS_LEVEL(ppsc, _PS_FLAG) (ppsc->cur_ps_level &= (~(_PS_FLAG))) #define RT_SET_PS_LEVEL(ppsc, _PS_FLAG) (ppsc->cur_ps_level |= _PS_FLAG) @@ -528,8 +528,8 @@ void rtw_set_do_late_resume(struct pwrctrl_priv *pwrpriv, bool enable); void rtw_register_early_suspend(struct pwrctrl_priv *pwrpriv); void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv); #else -#define rtw_is_earlysuspend_registered(pwrpriv) _FALSE -#define rtw_is_do_late_resume(pwrpriv) _FALSE +#define rtw_is_earlysuspend_registered(pwrpriv) false +#define rtw_is_do_late_resume(pwrpriv) false #define rtw_set_do_late_resume(pwrpriv, enable) do {} while (0) #define rtw_register_early_suspend(pwrpriv) do {} while (0) #define rtw_unregister_early_suspend(pwrpriv) do {} while (0) diff --git a/include/rtw_security.h b/include/rtw_security.h index 8c2891f..dd3e5e6 100644 --- a/include/rtw_security.h +++ b/include/rtw_security.h @@ -184,7 +184,7 @@ struct security_priv { s32 sw_encrypt;/* from registry_priv */ s32 sw_decrypt;/* from registry_priv */ - s32 hw_decrypted;/* if the rx packets is hw_decrypted==_FALSE, it means the hw has not been ready. */ + s32 hw_decrypted;/* if the rx packets is hw_decrypted==false, it means the hw has not been ready. */ /* keeps the auth_type & enc_status from upper layer ioctl(wpa_supplicant or wzc) */ diff --git a/include/rtw_xmit.h b/include/rtw_xmit.h index 9b755f1..1134090 100644 --- a/include/rtw_xmit.h +++ b/include/rtw_xmit.h @@ -118,10 +118,10 @@ * (1, 1) : AMPDU and AMSDU in AMPDU are enable. So, AMSDU is valid to send. */ #define IS_AMSDU_AMPDU_NOT_VALID(pattrib)\ - ((pattrib->ampdu_en == _TRUE) && (pattrib->amsdu_ampdu_en == _FALSE)) + ((pattrib->ampdu_en == true) && (pattrib->amsdu_ampdu_en == false)) #define IS_AMSDU_AMPDU_VALID(pattrib)\ - !((pattrib->ampdu_en == _TRUE) && (pattrib->amsdu_ampdu_en == _FALSE)) + !((pattrib->ampdu_en == true) && (pattrib->amsdu_ampdu_en == false)) #define HWXMIT_ENTRY 4 diff --git a/include/usb_ops.h b/include/usb_ops.h index 7e65bb3..0ea9fa3 100644 --- a/include/usb_ops.h +++ b/include/usb_ops.h @@ -61,14 +61,14 @@ enum RTW_USB_SPEED { static inline u8 rtw_usb_bulk_size_boundary(_adapter *padapter, int buf_len) { - u8 rst = _TRUE; + u8 rst = true; if (IS_SUPER_SPEED_USB(padapter)) - rst = (0 == (buf_len) % USB_SUPER_SPEED_BULK_SIZE) ? _TRUE : _FALSE; + rst = (0 == (buf_len) % USB_SUPER_SPEED_BULK_SIZE) ? true : false; if (IS_HIGH_SPEED_USB(padapter)) - rst = (0 == (buf_len) % USB_HIGH_SPEED_BULK_SIZE) ? _TRUE : _FALSE; + rst = (0 == (buf_len) % USB_HIGH_SPEED_BULK_SIZE) ? true : false; else - rst = (0 == (buf_len) % USB_FULL_SPEED_BULK_SIZE) ? _TRUE : _FALSE; + rst = (0 == (buf_len) % USB_FULL_SPEED_BULK_SIZE) ? true : false; return rst; } diff --git a/include/wifi.h b/include/wifi.h index d83a81a..c87dfc7 100644 --- a/include/wifi.h +++ b/include/wifi.h @@ -409,15 +409,15 @@ enum WIFI_REG_DOMAIN { (\ ((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 \ ) __inline static int IS_MCAST(unsigned char *da) { if ((*da) & 0x01) - return _TRUE; + return true; else - return _FALSE; + return false; } __inline static unsigned char *get_ra(unsigned char *pframe) @@ -507,9 +507,9 @@ __inline static unsigned char *get_hdr_bssid(unsigned char *pframe) __inline static int IsFrameTypeCtrl(unsigned char *pframe) { if (WIFI_CTRL_TYPE == GetFrameType(pframe)) - return _TRUE; + return true; else - return _FALSE; + return false; } /*----------------------------------------------------------------------------- Below is for the security related definition diff --git a/os_dep/ioctl_cfg80211.c b/os_dep/ioctl_cfg80211.c index 06a870d..cca99d6 100644 --- a/os_dep/ioctl_cfg80211.c +++ b/os_dep/ioctl_cfg80211.c @@ -375,7 +375,7 @@ static int rtw_cfg80211_clear_wps_sr_of_non_target_bss(_adapter *padapter, struc u8 *wpsie = NULL; if (pssid->SsidLength == req_ssid->ssid_len - && _rtw_memcmp(pssid->Ssid, req_ssid->ssid, req_ssid->ssid_len) == _TRUE) + && _rtw_memcmp(pssid->Ssid, req_ssid->ssid, req_ssid->ssid_len) == true) goto exit; wpsie = rtw_get_wps_ie(pnetwork->network.IEs + _FIXED_IE_LENGTH_ @@ -461,7 +461,7 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net notify_ielen = pnetwork->network.IELength - _FIXED_IE_LENGTH_; /* We've set wiphy's signal_type as CFG80211_SIGNAL_TYPE_MBM: signal strength in mBm (100*dBm) */ - if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE && + if (check_fwstate(pmlmepriv, _FW_LINKED) == true && is_same_network(&pmlmepriv->cur_network.network, &pnetwork->network, 0)) { notify_signal = 100 * translate_percentage_to_dbm(padapter->recvpriv.signal_strength); /* dbm */ } else { @@ -537,7 +537,7 @@ exit: Check the given bss is valid by kernel API cfg80211_get_bss() @padapter : the given adapter - return _TRUE if bss is valid, _FALSE for not found. + return true if bss is valid, false for not found. */ int rtw_cfg80211_check_bss(_adapter *padapter) { @@ -547,7 +547,7 @@ int rtw_cfg80211_check_bss(_adapter *padapter) u32 freq; if (!(pnetwork) || !(padapter->rtw_wdev)) - return _FALSE; + return false; freq = rtw_ch2freq(pnetwork->Configuration.DSConfig); notify_channel = ieee80211_get_channel(padapter->rtw_wdev->wiphy, freq); @@ -598,7 +598,7 @@ void rtw_cfg80211_ibss_indicate_connect(_adapter *padapter) WLAN_BSSID_EX *pnetwork = &(padapter->mlmeextpriv.mlmext_info.network); struct wlan_network *scanned = pmlmepriv->cur_network_scanned; - if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE) { + if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) { _rtw_memcpy(&cur_network->network, pnetwork, sizeof(WLAN_BSSID_EX)); if (cur_network) { @@ -614,8 +614,8 @@ void rtw_cfg80211_ibss_indicate_connect(_adapter *padapter) if (scanned == NULL) rtw_warn_on(1); - if (_rtw_memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(NDIS_802_11_SSID)) == _TRUE - && _rtw_memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(NDIS_802_11_MAC_ADDRESS)) == _TRUE + if (_rtw_memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(NDIS_802_11_SSID)) == true + && _rtw_memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(NDIS_802_11_MAC_ADDRESS)) == true ) { if (!rtw_cfg80211_inform_bss(padapter, scanned)) RTW_INFO(FUNC_ADPT_FMT" inform fail !!\n", FUNC_ADPT_ARG(padapter)); @@ -658,7 +658,7 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter) ) return; - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) return; #ifdef CONFIG_P2P @@ -674,7 +674,7 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter) } #endif /* CONFIG_P2P */ - if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) != _TRUE) { + if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) != true) { WLAN_BSSID_EX *pnetwork = &(padapter->mlmeextpriv.mlmext_info.network); struct wlan_network *scanned = pmlmepriv->cur_network_scanned; @@ -685,8 +685,8 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter) goto check_bss; } - if (_rtw_memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(NDIS_802_11_MAC_ADDRESS)) == _TRUE - && _rtw_memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(NDIS_802_11_SSID)) == _TRUE + if (_rtw_memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(NDIS_802_11_MAC_ADDRESS)) == true + && _rtw_memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(NDIS_802_11_SSID)) == true ) { if (!rtw_cfg80211_inform_bss(padapter, scanned)) RTW_INFO(FUNC_ADPT_FMT" inform fail !!\n", FUNC_ADPT_ARG(padapter)); @@ -786,7 +786,7 @@ void rtw_cfg80211_indicate_disconnect(_adapter *padapter, u16 reason, u8 locally ) return; - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) return; #ifdef CONFIG_P2P @@ -961,7 +961,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa _rtw_memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8); _rtw_memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8); - psecuritypriv->busetkipkey = _TRUE; + psecuritypriv->busetkipkey = true; } else if (strcmp(param->u.crypt.alg, "CCMP") == 0) { RTW_INFO("%s, set group_key, CCMP\n", __func__); @@ -982,7 +982,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa printk(" %02x ", padapter->securitypriv.dot11wBIPKey[param->u.crypt.idx].skey[no]); RTW_INFO("\n"); */ padapter->securitypriv.dot11wBIPKeyid = param->u.crypt.idx; - padapter->securitypriv.binstallBIPkey = _TRUE; + padapter->securitypriv.binstallBIPkey = true; RTW_INFO(" ~~~~set sta key:IGKT\n"); goto exit; } @@ -995,7 +995,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa psecuritypriv->dot118021XGrpKeyid = param->u.crypt.idx; - psecuritypriv->binstallGrpkey = _TRUE; + psecuritypriv->binstallGrpkey = true; psecuritypriv->dot11PrivacyAlgrthm = psecuritypriv->dot118021XGrpPrivacy;/* !!! */ @@ -1003,7 +1003,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa pbcmc_sta = rtw_get_bcmc_stainfo(padapter); if (pbcmc_sta) { - pbcmc_sta->ieee8021x_blocked = _FALSE; + pbcmc_sta->ieee8021x_blocked = false; pbcmc_sta->dot118021XPrivacy = psecuritypriv->dot118021XGrpPrivacy; /* rx will use bmc_sta's dot118021XPrivacy */ } @@ -1034,7 +1034,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa _rtw_memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8); _rtw_memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8); - psecuritypriv->busetkipkey = _TRUE; + psecuritypriv->busetkipkey = true; } else if (strcmp(param->u.crypt.alg, "CCMP") == 0) { @@ -1049,9 +1049,9 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa rtw_ap_set_pairwise_key(padapter, psta); - psta->ieee8021x_blocked = _FALSE; + psta->ieee8021x_blocked = false; - psta->bpairwise_key_installed = _TRUE; + psta->bpairwise_key_installed = true; } else { /* group key??? */ if (strcmp(param->u.crypt.alg, "WEP") == 0) { @@ -1070,7 +1070,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa _rtw_memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8); _rtw_memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8); - psecuritypriv->busetkipkey = _TRUE; + psecuritypriv->busetkipkey = true; } else if (strcmp(param->u.crypt.alg, "CCMP") == 0) { psecuritypriv->dot118021XGrpPrivacy = _AES_; @@ -1081,7 +1081,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa psecuritypriv->dot118021XGrpKeyid = param->u.crypt.idx; - psecuritypriv->binstallGrpkey = _TRUE; + psecuritypriv->binstallGrpkey = true; psecuritypriv->dot11PrivacyAlgrthm = psecuritypriv->dot118021XGrpPrivacy;/* !!! */ @@ -1089,7 +1089,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa pbcmc_sta = rtw_get_bcmc_stainfo(padapter); if (pbcmc_sta) { - pbcmc_sta->ieee8021x_blocked = _FALSE; + pbcmc_sta->ieee8021x_blocked = false; pbcmc_sta->dot118021XPrivacy = psecuritypriv->dot118021XGrpPrivacy; /* rx will use bmc_sta's dot118021XPrivacy */ } @@ -1181,7 +1181,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param psecuritypriv->dot11DefKeylen[wep_key_idx] = wep_key_len; - rtw_set_key(padapter, psecuritypriv, wep_key_idx, 0, _TRUE); + rtw_set_key(padapter, psecuritypriv, wep_key_idx, 0, true); goto exit; } @@ -1192,7 +1192,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param /* RTW_INFO("%s, : dot11AuthAlgrthm == dot11AuthAlgrthm_8021X\n", __func__); */ - if (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_MP_STATE) == _TRUE) { /* sta mode */ + if (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_MP_STATE) == true) { /* sta mode */ #ifdef CONFIG_RTW_80211R if ((rtw_to_roam(padapter) > 0) && rtw_chk_ft_flags(padapter, RTW_FT_SUPPORTED)) psta = rtw_get_stainfo(pstapriv, pmlmepriv->assoc_bssid); @@ -1205,7 +1205,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param } else { /* Jeff: don't disable ieee8021x_blocked while clearing key */ if (strcmp(param->u.crypt.alg, "none") != 0) - psta->ieee8021x_blocked = _FALSE; + psta->ieee8021x_blocked = false; if ((padapter->securitypriv.ndisencryptstatus == Ndis802_11Encryption2Enabled) || @@ -1223,24 +1223,24 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param _rtw_memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8); _rtw_memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8); - padapter->securitypriv.busetkipkey = _FALSE; + padapter->securitypriv.busetkipkey = false; /* _set_timer(&padapter->securitypriv.tkip_timer, 50); */ } - psta->bpairwise_key_installed = _TRUE; + psta->bpairwise_key_installed = true; #ifdef CONFIG_RTW_80211R - psta->ft_pairwise_key_installed = _TRUE; + psta->ft_pairwise_key_installed = true; #endif /* DEBUG_ERR((" param->u.crypt.key_len=%d\n", param->u.crypt.key_len)); */ RTW_INFO(" ~~~~set sta key:unicastkey\n"); - rtw_setstakey_cmd(padapter, psta, UNICAST_KEY, _TRUE); + rtw_setstakey_cmd(padapter, psta, UNICAST_KEY, true); } else { /* group key */ if (strcmp(param->u.crypt.alg, "TKIP") == 0 || strcmp(param->u.crypt.alg, "CCMP") == 0) { _rtw_memcpy(padapter->securitypriv.dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); _rtw_memcpy(padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8); _rtw_memcpy(padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8); - padapter->securitypriv.binstallGrpkey = _TRUE; + padapter->securitypriv.binstallGrpkey = true; if (param->u.crypt.idx < 4) _rtw_memcpy(padapter->securitypriv.iv_seq[param->u.crypt.idx], param->u.crypt.seq, 8); @@ -1248,7 +1248,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param RTW_INFO(" ~~~~set sta key:groupkey\n"); padapter->securitypriv.dot118021XGrpKeyid = param->u.crypt.idx; - rtw_set_key(padapter, &padapter->securitypriv, param->u.crypt.idx, 1, _TRUE); + rtw_set_key(padapter, &padapter->securitypriv, param->u.crypt.idx, 1, true); } #ifdef CONFIG_IEEE80211W else if (strcmp(param->u.crypt.alg, "BIP") == 0) { @@ -1262,7 +1262,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param printk(" %02x ", padapter->securitypriv.dot11wBIPKey[param->u.crypt.idx].skey[no]); RTW_INFO("\n");*/ padapter->securitypriv.dot11wBIPKeyid = param->u.crypt.idx; - padapter->securitypriv.binstallBIPkey = _TRUE; + padapter->securitypriv.binstallBIPkey = true; RTW_INFO(" ~~~~set sta key:IGKT\n"); } #endif /* CONFIG_IEEE80211W */ @@ -1283,7 +1283,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param } else { /* Jeff: don't disable ieee8021x_blocked while clearing key */ if (strcmp(param->u.crypt.alg, "none") != 0) - pbcmc_sta->ieee8021x_blocked = _FALSE; + pbcmc_sta->ieee8021x_blocked = false; if ((padapter->securitypriv.ndisencryptstatus == Ndis802_11Encryption2Enabled) || (padapter->securitypriv.ndisencryptstatus == Ndis802_11Encryption3Enabled)) @@ -1460,9 +1460,9 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev, _rtw_memcpy(param->u.crypt.key, (u8 *)params->key, params->key_len); } - if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE) { + if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) { #ifdef CONFIG_TDLS - if (rtw_tdls_is_driver_setup(padapter) == _FALSE && mac_addr) { + if (rtw_tdls_is_driver_setup(padapter) == false && mac_addr) { ptdls_sta = rtw_get_stainfo(&padapter->stapriv, (void *)mac_addr); if (ptdls_sta != NULL && ptdls_sta->tdls_sta_state) { _rtw_memcpy(ptdls_sta->tpk.tk, params->key, params->key_len); @@ -1473,15 +1473,15 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev, #endif /* CONFIG_TDLS */ ret = rtw_cfg80211_set_encryption(ndev, param, param_len); - } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) { + } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) { #ifdef CONFIG_AP_MODE if (mac_addr) _rtw_memcpy(param->sta_addr, (void *)mac_addr, ETH_ALEN); ret = rtw_cfg80211_ap_set_encryption(ndev, param, param_len); #endif - } 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_INFO("@@@@@@@@@@ fw_state=0x%x, iftype=%d\n", pmlmepriv->fw_state, rtw_wdev->iftype); */ ret = rtw_cfg80211_set_encryption(ndev, param, param_len); @@ -1603,7 +1603,7 @@ static int cfg80211_rtw_set_rekey_data(struct wiphy *wiphy, for(i=0;ikck[i]);*/ _rtw_memcpy(psta->replay_ctr, data->replay_ctr, NL80211_REPLAY_CTR_LEN); - psecuritypriv->binstallKCK_KEK = _TRUE; + psecuritypriv->binstallKCK_KEK = true; /*printk("\nREPLAY_CTR: "); for(i=0;ireplay_ctr[i]);*/ @@ -1651,7 +1651,7 @@ static int cfg80211_rtw_get_station(struct wiphy *wiphy, ) { struct wlan_network *cur_network = &(pmlmepriv->cur_network); - if (_rtw_memcmp((u8 *)mac, cur_network->network.MacAddress, ETH_ALEN) == _FALSE) { + if (_rtw_memcmp((u8 *)mac, cur_network->network.MacAddress, ETH_ALEN) == false) { RTW_INFO("%s, mismatch bssid="MAC_FMT"\n", __func__, MAC_ARG(cur_network->network.MacAddress)); ret = -ENOENT; goto exit; @@ -1705,14 +1705,14 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy, struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); #ifdef CONFIG_P2P struct wifidirect_info *pwdinfo = &(padapter->wdinfo); - u8 is_p2p = _FALSE; + u8 is_p2p = false; #endif int ret = 0; - u8 change = _FALSE; + u8 change = false; RTW_INFO(FUNC_NDEV_FMT" type=%d, hw_port:%d\n", FUNC_NDEV_ARG(ndev), type, padapter->hw_port); - if (adapter_to_dvobj(padapter)->processing_dev_remove == _TRUE) { + if (adapter_to_dvobj(padapter)->processing_dev_remove == true) { ret = -EPERM; goto exit; } @@ -1737,7 +1737,7 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy, FUNC_NDEV_ARG(ndev), old_type, type); if (old_type != type) { - change = _TRUE; + change = true; pmlmeext->action_public_rxseq = 0xffff; pmlmeext->action_public_dialog_token = 0xff; } @@ -1764,14 +1764,14 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy, #if defined(CONFIG_P2P) && ((LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)) case NL80211_IFTYPE_P2P_CLIENT: - is_p2p = _TRUE; + is_p2p = true; #endif case NL80211_IFTYPE_STATION: networkType = Ndis802_11Infrastructure; #ifdef CONFIG_P2P if (change && pwdinfo->driver_interface == DRIVER_CFG80211) { - if (is_p2p == _TRUE) + if (is_p2p == true) rtw_p2p_enable(padapter, P2P_ROLE_CLIENT); #if !RTW_P2P_GROUP_INTERFACE else if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_CLIENT) @@ -1788,14 +1788,14 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy, #if defined(CONFIG_P2P) && ((LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)) case NL80211_IFTYPE_P2P_GO: - is_p2p = _TRUE; + is_p2p = true; #endif case NL80211_IFTYPE_AP: networkType = Ndis802_11APMode; #ifdef CONFIG_P2P if (change && pwdinfo->driver_interface == DRIVER_CFG80211) { - if (is_p2p == _TRUE) + if (is_p2p == true) rtw_p2p_enable(padapter, P2P_ROLE_GO); #if !RTW_P2P_GROUP_INTERFACE else if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) { @@ -1819,13 +1819,13 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy, rtw_wdev->iftype = type; - if (rtw_set_802_11_infrastructure_mode(padapter, networkType) == _FALSE) { + if (rtw_set_802_11_infrastructure_mode(padapter, networkType) == false) { rtw_wdev->iftype = old_type; ret = -EPERM; goto exit; } - rtw_setopmode_cmd(padapter, networkType, _TRUE); + rtw_setopmode_cmd(padapter, networkType, true); exit: @@ -1873,7 +1873,7 @@ void rtw_cfg80211_indicate_scan_done(_adapter *adapter, bool aborted) u32 rtw_cfg80211_wait_scan_req_empty(_adapter *adapter, u32 timeout_ms) { struct rtw_wdev_priv *wdev_priv = adapter_wdev_data(adapter); - u8 empty = _FALSE; + u8 empty = false; u32 start; u32 pass_ms; @@ -1885,7 +1885,7 @@ u32 rtw_cfg80211_wait_scan_req_empty(_adapter *adapter, u32 timeout_ms) break; if (!wdev_priv->scan_request) { - empty = _TRUE; + empty = true; break; } @@ -1894,7 +1894,7 @@ u32 rtw_cfg80211_wait_scan_req_empty(_adapter *adapter, u32 timeout_ms) pass_ms = rtw_get_passing_time_ms(start); - if (empty == _FALSE && pass_ms > timeout_ms) + if (empty == false && pass_ms > timeout_ms) RTW_INFO(FUNC_ADPT_FMT" pass_ms:%u, timeout\n" , FUNC_ADPT_ARG(adapter), pass_ms); @@ -1983,15 +1983,15 @@ static void _rtw_cfg80211_surveydone_event_callback(_adapter *padapter, struct c plist = get_next(phead); 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); /* report network only if the current channel set contains the channel to which this network belongs */ if (rtw_ch_set_search_ch(padapter->mlmeextpriv.channel_set, pnetwork->network.Configuration.DSConfig) >= 0 - && rtw_mlme_band_check(padapter, pnetwork->network.Configuration.DSConfig) == _TRUE - && _TRUE == rtw_validate_ssid(&(pnetwork->network.Ssid)) + && rtw_mlme_band_check(padapter, pnetwork->network.Configuration.DSConfig) == true + && true == rtw_validate_ssid(&(pnetwork->network.Ssid)) ) { if (target_wps_scan) rtw_cfg80211_clear_wps_sr_of_non_target_bss(padapter, pnetwork, &target_ssid); @@ -2111,7 +2111,7 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(_adapter *padapter, char *buf, in u8 rtw_cfg80211_scan_via_buddy(_adapter *padapter, struct cfg80211_scan_request *request) { int i; - u8 ret = _FALSE; + u8 ret = false; _adapter *iface = NULL; unsigned long irqL; struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); @@ -2129,7 +2129,7 @@ u8 rtw_cfg80211_scan_via_buddy(_adapter *padapter, struct cfg80211_scan_request if (iface == padapter) continue; - if (rtw_is_adapter_up(iface) == _FALSE) + if (rtw_is_adapter_up(iface) == false) continue; buddy_mlmepriv = &iface->mlmepriv; @@ -2140,17 +2140,17 @@ u8 rtw_cfg80211_scan_via_buddy(_adapter *padapter, struct cfg80211_scan_request _enter_critical_bh(&pwdev_priv->scan_req_lock, &irqL); _enter_critical_bh(&buddy_wdev_priv->scan_req_lock, &irqL); if (buddy_wdev_priv->scan_request) { - pmlmepriv->scanning_via_buddy_intf = _TRUE; + pmlmepriv->scanning_via_buddy_intf = true; _enter_critical_bh(&pmlmepriv->lock, &irqL); set_fwstate(pmlmepriv, _FW_UNDER_SURVEY); _exit_critical_bh(&pmlmepriv->lock, &irqL); pwdev_priv->scan_request = request; - ret = _TRUE; + ret = true; } _exit_critical_bh(&buddy_wdev_priv->scan_req_lock, &irqL); _exit_critical_bh(&pwdev_priv->scan_req_lock, &irqL); - if (ret == _TRUE) + if (ret == true) goto exit; } @@ -2179,16 +2179,16 @@ void rtw_cfg80211_indicate_scan_done_for_buddy(_adapter *padapter, bool bscan_ab mlmepriv = &(iface->mlmepriv); wdev_priv = adapter_wdev_data(iface); - indicate_buddy_scan = _FALSE; + indicate_buddy_scan = false; _enter_critical_bh(&wdev_priv->scan_req_lock, &irqL); - if (wdev_priv->scan_request && mlmepriv->scanning_via_buddy_intf == _TRUE) { - mlmepriv->scanning_via_buddy_intf = _FALSE; + if (wdev_priv->scan_request && mlmepriv->scanning_via_buddy_intf == true) { + mlmepriv->scanning_via_buddy_intf = false; clr_fwstate(mlmepriv, _FW_UNDER_SURVEY); - indicate_buddy_scan = _TRUE; + indicate_buddy_scan = true; } _exit_critical_bh(&wdev_priv->scan_req_lock, &irqL); - if (indicate_buddy_scan == _TRUE) { + if (indicate_buddy_scan == true) { rtw_cfg80211_surveydone_event_callback(iface); rtw_indicate_scan_done(iface, bscan_aborted); } @@ -2205,7 +2205,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy , struct cfg80211_scan_request *request) { int i, chan_num = 0; - u8 _status = _FALSE; + u8 _status = false; int ret = 0; NDIS_802_11_SSID ssid[RTW_SSID_SCAN_AMOUNT]; struct rtw_ieee80211_channel ch[RTW_CHANNEL_SCAN_AMOUNT]; @@ -2219,8 +2219,8 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy u8 survey_times_for_one_ch = 6; struct cfg80211_ssid *ssids = request->ssids; int social_channel = 0, j = 0; - bool need_indicate_scan_done = _FALSE; - bool ps_denied = _FALSE; + bool need_indicate_scan_done = false; + bool ps_denied = false; _adapter *padapter; struct wireless_dev *wdev; @@ -2269,16 +2269,16 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy } #endif - if (adapter_wdev_data(padapter)->block_scan == _TRUE) { + if (adapter_wdev_data(padapter)->block_scan == true) { RTW_INFO(FUNC_ADPT_FMT" wdev_priv.block_scan is set\n", FUNC_ADPT_ARG(padapter)); - need_indicate_scan_done = _TRUE; + need_indicate_scan_done = true; goto check_need_indicate_scan_done; } rtw_ps_deny(padapter, PS_DENY_SCAN); - ps_denied = _TRUE; + ps_denied = true; if (_FAIL == rtw_pwr_wakeup(padapter)) { - need_indicate_scan_done = _TRUE; + need_indicate_scan_done = true; goto check_need_indicate_scan_done; } @@ -2313,33 +2313,33 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy if (rtw_is_scan_deny(padapter)) { RTW_INFO(FUNC_ADPT_FMT ": scan deny\n", FUNC_ADPT_ARG(padapter)); - need_indicate_scan_done = _TRUE; + need_indicate_scan_done = true; goto check_need_indicate_scan_done; } /* check fw state*/ - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) { + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) { #ifdef CONFIG_DEBUG_CFG80211 RTW_INFO(FUNC_ADPT_FMT" under WIFI_AP_STATE\n", FUNC_ADPT_ARG(padapter)); #endif - if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS | _FW_UNDER_SURVEY | _FW_UNDER_LINKING) == _TRUE) { + if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS | _FW_UNDER_SURVEY | _FW_UNDER_LINKING) == true) { RTW_INFO("%s, fwstate=0x%x\n", __func__, pmlmepriv->fw_state); if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS)) RTW_INFO("AP mode process WPS\n"); - need_indicate_scan_done = _TRUE; + need_indicate_scan_done = true; goto check_need_indicate_scan_done; } } - if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE) { + if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) { RTW_INFO("%s, fwstate=0x%x\n", __func__, pmlmepriv->fw_state); - need_indicate_scan_done = _TRUE; + need_indicate_scan_done = true; goto check_need_indicate_scan_done; - } else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == _TRUE) { + } else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true) { RTW_INFO("%s, fwstate=0x%x\n", __func__, pmlmepriv->fw_state); ret = -EBUSY; goto check_need_indicate_scan_done; @@ -2348,29 +2348,29 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy #ifdef CONFIG_CONCURRENT_MODE if (rtw_mi_buddy_check_fwstate(padapter, _FW_UNDER_LINKING | WIFI_UNDER_WPS)) { RTW_INFO("%s exit due to buddy_intf's mlme state under linking or wps\n", __func__); - need_indicate_scan_done = _TRUE; + need_indicate_scan_done = true; goto check_need_indicate_scan_done; } else if (rtw_mi_buddy_check_fwstate(padapter, _FW_UNDER_SURVEY)) { bool scan_via_buddy = rtw_cfg80211_scan_via_buddy(padapter, request); - if (scan_via_buddy == _FALSE) - need_indicate_scan_done = _TRUE; + if (scan_via_buddy == false) + need_indicate_scan_done = true; goto check_need_indicate_scan_done; } #endif /* CONFIG_CONCURRENT_MODE */ /* busy traffic check*/ - if (rtw_mi_busy_traffic_check(padapter, _TRUE)) { - need_indicate_scan_done = _TRUE; + if (rtw_mi_busy_traffic_check(padapter, true)) { + need_indicate_scan_done = true; goto check_need_indicate_scan_done; } #ifdef CONFIG_P2P if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE) && !rtw_p2p_chk_state(pwdinfo, P2P_STATE_IDLE)) { rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH); - rtw_free_network_queue(padapter, _TRUE); + rtw_free_network_queue(padapter, true); if (social_channel == 0) rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_NONE); @@ -2427,7 +2427,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy _exit_critical_bh(&pwdev_priv->scan_req_lock, &irqL); check_need_indicate_scan_done: - if (_TRUE == need_indicate_scan_done) { + if (true == need_indicate_scan_done) { #if (KERNEL_VERSION(4, 7, 0) <= LINUX_VERSION_CODE) struct cfg80211_scan_info info; @@ -2443,7 +2443,7 @@ check_need_indicate_scan_done: } cancel_ps_deny: - if (ps_denied == _TRUE) + if (ps_denied == true) rtw_ps_deny_cancel(padapter, PS_DENY_SCAN); exit: @@ -2804,7 +2804,7 @@ static int rtw_cfg80211_set_wpa_ie(_adapter *padapter, u8 *pie, size_t ielen) || padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_WTMIC_ || padapter->securitypriv.dot11PrivacyAlgrthm == _AES_) /* WPS open need to enable multicast */ - /* || check_fwstate(&padapter->mlmepriv, WIFI_UNDER_WPS) == _TRUE) */ + /* || check_fwstate(&padapter->mlmepriv, WIFI_UNDER_WPS) == true) */ rtw_hal_set_hwreg(padapter, HW_VAR_OFF_RCR_AM, null_addr); @@ -2867,7 +2867,7 @@ static int cfg80211_rtw_join_ibss(struct wiphy *wiphy, struct net_device *ndev, ret = -EINVAL; goto cancel_ps_deny; } - rtw_mi_buddy_scan_abort(padapter, _TRUE); /* OR rtw_mi_scan_abort(padapter, _TRUE);*/ + rtw_mi_buddy_scan_abort(padapter, true); /* OR rtw_mi_scan_abort(padapter, true);*/ #endif /*CONFIG_CONCURRENT_MODE*/ @@ -2889,7 +2889,7 @@ static int cfg80211_rtw_join_ibss(struct wiphy *wiphy, struct net_device *ndev, RTW_INFO("%s: center_freq = %d\n", __func__, pch->center_freq); pmlmeext->cur_channel = rtw_freq2ch(pch->center_freq); - if (rtw_set_802_11_ssid(padapter, &ndis_ssid) == _FALSE) { + if (rtw_set_802_11_ssid(padapter, &ndis_ssid) == false) { ret = -1; goto cancel_ps_deny; } @@ -2910,7 +2910,7 @@ static int cfg80211_rtw_leave_ibss(struct wiphy *wiphy, struct net_device *ndev) RTW_INFO(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev)); #ifdef SUPPLICANT_RTK_VERSION_LOWER_THAN_JB42 - padapter->mlmepriv.not_indic_disco = _TRUE; + padapter->mlmepriv.not_indic_disco = true; #endif old_type = rtw_wdev->iftype; @@ -2923,17 +2923,17 @@ static int cfg80211_rtw_leave_ibss(struct wiphy *wiphy, struct net_device *ndev) rtw_wdev->iftype = NL80211_IFTYPE_STATION; - if (rtw_set_802_11_infrastructure_mode(padapter, Ndis802_11Infrastructure) == _FALSE) { + if (rtw_set_802_11_infrastructure_mode(padapter, Ndis802_11Infrastructure) == false) { rtw_wdev->iftype = old_type; ret = -EPERM; goto leave_ibss; } - rtw_setopmode_cmd(padapter, Ndis802_11Infrastructure, _TRUE); + rtw_setopmode_cmd(padapter, Ndis802_11Infrastructure, true); } leave_ibss: #ifdef SUPPLICANT_RTK_VERSION_LOWER_THAN_JB42 - padapter->mlmepriv.not_indic_disco = _FALSE; + padapter->mlmepriv.not_indic_disco = false; #endif return 0; @@ -2950,16 +2950,16 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev, NDIS_802_11_SSID ndis_ssid; u8 *dst_ssid, *src_ssid; u8 *dst_bssid, *src_bssid; - /* u8 matched_by_bssid=_FALSE; */ - /* u8 matched_by_ssid=_FALSE; */ - u8 matched = _FALSE; + /* u8 matched_by_bssid=false; */ + /* u8 matched_by_ssid=false; */ + u8 matched = false; _adapter *padapter = (_adapter *)rtw_netdev_priv(ndev); struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct security_priv *psecuritypriv = &padapter->securitypriv; _queue *queue = &pmlmepriv->scanned_queue; #ifdef SUPPLICANT_RTK_VERSION_LOWER_THAN_JB42 - padapter->mlmepriv.not_indic_disco = _TRUE; + padapter->mlmepriv.not_indic_disco = true; #endif RTW_INFO("=>"FUNC_NDEV_FMT" - Start to Connection\n", FUNC_NDEV_ARG(ndev)); @@ -2967,7 +2967,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev, sme->privacy, sme->key, sme->key_len, sme->key_idx, sme->auth_type); - if (adapter_wdev_data(padapter)->block == _TRUE) { + if (adapter_wdev_data(padapter)->block == true) { ret = -EBUSY; RTW_INFO("%s wdev_priv.block is set\n", __func__); goto exit; @@ -2975,7 +2975,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev, #ifdef CONFIG_PLATFORM_MSTAR_SCAN_BEFORE_CONNECT printk("MStar Android!\n"); - if (adapter_wdev_data(padapter)->bandroid_scan == _FALSE) { + if (adapter_wdev_data(padapter)->bandroid_scan == false) { #ifdef CONFIG_P2P struct wifidirect_info *pwdinfo = &(padapter->wdinfo); if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) @@ -3009,7 +3009,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev, goto cancel_ps_deny; } - if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == _TRUE) { + if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true) { ret = -EBUSY; RTW_INFO("%s, fw_state=0x%x, goto exit\n", __func__, pmlmepriv->fw_state); goto cancel_ps_deny; @@ -3022,7 +3022,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev, } #endif - rtw_mi_scan_abort(padapter, _TRUE); + rtw_mi_scan_abort(padapter, true); memset(&ndis_ssid, 0, sizeof(NDIS_802_11_SSID)); ndis_ssid.SsidLength = sme->ssid_len; @@ -3075,7 +3075,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev, goto cancel_ps_deny; if (sme->crypto.n_ciphers_pairwise) { - ret = rtw_cfg80211_set_cipher(psecuritypriv, sme->crypto.ciphers_pairwise[0], _TRUE); + ret = rtw_cfg80211_set_cipher(psecuritypriv, sme->crypto.ciphers_pairwise[0], true); if (ret < 0) goto cancel_ps_deny; } @@ -3133,7 +3133,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev, goto cancel_ps_deny; } - ret = rtw_cfg80211_set_cipher(psecuritypriv, sme->crypto.cipher_group, _FALSE); + ret = rtw_cfg80211_set_cipher(psecuritypriv, sme->crypto.cipher_group, false); if (ret < 0) return ret; @@ -3161,7 +3161,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev, /* rtw_set_802_11_encryption_mode(padapter, padapter->securitypriv.ndisencryptstatus); */ - if (rtw_set_802_11_connect(padapter, (u8 *)sme->bssid, &ndis_ssid) == _FALSE) { + if (rtw_set_802_11_connect(padapter, (u8 *)sme->bssid, &ndis_ssid) == false) { ret = -1; goto cancel_ps_deny; } @@ -3176,7 +3176,7 @@ exit: RTW_INFO("<=%s, ret %d\n", __func__, ret); #ifdef SUPPLICANT_RTK_VERSION_LOWER_THAN_JB42 - padapter->mlmepriv.not_indic_disco = _FALSE; + padapter->mlmepriv.not_indic_disco = false; #endif return ret; @@ -3190,7 +3190,7 @@ static int cfg80211_rtw_disconnect(struct wiphy *wiphy, struct net_device *ndev, RTW_INFO(FUNC_NDEV_FMT" - Start to Disconnect\n", FUNC_NDEV_ARG(ndev)); #ifdef SUPPLICANT_RTK_VERSION_LOWER_THAN_JB42 - padapter->mlmepriv.not_indic_disco = _TRUE; + padapter->mlmepriv.not_indic_disco = true; #endif rtw_set_to_roam(padapter, 0); @@ -3199,19 +3199,19 @@ static int cfg80211_rtw_disconnect(struct wiphy *wiphy, struct net_device *ndev, { rtw_scan_abort(padapter); LeaveAllPowerSaveMode(padapter); - rtw_disassoc_cmd(padapter, 500, _FALSE); + rtw_disassoc_cmd(padapter, 500, false); rtw_sta_mstatus_report(padapter); RTW_INFO("%s...call rtw_indicate_disconnect\n", __func__); rtw_free_assoc_resources(padapter, 1); - rtw_indicate_disconnect(padapter, 0, _TRUE); + rtw_indicate_disconnect(padapter, 0, true); rtw_pwr_wakeup(padapter); } #ifdef SUPPLICANT_RTK_VERSION_LOWER_THAN_JB42 - padapter->mlmepriv.not_indic_disco = _FALSE; + padapter->mlmepriv.not_indic_disco = false; #endif RTW_INFO(FUNC_NDEV_FMT" return 0\n", FUNC_NDEV_ARG(ndev)); @@ -3275,7 +3275,7 @@ static int cfg80211_rtw_set_pmksa(struct wiphy *wiphy, struct net_device *ndev, struct cfg80211_pmksa *pmksa) { - u8 index, blInserted = _FALSE; + u8 index, blInserted = false; _adapter *padapter = (_adapter *)rtw_netdev_priv(ndev); struct mlme_priv *mlme = &padapter->mlmepriv; struct security_priv *psecuritypriv = &padapter->securitypriv; @@ -3284,26 +3284,26 @@ static int cfg80211_rtw_set_pmksa(struct wiphy *wiphy, RTW_INFO(FUNC_NDEV_FMT" "MAC_FMT" "KEY_FMT"\n", FUNC_NDEV_ARG(ndev) , MAC_ARG(pmksa->bssid), KEY_ARG(pmksa->pmkid)); - if (_rtw_memcmp((u8 *)pmksa->bssid, strZeroMacAddress, ETH_ALEN) == _TRUE) + if (_rtw_memcmp((u8 *)pmksa->bssid, strZeroMacAddress, ETH_ALEN) == true) return -EINVAL; - if (check_fwstate(mlme, _FW_LINKED) == _FALSE) { + if (check_fwstate(mlme, _FW_LINKED) == false) { RTW_INFO(FUNC_NDEV_FMT" not set pmksa cause not in linked state\n", FUNC_NDEV_ARG(ndev)); return -EINVAL; } - blInserted = _FALSE; + blInserted = false; /* overwrite PMKID */ for (index = 0 ; index < NUM_PMKID_CACHE; index++) { - if (_rtw_memcmp(psecuritypriv->PMKIDList[index].Bssid, (u8 *)pmksa->bssid, ETH_ALEN) == _TRUE) { + if (_rtw_memcmp(psecuritypriv->PMKIDList[index].Bssid, (u8 *)pmksa->bssid, ETH_ALEN) == true) { /* BSSID is matched, the same AP => rewrite with new PMKID. */ RTW_INFO(FUNC_NDEV_FMT" BSSID exists in the PMKList.\n", FUNC_NDEV_ARG(ndev)); _rtw_memcpy(psecuritypriv->PMKIDList[index].PMKID, (u8 *)pmksa->pmkid, WLAN_PMKID_LEN); - psecuritypriv->PMKIDList[index].bUsed = _TRUE; + psecuritypriv->PMKIDList[index].bUsed = true; psecuritypriv->PMKIDIndex = index + 1; - blInserted = _TRUE; + blInserted = true; break; } } @@ -3316,7 +3316,7 @@ static int cfg80211_rtw_set_pmksa(struct wiphy *wiphy, _rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, (u8 *)pmksa->bssid, ETH_ALEN); _rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, (u8 *)pmksa->pmkid, WLAN_PMKID_LEN); - psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = _TRUE; + psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = true; psecuritypriv->PMKIDIndex++ ; if (psecuritypriv->PMKIDIndex == 16) psecuritypriv->PMKIDIndex = 0; @@ -3329,7 +3329,7 @@ static int cfg80211_rtw_del_pmksa(struct wiphy *wiphy, struct net_device *ndev, struct cfg80211_pmksa *pmksa) { - u8 index, bMatched = _FALSE; + u8 index, bMatched = false; _adapter *padapter = (_adapter *)rtw_netdev_priv(ndev); struct security_priv *psecuritypriv = &padapter->securitypriv; @@ -3337,18 +3337,18 @@ static int cfg80211_rtw_del_pmksa(struct wiphy *wiphy, , MAC_ARG(pmksa->bssid), KEY_ARG(pmksa->pmkid)); for (index = 0 ; index < NUM_PMKID_CACHE; index++) { - if (_rtw_memcmp(psecuritypriv->PMKIDList[index].Bssid, (u8 *)pmksa->bssid, ETH_ALEN) == _TRUE) { + if (_rtw_memcmp(psecuritypriv->PMKIDList[index].Bssid, (u8 *)pmksa->bssid, ETH_ALEN) == true) { /* BSSID is matched, the same AP => Remove this PMKID information and reset it. */ memset(psecuritypriv->PMKIDList[index].Bssid, 0x00, ETH_ALEN); memset(psecuritypriv->PMKIDList[index].PMKID, 0x00, WLAN_PMKID_LEN); - psecuritypriv->PMKIDList[index].bUsed = _FALSE; - bMatched = _TRUE; + psecuritypriv->PMKIDList[index].bUsed = false; + bMatched = true; RTW_INFO(FUNC_NDEV_FMT" clear id:%hhu\n", FUNC_NDEV_ARG(ndev), index); break; } } - if (_FALSE == bMatched) { + if (false == bMatched) { RTW_INFO(FUNC_NDEV_FMT" do not have matched BSSID\n" , FUNC_NDEV_ARG(ndev)); return -EINVAL; @@ -3579,7 +3579,7 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de u8 category, action; int type = -1; - if (rtw_action_frame_parse(buf, len, &category, &action) == _FALSE) { + if (rtw_action_frame_parse(buf, len, &category, &action) == false) { RTW_INFO(FUNC_NDEV_FMT" frame_control:0x%x\n", FUNC_NDEV_ARG(ndev), le16_to_cpu(((struct rtw_ieee80211_hdr_3addr *)buf)->frame_ctl)); goto fail; @@ -3588,7 +3588,7 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de RTW_INFO("RTW_Tx:da="MAC_FMT" via "FUNC_NDEV_FMT"\n", MAC_ARG(GetAddr1Ptr(buf)), FUNC_NDEV_ARG(ndev)); #ifdef CONFIG_P2P - type = rtw_p2p_check_frames(padapter, buf, len, _TRUE); + type = rtw_p2p_check_frames(padapter, buf, len, true); if (type >= 0) goto dump; #endif @@ -3606,7 +3606,7 @@ dump: /* update attribute */ pattrib = &pmgntframe->attrib; update_mgntframe_attrib(padapter, pattrib); - pattrib->retry_ctrl = _FALSE; + pattrib->retry_ctrl = false; memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); @@ -3910,7 +3910,7 @@ static int rtw_add_beacon(_adapter *adapter, const u8 *head, size_t head_len, co uint len, wps_ielen = 0; uint p2p_ielen = 0; u8 *p2p_ie; - u8 got_p2p_ie = _FALSE; + u8 got_p2p_ie = false; struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); /* struct sta_priv *pstapriv = &padapter->stapriv; */ @@ -3918,7 +3918,7 @@ static int rtw_add_beacon(_adapter *adapter, const u8 *head, size_t head_len, co RTW_INFO("%s beacon_head_len=%zu, beacon_tail_len=%zu\n", __func__, head_len, tail_len); - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE) + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true) return -EINVAL; if (head_len < 24) @@ -3954,7 +3954,7 @@ static int rtw_add_beacon(_adapter *adapter, const u8 *head, size_t head_len, co RTW_INFO("got p2p_ie, len=%d\n", p2p_ielen); - got_p2p_ie = _TRUE; + got_p2p_ie = true; if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) { RTW_INFO("Enable P2P function for the first time\n"); @@ -3979,7 +3979,7 @@ static int rtw_add_beacon(_adapter *adapter, const u8 *head, size_t head_len, co if (rtw_check_beacon_data(adapter, pbuf, len) == _SUCCESS) { #ifdef CONFIG_P2P /* check p2p if enable */ - if (got_p2p_ie == _TRUE) { + if (got_p2p_ie == true) { struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv; struct wifidirect_info *pwdinfo = &(adapter->wdinfo); pwdinfo->operating_channel = pmlmeext->cur_channel; @@ -4016,7 +4016,7 @@ static int cfg80211_rtw_set_beacon(struct wiphy *wiphy, struct net_device *ndev, RTW_INFO(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev)); - pmlmeext->bstart_bss = _TRUE; + pmlmeext->bstart_bss = true; cfg80211_rtw_add_beacon(wiphy, ndev, info); @@ -4174,7 +4174,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev int ret = 0; unsigned long irqL; _list *phead, *plist; - u8 updated = _FALSE; + u8 updated = false; const u8 *target_mac; struct sta_info *psta = NULL; _adapter *padapter = (_adapter *)rtw_netdev_priv(ndev); @@ -4190,7 +4190,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev target_mac = params->mac; #endif - if (check_fwstate(pmlmepriv, (_FW_LINKED | WIFI_AP_STATE)) != _TRUE) { + if (check_fwstate(pmlmepriv, (_FW_LINKED | WIFI_AP_STATE)) != true) { RTW_INFO("%s, fw_state != FW_LINKED|WIFI_AP_STATE\n", __func__); return -EINVAL; } @@ -4201,7 +4201,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev flush_all_cam_entry(padapter); /* clear CAM */ - ret = rtw_sta_flush(padapter, _TRUE); + ret = rtw_sta_flush(padapter, true); return ret; } @@ -4221,14 +4221,14 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev 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); plist = get_next(plist); if (_rtw_memcmp((u8 *)target_mac, psta->hwaddr, ETH_ALEN)) { - if (psta->dot8021xalg == 1 && psta->bpairwise_key_installed == _FALSE) - RTW_INFO("%s, sta's dot8021xalg = 1 and key_installed = _FALSE\n", __func__); + if (psta->dot8021xalg == 1 && psta->bpairwise_key_installed == false) + RTW_INFO("%s, sta's dot8021xalg = 1 and key_installed = false\n", __func__); else { RTW_INFO("free psta=%p, aid=%d\n", psta, psta->aid); @@ -4236,10 +4236,10 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev pstapriv->asoc_list_cnt--; /* _exit_critical_bh(&pstapriv->asoc_list_lock, &irqL); */ - if (check_fwstate(pmlmepriv, (WIFI_AP_STATE)) == _TRUE) - updated = ap_free_sta(padapter, psta, _TRUE, WLAN_REASON_PREV_AUTH_NOT_VALID, _TRUE); + if (check_fwstate(pmlmepriv, (WIFI_AP_STATE)) == true) + updated = ap_free_sta(padapter, psta, true, WLAN_REASON_PREV_AUTH_NOT_VALID, true); else - updated = ap_free_sta(padapter, psta, _TRUE, WLAN_REASON_DEAUTH_LEAVING, _TRUE); + updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING, true); /* _enter_critical_bh(&pstapriv->asoc_list_lock, &irqL); */ psta = NULL; @@ -4286,7 +4286,7 @@ static struct sta_info *rtw_sta_info_get_by_idx(const int idx, struct sta_priv * 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) { if (idx == i) psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); plist = get_next(plist); @@ -4539,7 +4539,7 @@ void rtw_cfg80211_rx_action_p2p(_adapter *adapter, union recv_frame *rframe) RTW_INFO("RTW_Rx:ch=%d(%d)\n", ch, sch); #ifdef CONFIG_P2P - type = rtw_p2p_check_frames(adapter, frame, frame_len, _FALSE); + type = rtw_p2p_check_frames(adapter, frame, frame_len, false); if (type >= 0) goto indicate; #endif @@ -4572,7 +4572,7 @@ void rtw_cfg80211_rx_p2p_action_public(_adapter *adapter, union recv_frame *rfra RTW_INFO("RTW_Rx:ch=%d(%d)\n", ch, sch); #ifdef CONFIG_P2P - type = rtw_p2p_check_frames(adapter, frame, frame_len, _FALSE); + type = rtw_p2p_check_frames(adapter, frame, frame_len, false); if (type >= 0) { switch (type) { case P2P_GO_NEGO_CONF: @@ -4583,7 +4583,7 @@ void rtw_cfg80211_rx_p2p_action_public(_adapter *adapter, union recv_frame *rfra } if (pwdev_priv->nego_info.state == 2 && pwdev_priv->nego_info.status == 0 - && rtw_check_invalid_mac_address(pwdev_priv->nego_info.iface_addr, _FALSE) == _FALSE + && rtw_check_invalid_mac_address(pwdev_priv->nego_info.iface_addr, false) == false ) { _adapter *intended_iface = dvobj_get_adapter_by_addr(dvobj, pwdev_priv->nego_info.iface_addr); @@ -4640,7 +4640,7 @@ void rtw_cfg80211_rx_action(_adapter *adapter, union recv_frame *rframe, const c if (action == ACT_PUBLIC_GAS_INITIAL_REQ) { rtw_mi_set_scan_deny(adapter, 200); - rtw_mi_scan_abort(adapter, _FALSE); /*rtw_scan_abort_no_wait*/ + rtw_mi_scan_abort(adapter, false); /*rtw_scan_abort_no_wait*/ } #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) @@ -4936,7 +4936,7 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, u8 remain_ch = (u8) ieee80211_frequency_to_channel(channel->center_freq); u8 union_ch = 0, union_bw = 0, union_offset = 0; u8 i; - u8 ready_on_channel = _FALSE; + u8 ready_on_channel = false; _adapter *padapter = NULL; _adapter *iface; struct dvobj_priv *dvobj; @@ -4944,7 +4944,7 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, struct mlme_ext_priv *pmlmeext; struct wifidirect_info *pwdinfo; struct cfg80211_wifidirect_info *pcfg80211_wdinfo; - u8 is_p2p_find = _FALSE; + u8 is_p2p_find = false; #ifndef CONFIG_RADIO_WORK #define RTW_ROCH_DURATION_ENLARGE @@ -4980,7 +4980,7 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, pwdinfo = &padapter->wdinfo; pcfg80211_wdinfo = &padapter->cfg80211_wdinfo; #ifdef CONFIG_CONCURRENT_MODE - is_p2p_find = (duration < (pwdinfo->ext_listen_interval)) ? _TRUE : _FALSE; + is_p2p_find = (duration < (pwdinfo->ext_listen_interval)) ? true : false; #endif *cookie = ATOMIC_INC_RETURN(&pcfg80211_wdinfo->ro_ch_cookie_gen); @@ -5012,10 +5012,10 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, #ifdef CONFIG_CONCURRENT_MODE /*don't scan_abort during p2p_listen.*/ if (is_p2p_find) - rtw_mi_buddy_scan_abort(padapter, _TRUE); + rtw_mi_buddy_scan_abort(padapter, true); #endif /*CONFIG_CONCURRENT_MODE*/ - if (rtw_cfg80211_get_is_roch(padapter) == _TRUE) { + if (rtw_cfg80211_get_is_roch(padapter) == true) { _cancel_timer_ex(&padapter->cfg80211_wdinfo.remain_on_ch_timer); p2p_cancel_roch_cmd(padapter, 0, NULL, RTW_CMDF_WAIT_ACK); } @@ -5044,7 +5044,7 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, for (i = 0; i < dvobj->iface_nums; i++) { iface = dvobj->padapters[i]; - if (check_fwstate(&iface->mlmepriv, _FW_UNDER_LINKING | WIFI_UNDER_WPS) == _TRUE) { + if (check_fwstate(&iface->mlmepriv, _FW_UNDER_LINKING | WIFI_UNDER_WPS) == true) { RTW_INFO(ADPT_FMT"- _FW_UNDER_LINKING |WIFI_UNDER_WPS (mlme state:0x%x)\n", ADPT_ARG(iface), get_fwstate(&iface->mlmepriv)); remain_ch = iface->mlmeextpriv.cur_channel; } @@ -5066,7 +5066,7 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, } #endif /*defined (RTW_ROCH_BACK_OP) && defined(CONFIG_CONCURRENT_MODE) */ - rtw_cfg80211_set_is_roch(padapter, _TRUE); + rtw_cfg80211_set_is_roch(padapter, true); pcfg80211_wdinfo->ro_ch_wdev = wdev; pcfg80211_wdinfo->remain_on_ch_cookie = *cookie; pcfg80211_wdinfo->last_ro_ch_time = rtw_get_current_time(); @@ -5091,15 +5091,15 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, #endif } } - ready_on_channel = _TRUE; + ready_on_channel = true; } else #endif /* CONFIG_CONCURRENT_MODE */ { if (remain_ch != rtw_get_oper_ch(padapter)) - ready_on_channel = _TRUE; + ready_on_channel = true; } - if (ready_on_channel == _TRUE) { + if (ready_on_channel == true) { #ifndef RTW_SINGLE_WIPHY if (!check_fwstate(&padapter->mlmepriv, _FW_LINKED)) #endif @@ -5115,7 +5115,7 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, } #ifdef CONFIG_BT_COEXIST - rtw_btcoex_ScanNotify(padapter, _TRUE); + rtw_btcoex_ScanNotify(padapter, true); #endif RTW_INFO("%s, set ro ch timer, duration=%d\n", __func__, duration); @@ -5172,7 +5172,7 @@ static s32 cfg80211_rtw_cancel_remain_on_channel(struct wiphy *wiphy, , FUNC_ADPT_ARG(padapter), wdev == wiphy_to_pd_wdev(wiphy) ? " PD" : "" , cookie); - if (rtw_cfg80211_get_is_roch(padapter) == _TRUE) { + if (rtw_cfg80211_get_is_roch(padapter) == true) { _cancel_timer_ex(&padapter->cfg80211_wdinfo.remain_on_ch_timer); p2p_cancel_roch_cmd(padapter, cookie, wdev, RTW_CMDF_WAIT_ACK); } @@ -5331,7 +5331,7 @@ inline int rtw_cfg80211_redirect_pd_wdev(struct wiphy *wiphy, u8 *ra, struct wir struct wireless_dev *pd_wdev = wiphy_to_pd_wdev(wiphy); if (pd_wdev && pd_wdev != *wdev - && _rtw_memcmp(wdev_address(pd_wdev), ra, ETH_ALEN) == _TRUE + && _rtw_memcmp(wdev_address(pd_wdev), ra, ETH_ALEN) == true ) { *wdev = pd_wdev; return 1; @@ -5380,7 +5380,7 @@ static int _cfg80211_rtw_mgmt_tx(_adapter *padapter, u8 tx_ch, u8 no_cck, const struct pkt_attrib *pattrib; unsigned char *pframe; int ret = _FAIL; - bool ack = _TRUE; + bool ack = true; struct rtw_ieee80211_hdr *pwlanhdr; struct rtw_wdev_priv *pwdev_priv = adapter_wdev_data(padapter); struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); @@ -5393,16 +5393,16 @@ static int _cfg80211_rtw_mgmt_tx(_adapter *padapter, u8 tx_ch, u8 no_cck, const /* struct cfg80211_wifidirect_info *pcfg80211_wdinfo = &padapter->cfg80211_wdinfo; */ rtw_mi_set_scan_deny(padapter, 1000); - rtw_mi_scan_abort(padapter, _TRUE); + rtw_mi_scan_abort(padapter, true); rtw_cfg80211_set_is_mgmt_tx(padapter, 1); #ifdef CONFIG_BT_COEXIST - rtw_btcoex_ScanNotify(padapter, _TRUE); + rtw_btcoex_ScanNotify(padapter, true); #endif #ifdef CONFIG_P2P - if (rtw_cfg80211_get_is_roch(padapter) == _TRUE) { + if (rtw_cfg80211_get_is_roch(padapter) == true) { #ifdef CONFIG_CONCURRENT_MODE if (!check_fwstate(&padapter->mlmepriv, _FW_LINKED)) { RTW_INFO("%s, extend ro ch time\n", __func__); @@ -5480,7 +5480,7 @@ issue_mgmt_frame: pattrib->raid = rtw_get_mgntframe_raid(padapter, WIRELESS_11G); } - pattrib->retry_ctrl = _FALSE; + pattrib->retry_ctrl = false; memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); @@ -5503,7 +5503,7 @@ issue_mgmt_frame: if (wait_ack) { if (dump_mgntframe_and_wait_ack(padapter, pmgntframe) != _SUCCESS) { - ack = _FALSE; + ack = false; ret = _FAIL; #ifdef CONFIG_DEBUG_CFG80211 @@ -5527,7 +5527,7 @@ exit: rtw_cfg80211_set_is_mgmt_tx(padapter, 0); #ifdef CONFIG_BT_COEXIST - rtw_btcoex_ScanNotify(padapter, _FALSE); + rtw_btcoex_ScanNotify(padapter, false); #endif #ifdef CONFIG_DEBUG_CFG80211 @@ -5587,7 +5587,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, int wait_ack = 1; u32 dump_limit = RTW_MAX_MGMT_TX_CNT; u32 dump_cnt = 0; - bool ack = _TRUE; + bool ack = true; u8 tx_ch; u8 category, action; u8 frame_styp; @@ -5668,7 +5668,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, goto dump; } - if (rtw_action_frame_parse(buf, len, &category, &action) == _FALSE) { + if (rtw_action_frame_parse(buf, len, &category, &action) == false) { RTW_INFO(FUNC_ADPT_FMT" frame_control:0x%x\n", FUNC_ADPT_ARG(padapter), le16_to_cpu(((struct rtw_ieee80211_hdr_3addr *)buf)->frame_ctl)); goto exit; @@ -5676,7 +5676,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, RTW_INFO("RTW_Tx:tx_ch=%d, no_cck=%u, da="MAC_FMT"\n", tx_ch, no_cck, MAC_ARG(GetAddr1Ptr(buf))); #ifdef CONFIG_P2P - type = rtw_p2p_check_frames(padapter, buf, len, _TRUE); + type = rtw_p2p_check_frames(padapter, buf, len, true); if (type >= 0) { no_cck = 1; /* force no CCK for P2P frames */ goto dump; @@ -5731,7 +5731,7 @@ dump: } if (pwdev_priv->nego_info.state == 2 && pwdev_priv->nego_info.status == 0 - && rtw_check_invalid_mac_address(pwdev_priv->nego_info.iface_addr, _FALSE) == _FALSE + && rtw_check_invalid_mac_address(pwdev_priv->nego_info.iface_addr, false) == false ) { _adapter *intended_iface = dvobj_get_adapter_by_addr(dvobj, pwdev_priv->nego_info.iface_addr); @@ -5834,7 +5834,7 @@ static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, int ret = 0; struct tdls_txmgmt txmgmt; - if (hal_chk_wl_func(padapter, WL_FUNC_TDLS) == _FALSE) { + if (hal_chk_wl_func(padapter, WL_FUNC_TDLS) == false) { RTW_INFO("Discard tdls action:%d, since hal doesn't support tdls\n", action_code); goto discard; } @@ -5871,7 +5871,7 @@ static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, switch (txmgmt.action_code) { case TDLS_SETUP_REQUEST: - issue_tdls_setup_req(padapter, &txmgmt, _TRUE); + issue_tdls_setup_req(padapter, &txmgmt, true); break; case TDLS_SETUP_RESPONSE: issue_tdls_setup_rsp(padapter, &txmgmt); @@ -5880,13 +5880,13 @@ static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, issue_tdls_setup_cfm(padapter, &txmgmt); break; case TDLS_TEARDOWN: - issue_tdls_teardown(padapter, &txmgmt, _TRUE); + issue_tdls_teardown(padapter, &txmgmt, true); break; case TDLS_DISCOVERY_REQUEST: issue_tdls_dis_req(padapter, &txmgmt); break; case TDLS_DISCOVERY_RESPONSE: - issue_tdls_dis_rsp(padapter, &txmgmt, pmlmeinfo->enc_algo ? _TRUE : _FALSE); + issue_tdls_dis_rsp(padapter, &txmgmt, pmlmeinfo->enc_algo ? true : false); break; } @@ -5914,7 +5914,7 @@ static int cfg80211_rtw_tdls_oper(struct wiphy *wiphy, RTW_INFO(FUNC_NDEV_FMT", nl80211_tdls_operation:%d\n", FUNC_NDEV_ARG(ndev), oper); - if (hal_chk_wl_func(padapter, WL_FUNC_TDLS) == _FALSE) { + if (hal_chk_wl_func(padapter, WL_FUNC_TDLS) == false) { RTW_INFO("Discard tdls oper:%d, since hal doesn't support tdls\n", oper); return 0; } @@ -5940,21 +5940,21 @@ static int cfg80211_rtw_tdls_oper(struct wiphy *wiphy, case NL80211_TDLS_SETUP: #ifdef CONFIG_WFD if (_AES_ != padapter->securitypriv.dot11PrivacyAlgrthm) { - if (padapter->wdinfo.wfd_tdls_weaksec == _TRUE) - issue_tdls_setup_req(padapter, &txmgmt, _TRUE); + if (padapter->wdinfo.wfd_tdls_weaksec == true) + issue_tdls_setup_req(padapter, &txmgmt, true); else RTW_INFO("[%s] Current link is not AES, SKIP sending the tdls setup request!!\n", __func__); } else #endif /* CONFIG_WFD */ { - issue_tdls_setup_req(padapter, &txmgmt, _TRUE); + issue_tdls_setup_req(padapter, &txmgmt, true); } break; case NL80211_TDLS_TEARDOWN: ptdls_sta = rtw_get_stainfo(&(padapter->stapriv), txmgmt.peer); if (ptdls_sta != NULL) { txmgmt.status_code = _RSON_TDLS_TEAR_UN_RSN_; - issue_tdls_teardown(padapter, &txmgmt, _TRUE); + issue_tdls_teardown(padapter, &txmgmt, true); } else RTW_INFO("TDLS peer not found\n"); break; @@ -5962,7 +5962,7 @@ static int cfg80211_rtw_tdls_oper(struct wiphy *wiphy, RTW_INFO(FUNC_NDEV_FMT", NL80211_TDLS_ENABLE_LINK;mac:"MAC_FMT"\n", FUNC_NDEV_ARG(ndev), MAC_ARG(peer)); ptdls_sta = rtw_get_stainfo(&(padapter->stapriv), (u8 *)peer); if (ptdls_sta != NULL) { - ptdlsinfo->link_established = _TRUE; + ptdlsinfo->link_established = true; ptdls_sta->tdls_sta_state |= TDLS_LINKED_STATE; ptdls_sta->state |= _FW_LINKED; rtw_tdls_cmd(padapter, txmgmt.peer, TDLS_ESTABLISHED); @@ -5989,14 +5989,14 @@ static int cfg80211_rtw_sched_scan_start(struct wiphy *wiphy, struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); u8 ret; - if (padapter->bup == _FALSE) { + if (padapter->bup == false) { RTW_INFO("%s: net device is down.\n", __func__); return -EIO; } - if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE || - check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE || - check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == _TRUE) { + if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true || + check_fwstate(pmlmepriv, _FW_LINKED) == true || + check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true) { RTW_INFO("%s: device is busy.\n", __func__); rtw_scan_abort(padapter); } @@ -6014,7 +6014,7 @@ static int cfg80211_rtw_sched_scan_start(struct wiphy *wiphy, goto exit; } - ret = rtw_android_pno_enable(dev, _TRUE); + ret = rtw_android_pno_enable(dev, true); if (ret < 0) { RTW_INFO("%s ret: %d\n", __func__, ret); goto exit; @@ -6026,7 +6026,7 @@ exit: static int cfg80211_rtw_sched_scan_stop(struct wiphy *wiphy, struct net_device *dev) { - return rtw_android_pno_enable(dev, _FALSE); + return rtw_android_pno_enable(dev, false); } #endif /* CONFIG_PNO_SUPPORT */ @@ -6070,7 +6070,7 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *ndev, char *buf, _rtw_memcpy(pmlmepriv->wps_beacon_ie, wps_ie, wps_ielen); pmlmepriv->wps_beacon_ie_len = wps_ielen; - update_beacon(padapter, _VENDOR_SPECIFIC_IE_, wps_oui, _TRUE); + update_beacon(padapter, _VENDOR_SPECIFIC_IE_, wps_oui, true); } @@ -6117,7 +6117,7 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *ndev, char *buf, } #endif /* CONFIG_WFD */ - pmlmeext->bstart_bss = _TRUE; + pmlmeext->bstart_bss = true; } @@ -6208,7 +6208,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu #ifdef CONFIG_P2P p2p_ie = rtw_get_p2p_ie(buf, len, NULL, &p2p_ielen); if (p2p_ie) { - u8 is_GO = _FALSE; + u8 is_GO = false; u32 attr_contentlen = 0; u16 cap_attr = 0; __le16 le_tmp; @@ -6224,14 +6224,14 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu cap_attr = le16_to_cpu(le_tmp); grp_cap = (u8)((cap_attr >> 8) & 0xff); - is_GO = (grp_cap & BIT(0)) ? _TRUE : _FALSE; + is_GO = (grp_cap & BIT(0)) ? true : false; if (is_GO) RTW_INFO("Got P2P Capability Attr, grp_cap=0x%x, is_GO\n", grp_cap); } - if (is_GO == _FALSE) { + if (is_GO == false) { if (pmlmepriv->p2p_probe_resp_ie) { u32 free_len = pmlmepriv->p2p_probe_resp_ie_len; pmlmepriv->p2p_probe_resp_ie_len = 0; @@ -6392,7 +6392,7 @@ static void rtw_cfg80211_init_ht_capab_ex(_adapter *padapter, struct ieee80211_s struct registry_priv *pregistrypriv = &padapter->registrypriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct ht_priv *phtpriv = &pmlmepriv->htpriv; - u8 stbc_rx_enable = _FALSE; + u8 stbc_rx_enable = false; rtw_ht_use_default_setting(padapter); @@ -6408,9 +6408,9 @@ static void rtw_cfg80211_init_ht_capab_ex(_adapter *padapter, struct ieee80211_s if (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_RX)) { /*rtw_rx_stbc 0: disable, bit(0):enable 2.4g, bit(1):enable 5g*/ if (band == NL80211_BAND_2GHZ) - stbc_rx_enable = (pregistrypriv->rx_stbc & BIT(0)) ? _TRUE : _FALSE; + stbc_rx_enable = (pregistrypriv->rx_stbc & BIT(0)) ? true : false; if (band == NL80211_BAND_5GHZ) - stbc_rx_enable = (pregistrypriv->rx_stbc & BIT(1)) ? _TRUE : _FALSE; + stbc_rx_enable = (pregistrypriv->rx_stbc & BIT(1)) ? true : false; if (stbc_rx_enable) { switch (rf_type) { @@ -6440,7 +6440,7 @@ static void rtw_cfg80211_init_ht_capab(_adapter *padapter, struct ieee80211_sta_ struct hal_spec_t *hal_spec = GET_HAL_SPEC(padapter); u8 rx_nss = 0; - ht_cap->ht_supported = _TRUE; + ht_cap->ht_supported = true; ht_cap->cap = IEEE80211_HT_CAP_SUP_WIDTH_20_40 | IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_SGI_20 | @@ -6701,12 +6701,12 @@ void rtw_cfg80211_deinit_rfkill(struct wiphy *wiphy) static void cfg80211_rtw_rfkill_poll(struct wiphy *wiphy) { _adapter *padapter = NULL; - bool blocked = _FALSE; + bool blocked = false; u8 valid = 0; padapter = wiphy_to_adapter(wiphy); - if (adapter_to_dvobj(padapter)->processing_dev_remove == _TRUE) { + if (adapter_to_dvobj(padapter)->processing_dev_remove == true) { /*RTW_INFO("cfg80211_rtw_rfkill_poll: device is removed!\n");*/ return; } @@ -6919,18 +6919,18 @@ int rtw_wdev_alloc(_adapter *padapter, struct wiphy *wiphy) pwdev_priv->scan_request = NULL; spin_lock_init(&pwdev_priv->scan_req_lock); - pwdev_priv->p2p_enabled = _FALSE; + pwdev_priv->p2p_enabled = false; pwdev_priv->probe_resp_ie_update_time = rtw_get_current_time(); - pwdev_priv->provdisc_req_issued = _FALSE; + pwdev_priv->provdisc_req_issued = false; rtw_wdev_invit_info_init(&pwdev_priv->invit_info); rtw_wdev_nego_info_init(&pwdev_priv->nego_info); - pwdev_priv->bandroid_scan = _FALSE; + pwdev_priv->bandroid_scan = false; if (padapter->registrypriv.power_mgnt != PS_MODE_ACTIVE) - pwdev_priv->power_mgmt = _TRUE; + pwdev_priv->power_mgmt = true; else - pwdev_priv->power_mgmt = _FALSE; + pwdev_priv->power_mgmt = false; _rtw_mutex_init(&pwdev_priv->roch_mutex); @@ -6978,7 +6978,7 @@ void rtw_wdev_unregister(struct wireless_dev *wdev) adapter = (_adapter *)rtw_netdev_priv(ndev); pwdev_priv = adapter_wdev_data(adapter); - rtw_cfg80211_indicate_scan_done(adapter, _TRUE); + rtw_cfg80211_indicate_scan_done(adapter, true); #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)) if (wdev->current_bss) { diff --git a/os_dep/ioctl_linux.c b/os_dep/ioctl_linux.c index 4449b0c..25e891f 100644 --- a/os_dep/ioctl_linux.c +++ b/os_dep/ioctl_linux.c @@ -160,7 +160,7 @@ static void request_wps_pbc_event(_adapter *padapter) p = buff; - p += sprintf(p, "WPS_PBC_START.request=TRUE"); + p += sprintf(p, "WPS_PBC_START.request=true"); memset(&wrqu, 0, sizeof(wrqu)); @@ -229,7 +229,7 @@ void rtw_indicate_wx_assoc_event(_adapter *padapter) wrqu.ap_addr.sa_family = ARPHRD_ETHER; - if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE) + if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) _rtw_memcpy(wrqu.ap_addr.sa_data, pnetwork->MacAddress, ETH_ALEN); else _rtw_memcpy(wrqu.ap_addr.sa_data, pmlmepriv->cur_network.network.MacAddress, ETH_ALEN); @@ -264,11 +264,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) @@ -279,11 +279,11 @@ 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; } */ @@ -301,7 +301,7 @@ static int search_p2p_wfd_ie(_adapter *padapter, #endif /* CONFIG_WFD */ { if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) { - u32 blnGotP2PIE = _FALSE; + u32 blnGotP2PIE = false; /* User is doing the P2P device discovery */ /* The prefix of SSID should be "DIRECT-" and the IE should contains the P2P IE. */ @@ -313,18 +313,18 @@ static int search_p2p_wfd_ie(_adapter *padapter, /* Verifying the P2P IE */ if (rtw_bss_ex_get_p2p_ie(&pnetwork->network, NULL, &p2pielen)) - blnGotP2PIE = _TRUE; + blnGotP2PIE = true; } - if (blnGotP2PIE == _FALSE) - return _FALSE; + if (blnGotP2PIE == false) + return false; } } #ifdef CONFIG_WFD if (SCAN_RESULT_WFD_TYPE == pwdinfo->wfd_info->scan_result_type) { - u32 blnGotWFD = _FALSE; + u32 blnGotWFD = false; u8 *wfd_ie; uint wfd_ielen = 0; @@ -339,26 +339,26 @@ static int search_p2p_wfd_ie(_adapter *padapter, /* the first two bits will indicate the WFD device type */ if ((wfd_devinfo[1] & 0x03) == WFD_DEVINFO_SOURCE) { /* If this device is Miracast PSink device, the scan reuslt should just provide the Miracast source. */ - blnGotWFD = _TRUE; + blnGotWFD = true; } } else if (pwdinfo->wfd_info->wfd_device_type == WFD_DEVINFO_SOURCE) { /* the first two bits will indicate the WFD device type */ if ((wfd_devinfo[1] & 0x03) == WFD_DEVINFO_PSINK) { /* If this device is Miracast source device, the scan reuslt should just provide the Miracast PSink. */ /* Todo: How about the SSink?! */ - blnGotWFD = _TRUE; + blnGotWFD = true; } } } } - if (blnGotWFD == _FALSE) - return _FALSE; + if (blnGotWFD == false) + return false; } #endif /* CONFIG_WFD */ #endif /* CONFIG_P2P */ - return _TRUE; + return true; } static inline char *iwe_stream_mac_addr_proess(_adapter *padapter, struct iw_request_info *info, struct wlan_network *pnetwork, @@ -437,7 +437,7 @@ static inline char *iwe_stream_protocol_process(_adapter *padapter, struct iw_request_info *info, struct wlan_network *pnetwork, char *start, char *stop, struct iw_event *iwe) { - u16 ht_cap = _FALSE, vht_cap = _FALSE; + u16 ht_cap = false, vht_cap = false; u32 ht_ielen = 0, vht_ielen = 0; char *p; u8 ie_offset = (pnetwork->network.Reserved[0] == 2 ? 0 : 12); /* Probe Request */ @@ -445,28 +445,28 @@ static inline char *iwe_stream_protocol_process(_adapter *padapter, /* parsing HT_CAP_IE */ p = rtw_get_ie(&pnetwork->network.IEs[ie_offset], _HT_CAPABILITY_IE_, &ht_ielen, pnetwork->network.IELength - ie_offset); if (p && ht_ielen > 0) - ht_cap = _TRUE; + ht_cap = true; /* Add the protocol name */ iwe->cmd = SIOCGIWNAME; - if ((rtw_is_cckratesonly_included((u8 *)&pnetwork->network.SupportedRates)) == _TRUE) { - if (ht_cap == _TRUE) + if ((rtw_is_cckratesonly_included((u8 *)&pnetwork->network.SupportedRates)) == true) { + if (ht_cap == true) snprintf(iwe->u.name, IFNAMSIZ, "IEEE 802.11bn"); else snprintf(iwe->u.name, IFNAMSIZ, "IEEE 802.11b"); - } else if ((rtw_is_cckrates_included((u8 *)&pnetwork->network.SupportedRates)) == _TRUE) { - if (ht_cap == _TRUE) + } else if ((rtw_is_cckrates_included((u8 *)&pnetwork->network.SupportedRates)) == true) { + if (ht_cap == true) snprintf(iwe->u.name, IFNAMSIZ, "IEEE 802.11bgn"); else snprintf(iwe->u.name, IFNAMSIZ, "IEEE 802.11bg"); } else { if (pnetwork->network.Configuration.DSConfig > 14) { - if (ht_cap == _TRUE) + if (ht_cap == true) snprintf(iwe->u.name, IFNAMSIZ, "IEEE 802.11an"); else snprintf(iwe->u.name, IFNAMSIZ, "IEEE 802.11a"); } else { - if (ht_cap == _TRUE) + if (ht_cap == true) snprintf(iwe->u.name, IFNAMSIZ, "IEEE 802.11gn"); else snprintf(iwe->u.name, IFNAMSIZ, "IEEE 802.11g"); @@ -482,7 +482,7 @@ static inline char *iwe_stream_rate_process(_adapter *padapter, { u32 ht_ielen = 0, vht_ielen = 0; char *p; - u16 max_rate = 0, rate, ht_cap = _FALSE, vht_cap = _FALSE; + u16 max_rate = 0, rate, ht_cap = false, vht_cap = false; u32 i = 0; u8 bw_40MHz = 0, short_GI = 0, bw_160MHz = 0, vht_highest_rate = 0; u16 mcs_rate = 0, vht_data_rate = 0; @@ -494,7 +494,7 @@ static inline char *iwe_stream_rate_process(_adapter *padapter, if (p && ht_ielen > 0) { struct rtw_ieee80211_ht_cap *pht_capie; - ht_cap = _TRUE; + ht_cap = true; pht_capie = (struct rtw_ieee80211_ht_cap *)(p + 2); _rtw_memcpy(&mcs_rate , pht_capie->supp_mcs_set, 2); bw_40MHz = (le16_to_cpu(pht_capie->cap_info) & IEEE80211_HT_CAP_SUP_WIDTH) ? 1 : 0; @@ -512,7 +512,7 @@ static inline char *iwe_stream_rate_process(_adapter *padapter, "%d%s ", rate >> 1, (rate & 1) ? ".5" : ""); i++; } - if (ht_cap == _TRUE) { + if (ht_cap == true) { if (mcs_rate & 0x8000) /* MCS15 */ max_rate = (bw_40MHz) ? ((short_GI) ? 300 : 270) : ((short_GI) ? 144 : 130); @@ -697,7 +697,7 @@ static inline char *iwe_stream_rssi_process(_adapter *padapter, #endif ; - if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE && + if (check_fwstate(pmlmepriv, _FW_LINKED) == true && is_same_network(&pmlmepriv->cur_network.network, &pnetwork->network, 0)) { ss = padapter->recvpriv.signal_strength; sq = padapter->recvpriv.signal_qual; @@ -772,7 +772,7 @@ static char *translate_scan(_adapter *padapter, __le16 le_tmp; memset(&iwe, 0, sizeof(iwe)); - if (_FALSE == search_p2p_wfd_ie(padapter, info, pnetwork, start, stop)) + if (false == search_p2p_wfd_ie(padapter, info, pnetwork, start, stop)) return start; start = iwe_stream_mac_addr_proess(padapter, info, pnetwork, start, stop, &iwe); @@ -924,14 +924,14 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, struct sta_info *psta, *pbcmc_sta; struct sta_priv *pstapriv = &padapter->stapriv; - if (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_MP_STATE) == _TRUE) { /* sta mode */ + if (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_MP_STATE) == true) { /* sta mode */ psta = rtw_get_stainfo(pstapriv, get_bssid(pmlmepriv)); if (psta == NULL) { /* DEBUG_ERR( ("Set wpa_set_encryption: Obtain Sta_info fail\n")); */ } else { /* Jeff: don't disable ieee8021x_blocked while clearing key */ if (strcmp(param->u.crypt.alg, "none") != 0) - psta->ieee8021x_blocked = _FALSE; + psta->ieee8021x_blocked = false; if ((padapter->securitypriv.ndisencryptstatus == Ndis802_11Encryption2Enabled) || (padapter->securitypriv.ndisencryptstatus == Ndis802_11Encryption3Enabled)) @@ -945,16 +945,16 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, _rtw_memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8); _rtw_memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8); - padapter->securitypriv.busetkipkey = _FALSE; + padapter->securitypriv.busetkipkey = false; /* _set_timer(&padapter->securitypriv.tkip_timer, 50); */ } /* DEBUG_ERR((" param->u.crypt.key_len=%d\n",param->u.crypt.key_len)); */ RTW_INFO(" ~~~~set sta key:unicastkey\n"); - rtw_setstakey_cmd(padapter, psta, UNICAST_KEY, _TRUE); + rtw_setstakey_cmd(padapter, psta, UNICAST_KEY, true); - psta->bpairwise_key_installed = _TRUE; + psta->bpairwise_key_installed = true; } else { /* group key */ if (strcmp(param->u.crypt.alg, "TKIP") == 0 || strcmp(param->u.crypt.alg, "CCMP") == 0) { @@ -965,7 +965,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, _rtw_memcpy(padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8); _rtw_memcpy(padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8); } - padapter->securitypriv.binstallGrpkey = _TRUE; + padapter->securitypriv.binstallGrpkey = true; /* DEBUG_ERR((" param->u.crypt.key_len=%d\n", param->u.crypt.key_len)); */ if (param->u.crypt.idx < 4) _rtw_memcpy(padapter->securitypriv.iv_seq[param->u.crypt.idx], param->u.crypt.seq, 8); @@ -973,7 +973,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, padapter->securitypriv.dot118021XGrpKeyid = param->u.crypt.idx; - rtw_set_key(padapter, &padapter->securitypriv, param->u.crypt.idx, 1, _TRUE); + rtw_set_key(padapter, &padapter->securitypriv, param->u.crypt.idx, 1, true); } #ifdef CONFIG_IEEE80211W else if (strcmp(param->u.crypt.alg, "BIP") == 0) { @@ -987,7 +987,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, printk(" %02x ", padapter->securitypriv.dot11wBIPKey[param->u.crypt.idx].skey[no]); printk("\n");*/ padapter->securitypriv.dot11wBIPKeyid = param->u.crypt.idx; - padapter->securitypriv.binstallBIPkey = _TRUE; + padapter->securitypriv.binstallBIPkey = true; RTW_INFO(" ~~~~set sta key:IGKT\n"); } #endif /* CONFIG_IEEE80211W */ @@ -1006,7 +1006,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, } else { /* Jeff: don't disable ieee8021x_blocked while clearing key */ if (strcmp(param->u.crypt.alg, "none") != 0) - pbcmc_sta->ieee8021x_blocked = _FALSE; + pbcmc_sta->ieee8021x_blocked = false; if ((padapter->securitypriv.ndisencryptstatus == Ndis802_11Encryption2Enabled) || (padapter->securitypriv.ndisencryptstatus == Ndis802_11Encryption3Enabled)) @@ -1196,7 +1196,7 @@ static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen) while (cnt < ielen) { eid = buf[cnt]; - if ((eid == _VENDOR_SPECIFIC_IE_) && (_rtw_memcmp(&buf[cnt + 2], wps_oui, 4) == _TRUE)) { + if ((eid == _VENDOR_SPECIFIC_IE_) && (_rtw_memcmp(&buf[cnt + 2], wps_oui, 4) == true)) { RTW_INFO("SET WPS_IE\n"); padapter->securitypriv.wps_ie_len = ((buf[cnt + 1] + 2) < MAX_WPS_IE_LEN) ? (buf[cnt + 1] + 2) : MAX_WPS_IE_LEN; @@ -1224,7 +1224,7 @@ static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen) || padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_WTMIC_ || padapter->securitypriv.dot11PrivacyAlgrthm == _AES_) /* WPS open need to enable multicast - * || check_fwstate(&padapter->mlmepriv, WIFI_UNDER_WPS) == _TRUE) */ + * || check_fwstate(&padapter->mlmepriv, WIFI_UNDER_WPS) == true) */ rtw_hal_set_hwreg(padapter, HW_VAR_OFF_RCR_AM, null_addr); @@ -1244,39 +1244,39 @@ static int rtw_wx_get_name(struct net_device *dev, u16 cap; u32 ht_ielen = 0; char *p; - u8 ht_cap = _FALSE, vht_cap = _FALSE; + u8 ht_cap = false, vht_cap = false; struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); WLAN_BSSID_EX *pcur_bss = &pmlmepriv->cur_network.network; NDIS_802_11_RATES_EX *prates = NULL; - if (check_fwstate(pmlmepriv, _FW_LINKED | WIFI_ADHOC_MASTER_STATE) == _TRUE) { + if (check_fwstate(pmlmepriv, _FW_LINKED | WIFI_ADHOC_MASTER_STATE) == true) { /* parsing HT_CAP_IE */ p = rtw_get_ie(&pcur_bss->IEs[12], _HT_CAPABILITY_IE_, &ht_ielen, pcur_bss->IELength - 12); if (p && ht_ielen > 0) - ht_cap = _TRUE; + ht_cap = true; prates = &pcur_bss->SupportedRates; - if (rtw_is_cckratesonly_included((u8 *)prates) == _TRUE) { - if (ht_cap == _TRUE) + if (rtw_is_cckratesonly_included((u8 *)prates) == true) { + if (ht_cap == true) snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11bn"); else snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11b"); - } else if ((rtw_is_cckrates_included((u8 *)prates)) == _TRUE) { - if (ht_cap == _TRUE) + } else if ((rtw_is_cckrates_included((u8 *)prates)) == true) { + if (ht_cap == true) snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11bgn"); else snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11bg"); } else { if (pcur_bss->Configuration.DSConfig > 14) { - if (ht_cap == _TRUE) + if (ht_cap == true) snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11an"); else snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11a"); } else { - if (ht_cap == _TRUE) + if (ht_cap == true) snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11gn"); else snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11g"); @@ -1360,7 +1360,7 @@ static int rtw_wx_get_freq(struct net_device *dev, struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); WLAN_BSSID_EX *pcur_bss = &pmlmepriv->cur_network.network; - if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE && check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) != _TRUE) { + if (check_fwstate(pmlmepriv, _FW_LINKED) == true && check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) != true) { wrqu->freq.m = rtw_ch2freq(pcur_bss->Configuration.DSConfig) * 100000; wrqu->freq.e = 1; @@ -1426,7 +1426,7 @@ static int rtw_wx_set_mode(struct net_device *dev, struct iw_request_info *a, case IW_MODE_MASTER: networkType = Ndis802_11APMode; RTW_INFO("set_mode = IW_MODE_MASTER\n"); - /* rtw_setopmode_cmd(padapter, networkType,_TRUE); */ + /* rtw_setopmode_cmd(padapter, networkType,true); */ break; case IW_MODE_INFRA: networkType = Ndis802_11Infrastructure; @@ -1441,24 +1441,24 @@ static int rtw_wx_set_mode(struct net_device *dev, struct iw_request_info *a, /* if(Ndis802_11APMode == networkType) { - rtw_setopmode_cmd(padapter, networkType,_TRUE); + rtw_setopmode_cmd(padapter, networkType,true); } else { - rtw_setopmode_cmd(padapter, Ndis802_11AutoUnknown,_TRUE); + rtw_setopmode_cmd(padapter, Ndis802_11AutoUnknown,true); } */ - if (rtw_set_802_11_infrastructure_mode(padapter, networkType) == _FALSE) { + if (rtw_set_802_11_infrastructure_mode(padapter, networkType) == false) { ret = -EPERM; goto exit; } - rtw_setopmode_cmd(padapter, networkType, _TRUE); + rtw_setopmode_cmd(padapter, networkType, true); - if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) == _TRUE) + if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) == true) rtw_indicate_connect(padapter); exit: @@ -1476,15 +1476,15 @@ static int rtw_wx_get_mode(struct net_device *dev, struct iw_request_info *a, - if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE) + if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) wrqu->mode = IW_MODE_INFRA; - else if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE) || - (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE)) + else if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) || + (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true)) wrqu->mode = IW_MODE_ADHOC; - else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) + else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) wrqu->mode = IW_MODE_MASTER; - else if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) == _TRUE) + else if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) == true) wrqu->mode = IW_MODE_MONITOR; else wrqu->mode = IW_MODE_AUTO; @@ -1500,8 +1500,8 @@ static int rtw_wx_set_pmkid(struct net_device *dev, union iwreq_data *wrqu, char *extra) { _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); - u8 j, blInserted = _FALSE; - int intReturn = _FALSE; + u8 j, blInserted = false; + int intReturn = false; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct security_priv *psecuritypriv = &padapter->securitypriv; struct iw_pmksa *pPMK = (struct iw_pmksa *) extra; @@ -1511,23 +1511,23 @@ static int rtw_wx_set_pmkid(struct net_device *dev, _rtw_memcpy(strIssueBssid, pPMK->bssid.sa_data, ETH_ALEN); if (pPMK->cmd == IW_PMKSA_ADD) { RTW_INFO("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n"); - if (_rtw_memcmp(strIssueBssid, strZeroMacAddress, ETH_ALEN) == _TRUE) + if (_rtw_memcmp(strIssueBssid, strZeroMacAddress, ETH_ALEN) == true) return intReturn ; else - intReturn = _TRUE; - blInserted = _FALSE; + intReturn = true; + blInserted = false; /* overwrite PMKID */ for (j = 0 ; j < NUM_PMKID_CACHE; j++) { - if (_rtw_memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN) == _TRUE) { + if (_rtw_memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN) == true) { /* BSSID is matched, the same AP => rewrite with new PMKID. */ RTW_INFO("[rtw_wx_set_pmkid] BSSID exists in the PMKList.\n"); _rtw_memcpy(psecuritypriv->PMKIDList[j].PMKID, pPMK->pmkid, IW_PMKID_LEN); - psecuritypriv->PMKIDList[j].bUsed = _TRUE; + psecuritypriv->PMKIDList[j].bUsed = true; psecuritypriv->PMKIDIndex = j + 1; - blInserted = _TRUE; + blInserted = true; break; } } @@ -1540,19 +1540,19 @@ static int rtw_wx_set_pmkid(struct net_device *dev, _rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, strIssueBssid, ETH_ALEN); _rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pPMK->pmkid, IW_PMKID_LEN); - psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = _TRUE; + psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = true; psecuritypriv->PMKIDIndex++ ; if (psecuritypriv->PMKIDIndex == 16) psecuritypriv->PMKIDIndex = 0; } } else if (pPMK->cmd == IW_PMKSA_REMOVE) { RTW_INFO("[rtw_wx_set_pmkid] IW_PMKSA_REMOVE!\n"); - intReturn = _TRUE; + intReturn = true; for (j = 0 ; j < NUM_PMKID_CACHE; j++) { - if (_rtw_memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN) == _TRUE) { + if (_rtw_memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN) == true) { /* BSSID is matched, the same AP => Remove this PMKID information and reset it. */ memset(psecuritypriv->PMKIDList[j].Bssid, 0x00, ETH_ALEN); - psecuritypriv->PMKIDList[j].bUsed = _FALSE; + psecuritypriv->PMKIDList[j].bUsed = false; break; } } @@ -1560,7 +1560,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev, RTW_INFO("[rtw_wx_set_pmkid] IW_PMKSA_FLUSH!\n"); memset(&psecuritypriv->PMKIDList[0], 0x00, sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE); psecuritypriv->PMKIDIndex = 0; - intReturn = _TRUE; + intReturn = true; } return intReturn ; } @@ -1577,7 +1577,7 @@ static int rtw_wx_get_sens(struct net_device *dev, * 20110311 Commented by Jeff * For rockchip platform's wpa_driver_wext_get_rssi */ - if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { + if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { /* wrqu->sens.value=-padapter->recvpriv.signal_strength; */ wrqu->sens.value = -padapter->recvpriv.rssi; /* RTW_INFO("%s: %d\n", __func__, wrqu->sens.value); */ @@ -1780,7 +1780,7 @@ static int rtw_wx_set_wap(struct net_device *dev, */ #ifdef CONFIG_CONCURRENT_MODE - if (rtw_mi_buddy_check_fwstate(padapter, _FW_UNDER_SURVEY | _FW_UNDER_LINKING) == _TRUE) { + if (rtw_mi_buddy_check_fwstate(padapter, _FW_UNDER_SURVEY | _FW_UNDER_LINKING) == true) { RTW_INFO("set bssid, but buddy_intf is under scanning or linking\n"); ret = -EINVAL; @@ -1813,7 +1813,7 @@ static int rtw_wx_set_wap(struct net_device *dev, while (1) { - if ((rtw_end_of_queue_search(phead, pmlmepriv->pscanned)) == _TRUE) { + if ((rtw_end_of_queue_search(phead, pmlmepriv->pscanned)) == true) { break; } @@ -1825,7 +1825,7 @@ static int rtw_wx_set_wap(struct net_device *dev, src_bssid = temp->sa_data; - if ((_rtw_memcmp(dst_bssid, src_bssid, ETH_ALEN)) == _TRUE) { + if ((_rtw_memcmp(dst_bssid, src_bssid, ETH_ALEN)) == true) { if (!rtw_set_802_11_infrastructure_mode(padapter, pnetwork->network.InfrastructureMode)) { ret = -1; _exit_critical_bh(&queue->lock, &irqL); @@ -1840,7 +1840,7 @@ static int rtw_wx_set_wap(struct net_device *dev, rtw_set_802_11_authentication_mode(padapter, authmode); /* set_802_11_encryption_mode(padapter, padapter->securitypriv.ndisencryptstatus); */ - if (rtw_set_802_11_bssid(padapter, temp->sa_data) == _FALSE) { + if (rtw_set_802_11_bssid(padapter, temp->sa_data) == false) { ret = -1; goto cancel_ps_deny; } @@ -1867,9 +1867,9 @@ static int rtw_wx_get_wap(struct net_device *dev, - if (((check_fwstate(pmlmepriv, _FW_LINKED)) == _TRUE) || - ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) == _TRUE) || - ((check_fwstate(pmlmepriv, WIFI_AP_STATE)) == _TRUE)) + if (((check_fwstate(pmlmepriv, _FW_LINKED)) == true) || + ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) == true) || + ((check_fwstate(pmlmepriv, WIFI_AP_STATE)) == true)) _rtw_memcpy(wrqu->ap_addr.sa_data, pcur_bss->MacAddress, ETH_ALEN); else @@ -1923,7 +1923,7 @@ static int rtw_wx_set_mlme(struct net_device *dev, static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a, union iwreq_data *wrqu, char *extra) { - u8 _status = _FALSE; + u8 _status = false; int ret = 0; _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &padapter->mlmepriv; @@ -1965,7 +1965,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a, /* When Busy Traffic, driver do not site survey. So driver return success. */ /* wpa_supplicant will not issue SIOCSIWSCAN cmd again after scan timeout. */ /* modify by thomas 2011-02-22. */ - if (rtw_mi_busy_traffic_check(padapter, _FALSE)) { + if (rtw_mi_busy_traffic_check(padapter, false)) { indicate_wx_scan_complete_event(padapter); goto cancel_ps_deny; } @@ -1977,7 +1977,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a, goto cancel_ps_deny; } - if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING) == _TRUE) { + if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING) == true) { indicate_wx_scan_complete_event(padapter); goto cancel_ps_deny; } @@ -1996,7 +1996,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a, rtw_p2p_set_pre_state(pwdinfo, rtw_p2p_state(pwdinfo)); rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH); rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_FULL); - rtw_free_network_queue(padapter, _TRUE); + rtw_free_network_queue(padapter, true); } #endif /* CONFIG_P2P */ @@ -2023,7 +2023,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a, #endif if (wrqu->data.length >= WEXT_CSCAN_HEADER_SIZE - && _rtw_memcmp(extra, WEXT_CSCAN_HEADER, WEXT_CSCAN_HEADER_SIZE) == _TRUE + && _rtw_memcmp(extra, WEXT_CSCAN_HEADER, WEXT_CSCAN_HEADER_SIZE) == true ) { int len = wrqu->data.length - WEXT_CSCAN_HEADER_SIZE; char *pos = extra + WEXT_CSCAN_HEADER_SIZE; @@ -2101,7 +2101,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a, _status = rtw_set_802_11_bssid_list_scan(padapter, NULL, 0, NULL, 0); - if (_status == _FALSE) + if (_status == false) ret = -1; cancel_ps_deny: @@ -2164,7 +2164,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a, #endif ; - while (check_fwstate(pmlmepriv, wait_status) == _TRUE) + while (check_fwstate(pmlmepriv, wait_status) == true) return -EAGAIN; _enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); @@ -2172,7 +2172,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a, plist = get_next(phead); while (1) { - if (rtw_end_of_queue_search(phead, plist) == _TRUE) + if (rtw_end_of_queue_search(phead, plist) == true) break; if ((stop - ev) < SCAN_ITEM_SIZE) { @@ -2184,8 +2184,8 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a, /* report network only if the current channel set contains the channel to which this network belongs */ if (rtw_ch_set_search_ch(padapter->mlmeextpriv.channel_set, pnetwork->network.Configuration.DSConfig) >= 0 - && rtw_mlme_band_check(padapter, pnetwork->network.Configuration.DSConfig) == _TRUE - && _TRUE == rtw_validate_ssid(&(pnetwork->network.Ssid)) + && rtw_mlme_band_check(padapter, pnetwork->network.Configuration.DSConfig) == true + && true == rtw_validate_ssid(&(pnetwork->network.Ssid)) ) ev = translate_scan(padapter, a, pnetwork, ev, stop); @@ -2223,7 +2223,7 @@ static int rtw_wx_set_essid(struct net_device *dev, struct mlme_priv *pmlmepriv = &padapter->mlmepriv; _queue *queue = &pmlmepriv->scanned_queue; _list *phead; - s8 status = _TRUE; + s8 status = true; struct wlan_network *pnetwork = NULL; NDIS_802_11_AUTHENTICATION_MODE authmode; NDIS_802_11_SSID ndis_ssid; @@ -2304,7 +2304,7 @@ static int rtw_wx_set_essid(struct net_device *dev, pmlmepriv->pscanned = get_next(phead); while (1) { - if (rtw_end_of_queue_search(phead, pmlmepriv->pscanned) == _TRUE) { + if (rtw_end_of_queue_search(phead, pmlmepriv->pscanned) == true) { break; } @@ -2315,15 +2315,15 @@ static int rtw_wx_set_essid(struct net_device *dev, dst_ssid = pnetwork->network.Ssid.Ssid; - if ((_rtw_memcmp(dst_ssid, src_ssid, ndis_ssid.SsidLength) == _TRUE) && + if ((_rtw_memcmp(dst_ssid, src_ssid, ndis_ssid.SsidLength) == true) && (pnetwork->network.Ssid.SsidLength == ndis_ssid.SsidLength)) { - 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) continue; } - if (rtw_set_802_11_infrastructure_mode(padapter, pnetwork->network.InfrastructureMode) == _FALSE) { + if (rtw_set_802_11_infrastructure_mode(padapter, pnetwork->network.InfrastructureMode) == false) { ret = -1; _exit_critical_bh(&queue->lock, &irqL); goto cancel_ps_deny; @@ -2335,7 +2335,7 @@ static int rtw_wx_set_essid(struct net_device *dev, _exit_critical_bh(&queue->lock, &irqL); rtw_set_802_11_authentication_mode(padapter, authmode); /* set_802_11_encryption_mode(padapter, padapter->securitypriv.ndisencryptstatus); */ - if (rtw_set_802_11_ssid(padapter, &ndis_ssid) == _FALSE) { + if (rtw_set_802_11_ssid(padapter, &ndis_ssid) == false) { ret = -1; goto cancel_ps_deny; } @@ -2366,8 +2366,8 @@ static int rtw_wx_get_essid(struct net_device *dev, - 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)) { len = pcur_bss->Ssid.SsidLength; wrqu->essid.length = len; @@ -2700,7 +2700,7 @@ static int rtw_wx_set_enc(struct net_device *dev, _rtw_memcpy(wep.KeyMaterial, keybuf, wep.KeyLength); - if (rtw_set_802_11_add_wep(padapter, &wep) == _FALSE) { + if (rtw_set_802_11_add_wep(padapter, &wep) == false) { if (rf_on == pwrpriv->rf_pwrstate) ret = -EOPNOTSUPP; goto exit; @@ -2723,8 +2723,8 @@ static int rtw_wx_get_enc(struct net_device *dev, struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - if (check_fwstate(pmlmepriv, _FW_LINKED) != _TRUE) { - if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) != _TRUE) { + if (check_fwstate(pmlmepriv, _FW_LINKED) != true) { + if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) != true) { erq->length = 0; erq->flags |= IW_ENCODE_DISABLED; return 0; @@ -2880,10 +2880,10 @@ static int rtw_wx_set_auth(struct net_device *dev, case IW_AUTH_TKIP_COUNTERMEASURES: { if (param->value) { /* wpa_supplicant is enabling the tkip countermeasure. */ - padapter->securitypriv.btkip_countermeasure = _TRUE; + padapter->securitypriv.btkip_countermeasure = true; } else { /* wpa_supplicant is disabling the tkip countermeasure. */ - padapter->securitypriv.btkip_countermeasure = _FALSE; + padapter->securitypriv.btkip_countermeasure = false; } break; } @@ -2924,9 +2924,9 @@ static int rtw_wx_set_auth(struct net_device *dev, */ if (check_fwstate(&padapter->mlmepriv, _FW_LINKED)) { LeaveAllPowerSaveMode(padapter); - rtw_disassoc_cmd(padapter, 500, _FALSE); + rtw_disassoc_cmd(padapter, 500, false); RTW_INFO("%s...call rtw_indicate_disconnect\n ", __func__); - rtw_indicate_disconnect(padapter, 0, _FALSE); + rtw_indicate_disconnect(padapter, 0, false); rtw_free_assoc_resources(padapter, 1); } #endif @@ -3630,7 +3630,7 @@ static int rtw_get_ap_info(struct net_device *dev, goto exit; } - while ((check_fwstate(pmlmepriv, (_FW_UNDER_SURVEY | _FW_UNDER_LINKING))) == _TRUE) { + while ((check_fwstate(pmlmepriv, (_FW_UNDER_SURVEY | _FW_UNDER_LINKING))) == true) { rtw_msleep_os(30); cnt++; if (cnt > 100) @@ -3656,7 +3656,7 @@ static int rtw_get_ap_info(struct net_device *dev, plist = get_next(phead); while (1) { - if (rtw_end_of_queue_search(phead, plist) == _TRUE) + if (rtw_end_of_queue_search(phead, plist) == true) break; @@ -3670,7 +3670,7 @@ static int rtw_get_ap_info(struct net_device *dev, } - if (_rtw_memcmp(bssid, pnetwork->network.MacAddress, ETH_ALEN) == _TRUE) { /* BSSID match, then check if supporting wpa/wpa2 */ + if (_rtw_memcmp(bssid, pnetwork->network.MacAddress, ETH_ALEN) == true) { /* BSSID match, then check if supporting wpa/wpa2 */ RTW_INFO("BSSID:" MAC_FMT "\n", MAC_ARG(bssid)); pbuf = rtw_get_wpa_ie(&pnetwork->network.IEs[12], &wpa_ielen, pnetwork->network.IELength - 12); @@ -4226,7 +4226,7 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev, plist = get_next(phead); 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); @@ -4297,7 +4297,7 @@ static int rtw_p2p_get_peer_wfd_preferred_connection(struct net_device *dev, RTW_INFO("[%s] wfd_pc = %d\n", __func__, pwdinfo->wfd_info->wfd_pc); wrqu->data.length = strlen(extra); - pwdinfo->wfd_info->wfd_pc = _FALSE; /* Reset the WFD preferred connection to P2P */ + pwdinfo->wfd_info->wfd_pc = false; /* Reset the WFD preferred connection to P2P */ return ret; } @@ -4316,7 +4316,7 @@ static int rtw_p2p_get_peer_wfd_session_available(struct net_device *dev, RTW_INFO("[%s] wfd_sa = %d\n", __func__, pwdinfo->wfd_info->peer_session_avail); wrqu->data.length = strlen(extra); - pwdinfo->wfd_info->peer_session_avail = _TRUE; /* Reset the WFD session available */ + pwdinfo->wfd_info->peer_session_avail = true; /* Reset the WFD session available */ return ret; } @@ -4355,7 +4355,7 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev, plist = get_next(phead); 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); @@ -4441,7 +4441,7 @@ static int rtw_p2p_get_device_type(struct net_device *dev, plist = get_next(phead); 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); @@ -4516,7 +4516,7 @@ static int rtw_p2p_get_device_name(struct net_device *dev, plist = get_next(phead); 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); @@ -4586,7 +4586,7 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev, plist = get_next(phead); 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); @@ -4667,7 +4667,7 @@ static int rtw_p2p_connect(struct net_device *dev, } #ifdef CONFIG_INTEL_WIDI - if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE) { + if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) { RTW_INFO("[%s] WiFi is under survey!\n", __func__); return ret; } @@ -4685,7 +4685,7 @@ static int rtw_p2p_connect(struct net_device *dev, plist = get_next(phead); 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); @@ -4719,7 +4719,7 @@ static int rtw_p2p_connect(struct net_device *dev, pwdinfo->nego_req_info.peer_channel_num[0] = uintPeerChannel; _rtw_memcpy(pwdinfo->nego_req_info.peerDevAddr, pnetwork->network.MacAddress, ETH_ALEN); - pwdinfo->nego_req_info.benable = _TRUE; + pwdinfo->nego_req_info.benable = true; _cancel_timer_ex(&pwdinfo->restore_p2p_state_timer); if (rtw_p2p_state(pwdinfo) != P2P_STATE_GONEGO_OK) { @@ -4759,7 +4759,7 @@ static int rtw_p2p_connect(struct net_device *dev, _cancel_timer_ex(&pwdinfo->restore_p2p_state_timer); rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH); rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_NONE); - rtw_free_network_queue(padapter, _TRUE); + rtw_free_network_queue(padapter, true); /** * For WiDi, if we can't find candidate device in scanning queue, * driver will do scanning itself @@ -4815,7 +4815,7 @@ static int rtw_p2p_invite_req(struct net_device *dev, return ret; } else { /* Reset the content of struct tx_invite_req_info */ - pinvite_req_info->benable = _FALSE; + pinvite_req_info->benable = false; memset(pinvite_req_info->go_bssid, 0x00, ETH_ALEN); memset(pinvite_req_info->go_ssid, 0x00, WLAN_SSID_MAXLEN); pinvite_req_info->ssidlen = 0x00; @@ -4833,7 +4833,7 @@ static int rtw_p2p_invite_req(struct net_device *dev, plist = get_next(phead); 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); @@ -4890,13 +4890,13 @@ static int rtw_p2p_invite_req(struct net_device *dev, /* In big endian format. */ wfd_devinfo_field = RTW_GET_BE16(wfd_devinfo); if (wfd_devinfo_field & WFD_DEVINFO_SESSION_AVAIL) - pwfd_info->peer_session_avail = _TRUE; + pwfd_info->peer_session_avail = true; else - pwfd_info->peer_session_avail = _FALSE; + pwfd_info->peer_session_avail = false; } } - if (_FALSE == pwfd_info->peer_session_avail) { + if (false == pwfd_info->peer_session_avail) { RTW_INFO("[%s] WFD Session not avaiable!\n", __func__); goto exit; } @@ -4916,7 +4916,7 @@ static int rtw_p2p_invite_req(struct net_device *dev, /* Store the GO's ssid */ pinvite_req_info->ssidlen = wrqu->data.length - 36; _rtw_memcpy(pinvite_req_info->go_ssid, &extra[36], (u32) pinvite_req_info->ssidlen); - pinvite_req_info->benable = _TRUE; + pinvite_req_info->benable = true; pinvite_req_info->peer_ch = uintPeerChannel; rtw_p2p_set_pre_state(pwdinfo, rtw_p2p_state(pwdinfo)); @@ -4991,11 +4991,11 @@ static int rtw_p2p_set_persistent(struct net_device *dev, return ret; } else { if (extra[0] == '0') /* Disable the persistent group function. */ - pwdinfo->persistent_supported = _FALSE; + pwdinfo->persistent_supported = false; else if (extra[0] == '1') /* Enable the persistent group function. */ - pwdinfo->persistent_supported = _TRUE; + pwdinfo->persistent_supported = true; else - pwdinfo->persistent_supported = _FALSE; + pwdinfo->persistent_supported = false; } printk("[%s] persistent_supported = %d\n", __func__, pwdinfo->persistent_supported); @@ -5122,7 +5122,7 @@ static int rtw_p2p_set_pc(struct net_device *dev, plist = get_next(phead); 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); @@ -5180,9 +5180,9 @@ static int rtw_p2p_set_pc(struct net_device *dev, /* In big endian format. */ wfd_devinfo_field = RTW_GET_BE16(wfd_devinfo); if (wfd_devinfo_field & WFD_DEVINFO_PC_TDLS) - pwfd_info->wfd_pc = _TRUE; + pwfd_info->wfd_pc = true; else - pwfd_info->wfd_pc = _FALSE; + pwfd_info->wfd_pc = false; } } } else @@ -5286,11 +5286,11 @@ static int rtw_p2p_set_sa(struct net_device *dev, return ret; } else { if (extra[0] == '0') /* Disable the session available. */ - pwdinfo->session_available = _FALSE; + pwdinfo->session_available = false; else if (extra[0] == '1') /* Enable the session available. */ - pwdinfo->session_available = _TRUE; + pwdinfo->session_available = true; else - pwdinfo->session_available = _FALSE; + pwdinfo->session_available = false; } printk("[%s] session available = %d\n", __func__, pwdinfo->session_available); @@ -5337,7 +5337,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev, return ret; } else { #ifdef CONFIG_INTEL_WIDI - if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE) { + if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) { RTW_INFO("[%s] WiFi is under survey!\n", __func__); return ret; } @@ -5349,7 +5349,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev, memset(&pwdinfo->tx_prov_disc_info.ssid, 0x00, sizeof(NDIS_802_11_SSID)); pwdinfo->tx_prov_disc_info.peer_channel_num[0] = 0; pwdinfo->tx_prov_disc_info.peer_channel_num[1] = 0; - pwdinfo->tx_prov_disc_info.benable = _FALSE; + pwdinfo->tx_prov_disc_info.benable = false; } for (jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3) @@ -5374,7 +5374,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev, plist = get_next(phead); while (1) { - if (rtw_end_of_queue_search(phead, plist) == _TRUE) + if (rtw_end_of_queue_search(phead, plist) == true) break; if (uintPeerChannel != 0) @@ -5452,13 +5452,13 @@ static int rtw_p2p_prov_disc(struct net_device *dev, /* In big endian format. */ wfd_devinfo_field = RTW_GET_BE16(wfd_devinfo); if (wfd_devinfo_field & WFD_DEVINFO_SESSION_AVAIL) - pwfd_info->peer_session_avail = _TRUE; + pwfd_info->peer_session_avail = true; else - pwfd_info->peer_session_avail = _FALSE; + pwfd_info->peer_session_avail = false; } } - if (_FALSE == pwfd_info->peer_session_avail) { + if (false == pwfd_info->peer_session_avail) { RTW_INFO("[%s] WFD Session not avaiable!\n", __func__); goto exit; } @@ -5473,7 +5473,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev, _rtw_memcpy(pwdinfo->tx_prov_disc_info.peerIFAddr, pnetwork->network.MacAddress, ETH_ALEN); _rtw_memcpy(pwdinfo->tx_prov_disc_info.peerDevAddr, peerMAC, ETH_ALEN); pwdinfo->tx_prov_disc_info.peer_channel_num[0] = (u16) uintPeerChannel; - pwdinfo->tx_prov_disc_info.benable = _TRUE; + pwdinfo->tx_prov_disc_info.benable = true; rtw_p2p_set_pre_state(pwdinfo, rtw_p2p_state(pwdinfo)); rtw_p2p_set_state(pwdinfo, P2P_STATE_TX_PROVISION_DIS_REQ); @@ -5517,7 +5517,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev, _cancel_timer_ex(&pwdinfo->restore_p2p_state_timer); rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH); rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_NONE); - rtw_free_network_queue(padapter, _TRUE); + rtw_free_network_queue(padapter, true); _enter_critical_bh(&pmlmepriv->lock, &irqL); rtw_sitesurvey_cmd(padapter, NULL, 0, NULL, 0); _exit_critical_bh(&pmlmepriv->lock, &irqL); @@ -5829,7 +5829,7 @@ static int rtw_rereg_nd_name(struct net_device *dev, if (0 != ret) goto exit; - if (_rtw_memcmp(rereg_priv->old_ifname, "disable%d", 9) == _TRUE) { + if (_rtw_memcmp(rereg_priv->old_ifname, "disable%d", 9) == true) { padapter->ledpriv.bRegUseLed = rereg_priv->old_bRegUseLed; rtw_hal_sw_led_init(padapter); /* rtw_ips_mode_req(&padapter->pwrctrlpriv, rereg_priv->old_ips_mode); */ @@ -5838,16 +5838,16 @@ static int rtw_rereg_nd_name(struct net_device *dev, strncpy(rereg_priv->old_ifname, new_ifname, IFNAMSIZ); rereg_priv->old_ifname[IFNAMSIZ - 1] = 0; - if (_rtw_memcmp(new_ifname, "disable%d", 9) == _TRUE) { + if (_rtw_memcmp(new_ifname, "disable%d", 9) == true) { RTW_INFO("%s disable\n", __func__); /* free network queue for Android's timming issue */ - rtw_free_network_queue(padapter, _TRUE); + rtw_free_network_queue(padapter, true); /* close led */ rtw_led_control(padapter, LED_CTL_POWER_OFF); rereg_priv->old_bRegUseLed = padapter->ledpriv.bRegUseLed; - padapter->ledpriv.bRegUseLed = _FALSE; + padapter->ledpriv.bRegUseLed = false; rtw_hal_sw_led_deinit(padapter); /* the interface is being "disabled", we can do deeper IPS */ @@ -6137,7 +6137,7 @@ static int rtw_dbg_port(struct net_device *dev, break; case 0x7a: receive_disconnect(padapter, pmlmeinfo->network.MacAddress - , WLAN_REASON_EXPIRATION_CHK, _FALSE); + , WLAN_REASON_EXPIRATION_CHK, false); break; case 0x7F: switch (minor_cmd) { @@ -6219,7 +6219,7 @@ static int rtw_dbg_port(struct net_device *dev, 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); plist = get_next(plist); @@ -6461,7 +6461,7 @@ static int rtw_dbg_port(struct net_device *dev, struct PHY_DM_STRUCT *pDM_Odm = &pHalData->odmpriv; u8 chan = rtw_get_oper_ch(padapter); RTW_INFO("===========================================\n"); - odm_inband_noise_monitor(pDM_Odm, _TRUE, 0x1e, 100); + odm_inband_noise_monitor(pDM_Odm, true, 0x1e, 100); RTW_INFO("channel(%d),noise_a = %d, noise_b = %d , noise_all:%d\n", chan, pDM_Odm->noise_level.noise[ODM_RF_PATH_A], pDM_Odm->noise_level.noise[ODM_RF_PATH_B], @@ -6947,7 +6947,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, _rtw_memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8); _rtw_memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8); - psecuritypriv->busetkipkey = _TRUE; + psecuritypriv->busetkipkey = true; } else if (strcmp(param->u.crypt.alg, "CCMP") == 0) { RTW_INFO("%s, set group_key, CCMP\n", __func__); @@ -6968,7 +6968,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, printk(" %02x ", padapter->securitypriv.dot11wBIPKey[param->u.crypt.idx].skey[no]); RTW_INFO("\n"); */ padapter->securitypriv.dot11wBIPKeyid = param->u.crypt.idx; - padapter->securitypriv.binstallBIPkey = _TRUE; + padapter->securitypriv.binstallBIPkey = true; RTW_INFO(" ~~~~set sta key:IGKT\n"); goto exit; } @@ -6981,7 +6981,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, psecuritypriv->dot118021XGrpKeyid = param->u.crypt.idx; - psecuritypriv->binstallGrpkey = _TRUE; + psecuritypriv->binstallGrpkey = true; psecuritypriv->dot11PrivacyAlgrthm = psecuritypriv->dot118021XGrpPrivacy;/* !!! */ @@ -6989,7 +6989,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, pbcmc_sta = rtw_get_bcmc_stainfo(padapter); if (pbcmc_sta) { - pbcmc_sta->ieee8021x_blocked = _FALSE; + pbcmc_sta->ieee8021x_blocked = false; pbcmc_sta->dot118021XPrivacy = psecuritypriv->dot118021XGrpPrivacy; /* rx will use bmc_sta's dot118021XPrivacy */ } @@ -7020,7 +7020,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, _rtw_memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8); _rtw_memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8); - psecuritypriv->busetkipkey = _TRUE; + psecuritypriv->busetkipkey = true; } else if (strcmp(param->u.crypt.alg, "CCMP") == 0) { @@ -7035,9 +7035,9 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, rtw_ap_set_pairwise_key(padapter, psta); - psta->ieee8021x_blocked = _FALSE; + psta->ieee8021x_blocked = false; - psta->bpairwise_key_installed = _TRUE; + psta->bpairwise_key_installed = true; } else { /* group key??? */ if (strcmp(param->u.crypt.alg, "WEP") == 0) { @@ -7056,7 +7056,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, _rtw_memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8); _rtw_memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8); - psecuritypriv->busetkipkey = _TRUE; + psecuritypriv->busetkipkey = true; } else if (strcmp(param->u.crypt.alg, "CCMP") == 0) { psecuritypriv->dot118021XGrpPrivacy = _AES_; @@ -7067,7 +7067,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, psecuritypriv->dot118021XGrpKeyid = param->u.crypt.idx; - psecuritypriv->binstallGrpkey = _TRUE; + psecuritypriv->binstallGrpkey = true; psecuritypriv->dot11PrivacyAlgrthm = psecuritypriv->dot118021XGrpPrivacy;/* !!! */ @@ -7075,7 +7075,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, pbcmc_sta = rtw_get_bcmc_stainfo(padapter); if (pbcmc_sta) { - pbcmc_sta->ieee8021x_blocked = _FALSE; + pbcmc_sta->ieee8021x_blocked = false; pbcmc_sta->dot118021XPrivacy = psecuritypriv->dot118021XGrpPrivacy; /* rx will use bmc_sta's dot118021XPrivacy */ } @@ -7105,7 +7105,7 @@ static int rtw_set_beacon(struct net_device *dev, struct ieee_param *param, int RTW_INFO("%s, len=%d\n", __func__, len); - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE) + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true) return -EINVAL; _rtw_memcpy(&pstapriv->max_num_sta, param->u.bcn_ie.reserved, 2); @@ -7137,7 +7137,7 @@ static int rtw_hostapd_sta_flush(struct net_device *dev) flush_all_cam_entry(padapter); /* clear CAM */ - ret = rtw_sta_flush(padapter, _TRUE); + ret = rtw_sta_flush(padapter, true); return ret; @@ -7154,7 +7154,7 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param) RTW_INFO("rtw_add_sta(aid=%d)=" MAC_FMT "\n", param->u.add_sta.aid, MAC_ARG(param->sta_addr)); - if (check_fwstate(pmlmepriv, (_FW_LINKED | WIFI_AP_STATE)) != _TRUE) + if (check_fwstate(pmlmepriv, (_FW_LINKED | WIFI_AP_STATE)) != true) return -EINVAL; if (param->sta_addr[0] == 0xff && param->sta_addr[1] == 0xff && @@ -7184,14 +7184,14 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param) /* chec 802.11n ht cap. */ if (WLAN_STA_HT & flags) { - psta->htpriv.ht_option = _TRUE; + psta->htpriv.ht_option = true; psta->qos_option = 1; _rtw_memcpy((void *)&psta->htpriv.ht_cap, (void *)¶m->u.add_sta.ht_cap, sizeof(struct rtw_ieee80211_ht_cap)); } 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; update_sta_info_apmode(padapter, psta); @@ -7214,7 +7214,7 @@ static int rtw_del_sta(struct net_device *dev, struct ieee_param *param) RTW_INFO("rtw_del_sta=" MAC_FMT "\n", MAC_ARG(param->sta_addr)); - if (check_fwstate(pmlmepriv, (_FW_LINKED | WIFI_AP_STATE)) != _TRUE) + if (check_fwstate(pmlmepriv, (_FW_LINKED | WIFI_AP_STATE)) != true) return -EINVAL; if (param->sta_addr[0] == 0xff && param->sta_addr[1] == 0xff && @@ -7224,15 +7224,15 @@ static int rtw_del_sta(struct net_device *dev, struct ieee_param *param) psta = rtw_get_stainfo(pstapriv, param->sta_addr); if (psta) { - u8 updated = _FALSE; + u8 updated = false; /* RTW_INFO("free psta=%p, aid=%d\n", psta, psta->aid); */ _enter_critical_bh(&pstapriv->asoc_list_lock, &irqL); - if (rtw_is_list_empty(&psta->asoc_list) == _FALSE) { + if (rtw_is_list_empty(&psta->asoc_list) == false) { rtw_list_delete(&psta->asoc_list); pstapriv->asoc_list_cnt--; - updated = ap_free_sta(padapter, psta, _TRUE, WLAN_REASON_DEAUTH_LEAVING, _TRUE); + updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING, true); } _exit_critical_bh(&pstapriv->asoc_list_lock, &irqL); @@ -7264,7 +7264,7 @@ static int rtw_ioctl_get_sta_data(struct net_device *dev, struct ieee_param *par RTW_INFO("rtw_ioctl_get_sta_info, sta_addr: " MAC_FMT "\n", MAC_ARG(param_ex->sta_addr)); - if (check_fwstate(pmlmepriv, (_FW_LINKED | WIFI_AP_STATE)) != _TRUE) + if (check_fwstate(pmlmepriv, (_FW_LINKED | WIFI_AP_STATE)) != true) return -EINVAL; if (param_ex->sta_addr[0] == 0xff && param_ex->sta_addr[1] == 0xff && @@ -7321,7 +7321,7 @@ static int rtw_get_sta_wpaie(struct net_device *dev, struct ieee_param *param) RTW_INFO("rtw_get_sta_wpaie, sta_addr: " MAC_FMT "\n", MAC_ARG(param->sta_addr)); - if (check_fwstate(pmlmepriv, (_FW_LINKED | WIFI_AP_STATE)) != _TRUE) + if (check_fwstate(pmlmepriv, (_FW_LINKED | WIFI_AP_STATE)) != true) return -EINVAL; if (param->sta_addr[0] == 0xff && param->sta_addr[1] == 0xff && @@ -7365,7 +7365,7 @@ static int rtw_set_wps_beacon(struct net_device *dev, struct ieee_param *param, RTW_INFO("%s, len=%d\n", __func__, len); - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE) + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true) return -EINVAL; ie_len = len - 12 - 2; /* 12 = param header, 2:no packed */ @@ -7386,9 +7386,9 @@ static int rtw_set_wps_beacon(struct net_device *dev, struct ieee_param *param, _rtw_memcpy(pmlmepriv->wps_beacon_ie, param->u.bcn_ie.buf, ie_len); - update_beacon(padapter, _VENDOR_SPECIFIC_IE_, wps_oui, _TRUE); + update_beacon(padapter, _VENDOR_SPECIFIC_IE_, wps_oui, true); - pmlmeext->bstart_bss = _TRUE; + pmlmeext->bstart_bss = true; } @@ -7406,7 +7406,7 @@ static int rtw_set_wps_probe_resp(struct net_device *dev, struct ieee_param *par RTW_INFO("%s, len=%d\n", __func__, len); - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE) + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true) return -EINVAL; ie_len = len - 12 - 2; /* 12 = param header, 2:no packed */ @@ -7441,7 +7441,7 @@ static int rtw_set_wps_assoc_resp(struct net_device *dev, struct ieee_param *par RTW_INFO("%s, len=%d\n", __func__, len); - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE) + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true) return -EINVAL; ie_len = len - 12 - 2; /* 12 = param header, 2:no packed */ @@ -7481,7 +7481,7 @@ static int rtw_set_hidden_ssid(struct net_device *dev, struct ieee_param *param, sint ssid_len = 0; u8 ignore_broadcast_ssid; - if (check_fwstate(mlmepriv, WIFI_AP_STATE) != _TRUE) + if (check_fwstate(mlmepriv, WIFI_AP_STATE) != true) return -EPERM; if (param->u.bcn_ie.reserved[0] != 0xea) @@ -7529,7 +7529,7 @@ static int rtw_ioctl_acl_remove_sta(struct net_device *dev, struct ieee_param *p _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE) + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true) return -EINVAL; if (param->sta_addr[0] == 0xff && param->sta_addr[1] == 0xff && @@ -7549,7 +7549,7 @@ static int rtw_ioctl_acl_add_sta(struct net_device *dev, struct ieee_param *para _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE) + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true) return -EINVAL; if (param->sta_addr[0] == 0xff && param->sta_addr[1] == 0xff && @@ -7569,7 +7569,7 @@ static int rtw_ioctl_set_macaddr_acl(struct net_device *dev, struct ieee_param * _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE) + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true) return -EINVAL; rtw_set_macaddr_acl(padapter, param->u.mlme.command); @@ -7768,7 +7768,7 @@ static int rtw_wx_set_priv(struct net_device *dev, u8 wps_oui[4] = {0x0, 0x50, 0xf2, 0x04}; if ((_VENDOR_SPECIFIC_IE_ == probereq_wpsie[0]) && - (_rtw_memcmp(&probereq_wpsie[2], wps_oui, 4) == _TRUE)) { + (_rtw_memcmp(&probereq_wpsie[2], wps_oui, 4) == true)) { cp_sz = probereq_wpsie_len > MAX_WPS_IE_LEN ? MAX_WPS_IE_LEN : probereq_wpsie_len; if (pmlmepriv->wps_probe_req_ie) { @@ -7796,7 +7796,7 @@ static int rtw_wx_set_priv(struct net_device *dev, } if (len >= WEXT_CSCAN_HEADER_SIZE - && _rtw_memcmp(ext, WEXT_CSCAN_HEADER, WEXT_CSCAN_HEADER_SIZE) == _TRUE + && _rtw_memcmp(ext, WEXT_CSCAN_HEADER, WEXT_CSCAN_HEADER_SIZE) == true ) { ret = rtw_wx_set_scan(dev, info, awrq, ext); goto FREE_EXT; @@ -7818,7 +7818,7 @@ static int rtw_wx_set_priv(struct net_device *dev, struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct wlan_network *pcur_network = &pmlmepriv->cur_network; - if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) + if (check_fwstate(pmlmepriv, _FW_LINKED) == true) sprintf(ext, "%s rssi %d", pcur_network->network.Ssid.Ssid, padapter->recvpriv.rssi); else sprintf(ext, "OK"); @@ -7902,7 +7902,7 @@ static int rtw_wowlan_ctrl(struct net_device *dev, if (!check_fwstate(pmlmepriv, _FW_LINKED) && check_fwstate(pmlmepriv, WIFI_STATION_STATE)) { #ifdef CONFIG_PNO_SUPPORT - pwrctrlpriv->wowlan_pno_enable = _TRUE; + pwrctrlpriv->wowlan_pno_enable = true; #else RTW_INFO("[%s] WARNING: Please Connect With AP First!!\n", __func__); goto _rtw_wowlan_ctrl_exit_free; @@ -7923,7 +7923,7 @@ static int rtw_wowlan_ctrl(struct net_device *dev, rtw_resume_common(padapter); #ifdef CONFIG_PNO_SUPPORT - pwrctrlpriv->wowlan_pno_enable = _FALSE; + pwrctrlpriv->wowlan_pno_enable = false; #endif /* CONFIG_PNO_SUPPORT */ } else { @@ -8002,7 +8002,7 @@ static int rtw_wowlan_set_pattern(struct net_device *dev, &pwrpriv->patterns[index].len, pwrpriv->patterns[index].mask); - if (ret == _TRUE) + if (ret == true) pwrpriv->wowlan_pattern_idx++; } } else if (strncmp(input, "clean", 5) == 0) { @@ -8046,7 +8046,7 @@ static int rtw_ap_wowlan_ctrl(struct net_device *dev, if (_rtw_memcmp(extra, "enable", 6)) { - pwrctrlpriv->wowlan_ap_mode = _TRUE; + pwrctrlpriv->wowlan_ap_mode = true; rtw_suspend_common(padapter); } else if (_rtw_memcmp(extra, "disable", 7)) { @@ -8324,7 +8324,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, u8 *efuse; u32 shift, cnt; u32 blksz = 0x200; /* The size of one time show, default 512 */ - EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, _FALSE); + EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false); efuse = pHalData->efuse_eeprom_data; @@ -8357,7 +8357,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, u32 shift, cnt; u32 blksz = 0x200; /* The size of one time show, default 512 */ - EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN , (void *)&mapLen, _FALSE); + EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN , (void *)&mapLen, false); efuse = pEfuseHal->fakeEfuseInitMap; if (rtw_efuse_mask_map_read(padapter, 0, mapLen, efuse) == _FAIL) { RTW_INFO("%s: read realmap Fail!!\n", __func__); @@ -8405,7 +8405,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, } RTW_INFO("%s: cnts=%d\n", __func__, cnts); - EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN , (void *)&max_available_len, _FALSE); + EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN , (void *)&max_available_len, false); if ((addr + cnts) > max_available_len) { RTW_INFO("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts); err = -EINVAL; @@ -8431,10 +8431,10 @@ static int rtw_mp_efuse_get(struct net_device *dev, u32 blksz = 0x200; /* The size of one time show, default 512 */ addr = 0; - EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_REAL_CONTENT_LEN , (void *)&mapLen, _FALSE); + EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_REAL_CONTENT_LEN , (void *)&mapLen, false); RTW_INFO("Real content len = %d\n",mapLen ); - if (rtw_efuse_access(padapter, _FALSE, addr, mapLen, rawdata) == _FAIL) { + if (rtw_efuse_access(padapter, false, addr, mapLen, rawdata) == _FAIL) { RTW_INFO("%s: rtw_efuse_access Fail!!\n", __func__); err = -EFAULT; goto exit; @@ -8470,10 +8470,10 @@ static int rtw_mp_efuse_get(struct net_device *dev, u32 blksz = 0x200; /* The size of one time show, default 512 */ addr = 0; - EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&mapLen, _FALSE); + EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&mapLen, false); RTW_INFO("Real content len = %d\n", mapLen); #ifdef RTW_HALMAC - if (rtw_efuse_bt_access(padapter, _FALSE, 0, mapLen, rawdata) == _FAIL) { + if (rtw_efuse_bt_access(padapter, false, 0, mapLen, rawdata) == _FAIL) { RTW_INFO("%s: rtw_efuse_access Fail!!\n", __func__); err = -EFAULT; goto exit; @@ -8481,7 +8481,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, #else rtw_write8(padapter, 0x35, 0x1); - if (rtw_efuse_access(padapter, _FALSE, addr, mapLen, rawdata) == _FAIL) { + if (rtw_efuse_access(padapter, false, addr, mapLen, rawdata) == _FAIL) { RTW_INFO("%s: rtw_efuse_access Fail!!\n", __func__); err = -EFAULT; goto exit; @@ -8520,7 +8520,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, addr = hal_efuse_macaddr_offset(padapter); cnts = 6; - EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_len, _FALSE); + EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_len, false); if ((addr + cnts) > max_available_len) { RTW_INFO("%s: addr(0x%02x)+cnts(%d) parameter error!\n", __func__, addr, cnts); err = -EFAULT; @@ -8548,7 +8548,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, addr = EEPROM_VID_88EU; cnts = 4; - EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_len, _FALSE); + EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_len, false); if ((addr + cnts) > max_available_len) { RTW_INFO("%s: addr(0x%02x)+cnts(%d) parameter error!\n", __func__, addr, cnts); err = -EFAULT; @@ -8585,7 +8585,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, sprintf(extra, "[available raw size]= %d bytes\n", raw_maxsize - raw_cursize); } else if (strcmp(tmp[0], "btfmap") == 0) { - BTEfuse_PowerSwitch(padapter, 1, _TRUE); + BTEfuse_PowerSwitch(padapter, 1, true); mapLen = EFUSE_BT_MAX_MAP_LEN; if (rtw_BT_efuse_map_read(padapter, 0, mapLen, pEfuseHal->BTEfuseInitMap) == _FAIL) { @@ -8614,7 +8614,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, } /* RTW_INFO("\n"); */ } else if (strcmp(tmp[0], "btbmap") == 0) { - BTEfuse_PowerSwitch(padapter, 1, _TRUE); + BTEfuse_PowerSwitch(padapter, 1, true); mapLen = EFUSE_BT_MAX_MAP_LEN; if (rtw_BT_efuse_map_read(padapter, 0, mapLen, pEfuseHal->BTEfuseInitMap) == _FAIL) { @@ -8659,7 +8659,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, goto exit; } - BTEfuse_PowerSwitch(padapter, 1, _TRUE); + BTEfuse_PowerSwitch(padapter, 1, true); /* rmap addr cnts */ addr = simple_strtoul(tmp[1], &ptmp, 16); @@ -8673,7 +8673,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, } RTW_INFO("%s: cnts=%d\n", __func__, cnts); #ifndef RTW_HALMAC - EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&max_available_len, _FALSE); + EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&max_available_len, false); if ((addr + cnts) > max_available_len) { RTW_INFO("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts); err = -EFAULT; @@ -8740,7 +8740,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, u32 shift, cnt; u32 blksz = 0x200; /* The size of one time show, default 512 */ - EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN , (void *)&mapLen, _FALSE); + EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN , (void *)&mapLen, false); efuse = pEfuseHal->fakeEfuseModifiedMap; shift = blksz * fk_order; @@ -8818,7 +8818,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, mask_len = sizeof(u8) * rtw_get_efuse_mask_arraylen(padapter); rtw_efuse_mask_array(padapter, mask_buf); - if (padapter->registrypriv.bFileMaskEfuse == _TRUE) + if (padapter->registrypriv.bFileMaskEfuse == true) _rtw_memcpy(mask_buf, maskfileBuffer, mask_len); sprintf(extra, "\n"); @@ -8889,7 +8889,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, if (copy_from_user(extra, wrqu->pointer, wrqu->length)) return -EFAULT; - EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN , (void *)&wifimaplen, _FALSE); + EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN , (void *)&wifimaplen, false); setdata = rtw_zmalloc(1024); if (setdata == NULL) { @@ -8974,7 +8974,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, for (jj = 0, kk = 0; jj < cnts; jj++, kk += 2) setdata[jj] = key_2char2num(tmp[2][kk], tmp[2][kk + 1]); - EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_len, _FALSE); + EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_len, false); if ((addr + cnts) > max_available_len) { RTW_INFO("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts); @@ -9029,7 +9029,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, for (jj = 0, kk = 0; jj < cnts; jj++, kk += 2) setrawdata[jj] = key_2char2num(tmp[2][kk], tmp[2][kk + 1]); - if (rtw_efuse_access(padapter, _TRUE, addr, cnts, setrawdata) == _FAIL) { + if (rtw_efuse_access(padapter, true, addr, cnts, setrawdata) == _FAIL) { RTW_INFO("%s: rtw_efuse_access error!!\n", __func__); err = -EFAULT; goto exit; @@ -9061,14 +9061,14 @@ static int rtw_mp_efuse_set(struct net_device *dev, for (jj = 0, kk = 0; jj < cnts; jj++, kk += 2) setrawdata[jj] = key_2char2num(tmp[2][kk], tmp[2][kk + 1]); #ifdef RTW_HALMAC - if (rtw_efuse_bt_access(padapter, _TRUE, addr, cnts, setrawdata) == _FAIL) { + if (rtw_efuse_bt_access(padapter, true, addr, cnts, setrawdata) == _FAIL) { RTW_INFO("%s: rtw_efuse_access error!!\n", __func__); err = -EFAULT; goto exit; } #else rtw_write8(padapter, 0x35, 1); /* switch bank 1 (BT)*/ - if (rtw_efuse_access(padapter, _TRUE, addr, cnts, setrawdata) == _FAIL) { + if (rtw_efuse_access(padapter, true, addr, cnts, setrawdata) == _FAIL) { RTW_INFO("%s: rtw_efuse_access error!!\n", __func__); rtw_write8(padapter, 0x35, 0); /* switch bank 0 (WiFi)*/ err = -EFAULT; @@ -9113,7 +9113,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, for (jj = 0, kk = 0; jj < cnts; jj++, kk += 2) setdata[jj] = key_2char2num(tmp[1][kk], tmp[1][kk + 1]); - EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_len, _FALSE); + EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_len, false); if ((addr + cnts) > max_available_len) { RTW_INFO("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts); @@ -9152,7 +9152,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, for (jj = 0, kk = 0; jj < cnts; jj++, kk += 2) setdata[jj] = key_2char2num(tmp[1][kk], tmp[1][kk + 1]); - EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_len, _FALSE); + EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_len, false); if ((addr + cnts) > max_available_len) { RTW_INFO("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts); err = -EFAULT; @@ -9190,7 +9190,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, } #ifndef RTW_HALMAC - BTEfuse_PowerSwitch(padapter, 1, _TRUE); + BTEfuse_PowerSwitch(padapter, 1, true); addr = 0x1ff; rtw_write8(padapter, EFUSE_CTRL + 1, (addr & 0xff)); rtw_msleep_os(10); @@ -9199,7 +9199,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, rtw_write8(padapter, EFUSE_CTRL + 3, 0x72); rtw_msleep_os(10); rtw_read8(padapter, EFUSE_CTRL); - BTEfuse_PowerSwitch(padapter, 1, _FALSE); + BTEfuse_PowerSwitch(padapter, 1, false); #endif /* RTW_HALMAC */ addr = simple_strtoul(tmp[1], &ptmp, 16); @@ -9223,7 +9223,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, for (jj = 0, kk = 0; jj < cnts; jj++, kk += 2) setdata[jj] = key_2char2num(tmp[2][kk], tmp[2][kk + 1]); #ifndef RTW_HALMAC - EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&max_available_len, _FALSE); + EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&max_available_len, false); if ((addr + cnts) > max_available_len) { RTW_INFO("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts); err = -EFAULT; @@ -9292,7 +9292,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, goto exit; } #ifndef RTW_HALMAC - BTEfuse_PowerSwitch(padapter, 1, _TRUE); + BTEfuse_PowerSwitch(padapter, 1, true); addr = 0x1ff; rtw_write8(padapter, EFUSE_CTRL + 1, (addr & 0xff)); rtw_msleep_os(10); @@ -9301,7 +9301,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, rtw_write8(padapter, EFUSE_CTRL + 3, 0x72); rtw_msleep_os(10); rtw_read8(padapter, EFUSE_CTRL); - BTEfuse_PowerSwitch(padapter, 1, _FALSE); + BTEfuse_PowerSwitch(padapter, 1, false); #endif /* RTW_HALMAC */ _rtw_memcpy(pEfuseHal->BTEfuseModifiedMap, pEfuseHal->fakeBTEfuseModifiedMap, EFUSE_BT_MAX_MAP_LEN); @@ -9357,7 +9357,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, } else if (strcmp(tmp[0], "wlfk2map") == 0) { *extra = 0; - if (padapter->registrypriv.bFileMaskEfuse != _TRUE && pmp_priv->bloadefusemap == _TRUE) { + if (padapter->registrypriv.bFileMaskEfuse != true && pmp_priv->bloadefusemap == true) { RTW_INFO("%s: File eFuse mask file not to be loaded\n", __func__); sprintf(extra, "Not load eFuse mask file yet, Please use the efuse_mask CMD.\n"); err = 0; @@ -9563,8 +9563,8 @@ static int rtw_mp_customer_str( if ((pch == NULL) || (strlen(pch) == 0)) break; if (strlen(pch) != 2 - || IsHexDigit(*pch) == _FALSE - || IsHexDigit(*(pch + 1)) == _FALSE + || IsHexDigit(*pch) == false + || IsHexDigit(*(pch + 1)) == false || sscanf(pch, "%hhx", &tmp) != 1 ) { RTW_WARN("%s: invalid 8-bit hex!\n", __func__); @@ -9940,13 +9940,13 @@ static int rtw_priv_set(struct net_device *dev, if (padapter == NULL) return -ENETDOWN; - if (padapter->bup == _FALSE) { - RTW_INFO(" %s fail =>(padapter->bup == _FALSE )\n", __func__); + if (padapter->bup == false) { + RTW_INFO(" %s fail =>(padapter->bup == false )\n", __func__); return -ENETDOWN; } if (RTW_CANNOT_RUN(padapter)) { - RTW_INFO("%s fail =>(bSurpriseRemoved == _TRUE) || ( bDriverStopped == _TRUE)\n", __func__); + RTW_INFO("%s fail =>(bSurpriseRemoved == true) || ( bDriverStopped == true)\n", __func__); return -ENETDOWN; } @@ -10006,13 +10006,13 @@ static int rtw_priv_get(struct net_device *dev, if (padapter == NULL) return -ENETDOWN; - if (padapter->bup == _FALSE) { - RTW_INFO(" %s fail =>(padapter->bup == _FALSE )\n", __func__); + if (padapter->bup == false) { + RTW_INFO(" %s fail =>(padapter->bup == false )\n", __func__); return -ENETDOWN; } if (RTW_CANNOT_RUN(padapter)) { - RTW_INFO("%s fail =>(padapter->bSurpriseRemoved == _TRUE) || ( padapter->bDriverStopped == _TRUE)\n", __func__); + RTW_INFO("%s fail =>(padapter->bSurpriseRemoved == true) || ( padapter->bDriverStopped == true)\n", __func__); return -ENETDOWN; } @@ -10136,7 +10136,7 @@ static int rtw_tdls_enable(struct net_device *dev, 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); plist = get_next(plist); @@ -10152,7 +10152,7 @@ static int rtw_tdls_enable(struct net_device *dev, RTW_INFO("issue tear down to "MAC_FMT"\n", MAC_ARG(tdls_sta[index])); txmgmt.status_code = _RSON_TDLS_TEAR_UN_RSN_; _rtw_memcpy(txmgmt.peer, tdls_sta[index], ETH_ALEN); - issue_tdls_teardown(padapter, &txmgmt, _TRUE); + issue_tdls_teardown(padapter, &txmgmt, true); } } rtw_tdls_cmd(padapter, NULL, TDLS_RS_RCR); @@ -10196,11 +10196,11 @@ static int rtw_tdls_setup(struct net_device *dev, RTW_INFO("[%s] Current link is not AES, " "SKIP sending the tdls setup request!!\n", __func__); } else - issue_tdls_setup_req(padapter, &txmgmt, _TRUE); + issue_tdls_setup_req(padapter, &txmgmt, true); } else #endif /* CONFIG_WFD */ { - issue_tdls_setup_req(padapter, &txmgmt, _TRUE); + issue_tdls_setup_req(padapter, &txmgmt, true); } #endif /* CONFIG_TDLS */ @@ -10237,9 +10237,9 @@ static int rtw_tdls_teardown(struct net_device *dev, if (ptdls_sta != NULL) { txmgmt.status_code = _RSON_TDLS_TEAR_UN_RSN_; if (wrqu->data.length - 1 == 19) - issue_tdls_teardown(padapter, &txmgmt, _FALSE); + issue_tdls_teardown(padapter, &txmgmt, false); else - issue_tdls_teardown(padapter, &txmgmt, _TRUE); + issue_tdls_teardown(padapter, &txmgmt, true); } else RTW_INFO("TDLS peer not found\n"); #endif /* CONFIG_TDLS */ @@ -10288,7 +10288,7 @@ static int rtw_tdls_ch_switch(struct net_device *dev, RTW_INFO("[%s] %s %d\n", __func__, extra, wrqu->data.length - 1); - if (rtw_tdls_is_chsw_allowed(padapter) == _FALSE) { + if (rtw_tdls_is_chsw_allowed(padapter) == false) { RTW_INFO("TDLS channel switch is not allowed\n"); return ret; } @@ -10311,7 +10311,7 @@ static int rtw_tdls_ch_switch(struct net_device *dev, rtw_pm_set_lps(padapter, PS_MODE_ACTIVE); rtw_hal_get_hwreg(padapter, HW_VAR_CH_SW_NEED_TO_TAKE_CARE_IQK_INFO, &take_care_iqk); - if (take_care_iqk == _TRUE) { + if (take_care_iqk == true) { u8 central_chnl; u8 bw_mode; @@ -10352,7 +10352,7 @@ static int rtw_tdls_ch_switch_off(struct net_device *dev, RTW_INFO("[%s] %s %d\n", __func__, extra, wrqu->data.length - 1); - if (rtw_tdls_is_chsw_allowed(padapter) == _FALSE) { + if (rtw_tdls_is_chsw_allowed(padapter) == false) { RTW_INFO("TDLS channel switch is not allowed\n"); return ret; } @@ -10645,9 +10645,9 @@ static int rtw_tdls_dis_result(struct net_device *dev, RTW_INFO("[%s]\n", __func__); - if (ptdlsinfo->dev_discovered == _TRUE) { + if (ptdlsinfo->dev_discovered == true) { sprintf(extra, "\n\nDis=1\n"); - ptdlsinfo->dev_discovered = _FALSE; + ptdlsinfo->dev_discovered = false; } wrqu->data.length = strlen(extra); @@ -10831,7 +10831,7 @@ static int rtw_tdls(struct net_device *dev, RTW_INFO("[%s] extra = %s\n", __func__, extra); - if (hal_chk_wl_func(padapter, WL_FUNC_TDLS) == _FALSE) { + if (hal_chk_wl_func(padapter, WL_FUNC_TDLS) == false) { RTW_INFO("Discard tdls oper since hal doesn't support tdls\n"); return 0; } @@ -10993,7 +10993,7 @@ static s32 initLoopback(PADAPTER padapter) return -ENOMEM; _rtw_init_sema(&ploopback->sema, 0); - ploopback->bstop = _TRUE; + ploopback->bstop = true; ploopback->cnt = 0; ploopback->size = 300; memset(ploopback->msg, 0, sizeof(ploopback->msg)); @@ -11023,10 +11023,10 @@ static s32 initpseudoadhoc(PADAPTER padapter) networkType = Ndis802_11IBSS; err = rtw_set_802_11_infrastructure_mode(padapter, networkType); - if (err == _FALSE) + if (err == false) return _FAIL; - err = rtw_setopmode_cmd(padapter, networkType, _TRUE); + err = rtw_setopmode_cmd(padapter, networkType, true); if (err == _FAIL) return _FAIL; @@ -11049,7 +11049,7 @@ static s32 createpseudoadhoc(PADAPTER padapter) authmode = Ndis802_11AuthModeOpen; err = rtw_set_802_11_authentication_mode(padapter, authmode); - if (err == _FALSE) + if (err == false) return _FAIL; passoc_ssid = &pmlmepriv->assoc_ssid; @@ -11160,8 +11160,8 @@ static struct xmit_frame *createloopbackpkt(PADAPTER padapter, u32 size) /* 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; bmcast = IS_MCAST(pattrib->ra); if (bmcast) { @@ -11272,7 +11272,7 @@ static u8 pktcmp(PADAPTER padapter, u8 *txbuf, u32 txsz, u8 *rxbuf, u32 rxsz) u32 drvinfosize; u32 rxpktsize; u8 fcssize; - u8 ret = _FALSE; + u8 ret = false; prxstat = (struct recv_stat *)rxbuf; report.rxdw0 = le32_to_cpu(prxstat->rxdw0); @@ -11295,16 +11295,16 @@ static u8 pktcmp(PADAPTER padapter, u8 *txbuf, u32 txsz, u8 *rxbuf, u32 rxsz) if ((txsz - TXDESC_SIZE) != (rxpktsize - fcssize)) { RTW_INFO("%s: ERROR! size not match tx/rx=%d/%d !\n", __func__, txsz - TXDESC_SIZE, rxpktsize - fcssize); - ret = _FALSE; + ret = false; } else { ret = _rtw_memcmp(txbuf + TXDESC_SIZE, \ rxbuf + RXDESC_SIZE + drvinfosize, \ txsz - TXDESC_SIZE); - if (ret == _FALSE) + if (ret == false) RTW_INFO("%s: ERROR! pkt content mismatch!\n", __func__); } - if (ret == _FALSE) { + if (ret == false) { RTW_INFO("\n%s: TX PKT total=%d, desc=%d, content=%d\n", __func__, txsz, TXDESC_SIZE, txsz - TXDESC_SIZE); RTW_INFO("%s: TX DESC size=%d\n", __func__, TXDESC_SIZE); @@ -11377,7 +11377,7 @@ thread_return lbk_thread(thread_context context) _rtw_down_sema(&ploopback->sema); err = pktcmp(padapter, ploopback->txbuf, ploopback->txsize, ploopback->rxbuf, ploopback->rxsize); - if (err == _TRUE) + if (err == true) ok++; else fail++; @@ -11393,7 +11393,7 @@ thread_return lbk_thread(thread_context context) if (signal_pending(current)) flush_signals(current); - if ((ploopback->bstop == _TRUE) || + if ((ploopback->bstop == true) || ((ploopback->cnt != 0) && (ploopback->cnt == cnt))) { u32 ok_rate, fail_rate, all; all = cnt; @@ -11406,7 +11406,7 @@ thread_return lbk_thread(thread_context context) } } while (1); - ploopback->bstop = _TRUE; + ploopback->bstop = true; thread_exit(); } @@ -11421,8 +11421,8 @@ static void loopbackTest(PADAPTER padapter, u32 cnt, u32 size, u8 *pmsg) ploopback = padapter->ploopback; if (ploopback) { - if (ploopback->bstop == _FALSE) { - ploopback->bstop = _TRUE; + if (ploopback->bstop == false) { + ploopback->bstop = true; _rtw_up_sema(&ploopback->sema); } len = 0; @@ -11463,7 +11463,7 @@ static void loopbackTest(PADAPTER padapter, u32 cnt, u32 size, u8 *pmsg) ploopback = padapter->ploopback; - ploopback->bstop = _FALSE; + ploopback->bstop = false; ploopback->cnt = cnt; ploopback->size = size; ploopback->lbkthread = kthread_run(lbk_thread, padapter, "RTW_LBK_THREAD"); @@ -11548,10 +11548,10 @@ static int rtw_test( #ifdef CONFIG_BT_COEXIST if (strcmp(pch, "bton") == 0) { - rtw_btcoex_SetManualControl(padapter, _FALSE); + rtw_btcoex_SetManualControl(padapter, false); goto free_buf; } else if (strcmp(pch, "btoff") == 0) { - rtw_btcoex_SetManualControl(padapter, _TRUE); + rtw_btcoex_SetManualControl(padapter, true); goto free_buf; } #endif @@ -11908,7 +11908,7 @@ static struct iw_statistics *rtw_get_wireless_stats(struct net_device *dev) int tmp_qual = 0; int tmp_noise = 0; - if (check_fwstate(&padapter->mlmepriv, _FW_LINKED) != _TRUE) { + if (check_fwstate(&padapter->mlmepriv, _FW_LINKED) != true) { piwstats->qual.qual = 0; piwstats->qual.level = 0; piwstats->qual.noise = 0; diff --git a/os_dep/ioctl_mp.c b/os_dep/ioctl_mp.c index b54aa64..d5f7ae0 100644 --- a/os_dep/ioctl_mp.c +++ b/os_dep/ioctl_mp.c @@ -372,7 +372,7 @@ int rtw_mp_start(struct net_device *dev, LeaveAllPowerSaveMode(padapter); if (rtw_mi_check_fwstate(padapter, _FW_UNDER_SURVEY)) - rtw_mi_scan_abort(padapter, _FALSE); + rtw_mi_scan_abort(padapter, false); if (rtw_mp_cmd(padapter, MP_START, RTW_CMDF_WAIT_ACK) != _SUCCESS) ret = -EPERM; @@ -734,7 +734,7 @@ int rtw_mp_ctx(struct net_device *dev, return 0; } #endif - countPkTx = strncmp(extra, "count=", 5); /* strncmp TRUE is 0*/ + countPkTx = strncmp(extra, "count=", 5); /* strncmp true is 0*/ cotuTx = strncmp(extra, "background", 20); CarrSprTx = strncmp(extra, "background,cs", 20); scTx = strncmp(extra, "background,sc", 20); @@ -830,7 +830,7 @@ int rtw_mp_disable_bt_coexist(struct net_device *dev, RTW_INFO("Set OID_RT_SET_DISABLE_BT_COEXIST: disable BT_COEXIST\n"); #ifdef CONFIG_BT_COEXIST rtw_btcoex_HaltNotify(padapter); - rtw_btcoex_SetManualControl(padapter, _TRUE); + rtw_btcoex_SetManualControl(padapter, true); /* Force to switch Antenna to WiFi*/ rtw_write16(padapter, 0x870, 0x300); rtw_write16(padapter, 0x860, 0x110); @@ -838,7 +838,7 @@ int rtw_mp_disable_bt_coexist(struct net_device *dev, /* CONFIG_BT_COEXIST */ } else { #ifdef CONFIG_BT_COEXIST - rtw_btcoex_SetManualControl(padapter, _FALSE); + rtw_btcoex_SetManualControl(padapter, false); #endif } @@ -872,16 +872,16 @@ int rtw_mp_arx(struct net_device *dev, return 0; } #endif - bStartRx = (strncmp(input, "start", 5) == 0) ? 1 : 0; /* strncmp TRUE is 0*/ - bStopRx = (strncmp(input, "stop", 5) == 0) ? 1 : 0; /* strncmp TRUE is 0*/ - bQueryPhy = (strncmp(input, "phy", 3) == 0) ? 1 : 0; /* strncmp TRUE is 0*/ - bQueryMac = (strncmp(input, "mac", 3) == 0) ? 1 : 0; /* strncmp TRUE is 0*/ - bSetBssid = (strncmp(input, "setbssid=", 8) == 0) ? 1 : 0; /* strncmp TRUE is 0*/ + bStartRx = (strncmp(input, "start", 5) == 0) ? 1 : 0; /* strncmp true is 0*/ + bStopRx = (strncmp(input, "stop", 5) == 0) ? 1 : 0; /* strncmp true is 0*/ + bQueryPhy = (strncmp(input, "phy", 3) == 0) ? 1 : 0; /* strncmp true is 0*/ + bQueryMac = (strncmp(input, "mac", 3) == 0) ? 1 : 0; /* strncmp true is 0*/ + bSetBssid = (strncmp(input, "setbssid=", 8) == 0) ? 1 : 0; /* strncmp true is 0*/ /*bfilter_init = (strncmp(input, "filter_init",11)==0)?1:0;*/ bmac_filter = (strncmp(input, "accept_mac", 10) == 0) ? 1 : 0; bmon = (strncmp(input, "mon=", 4) == 0) ? 1 : 0; bSmpCfg = (strncmp(input , "smpcfg=" , 7) == 0) ? 1 : 0; - pmppriv->bloopback = (strncmp(input, "loopbk", 6) == 0) ? 1 : 0; /* strncmp TRUE is 0*/ + pmppriv->bloopback = (strncmp(input, "loopbk", 6) == 0) ? 1 : 0; /* strncmp true is 0*/ if (bSetBssid == 1) { pch = input; @@ -904,7 +904,7 @@ int rtw_mp_arx(struct net_device *dev, } else return -EFAULT; - pmppriv->bSetRxBssid = _TRUE; + pmppriv->bSetRxBssid = true; } if (bmac_filter) { @@ -933,11 +933,11 @@ int rtw_mp_arx(struct net_device *dev, if (bStartRx) { sprintf(extra, "start"); - SetPacketRx(padapter, bStartRx, _FALSE); + SetPacketRx(padapter, bStartRx, false); } else if (bStopRx) { - SetPacketRx(padapter, bStartRx, _FALSE); - pmppriv->bmac_filter = _FALSE; - pmppriv->bSetRxBssid = _FALSE; + SetPacketRx(padapter, bStartRx, false); + pmppriv->bmac_filter = false; + pmppriv->bSetRxBssid = false; sprintf(extra, "Received packet OK:%d CRC error:%d ,Filter out:%d", padapter->mppriv.rx_pktcount, padapter->mppriv.rx_crcerrpktcount, padapter->mppriv.rx_pktcount_filter_out); } else if (bQueryPhy) { memset(&rx_counter, 0, sizeof(struct dbg_rx_counter)); @@ -960,10 +960,10 @@ int rtw_mp_arx(struct net_device *dev, ret = sscanf(input, "mon=%d", &bmon); if (bmon == 1) { - pmppriv->rx_bindicatePkt = _TRUE; + pmppriv->rx_bindicatePkt = true; sprintf(extra, "Indicating Receive Packet to network start\n"); } else { - pmppriv->rx_bindicatePkt = _FALSE; + pmppriv->rx_bindicatePkt = false; sprintf(extra, "Indicating Receive Packet to network Stop\n"); } } @@ -971,17 +971,17 @@ int rtw_mp_arx(struct net_device *dev, ret = sscanf(input, "smpcfg=%d", &bSmpCfg); if (bSmpCfg == 1) { - pmppriv->bRTWSmbCfg = _TRUE; + pmppriv->bRTWSmbCfg = true; sprintf(extra , "Indicate By Simple Config Format\n"); - SetPacketRx(padapter, _TRUE, _TRUE); + SetPacketRx(padapter, true, true); } else { - pmppriv->bRTWSmbCfg = _FALSE; + pmppriv->bRTWSmbCfg = false; sprintf(extra , "Indicate By Normal Format\n"); - SetPacketRx(padapter, _TRUE, _FALSE); + SetPacketRx(padapter, true, false); } } - if (pmppriv->bloopback == _TRUE) { + if (pmppriv->bloopback == true) { sprintf(extra , "Enter MAC LoopBack mode\n"); _rtw_write32(padapter, 0x100, 0xB0106FF); RTW_INFO("0x100 :0x%x" , _rtw_read32(padapter, 0x100)); @@ -1004,7 +1004,7 @@ int rtw_mp_trx_query(struct net_device *dev, PMPT_CONTEXT pMptCtx = &(padapter->mppriv.mpt_ctx); RT_PMAC_TX_INFO PMacTxInfo = pMptCtx->PMacTxInfo; - if (PMacTxInfo.bEnPMacTx == TRUE) + if (PMacTxInfo.bEnPMacTx == true) txok = hal_mpt_query_phytxok(padapter); else txok = padapter->mppriv.tx.sended; @@ -1102,13 +1102,13 @@ int rtw_mp_thermal(struct net_device *dev, if (copy_from_user(extra, wrqu->pointer, wrqu->length)) return -EFAULT; - bwrite = strncmp(extra, "write", 6);/* strncmp TRUE is 0*/ + bwrite = strncmp(extra, "write", 6);/* strncmp true is 0*/ GetThermalMeter(padapter, &val); if (bwrite == 0) { /*RTW_INFO("to write val:%d",val);*/ - EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, _FALSE); + EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false); if (2 > max_available_size) { RTW_INFO("no available efuse!\n"); return -EFAULT; @@ -1227,19 +1227,19 @@ int rtw_mp_SetRFPath(struct net_device *dev, if (copy_from_user(input, wrqu->pointer, wrqu->length)) return -EFAULT; - bMain = strncmp(input, "1", 2); /* strncmp TRUE is 0*/ - bTurnoff = strncmp(input, "0", 3); /* strncmp TRUE is 0*/ + bMain = strncmp(input, "1", 2); /* strncmp true is 0*/ + bTurnoff = strncmp(input, "0", 3); /* strncmp true is 0*/ memset(extra, 0, wrqu->length); if (bMain == 0) { - MP_PHY_SetRFPathSwitch(padapter, _TRUE); - RTW_INFO("%s:PHY_SetRFPathSwitch=TRUE\n", __func__); + MP_PHY_SetRFPathSwitch(padapter, true); + RTW_INFO("%s:PHY_SetRFPathSwitch=true\n", __func__); sprintf(extra, "mp_setrfpath Main\n"); } else if (bTurnoff == 0) { - MP_PHY_SetRFPathSwitch(padapter, _FALSE); - RTW_INFO("%s:PHY_SetRFPathSwitch=FALSE\n", __func__); + MP_PHY_SetRFPathSwitch(padapter, false); + RTW_INFO("%s:PHY_SetRFPathSwitch=false\n", __func__); sprintf(extra, "mp_setrfpath Aux\n"); } else { bMain = MP_PHY_QueryRFPathSwitch(padapter); @@ -1268,7 +1268,7 @@ int rtw_mp_QueryDrv(struct net_device *dev, return -EFAULT; RTW_INFO("%s:iwpriv in=%s\n", __func__, input); - qAutoLoad = strncmp(input, "autoload", 8); /* strncmp TRUE is 0*/ + qAutoLoad = strncmp(input, "autoload", 8); /* strncmp true is 0*/ if (qAutoLoad == 0) { RTW_INFO("%s:qAutoLoad\n", __func__); @@ -1296,7 +1296,7 @@ int rtw_mp_PwrCtlDM(struct net_device *dev, if (copy_from_user(input, wrqu->pointer, wrqu->length)) return -EFAULT; - bstart = strncmp(input, "start", 5); /* strncmp TRUE is 0*/ + bstart = strncmp(input, "start", 5); /* strncmp true is 0*/ if (bstart == 0) { sprintf(extra, "PwrCtlDM start\n"); MPT_PwrCtlDM(padapter, 1); @@ -1372,27 +1372,27 @@ int rtw_mp_mon(struct net_device *dev, RTW_INFO("%s: initialize MP private data Fail!\n", __func__); padapter->mppriv.channel = 6; - bstart = strncmp(extra, "start", 5); /* strncmp TRUE is 0*/ - bstop = strncmp(extra, "stop", 4); /* strncmp TRUE is 0*/ + bstart = strncmp(extra, "start", 5); /* strncmp true is 0*/ + bstop = strncmp(extra, "stop", 4); /* strncmp true is 0*/ if (bstart == 0) { mp_join(padapter, WIFI_FW_ADHOC_STATE); - SetPacketRx(padapter, _TRUE, _FALSE); + SetPacketRx(padapter, true, false); SetChannel(padapter); - pmp_priv->rx_bindicatePkt = _TRUE; - pmp_priv->bRTWSmbCfg = _TRUE; + pmp_priv->rx_bindicatePkt = true; + pmp_priv->bRTWSmbCfg = true; sprintf(extra, "monitor mode start\n"); } else if (bstop == 0) { - SetPacketRx(padapter, _FALSE, _FALSE); - pmp_priv->rx_bindicatePkt = _FALSE; - pmp_priv->bRTWSmbCfg = _FALSE; + SetPacketRx(padapter, false, false); + pmp_priv->rx_bindicatePkt = false; + pmp_priv->bRTWSmbCfg = false; padapter->registrypriv.mp_mode = 1; pHalFunc->hal_deinit(padapter); padapter->registrypriv.mp_mode = 0; pHalFunc->hal_init(padapter); - /*rtw_disassoc_cmd(padapter, 0, _TRUE);*/ - if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { - rtw_disassoc_cmd(padapter, 500, _TRUE); - rtw_indicate_disconnect(padapter, 0, _FALSE); + /*rtw_disassoc_cmd(padapter, 0, true);*/ + if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { + rtw_disassoc_cmd(padapter, 500, true); + rtw_indicate_disconnect(padapter, 0, false); /*rtw_free_assoc_resources(padapter, 1);*/ } rtw_pm_set_ips(padapter, IPS_NORMAL); @@ -1523,17 +1523,17 @@ int rtw_mp_tx(struct net_device *dev, if (strncmp(extra, "pmact=", 6) == 0) { memset(&pMptCtx->PMacTxInfo, 0, sizeof(pMptCtx->PMacTxInfo)); if (strncmp(extra, "pmact=start", 11) == 0) { - pMptCtx->PMacTxInfo.bEnPMacTx = _TRUE; + pMptCtx->PMacTxInfo.bEnPMacTx = true; sprintf(extra, "Set PMac Tx Mode start\n"); } else { - pMptCtx->PMacTxInfo.bEnPMacTx = _FALSE; + pMptCtx->PMacTxInfo.bEnPMacTx = false; sprintf(extra, "Set PMac Tx Mode Stop\n"); } - if (pMptCtx->bldpc == TRUE) - pMptCtx->PMacTxInfo.bLDPC = _TRUE; + if (pMptCtx->bldpc == true) + pMptCtx->PMacTxInfo.bLDPC = true; - if (pMptCtx->bstbc == TRUE) - pMptCtx->PMacTxInfo.bSTBC = _TRUE; + if (pMptCtx->bstbc == true) + pMptCtx->PMacTxInfo.bSTBC = true; pMptCtx->PMacTxInfo.bSPreamble = pmp_priv->preamble; pMptCtx->PMacTxInfo.bSGI = pmp_priv->preamble; @@ -1542,7 +1542,7 @@ int rtw_mp_tx(struct net_device *dev, pMptCtx->PMacTxInfo.Mode = pMptCtx->HWTxmode; - pMptCtx->PMacTxInfo.NDP_sound = FALSE;/*(Adapter.PacketType == NDP_PKT)?TRUE:FALSE;*/ + pMptCtx->PMacTxInfo.NDP_sound = false;/*(Adapter.PacketType == NDP_PKT)?true:false;*/ if (padapter->mppriv.pktInterval == 0) pMptCtx->PMacTxInfo.PacketPeriod = 100; @@ -1814,8 +1814,8 @@ int rtw_mp_rx(struct net_device *dev, if (strncmp(extra, "stop", 4) == 0) { memset(extra, 0, wrqu->data.length); - SetPacketRx(padapter, bStartRx, _FALSE); - pmp_priv->bmac_filter = _FALSE; + SetPacketRx(padapter, bStartRx, false); + pmp_priv->bmac_filter = false; sprintf(extra, "Received packet OK:%d CRC error:%d ,Filter out:%d", padapter->mppriv.rx_pktcount, padapter->mppriv.rx_crcerrpktcount, padapter->mppriv.rx_pktcount_filter_out); wrqu->data.length = strlen(extra); return 0; @@ -1902,7 +1902,7 @@ int rtw_mp_rx(struct net_device *dev, SetAntenna(padapter); sprintf(extra, "%s\nstart Rx", extra); - SetPacketRx(padapter, bStartRx, _FALSE); + SetPacketRx(padapter, bStartRx, false); } wrqu->data.length = strlen(extra); return 0; @@ -1966,8 +1966,8 @@ int rtw_efuse_mask_file(struct net_device *dev, if ((pch == NULL) || (strlen(pch) == 0)) break; if (strlen(pch) != 2 - || IsHexDigit(*pch) == _FALSE - || IsHexDigit(*(pch + 1)) == _FALSE + || IsHexDigit(*pch) == false + || IsHexDigit(*(pch + 1)) == false || sscanf(pch, "%hhx", &tmp) != 1 ) { RTW_INFO("%s: invalid 8-bit hex! input format: data,01:23:45:67:89:ab:cd:ef...\n", __func__); @@ -1980,7 +1980,7 @@ int rtw_efuse_mask_file(struct net_device *dev, for (i = 0; i < count; i++) sprintf(extra, "%s:%02x", extra, maskfileBuffer[i]); - padapter->registrypriv.bFileMaskEfuse = _TRUE; + padapter->registrypriv.bFileMaskEfuse = true; sprintf(extra, "%s\nLoad Efuse Mask data %d hex ok\n", extra, count); wrqu->data.length = strlen(extra); @@ -1988,14 +1988,14 @@ int rtw_efuse_mask_file(struct net_device *dev, } rtw_efuse_mask_file_path = extra; - if (rtw_is_file_readable(rtw_efuse_mask_file_path) == _TRUE) { + if (rtw_is_file_readable(rtw_efuse_mask_file_path) == true) { RTW_INFO("%s do rtw_efuse_mask_file_read = %s! ,sizeof maskfileBuffer %zu\n", __func__, rtw_efuse_mask_file_path, sizeof(maskfileBuffer)); Status = rtw_efuse_file_read(padapter, rtw_efuse_mask_file_path, maskfileBuffer, sizeof(maskfileBuffer)); - if (Status == _TRUE) - padapter->registrypriv.bFileMaskEfuse = _TRUE; + if (Status == true) + padapter->registrypriv.bFileMaskEfuse = true; sprintf(extra, "efuse mask file read OK\n"); } else { - padapter->registrypriv.bFileMaskEfuse = _FALSE; + padapter->registrypriv.bFileMaskEfuse = false; sprintf(extra, "efuse mask file readable FAIL\n"); RTW_INFO("%s rtw_is_file_readable fail!\n", __func__); } @@ -2023,14 +2023,14 @@ int rtw_efuse_file_map(struct net_device *dev, memset(pEfuseHal->fakeEfuseModifiedMap, 0xFF, EFUSE_MAX_MAP_LEN); - if (rtw_is_file_readable(rtw_efuse_file_map_path) == _TRUE) { + if (rtw_is_file_readable(rtw_efuse_file_map_path) == true) { RTW_INFO("%s do rtw_efuse_mask_file_read = %s!\n", __func__, rtw_efuse_file_map_path); Status = rtw_efuse_file_read(padapter, rtw_efuse_file_map_path, pEfuseHal->fakeEfuseModifiedMap, sizeof(pEfuseHal->fakeEfuseModifiedMap)); - if (Status == _TRUE) { - pmp_priv->bloadefusemap = _TRUE; + if (Status == true) { + pmp_priv->bloadefusemap = true; sprintf(extra, "efuse file file_read OK\n"); } else { - pmp_priv->bloadefusemap = _FALSE; + pmp_priv->bloadefusemap = false; sprintf(extra, "efuse file file_read FAIL\n"); } } else { diff --git a/os_dep/mlme_linux.c b/os_dep/mlme_linux.c index 020fca0..69e4324 100644 --- a/os_dep/mlme_linux.c +++ b/os_dep/mlme_linux.c @@ -192,8 +192,8 @@ void rtw_os_indicate_connect(_adapter *adapter) struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); #ifdef CONFIG_IOCTL_CFG80211 - 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)) rtw_cfg80211_ibss_indicate_connect(adapter); else rtw_cfg80211_indicate_connect(adapter); diff --git a/os_dep/os_intfs.c b/os_dep/os_intfs.c index 19700c4..38f9963 100644 --- a/os_dep/os_intfs.c +++ b/os_dep/os_intfs.c @@ -160,9 +160,9 @@ static int rtw_low_power = 0; #endif #ifdef CONFIG_DEFAULT_PATTERNS_EN - static bool rtw_support_default_patterns = _TRUE; + static bool rtw_support_default_patterns = true; #else - static bool rtw_support_default_patterns = _FALSE; + static bool rtw_support_default_patterns = false; #endif static int rtw_special_rf_path = 0; /* 0: 2T2R ,1: only turn on path A 1T1R */ @@ -203,7 +203,7 @@ static int rtw_bt_sco = 3;/* 0:Idle, 1:None-SCO, 2:SCO, 3:From Counter, 4.Busy, static int rtw_bt_ampdu = 1 ; /* 0:Disable BT control A-MPDU, 1:Enable BT control A-MPDU. */ #endif /* CONFIG_BT_COEXIST */ -static int rtw_AcceptAddbaReq = _TRUE;/* 0:Reject AP's Add BA req, 1:Accept AP's Add BA req. */ +static int rtw_AcceptAddbaReq = true;/* 0:Reject AP's Add BA req, 1:Accept AP's Add BA req. */ static int rtw_antdiv_cfg = 2; /* 0:OFF , 1:ON, 2:decide by Efuse config */ static int rtw_antdiv_type = 0 @@ -750,8 +750,8 @@ uint loadparam(_adapter *padapter) registry_par->wifi_spec = (u8)rtw_wifi_spec; if (strlen(rtw_country_code) != 2 - || is_alpha(rtw_country_code[0]) == _FALSE - || is_alpha(rtw_country_code[1]) == _FALSE + || is_alpha(rtw_country_code[0]) == false + || is_alpha(rtw_country_code[1]) == false ) { if (rtw_country_code != rtw_country_unspecified) RTW_ERR("%s discard rtw_country_code not in alpha2\n", __func__); @@ -937,7 +937,7 @@ static int rtw_net_set_mac_address(struct net_device *pnetdev, void *addr) int ret = -1; /* only the net_device is in down state to permit modifying mac addr */ - if ((pnetdev->flags & IFF_UP) == _TRUE) { + if ((pnetdev->flags & IFF_UP) == true) { RTW_INFO(FUNC_ADPT_FMT": The net_device's is not in down state\n" , FUNC_ADPT_ARG(padapter)); @@ -955,7 +955,7 @@ static int rtw_net_set_mac_address(struct net_device *pnetdev, void *addr) } /* check whether the input mac address is valid to permit modifying mac addr */ - if (rtw_check_invalid_mac_address(sa->sa_data, _FALSE) == _TRUE) { + if (rtw_check_invalid_mac_address(sa->sa_data, false) == true) { RTW_INFO(FUNC_ADPT_FMT": Invalid Mac Addr for "MAC_FMT"\n" , FUNC_ADPT_ARG(padapter), MAC_ARG(sa->sa_data)); @@ -1659,7 +1659,7 @@ u8 rtw_init_default_value(_adapter *padapter) RTW_ENABLE_FUNC(padapter, DF_RX_BIT); RTW_ENABLE_FUNC(padapter, DF_TX_BIT); padapter->bLinkInfoDump = 0; - padapter->bNotifyChannelChange = _FALSE; + padapter->bNotifyChannelChange = false; #ifdef CONFIG_P2P padapter->bShowGetP2PState = 1; #endif @@ -1738,7 +1738,7 @@ struct dvobj_priv *devobj_init(void) memset(pdvobj->customer_str, 0xFF, RTW_CUSTOMER_STR_LEN); #endif - pdvobj->processing_dev_remove = _FALSE; + pdvobj->processing_dev_remove = false; ATOMIC_SET(&pdvobj->disable_func, 0); @@ -1874,9 +1874,9 @@ u8 rtw_reset_drv_sw(_adapter *padapter) padapter->xmitpriv.tx_pkts = 0; padapter->recvpriv.rx_pkts = 0; - pmlmepriv->LinkDetectInfo.bBusyTraffic = _FALSE; + pmlmepriv->LinkDetectInfo.bBusyTraffic = false; - /* pmlmepriv->LinkDetectInfo.TrafficBusyState = _FALSE; */ + /* pmlmepriv->LinkDetectInfo.TrafficBusyState = false; */ pmlmepriv->LinkDetectInfo.TrafficTransitionCount = 0; pmlmepriv->LinkDetectInfo.LowPowerTransitionCount = 0; @@ -2205,11 +2205,11 @@ int _netdev_vir_if_open(struct net_device *pnetdev) goto _netdev_virtual_iface_open_error; #ifdef CONFIG_PLATFORM_INTEL_BYT - if (padapter->bup == _FALSE) { + if (padapter->bup == false) { u8 mac[ETH_ALEN]; /* get mac address from primary_padapter */ - if (primary_padapter->bup == _FALSE) + if (primary_padapter->bup == false) rtw_macaddr_cfg(adapter_mac_addr(primary_padapter), get_hal_mac_addr(primary_padapter)); _rtw_memcpy(mac, adapter_mac_addr(primary_padapter), ETH_ALEN); @@ -2230,15 +2230,15 @@ int _netdev_vir_if_open(struct net_device *pnetdev) } #endif /*CONFIG_PLATFORM_INTEL_BYT*/ - if (primary_padapter->bup == _FALSE || !rtw_is_hw_init_completed(primary_padapter)) + if (primary_padapter->bup == false || !rtw_is_hw_init_completed(primary_padapter)) _netdev_open(primary_padapter->pnetdev); - if (padapter->bup == _FALSE && primary_padapter->bup == _TRUE && + if (padapter->bup == false && primary_padapter->bup == true && rtw_is_hw_init_completed(primary_padapter)) { padapter->bFWReady = primary_padapter->bFWReady; } - if (padapter->bup == _FALSE) { + if (padapter->bup == false) { if (rtw_start_drv_threads(padapter) == _FAIL) goto _netdev_virtual_iface_open_error; } @@ -2255,9 +2255,9 @@ int _netdev_vir_if_open(struct net_device *pnetdev) rtw_cfg80211_init_wdev_data(padapter); #endif - padapter->bup = _TRUE; + padapter->bup = true; - padapter->net_closed = _FALSE; + padapter->net_closed = false; rtw_netif_wake_queue(pnetdev); @@ -2267,7 +2267,7 @@ int _netdev_vir_if_open(struct net_device *pnetdev) _netdev_virtual_iface_open_error: - padapter->bup = _FALSE; + padapter->bup = false; #ifdef CONFIG_RTW_NAPI if(padapter->napi_state == NAPI_ENABLE) { @@ -2306,8 +2306,8 @@ static int netdev_vir_if_close(struct net_device *pnetdev) struct mlme_priv *pmlmepriv = &padapter->mlmepriv; RTW_INFO(FUNC_NDEV_FMT" , bup=%d\n", FUNC_NDEV_ARG(pnetdev), padapter->bup); - padapter->net_closed = _TRUE; - pmlmepriv->LinkDetectInfo.bBusyTraffic = _FALSE; + padapter->net_closed = true; + pmlmepriv->LinkDetectInfo.bBusyTraffic = false; if (pnetdev) rtw_netif_stop_queue(pnetdev); @@ -2320,7 +2320,7 @@ static int netdev_vir_if_close(struct net_device *pnetdev) #ifdef CONFIG_IOCTL_CFG80211 rtw_scan_abort(padapter); rtw_cfg80211_wait_scan_req_empty(padapter, 200); - adapter_wdev_data(padapter)->bandroid_scan = _FALSE; + adapter_wdev_data(padapter)->bandroid_scan = false; #endif return 0; @@ -2373,13 +2373,13 @@ _adapter *rtw_drv_add_vir_if(_adapter *primary_padapter, _rtw_memcpy(padapter, primary_padapter, sizeof(_adapter)); /* */ - padapter->bup = _FALSE; - padapter->net_closed = _TRUE; + padapter->bup = false; + padapter->net_closed = true; padapter->dir_dev = NULL; padapter->dir_odm = NULL; /*set adapter_type/iface type*/ - padapter->isprimary = _FALSE; + padapter->isprimary = false; padapter->adapter_type = VIRTUAL_ADAPTER; #ifdef CONFIG_MI_WITH_MBSSID_CAM @@ -2452,10 +2452,10 @@ void rtw_drv_stop_vir_if(_adapter *padapter) pnetdev = padapter->pnetdev; if (check_fwstate(pmlmepriv, _FW_LINKED)) - rtw_disassoc_cmd(padapter, 0, _FALSE); + rtw_disassoc_cmd(padapter, 0, false); #ifdef CONFIG_AP_MODE - if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == _TRUE) { + if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true) { free_mlme_ap_info(padapter); #ifdef CONFIG_HOSTAPD_MLME hostapd_mode_unload(padapter); @@ -2463,7 +2463,7 @@ void rtw_drv_stop_vir_if(_adapter *padapter) } #endif - if (padapter->bup == _TRUE) { + if (padapter->bup == true) { #ifdef CONFIG_XMIT_ACK if (padapter->xmitpriv.ack_tx) rtw_ack_tx_done(&padapter->xmitpriv, RTW_SCTX_DONE_DRV_STOP); @@ -2473,7 +2473,7 @@ void rtw_drv_stop_vir_if(_adapter *padapter) rtw_stop_drv_threads(padapter); - padapter->bup = _FALSE; + padapter->bup = false; } /* cancel timer after thread stop */ rtw_cancel_all_timer(padapter); @@ -2655,7 +2655,7 @@ void netdev_br_init(struct net_device *netdev) rcu_read_lock(); #endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35)) */ - /* if(check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == _TRUE) */ + /* if(check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true) */ { /* struct net_bridge *br = netdev->br_port->br; */ /* ->dev->dev_addr; */ #if (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) @@ -2707,18 +2707,18 @@ int _netdev_open(struct net_device *pnetdev) RTW_INFO(FUNC_NDEV_FMT" , bup=%d\n", FUNC_NDEV_ARG(pnetdev), padapter->bup); - padapter->netif_up = _TRUE; + padapter->netif_up = true; #ifdef CONFIG_PLATFORM_INTEL_BYT rtw_sdio_set_power(1); #endif /* CONFIG_PLATFORM_INTEL_BYT */ - if (pwrctrlpriv->ps_flag == _TRUE) { - padapter->net_closed = _FALSE; + if (pwrctrlpriv->ps_flag == true) { + padapter->net_closed = false; goto netdev_open_normal_process; } - if (padapter->bup == _FALSE) { + if (padapter->bup == false) { #ifdef CONFIG_PLATFORM_INTEL_BYT rtw_macaddr_cfg(adapter_mac_addr(padapter), get_hal_mac_addr(padapter)); #ifdef CONFIG_MI_WITH_MBSSID_CAM @@ -2762,8 +2762,8 @@ int _netdev_open(struct net_device *pnetdev) rtw_led_control(padapter, LED_CTL_NO_LINK); - padapter->bup = _TRUE; - pwrctrlpriv->bips_processing = _FALSE; + padapter->bup = true; + pwrctrlpriv->bips_processing = false; #ifdef CONFIG_PLATFORM_INTEL_BYT #ifdef CONFIG_BT_COEXIST @@ -2771,7 +2771,7 @@ int _netdev_open(struct net_device *pnetdev) #endif /* CONFIG_BT_COEXIST */ #endif /* CONFIG_PLATFORM_INTEL_BYT */ } - padapter->net_closed = _FALSE; + padapter->net_closed = false; _set_timer(&adapter_to_dvobj(padapter)->dynamic_chk_timer, 2000); @@ -2787,7 +2787,7 @@ int _netdev_open(struct net_device *pnetdev) #endif /* CONFIG_BR_EXT */ #ifdef CONFIG_BT_COEXIST_SOCKET_TRX - if (is_primary_adapter(padapter) && (_TRUE == pHalData->EEPROMBluetoothCoexist)) { + if (is_primary_adapter(padapter) && (true == pHalData->EEPROMBluetoothCoexist)) { rtw_btcoex_init_socket(padapter); padapter->coex_info.BtMgnt.ExtConfig.HCIExtensionVer = 0x04; rtw_btcoex_SetHciVersion(padapter, 0x04); @@ -2803,7 +2803,7 @@ netdev_open_normal_process: _adapter *sec_adapter = adapter_to_dvobj(padapter)->padapters[IFACE_ID1]; #ifndef CONFIG_RTW_DYNAMIC_NDEV - if (sec_adapter && (sec_adapter->bup == _FALSE)) + if (sec_adapter && (sec_adapter->bup == false)) _netdev_vir_if_open(sec_adapter->pnetdev); #endif } @@ -2815,7 +2815,7 @@ netdev_open_normal_process: netdev_open_error: - padapter->bup = _FALSE; + padapter->bup = false; #ifdef CONFIG_RTW_NAPI if(padapter->napi_state == NAPI_ENABLE) { @@ -2835,11 +2835,11 @@ netdev_open_error: int netdev_open(struct net_device *pnetdev) { - int ret = _FALSE; + int ret = false; _adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev); struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(padapter); - if (pwrctrlpriv->bInSuspend == _TRUE) { + if (pwrctrlpriv->bInSuspend == true) { RTW_INFO(" [WARN] "ADPT_FMT" %s failed, bInSuspend=%d\n", ADPT_ARG(padapter), __func__, pwrctrlpriv->bInSuspend); return 0; } @@ -2868,13 +2868,13 @@ static int ips_netdrv_open(_adapter *padapter) int status = _SUCCESS; /* struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); */ - padapter->net_closed = _FALSE; + padapter->net_closed = false; RTW_INFO("===> %s.........\n", __func__); rtw_clr_drv_stopped(padapter); - /* padapter->bup = _TRUE; */ + /* padapter->bup = true; */ status = rtw_hal_init(padapter); if (status == _FAIL) { @@ -2890,7 +2890,7 @@ static int ips_netdrv_open(_adapter *padapter) return _SUCCESS; netdev_open_error: - /* padapter->bup = _FALSE; */ + /* padapter->bup = false; */ RTW_INFO("-ips_netdrv_open - drv_open failure, bup=%d\n", padapter->bup); return _FAIL; @@ -2909,7 +2909,7 @@ int rtw_ips_pwr_up(_adapter *padapter) #if defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_FWLPS_IN_IPS) #ifdef DBG_CONFIG_ERROR_DETECT - if (psrtpriv->silent_reset_inprogress == _TRUE) + if (psrtpriv->silent_reset_inprogress == true) #endif/* #ifdef DBG_CONFIG_ERROR_DETECT */ #endif /* defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_FWLPS_IN_IPS) */ rtw_reset_drv_sw(padapter); @@ -2928,7 +2928,7 @@ void rtw_ips_pwr_down(_adapter *padapter) u32 start_time = rtw_get_current_time(); RTW_INFO("===> rtw_ips_pwr_down...................\n"); - padapter->net_closed = _TRUE; + padapter->net_closed = true; rtw_ips_dev_unload(padapter); RTW_INFO("<=== rtw_ips_pwr_down..................... in %dms\n", rtw_get_passing_time_ms(start_time)); @@ -2947,7 +2947,7 @@ void rtw_ips_dev_unload(_adapter *padapter) #if defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_FWLPS_IN_IPS) #ifdef DBG_CONFIG_ERROR_DETECT - if (psrtpriv->silent_reset_inprogress == _TRUE) + if (psrtpriv->silent_reset_inprogress == true) #endif /* #ifdef DBG_CONFIG_ERROR_DETECT */ #endif /* defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_FWLPS_IN_IPS) */ { @@ -2964,7 +2964,7 @@ int pm_netdev_open(struct net_device *pnetdev, u8 bnormal) _adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev); - if (_TRUE == bnormal) { + if (true == bnormal) { _enter_critical_mutex(&(adapter_to_dvobj(padapter)->hw_init_mutex), NULL); status = _netdev_open(pnetdev); _exit_critical_mutex(&(adapter_to_dvobj(padapter)->hw_init_mutex), NULL); @@ -2988,17 +2988,17 @@ static int netdev_close(struct net_device *pnetdev) RTW_INFO(FUNC_NDEV_FMT" , bup=%d\n", FUNC_NDEV_ARG(pnetdev), padapter->bup); #ifndef CONFIG_PLATFORM_INTEL_BYT - if (pwrctl->bInternalAutoSuspend == _TRUE) { + if (pwrctl->bInternalAutoSuspend == true) { /* rtw_pwr_wakeup(padapter); */ if (pwrctl->rf_pwrstate == rf_off) - pwrctl->ps_flag = _TRUE; + pwrctl->ps_flag = true; } - padapter->net_closed = _TRUE; - padapter->netif_up = _FALSE; - pmlmepriv->LinkDetectInfo.bBusyTraffic = _FALSE; + padapter->net_closed = true; + padapter->netif_up = false; + pmlmepriv->LinkDetectInfo.bBusyTraffic = false; /* if (!rtw_is_hw_init_completed(padapter)) { - RTW_INFO("(1)871x_drv - drv_close, bup=%d, hw_init_completed=%s\n", padapter->bup, rtw_is_hw_init_completed(padapter)?"_TRUE":"_FALSE"); + RTW_INFO("(1)871x_drv - drv_close, bup=%d, hw_init_completed=%s\n", padapter->bup, rtw_is_hw_init_completed(padapter)?"true":"false"); rtw_set_drv_stopped(padapter); @@ -3006,7 +3006,7 @@ static int netdev_close(struct net_device *pnetdev) } else*/ if (pwrctl->rf_pwrstate == rf_on) { - RTW_INFO("(2)871x_drv - drv_close, bup=%d, hw_init_completed=%s\n", padapter->bup, rtw_is_hw_init_completed(padapter) ? "_TRUE" : "_FALSE"); + RTW_INFO("(2)871x_drv - drv_close, bup=%d, hw_init_completed=%s\n", padapter->bup, rtw_is_hw_init_completed(padapter) ? "true" : "false"); /* s1. */ if (pnetdev) @@ -3015,13 +3015,13 @@ static int netdev_close(struct net_device *pnetdev) #ifndef CONFIG_ANDROID /* s2. */ LeaveAllPowerSaveMode(padapter); - rtw_disassoc_cmd(padapter, 500, _FALSE); + rtw_disassoc_cmd(padapter, 500, false); /* s2-2. indicate disconnect to os */ - rtw_indicate_disconnect(padapter, 0, _FALSE); + rtw_indicate_disconnect(padapter, 0, false); /* s2-3. */ rtw_free_assoc_resources(padapter, 1); /* s2-4. */ - rtw_free_network_queue(padapter, _TRUE); + rtw_free_network_queue(padapter, true); #endif /* Close LED */ rtw_led_control(padapter, LED_CTL_POWER_OFF); @@ -3043,7 +3043,7 @@ static int netdev_close(struct net_device *pnetdev) #ifdef CONFIG_IOCTL_CFG80211 rtw_scan_abort(padapter); rtw_cfg80211_wait_scan_req_empty(padapter, 200); - adapter_wdev_data(padapter)->bandroid_scan = _FALSE; + adapter_wdev_data(padapter)->bandroid_scan = false; /* padapter->rtw_wdev->iftype = NL80211_IFTYPE_MONITOR; */ /* set this at the end */ #endif /* CONFIG_IOCTL_CFG80211 */ @@ -3051,14 +3051,14 @@ static int netdev_close(struct net_device *pnetdev) rtw_wapi_disable_tx(padapter); #endif #ifdef CONFIG_BT_COEXIST_SOCKET_TRX - if (is_primary_adapter(padapter) && (_TRUE == pHalData->EEPROMBluetoothCoexist)) + if (is_primary_adapter(padapter) && (true == pHalData->EEPROMBluetoothCoexist)) rtw_btcoex_close_socket(padapter); else RTW_INFO("CONFIG_BT_COEXIST: VIRTUAL_ADAPTER\n"); #endif /* CONFIG_BT_COEXIST_SOCKET_TRX */ #else /* !CONFIG_PLATFORM_INTEL_BYT */ - if (pwrctl->bInSuspend == _TRUE) { + if (pwrctl->bInSuspend == true) { RTW_INFO("+871x_drv - drv_close, bInSuspend=%d\n", pwrctl->bInSuspend); return 0; } @@ -3069,7 +3069,7 @@ static int netdev_close(struct net_device *pnetdev) #endif RTW_INFO("netdev_close, bips_processing=%d\n", pwrctl->bips_processing); - while (pwrctl->bips_processing == _TRUE) /* waiting for ips_processing done before call rtw_dev_unload() */ + while (pwrctl->bips_processing == true) /* waiting for ips_processing done before call rtw_dev_unload() */ rtw_msleep_os(1); rtw_dev_unload(padapter); @@ -3403,7 +3403,7 @@ void rtw_dev_unload(_adapter *padapter) u8 cnt = 0; - if (padapter->bup == _TRUE) { + if (padapter->bup == true) { RTW_INFO("==> "FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter)); rtw_set_drv_stopped(padapter); @@ -3418,7 +3418,7 @@ void rtw_dev_unload(_adapter *padapter) if (!pwrctl->bInternalAutoSuspend) rtw_stop_drv_threads(padapter); - while (ATOMIC_READ(&(pcmdpriv->cmdthd_running)) == _TRUE) { + while (ATOMIC_READ(&(pcmdpriv->cmdthd_running)) == true) { if (cnt > 5) { RTW_INFO("stop cmdthd timeout\n"); break; @@ -3431,7 +3431,7 @@ void rtw_dev_unload(_adapter *padapter) /* check the status of IPS */ - if (rtw_hal_check_ips_status(padapter) == _TRUE || pwrctl->rf_pwrstate == rf_off) { /* check HW status and SW state */ + if (rtw_hal_check_ips_status(padapter) == true || pwrctl->rf_pwrstate == rf_off) { /* check HW status and SW state */ RTW_INFO("%s: driver in IPS-FWLPS\n", __func__); pdbgpriv->dbg_dev_unload_inIPS_cnt++; } else @@ -3442,9 +3442,9 @@ void rtw_dev_unload(_adapter *padapter) rtw_btcoex_IpsNotify(padapter, pwrctl->ips_mode_req); #endif #ifdef CONFIG_WOWLAN - if (pwrctl->bSupportRemoteWakeup == _TRUE && - pwrctl->wowlan_mode == _TRUE) - RTW_INFO("%s bSupportRemoteWakeup==_TRUE do not run rtw_hal_deinit()\n", __func__); + if (pwrctl->bSupportRemoteWakeup == true && + pwrctl->wowlan_mode == true) + RTW_INFO("%s bSupportRemoteWakeup==true do not run rtw_hal_deinit()\n", __func__); else #endif { @@ -3454,11 +3454,11 @@ void rtw_dev_unload(_adapter *padapter) rtw_set_surprise_removed(padapter); } - padapter->bup = _FALSE; + padapter->bup = false; RTW_INFO("<== "FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter)); } else { - RTW_INFO("%s: bup==_FALSE\n", __func__); + RTW_INFO("%s: bup==false\n", __func__); } rtw_cancel_all_timer(padapter); } @@ -3494,13 +3494,13 @@ int rtw_suspend_free_assoc_resource(_adapter *padapter) } if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) && check_fwstate(pmlmepriv, _FW_LINKED)) { - rtw_disassoc_cmd(padapter, 0, _FALSE); + rtw_disassoc_cmd(padapter, 0, false); /* s2-2. indicate disconnect to os */ - rtw_indicate_disconnect(padapter, 0, _FALSE); + rtw_indicate_disconnect(padapter, 0, false); } #ifdef CONFIG_AP_MODE else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) - rtw_sta_flush(padapter, _TRUE); + rtw_sta_flush(padapter, true); #endif /* s2-3. */ @@ -3510,7 +3510,7 @@ int rtw_suspend_free_assoc_resource(_adapter *padapter) #ifdef CONFIG_AUTOSUSPEND if (is_primary_adapter(padapter) && (!adapter_to_pwrctl(padapter)->bInternalAutoSuspend)) #endif - rtw_free_network_queue(padapter, _TRUE); + rtw_free_network_queue(padapter, true); if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) { RTW_INFO("%s: fw_under_survey\n", __func__); @@ -3518,9 +3518,9 @@ int rtw_suspend_free_assoc_resource(_adapter *padapter) clr_fwstate(pmlmepriv, _FW_UNDER_SURVEY); } - if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == _TRUE) { + if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true) { RTW_INFO("%s: fw_under_linking\n", __func__); - rtw_indicate_disconnect(padapter, 0, _FALSE); + rtw_indicate_disconnect(padapter, 0, false); } RTW_INFO("<== "FUNC_ADPT_FMT" exit....\n", FUNC_ADPT_ARG(padapter)); @@ -3552,14 +3552,14 @@ int rtw_suspend_wow(_adapter *padapter) RTW_INFO("wowlan_p2p_enable: %d\n", pwrpriv->wowlan_p2p_enable); #endif - if (pwrpriv->wowlan_mode == _TRUE) { + if (pwrpriv->wowlan_mode == true) { #ifdef CONFIG_BT_COEXIST rtw_btcoex_SuspendNotify(padapter, BTCOEX_SUSPEND_STATE_SUSPEND_KEEP_ANT); #endif if (pnetdev) rtw_netif_stop_queue(pnetdev); - rtw_mi_buddy_netif_stop_queue(padapter, _TRUE); + rtw_mi_buddy_netif_stop_queue(padapter, true); /* 0. Power off LED */ rtw_led_control(padapter, LED_CTL_POWER_OFF); @@ -3567,7 +3567,7 @@ int rtw_suspend_wow(_adapter *padapter) rtw_set_drv_stopped(padapter); /*for stop thread*/ for (i = 0; i < dvobj->iface_nums; i++) { iface = dvobj->padapters[i]; - if ((iface) && (iface->bup == _TRUE)) + if ((iface) && (iface->bup == true)) rtw_stop_drv_threads(iface); } rtw_clr_drv_stopped(padapter); /*for 32k command*/ @@ -3607,7 +3607,7 @@ int rtw_suspend_wow(_adapter *padapter) RTW_INFO("%s: wowmode suspending\n", __func__); - if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE) { + if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) { RTW_INFO("%s: fw_under_survey\n", __func__); rtw_indicate_scan_done(padapter, 1); clr_fwstate(pmlmepriv, _FW_UNDER_SURVEY); @@ -3630,7 +3630,7 @@ int rtw_suspend_wow(_adapter *padapter) RTW_INFO("%s: pno: %d\n", __func__, pwrpriv->wowlan_pno_enable); #ifdef CONFIG_FWLPS_IN_IPS - rtw_set_fw_in_ips_mode(padapter, _TRUE); + rtw_set_fw_in_ips_mode(padapter, true); #endif } #ifdef CONFIG_LPS @@ -3662,7 +3662,7 @@ int rtw_suspend_ap_wow(_adapter *padapter) RTW_INFO("==> "FUNC_ADPT_FMT" entry....\n", FUNC_ADPT_ARG(padapter)); - pwrpriv->wowlan_ap_mode = _TRUE; + pwrpriv->wowlan_ap_mode = true; RTW_INFO("wowlan_ap_mode: %d\n", pwrpriv->wowlan_ap_mode); @@ -3670,7 +3670,7 @@ int rtw_suspend_ap_wow(_adapter *padapter) rtw_btcoex_SuspendNotify(padapter, BTCOEX_SUSPEND_STATE_SUSPEND_KEEP_ANT); #endif - rtw_mi_netif_stop_queue(padapter, _FALSE); + rtw_mi_netif_stop_queue(padapter, false); /* 0. Power off LED */ rtw_led_control(padapter, LED_CTL_POWER_OFF); @@ -3678,7 +3678,7 @@ int rtw_suspend_ap_wow(_adapter *padapter) rtw_set_drv_stopped(padapter); /*for stop thread*/ for (i = 0; i < dvobj->iface_nums; i++) { iface = dvobj->padapters[i]; - if ((iface) && (iface->bup == _TRUE)) + if ((iface) && (iface->bup == true)) rtw_stop_drv_threads(iface); } rtw_clr_drv_stopped(padapter); /*for 32k command*/ @@ -3743,13 +3743,13 @@ static int rtw_suspend_normal(_adapter *padapter) rtw_btcoex_SuspendNotify(padapter, BTCOEX_SUSPEND_STATE_SUSPEND); #endif - rtw_mi_netif_stop_queue(padapter, _TRUE); + rtw_mi_netif_stop_queue(padapter, true); rtw_mi_suspend_free_assoc_resource(padapter); rtw_led_control(padapter, LED_CTL_POWER_OFF); - if ((rtw_hal_check_ips_status(padapter) == _TRUE) + if ((rtw_hal_check_ips_status(padapter) == true) || (adapter_to_pwrctl(padapter)->rf_pwrstate == rf_off)) RTW_INFO("%s: ### ERROR #### driver in IPS ####ERROR###!!!\n", __func__); @@ -3787,14 +3787,14 @@ int rtw_suspend_common(_adapter *padapter) pdbgpriv->dbg_suspend_cnt++; - pwrpriv->bInSuspend = _TRUE; + pwrpriv->bInSuspend = true; - while (pwrpriv->bips_processing == _TRUE) + while (pwrpriv->bips_processing == true) rtw_msleep_os(1); #ifdef CONFIG_IOL_READ_EFUSE_MAP if (!padapter->bup) { - u8 bMacPwrCtrlOn = _FALSE; + u8 bMacPwrCtrlOn = false; rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); if (bMacPwrCtrlOn) rtw_hal_power_off(padapter); @@ -3817,21 +3817,21 @@ int rtw_suspend_common(_adapter *padapter) rtw_ps_deny_cancel(padapter, PS_DENY_SUSPEND); - if (rtw_mi_check_status(padapter, MI_AP_MODE) == _FALSE) { + if (rtw_mi_check_status(padapter, MI_AP_MODE) == false) { #ifdef CONFIG_WOWLAN if (check_fwstate(pmlmepriv, _FW_LINKED)) - pwrpriv->wowlan_mode = _TRUE; - else if (pwrpriv->wowlan_pno_enable == _TRUE) + pwrpriv->wowlan_mode = true; + else if (pwrpriv->wowlan_pno_enable == true) pwrpriv->wowlan_mode |= pwrpriv->wowlan_pno_enable; #ifdef CONFIG_P2P_WOWLAN if (!rtw_p2p_chk_state(&padapter->wdinfo, P2P_STATE_NONE) || P2P_ROLE_DISABLE != padapter->wdinfo.role) - pwrpriv->wowlan_p2p_mode = _TRUE; - if (_TRUE == pwrpriv->wowlan_p2p_mode) + pwrpriv->wowlan_p2p_mode = true; + if (true == pwrpriv->wowlan_p2p_mode) pwrpriv->wowlan_mode |= pwrpriv->wowlan_p2p_mode; #endif /* CONFIG_P2P_WOWLAN */ - if (pwrpriv->wowlan_mode == _TRUE) + if (pwrpriv->wowlan_mode == true) rtw_suspend_wow(padapter); else #endif /* CONFIG_WOWLAN */ @@ -3888,20 +3888,20 @@ int rtw_resume_process_wow(_adapter *padapter) goto exit; } - pwrpriv->wowlan_in_resume = _TRUE; + pwrpriv->wowlan_in_resume = true; #ifdef CONFIG_PNO_SUPPORT #ifdef CONFIG_FWLPS_IN_IPS if (pwrpriv->wowlan_pno_enable) - rtw_set_fw_in_ips_mode(padapter, _FALSE); + rtw_set_fw_in_ips_mode(padapter, false); #endif /* CONFIG_FWLPS_IN_IPS */ #endif/* CONFIG_PNO_SUPPORT */ - if (pwrpriv->wowlan_mode == _TRUE) { + if (pwrpriv->wowlan_mode == true) { #ifdef CONFIG_LPS rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0, "WOWLAN"); #endif /* CONFIG_LPS */ - pwrpriv->bFwCurrentInPSMode = _FALSE; + pwrpriv->bFwCurrentInPSMode = false; #if !(CONFIG_RTW_SDIO_KEEP_IRQ) /* if (sdio_alloc_irq(adapter_to_dvobj(padapter)) != _SUCCESS) { */ @@ -3954,7 +3954,7 @@ int rtw_resume_process_wow(_adapter *padapter) RTW_INFO("%s: disconnect reason: %02x\n", __func__, pwrpriv->wowlan_wake_reason); - rtw_indicate_disconnect(padapter, 0, _FALSE); + rtw_indicate_disconnect(padapter, 0, false); rtw_sta_media_status_rpt(padapter, rtw_get_stainfo(&padapter->stapriv, @@ -3990,8 +3990,8 @@ int rtw_resume_process_wow(_adapter *padapter) rtw_lock_ext_suspend_timeout(10000); } - if (pwrpriv->wowlan_mode == _TRUE) { - pwrpriv->bips_processing = _FALSE; + if (pwrpriv->wowlan_mode == true) { + pwrpriv->bips_processing = false; _set_timer(&adapter_to_dvobj(padapter)->dynamic_chk_timer, 2000); #ifndef CONFIG_IPS_CHECK_IN_WD rtw_set_pwr_state_check_timer(pwrpriv); @@ -3999,7 +3999,7 @@ int rtw_resume_process_wow(_adapter *padapter) } else RTW_INFO("do not reset timer\n"); - pwrpriv->wowlan_mode = _FALSE; + pwrpriv->wowlan_mode = false; /* Power On LED */ #ifdef CONFIG_SW_LED @@ -4054,7 +4054,7 @@ int rtw_resume_process_ap_wow(_adapter *padapter) rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0, "AP-WOWLAN"); #endif /* CONFIG_LPS */ - pwrpriv->bFwCurrentInPSMode = _FALSE; + pwrpriv->bFwCurrentInPSMode = false; rtw_hal_disable_interrupt(padapter); @@ -4069,7 +4069,7 @@ int rtw_resume_process_ap_wow(_adapter *padapter) /* Disable WOW, set H2C command */ poidparam.subcode = WOWLAN_AP_DISABLE; rtw_hal_set_hwreg(padapter, HW_VAR_WOWLAN, (u8 *)&poidparam); - pwrpriv->wowlan_ap_mode = _FALSE; + pwrpriv->wowlan_ap_mode = false; rtw_clr_drv_stopped(padapter); RTW_INFO("%s: wowmode resuming, DriverStopped:%s\n", __func__, rtw_is_drv_stopped(padapter) ? "True" : "False"); @@ -4114,7 +4114,7 @@ int rtw_resume_process_ap_wow(_adapter *padapter) if (pwrpriv->wowlan_wake_reason == AP_OFFLOAD_WAKEUP) rtw_lock_ext_suspend_timeout(8000); - pwrpriv->bips_processing = _FALSE; + pwrpriv->bips_processing = false; _set_timer(&adapter_to_dvobj(padapter)->dynamic_chk_timer, 2000); #ifndef CONFIG_IPS_CHECK_IN_WD rtw_set_pwr_state_check_timer(pwrpriv); @@ -4202,10 +4202,10 @@ static int rtw_resume_process_normal(_adapter *padapter) rtw_mi_reset_drv_sw(padapter); - pwrpriv->bkeepfwalive = _FALSE; + pwrpriv->bkeepfwalive = false; RTW_INFO("bkeepfwalive(%x)\n", pwrpriv->bkeepfwalive); - if (pm_netdev_open(pnetdev, _TRUE) != 0) { + if (pm_netdev_open(pnetdev, true) != 0) { ret = -1; pdbgpriv->dbg_resume_error_cnt++; goto exit; @@ -4241,15 +4241,15 @@ int rtw_resume_common(_adapter *padapter) struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - if (pwrpriv->bInSuspend == _FALSE) + if (pwrpriv->bInSuspend == false) return 0; RTW_INFO("resume start\n"); RTW_INFO("==> %s (%s:%d)\n", __func__, current->comm, current->pid); - if (rtw_mi_check_status(padapter, WIFI_AP_STATE) == _FALSE) { + if (rtw_mi_check_status(padapter, WIFI_AP_STATE) == false) { #ifdef CONFIG_WOWLAN - if (pwrpriv->wowlan_mode == _TRUE) + if (pwrpriv->wowlan_mode == true) rtw_resume_process_wow(padapter); else #endif @@ -4264,9 +4264,9 @@ int rtw_resume_common(_adapter *padapter) } if (pwrpriv) { - pwrpriv->bInSuspend = _FALSE; + pwrpriv->bInSuspend = false; #ifdef CONFIG_WOWLAN - pwrpriv->wowlan_in_resume = _FALSE; + pwrpriv->wowlan_in_resume = false; #endif } RTW_INFO("%s:%d in %d ms\n", __func__ , ret, diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index 5b3fab9..ec1f90a 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -379,10 +379,10 @@ bool match_mstat_sniff_rules(const enum mstat_f flags, const size_t size) if (mstat_sniff_rules[i].flags == flags && mstat_sniff_rules[i].lb <= size && mstat_sniff_rules[i].hb >= size) - return _TRUE; + return true; } - return _FALSE; + return false; } inline u8 *dbg_rtw_vmalloc(u32 sz, const enum mstat_f flags, const char *func, const int line) @@ -707,9 +707,9 @@ int _rtw_memcmp(const void *dst, const void *src, u32 sz) { /* under Linux/GNU/GLibc, the return value of memcmp for two same mem. chunk is 0 */ if (!(memcmp(dst, src, sz))) - return _TRUE; + return true; else - return _FALSE; + return false; } void _rtw_init_listhead(_list *list) @@ -726,9 +726,9 @@ Otherwise, there will be racing condition. u32 rtw_is_list_empty(_list *phead) { if (list_empty(phead)) - return _TRUE; + return true; else - return _FALSE; + return false; } void rtw_list_insert_head(_list *plist, _list *phead) @@ -826,9 +826,9 @@ u32 _rtw_queue_empty(_queue *pqueue) u32 rtw_end_of_queue_search(_list *head, _list *plist) { if (head == plist) - return _TRUE; + return true; else - return _FALSE; + return false; } @@ -1345,28 +1345,28 @@ static int storeToFile(const char *path, u8 *buf, u32 sz) /* * Test if the specifi @param path is a file and readable * @param path the path of the file to test -* @return _TRUE or _FALSE +* @return true or false */ int rtw_is_file_readable(const char *path) { if (isFileReadable(path, NULL) == 0) - return _TRUE; + return true; else - return _FALSE; + return false; } /* * Test if the specifi @param path is a file and readable. * If readable, @param sz is got * @param path the path of the file to test -* @return _TRUE or _FALSE +* @return true or false */ int rtw_is_file_readable_with_size(const char *path, u32 *sz) { if (isFileReadable(path, sz) == 0) - return _TRUE; + return true; else - return _FALSE; + return false; } /* @@ -1608,22 +1608,22 @@ keep_ori: * rtw_cbuf_full - test if cbuf is full * @cbuf: pointer of struct rtw_cbuf * - * Returns: _TRUE if cbuf is full + * Returns: true if cbuf is full */ inline bool rtw_cbuf_full(struct rtw_cbuf *cbuf) { - return (cbuf->write == cbuf->read - 1) ? _TRUE : _FALSE; + return (cbuf->write == cbuf->read - 1) ? true : false; } /** * rtw_cbuf_empty - test if cbuf is empty * @cbuf: pointer of struct rtw_cbuf * - * Returns: _TRUE if cbuf is empty + * Returns: true if cbuf is empty */ inline bool rtw_cbuf_empty(struct rtw_cbuf *cbuf) { - return (cbuf->write == cbuf->read) ? _TRUE : _FALSE; + return (cbuf->write == cbuf->read) ? true : false; } /** @@ -1632,7 +1632,7 @@ inline bool rtw_cbuf_empty(struct rtw_cbuf *cbuf) * @buf: pointer to push in * * Lock free operation, be careful of the use scheme - * Returns: _TRUE push success + * Returns: true push success */ bool rtw_cbuf_push(struct rtw_cbuf *cbuf, void *buf) { @@ -1789,74 +1789,74 @@ exit: /** * is_null - * -* Return TRUE if c is null character -* FALSE otherwise. +* Return true if c is null character +* false otherwise. */ inline bool is_null(char c) { if (c == '\0') - return _TRUE; + return true; else - return _FALSE; + return false; } /** * is_eol - * -* Return TRUE if c is represent for EOL (end of line) -* FALSE otherwise. +* Return true if c is represent for EOL (end of line) +* false otherwise. */ inline bool is_eol(char c) { if (c == '\r' || c == '\n') - return _TRUE; + return true; else - return _FALSE; + return false; } /** * is_space - * -* Return TRUE if c is represent for space -* FALSE otherwise. +* Return true if c is represent for space +* false otherwise. */ inline bool is_space(char c) { if (c == ' ' || c == '\t') - return _TRUE; + return true; else - return _FALSE; + return false; } /** * IsHexDigit - * -* Return TRUE if chTmp is represent for hex digit -* FALSE otherwise. +* Return true if chTmp is represent for hex digit +* false otherwise. */ inline bool IsHexDigit(char chTmp) { if ((chTmp >= '0' && chTmp <= '9') || (chTmp >= 'a' && chTmp <= 'f') || (chTmp >= 'A' && chTmp <= 'F')) - return _TRUE; + return true; else - return _FALSE; + return false; } /** * is_alpha - * -* Return TRUE if chTmp is represent for alphabet -* FALSE otherwise. +* Return true if chTmp is represent for alphabet +* false otherwise. */ inline bool is_alpha(char chTmp) { if ((chTmp >= 'a' && chTmp <= 'z') || (chTmp >= 'A' && chTmp <= 'Z')) - return _TRUE; + return true; else - return _FALSE; + return false; } inline char alpha_to_upper(char c) diff --git a/os_dep/recv_linux.c b/os_dep/recv_linux.c index f8eb0cf..05c9f6e 100644 --- a/os_dep/recv_linux.c +++ b/os_dep/recv_linux.c @@ -201,7 +201,7 @@ int rtw_os_recvbuf_resource_alloc(_adapter *padapter, struct recv_buf *precvbuf) struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter); struct usb_device *pusbd = pdvobjpriv->pusbdev; - precvbuf->irp_pending = _FALSE; + precvbuf->irp_pending = false; precvbuf->purb = usb_alloc_urb(0, GFP_KERNEL); if (precvbuf->purb == NULL) res = _FAIL; @@ -324,21 +324,21 @@ static int napi_recv(_adapter *padapter, int budget) if (!pskb) break; - rx_ok = _FALSE; + rx_ok = false; #ifdef CONFIG_RTW_GRO if (pregistrypriv->en_gro) { if (rtw_napi_gro_receive(&padapter->napi, pskb) != GRO_DROP) - rx_ok = _TRUE; + rx_ok = true; goto next; } #endif /* CONFIG_RTW_GRO */ if (rtw_netif_receive_skb(padapter->pnetdev, pskb) == NET_RX_SUCCESS) - rx_ok = _TRUE; + rx_ok = true; next: - if (rx_ok == _TRUE) { + if (rx_ok == true) { work_done++; DBG_COUNTER(padapter->rx_logs.os_netif_ok); } else { @@ -383,7 +383,7 @@ void rtw_os_recv_indicate_pkt(_adapter *padapter, _pkt *pkt, struct rx_pkt_attri /* Indicat the packets to upper layer */ if (pkt) { - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) { + if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) { _pkt *pskb2 = NULL; struct sta_info *psta = NULL; struct sta_priv *pstapriv = &padapter->stapriv; @@ -391,7 +391,7 @@ void rtw_os_recv_indicate_pkt(_adapter *padapter, _pkt *pkt, struct rx_pkt_attri /* RTW_INFO("bmcast=%d\n", bmcast); */ - if (_rtw_memcmp(pattrib->dst, adapter_mac_addr(padapter), ETH_ALEN) == _FALSE) { + if (_rtw_memcmp(pattrib->dst, adapter_mac_addr(padapter), ETH_ALEN) == false) { /* RTW_INFO("not ap psta=%p, addr=%pM\n", psta, pattrib->dst); */ if (bmcast) { @@ -438,7 +438,7 @@ void rtw_os_recv_indicate_pkt(_adapter *padapter, _pkt *pkt, struct rx_pkt_attri #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)) { if (nat25_handle_frame(padapter, pkt) == -1) { /* priv->ext_stats.rx_data_drops++; */ /* DEBUG_ERR("RX DROP: nat25_handle_frame fail!\n"); */ @@ -512,7 +512,7 @@ void rtw_handle_tkip_mic_err(_adapter *padapter, struct sta_info *sta, u8 bgroup cur_time = rtw_get_current_time(); if (cur_time - psecuritypriv->last_mic_err_time < 60 * HZ) { - psecuritypriv->btkip_countermeasure = _TRUE; + psecuritypriv->btkip_countermeasure = true; psecuritypriv->last_mic_err_time = 0; psecuritypriv->btkip_countermeasure_time = cur_time; } else @@ -734,11 +734,11 @@ int rtw_recv_indicatepkt(_adapter *padapter, union recv_frame *precv_frame) u8 *ip = pkt->data + 14; if (GET_IPV4_PROTOCOL(ip) == 0x06 /* TCP */ - && rtw_st_ctl_chk_reg_s_proto(&sta->st_ctl, 0x06) == _TRUE + && rtw_st_ctl_chk_reg_s_proto(&sta->st_ctl, 0x06) == true ) { u8 *tcp = ip + GET_IPV4_IHL(ip) * 4; - if (rtw_st_ctl_chk_reg_rule(&sta->st_ctl, padapter, IPV4_DST(ip), TCP_DST(tcp), IPV4_SRC(ip), TCP_SRC(tcp)) == _TRUE) { + if (rtw_st_ctl_chk_reg_rule(&sta->st_ctl, padapter, IPV4_DST(ip), TCP_DST(tcp), IPV4_SRC(ip), TCP_SRC(tcp)) == true) { if (GET_TCP_SYN(tcp) && GET_TCP_ACK(tcp)) { session_tracker_add_cmd(padapter, sta , IPV4_DST(ip), TCP_DST(tcp) @@ -802,7 +802,7 @@ void rtw_os_read_port(_adapter *padapter, struct recv_buf *precvbuf) precvbuf->pskb = NULL; - if (precvbuf->irp_pending == _FALSE) + if (precvbuf->irp_pending == false) rtw_read_port(padapter, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf); } #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) diff --git a/os_dep/rtw_android.c b/os_dep/rtw_android.c index 3810c65..f2e908f 100644 --- a/os_dep/rtw_android.c +++ b/os_dep/rtw_android.c @@ -167,7 +167,7 @@ typedef struct compat_android_wifi_priv_cmd { * time (only) in dhd_open, subsequential wifi on will be handled by * wl_android_wifi_on */ -static int g_wifi_on = _TRUE; +static int g_wifi_on = true; static unsigned int oob_irq = 0; static unsigned int oob_gpio = 0; @@ -370,7 +370,7 @@ static int rtw_android_get_rssi(struct net_device *net, char *command, int total struct wlan_network *pcur_network = &pmlmepriv->cur_network; int bytes_written = 0; - if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { + if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { bytes_written += snprintf(&command[bytes_written], total_len, "%s rssi %d", pcur_network->network.Ssid.Ssid, padapter->recvpriv.rssi); } @@ -429,7 +429,7 @@ static int rtw_android_set_block_scan(struct net_device *net, char *command, int char *block_value = command + strlen(android_wifi_cmd_str[ANDROID_WIFI_CMD_BLOCK_SCAN]) + 1; #ifdef CONFIG_IOCTL_CFG80211 - adapter_wdev_data(adapter)->block_scan = (*block_value == '0') ? _FALSE : _TRUE; + adapter_wdev_data(adapter)->block_scan = (*block_value == '0') ? false : true; #endif return 0; @@ -441,7 +441,7 @@ static int rtw_android_set_block(struct net_device *net, char *command, int tota char *block_value = command + strlen(android_wifi_cmd_str[ANDROID_WIFI_CMD_BLOCK]) + 1; #ifdef CONFIG_IOCTL_CFG80211 - adapter_wdev_data(adapter)->block = (*block_value == '0') ? _FALSE : _TRUE; + adapter_wdev_data(adapter)->block = (*block_value == '0') ? false : true; #endif return 0; @@ -555,7 +555,7 @@ int rtw_gtk_offload(struct net_device *net, u8 *cmd_ptr) printk(" %02x ", psta->kck[i]); */ _rtw_memcpy(psta->replay_ctr, cmd_ptr, RTW_REPLAY_CTR_LEN); - psecuritypriv->binstallKCK_KEK = _TRUE; + psecuritypriv->binstallKCK_KEK = true; /* printk("\nREPLAY_CTR: "); */ /* for(i=0;ibandroid_scan = _TRUE; + adapter_wdev_data((_adapter *)rtw_netdev_priv(net))->bandroid_scan = true; #endif /* CONFIG_IOCTL_CFG80211 */ #endif /* CONFIG_PLATFORM_MSTAR */ break; @@ -712,11 +712,11 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) break; case ANDROID_WIFI_CMD_RXFILTER_ADD: /* int filter_num = *(command + strlen(CMD_RXFILTER_ADD) + 1) - '0'; */ - /* bytes_written = net_os_rxfilter_add_remove(net, TRUE, filter_num); */ + /* bytes_written = net_os_rxfilter_add_remove(net, true, filter_num); */ break; case ANDROID_WIFI_CMD_RXFILTER_REMOVE: /* int filter_num = *(command + strlen(CMD_RXFILTER_REMOVE) + 1) - '0'; */ - /* bytes_written = net_os_rxfilter_add_remove(net, FALSE, filter_num); */ + /* bytes_written = net_os_rxfilter_add_remove(net, false, filter_num); */ break; case ANDROID_WIFI_CMD_BTCOEXSCAN_START: diff --git a/os_dep/rtw_cfgvendor.c b/os_dep/rtw_cfgvendor.c index e9eccc4..ed835c2 100644 --- a/os_dep/rtw_cfgvendor.c +++ b/os_dep/rtw_cfgvendor.c @@ -612,7 +612,7 @@ static int wl_cfgvendor_enable_full_scan_result(struct wiphy *wiphy, int err = 0; struct bcm_cfg80211 *cfg = wiphy_priv(wiphy); int type; - bool real_time = FALSE; + bool real_time = false; type = nla_type(data); diff --git a/os_dep/rtw_proc.c b/os_dep/rtw_proc.c index 796cca5..7baa93f 100644 --- a/os_dep/rtw_proc.c +++ b/os_dep/rtw_proc.c @@ -596,7 +596,7 @@ static int proc_get_rx_info_msg(struct seq_file *m, void *v) struct net_device *dev = m->private; _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); - rtw_hal_set_odm_var(padapter, HAL_ODM_RX_Dframe_INFO, m, _FALSE); + rtw_hal_set_odm_var(padapter, HAL_ODM_RX_Dframe_INFO, m, false); return 0; } static int proc_get_tx_info_msg(struct seq_file *m, void *v) @@ -630,15 +630,15 @@ static int proc_get_tx_info_msg(struct seq_file *m, void *v) 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); plist = get_next(plist); - if ((_rtw_memcmp(psta->hwaddr, bc_addr, 6) != _TRUE) - && (_rtw_memcmp(psta->hwaddr, null_addr, 6) != _TRUE) - && (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(padapter), 6) != _TRUE)) { + if ((_rtw_memcmp(psta->hwaddr, bc_addr, 6) != true) + && (_rtw_memcmp(psta->hwaddr, null_addr, 6) != true) + && (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(padapter), 6) != true)) { switch (psta->bw_mode) { @@ -889,7 +889,7 @@ static ssize_t proc_set_macaddr_acl(struct file *file, const char __user *buffer if (sscanf(c, MAC_SFMT, MAC_SARG(addr)) != 6) break; - if (rtw_check_invalid_mac_address(addr, 0) == _FALSE) + if (rtw_check_invalid_mac_address(addr, 0) == false) rtw_acl_add_sta(adapter, addr); c = strsep(&next, " \t"); @@ -974,7 +974,7 @@ ssize_t proc_set_pre_link_sta(struct file *file, const char __user *buffer, size if (sscanf(c, MAC_SFMT, MAC_SARG(addr)) != 6) break; - if (rtw_check_invalid_mac_address(addr, 0) == _FALSE) { + if (rtw_check_invalid_mac_address(addr, 0) == false) { if (cmd_id == PRE_LINK_STA_CMD_ADD) rtw_pre_link_sta_add(&adapter->stapriv, addr); else @@ -1276,7 +1276,7 @@ static ssize_t proc_set_sec_cam(struct file *file, const char __user *buffer, si if (strcmp("c", cmd) == 0) { _clear_cam_entry(adapter, id_1); - adapter->securitypriv.hw_decrypted = _FALSE; /* temporarily set this for TX path to use SW enc */ + adapter->securitypriv.hw_decrypted = false; /* temporarily set this for TX path to use SW enc */ } else if (strcmp("wfc", cmd) == 0) write_cam_from_cache(adapter, id_1); else if (strcmp("sw", cmd) == 0) @@ -1368,7 +1368,7 @@ static ssize_t proc_set_tx_bw_mode(struct file *file, const char __user *buffer, if (buffer && !copy_from_user(tmp, buffer, count)) { - u8 update = _FALSE; + u8 update = false; int num = sscanf(tmp, "%hhx", &bw_mode); if (num < 1 || bw_mode == adapter->driver_tx_bw_mode) @@ -1379,11 +1379,11 @@ static ssize_t proc_set_tx_bw_mode(struct file *file, const char __user *buffer, || (mlmeext->cur_channel >= 36 && BW_MODE_5G(bw_mode) != ADAPTER_TX_BW_5G(adapter))) ) { /* RA mask update needed */ - update = _TRUE; + update = true; } adapter->driver_tx_bw_mode = bw_mode; - if (update == _TRUE) { + if (update == true) { struct sta_info *sta; int i; @@ -2146,9 +2146,9 @@ static ssize_t proc_set_acs(struct file *file, const char __user *buffer, size_t return -EINVAL; if (1 == acs_satae) - rtw_acs_start(padapter, _TRUE); + rtw_acs_start(padapter, true); else - rtw_acs_start(padapter, _FALSE); + rtw_acs_start(padapter, false); } return count; diff --git a/os_dep/usb_intf.c b/os_dep/usb_intf.c index 72d2269..3f1133a 100644 --- a/os_dep/usb_intf.c +++ b/os_dep/usb_intf.c @@ -50,8 +50,8 @@ static void rtw_dev_shutdown(struct device *dev) if (!rtw_is_surprise_removed(adapter)) { struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(adapter); #ifdef CONFIG_WOWLAN - if (pwrctl->wowlan_mode == _TRUE) - RTW_INFO("%s wowlan_mode ==_TRUE do not run rtw_hal_deinit()\n", __func__); + if (pwrctl->wowlan_mode == true) + RTW_INFO("%s wowlan_mode ==true do not run rtw_hal_deinit()\n", __func__); else #endif { @@ -435,10 +435,10 @@ static int usb_reprobe_switch_usb_mode(PADAPTER Adapter) { struct registry_priv *registry_par = &Adapter->registrypriv; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); - u8 ret = _FALSE; + u8 ret = false; /* efuse not allow driver to switch usb mode */ - if (pHalData->EEPROMUsbSwitch == _FALSE) + if (pHalData->EEPROMUsbSwitch == false) goto exit; /* registry not allow driver to switch usb mode */ @@ -474,7 +474,7 @@ static void usb_intf_start(_adapter *padapter) PHAL_DATA_TYPE hal = GET_HAL_DATA(padapter); rtw_hal_inirp_init(padapter); - hal->usb_intf_start = _TRUE; + hal->usb_intf_start = true; } @@ -497,7 +497,7 @@ static void usb_intf_stop(_adapter *padapter) /* todo:cancel other irps */ - hal->usb_intf_start = _FALSE; + hal->usb_intf_start = false; } @@ -541,7 +541,7 @@ int rtw_hw_suspend(_adapter *padapter) if (NULL == padapter) goto error_exit; - if ((_FALSE == padapter->bup) || RTW_CANNOT_RUN(padapter)) { + if ((false == padapter->bup) || RTW_CANNOT_RUN(padapter)) { RTW_INFO("padapter->bup=%d bDriverStopped=%s bSurpriseRemoved = %s\n" , padapter->bup , rtw_is_drv_stopped(padapter) ? "True" : "False" @@ -557,8 +557,8 @@ int rtw_hw_suspend(_adapter *padapter) RTW_INFO("==> rtw_hw_suspend\n"); _enter_pwrlock(&pwrpriv->lock); - pwrpriv->bips_processing = _TRUE; - /* padapter->net_closed = _TRUE; */ + pwrpriv->bips_processing = true; + /* padapter->net_closed = true; */ /* s1. */ if (pnetdev) { netif_carrier_off(pnetdev); @@ -566,7 +566,7 @@ int rtw_hw_suspend(_adapter *padapter) } /* s2. */ - rtw_disassoc_cmd(padapter, 500, _FALSE); + rtw_disassoc_cmd(padapter, 500, false); /* s2-2. indicate disconnect to os */ /* rtw_indicate_disconnect(padapter); */ @@ -576,7 +576,7 @@ int rtw_hw_suspend(_adapter *padapter) _clr_fwstate_(pmlmepriv, _FW_LINKED); rtw_led_control(padapter, LED_CTL_NO_LINK); - rtw_os_indicate_disconnect(padapter, 0, _FALSE); + rtw_os_indicate_disconnect(padapter, 0, false); #ifdef CONFIG_LPS /* donnot enqueue cmd */ @@ -588,12 +588,12 @@ int rtw_hw_suspend(_adapter *padapter) rtw_free_assoc_resources(padapter, 1); /* s2-4. */ - rtw_free_network_queue(padapter, _TRUE); + rtw_free_network_queue(padapter, true); #ifdef CONFIG_IPS rtw_ips_dev_unload(padapter); #endif pwrpriv->rf_pwrstate = rf_off; - pwrpriv->bips_processing = _FALSE; + pwrpriv->bips_processing = false; _exit_pwrlock(&pwrpriv->lock); return 0; @@ -612,10 +612,10 @@ int rtw_hw_resume(_adapter *padapter) RTW_INFO("==> rtw_hw_resume\n"); _enter_pwrlock(&pwrpriv->lock); - pwrpriv->bips_processing = _TRUE; + pwrpriv->bips_processing = true; rtw_reset_drv_sw(padapter); - if (pm_netdev_open(pnetdev, _FALSE) != 0) { + if (pm_netdev_open(pnetdev, false) != 0) { _exit_pwrlock(&pwrpriv->lock); goto error_exit; } @@ -624,11 +624,11 @@ int rtw_hw_resume(_adapter *padapter) rtw_netif_wake_queue(pnetdev); - pwrpriv->bkeepfwalive = _FALSE; - pwrpriv->brfoffbyhw = _FALSE; + pwrpriv->bkeepfwalive = false; + pwrpriv->brfoffbyhw = false; pwrpriv->rf_pwrstate = rf_on; - pwrpriv->bips_processing = _FALSE; + pwrpriv->bips_processing = false; _exit_pwrlock(&pwrpriv->lock); @@ -653,7 +653,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message) pdbgpriv = &dvobj->drv_dbg; padapter = dvobj_get_primary_adapter(dvobj); - if (pwrpriv->bInSuspend == _TRUE) { + if (pwrpriv->bInSuspend == true) { RTW_INFO("%s bInSuspend = %d\n", __func__, pwrpriv->bInSuspend); pdbgpriv->dbg_suspend_error_cnt++; goto exit; @@ -666,7 +666,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message) #ifdef SUPPORT_HW_RFOFF_DETECTED /* The FW command register update must after MAC and FW init ready. */ if ((padapter->bFWReady) && (pwrpriv->bHWPwrPindetect) && (padapter->registrypriv.usbss_enable)) { - u8 bOpen = _TRUE; + u8 bOpen = true; rtw_interface_ps_func(padapter, HAL_USB_SELECT_SUSPEND, &bOpen); } #endif/* SUPPORT_HW_RFOFF_DETECTED */ @@ -688,7 +688,7 @@ static int rtw_resume_process(_adapter *padapter) struct debug_priv *pdbgpriv = &pdvobj->drv_dbg; - if (pwrpriv->bInSuspend == _FALSE) { + if (pwrpriv->bInSuspend == false) { pdbgpriv->dbg_resume_error_cnt++; RTW_INFO("%s bInSuspend = %d\n", __func__, pwrpriv->bInSuspend); return -1; @@ -704,9 +704,9 @@ static int rtw_resume_process(_adapter *padapter) #endif /* kernel < 2.6.32 */ RTW_INFO("pwrpriv->bAutoResume (%x)\n", pwrpriv->bAutoResume); - if (_TRUE == pwrpriv->bAutoResume) { - pwrpriv->bInternalAutoSuspend = _FALSE; - pwrpriv->bAutoResume = _FALSE; + if (true == pwrpriv->bAutoResume) { + pwrpriv->bInternalAutoSuspend = false; + pwrpriv->bAutoResume = false; RTW_INFO("pwrpriv->bAutoResume (%x) pwrpriv->bInternalAutoSuspend(%x)\n", pwrpriv->bAutoResume, pwrpriv->bInternalAutoSuspend); } @@ -714,7 +714,7 @@ static int rtw_resume_process(_adapter *padapter) /* * Due to usb wow suspend flow will cancel read/write port via intf_stop and - * bReadPortCancel and bWritePortCancel are set _TRUE in intf_stop. + * bReadPortCancel and bWritePortCancel are set true in intf_stop. * But they will not be clear in intf_start during wow resume flow. * It should move to os_intf in the feature. */ @@ -728,22 +728,22 @@ static int rtw_resume_process(_adapter *padapter) #ifdef SUPPORT_HW_RFOFF_DETECTED /* The FW command register update must after MAC and FW init ready. */ if ((padapter->bFWReady) && (pwrpriv->bHWPwrPindetect) && (padapter->registrypriv.usbss_enable)) { - u8 bOpen = _FALSE; + u8 bOpen = false; rtw_interface_ps_func(padapter, HAL_USB_SELECT_SUSPEND, &bOpen); } #endif #ifdef CONFIG_BT_COEXIST /* for 8723as-vau */ RTW_INFO("pwrpriv->bAutoResume (%x)\n", pwrpriv->bAutoResume); - if (_TRUE == pwrpriv->bAutoResume) { - pwrpriv->bInternalAutoSuspend = _FALSE; - pwrpriv->bAutoResume = _FALSE; + if (true == pwrpriv->bAutoResume) { + pwrpriv->bInternalAutoSuspend = false; + pwrpriv->bAutoResume = false; RTW_INFO("pwrpriv->bAutoResume (%x) pwrpriv->bInternalAutoSuspend(%x)\n", pwrpriv->bAutoResume, pwrpriv->bInternalAutoSuspend); } #else /* #ifdef CONFIG_BT_COEXIST */ - pwrpriv->bInternalAutoSuspend = _FALSE; + pwrpriv->bInternalAutoSuspend = false; #endif /* #ifdef CONFIG_BT_COEXIST */ - pwrpriv->brfoffbyhw = _FALSE; + pwrpriv->brfoffbyhw = false; } #endif/* CONFIG_AUTOSUSPEND */ @@ -783,7 +783,7 @@ static int rtw_resume(struct usb_interface *pusb_intf) #else if (rtw_is_earlysuspend_registered(pwrpriv)) { /* jeff: bypass resume here, do in late_resume */ - rtw_set_do_late_resume(pwrpriv, _TRUE); + rtw_set_do_late_resume(pwrpriv, true); } else { rtw_resume_lock_suspend(); ret = rtw_resume_process(padapter); @@ -809,8 +809,8 @@ void autosuspend_enter(_adapter *padapter) RTW_INFO("==>autosuspend_enter...........\n"); - pwrpriv->bInternalAutoSuspend = _TRUE; - pwrpriv->bips_processing = _TRUE; + pwrpriv->bInternalAutoSuspend = true; + pwrpriv->bips_processing = true; if (rf_off == pwrpriv->change_rfpwrstate) { #ifndef CONFIG_BT_COEXIST @@ -868,7 +868,7 @@ int autoresume_enter(_adapter *padapter) RTW_INFO("====> autoresume_enter\n"); if (rf_off == pwrpriv->rf_pwrstate) { - pwrpriv->ps_flag = _FALSE; + pwrpriv->ps_flag = false; #ifndef CONFIG_BT_COEXIST #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)) if (usb_autopm_get_interface(dvobj->pusbintf) < 0) { @@ -888,7 +888,7 @@ int autoresume_enter(_adapter *padapter) RTW_INFO("...pm_usage_cnt(%d).....\n", dvobj->pusbintf->pm_usage_cnt); #endif #else /* #ifndef CONFIG_BT_COEXIST */ - pwrpriv->bAutoResume = _TRUE; + pwrpriv->bAutoResume = true; if (0 == pwrpriv->autopm_cnt) { #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)) if (usb_autopm_get_interface(dvobj->pusbintf) < 0) { @@ -953,7 +953,7 @@ static _adapter *rtw_usb_primary_adapter_init(struct dvobj_priv *dvobj, padapter->iface_id = IFACE_ID0; /* set adapter_type/iface type for primary padapter */ - padapter->isprimary = _TRUE; + padapter->isprimary = true; padapter->adapter_type = PRIMARY_ADAPTER; #ifdef CONFIG_MI_WITH_MBSSID_CAM/*Configure all IFACE to PORT0-MBSSID*/ padapter->hw_port = HW_PORT0; @@ -1082,10 +1082,10 @@ static void rtw_usb_primary_adapter_deinit(_adapter *padapter) RTW_INFO(FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter)); if (check_fwstate(pmlmepriv, _FW_LINKED)) - rtw_disassoc_cmd(padapter, 0, _FALSE); + rtw_disassoc_cmd(padapter, 0, false); #ifdef CONFIG_AP_MODE - if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == _TRUE) { + if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true) { free_mlme_ap_info(padapter); #ifdef CONFIG_HOSTAPD_MLME hostapd_mode_unload(padapter); @@ -1096,7 +1096,7 @@ static void rtw_usb_primary_adapter_deinit(_adapter *padapter) /*rtw_cancel_all_timer(if1);*/ #ifdef CONFIG_WOWLAN - pwrctl->wowlan_mode = _FALSE; + pwrctl->wowlan_mode = false; #endif /* CONFIG_WOWLAN */ rtw_dev_unload(padapter); @@ -1160,7 +1160,7 @@ static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device goto free_dvobj; } - if (usb_reprobe_switch_usb_mode(padapter) == _TRUE) + if (usb_reprobe_switch_usb_mode(padapter) == true) goto free_if_prim; #ifdef CONFIG_CONCURRENT_MODE @@ -1233,19 +1233,19 @@ static void rtw_dev_remove(struct usb_interface *pusb_intf) RTW_INFO("+rtw_dev_remove\n"); - dvobj->processing_dev_remove = _TRUE; + dvobj->processing_dev_remove = true; /* TODO: use rtw_os_ndevs_deinit instead at the first stage of driver's dev deinit function */ rtw_os_ndevs_unregister(dvobj); - if (usb_drv.drv_registered == _TRUE) { - /* RTW_INFO("r871xu_dev_remove():padapter->bSurpriseRemoved == _TRUE\n"); */ + if (usb_drv.drv_registered == true) { + /* RTW_INFO("r871xu_dev_remove():padapter->bSurpriseRemoved == true\n"); */ rtw_set_surprise_removed(padapter); } /*else { - padapter->HalData->hw_init_completed = _FALSE; + padapter->HalData->hw_init_completed = false; }*/ @@ -1253,7 +1253,7 @@ static void rtw_dev_remove(struct usb_interface *pusb_intf) rtw_unregister_early_suspend(pwrctl); #endif - if (padapter->bFWReady == _TRUE) { + if (padapter->bFWReady == true) { rtw_pm_set_ips(padapter, IPS_NONE); rtw_pm_set_lps(padapter, PS_MODE_ACTIVE); @@ -1306,7 +1306,7 @@ static int __init rtw_drv_entry(void) RTW_INFO(DRV_NAME" BT-Coex version = %s\n", BTCOEXVERSION); #endif /* BTCOEXVERSION */ - usb_drv.drv_registered = _TRUE; + usb_drv.drv_registered = true; rtw_suspend_lock_init(); rtw_drv_proc_init(); rtw_ndev_notifier_register(); @@ -1314,7 +1314,7 @@ static int __init rtw_drv_entry(void) ret = usb_register(&usb_drv.usbdrv); if (ret != 0) { - usb_drv.drv_registered = _FALSE; + usb_drv.drv_registered = false; rtw_suspend_lock_uninit(); rtw_drv_proc_deinit(); rtw_ndev_notifier_unregister(); @@ -1330,7 +1330,7 @@ static void __exit rtw_drv_halt(void) { RTW_INFO("module exit start\n"); - usb_drv.drv_registered = _FALSE; + usb_drv.drv_registered = false; usb_deregister(&usb_drv.usbdrv); diff --git a/os_dep/usb_ops_linux.c b/os_dep/usb_ops_linux.c index 4457849..e44ac38 100644 --- a/os_dep/usb_ops_linux.c +++ b/os_dep/usb_ops_linux.c @@ -132,7 +132,7 @@ int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u16 inde } } - if (rtw_inc_and_chk_continual_io_error(pdvobjpriv) == _TRUE) { + if (rtw_inc_and_chk_continual_io_error(pdvobjpriv) == true) { rtw_set_surprise_removed(padapter); break; } @@ -476,7 +476,7 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs) goto check_completion; } else { rtw_set_surprise_removed(padapter); - RTW_INFO("bSurpriseRemoved=TRUE\n"); + RTW_INFO("bSurpriseRemoved=true\n"); goto check_completion; } @@ -510,7 +510,7 @@ u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem) unsigned long irqL; unsigned int pipe; int status; - u32 ret = _FAIL, bwritezero = _FALSE; + u32 ret = _FAIL, bwritezero = false; PURB purb = NULL; _adapter *padapter = (_adapter *)pintfhdl->padapter; struct dvobj_priv *pdvobj = adapter_to_dvobj(padapter); @@ -626,7 +626,7 @@ u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem) /* Commented by Albert 2009/10/13 * We add the URB_ZERO_PACKET flag to urb so that the host will send the zero packet automatically. */ /* - if(bwritezero == _TRUE) + if(bwritezero == true) { usb_bulkout_zero(pintfhdl, addr); } @@ -738,7 +738,7 @@ void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) RTW_INFO("###=> usb_read_port_complete => urb.status(%d)\n", purb->status); - if (rtw_inc_and_chk_continual_io_error(adapter_to_dvobj(padapter)) == _TRUE) + if (rtw_inc_and_chk_continual_io_error(adapter_to_dvobj(padapter)) == true) rtw_set_surprise_removed(padapter); switch (purb->status) { @@ -899,7 +899,7 @@ void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) RTW_INFO("###=> usb_read_port_complete => urb.status(%d)\n", purb->status); - if (rtw_inc_and_chk_continual_io_error(adapter_to_dvobj(padapter)) == _TRUE) + if (rtw_inc_and_chk_continual_io_error(adapter_to_dvobj(padapter)) == true) rtw_set_surprise_removed(padapter); switch (purb->status) { diff --git a/os_dep/xmit_linux.c b/os_dep/xmit_linux.c index 7354c48..4c15f31 100644 --- a/os_dep/xmit_linux.c +++ b/os_dep/xmit_linux.c @@ -62,11 +62,11 @@ sint rtw_endofpktfile(struct pkt_file *pfile) { if (pfile->pkt_len == 0) { - return _TRUE; + return true; } - return _FALSE; + return false; } void rtw_set_tx_chksum_offload(_pkt *pkt, struct pkt_attrib *pattrib) @@ -189,27 +189,27 @@ static inline bool rtw_os_need_wake_queue(_adapter *padapter, u16 qidx) if (padapter->registrypriv.wifi_spec) { if (pxmitpriv->hwxmits[qidx].accnt < WMM_XMIT_THRESHOLD) - return _TRUE; + return true; } else { #ifdef CONFIG_MCC_MODE if (MCC_EN(padapter)) { if (rtw_hal_check_mcc_status(padapter, MCC_STATUS_DOING_MCC) && MCC_STOP(padapter)) - return _FALSE; + return false; } #endif /* CONFIG_MCC_MODE */ - return _TRUE; + return true; } - return _FALSE; + return false; #else #ifdef CONFIG_MCC_MODE if (MCC_EN(padapter)) { if (rtw_hal_check_mcc_status(padapter, MCC_STATUS_DOING_MCC) && MCC_STOP(padapter)) - return _FALSE; + return false; } #endif /* CONFIG_MCC_MODE */ - return _TRUE; + return true; #endif } @@ -220,16 +220,16 @@ static inline bool rtw_os_need_stop_queue(_adapter *padapter, u16 qidx) if (padapter->registrypriv.wifi_spec) { /* No free space for Tx, tx_worker is too slow */ if (pxmitpriv->hwxmits[qidx].accnt > WMM_XMIT_THRESHOLD) - return _TRUE; + return true; } else { if (pxmitpriv->free_xmitframe_cnt <= 4) - return _TRUE; + return true; } #else if (pxmitpriv->free_xmitframe_cnt <= 4) - return _TRUE; + return true; #endif - return _FALSE; + return false; } void rtw_os_pkt_complete(_adapter *padapter, _pkt *pkt) @@ -282,7 +282,7 @@ void rtw_os_xmit_schedule(_adapter *padapter) static bool rtw_check_xmit_resource(_adapter *padapter, _pkt *pkt) { - bool busy = _FALSE; + bool busy = false; struct xmit_priv *pxmitpriv = &padapter->xmitpriv; #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)) u16 qidx; @@ -292,14 +292,14 @@ static bool rtw_check_xmit_resource(_adapter *padapter, _pkt *pkt) if (DBG_DUMP_OS_QUEUE_CTL) RTW_INFO(FUNC_ADPT_FMT": netif_stop_subqueue[%d]\n", FUNC_ADPT_ARG(padapter), qidx); netif_stop_subqueue(padapter->pnetdev, qidx); - busy = _TRUE; + busy = true; } #else if (rtw_os_need_stop_queue(padapter, 0)) { if (DBG_DUMP_OS_QUEUE_CTL) RTW_INFO(FUNC_ADPT_FMT": netif_stop_queue\n", FUNC_ADPT_ARG(padapter)); rtw_netif_stop_queue(padapter->pnetdev); - busy = _TRUE; + busy = true; } #endif return busy; @@ -355,7 +355,7 @@ int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb) 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) { int stainfo_offset; psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); plist = get_next(plist); @@ -374,9 +374,9 @@ int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb) } /* avoid come from STA1 and send back STA1 */ - if (_rtw_memcmp(psta->hwaddr, &skb->data[6], 6) == _TRUE - || _rtw_memcmp(psta->hwaddr, null_addr, 6) == _TRUE - || _rtw_memcmp(psta->hwaddr, bc_addr, 6) == _TRUE + if (_rtw_memcmp(psta->hwaddr, &skb->data[6], 6) == true + || _rtw_memcmp(psta->hwaddr, null_addr, 6) == true + || _rtw_memcmp(psta->hwaddr, bc_addr, 6) == true ) { DBG_COUNTER(padapter->tx_logs.os_tx_m2u_ignore_self); continue; @@ -400,12 +400,12 @@ int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb) RTW_INFO("%s-%d: rtw_skb_copy() failed!\n", __func__, __LINE__); pxmitpriv->tx_drop++; /* rtw_skb_free(skb); */ - return _FALSE; /* Caller shall tx this multicast frame via normal way. */ + return false; /* Caller shall tx this multicast frame via normal way. */ } } rtw_skb_free(skb); - return _TRUE; + return true; } #endif /* CONFIG_TX_MCAST2UNI */ @@ -429,7 +429,7 @@ int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev) } DBG_COUNTER(padapter->tx_logs.os_tx); - if (rtw_if_up(padapter) == _FALSE) { + if (rtw_if_up(padapter) == false) { DBG_COUNTER(padapter->tx_logs.os_tx_err_up); #ifdef DBG_TX_DROP_FRAME RTW_INFO("DBG_TX_DROP_FRAME %s if_up fail\n", __func__); @@ -441,7 +441,7 @@ int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev) #ifdef CONFIG_TX_MCAST2UNI if (!rtw_mc2u_disable - && check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE + && check_fwstate(pmlmepriv, WIFI_AP_STATE) == true && (IP_MCAST_MAC(pkt->data) || ICMPV6_MCAST_MAC(pkt->data) #ifdef CONFIG_TX_BCAST2UNI @@ -452,7 +452,7 @@ int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev) ) { if (pxmitpriv->free_xmitframe_cnt > (NR_XMITFRAME / 4)) { res = rtw_mlcst2unicst(padapter, pkt); - if (res == _TRUE) + if (res == true) goto exit; } else { /* RTW_INFO("Stop M2U(%d, %d)! ", pxmitpriv->free_xmitframe_cnt, pxmitpriv->free_xmitbuf_cnt); */ @@ -489,7 +489,7 @@ int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev) int ret = 0; if (pkt) { - if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) == _TRUE) { + if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) == true) { #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)) rtw_monitor_xmit_entry((struct sk_buff *)pkt, pnetdev); #endif