diff mbox series

mt76: fix timestamp check in tx_status

Message ID 7e3784949c0b29a00465966b89fdb0192bd0298e.1637593492.git.deren.wu@mediatek.com (mailing list archive)
State New, archived
Headers show
Series mt76: fix timestamp check in tx_status | expand

Commit Message

Deren Wu Nov. 22, 2021, 3:10 p.m. UTC
From: Deren Wu <deren.wu@mediatek.com>

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

Fixes: bd1e3e7b693c ("mt76: introduce packet_id idr")
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/tx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Felix Fietkau Nov. 22, 2021, 4 p.m. UTC | #1
On 2021-11-22 16:10, Deren Wu wrote:
> From: Deren Wu <deren.wu@mediatek.com>
> 
> Should keep SKBs only if timeout timestamp is still after jiffies.
> Otherwise, report tx status and drop it direclty.
> 
> Fixes: bd1e3e7b693c ("mt76: introduce packet_id idr")
> Signed-off-by: Deren Wu <deren.wu@mediatek.com>

Acked-by: Felix Fietkau <nbd@nbd.name>

Kalle, please queue this for 5.16

- Felix
Kalle Valo Nov. 22, 2021, 6:24 p.m. UTC | #2
Felix Fietkau <nbd@nbd.name> writes:

> On 2021-11-22 16:10, Deren Wu wrote:
>> From: Deren Wu <deren.wu@mediatek.com>
>>
>> Should keep SKBs only if timeout timestamp is still after jiffies.
>> Otherwise, report tx status and drop it direclty.
>>
>> Fixes: bd1e3e7b693c ("mt76: introduce packet_id idr")
>> Signed-off-by: Deren Wu <deren.wu@mediatek.com>
>
> Acked-by: Felix Fietkau <nbd@nbd.name>
>
> Kalle, please queue this for 5.16

Ok, assigned the patch to me on patchwork.

(A feature request for patchwork devs: assign patches based on email
commands)
Kalle Valo Nov. 24, 2021, 5:21 p.m. UTC | #3
Deren Wu <Deren.Wu@mediatek.com> wrote:

> From: Deren Wu <deren.wu@mediatek.com>
> 
> Should keep SKBs only if timeout timestamp is still after jiffies.
> Otherwise, report tx status and drop it direclty.
> 
> Fixes: bd1e3e7b693c ("mt76: introduce packet_id idr")
> Signed-off-by: Deren Wu <deren.wu@mediatek.com>
> Acked-by: Felix Fietkau <nbd@nbd.name>

Patch applied to wireless-drivers.git, thanks.

ebb75b1b43d3 mt76: fix timestamp check in tx_status
diff mbox series

Patch

diff --git a/drivers/net/wireless/mediatek/mt76/tx.c b/drivers/net/wireless/mediatek/mt76/tx.c
index 11719ef034d8..6b8c9dc80542 100644
--- a/drivers/net/wireless/mediatek/mt76/tx.c
+++ b/drivers/net/wireless/mediatek/mt76/tx.c
@@ -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;
 		}