From patchwork Tue Nov 27 17:03:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helmut Schaa X-Patchwork-Id: 1812011 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id D29713FC54 for ; Tue, 27 Nov 2012 17:03:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932110Ab2K0RDd (ORCPT ); Tue, 27 Nov 2012 12:03:33 -0500 Received: from mail-wg0-f42.google.com ([74.125.82.42]:33497 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756185Ab2K0RDd (ORCPT ); Tue, 27 Nov 2012 12:03:33 -0500 Received: by mail-wg0-f42.google.com with SMTP id dr1so2756716wgb.1 for ; Tue, 27 Nov 2012 09:03:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=8s4/7IrgHuJwolmGn1ddJrSBq5cMA20WGkTEik8N3YI=; b=oeehh4G16NUTuSzTu+3d0M4aLgOQBFsgG03tY9+A5/t9gv28zfLJOM3qUJKsfdq93W vIMCrohitcVAt/2l5sSpbvWr8amGJVi64ajK11d4syYMfWudikL398QrRKTL1/xy2YH1 EYgvnf9oeROd3omAjfRehezrytRGWynFlnzG1QnNG7zn4EzxrGqt5HK+HqLQo0t2t6Fy Jm0Ffi/FOLC22QJojNcP7TrPIixJNoJVEuuaSJB3jqIn4+XO3xprY8OwIkxbO4qojo5x bHJrj6s5hmFG+1+RmzEm3sZbuXl2HgdEgtU4VyYxzzQsbSTv8pTGn3kpyjd4A5QwS/Rm V3bQ== Received: by 10.216.226.137 with SMTP id b9mr5859447weq.137.1354035811865; Tue, 27 Nov 2012 09:03:31 -0800 (PST) Received: from localhost.localdomain (port-92-198-130-130.static.qsc.de. [92.198.130.130]) by mx.google.com with ESMTPS id bd7sm3723941wib.8.2012.11.27.09.03.31 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 27 Nov 2012 09:03:31 -0800 (PST) From: Helmut Schaa To: johannes@sipsolutions.net Cc: javier@cozybit.com, linux-wireless@vger.kernel.org, Helmut Schaa Subject: [PATCH] mac80211: Don't reinit rate control when mesh sta exists Date: Tue, 27 Nov 2012 18:03:13 +0100 Message-Id: <1354035793-23498-1-git-send-email-helmut.schaa@googlemail.com> X-Mailer: git-send-email 1.7.7 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This fixes some unintended resets of the rate control statistics when minstrel_ht is used resulting in non-optimal throughput on mesh links. Tested-by: Emanuel Taube Signed-off-by: Helmut Schaa --- net/mac80211/mesh_plink.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index 234fe75..0327755 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c @@ -394,7 +394,9 @@ static struct sta_info *mesh_peer_init(struct ieee80211_sub_if_data *sdata, ieee80211_ht_oper_to_channel_type(elems->ht_operation); } - rate_control_rate_init(sta); + if (insert) + rate_control_rate_init(sta); + spin_unlock_bh(&sta->lock); if (insert && sta_info_insert(sta))