Commit 05dba355 authored by Eliad Peller's avatar Eliad Peller Committed by Luciano Coelho

wl12xx: enter psm only after station role was started

The station didn't get into psm after recovery, because
psm was configured before sta role was started.

Move wl1271_ps_set_mode() to be executed only after
the role was started.
Signed-off-by: default avatarEliad Peller <eliad@wizery.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent a879ed79
...@@ -3361,19 +3361,6 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl, ...@@ -3361,19 +3361,6 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
ret = wl1271_acx_conn_monit_params(wl, true); ret = wl1271_acx_conn_monit_params(wl, true);
if (ret < 0) if (ret < 0)
goto out; goto out;
/* If we want to go in PSM but we're not there yet */
if (test_bit(WL1271_FLAG_PSM_REQUESTED, &wl->flags) &&
!test_bit(WL1271_FLAG_PSM, &wl->flags)) {
enum wl1271_cmd_ps_mode mode;
mode = STATION_POWER_SAVE_MODE;
ret = wl1271_ps_set_mode(wl, mode,
wl->basic_rate,
true);
if (ret < 0)
goto out;
}
} else { } else {
/* use defaults when not associated */ /* use defaults when not associated */
bool was_assoc = bool was_assoc =
...@@ -3517,6 +3504,19 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl, ...@@ -3517,6 +3504,19 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
if (ret < 0) if (ret < 0)
goto out; goto out;
} }
/* If we want to go in PSM but we're not there yet */
if (test_bit(WL1271_FLAG_PSM_REQUESTED, &wl->flags) &&
!test_bit(WL1271_FLAG_PSM, &wl->flags)) {
enum wl1271_cmd_ps_mode mode;
mode = STATION_POWER_SAVE_MODE;
ret = wl1271_ps_set_mode(wl, mode,
wl->basic_rate,
true);
if (ret < 0)
goto out;
}
} }
/* Handle new association with HT. Do this after join. */ /* Handle new association with HT. Do this after join. */
......
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