ret = _ips_leave(padapter);
mutex_unlock(&pwrpriv->lock);
- if (_SUCCESS == ret)
+ if (ret == _SUCCESS)
hal_btcoex_IpsNotify(padapter, IPS_NONE);
return ret;
return;
if (pwrpriv->pwr_mode == ps_mode)
- if (PS_MODE_ACTIVE == ps_mode)
+ if (ps_mode == PS_MODE_ACTIVE)
return;
mutex_unlock(&pwrctrl->lock);
- if (_FAIL == res)
+ if (res == _FAIL)
if (pwrctrl->cpwm >= PS_STATE_S2)
res = _SUCCESS;
mutex_unlock(&pwrctrl->lock);
- if (_FAIL == res)
+ if (res == _FAIL)
if (pwrctrl->cpwm >= PS_STATE_S2)
res = _SUCCESS;
mutex_unlock(&pwrctrl->lock);
- if (_FAIL == res)
+ if (res == _FAIL)
if (pwrctrl->cpwm >= PS_STATE_S2)
res = _SUCCESS;
if (rf_off == pwrpriv->rf_pwrstate) {
{
DBG_8192C("%s call ips_leave....\n", __func__);
- if (_FAIL == ips_leave(padapter)) {
+ if (ips_leave(padapter) == _FAIL) {
DBG_8192C("======> ips_leave fail.............\n");
ret = _FAIL;
goto exit;
if (mode < PS_MODE_NUM) {
if (pwrctrlpriv->power_mgnt != mode) {
- if (PS_MODE_ACTIVE == mode)
+ if (mode == PS_MODE_ACTIVE)
LeaveAllPowerSaveMode(padapter);
else
pwrctrlpriv->LpsIdleCount = 2;
} else if (mode == IPS_NONE) {
rtw_ips_mode_req(pwrctrlpriv, mode);
DBG_871X("%s %s\n", __func__, "IPS_NONE");
- if ((padapter->bSurpriseRemoved == 0) && (_FAIL == rtw_pwr_wakeup(padapter)))
+ if ((padapter->bSurpriseRemoved == 0) && (rtw_pwr_wakeup(padapter) == _FAIL))
return -EFAULT;
} else
return -EINVAL;