mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-07 05:53:06 +00:00
rtl8188eu: Change _FALSE and _TRUE to false and true
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
3d0ee1321a
commit
9cef34aa09
69 changed files with 2493 additions and 3604 deletions
174
core/rtw_recv.c
174
core/rtw_recv.c
|
@ -200,7 +200,7 @@ union recv_frame *_rtw_alloc_recvframe (_queue *pfree_recv_queue)
|
|||
struct recv_priv *precvpriv;
|
||||
_func_enter_;
|
||||
|
||||
if (_rtw_queue_empty(pfree_recv_queue) == _TRUE)
|
||||
if (_rtw_queue_empty(pfree_recv_queue) == true)
|
||||
{
|
||||
precvframe = NULL;
|
||||
}
|
||||
|
@ -377,7 +377,7 @@ _func_enter_;
|
|||
phead = get_list_head(pframequeue);
|
||||
plist = get_next(phead);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE)
|
||||
while (rtw_end_of_queue_search(phead, plist) == false)
|
||||
{
|
||||
precvframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||
|
||||
|
@ -455,7 +455,7 @@ struct recv_buf *rtw_dequeue_recvbuf (_queue *queue)
|
|||
_enter_critical_ex(&queue->lock, &irqL);
|
||||
#endif/*#ifdef CONFIG_SDIO_HCI*/
|
||||
|
||||
if (_rtw_queue_empty(queue) == _TRUE)
|
||||
if (_rtw_queue_empty(queue) == true)
|
||||
{
|
||||
precvbuf = NULL;
|
||||
}
|
||||
|
@ -487,7 +487,7 @@ sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe){
|
|||
sint i,res=_SUCCESS;
|
||||
u32 datalen;
|
||||
u8 miccode[8];
|
||||
u8 bmic_err=_FALSE,brpt_micerror = _TRUE;
|
||||
u8 bmic_err=false,brpt_micerror = true;
|
||||
u8 *pframe, *payload,*pframemic;
|
||||
u8 *mickey;
|
||||
//u8 *iv,rxdata_key_idx=0;
|
||||
|
@ -521,7 +521,7 @@ _func_enter_;
|
|||
//DBG_88E("\n recvframe_chkmic: bcmc key psecuritypriv->dot118021XGrpKeyid(%d),pmlmeinfo->key_index(%d) ,recv key_id(%d)\n",
|
||||
// psecuritypriv->dot118021XGrpKeyid,pmlmeinfo->key_index,rxdata_key_idx);
|
||||
|
||||
if (psecuritypriv->binstallGrpkey==_FALSE)
|
||||
if (psecuritypriv->binstallGrpkey==false)
|
||||
{
|
||||
res=_FAIL;
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("\n recvframe_chkmic:didn't install group key!!!!!!!!!!\n"));
|
||||
|
@ -546,17 +546,17 @@ _func_enter_;
|
|||
|
||||
pframemic=payload+datalen;
|
||||
|
||||
bmic_err=_FALSE;
|
||||
bmic_err=false;
|
||||
|
||||
for (i=0;i<8;i++){
|
||||
if (miccode[i] != *(pframemic+i)){
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("recvframe_chkmic:miccode[%d](%02x) != *(pframemic+%d)(%02x) ",i,miccode[i],i,*(pframemic+i)));
|
||||
bmic_err=_TRUE;
|
||||
bmic_err=true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (bmic_err==_TRUE){
|
||||
if (bmic_err==true){
|
||||
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("\n *(pframemic-8)-*(pframemic-1)=0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
|
||||
*(pframemic-8),*(pframemic-7),*(pframemic-6),*(pframemic-5),*(pframemic-4),*(pframemic-3),*(pframemic-2),*(pframemic-1)));
|
||||
|
@ -583,10 +583,10 @@ _func_enter_;
|
|||
|
||||
// double check key_index for some timing issue ,
|
||||
// cannot compare with psecuritypriv->dot118021XGrpKeyid also cause timing issue
|
||||
if ((IS_MCAST(prxattrib->ra)==_TRUE) && (prxattrib->key_index != pmlmeinfo->key_index ))
|
||||
brpt_micerror = _FALSE;
|
||||
if ((IS_MCAST(prxattrib->ra)==true) && (prxattrib->key_index != pmlmeinfo->key_index ))
|
||||
brpt_micerror = false;
|
||||
|
||||
if ((prxattrib->bdecrypted ==_TRUE)&& (brpt_micerror == _TRUE))
|
||||
if ((prxattrib->bdecrypted ==true)&& (brpt_micerror == true))
|
||||
{
|
||||
rtw_handle_tkip_mic_err(adapter,(u8)IS_MCAST(prxattrib->ra));
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,(" mic error :prxattrib->bdecrypted=%d ",prxattrib->bdecrypted));
|
||||
|
@ -603,9 +603,9 @@ _func_enter_;
|
|||
}
|
||||
else{
|
||||
//mic checked ok
|
||||
if ((psecuritypriv->bcheck_grpkey ==_FALSE)&&(IS_MCAST(prxattrib->ra)==_TRUE)){
|
||||
psecuritypriv->bcheck_grpkey =_TRUE;
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("psecuritypriv->bcheck_grpkey =_TRUE"));
|
||||
if ((psecuritypriv->bcheck_grpkey ==false)&&(IS_MCAST(prxattrib->ra)==true)){
|
||||
psecuritypriv->bcheck_grpkey =true;
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("psecuritypriv->bcheck_grpkey =true"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -663,13 +663,13 @@ _func_enter_;
|
|||
}
|
||||
}
|
||||
|
||||
if ((prxattrib->encrypt>0) && ((prxattrib->bdecrypted==0) ||(psecuritypriv->sw_decrypt==_TRUE)))
|
||||
if ((prxattrib->encrypt>0) && ((prxattrib->bdecrypted==0) ||(psecuritypriv->sw_decrypt==true)))
|
||||
{
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (!IS_MCAST(prxattrib->ra))//bc/mc packets use sw decryption for concurrent mode
|
||||
#endif
|
||||
psecuritypriv->hw_decrypted=_FALSE;
|
||||
psecuritypriv->hw_decrypted=false;
|
||||
|
||||
#ifdef DBG_RX_DECRYPTOR
|
||||
DBG_88E("prxstat->bdecrypted:%d, prxattrib->encrypt:%d, Setting psecuritypriv->hw_decrypted = %d\n"
|
||||
|
@ -701,7 +701,7 @@ _func_enter_;
|
|||
&& (psecuritypriv->busetkipkey==1 || prxattrib->encrypt !=_TKIP_ )
|
||||
)
|
||||
{
|
||||
psecuritypriv->hw_decrypted=_TRUE;
|
||||
psecuritypriv->hw_decrypted=true;
|
||||
#ifdef DBG_RX_DECRYPTOR
|
||||
DBG_88E("prxstat->bdecrypted:%d, prxattrib->encrypt:%d, Setting psecuritypriv->hw_decrypted = %d\n"
|
||||
, prxattrib->bdecrypted ,prxattrib->encrypt, psecuritypriv->hw_decrypted);
|
||||
|
@ -1129,8 +1129,8 @@ sint sta2sta_data_frame(
|
|||
|
||||
_func_enter_;
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE))
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true))
|
||||
{
|
||||
|
||||
// filter packets that SA is myself or multicast or broadcast
|
||||
|
@ -1155,7 +1155,7 @@ _func_enter_;
|
|||
sta_addr = pattrib->src;
|
||||
|
||||
}
|
||||
else if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)
|
||||
else if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)
|
||||
{
|
||||
#ifdef CONFIG_TDLS
|
||||
|
||||
|
@ -1253,7 +1253,7 @@ _func_enter_;
|
|||
}
|
||||
|
||||
}
|
||||
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||
{
|
||||
if (bmcast)
|
||||
{
|
||||
|
@ -1275,7 +1275,7 @@ _func_enter_;
|
|||
}
|
||||
|
||||
}
|
||||
else if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE)
|
||||
else if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true)
|
||||
{
|
||||
_rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN);
|
||||
_rtw_memcpy(pattrib->src, GetAddr2Ptr(ptr), ETH_ALEN);
|
||||
|
@ -1307,7 +1307,7 @@ _func_enter_;
|
|||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (adapter->registrypriv.mp_mode == 1)
|
||||
{
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true)
|
||||
adapter->mppriv.rx_pktloss++;
|
||||
}
|
||||
#endif
|
||||
|
@ -1341,9 +1341,9 @@ sint ap2sta_data_frame(
|
|||
|
||||
_func_enter_;
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)
|
||||
&& (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE
|
||||
|| check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == _TRUE )
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)
|
||||
&& (check_fwstate(pmlmepriv, _FW_LINKED) == true
|
||||
|| check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true )
|
||||
)
|
||||
{
|
||||
|
||||
|
@ -1420,8 +1420,8 @@ _func_enter_;
|
|||
}
|
||||
|
||||
}
|
||||
else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE) &&
|
||||
(check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) )
|
||||
else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) &&
|
||||
(check_fwstate(pmlmepriv, _FW_LINKED) == true) )
|
||||
{
|
||||
_rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN);
|
||||
_rtw_memcpy(pattrib->src, GetAddr2Ptr(ptr), ETH_ALEN);
|
||||
|
@ -1445,7 +1445,7 @@ _func_enter_;
|
|||
|
||||
|
||||
}
|
||||
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||
{
|
||||
/* Special case */
|
||||
ret = RTW_RX_HANDLED;
|
||||
|
@ -1496,7 +1496,7 @@ sint sta2ap_data_frame(
|
|||
|
||||
_func_enter_;
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||
{
|
||||
//For AP mode, RA=BSSID, TX=STA(SRC_ADDR), A3=DST_ADDR
|
||||
if (!_rtw_memcmp(pattrib->bssid, mybssid, ETH_ALEN))
|
||||
|
@ -1632,7 +1632,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
|||
xmitframe_phead = get_list_head(&psta->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
if ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == _FALSE)
|
||||
if ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == false)
|
||||
{
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
|
@ -1652,7 +1652,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
|||
//DBG_88E("handling ps-poll, q_len=%d, tim=%x\n", psta->sleepq_len, pstapriv->tim_bitmap);
|
||||
|
||||
_exit_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||
if (rtw_hal_xmit(padapter, pxmitframe) == _TRUE)
|
||||
if (rtw_hal_xmit(padapter, pxmitframe) == true)
|
||||
{
|
||||
rtw_os_xmit_complete(padapter, pxmitframe);
|
||||
}
|
||||
|
@ -1666,7 +1666,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
|||
|
||||
//upate BCN for TIM IE
|
||||
//update_BCNTIM(padapter);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1692,7 +1692,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
|||
|
||||
//upate BCN for TIM IE
|
||||
//update_BCNTIM(padapter);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1733,7 +1733,7 @@ sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_frame)
|
|||
else if (GetFrameSubType(precv_frame->u.hdr.rx_data) == WIFI_PROBEREQ)
|
||||
psta->sta_stats.rx_probereq_pkts++;
|
||||
else if (GetFrameSubType(precv_frame->u.hdr.rx_data) == WIFI_PROBERSP) {
|
||||
if (_rtw_memcmp(padapter->eeprompriv.mac_addr, GetAddr1Ptr(precv_frame->u.hdr.rx_data), ETH_ALEN) == _TRUE)
|
||||
if (_rtw_memcmp(padapter->eeprompriv.mac_addr, GetAddr1Ptr(precv_frame->u.hdr.rx_data), ETH_ALEN) == true)
|
||||
psta->sta_stats.rx_probersp_pkts++;
|
||||
else if (is_broadcast_mac_addr(GetAddr1Ptr(precv_frame->u.hdr.rx_data))
|
||||
|| is_multicast_mac_addr(GetAddr1Ptr(precv_frame->u.hdr.rx_data)))
|
||||
|
@ -1745,7 +1745,7 @@ sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_frame)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_INTEL_PROXIM
|
||||
if (padapter->proximity.proxim_on==_TRUE)
|
||||
if (padapter->proximity.proxim_on==true)
|
||||
{
|
||||
struct rx_pkt_attrib * pattrib=&precv_frame->u.hdr.attrib;
|
||||
struct recv_stat* prxstat=( struct recv_stat * ) precv_frame->u.hdr.rx_head ;
|
||||
|
@ -1904,7 +1904,7 @@ _func_enter_;
|
|||
|
||||
if (pattrib->priority!=0 && pattrib->priority!=3)
|
||||
{
|
||||
adapter->recvpriv.bIsAnyNonBEPkts = _TRUE;
|
||||
adapter->recvpriv.bIsAnyNonBEPkts = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2194,16 +2194,16 @@ _func_enter_;
|
|||
/* convert hdr + possible LLC headers into Ethernet header */
|
||||
//eth_type = (psnap_type[0] << 8) | psnap_type[1];
|
||||
if ((_rtw_memcmp(psnap, rtw_rfc1042_header, SNAP_SIZE) &&
|
||||
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_IPX, 2) == _FALSE) &&
|
||||
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_AARP, 2)==_FALSE) )||
|
||||
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_IPX, 2) == false) &&
|
||||
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_AARP, 2)==false) )||
|
||||
//eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) ||
|
||||
_rtw_memcmp(psnap, rtw_bridge_tunnel_header, SNAP_SIZE)){
|
||||
/* remove RFC1042 or Bridge-Tunnel encapsulation and replace EtherType */
|
||||
bsnaphdr = _TRUE;
|
||||
bsnaphdr = true;
|
||||
}
|
||||
else {
|
||||
/* Leave Ethernet header part of hdr and full payload */
|
||||
bsnaphdr = _FALSE;
|
||||
bsnaphdr = false;
|
||||
}
|
||||
|
||||
rmv_len = pattrib->hdrlen + pattrib->iv_len +(bsnaphdr?SNAP_SIZE:0);
|
||||
|
@ -2215,7 +2215,7 @@ _func_enter_;
|
|||
eth_type= ntohs((unsigned short )eth_type); //pattrib->ether_type
|
||||
pattrib->eth_type = eth_type;
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE))
|
||||
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true))
|
||||
{
|
||||
ptr += rmv_len ;
|
||||
*ptr = 0x87;
|
||||
|
@ -2269,12 +2269,12 @@ _func_enter_;
|
|||
if (psnap->dsap==0xaa && psnap->ssap==0xaa && psnap->ctrl==0x03)
|
||||
{
|
||||
if (_rtw_memcmp(psnap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN))
|
||||
bsnaphdr=_TRUE;//wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_RFC1042;
|
||||
bsnaphdr=true;//wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_RFC1042;
|
||||
else if (_rtw_memcmp(psnap->oui, SNAP_HDR_APPLETALK_DDP, WLAN_IEEE_OUI_LEN) &&
|
||||
_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_DDP, 2) )
|
||||
bsnaphdr=_TRUE; //wlan_pkt_format = WLAN_PKT_FORMAT_APPLETALK;
|
||||
bsnaphdr=true; //wlan_pkt_format = WLAN_PKT_FORMAT_APPLETALK;
|
||||
else if (_rtw_memcmp( psnap->oui, oui_8021h, WLAN_IEEE_OUI_LEN))
|
||||
bsnaphdr=_TRUE; //wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_TUNNEL;
|
||||
bsnaphdr=true; //wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_TUNNEL;
|
||||
else {
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("drop pkt due to invalid frame format!\n"));
|
||||
ret= _FAIL;
|
||||
|
@ -2282,12 +2282,12 @@ _func_enter_;
|
|||
}
|
||||
|
||||
} else
|
||||
bsnaphdr=_FALSE;//wlan_pkt_format = WLAN_PKT_FORMAT_OTHERS;
|
||||
bsnaphdr=false;//wlan_pkt_format = WLAN_PKT_FORMAT_OTHERS;
|
||||
|
||||
rmv_len = pattrib->hdrlen + pattrib->iv_len +(bsnaphdr?SNAP_SIZE:0);
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_info_,("===pattrib->hdrlen: %x, pattrib->iv_len:%x ===\n", pattrib->hdrlen, pattrib->iv_len));
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true)
|
||||
{
|
||||
ptr += rmv_len ;
|
||||
*ptr = 0x87;
|
||||
|
@ -2482,7 +2482,7 @@ _func_enter_;
|
|||
|
||||
data=get_recvframe_data(prframe);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE)
|
||||
while (rtw_end_of_queue_search(phead, plist) == false)
|
||||
{
|
||||
pnextrframe = LIST_CONTAINOR(plist, union recv_frame , u);
|
||||
pnfhdr=&pnextrframe->u.hdr;
|
||||
|
@ -2584,7 +2584,7 @@ _func_enter_;
|
|||
if (fragnum==0)
|
||||
{
|
||||
//the first fragment
|
||||
if (_rtw_queue_empty(pdefrag_q) == _FALSE)
|
||||
if (_rtw_queue_empty(pdefrag_q) == false)
|
||||
{
|
||||
//free current defrag_q
|
||||
rtw_free_recvframe_queue(pdefrag_q, pfree_recv_queue);
|
||||
|
@ -2816,7 +2816,7 @@ int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe)
|
|||
#endif // (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35))
|
||||
|
||||
|
||||
if ( br_port && (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == _TRUE) )
|
||||
if ( br_port && (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true) )
|
||||
{
|
||||
int nat25_handle_frame(_adapter *priv, struct sk_buff *skb);
|
||||
if (nat25_handle_frame(padapter, sub_skb) == -1) {
|
||||
|
@ -2971,16 +2971,16 @@ exit:
|
|||
{
|
||||
if ( _rtw_memcmp(psnap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN))
|
||||
{
|
||||
bsnaphdr=_TRUE;//wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_RFC1042;
|
||||
bsnaphdr=true;//wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_RFC1042;
|
||||
}
|
||||
else if (_rtw_memcmp(psnap->oui, SNAP_HDR_APPLETALK_DDP, WLAN_IEEE_OUI_LEN) &&
|
||||
_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_DDP, 2) )
|
||||
{
|
||||
bsnaphdr=_TRUE; //wlan_pkt_format = WLAN_PKT_FORMAT_APPLETALK;
|
||||
bsnaphdr=true; //wlan_pkt_format = WLAN_PKT_FORMAT_APPLETALK;
|
||||
}
|
||||
else if (_rtw_memcmp( psnap->oui, oui_8021h, WLAN_IEEE_OUI_LEN))
|
||||
{
|
||||
bsnaphdr=_TRUE; //wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_TUNNEL;
|
||||
bsnaphdr=true; //wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_TUNNEL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2998,7 +2998,7 @@ exit:
|
|||
}
|
||||
else
|
||||
{
|
||||
bsnaphdr=_FALSE;//wlan_pkt_format = WLAN_PKT_FORMAT_OTHERS;
|
||||
bsnaphdr=false;//wlan_pkt_format = WLAN_PKT_FORMAT_OTHERS;
|
||||
}
|
||||
|
||||
ptr += (bsnaphdr?SNAP_SIZE:0);
|
||||
|
@ -3104,7 +3104,7 @@ exit:
|
|||
}
|
||||
|
||||
|
||||
if ((padapter->bDriverStopped ==_FALSE)&&( padapter->bSurpriseRemoved==_FALSE) )
|
||||
if ((padapter->bDriverStopped ==false)&&( padapter->bSurpriseRemoved==false) )
|
||||
{
|
||||
rtw_recv_indicatepkt(padapter, pnrframe);//indicate this recv_frame
|
||||
}
|
||||
|
@ -3159,7 +3159,7 @@ int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_num)
|
|||
#endif
|
||||
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -3194,7 +3194,7 @@ int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_num)
|
|||
|
||||
//DbgPrint("exit->check_indicate_seq(): IndicateSeq: %d, NewSeq: %d\n", precvpriv->indicate_seq, seq_num);
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union recv_frame *prframe);
|
||||
|
@ -3215,7 +3215,7 @@ int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union rec
|
|||
phead = get_list_head(ppending_recvframe_queue);
|
||||
plist = get_next(phead);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE)
|
||||
while (rtw_end_of_queue_search(phead, plist) == false)
|
||||
{
|
||||
pnextrframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||
pnextattrib = &pnextrframe->u.hdr.attrib;
|
||||
|
@ -3231,7 +3231,7 @@ int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union rec
|
|||
|
||||
//_exit_critical_ex(&ppending_recvframe_queue->lock, &irql);
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3255,7 +3255,7 @@ int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union rec
|
|||
|
||||
|
||||
//RT_TRACE(COMP_RX_REORDER, DBG_TRACE, ("InsertRxReorderList(): Pkt insert into buffer!! IndicateSeq: %d, NewSeq: %d\n", pTS->RxIndicateSeq, SeqNum));
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
@ -3268,7 +3268,7 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
|||
union recv_frame *prframe;
|
||||
struct rx_pkt_attrib *pattrib;
|
||||
//u8 index = 0;
|
||||
int bPktInBuf = _FALSE;
|
||||
int bPktInBuf = false;
|
||||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||
_queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
||||
|
||||
|
@ -3281,10 +3281,10 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
|||
plist = get_next(phead);
|
||||
|
||||
// Handling some condition for forced indicate case.
|
||||
if (bforced==_TRUE)
|
||||
if (bforced==true)
|
||||
{
|
||||
if (rtw_is_list_empty(phead))
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
prframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||
pattrib = &prframe->u.hdr.attrib;
|
||||
|
@ -3326,8 +3326,8 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
|||
//indicate this recv_frame
|
||||
if (!pattrib->amsdu)
|
||||
{
|
||||
if ((padapter->bDriverStopped == _FALSE) &&
|
||||
(padapter->bSurpriseRemoved == _FALSE))
|
||||
if ((padapter->bDriverStopped == false) &&
|
||||
(padapter->bSurpriseRemoved == false))
|
||||
{
|
||||
|
||||
rtw_recv_indicatepkt(padapter, prframe);//indicate this recv_frame
|
||||
|
@ -3348,12 +3348,12 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
|||
|
||||
|
||||
//Update local variables.
|
||||
bPktInBuf = _FALSE;
|
||||
bPktInBuf = false;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
bPktInBuf = _TRUE;
|
||||
bPktInBuf = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -3381,7 +3381,7 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
|||
*/
|
||||
//_exit_critical_ex(&ppending_recvframe_queue->lock, &irql);
|
||||
|
||||
//return _TRUE;
|
||||
//return true;
|
||||
return bPktInBuf;
|
||||
|
||||
}
|
||||
|
@ -3403,8 +3403,8 @@ int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prframe)
|
|||
if ((pattrib->qos!=1) /*|| pattrib->priority!=0 || IS_MCAST(pattrib->ra)*/
|
||||
|| (pattrib->eth_type==0x0806) || (pattrib->ack_policy!=0))
|
||||
{
|
||||
if ((padapter->bDriverStopped == _FALSE) &&
|
||||
(padapter->bSurpriseRemoved == _FALSE))
|
||||
if ((padapter->bDriverStopped == false) &&
|
||||
(padapter->bSurpriseRemoved == false))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_, ("@@@@ recv_indicatepkt_reorder -recv_func recv_indicatepkt\n" ));
|
||||
|
||||
|
@ -3421,7 +3421,7 @@ int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prframe)
|
|||
|
||||
}
|
||||
|
||||
if (preorder_ctrl->enable == _FALSE)
|
||||
if (preorder_ctrl->enable == false)
|
||||
{
|
||||
//indicate this recv_frame
|
||||
preorder_ctrl->indicate_seq = pattrib->seq_num;
|
||||
|
@ -3450,7 +3450,7 @@ int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prframe)
|
|||
}
|
||||
else if (pattrib->amsdu==1) //temp filter -> means didn't support A-MSDUs in a A-MPDU
|
||||
{
|
||||
if (preorder_ctrl->enable == _FALSE)
|
||||
if (preorder_ctrl->enable == false)
|
||||
{
|
||||
preorder_ctrl->indicate_seq = pattrib->seq_num;
|
||||
#ifdef DBG_RX_SEQ
|
||||
|
@ -3530,8 +3530,8 @@ int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prframe)
|
|||
// 2. All packets with SeqNum larger than or equal to WinStart => Buffer it.
|
||||
//
|
||||
|
||||
//recv_indicatepkts_in_order(padapter, preorder_ctrl, _TRUE);
|
||||
if (recv_indicatepkts_in_order(padapter, preorder_ctrl, _FALSE)==_TRUE)
|
||||
//recv_indicatepkts_in_order(padapter, preorder_ctrl, true);
|
||||
if (recv_indicatepkts_in_order(padapter, preorder_ctrl, false)==true)
|
||||
{
|
||||
_set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME);
|
||||
_exit_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
|
@ -3572,7 +3572,7 @@ void rtw_reordering_ctrl_timeout_handler(void *pcontext)
|
|||
|
||||
_enter_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
|
||||
if (recv_indicatepkts_in_order(padapter, preorder_ctrl, _TRUE)==_TRUE)
|
||||
if (recv_indicatepkts_in_order(padapter, preorder_ctrl, true)==true)
|
||||
{
|
||||
_set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME);
|
||||
}
|
||||
|
@ -3597,12 +3597,12 @@ int process_recv_indicatepkts(_adapter *padapter, union recv_frame *prframe)
|
|||
struct ht_priv *phtpriv = &pmlmepriv->htpriv;
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
if ( (phtpriv->ht_option==_TRUE) ||
|
||||
if ( (phtpriv->ht_option==true) ||
|
||||
((psta->tdls_sta_state & TDLS_LINKED_STATE) &&
|
||||
(psta->htpriv.ht_option==_TRUE) &&
|
||||
(psta->htpriv.ampdu_enable==_TRUE))) //B/G/N Mode
|
||||
(psta->htpriv.ht_option==true) &&
|
||||
(psta->htpriv.ampdu_enable==true))) //B/G/N Mode
|
||||
#else
|
||||
if (phtpriv->ht_option==_TRUE) //B/G/N Mode
|
||||
if (phtpriv->ht_option==true) //B/G/N Mode
|
||||
#endif //CONFIG_TDLS
|
||||
{
|
||||
//prframe->u.hdr.preorder_ctrl = &precvpriv->recvreorder_ctrl[pattrib->priority];
|
||||
|
@ -3613,8 +3613,8 @@ int process_recv_indicatepkts(_adapter *padapter, union recv_frame *prframe)
|
|||
DBG_88E("DBG_RX_DROP_FRAME %s recv_indicatepkt_reorder error!\n", __func__);
|
||||
#endif
|
||||
|
||||
if ((padapter->bDriverStopped == _FALSE) &&
|
||||
(padapter->bSurpriseRemoved == _FALSE))
|
||||
if ((padapter->bDriverStopped == false) &&
|
||||
(padapter->bSurpriseRemoved == false))
|
||||
{
|
||||
retval = _FAIL;
|
||||
return retval;
|
||||
|
@ -3634,7 +3634,7 @@ int process_recv_indicatepkts(_adapter *padapter, union recv_frame *prframe)
|
|||
return retval;
|
||||
}
|
||||
|
||||
if ((padapter->bDriverStopped ==_FALSE)&&( padapter->bSurpriseRemoved==_FALSE))
|
||||
if ((padapter->bDriverStopped ==false)&&( padapter->bSurpriseRemoved==false))
|
||||
{
|
||||
//indicate this recv_frame
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_, ("@@@@ process_recv_indicatepkts- recv_func recv_indicatepkt\n" ));
|
||||
|
@ -3671,14 +3671,14 @@ int recv_func_prehandle(_adapter *padapter, union recv_frame *rframe)
|
|||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
{
|
||||
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE))//&&(padapter->mppriv.check_mp_pkt == 0))
|
||||
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true))//&&(padapter->mppriv.check_mp_pkt == 0))
|
||||
{
|
||||
if (pattrib->crc_err == 1)
|
||||
padapter->mppriv.rx_crcerrpktcount++;
|
||||
else
|
||||
padapter->mppriv.rx_pktcount++;
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_LPBK_STATE) == _FALSE) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_LPBK_STATE) == false) {
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_alert_, ("MP - Not in loopback mode , drop pkt\n"));
|
||||
ret = _FAIL;
|
||||
rtw_free_recvframe(rframe, pfree_recv_queue);//free this recv_frame
|
||||
|
@ -3798,7 +3798,7 @@ int recv_func_posthandle(_adapter *padapter, union recv_frame *prframe)
|
|||
goto _recv_data_drop;
|
||||
}
|
||||
|
||||
if ((padapter->bDriverStopped == _FALSE) && (padapter->bSurpriseRemoved == _FALSE))
|
||||
if ((padapter->bDriverStopped == false) && (padapter->bSurpriseRemoved == false))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_alert_, ("@@@@ recv_func: recv_func rtw_recv_indicatepkt\n" ));
|
||||
//indicate this recv_frame
|
||||
|
@ -3883,7 +3883,7 @@ int recv_func(_adapter *padapter, union recv_frame *rframe)
|
|||
/* check if need to enqueue into uc_swdec_pending_queue*/
|
||||
if (check_fwstate(mlmepriv, WIFI_STATION_STATE) &&
|
||||
!IS_MCAST(prxattrib->ra) && prxattrib->encrypt>0 &&
|
||||
(prxattrib->bdecrypted == 0 ||psecuritypriv->sw_decrypt == _TRUE) &&
|
||||
(prxattrib->bdecrypted == 0 ||psecuritypriv->sw_decrypt == true) &&
|
||||
!is_wep_enc(psecuritypriv->dot11PrivacyAlgrthm) &&
|
||||
!psecuritypriv->busetkipkey) {
|
||||
rtw_enqueue_recvframe(rframe, &padapter->recvpriv.uc_swdec_pending_queue);
|
||||
|
@ -3974,7 +3974,7 @@ void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS){
|
|||
}
|
||||
|
||||
//update value of signal_strength, rssi, signal_qual
|
||||
if (check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY) == _FALSE) {
|
||||
if (check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY) == false) {
|
||||
tmp_s = (avg_signal_strength+(_alpha-1)*recvpriv->signal_strength);
|
||||
if (tmp_s %_alpha)
|
||||
tmp_s = tmp_s/_alpha + 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue