summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti
diff options
context:
space:
mode:
authorEyal Shapira <eyal@wizery.com>2012-07-05 19:05:17 +0300
committerLuciano Coelho <coelho@ti.com>2012-07-18 15:08:21 +0300
commit8e945ff9739dd75adce5d850eec079b4e9af550b (patch)
tree4c02b60b52cfa76325381cf893d1ea24e8885ddf /drivers/net/wireless/ti
parent45777c49ec376f5325e9ebbca85ee3e71697b0d2 (diff)
downloadblackbird-op-linux-8e945ff9739dd75adce5d850eec079b4e9af550b.tar.gz
blackbird-op-linux-8e945ff9739dd75adce5d850eec079b4e9af550b.zip
wlcore: don't re-configure wakeup conditions if not needed
suspend and resume callbacks configure wakeup conditions to the FW which may be different between suspend and resume. This feature is currently not utilized as both in suspend and resume FW wakeup every 1 DTIM. Avoid waking up the chip and doing the FW command unless there's an actual difference in the wakeup conditions. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti')
-rw-r--r--drivers/net/wireless/ti/wlcore/main.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 9f04b64dfa33..d486eeaf722b 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -1585,6 +1585,12 @@ static int wl1271_configure_suspend_sta(struct wl1271 *wl,
if (!test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags))
goto out;
+ if ((wl->conf.conn.suspend_wake_up_event ==
+ wl->conf.conn.wake_up_event) &&
+ (wl->conf.conn.suspend_listen_interval ==
+ wl->conf.conn.listen_interval))
+ goto out;
+
ret = wl1271_ps_elp_wakeup(wl);
if (ret < 0)
goto out;
@@ -1648,6 +1654,13 @@ static void wl1271_configure_resume(struct wl1271 *wl,
if ((!is_ap) && (!is_sta))
return;
+ if (is_sta &&
+ ((wl->conf.conn.suspend_wake_up_event ==
+ wl->conf.conn.wake_up_event) &&
+ (wl->conf.conn.suspend_listen_interval ==
+ wl->conf.conn.listen_interval)))
+ return;
+
ret = wl1271_ps_elp_wakeup(wl);
if (ret < 0)
return;
OpenPOWER on IntegriCloud