Commit c742e339 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: Clean up rtw_pm_set_ips23a()

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 48d5bb44
...@@ -615,19 +615,16 @@ int rtw_pm_set_ips23a(struct rtw_adapter *padapter, u8 mode) ...@@ -615,19 +615,16 @@ int rtw_pm_set_ips23a(struct rtw_adapter *padapter, u8 mode)
{ {
struct pwrctrl_priv *pwrctrlpriv = &padapter->pwrctrlpriv; struct pwrctrl_priv *pwrctrlpriv = &padapter->pwrctrlpriv;
if (mode == IPS_NORMAL || mode == IPS_LEVEL_2) { if (mode != IPS_NORMAL && mode != IPS_LEVEL_2 && mode != IPS_NONE)
rtw_ips_mode_req(pwrctrlpriv, mode); return -EINVAL;
DBG_8723A("%s %s\n", __func__,
mode == IPS_NORMAL?"IPS_NORMAL":"IPS_LEVEL_2"); pwrctrlpriv->ips_mode_req = mode;
return 0; if (mode == IPS_NONE) {
} else if (mode == IPS_NONE) {
rtw_ips_mode_req(pwrctrlpriv, mode);
DBG_8723A("%s %s\n", __func__, "IPS_NONE"); DBG_8723A("%s %s\n", __func__, "IPS_NONE");
if (padapter->bSurpriseRemoved == 0 && if (padapter->bSurpriseRemoved == 0 &&
rtw_pwr_wakeup(padapter) == _FAIL) rtw_pwr_wakeup(padapter) == _FAIL)
return -EFAULT; return -EFAULT;
} else }
return -EINVAL;
return 0; return 0;
} }
...@@ -214,12 +214,6 @@ struct pwrctrl_priv { ...@@ -214,12 +214,6 @@ struct pwrctrl_priv {
unsigned long PS_BBRegBackup[PSBBREG_TOTALCNT]; 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_PWR_STATE_CHK_INTERVAL 2000
#define _rtw_set_pwr_state_check_timer(pwrctrlpriv, ms) \ #define _rtw_set_pwr_state_check_timer(pwrctrlpriv, ms) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment