aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2019-12-15 13:31:18 +0100
committerHarald Welte <laforge@osmocom.org>2019-12-15 17:25:13 +0100
commitad117091cafcfae5cbfdd37ddca727f3b940a8c4 (patch)
tree13f7fc7690f4805ac021c703c48c65b43e6967ae
parent56be0bf3176f36534e4ae74ec2c7c3f4c07a8465 (diff)
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
-rw-r--r--firmware/libcommon/source/usb_buf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/libcommon/source/usb_buf.c b/firmware/libcommon/source/usb_buf.c
index 7892d6e..b6ecd54 100644
--- a/firmware/libcommon/source/usb_buf.c
+++ b/firmware/libcommon/source/usb_buf.c
@@ -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",