mac80211: don't re-init rate control when receiving mesh beacon

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sat Sep 29 10:59:35 EDT 2012


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=bae35d92b6a1b6fd8c699415ab90aeeea2a56bc3
Commit:     bae35d92b6a1b6fd8c699415ab90aeeea2a56bc3
Parent:     173f8654746c138a08f51a8a0db7747763a896a2
Author:     Chun-Yeow Yeoh <yeohchunyeow at gmail.com>
AuthorDate: Tue Jul 24 11:52:35 2012 +0800
Committer:  Johannes Berg <johannes.berg at intel.com>
CommitDate: Tue Jul 31 16:10:55 2012 +0200

    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 at gmail.com>
    [clarify commit message]
    Signed-off-by: Johannes Berg <johannes.berg at intel.com>
---
 net/mac80211/mesh_plink.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index af671b9..fa642c7 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,
 
 	spin_lock_bh(&sta->lock);
 	sta->last_rx = jiffies;
+	if (sta->plink_state == NL80211_PLINK_ESTAB) {
+		spin_unlock_bh(&sta->lock);
+		return sta;
+	}
+
 	sta->sta.supp_rates[band] = rates;
 	if (elems->ht_cap_elem &&
 	    sdata->local->_oper_channel_type != NL80211_CHAN_NO_HT)



More information about the linux-mtd-cvs mailing list