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: 5938051 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@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 2648ABF440 for ; Wed, 4 Mar 2015 16:31:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 961AE201C8 for ; Wed, 4 Mar 2015 16:31:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C8347201B4 for ; Wed, 4 Mar 2015 16:31:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759015AbbCDQbK (ORCPT ); Wed, 4 Mar 2015 11:31:10 -0500 Received: from mail-lb0-f172.google.com ([209.85.217.172]:43578 "EHLO mail-lb0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758993AbbCDQbI (ORCPT ); Wed, 4 Mar 2015 11:31:08 -0500 Received: by lbvp9 with SMTP id p9so10275380lbv.10 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 Cc: Johannes Berg , Arik Nemtsov , "linux-wireless@vger.kernel.org" , "ath10k@lists.infradead.org" Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=ham 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