summaryrefslogtreecommitdiff
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2009-11-23 21:22:13 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2009-11-28 20:04:26 (GMT)
commit461fa136bb120f5b6b7d5814888a7211dbbd211b (patch)
treed6b21c31e5634128e4d1bc6851b7ad86b219d4d3 /drivers/net/wireless
parent845025634549850879d30f00e20bc8bfe63980b4 (diff)
downloadlinux-fsl-qoriq-461fa136bb120f5b6b7d5814888a7211dbbd211b.tar.xz
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>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_event.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_event.c b/drivers/net/wireless/wl12xx/wl1271_event.c
index e135d89..d13fdd9 100644
--- a/drivers/net/wireless/wl12xx/wl1271_event.c
+++ b/drivers/net/wireless/wl12xx/wl1271_event.c
@@ -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;
}