linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* IBSS issues
@ 2009-02-27  4:04 Sujith
  2009-02-27  8:25 ` Alina Friedrichsen
  0 siblings, 1 reply; 12+ messages in thread
From: Sujith @ 2009-02-27  4:04 UTC (permalink / raw)
  To: linux-wireless

I am seeing some strange behavior in IBSS mode with current wireless-testing.

Scenario:

 * Create a new cell using ath9k.
 * Wait for a while to do a background merge scan run.
 * Join the cell from another peer ( say, using ath5k ).
 * Station dump in peer1 1 doesn't show the new peer right away.
 * The merge runs are not supposed to happen if a cell has more than one peer.
   It didn't happen before, but it keeps running repeatedly now.
 * Ping from peer2 to peer1 doesn't go through - peer1 to peer2 works though.

Joining an existing IBSS network using ath9k works fine, no issues here.
Also, if the second peer joins the cell quickly, before the scan run, things are okay.

I identified one bug, where the timestamp in the beacon template was not updated.
Patch below. But it doesn't fix the issue.

Any clues ?

Sujith

In IBSS mode, the beacon timestamp has to be filled with the
BSS's timestamp when joining, and set to zero when creating
a new BSS.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index a96ce9d..f4becc1 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -64,7 +64,7 @@ static int __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 				     const int freq,
 				     const size_t supp_rates_len,
 				     const u8 *supp_rates,
-				     const u16 capability)
+				     const u16 capability, u64 tsf)
 {
 	struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
 	struct ieee80211_local *local = sdata->local;
@@ -127,6 +127,7 @@ static int __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 	memcpy(mgmt->bssid, ifibss->bssid, ETH_ALEN);
 	mgmt->u.beacon.beacon_int =
 		cpu_to_le16(local->hw.conf.beacon_int);
+	mgmt->u.beacon.timestamp = cpu_to_le64(tsf);
 	mgmt->u.beacon.capab_info = cpu_to_le16(capability);
 
 	pos = skb_put(skb, 2 + ifibss->ssid_len);
@@ -199,7 +200,8 @@ static int ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 					 bss->cbss.beacon_interval,
 					 bss->cbss.channel->center_freq,
 					 bss->supp_rates_len, bss->supp_rates,
-					 bss->cbss.capability);
+					 bss->cbss.capability,
+					 bss->cbss.tsf);
 }
 
 static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
@@ -502,7 +504,7 @@ static int ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)
 					 bssid, local->hw.conf.beacon_int,
 					 local->hw.conf.channel->center_freq,
 					 sband->n_bitrates, supp_rates,
-					 capability);
+					 capability, 0);
 }
 
 static int ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)

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

end of thread, other threads:[~2009-02-27 21:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-27  4:04 IBSS issues Sujith
2009-02-27  8:25 ` Alina Friedrichsen
2009-02-27  8:44   ` Sujith
2009-02-27  9:53     ` Alina Friedrichsen
2009-02-27 10:14       ` Sujith
2009-02-27 10:56         ` Alina Friedrichsen
2009-02-27  9:01   ` Alina Friedrichsen
2009-02-27  9:24     ` Sujith
2009-02-27 10:19       ` Alina Friedrichsen
2009-02-27 10:32         ` Sujith
2009-02-27 11:02           ` Alina Friedrichsen
2009-02-27 21:53           ` 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).