mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 17:23:55 +08:00
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: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
8450256345
commit
461fa136bb
@ -78,12 +78,16 @@ static int wl1271_event_ps_report(struct wl1271 *wl,
|
||||
|
||||
switch (mbox->ps_status) {
|
||||
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) {
|
||||
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);
|
||||
} else {
|
||||
wl1271_error("PSM entry failed, giving up.\n");
|
||||
wl->psm_entry_retry = 0;
|
||||
*beacon_loss = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user