Commit 9729ff4c authored by Felix Fietkau's avatar Felix Fietkau

mt76: testmode: add a limit for queued tx_frames packets

This avoids running out of available tx tokens
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 0642cf40
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment