staging: rtl8188eu: fix comparsions to true
Use if(x) instead of if(x == true). Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
116bcfdfcf
commit
50f2ea8bf8
@ -67,7 +67,7 @@ u8 rtw_do_join(struct adapter *padapter)
|
||||
mod_timer(&pmlmepriv->assoc_timer,
|
||||
jiffies + msecs_to_jiffies(MAX_JOIN_TIMEOUT));
|
||||
} else {
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {
|
||||
/* submit createbss_cmd to change to a ADHOC_MASTER */
|
||||
|
||||
/* pmlmepriv->lock has been acquired by caller... */
|
||||
@ -136,7 +136,7 @@ u8 rtw_set_802_11_bssid(struct adapter *padapter, u8 *bssid)
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
DBG_88E("Set BSSID under fw_state = 0x%08x\n", get_fwstate(pmlmepriv));
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY))
|
||||
goto handle_tkip_countermeasure;
|
||||
else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING))
|
||||
goto release_mlme_lock;
|
||||
@ -154,12 +154,12 @@ u8 rtw_set_802_11_bssid(struct adapter *padapter, u8 *bssid)
|
||||
|
||||
rtw_disassoc_cmd(padapter, 0, true);
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED))
|
||||
rtw_indicate_disconnect(padapter);
|
||||
|
||||
rtw_free_assoc_resources(padapter);
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) {
|
||||
_clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
|
||||
set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
|
||||
}
|
||||
@ -220,9 +220,9 @@ u8 rtw_set_802_11_ssid(struct adapter *padapter, struct ndis_802_11_ssid *ssid)
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
DBG_88E("Set SSID under fw_state = 0x%08x\n", get_fwstate(pmlmepriv));
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY))
|
||||
goto handle_tkip_countermeasure;
|
||||
else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)
|
||||
else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING))
|
||||
goto release_mlme_lock;
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE)) {
|
||||
@ -240,12 +240,12 @@ u8 rtw_set_802_11_ssid(struct adapter *padapter, struct ndis_802_11_ssid *ssid)
|
||||
/* if in WIFI_ADHOC_MASTER_STATE | WIFI_ADHOC_STATE, create bss or rejoin again */
|
||||
rtw_disassoc_cmd(padapter, 0, true);
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED))
|
||||
rtw_indicate_disconnect(padapter);
|
||||
|
||||
rtw_free_assoc_resources(padapter);
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) {
|
||||
_clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
|
||||
set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
|
||||
}
|
||||
@ -262,12 +262,12 @@ u8 rtw_set_802_11_ssid(struct adapter *padapter, struct ndis_802_11_ssid *ssid)
|
||||
|
||||
rtw_disassoc_cmd(padapter, 0, true);
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED))
|
||||
rtw_indicate_disconnect(padapter);
|
||||
|
||||
rtw_free_assoc_resources(padapter);
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) {
|
||||
_clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
|
||||
set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
|
||||
}
|
||||
@ -291,7 +291,7 @@ handle_tkip_countermeasure:
|
||||
memcpy(&pmlmepriv->assoc_ssid, ssid, sizeof(struct ndis_802_11_ssid));
|
||||
pmlmepriv->assoc_by_bssid = false;
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY))
|
||||
pmlmepriv->to_join = true;
|
||||
else
|
||||
status = rtw_do_join(padapter);
|
||||
@ -340,7 +340,7 @@ u8 rtw_set_802_11_infrastructure_mode(struct adapter *padapter,
|
||||
rtw_free_assoc_resources(padapter);
|
||||
|
||||
if (*pold_state == Ndis802_11Infrastructure || *pold_state == Ndis802_11IBSS) {
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED))
|
||||
rtw_indicate_disconnect(padapter); /* will clr Linked_state; before this function, we must have checked whether issue dis-assoc_cmd or not */
|
||||
}
|
||||
|
||||
@ -416,7 +416,7 @@ u8 rtw_set_802_11_bssid_list_scan(struct adapter *padapter, struct ndis_802_11_s
|
||||
res = true;
|
||||
|
||||
if (check_fwstate(pmlmepriv,
|
||||
(_FW_UNDER_SURVEY|_FW_UNDER_LINKING)) == true)
|
||||
_FW_UNDER_SURVEY|_FW_UNDER_LINKING))
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n###_FW_UNDER_SURVEY|_FW_UNDER_LINKING\n\n"));
|
||||
else
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n###pmlmepriv->sitesurveyctrl.traffic_busy == true\n\n"));
|
||||
|
Loading…
Reference in New Issue
Block a user