Skip to contentSkip to conversation

mac80211: respond to beacon loss report only once

PATCH In review Johannes Berg 2 participants 2 messages May 12, 2009 – May 18, 2009 mac80211

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 mac80211: respond to beacon loss report only once

The driver might keep reporting beacon loss until we disassociate -- catch that and don't respond to any subsequent events until the probe is either successful or we disassociate.

---
 net/mac80211/mlme.c |   11 +++++++++++
 1 file changed, 11 insertions(+)
net/mac80211/mlme.c +11 -0
@@ -1182,6 +1182,17 @@ void ieee80211_beacon_loss_work(struct w
 			     u.mgd.beacon_loss_work);
 	struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
 
+	/*
+	 * The driver has already reported this event and we have
+	 * already sent a probe request. Maybe the AP died and the
+	 * driver keeps reporting until we disassociate... We have
+	 * to ignore that because otherwise we would continually
+	 * reset the timer and never check whether we received a
+	 * probe response!
+	 */
+	if (ifmgd->flags & IEEE80211_STA_PROBEREQ_POLL)
+		return;
+
 #ifdef CONFIG_MAC80211_VERBOSE_DEBUG
 	if (net_ratelimit()) {
 		printk(KERN_DEBUG "%s: driver reports beacon loss from AP %pM "
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Johannes Berg

The driver might keep reporting beacon loss until we disassociate -- catch that and don't respond to any subsequent events until the probe is either successful or we disassociate.

I agree.

Quoted 1 line
Signature · 1 line
Kalle Valo