Commit ebb75b1b authored by Deren Wu's avatar Deren Wu Committed by Kalle Valo
Browse files

mt76: fix timestamp check in tx_status



Should keep SKBs only if timeout timestamp is still after jiffies.
Otherwise, report tx status and drop it direclty.

Fixes: bd1e3e7b ("mt76: introduce packet_id idr")
Signed-off-by: default avatarDeren Wu <deren.wu@mediatek.com>
Acked-by: default avatarFelix Fietkau <nbd@nbd.name>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/7e3784949c0b29a00465966b89fdb0192bd0298e.1637593492.git.deren.wu@mediatek.com
parent 6e53d6d2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ mt76_tx_status_skb_get(struct mt76_dev *dev, struct mt76_wcid *wcid, int pktid,
			if (!(cb->flags & MT_TX_CB_DMA_DONE))
				continue;

			if (!time_is_after_jiffies(cb->jiffies +
			if (time_is_after_jiffies(cb->jiffies +
						   MT_TX_STATUS_SKB_TIMEOUT))
				continue;
		}