From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Felix Fietkau <nbd@nbd.name>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mt76: fix rx amsdu subframe processing
Date: Wed, 7 Apr 2021 12:53:42 +0200 [thread overview]
Message-ID: <YG2PNuope0XR1RPK@lore-desk> (raw)
In-Reply-To: <20210406182235.14377-1-nbd@nbd.name>
[-- Attachment #1: Type: text/plain, Size: 1742 bytes --]
> When receiving an A-MSDU containing only a single subframe, status->last_amsdu
> is set, but no previous head is present in the rx A-MSDU queue.
> In this case, the A-MSDU subframe will be held until the next one is received,
> potentially causing significant extra latency.
> Fix this by releasing the frame instead of creating a new queue head if
> last_amsdu is set.
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
>
> Fixes: c7fd4a5d3f75 ("mt76: mt7915: enable hw rx-amsdu de-aggregation")
> Signed-off-by: Felix Fietkau <nbd@nbd.name>
> ---
> drivers/net/wireless/mediatek/mt76/mac80211.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c
> index 7684a8cf00fb..0d92b658b6a6 100644
> --- a/drivers/net/wireless/mediatek/mt76/mac80211.c
> +++ b/drivers/net/wireless/mediatek/mt76/mac80211.c
> @@ -517,10 +517,14 @@ static void mt76_rx_release_burst(struct mt76_phy *phy, enum mt76_rxq_id q,
>
> /* first amsdu subframe */
> if (status->amsdu && !phy->rx_amsdu[q].head) {
> + if (status->last_amsdu) {
> + nskb = skb;
> + goto reset_burst;
> + }
> phy->rx_amsdu[q].tail = &skb_shinfo(skb)->frag_list;
> phy->rx_amsdu[q].seqno = status->seqno;
> phy->rx_amsdu[q].head = skb;
> - goto enqueue;
> + return;
> }
>
> /* ampdu or out-of-order amsdu subframes */
> @@ -543,7 +547,6 @@ static void mt76_rx_release_burst(struct mt76_phy *phy, enum mt76_rxq_id q,
> reset_burst:
> phy->rx_amsdu[q].head = NULL;
> phy->rx_amsdu[q].tail = NULL;
> -enqueue:
> if (nskb)
> __skb_queue_tail(&dev->rx_skb[q], nskb);
> }
> --
> 2.30.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2021-04-07 10:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-06 18:22 [PATCH] mt76: fix rx amsdu subframe processing Felix Fietkau
2021-04-07 10:53 ` Lorenzo Bianconi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YG2PNuope0XR1RPK@lore-desk \
--to=lorenzo@kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@nbd.name \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox