From patchwork Mon May 28 12:50:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislaw Gruszka X-Patchwork-Id: 10432383 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 C6DBC601BE for ; Mon, 28 May 2018 12:50:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7C5428CAA for ; Mon, 28 May 2018 12:50:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B5D0728D18; Mon, 28 May 2018 12:50:48 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, 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 359AA28CAA for ; Mon, 28 May 2018 12:50:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938991AbeE1Mur (ORCPT ); Mon, 28 May 2018 08:50:47 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:40114 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S938914AbeE1Mun (ORCPT ); Mon, 28 May 2018 08:50:43 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 05D9540201A0; Mon, 28 May 2018 12:50:43 +0000 (UTC) Received: from localhost (unknown [10.40.205.126]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8B1E22026993; Mon, 28 May 2018 12:50:41 +0000 (UTC) Date: Mon, 28 May 2018 14:50:40 +0200 From: Stanislaw Gruszka To: Kofi Agor Cc: Enrico Mioso , Craig Matsuura , Daniel Golle , Mathias Kresin , Tom Psyborg , linux-wireless , Johannes Berg , Arnd Bergmann , John Crispin , Felix Fietkau , Jamie Stuart Subject: Re: ieee80211 phy0: rt2x00queue_write_tx_frame: Error - Dropping frame due to full tx queue...? Message-ID: <20180528125039.GA22122@redhat.com> References: <20180327171815.GA31338@redhat.com> <20180327174302.GB1206@makrotopia.org> <20180417194255.GA17067@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Mon, 28 May 2018 12:50:43 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Mon, 28 May 2018 12:50:43 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'sgruszka@redhat.com' RCPT:'' 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 I have some updates here. First thing is that printing messages by printk can cause few seconds of cpu hang on my mt7620 hardware, what result on wifi disconnects. I realized that when added debug patch like this: solved the problem and improved performance when connecting with this older rt2800 usb device. Even if other rt2800 usb devices respond with correct solicit BA SSN this change is beneficial when connecting two rt2800 devices. Unfortunately sending BAR seems to be needed for some stations, so this need to be investigated a bit more. Another issue is that sometimes we do not sent rate probe frames, I posted fix for that (revert of my older change): https://marc.info/?l=linux-wireless&m=152750671715369&w=2 This patch improve performance when mt7620 is connected with Intel iwl7265 device. With the patch I have 70 Mbits/sec compared to about 17 Mbits/sec before. Perhaps it also fix stability issues. Stanislaw diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c index 595c662a61e8..de2643f7189f 100644 --- a/net/mac80211/agg-tx.c +++ b/net/mac80211/agg-tx.c @@ -135,6 +135,8 @@ void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn) bar->control = cpu_to_le16(bar_control); bar->start_seq_num = cpu_to_le16(ssn); + printk("%s tid %d ssn %04x %d\n", __func__, tid, ssn , ssn >> 4); + IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT | IEEE80211_TX_CTL_REQ_TX_STATUS; ieee80211_tx_skb_tid(sdata, skb, tid); This patch alone cause wifi disconnects. I don't know where problem is, but remove printing i.e. rt2x00_warn() messages can be thing to check if you observe wifi disconnects. Another issue is BA ssn mishmashes which I can observe. Those were causing by older rt2800 usb hardware not responding correctly to BAR frame. I.e for BAR frame with SSN 0x0060 (6), it responded BA with SSN 7fe0 (2046). Removing of posting BAR by this patch: diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c index 357c0941aaad..7e2786464bcf 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c @@ -382,9 +382,6 @@ static void rt2x00lib_fill_tx_status(struct rt2x00_dev *rt2x00dev, IEEE80211_TX_CTL_AMPDU; tx_info->status.ampdu_len = 1; tx_info->status.ampdu_ack_len = success ? 1 : 0; - - if (!success) - tx_info->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK; } if (rate_flags & IEEE80211_TX_RC_USE_RTS_CTS) {