|
@@ -122,7 +122,7 @@ static bool rtw_pwr_unassociated_idle(struct adapter *adapter)
|
|
|
|
|
|
bool ret = false;
|
|
bool ret = false;
|
|
|
|
|
|
- if (adapter->pwrctrlpriv.ips_deny_time >= jiffies)
|
|
|
|
|
|
+ if (time_after_eq(adapter->pwrctrlpriv.ips_deny_time, jiffies))
|
|
goto exit;
|
|
goto exit;
|
|
|
|
|
|
if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE|WIFI_SITE_MONITOR) ||
|
|
if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE|WIFI_SITE_MONITOR) ||
|
|
@@ -523,9 +523,11 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
|
|
{
|
|
{
|
|
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
|
|
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
|
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
|
|
|
+ unsigned long expires;
|
|
int ret = _SUCCESS;
|
|
int ret = _SUCCESS;
|
|
|
|
|
|
- if (pwrpriv->ips_deny_time < jiffies + rtw_ms_to_systime(ips_deffer_ms))
|
|
|
|
|
|
+ expires = jiffies + rtw_ms_to_systime(ips_deffer_ms);
|
|
|
|
+ if (time_before(pwrpriv->ips_deny_time, expires))
|
|
pwrpriv->ips_deny_time = jiffies + rtw_ms_to_systime(ips_deffer_ms);
|
|
pwrpriv->ips_deny_time = jiffies + rtw_ms_to_systime(ips_deffer_ms);
|
|
|
|
|
|
{
|
|
{
|
|
@@ -580,7 +582,8 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
|
|
}
|
|
}
|
|
|
|
|
|
exit:
|
|
exit:
|
|
- if (pwrpriv->ips_deny_time < jiffies + rtw_ms_to_systime(ips_deffer_ms))
|
|
|
|
|
|
+ expires = jiffies + rtw_ms_to_systime(ips_deffer_ms);
|
|
|
|
+ if (time_before(pwrpriv->ips_deny_time, expires))
|
|
pwrpriv->ips_deny_time = jiffies + rtw_ms_to_systime(ips_deffer_ms);
|
|
pwrpriv->ips_deny_time = jiffies + rtw_ms_to_systime(ips_deffer_ms);
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|