rtl8188eu: Replace synonyms for true and false with the real thing

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2018-12-17 11:08:55 -06:00
parent b89e0320f5
commit 999a777041
91 changed files with 4692 additions and 4724 deletions

View file

@ -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));