summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti/wlcore/event.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ti/wlcore/event.c')
-rw-r--r--drivers/net/wireless/ti/wlcore/event.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/net/wireless/ti/wlcore/event.c b/drivers/net/wireless/ti/wlcore/event.c
index 28e2a633c3be..4ed835799178 100644
--- a/drivers/net/wireless/ti/wlcore/event.c
+++ b/drivers/net/wireless/ti/wlcore/event.c
@@ -148,15 +148,24 @@ static int wl1271_event_process(struct wl1271 *wl)
int delay = wl->conf.conn.synch_fail_thold *
wl->conf.conn.bss_lose_timeout;
wl1271_info("Beacon loss detected.");
- cancel_delayed_work_sync(&wl->connection_loss_work);
+
+ /*
+ * if the work is already queued, it should take place. We
+ * don't want to delay the connection loss indication
+ * any more.
+ */
ieee80211_queue_delayed_work(wl->hw, &wl->connection_loss_work,
- msecs_to_jiffies(delay));
+ msecs_to_jiffies(delay));
}
if (vector & REGAINED_BSS_EVENT_ID) {
/* TODO: check for multi-role */
wl1271_info("Beacon regained.");
- cancel_delayed_work_sync(&wl->connection_loss_work);
+ cancel_delayed_work(&wl->connection_loss_work);
+
+ /* sanity check - we can't lose and gain the beacon together */
+ WARN(vector & BSS_LOSE_EVENT_ID,
+ "Concurrent beacon loss and gain from FW");
}
if (vector & RSSI_SNR_TRIGGER_0_EVENT_ID) {