diff options
Diffstat (limited to 'drivers/staging/rtl8188eu/core/rtw_pwrctrl.c')
-rw-r--r-- | drivers/staging/rtl8188eu/core/rtw_pwrctrl.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c index 9765946..5e1ef9f 100644 --- a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c @@ -348,7 +348,7 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv) static u8 PS_RDY_CHECK(struct adapter *padapter) { - u32 curr_time, delta_time; + unsigned long curr_time, delta_time; struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); @@ -418,7 +418,7 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a */ s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms) { - u32 start_time; + unsigned long start_time; u8 bAwake = false; s32 err = 0; @@ -435,7 +435,7 @@ s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms) break; } - if (rtw_get_passing_time_ms(start_time) > delay_ms) { + if (jiffies_to_msecs(jiffies - start_time) > delay_ms) { err = -1; DBG_88E("%s: Wait for FW LPS leave more than %u ms!!!\n", __func__, delay_ms); break; @@ -561,24 +561,24 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; unsigned long expires; + unsigned long start; int ret = _SUCCESS; expires = jiffies + msecs_to_jiffies(ips_deffer_ms); if (time_before(pwrpriv->ips_deny_time, expires)) pwrpriv->ips_deny_time = jiffies + msecs_to_jiffies(ips_deffer_ms); -{ - u32 start = jiffies; + start = jiffies; if (pwrpriv->ps_processing) { DBG_88E("%s wait ps_processing...\n", __func__); - while (pwrpriv->ps_processing && rtw_get_passing_time_ms(start) <= 3000) + while (pwrpriv->ps_processing && + jiffies_to_msecs(jiffies - start) <= 3000) usleep_range(1000, 3000); if (pwrpriv->ps_processing) DBG_88E("%s wait ps_processing timeout\n", __func__); else DBG_88E("%s wait ps_processing done\n", __func__); } -} /* System suspend is not allowed to wakeup */ if ((!pwrpriv->bInternalAutoSuspend) && (pwrpriv->bInSuspend)) { |