linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mt76: mt7921: fix timestamp check in tx_status
@ 2021-11-22 14:25 Deren Wu
  2021-11-22 14:33 ` Felix Fietkau
  2021-11-22 15:14 ` Lorenzo Bianconi
  0 siblings, 2 replies; 3+ messages in thread
From: Deren Wu @ 2021-11-22 14:25 UTC (permalink / raw)
  To: Felix Fietkau, Lorenzo Bianconi
  Cc: Sean Wang, Soul Huang, YN Chen, Leon Yen, Eric-SY Chang, Deren Wu,
	KM Lin, Robin Chiu, CH Yeh, Posh Sun, Eric Liang, Stella Chang,
	Evelyn Tsai, Ryder Lee, Shayne Chen, linux-wireless,
	linux-mediatek, Deren Wu

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(-)

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;
 		}
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mt76: mt7921: fix timestamp check in tx_status
  2021-11-22 14:25 [PATCH] mt76: mt7921: fix timestamp check in tx_status Deren Wu
@ 2021-11-22 14:33 ` Felix Fietkau
  2021-11-22 15:14 ` Lorenzo Bianconi
  1 sibling, 0 replies; 3+ messages in thread
From: Felix Fietkau @ 2021-11-22 14:33 UTC (permalink / raw)
  To: Deren Wu, Lorenzo Bianconi
  Cc: Sean Wang, Soul Huang, YN Chen, Leon Yen, Eric-SY Chang, KM Lin,
	Robin Chiu, CH Yeh, Posh Sun, Eric Liang, Stella Chang,
	Evelyn Tsai, Ryder Lee, Shayne Chen, linux-wireless,
	linux-mediatek

On 2021-11-22 15:25, 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>

Please drop the "mt7921: " from the subject, since it affects all 
drivers. Other than that, the patch looks good. Thanks!

- Felix

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mt76: mt7921: fix timestamp check in tx_status
  2021-11-22 14:25 [PATCH] mt76: mt7921: fix timestamp check in tx_status Deren Wu
  2021-11-22 14:33 ` Felix Fietkau
@ 2021-11-22 15:14 ` Lorenzo Bianconi
  1 sibling, 0 replies; 3+ messages in thread
From: Lorenzo Bianconi @ 2021-11-22 15:14 UTC (permalink / raw)
  To: Deren Wu
  Cc: Felix Fietkau, Lorenzo Bianconi, Sean Wang, Soul Huang, YN Chen,
	Leon Yen, Eric-SY Chang, KM Lin, Robin Chiu, CH Yeh, Posh Sun,
	Eric Liang, Stella Chang, Evelyn Tsai, Ryder Lee, Shayne Chen,
	linux-wireless, linux-mediatek

[-- Attachment #1: Type: text/plain, Size: 1094 bytes --]

> 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>
> ---

I guess this fix should go in wireless-drivers tree.

Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>

>  drivers/net/wireless/mediatek/mt76/tx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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;
>  		}
> -- 
> 2.18.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-22 15:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-22 14:25 [PATCH] mt76: mt7921: fix timestamp check in tx_status Deren Wu
2021-11-22 14:33 ` Felix Fietkau
2021-11-22 15:14 ` Lorenzo Bianconi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).