aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorEyal Shapira <eyal@wizery.com>2012-07-05 12:05:17 -0400
committerLuciano Coelho <coelho@ti.com>2012-07-18 08:08:21 -0400
commit8e945ff9739dd75adce5d850eec079b4e9af550b (patch)
tree4c02b60b52cfa76325381cf893d1ea24e8885ddf /drivers/net
parent45777c49ec376f5325e9ebbca85ee3e71697b0d2 (diff)
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')
-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,
1585 if (!test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags)) 1585 if (!test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags))
1586 goto out; 1586 goto out;
1587 1587
1588 if ((wl->conf.conn.suspend_wake_up_event ==
1589 wl->conf.conn.wake_up_event) &&
1590 (wl->conf.conn.suspend_listen_interval ==
1591 wl->conf.conn.listen_interval))
1592 goto out;
1593
1588 ret = wl1271_ps_elp_wakeup(wl); 1594 ret = wl1271_ps_elp_wakeup(wl);
1589 if (ret < 0) 1595 if (ret < 0)
1590 goto out; 1596 goto out;
@@ -1648,6 +1654,13 @@ static void wl1271_configure_resume(struct wl1271 *wl,
1648 if ((!is_ap) && (!is_sta)) 1654 if ((!is_ap) && (!is_sta))
1649 return; 1655 return;
1650 1656
1657 if (is_sta &&
1658 ((wl->conf.conn.suspend_wake_up_event ==
1659 wl->conf.conn.wake_up_event) &&
1660 (wl->conf.conn.suspend_listen_interval ==
1661 wl->conf.conn.listen_interval)))
1662 return;
1663
1651 ret = wl1271_ps_elp_wakeup(wl); 1664 ret = wl1271_ps_elp_wakeup(wl);
1652 if (ret < 0) 1665 if (ret < 0)
1653 return; 1666 return;