mirror of
https://github.com/chinawrj/rtl8812au
synced 2024-11-13 01:22:30 +00:00
Fix a few sleep-in-atomic-context bugs in rtw_pwrctrl
This commit is contained in:
parent
274ccd7053
commit
72f45df5ff
@ -540,7 +540,7 @@ u8 rtw_cpwm_polling(_adapter *adapter, u8 rpwm, u8 cpwm_orig)
|
|||||||
do {
|
do {
|
||||||
start_time = rtw_get_current_time();
|
start_time = rtw_get_current_time();
|
||||||
do {
|
do {
|
||||||
rtw_msleep_os(1);
|
rtw_mdelay_os(1);
|
||||||
rtw_hal_get_hwreg(adapter, HW_VAR_CPWM, &cpwm_now);
|
rtw_hal_get_hwreg(adapter, HW_VAR_CPWM, &cpwm_now);
|
||||||
|
|
||||||
if ((cpwm_orig ^ cpwm_now) & 0x80) {
|
if ((cpwm_orig ^ cpwm_now) & 0x80) {
|
||||||
@ -1460,7 +1460,7 @@ void LPS_Leave_check(
|
|||||||
RTW_ERR("Wait for cpwm event than 100 ms!!!\n");
|
RTW_ERR("Wait for cpwm event than 100 ms!!!\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
rtw_msleep_os(1);
|
rtw_mdelay_os(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -2513,7 +2513,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
|||||||
if (pwrpriv->ps_processing) {
|
if (pwrpriv->ps_processing) {
|
||||||
RTW_INFO("%s wait ps_processing...\n", __func__);
|
RTW_INFO("%s wait ps_processing...\n", __func__);
|
||||||
while (pwrpriv->ps_processing && rtw_get_passing_time_ms(start) <= 3000)
|
while (pwrpriv->ps_processing && rtw_get_passing_time_ms(start) <= 3000)
|
||||||
rtw_msleep_os(10);
|
rtw_mdelay_os(10);
|
||||||
if (pwrpriv->ps_processing)
|
if (pwrpriv->ps_processing)
|
||||||
RTW_INFO("%s wait ps_processing timeout\n", __func__);
|
RTW_INFO("%s wait ps_processing timeout\n", __func__);
|
||||||
else
|
else
|
||||||
@ -2524,7 +2524,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
|||||||
if (rtw_hal_sreset_inprogress(padapter)) {
|
if (rtw_hal_sreset_inprogress(padapter)) {
|
||||||
RTW_INFO("%s wait sreset_inprogress...\n", __func__);
|
RTW_INFO("%s wait sreset_inprogress...\n", __func__);
|
||||||
while (rtw_hal_sreset_inprogress(padapter) && rtw_get_passing_time_ms(start) <= 4000)
|
while (rtw_hal_sreset_inprogress(padapter) && rtw_get_passing_time_ms(start) <= 4000)
|
||||||
rtw_msleep_os(10);
|
rtw_mdelay_os(10);
|
||||||
if (rtw_hal_sreset_inprogress(padapter))
|
if (rtw_hal_sreset_inprogress(padapter))
|
||||||
RTW_INFO("%s wait sreset_inprogress timeout\n", __func__);
|
RTW_INFO("%s wait sreset_inprogress timeout\n", __func__);
|
||||||
else
|
else
|
||||||
@ -2542,7 +2542,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
|||||||
&& ((rtw_get_passing_time_ms(start) <= 3000 && !rtw_is_do_late_resume(pwrpriv))
|
&& ((rtw_get_passing_time_ms(start) <= 3000 && !rtw_is_do_late_resume(pwrpriv))
|
||||||
|| (rtw_get_passing_time_ms(start) <= 500 && rtw_is_do_late_resume(pwrpriv)))
|
|| (rtw_get_passing_time_ms(start) <= 500 && rtw_is_do_late_resume(pwrpriv)))
|
||||||
)
|
)
|
||||||
rtw_msleep_os(10);
|
rtw_mdelay_os(10);
|
||||||
if (pwrpriv->bInSuspend)
|
if (pwrpriv->bInSuspend)
|
||||||
RTW_INFO("%s wait bInSuspend timeout\n", __func__);
|
RTW_INFO("%s wait bInSuspend timeout\n", __func__);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user