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>
diff --git a/drivers/net/wireless/wl12xx/debugfs.c b/drivers/net/wireless/wl12xx/debugfs.c
index cdb368c..3cc5460 100644
--- a/drivers/net/wireless/wl12xx/debugfs.c
+++ b/drivers/net/wireless/wl12xx/debugfs.c
@@ -27,6 +27,7 @@
 
 #include "wl12xx.h"
 #include "acx.h"
+#include "ps.h"
 
 /* ms */
 #define WL12XX_DEBUGFS_STATS_LIFETIME 1000
@@ -96,6 +97,8 @@
 {
 	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 @@
 		wl->stats.fw_stats_update = jiffies;
 	}
 
+	wl12xx_ps_elp_sleep(wl);
+
 	mutex_unlock(&wl->mutex);
 }