{
struct pwrctrl_priv *pwrctrlpriv = &padapter->pwrctrlpriv;
- if (mode == IPS_NORMAL || mode == IPS_LEVEL_2) {
- rtw_ips_mode_req(pwrctrlpriv, mode);
- DBG_8723A("%s %s\n", __func__,
- mode == IPS_NORMAL?"IPS_NORMAL":"IPS_LEVEL_2");
- return 0;
- } else if (mode == IPS_NONE) {
- rtw_ips_mode_req(pwrctrlpriv, mode);
+ if (mode != IPS_NORMAL && mode != IPS_LEVEL_2 && mode != IPS_NONE)
+ return -EINVAL;
+
+ pwrctrlpriv->ips_mode_req = mode;
+ if (mode == IPS_NONE) {
DBG_8723A("%s %s\n", __func__, "IPS_NONE");
if (padapter->bSurpriseRemoved == 0 &&
rtw_pwr_wakeup(padapter) == _FAIL)
return -EFAULT;
- } else
- return -EINVAL;
+ }
return 0;
}
unsigned long PS_BBRegBackup[PSBBREG_TOTALCNT];
};
-#define rtw_get_ips_mode_req(pwrctrlpriv) \
- ((pwrctrlpriv)->ips_mode_req)
-
-#define rtw_ips_mode_req(pwrctrlpriv, ips_mode) \
- ((pwrctrlpriv)->ips_mode_req = (ips_mode))
-
#define RTW_PWR_STATE_CHK_INTERVAL 2000
#define _rtw_set_pwr_state_check_timer(pwrctrlpriv, ms) \