mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-09 14:53:05 +00:00
rtl8188eu: Replace _FALSE and _TRUE
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
17d1637977
commit
06334102cd
68 changed files with 2553 additions and 2572 deletions
|
@ -88,11 +88,11 @@ uint rtw_is_cckrates_included(u8 *rate)
|
|||
{
|
||||
if ( (((rate[i]) & 0x7f) == 2) || (((rate[i]) & 0x7f) == 4) ||
|
||||
(((rate[i]) & 0x7f) == 11) || (((rate[i]) & 0x7f) == 22) )
|
||||
return _TRUE;
|
||||
return true;
|
||||
i++;
|
||||
}
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
uint rtw_is_cckratesonly_included(u8 *rate)
|
||||
|
@ -105,12 +105,12 @@ uint rtw_is_cckratesonly_included(u8 *rate)
|
|||
if ( (((rate[i]) & 0x7f) != 2) && (((rate[i]) & 0x7f) != 4) &&
|
||||
(((rate[i]) & 0x7f) != 11) && (((rate[i]) & 0x7f) != 22) )
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
@ -118,16 +118,16 @@ int rtw_check_network_type(unsigned char *rate, int ratelen, int channel)
|
|||
{
|
||||
if (channel > 14)
|
||||
{
|
||||
if ((rtw_is_cckrates_included(rate)) == _TRUE)
|
||||
if ((rtw_is_cckrates_included(rate)) == true)
|
||||
return WIRELESS_INVALID;
|
||||
else
|
||||
return WIRELESS_11A;
|
||||
}
|
||||
else // could be pure B, pure G, or B/G
|
||||
{
|
||||
if ((rtw_is_cckratesonly_included(rate)) == _TRUE)
|
||||
if ((rtw_is_cckratesonly_included(rate)) == true)
|
||||
return WIRELESS_11B;
|
||||
else if((rtw_is_cckrates_included(rate)) == _TRUE)
|
||||
else if((rtw_is_cckrates_included(rate)) == true)
|
||||
return WIRELESS_11BG;
|
||||
else
|
||||
return WIRELESS_11G;
|
||||
|
@ -285,7 +285,7 @@ u8 *rtw_get_ie_ex(u8 *in_ie, uint in_len, u8 eid, u8 *oui, u8 oui_len, u8 *ie, u
|
|||
while(cnt<in_len)
|
||||
{
|
||||
if(eid == in_ie[cnt]
|
||||
&& ( !oui || _rtw_memcmp(&in_ie[cnt+2], oui, oui_len) == _TRUE))
|
||||
&& ( !oui || _rtw_memcmp(&in_ie[cnt+2], oui, oui_len) == true))
|
||||
{
|
||||
target_ie = &in_ie[cnt];
|
||||
|
||||
|
@ -481,7 +481,7 @@ _func_enter_;
|
|||
#ifdef CONFIG_80211N_HT
|
||||
//HT Cap.
|
||||
if(((pregistrypriv->wireless_mode&WIRELESS_11_5N)||(pregistrypriv->wireless_mode&WIRELESS_11_24N))
|
||||
&& (pregistrypriv->ht_enable==_TRUE))
|
||||
&& (pregistrypriv->ht_enable==true))
|
||||
{
|
||||
//todo:
|
||||
}
|
||||
|
@ -512,7 +512,7 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
|
|||
if (pbuf) {
|
||||
|
||||
//check if oui matches...
|
||||
if (_rtw_memcmp((pbuf + 2), wpa_oui_type, sizeof (wpa_oui_type)) == _FALSE) {
|
||||
if (_rtw_memcmp((pbuf + 2), wpa_oui_type, sizeof (wpa_oui_type)) == false) {
|
||||
|
||||
goto check_next_ie;
|
||||
}
|
||||
|
@ -561,15 +561,15 @@ unsigned char *rtw_get_wpa2_ie(unsigned char *pie, int *rsn_ie_len, int limit)
|
|||
|
||||
int rtw_get_wpa_cipher_suite(u8 *s)
|
||||
{
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_NONE, WPA_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_NONE, WPA_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_NONE;
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_WEP40, WPA_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_WEP40, WPA_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_WEP40;
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_TKIP, WPA_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_TKIP, WPA_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_TKIP;
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_CCMP, WPA_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_CCMP, WPA_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_CCMP;
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_WEP104, WPA_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_WEP104, WPA_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_WEP104;
|
||||
|
||||
return 0;
|
||||
|
@ -577,15 +577,15 @@ int rtw_get_wpa_cipher_suite(u8 *s)
|
|||
|
||||
int rtw_get_wpa2_cipher_suite(u8 *s)
|
||||
{
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_NONE, RSN_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_NONE, RSN_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_NONE;
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_WEP40, RSN_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_WEP40, RSN_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_WEP40;
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_TKIP, RSN_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_TKIP, RSN_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_TKIP;
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_CCMP, RSN_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_CCMP, RSN_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_CCMP;
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_WEP104, RSN_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_WEP104, RSN_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_WEP104;
|
||||
|
||||
return 0;
|
||||
|
@ -606,7 +606,7 @@ int rtw_parse_wpa_ie(u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwis
|
|||
|
||||
|
||||
if ((*wpa_ie != _WPA_IE_ID_) || (*(wpa_ie+1) != (u8)(wpa_ie_len - 2)) ||
|
||||
(_rtw_memcmp(wpa_ie+2, RTW_WPA_OUI_TYPE, WPA_SELECTOR_LEN) != _TRUE) )
|
||||
(_rtw_memcmp(wpa_ie+2, RTW_WPA_OUI_TYPE, WPA_SELECTOR_LEN) != true) )
|
||||
{
|
||||
return _FAIL;
|
||||
}
|
||||
|
@ -771,8 +771,8 @@ _func_enter_;
|
|||
authmode=in_ie[cnt];
|
||||
|
||||
//if(authmode==_WAPI_IE_)
|
||||
if(authmode==_WAPI_IE_ && (_rtw_memcmp(&in_ie[cnt+6], wapi_oui1,4)==_TRUE ||
|
||||
_rtw_memcmp(&in_ie[cnt+6], wapi_oui2,4)==_TRUE))
|
||||
if(authmode==_WAPI_IE_ && (_rtw_memcmp(&in_ie[cnt+6], wapi_oui1,4)==true ||
|
||||
_rtw_memcmp(&in_ie[cnt+6], wapi_oui2,4)==true))
|
||||
{
|
||||
if (wapi_ie) {
|
||||
_rtw_memcpy(wapi_ie, &in_ie[cnt],in_ie[cnt+1]+2);
|
||||
|
@ -818,7 +818,7 @@ _func_enter_;
|
|||
{
|
||||
authmode=in_ie[cnt];
|
||||
|
||||
if((authmode==_WPA_IE_ID_)&&(_rtw_memcmp(&in_ie[cnt+2], &wpa_oui[0],4)==_TRUE))
|
||||
if((authmode==_WPA_IE_ID_)&&(_rtw_memcmp(&in_ie[cnt+2], &wpa_oui[0],4)==true))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("\n rtw_get_wpa_ie: sec_idx=%d in_ie[cnt+1]+2=%d\n",sec_idx,in_ie[cnt+1]+2));
|
||||
|
||||
|
@ -870,18 +870,18 @@ _func_exit_;
|
|||
|
||||
u8 rtw_is_wps_ie(u8 *ie_ptr, uint *wps_ielen)
|
||||
{
|
||||
u8 match = _FALSE;
|
||||
u8 match = false;
|
||||
u8 eid, wps_oui[4]={0x0,0x50,0xf2,0x04};
|
||||
|
||||
if(ie_ptr == NULL) return match;
|
||||
|
||||
eid = ie_ptr[0];
|
||||
|
||||
if((eid==_WPA_IE_ID_)&&(_rtw_memcmp(&ie_ptr[2], wps_oui, 4)==_TRUE))
|
||||
if((eid==_WPA_IE_ID_)&&(_rtw_memcmp(&ie_ptr[2], wps_oui, 4)==true))
|
||||
{
|
||||
//DBG_8192C("==> found WPS_IE.....\n");
|
||||
*wps_ielen = ie_ptr[1]+2;
|
||||
match=_TRUE;
|
||||
match=true;
|
||||
}
|
||||
return match;
|
||||
}
|
||||
|
@ -935,7 +935,7 @@ u8 *rtw_get_wps_ie(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen)
|
|||
{
|
||||
eid = in_ie[cnt];
|
||||
|
||||
if((eid==_WPA_IE_ID_)&&(_rtw_memcmp(&in_ie[cnt+2], wps_oui, 4)==_TRUE))
|
||||
if((eid==_WPA_IE_ID_)&&(_rtw_memcmp(&in_ie[cnt+2], wps_oui, 4)==true))
|
||||
{
|
||||
wpsie_ptr = &in_ie[cnt];
|
||||
|
||||
|
@ -979,7 +979,7 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 *buf_att
|
|||
*len_attr = 0;
|
||||
|
||||
if ( ( wps_ie[0] != _VENDOR_SPECIFIC_IE_ ) ||
|
||||
( _rtw_memcmp( wps_ie + 2, wps_oui , 4 ) != _TRUE ) )
|
||||
( _rtw_memcmp( wps_ie + 2, wps_oui , 4 ) != true ) )
|
||||
{
|
||||
return attr_ptr;
|
||||
}
|
||||
|
@ -1540,7 +1540,7 @@ u8 *rtw_get_p2p_ie(u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen)
|
|||
dump_stack();
|
||||
return NULL;
|
||||
}
|
||||
if( ( eid == _VENDOR_SPECIFIC_IE_ ) && ( _rtw_memcmp( &in_ie[cnt+2], p2p_oui, 4) == _TRUE ) )
|
||||
if( ( eid == _VENDOR_SPECIFIC_IE_ ) && ( _rtw_memcmp( &in_ie[cnt+2], p2p_oui, 4) == true ) )
|
||||
{
|
||||
p2p_ie_ptr = in_ie + cnt;
|
||||
|
||||
|
@ -1589,7 +1589,7 @@ u8 *rtw_get_p2p_attr(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id ,u8 *buf_attr
|
|||
*len_attr = 0;
|
||||
|
||||
if ( !p2p_ie || ( p2p_ie[0] != _VENDOR_SPECIFIC_IE_ ) ||
|
||||
( _rtw_memcmp( p2p_ie + 2, p2p_oui , 4 ) != _TRUE ) )
|
||||
( _rtw_memcmp( p2p_ie + 2, p2p_oui , 4 ) != true ) )
|
||||
{
|
||||
return attr_ptr;
|
||||
}
|
||||
|
@ -1741,7 +1741,7 @@ void dump_wfd_ie(u8 *ie, u32 ie_len)
|
|||
u8 *wfd_ie;
|
||||
uint wfd_ielen;
|
||||
|
||||
if(rtw_get_wfd_ie(ie, ie_len, NULL, &wfd_ielen) == _FALSE)
|
||||
if(rtw_get_wfd_ie(ie, ie_len, NULL, &wfd_ielen) == false)
|
||||
return;
|
||||
|
||||
pos+=6;
|
||||
|
@ -1762,7 +1762,7 @@ int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
|
|||
u8 eid, wfd_oui[4]={0x50,0x6F,0x9A,0x0A};
|
||||
|
||||
|
||||
match=_FALSE;
|
||||
match=false;
|
||||
|
||||
if ( in_len < 0 )
|
||||
{
|
||||
|
@ -1773,7 +1773,7 @@ int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
|
|||
{
|
||||
eid = in_ie[cnt];
|
||||
|
||||
if( ( eid == _VENDOR_SPECIFIC_IE_ ) && ( _rtw_memcmp( &in_ie[cnt+2], wfd_oui, 4) == _TRUE ) )
|
||||
if( ( eid == _VENDOR_SPECIFIC_IE_ ) && ( _rtw_memcmp( &in_ie[cnt+2], wfd_oui, 4) == true ) )
|
||||
{
|
||||
if ( wfd_ie != NULL )
|
||||
{
|
||||
|
@ -1795,7 +1795,7 @@ int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
|
|||
|
||||
cnt += in_ie[ cnt + 1 ] + 2;
|
||||
|
||||
match = _TRUE;
|
||||
match = true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
@ -1805,7 +1805,7 @@ int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
|
|||
|
||||
}
|
||||
|
||||
if ( match == _TRUE )
|
||||
if ( match == true )
|
||||
{
|
||||
match = cnt;
|
||||
}
|
||||
|
@ -1818,7 +1818,7 @@ int rtw_get_wfd_ie_from_scan_queue(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_
|
|||
{
|
||||
int match;
|
||||
|
||||
match=_FALSE;
|
||||
match=false;
|
||||
|
||||
DBG_871X( "[%s] frame_type = %d\n", __FUNCTION__, frame_type );
|
||||
switch( frame_type )
|
||||
|
@ -1847,10 +1847,10 @@ int rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id ,u8 *
|
|||
u8 attr_id, wfd_oui[4]={0x50,0x6F,0x9A,0x0A};
|
||||
|
||||
|
||||
match=_FALSE;
|
||||
match=false;
|
||||
|
||||
if ( ( wfd_ie[ 0 ] != _VENDOR_SPECIFIC_IE_ ) ||
|
||||
( _rtw_memcmp( wfd_ie + 2, wfd_oui , 4 ) != _TRUE ) )
|
||||
( _rtw_memcmp( wfd_ie + 2, wfd_oui , 4 ) != true ) )
|
||||
{
|
||||
return( match );
|
||||
}
|
||||
|
@ -1873,7 +1873,7 @@ int rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id ,u8 *
|
|||
|
||||
cnt += attrlen + 3;
|
||||
|
||||
match = _TRUE;
|
||||
match = true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
@ -2111,7 +2111,7 @@ int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8* category, u8 *act
|
|||
!= (RTW_IEEE80211_FTYPE_MGMT|RTW_IEEE80211_STYPE_ACTION)
|
||||
)
|
||||
{
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
c = frame_body[0];
|
||||
|
@ -2128,7 +2128,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[] = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue