From patchwork Mon Nov 14 08:45:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislaw Gruszka X-Patchwork-Id: 9426843 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 833F660755 for ; Mon, 14 Nov 2016 08:47:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B803286BD for ; Mon, 14 Nov 2016 08:47:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 70379286EE; Mon, 14 Nov 2016 08:47:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF20D286ED for ; Mon, 14 Nov 2016 08:47:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933052AbcKNIq5 (ORCPT ); Mon, 14 Nov 2016 03:46:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42380 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932954AbcKNIq4 (ORCPT ); Mon, 14 Nov 2016 03:46:56 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C9F5F8F4E3; Mon, 14 Nov 2016 08:46:55 +0000 (UTC) Received: from localhost (dhcp-27-90.brq.redhat.com [10.34.27.90]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uAE8ksl2016506; Mon, 14 Nov 2016 03:46:55 -0500 Date: Mon, 14 Nov 2016 09:45:36 +0100 From: Stanislaw Gruszka To: Mathias Kresin Cc: linux-wireless@vger.kernel.org, Helmut Schaa Subject: Re: [PATCH 05/10] rt2800: make ba_size depend on ampdu_factor Message-ID: <20161114084536.GB12372@redhat.com> References: <1478095865-8651-1-git-send-email-sgruszka@redhat.com> <1478095865-8651-6-git-send-email-sgruszka@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-12-10) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 14 Nov 2016 08:46:55 +0000 (UTC) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Sat, Nov 05, 2016 at 01:56:58PM +0100, Mathias Kresin wrote: > 02.11.2016 15:11, Stanislaw Gruszka: > > > >- sta_priv = sta_to_rt2x00_sta(sta); > >+ txdesc->u.ht.mpdu_density = sta->ht_cap.ampdu_density; > > txdesc->u.ht.wcid = sta_priv->wcid; > >+ > >+ if (!(tx_info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE)) { > >+ ba_size = IEEE80211_MIN_AMPDU_BUF; > >+ ba_size <<= sta->ht_cap.ampdu_factor; > >+ ba_size = min_t(int, 63, ba_size - 1); > >+ } > > } > > > > /* > >@@ -345,7 +350,7 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev, > > return; > > } > > > >- txdesc->u.ht.ba_size = 7; /* FIXME: What value is needed? */ > >+ txdesc->u.ht.ba_size = ba_size; > > > > /* > > * Only one STBC stream is supported for now. > > > > Having this patch applied, the throughput on a vgv7510kw22 (RT3062F) > in AP mode using LEDE head is decreased by somewhat around 10 > Mbits/sec. I'm using iperf3 for throughput tests and having this > patch reverted the throughout is back to 80 Mbits/sec. > > When bringing down the wifi interface the following messages are > logged with the patch applied: > > [ 281.738373] ieee80211 phy0: rt2x00queue_flush_queue: Warning - > Queue 2 failed to flush > [ 281.906380] ieee80211 phy0: rt2x00queue_flush_queue: Warning - > Queue 2 failed to flush Could you check below patch and see if it helps? If it does not, could you printk sta->ht_cap.ampdu_density and ba_size values and provide them here. Thanks Stanislaw diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c index 2515702..72c7948 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c @@ -4707,7 +4707,7 @@ static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev) rt2x00_rt_rev_lt(rt2x00dev, RT3070, REV_RT3070E)) rt2x00_set_field32(®, MAX_LEN_CFG_MAX_PSDU, 2); else - rt2x00_set_field32(®, MAX_LEN_CFG_MAX_PSDU, 1); + rt2x00_set_field32(®, MAX_LEN_CFG_MAX_PSDU, 3; rt2x00_set_field32(®, MAX_LEN_CFG_MIN_PSDU, 0); rt2x00_set_field32(®, MAX_LEN_CFG_MIN_MPDU, 0); rt2800_register_write(rt2x00dev, MAX_LEN_CFG, reg);