mt76: fix tx status timeout processing
authorFelix Fietkau <nbd@nbd.name>
Fri, 25 Jan 2019 14:10:52 +0000 (15:10 +0100)
committerFelix Fietkau <nbd@nbd.name>
Mon, 18 Feb 2019 19:23:46 +0000 (20:23 +0100)
Remove bogus check for MT_PACKET_ID_NO_ACK in mt76_tx_status_skb_get, which
is already handled in callers and turns timeout calls into no-ops
Do not clean up pending status items on reordering of tx status information
if the timeout is not reached yet

Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/tx.c

index ef38e8626da95fb07d6e0efa4f03d092994e7c7e..5a349fe3e576f606ec2fb1997ed8a394d54d7b3f 100644 (file)
@@ -205,9 +205,6 @@ mt76_tx_status_skb_get(struct mt76_dev *dev, struct mt76_wcid *wcid, int pktid,
 {
        struct sk_buff *skb, *tmp;
 
-       if (pktid == MT_PACKET_ID_NO_ACK)
-               return NULL;
-
        skb_queue_walk_safe(&dev->status_list, skb, tmp) {
                struct mt76_tx_cb *cb = mt76_tx_skb_cb(skb);
 
@@ -217,7 +214,7 @@ mt76_tx_status_skb_get(struct mt76_dev *dev, struct mt76_wcid *wcid, int pktid,
                if (cb->pktid == pktid)
                        return skb;
 
-               if (!pktid &&
+               if (pktid >= 0 &&
                    !time_after(jiffies, cb->jiffies + MT_TX_STATUS_SKB_TIMEOUT))
                        continue;