linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: respond to beacon loss report only once
@ 2009-05-12 17:58 Johannes Berg
  2009-05-18 15:02 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2009-05-12 17:58 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, Kalle Valo

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.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
 net/mac80211/mlme.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

--- wireless-testing.orig/net/mac80211/mlme.c	2009-05-12 19:55:05.000000000 +0200
+++ wireless-testing/net/mac80211/mlme.c	2009-05-12 19:56:32.000000000 +0200
@@ -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 "



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mac80211: respond to beacon loss report only once
  2009-05-12 17:58 [PATCH] mac80211: respond to beacon loss report only once Johannes Berg
@ 2009-05-18 15:02 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2009-05-18 15:02 UTC (permalink / raw)
  To: Johannes Berg; +Cc: John Linville, linux-wireless

Johannes Berg <johannes@sipsolutions.net> writes:

> 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.

> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>

Reviewed-by: Kalle Valo <kalle.valo@iki.fi>

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-18 15:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-12 17:58 [PATCH] mac80211: respond to beacon loss report only once Johannes Berg
2009-05-18 15:02 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).