staging: rtl8188eu: cleanup comparsions to false
Cleanup remaining comparsions to false. if(x == false) -> if(!x) Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c2aed5648f
commit
bbf2f71e06
|
@ -451,7 +451,7 @@ int Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data)
|
|||
bDataEmpty = false;
|
||||
}
|
||||
}
|
||||
if (bDataEmpty == false) {
|
||||
if (!bDataEmpty) {
|
||||
ReadState = PG_STATE_DATA;
|
||||
} else {/* read next header */
|
||||
efuse_addr = efuse_addr + (word_cnts*2)+1;
|
||||
|
|
|
@ -228,7 +228,7 @@ int rtw_if_up(struct adapter *padapter)
|
|||
int res;
|
||||
|
||||
if (padapter->bDriverStopped || padapter->bSurpriseRemoved ||
|
||||
(check_fwstate(&padapter->mlmepriv, _FW_LINKED) == false)) {
|
||||
!check_fwstate(&padapter->mlmepriv, _FW_LINKED)) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
|
||||
("rtw_if_up:bDriverStopped(%d) OR bSurpriseRemoved(%d)",
|
||||
padapter->bDriverStopped, padapter->bSurpriseRemoved));
|
||||
|
@ -578,7 +578,7 @@ void rtw_survey_event_callback(struct 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)) {
|
||||
if (pnetwork->Ssid.Ssid[0] == 0)
|
||||
pnetwork->Ssid.SsidLength = 0;
|
||||
rtw_add_network(adapter, pnetwork);
|
||||
|
@ -615,7 +615,7 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
if (pmlmepriv->to_join) {
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true)) {
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == false) {
|
||||
if (!check_fwstate(pmlmepriv, _FW_LINKED)) {
|
||||
set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
|
||||
|
||||
if (rtw_select_and_join_from_scanned_queue(pmlmepriv) == _SUCCESS) {
|
||||
|
@ -1138,7 +1138,7 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
struct wlan_network *cur_network = &(pmlmepriv->cur_network);
|
||||
struct wlan_network *ptarget_wlan = NULL;
|
||||
|
||||
if (rtw_access_ctrl(adapter, pstassoc->macaddr) == false)
|
||||
if (!rtw_access_ctrl(adapter, pstassoc->macaddr))
|
||||
return;
|
||||
|
||||
#if defined(CONFIG_88EU_AP_MODE)
|
||||
|
@ -1418,13 +1418,13 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (rtw_is_desired_network(adapter, competitor) == false)
|
||||
if (!rtw_is_desired_network(adapter, competitor))
|
||||
goto exit;
|
||||
|
||||
if (pmlmepriv->to_roaming) {
|
||||
since_scan = jiffies - competitor->last_scanned;
|
||||
if (jiffies_to_msecs(since_scan) >= RTW_SCAN_RESULT_EXPIRE ||
|
||||
is_same_ess(&competitor->network, &pmlmepriv->cur_network.network) == false)
|
||||
!is_same_ess(&competitor->network, &pmlmepriv->cur_network.network))
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
|
|
@ -344,7 +344,7 @@ static u8 PS_RDY_CHECK(struct adapter *padapter)
|
|||
if (delta_time < LPS_DELAY_TIME)
|
||||
return false;
|
||||
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) == false) ||
|
||||
if ((!check_fwstate(pmlmepriv, _FW_LINKED)) ||
|
||||
(check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_AP_STATE)) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) ||
|
||||
|
@ -352,7 +352,8 @@ static u8 PS_RDY_CHECK(struct adapter *padapter)
|
|||
return false;
|
||||
if (pwrpriv->bInSuspend)
|
||||
return false;
|
||||
if ((padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) && (padapter->securitypriv.binstallGrpkey == false)) {
|
||||
if (padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X &&
|
||||
!padapter->securitypriv.binstallGrpkey) {
|
||||
DBG_88E("Group handshake still in progress !!!\n");
|
||||
return false;
|
||||
}
|
||||
|
@ -438,7 +439,7 @@ void LPS_Enter(struct adapter *padapter)
|
|||
{
|
||||
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
|
||||
|
||||
if (PS_RDY_CHECK(padapter) == false)
|
||||
if (!PS_RDY_CHECK(padapter))
|
||||
return;
|
||||
|
||||
if (pwrpriv->bLeisurePs) {
|
||||
|
|
|
@ -2042,7 +2042,7 @@ static void rtw_signal_stat_timer_hdl(struct timer_list *t)
|
|||
}
|
||||
|
||||
/* 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)) {
|
||||
tmp_s = avg_signal_strength +
|
||||
(_alpha - 1) * recvpriv->signal_strength;
|
||||
tmp_s = DIV_ROUND_UP(tmp_s, _alpha);
|
||||
|
|
|
@ -846,7 +846,7 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
|
|||
unsigned char ht_info_infos_0;
|
||||
int ssid_len;
|
||||
|
||||
if (is_client_associated_to_ap(Adapter) == false)
|
||||
if (!is_client_associated_to_ap(Adapter))
|
||||
return true;
|
||||
|
||||
len = packet_len - sizeof(struct ieee80211_hdr_3addr);
|
||||
|
|
|
@ -1619,7 +1619,7 @@ s32 rtw_xmit(struct adapter *padapter, struct sk_buff **ppkt)
|
|||
spin_unlock_bh(&pxmitpriv->lock);
|
||||
#endif
|
||||
|
||||
if (rtw_hal_xmit(padapter, pxmitframe) == false)
|
||||
if (!rtw_hal_xmit(padapter, pxmitframe))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
@ -1636,7 +1636,7 @@ int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fra
|
|||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
bool mcast = is_multicast_ether_addr(pattrib->ra);
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == false)
|
||||
if (!check_fwstate(pmlmepriv, WIFI_AP_STATE))
|
||||
return ret;
|
||||
|
||||
if (pattrib->psta)
|
||||
|
|
|
@ -980,7 +980,7 @@ u32 rtw_hal_inirp_init(struct adapter *Adapter)
|
|||
/* issue Rx irp to receive data */
|
||||
precvbuf = precvpriv->precv_buf;
|
||||
for (i = 0; i < NR_RECVBUFF; i++) {
|
||||
if (usb_read_port(Adapter, RECV_BULK_IN_ADDR, precvbuf) == false) {
|
||||
if (!usb_read_port(Adapter, RECV_BULK_IN_ADDR, precvbuf)) {
|
||||
RT_TRACE(_module_hci_hal_init_c_, _drv_err_, ("usb_rx_init: usb_read_port error\n"));
|
||||
status = _FAIL;
|
||||
goto exit;
|
||||
|
|
|
@ -737,7 +737,7 @@ static int rtw_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
|
|||
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_err_, ("\n Mode: %s is not supported\n", iw_operation_mode[wrqu->mode]));
|
||||
goto exit;
|
||||
}
|
||||
if (rtw_set_802_11_infrastructure_mode(padapter, networkType) == false) {
|
||||
if (!rtw_set_802_11_infrastructure_mode(padapter, networkType)) {
|
||||
ret = -EPERM;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -1000,8 +1000,7 @@ static int rtw_wx_set_wap(struct net_device *dev,
|
|||
spin_unlock_bh(&queue->lock);
|
||||
|
||||
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)) {
|
||||
ret = -1;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -1354,7 +1353,7 @@ static int rtw_wx_set_essid(struct net_device *dev,
|
|||
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_,
|
||||
("set ssid: set_802_11_auth. mode =%d\n", authmode));
|
||||
rtw_set_802_11_authentication_mode(padapter, authmode);
|
||||
if (rtw_set_802_11_ssid(padapter, &ndis_ssid) == false) {
|
||||
if (!rtw_set_802_11_ssid(padapter, &ndis_ssid)) {
|
||||
ret = -1;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -1673,7 +1672,7 @@ static int rtw_wx_set_enc(struct net_device *dev,
|
|||
|
||||
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)) {
|
||||
if (rf_on == pwrpriv->rf_pwrstate)
|
||||
ret = -EOPNOTSUPP;
|
||||
goto exit;
|
||||
|
@ -2496,7 +2495,7 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param)
|
|||
psta->htpriv.ht_option = false;
|
||||
}
|
||||
|
||||
if (pmlmepriv->htpriv.ht_option == false)
|
||||
if (!pmlmepriv->htpriv.ht_option)
|
||||
psta->htpriv.ht_option = false;
|
||||
|
||||
update_sta_info_apmode(padapter, psta);
|
||||
|
|
|
@ -173,7 +173,7 @@ int rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev)
|
|||
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("+xmit_enry\n"));
|
||||
|
||||
if (rtw_if_up(padapter) == false) {
|
||||
if (!rtw_if_up(padapter)) {
|
||||
RT_TRACE(_module_xmit_osdep_c_, _drv_err_,
|
||||
("%s: rtw_if_up fail\n", __func__));
|
||||
goto drop_packet;
|
||||
|
|
Loading…
Reference in New Issue