linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mac80211: Improved IBSS merges
@ 2010-02-14 23:33 Benoit Papillault
  2010-02-14 23:33 ` [PATCH 2/2] mac80211: Improved IBSS merges even if BSSID is the same Benoit Papillault
  2010-02-15 13:40 ` [PATCH 1/2] mac80211: Improved IBSS merges Jouni Malinen
  0 siblings, 2 replies; 7+ messages in thread
From: Benoit Papillault @ 2010-02-14 23:33 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Benoit Papillault

According to $11.1.4 from IEEE 802.11-2007, TSF is reset (drv_reset_tsf)
on MLME-JOIN, ie only when a new IBSS is created or if an existing IBSS
is joined, but not on IBSS merges.

Signed-off-by: Benoit Papillault <benoit.papillault@free.fr>
---
 net/mac80211/ibss.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 423befa..9328395 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -77,9 +77,6 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 	u32 bss_change;
 	u8 supp_rates[IEEE80211_MAX_SUPP_RATES];
 
-	/* Reset own TSF to allow time synchronization work. */
-	drv_reset_tsf(local);
-
 	skb = ifibss->skb;
 	rcu_assign_pointer(ifibss->presp, NULL);
 	synchronize_rcu();
@@ -579,6 +576,8 @@ static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)
 	else
 		sdata->drop_unencrypted = 0;
 
+	drv_reset_tsf(local);
+
 	__ieee80211_sta_join_ibss(sdata, bssid, sdata->vif.bss_conf.beacon_int,
 				  ifibss->channel, 3, /* first two are basic */
 				  capability, 0);
@@ -634,6 +633,7 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)
 		       " based on configured SSID\n",
 		       sdata->name, cbss->bssid);
 
+		drv_reset_tsf(local);
 		ieee80211_sta_join_ibss(sdata, bss);
 		ieee80211_rx_bss_put(local, bss);
 		return;
-- 
1.5.6.5


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

end of thread, other threads:[~2010-02-15 22:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-14 23:33 [PATCH 1/2] mac80211: Improved IBSS merges Benoit Papillault
2010-02-14 23:33 ` [PATCH 2/2] mac80211: Improved IBSS merges even if BSSID is the same Benoit Papillault
2010-02-15  9:28   ` Johannes Berg
2010-02-15 22:24     ` Benoit PAPILLAULT
2010-02-15  9:29   ` Johannes Berg
2010-02-15 13:40 ` [PATCH 1/2] mac80211: Improved IBSS merges Jouni Malinen
2010-02-15 14:44   ` Johannes Berg

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