From 628eee9c386c7f492ecffb8d35ae85d32173cfc1 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 9 May 2021 22:48:32 +0200 Subject: [PATCH] mt76: fill queue entry wcid for all skbs with a station Fixes issues with tx completion Signed-off-by: Felix Fietkau --- tx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tx.c b/tx.c index 3cb58183..70a83013 100644 --- a/tx.c +++ b/tx.c @@ -261,11 +261,15 @@ __mt76_tx_queue_skb(struct mt76_phy *phy, int qid, struct sk_buff *skb, non_aql = !info->tx_time_est; idx = dev->queue_ops->tx_queue_skb(dev, q, skb, wcid, sta); - if (idx < 0 || !sta || !non_aql) + if (idx < 0 || !sta) return idx; wcid = (struct mt76_wcid *)sta->drv_priv; q->entry[idx].wcid = wcid->idx; + + if (!non_aql) + return idx; + pending = atomic_inc_return(&wcid->non_aql_packets); if (stop && pending >= MT_MAX_NON_AQL_PKT) *stop = true;