Skip to content

Commit

Permalink
mac80211: Fix IBSS merge
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sujith authored and John W. Linville committed Nov 4, 2009
1 parent b35686d commit 450aae3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/mac80211/ibss.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,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;

Expand Down

0 comments on commit 450aae3

Please sign in to comment.