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

wl1271: Disconnect if PSM entry fails

If PSM entry fails despite of retries, assume that the AP has been lost,
and indicate connection loss to the mac80211. This is much safer than
remaining in active mode.
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 c2b2d99b
...@@ -82,15 +82,8 @@ static int wl1271_event_ps_report(struct wl1271 *wl, ...@@ -82,15 +82,8 @@ static int wl1271_event_ps_report(struct wl1271 *wl,
true); true);
} else { } else {
wl1271_error("PSM entry failed, giving up.\n"); wl1271_error("PSM entry failed, giving up.\n");
/* FIXME: this may need to be reconsidered. for now it
is not possible to indicate to the mac80211
afterwards that PSM entry failed. To maximize
functionality (receiving data and remaining
associated) make sure that we are in sync with the
AP in regard of PSM mode. */
ret = wl1271_ps_set_mode(wl, STATION_ACTIVE_MODE,
false);
wl->psm_entry_retry = 0; wl->psm_entry_retry = 0;
*beacon_loss = true;
} }
break; break;
case EVENT_ENTER_POWER_SAVE_SUCCESS: case EVENT_ENTER_POWER_SAVE_SUCCESS:
...@@ -180,16 +173,8 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox) ...@@ -180,16 +173,8 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox)
return ret; return ret;
} }
if (wl->vif && beacon_loss) { if (wl->vif && beacon_loss)
/* Obviously, it's dangerous to release the mutex while ieee80211_connection_loss(wl->vif);
we are holding many of the variables in the wl struct.
That's why it's done last in the function, and care must
be taken that nothing more is done after this function
returns. */
mutex_unlock(&wl->mutex);
ieee80211_beacon_loss(wl->vif);
mutex_lock(&wl->mutex);
}
return 0; return 0;
} }
......
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