aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ibss.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-11-02 02:03:23 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-04 18:44:52 -0500
commit450aae3d7b60a970f266349a837dfb30a539198b (patch)
tree1d45c9bca4c34736eef9d9772edea798c9c66fa6 /net/mac80211/ibss.c
parentb35686d0b2d754d627aeb0c4340884aeaed8e4f3 (diff)
mac80211: Fix IBSS merge
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> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ibss.c')
-rw-r--r--net/mac80211/ibss.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index ca8ecce31d34..6ae288387a11 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -453,6 +453,10 @@ static void ieee80211_sta_merge_ibss(struct ieee80211_sub_if_data *sdata)
453 453
454 ieee80211_sta_expire(sdata, IEEE80211_IBSS_INACTIVITY_LIMIT); 454 ieee80211_sta_expire(sdata, IEEE80211_IBSS_INACTIVITY_LIMIT);
455 455
456 if (time_before(jiffies, ifibss->last_scan_completed +
457 IEEE80211_IBSS_MERGE_INTERVAL))
458 return;
459
456 if (ieee80211_sta_active_ibss(sdata)) 460 if (ieee80211_sta_active_ibss(sdata))
457 return; 461 return;
458 462