wl12xx: optimise elp wakeup and sleep calls
The wakeup call was done too deep in code path, it's better to wakeup chip from higher levels. This will also reduce wakeup calls significantly. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
cee4fd2712
commit
01d9cfbdaa
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "wl12xx.h"
|
||||
#include "acx.h"
|
||||
#include "ps.h"
|
||||
|
||||
/* ms */
|
||||
#define WL12XX_DEBUGFS_STATS_LIFETIME 1000
|
||||
@@ -96,6 +97,8 @@ static void wl12xx_debugfs_update_stats(struct wl12xx *wl)
|
||||
{
|
||||
mutex_lock(&wl->mutex);
|
||||
|
||||
wl12xx_ps_elp_wakeup(wl);
|
||||
|
||||
if (wl->state == WL12XX_STATE_ON &&
|
||||
time_after(jiffies, wl->stats.fw_stats_update +
|
||||
msecs_to_jiffies(WL12XX_DEBUGFS_STATS_LIFETIME))) {
|
||||
@@ -103,6 +106,8 @@ static void wl12xx_debugfs_update_stats(struct wl12xx *wl)
|
||||
wl->stats.fw_stats_update = jiffies;
|
||||
}
|
||||
|
||||
wl12xx_ps_elp_sleep(wl);
|
||||
|
||||
mutex_unlock(&wl->mutex);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user