usb_buf: Actually limit queue to 3 elements, not 4

In Change-ID Ie15183f16b22193ffdaf01845db2eae4c7f43c17 we wanted
to limit the number of queue elements to 3, but actually implemented 4.

Change-Id: Ic5fb164f2dfd1c293c51bee8184fc34552267a54
This commit is contained in:
Harald Welte
2019-12-15 13:31:18 +01:00
parent 56be0bf317
commit ad117091ca

View File

@@ -80,7 +80,7 @@ int usb_buf_submit(struct msgb *msg)
/* no need for irqsafe operation, as the usb_tx_queue is
* processed only by the main loop context */
if (ep->queue_len > USB_MAX_QLEN) {
if (ep->queue_len >= USB_MAX_QLEN) {
struct msgb *evict;
/* free the first pending buffer in the queue */
TRACE_INFO("EP%02x: dropping first queue element (qlen=%u)\r\n",