mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 22:56:42 +07:00
wl1251: simplify ELP wakeup time calculation
The wakeup time calculation was too complicated, simplify it. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
b5a167942c
commit
7fa6282a17
@ -68,7 +68,7 @@ void wl1251_ps_elp_sleep(struct wl1251 *wl)
|
||||
|
||||
int wl1251_ps_elp_wakeup(struct wl1251 *wl)
|
||||
{
|
||||
unsigned long timeout;
|
||||
unsigned long timeout, start;
|
||||
u32 elp_reg;
|
||||
|
||||
if (!wl->elp)
|
||||
@ -76,6 +76,7 @@ int wl1251_ps_elp_wakeup(struct wl1251 *wl)
|
||||
|
||||
wl1251_debug(DEBUG_PSM, "waking up chip from elp");
|
||||
|
||||
start = jiffies;
|
||||
timeout = jiffies + msecs_to_jiffies(WL1251_WAKEUP_TIMEOUT);
|
||||
|
||||
wl1251_write32(wl, HW_ACCESS_ELP_CTRL_REG_ADDR, ELPCTRL_WAKE_UP);
|
||||
@ -96,8 +97,7 @@ int wl1251_ps_elp_wakeup(struct wl1251 *wl)
|
||||
}
|
||||
|
||||
wl1251_debug(DEBUG_PSM, "wakeup time: %u ms",
|
||||
jiffies_to_msecs(jiffies) -
|
||||
(jiffies_to_msecs(timeout) - WL1251_WAKEUP_TIMEOUT));
|
||||
jiffies_to_msecs(jiffies - start));
|
||||
|
||||
wl->elp = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user