linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* IBSS merge
@ 2011-02-23 11:35 Johannes Berg
  2011-02-23 11:47 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2011-02-23 11:35 UTC (permalink / raw)
  To: linux-wireless; +Cc: Alina Friedrichsen, Bruno Randolf

Hi,

I'm confused about our IBSS merge code.

ieee80211_rx_bss_info:

...
        /* same BSSID */
        if (memcmp(cbss->bssid, sdata->u.ibss.bssid, ETH_ALEN) == 0)
                goto put_bss;
...
        /* give slow hardware some time to do the TSF sync */
        if (rx_timestamp < IEEE80211_IBSS_MERGE_DELAY)
                goto put_bss;
...


Both of this was added by Alina, but why did the patch adding the first
part not remove the second part again? If we suddenly need to adopt a
new BSSID due to higher TSF why wait for the HW to sync first?

It seems the latter was a workaround for syncing over and over again
when the HW hadn't caught up yet, but that doesn't seem worthwhile any
more since we no longer re-sync with the same BSSID?

johannes


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

* Re: IBSS merge
  2011-02-23 11:35 IBSS merge Johannes Berg
@ 2011-02-23 11:47 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2011-02-23 11:47 UTC (permalink / raw)
  To: linux-wireless; +Cc: Alina Friedrichsen, Bruno Randolf

On Wed, 2011-02-23 at 12:35 +0100, Johannes Berg wrote:
> Hi,
> 
> I'm confused about our IBSS merge code.
> 
> ieee80211_rx_bss_info:
> 
> ...
>         /* same BSSID */
>         if (memcmp(cbss->bssid, sdata->u.ibss.bssid, ETH_ALEN) == 0)
>                 goto put_bss;
> ...
>         /* give slow hardware some time to do the TSF sync */
>         if (rx_timestamp < IEEE80211_IBSS_MERGE_DELAY)
>                 goto put_bss;
> ...
> 
> 
> Both of this was added by Alina, but why did the patch adding the first
> part not remove the second part again? If we suddenly need to adopt a
> new BSSID due to higher TSF why wait for the HW to sync first?
> 
> It seems the latter was a workaround for syncing over and over again
> when the HW hadn't caught up yet, but that doesn't seem worthwhile any
> more since we no longer re-sync with the same BSSID?

So why not do

---
 net/mac80211/ibss.c |    5 -----
 1 file changed, 5 deletions(-)

--- wireless-testing.orig/net/mac80211/ibss.c	2011-02-23 12:30:32.000000000 +0100
+++ wireless-testing/net/mac80211/ibss.c	2011-02-23 12:46:22.000000000 +0100
@@ -31,7 +31,6 @@
 #define IEEE80211_IBSS_JOIN_TIMEOUT (7 * HZ)
 
 #define IEEE80211_IBSS_MERGE_INTERVAL (30 * HZ)
-#define IEEE80211_IBSS_MERGE_DELAY 0x400000
 #define IEEE80211_IBSS_INACTIVITY_LIMIT (60 * HZ)
 
 #define IEEE80211_IBSS_MAX_STA_ENTRIES 128
@@ -397,10 +396,6 @@ static void ieee80211_rx_bss_info(struct
 	       jiffies);
 #endif
 
-	/* give slow hardware some time to do the TSF sync */
-	if (rx_timestamp < IEEE80211_IBSS_MERGE_DELAY)
-		goto put_bss;
-
 	if (beacon_timestamp > rx_timestamp) {
 #ifdef CONFIG_MAC80211_IBSS_DEBUG
 		printk(KERN_DEBUG "%s: beacon TSF higher than "



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

end of thread, other threads:[~2011-02-23 11:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-23 11:35 IBSS merge Johannes Berg
2011-02-23 11:47 ` 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).