staging: r8188eu: clean up the code to set ips_deny_time
authorMartin Kaiser <martin@kaiser.cx>
Wed, 13 Apr 2022 19:36:52 +0000 (21:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Apr 2022 07:06:59 +0000 (09:06 +0200)
commit1dd0ac70494c1d04073de2dd5b51a60215f4d760
tree22beb709fc59aa53a1ed6086c677341b154d3ec5
parent3b9d0da6aa08a34426489b2836d2f63ab7bc2051
staging: r8188eu: clean up the code to set ips_deny_time

Clean up the code in rtw_pwr_wakeup that sets pwrpriv->ips_deny_time.

Make ips_deny_time an unsigned long, this type is used by the kernel
functions that process jiffies.

Remove the temporary variable ips_deffer_ms and use
RTW_PWR_STATE_CHK_INTERVAL directly.

There's no need to set ips_deny_time twice, it's sufficient to set it at
the end of rtw_pwr_wakeup.

Use time_before to check if ips_deny_time should be updated.

We can now remove rtw_ms_to_systime, this function is not used any more.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220413193654.258507-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_pwrctrl.c
drivers/staging/r8188eu/include/osdep_service.h
drivers/staging/r8188eu/include/rtw_pwrctrl.h
drivers/staging/r8188eu/os_dep/osdep_service.c