From cf579a2bbda95b8dbe2f568ac237ee457db8daca Mon Sep 17 00:00:00 2001 From: Alina Friedrichsen Date: Thu, 29 Jan 2009 13:56:20 +0100 Subject: [PATCH] --- yaml --- r: 134383 b: refs/heads/master c: c4e3a5844812dd5bf03282e021175d55d608f594 h: refs/heads/master i: 134381: b70e9076e1f272b5f4ed9d23f6b110165dcd63b1 134379: c62247b94421a75a783d274b1c02d718a0b7f0b6 134375: acaff59f04f9515c7febfd6ba054e4ffbe227811 134367: 57d4fd2494e1e7c873307e08ecfc95ef4b947ee5 v: v3 --- [refs] | 2 +- trunk/net/mac80211/mlme.c | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index f103c1064fee..a1650a25370c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f2bffa7ea012befc2230331f97bf9b002c0b62bb +refs/heads/master: c4e3a5844812dd5bf03282e021175d55d608f594 diff --git a/trunk/net/mac80211/mlme.c b/trunk/net/mac80211/mlme.c index 0ece151659c0..73808780f538 100644 --- a/trunk/net/mac80211/mlme.c +++ b/trunk/net/mac80211/mlme.c @@ -1503,13 +1503,22 @@ static int ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, struct ieee80211_bss *bss) { struct ieee80211_local *local = sdata->local; - int res, rates, i, j; + int res = 0, rates, i, j; struct sk_buff *skb; struct ieee80211_mgmt *mgmt; u8 *pos; struct ieee80211_supported_band *sband; union iwreq_data wrqu; + if (local->ops->reset_tsf) { + /* Reset own TSF to allow time synchronization work. */ + local->ops->reset_tsf(local_to_hw(local)); + } + + if ((ifsta->flags & IEEE80211_STA_PREV_BSSID_SET) && + memcmp(ifsta->bssid, bss->bssid, ETH_ALEN) == 0) + return res; + skb = dev_alloc_skb(local->hw.extra_tx_headroom + 400 + sdata->u.sta.ie_proberesp_len); if (!skb) { @@ -1520,13 +1529,11 @@ static int ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; - /* Remove possible STA entries from other IBSS networks. */ - sta_info_flush_delayed(sdata); - - if (local->ops->reset_tsf) { - /* Reset own TSF to allow time synchronization work. */ - local->ops->reset_tsf(local_to_hw(local)); + if (!(ifsta->flags & IEEE80211_STA_PREV_BSSID_SET)) { + /* Remove possible STA entries from other IBSS networks. */ + sta_info_flush_delayed(sdata); } + memcpy(ifsta->bssid, bss->bssid, ETH_ALEN); res = ieee80211_if_config(sdata, IEEE80211_IFCC_BSSID); if (res)