Commit 8e945ff9 authored by Eyal Shapira's avatar Eyal Shapira Committed by Luciano Coelho

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: default avatarEyal Shapira <eyal@wizery.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent 45777c49
...@@ -1585,6 +1585,12 @@ static int wl1271_configure_suspend_sta(struct wl1271 *wl, ...@@ -1585,6 +1585,12 @@ static int wl1271_configure_suspend_sta(struct wl1271 *wl,
if (!test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags)) if (!test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags))
goto out; 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); ret = wl1271_ps_elp_wakeup(wl);
if (ret < 0) if (ret < 0)
goto out; goto out;
...@@ -1648,6 +1654,13 @@ static void wl1271_configure_resume(struct wl1271 *wl, ...@@ -1648,6 +1654,13 @@ static void wl1271_configure_resume(struct wl1271 *wl,
if ((!is_ap) && (!is_sta)) if ((!is_ap) && (!is_sta))
return; 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); ret = wl1271_ps_elp_wakeup(wl);
if (ret < 0) if (ret < 0)
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment