diff options
author | Felix Fietkau | 2020-09-08 19:12:22 +0200 |
---|---|---|
committer | Felix Fietkau | 2020-09-24 18:10:17 +0200 |
commit | 9729ff4cc516cb88e47cda0eff4eaf95e73c5a06 (patch) | |
tree | 1745a7a10ef458c3f899380da6bece0d0655da05 | |
parent | 0642cf4020f78e187b3d71c404fddd068f4bd7bc (diff) |
mt76: testmode: add a limit for queued tx_frames packets
This avoids running out of available tx tokens
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/testmode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/testmode.c b/drivers/net/wireless/mediatek/mt76/testmode.c index f6fd515dfe57..a38abb6868d5 100644 --- a/drivers/net/wireless/mediatek/mt76/testmode.c +++ b/drivers/net/wireless/mediatek/mt76/testmode.c @@ -33,7 +33,8 @@ void mt76_testmode_tx_pending(struct mt76_dev *dev) spin_lock_bh(&q->lock); - while (td->tx_pending > 0 && q->queued < q->ndesc / 2) { + while (td->tx_pending > 0 && td->tx_queued - td->tx_done < 1000 && + q->queued < q->ndesc / 2) { int ret; ret = dev->queue_ops->tx_queue_skb(dev, qid, skb_get(skb), wcid, NULL); |