diff options
author | Kalle Valo <kalle.valo@nokia.com> | 2009-11-30 10:18:06 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-21 18:55:52 -0500 |
commit | 7fa6282a1775bd41508220e65ba0cb92235b67d4 (patch) | |
tree | a9f9d784f497054b94873e42978007fe14dd6755 /drivers/net/wireless/wl12xx | |
parent | b5a167942cb388cc5f1a6085cb3506d5bf47517d (diff) | |
download | op-kernel-dev-7fa6282a1775bd41508220e65ba0cb92235b67d4.zip op-kernel-dev-7fa6282a1775bd41508220e65ba0cb92235b67d4.tar.gz |
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>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_ps.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_ps.c b/drivers/net/wireless/wl12xx/wl1251_ps.c index 54a2720..851dfb6 100644 --- a/drivers/net/wireless/wl12xx/wl1251_ps.c +++ b/drivers/net/wireless/wl12xx/wl1251_ps.c @@ -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; |