Skip to contentSkip to conversation

IBSS merge

DISCUSSION Johannes Berg 1 participant 2 messages Feb 23, 2011 mac80211

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

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

author maintainer
#1 lore raw
Quoted 17 lines · Johannes Berg

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;

...

Quoted 7 lines

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(-)
net/mac80211/ibss.c +0 -5
@@ -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 "