Commit 461fa136 authored by Juuso Oikarinen's avatar Juuso Oikarinen Committed by John W. Linville

wl1271: Prevent PSM-entry retry loop if PSM cancelled

Prevent endless PSM-entry retry loops, if PSM has already been cancelled while
PSM entry was attempted.
Signed-off-by: default avatarJuuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 84502563
...@@ -78,12 +78,16 @@ static int wl1271_event_ps_report(struct wl1271 *wl, ...@@ -78,12 +78,16 @@ static int wl1271_event_ps_report(struct wl1271 *wl,
switch (mbox->ps_status) { switch (mbox->ps_status) {
case EVENT_ENTER_POWER_SAVE_FAIL: case EVENT_ENTER_POWER_SAVE_FAIL:
if (!wl->psm) {
wl->psm_entry_retry = 0;
break;
}
if (wl->psm_entry_retry < wl->conf.conn.psm_entry_retries) { if (wl->psm_entry_retry < wl->conf.conn.psm_entry_retries) {
wl->psm_entry_retry++; wl->psm_entry_retry++;
wl1271_error("PSM entry failed, retrying %d\n",
wl->psm_entry_retry);
ret = wl1271_ps_set_mode(wl, STATION_POWER_SAVE_MODE); ret = wl1271_ps_set_mode(wl, STATION_POWER_SAVE_MODE);
} else { } else {
wl1271_error("PSM entry failed, giving up.\n");
wl->psm_entry_retry = 0; wl->psm_entry_retry = 0;
*beacon_loss = true; *beacon_loss = true;
} }
......
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