aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorChun-Yeow Yeoh <yeohchunyeow@gmail.com>2012-07-23 23:52:35 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-07-31 10:10:55 -0400
commitbae35d92b6a1b6fd8c699415ab90aeeea2a56bc3 (patch)
treedbdc9b9626dfce07340530051fa123f2eb6cdd99 /net/mac80211
parent173f8654746c138a08f51a8a0db7747763a896a2 (diff)
mac80211: don't re-init rate control when receiving mesh beacon
Rate control is re-initialized whenever a beacon from a mesh peer received, breaking the algorithms and resulting in low performance. Return early from mesh_peer_init if we already established a link with this peer to avoid this. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> [clarify commit message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/mesh_plink.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index af671b984df3..fa642c794719 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -362,6 +362,11 @@ static struct sta_info *mesh_peer_init(struct ieee80211_sub_if_data *sdata,
362 362
363 spin_lock_bh(&sta->lock); 363 spin_lock_bh(&sta->lock);
364 sta->last_rx = jiffies; 364 sta->last_rx = jiffies;
365 if (sta->plink_state == NL80211_PLINK_ESTAB) {
366 spin_unlock_bh(&sta->lock);
367 return sta;
368 }
369
365 sta->sta.supp_rates[band] = rates; 370 sta->sta.supp_rates[band] = rates;
366 if (elems->ht_cap_elem && 371 if (elems->ht_cap_elem &&
367 sdata->local->_oper_channel_type != NL80211_CHAN_NO_HT) 372 sdata->local->_oper_channel_type != NL80211_CHAN_NO_HT)