linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: Cancel pending probereq poll on beacon RX
@ 2009-05-14 18:15 Jouni Malinen
  0 siblings, 0 replies; only message in thread
From: Jouni Malinen @ 2009-05-14 18:15 UTC (permalink / raw)
  To: John W. Linville, Johannes Berg; +Cc: linux-wireless

While the probe request poll is expected to work, it looks like it
does not always result in getting a response. The exact reason for
this is unclear, but anyway, if we do receive a Beacon frame from our
AP, there is no need to disconnect based on the probereq poll. This
seems to help keep the connection bit more stable in cases where
beacon loss is occurring semi-frequently.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>

---
 net/mac80211/mlme.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

--- wireless-testing.orig/net/mac80211/mlme.c	2009-05-14 21:12:52.000000000 +0300
+++ wireless-testing/net/mac80211/mlme.c	2009-05-14 21:13:08.000000000 +0300
@@ -1820,6 +1820,16 @@ static void ieee80211_rx_mgmt_beacon(str
 	    memcmp(ifmgd->bssid, mgmt->bssid, ETH_ALEN) != 0)
 		return;
 
+	if (ifmgd->flags & IEEE80211_STA_PROBEREQ_POLL) {
+#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
+		if (net_ratelimit()) {
+			printk(KERN_DEBUG "%s: cancelling probereq poll due "
+			       "to a received beacon\n", sdata->dev->name);
+		}
+#endif
+		ifmgd->flags &= ~IEEE80211_STA_PROBEREQ_POLL;
+	}
+
 	ncrc = crc32_be(0, (void *)&mgmt->u.beacon.beacon_int, 4);
 	ncrc = ieee802_11_parse_elems_crc(mgmt->u.beacon.variable,
 					  len - baselen, &elems,

-- 
Jouni Malinen                                            PGP id EFC895FA

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-05-14 18:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-14 18:15 [PATCH] mac80211: Cancel pending probereq poll on beacon RX Jouni Malinen

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