From fc222c9c622c2f73539ddc04f9eb4319b9fad6dd Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 13 Mar 2015 13:12:58 +0100 Subject: [PATCH] tx: suppress redundant calls to ieee80211_tx_status() Signed-off-by: Felix Fietkau --- tx.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tx.c b/tx.c index 099a37b7..651da583 100644 --- a/tx.c +++ b/tx.c @@ -62,10 +62,14 @@ void mt76_tx_complete(struct mt76_dev *dev, struct sk_buff *skb) struct mt76_queue *q; int qid = skb_get_queue_mapping(skb); - ieee80211_tx_info_clear_status(info); - info->status.rates[0].idx = -1; - info->flags |= IEEE80211_TX_STAT_ACK; - ieee80211_tx_status(dev->hw, skb); + if (info->control.flags & IEEE80211_TX_CTL_AMPDU) { + ieee80211_free_txskb(dev->hw, skb); + } else { + ieee80211_tx_info_clear_status(info); + info->status.rates[0].idx = -1; + info->flags |= IEEE80211_TX_STAT_ACK; + ieee80211_tx_status(dev->hw, skb); + } q = &dev->q_tx[qid]; if (q->queued < q->ndesc - 8)