Skip to contentSkip to conversation

mac80211: fix beacon loss detection after scan

PATCH Johannes Berg 1 participant 1 message Apr 19, 2009 1 message not in the archive

lore
Share & tools
lore

Johannes Berg

author Acked-by
#1 lore raw
In reply to a message not in the archive
Quoted 11 lines · Kalle Valo

Currently beacon loss detection triggers after a scan. A probe request is sent and a message like this is printed to the log:

wlan0: beacon loss from AP 00:12:17:e7:98:de - sending probe request

But in fact there is no beacon loss, the beacons are just not received because of the ongoing scan. Fix it by updating last_beacon after the scan has finished.

Thanks.

Quoted 30 lines

---

 net/mac80211/mlme.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
net/mac80211/mlme.c +9 -1
index c0f91d5..1b8509d 100644
@@ -2005,9 +2005,17 @@ static void ieee80211_sta_work(struct work_struct *work)
 
 static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata)
 {
-	if (sdata->vif.type == NL80211_IFTYPE_STATION)
+	if (sdata->vif.type == NL80211_IFTYPE_STATION) {
+		/*
+		 * Need to update last_beacon to avoid beacon loss
+		 * test to trigger.
+		 */
+		sdata->u.mgd.last_beacon = jiffies;
+
+
 		queue_work(sdata->local->hw.workqueue,
 			   &sdata->u.mgd.work);
+	}
 }
 
 /* interface setup */