From patchwork Thu Feb 4 21:46:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benoit PAPILLAULT X-Patchwork-Id: 77220 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o14Lrthd009480 for ; Thu, 4 Feb 2010 21:53:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757791Ab0BDVxt (ORCPT ); Thu, 4 Feb 2010 16:53:49 -0500 Received: from smtp1-g21.free.fr ([212.27.42.1]:52853 "EHLO smtp1-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933007Ab0BDVxs (ORCPT ); Thu, 4 Feb 2010 16:53:48 -0500 Received: from smtp1-g21.free.fr (localhost [127.0.0.1]) by smtp1-g21.free.fr (Postfix) with ESMTP id 06FD5940058; Thu, 4 Feb 2010 22:53:41 +0100 (CET) Received: from benoit-laptop (ns.popipo.fr [88.163.232.53]) by smtp1-g21.free.fr (Postfix) with ESMTP id 2677994017F; Thu, 4 Feb 2010 22:53:39 +0100 (CET) Received: by benoit-laptop (Postfix, from userid 1000) id D87511DE0F8; Thu, 4 Feb 2010 22:46:31 +0100 (CET) From: Benoit Papillault To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Benoit Papillault Subject: [PATCH] mac80211: Improved IBSS merges Date: Thu, 4 Feb 2010 22:46:30 +0100 Message-Id: <1265319990-25583-1-git-send-email-benoit.papillault@free.fr> X-Mailer: git-send-email 1.6.3.3 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 04 Feb 2010 21:53:56 +0000 (UTC) diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index e905c45..5f0c246 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(); @@ -373,10 +370,6 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, sdata->u.ibss.ssid_len)) goto put_bss; - /* same BSSID */ - if (memcmp(cbss->bssid, sdata->u.ibss.bssid, ETH_ALEN) == 0) - goto put_bss; - if (rx_status->flag & RX_FLAG_TSFT) { /* * For correct IBSS merging we need mactime; since mactime is @@ -575,6 +568,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); @@ -630,6 +625,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;