linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: Fix IBSS merge
@ 2009-11-02  7:03 Sujith
  2009-11-02  8:44 ` Johannes Berg
  0 siblings, 1 reply; 11+ messages in thread
From: Sujith @ 2009-11-02  7:03 UTC (permalink / raw)
  To: linville; +Cc: johannes, linux-wireless

Currently, in IBSS mode, a single creator would go into
a loop trying to merge/scan. This happens because the IBSS timer is
rearmed on finishing a scan and the subsequent
timer invocation requests another scan immediately.

This patch fixes this issue by checking if we have just completed
a scan run trying to merge with other IBSS networks.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
 net/mac80211/ibss.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index f1362f3..fbffce9 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -455,6 +455,10 @@ static void ieee80211_sta_merge_ibss(struct ieee80211_sub_if_data *sdata)
 
 	ieee80211_sta_expire(sdata, IEEE80211_IBSS_INACTIVITY_LIMIT);
 
+	if (time_before(jiffies, ifibss->last_scan_completed +
+		       IEEE80211_IBSS_MERGE_INTERVAL))
+		return;
+
 	if (ieee80211_sta_active_ibss(sdata))
 		return;
 
-- 
1.6.5.2


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

end of thread, other threads:[~2009-11-02 20:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-02  7:03 [PATCH] mac80211: Fix IBSS merge Sujith
2009-11-02  8:44 ` Johannes Berg
2009-11-02  9:18   ` Sujith
2009-11-02  9:39     ` Johannes Berg
2009-11-02 15:36   ` John W. Linville
2009-11-02 17:20     ` Felix Fietkau
2009-11-02 17:47       ` Luis R. Rodriguez
2009-11-02 20:27         ` Felix Fietkau
2009-11-02 20:36           ` Luis R. Rodriguez
2009-11-02 20:43             ` John W. Linville
2009-11-02 18:32       ` John W. Linville

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