From patchwork Wed Mar 4 16:30:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arik Nemtsov X-Patchwork-Id: 5938061 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 84B84BF440 for ; Wed, 4 Mar 2015 16:32:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A4DAD201B4 for ; Wed, 4 Mar 2015 16:32:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BF8A8200FF for ; Wed, 4 Mar 2015 16:32:02 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YTCDF-0001JS-Lh; Wed, 04 Mar 2015 16:31:57 +0000 Received: from mail-lb0-x233.google.com ([2a00:1450:4010:c04::233]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YTCCm-0000qU-Q4 for ath10k@lists.infradead.org; Wed, 04 Mar 2015 16:31:32 +0000 Received: by lbiz12 with SMTP id z12so22545134lbi.5 for ; Wed, 04 Mar 2015 08:31:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=+bDZ+IAfqWtENpdNhJyTIxUUcvETRJuJ4VKqbVvduKE=; b=NJN5EpllW3IWP+N2DamFBTrE4PcgOo22Y4le/pCMdH4p43hyfFQDLrscaZ5G3CYrJz 0a50KHCJWkR+vEpnBEUGU0hZCpBO5G2axZzXg+MRoJTbML9gtk+iKGYmCyv59kz138XO 9Regj2MaQNB3G/0MsavR+x2e+lnxrCqRpRgDClHWHEgJAN1/eXvoTvoZbv4pNCvaBJaO Nc/fR+BfvQ+7qkp9Hcghjzn4HpYh6QsjmgWSvXs6EH+qDlmEai9BGAcxIEzIWU8Cm+Sl YejUCsFF/mhy5F3vstDNp1BCze7XEOBzHiFaZ10bUqnPxik7KwWFoIOWuPbm/f6QVzV9 b2gw== X-Received: by 10.112.162.232 with SMTP id yd8mr4138291lbb.41.1425486666316; Wed, 04 Mar 2015 08:31:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.55.133 with HTTP; Wed, 4 Mar 2015 08:30:50 -0800 (PST) In-Reply-To: References: <1424850911-21017-1-git-send-email-marek.puzyniak@tieto.com> <1424850911-21017-4-git-send-email-marek.puzyniak@tieto.com> <1425041427.1960.1.camel@sipsolutions.net> <1425374299.2450.18.camel@sipsolutions.net> <1425377192.2450.34.camel@sipsolutions.net> <1425456998.1810.3.camel@sipsolutions.net> From: Arik Nemtsov Date: Wed, 4 Mar 2015 18:30:50 +0200 X-Google-Sender-Auth: Unbwj336DMBcdp3PCsuAUzlNXrk Message-ID: Subject: Re: [PATCH v2 3/4] mac80211: initialize rate control earlier for tdls station To: Marek Puzyniak X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150304_083129_071171_3E4FE332 X-CRM114-Status: GOOD ( 17.95 ) X-Spam-Score: -0.5 (/) Cc: Johannes Berg , "linux-wireless@vger.kernel.org" , "ath10k@lists.infradead.org" , Arik Nemtsov X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, Mar 4, 2015 at 12:38 PM, Marek Puzyniak wrote: > On 4 March 2015 at 11:04, Arik Nemtsov wrote: >> I can do it, but I'll probably only get to it next week. > > I will try to prepare patch this week, if not I will wait for Arik's > proposition. > > For ath10k rate control need to be initialised before moving to > STA_AUTHORIZED, so initialising rate control before STA_ASSOC is > perfectly fine. Ok I did get to it today :) With the attached patch applied, and the patch "mac80211: update TDLS sta spatial streams before auth" reverted, I'm getting good performance on iwlwifi. Arik From 133a9b280c23fa0d49e93dae8655b9514ac71fee Mon Sep 17 00:00:00 2001 From: Marek Puzyniak Date: Wed, 25 Feb 2015 08:55:10 +0100 Subject: [PATCH] mac80211: initialize rate control earlier for tdls station Currently when TDLS station in driver goes from assoc to authorized state it can not use rate control parameters because rate control is not initialized yet. Some drivers require parameters already initialized by rate control when entering authorized state. It can be done by initializing rate control after station transition to authorized state but before notifying driver about that. Signed-off-by: Marek Puzyniak Signed-off-by: Arik Nemtsov --- net/mac80211/cfg.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index c13b1af..55b88c7 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -977,6 +977,14 @@ static int sta_apply_auth_flags(struct ieee80211_local *local, if (mask & BIT(NL80211_STA_FLAG_ASSOCIATED) && set & BIT(NL80211_STA_FLAG_ASSOCIATED) && !test_sta_flag(sta, WLAN_STA_ASSOC)) { + /* + * When peer becomes authorized, init rate control as + * well. Some drivers require rate control initialized + * before drv_sta_state() is called. + */ + if (test_sta_flag(sta, WLAN_STA_TDLS_PEER)) + rate_control_rate_init(sta); + ret = sta_info_move_state(sta, IEEE80211_STA_ASSOC); if (ret) return ret; @@ -1381,11 +1389,6 @@ static int ieee80211_change_station(struct wiphy *wiphy, if (err) goto out_err; - /* When peer becomes authorized, init rate control as well */ - if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) && - test_sta_flag(sta, WLAN_STA_AUTHORIZED)) - rate_control_rate_init(sta); - mutex_unlock(&local->sta_mtx); if ((sdata->vif.type == NL80211_IFTYPE_AP || -- 2.1.0