Return-path: 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 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> (sfid-20180528_145059_943808_057B59A8) References: <20180327171815.GA31338@redhat.com> <20180327174302.GB1206@makrotopia.org> <20180417194255.GA17067@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Sender: linux-wireless-owner@vger.kernel.org List-ID: 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: 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) { 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