Commit 10b6b801 authored by Ivo van Doorn's avatar Ivo van Doorn Committed by John W. Linville
Browse files

rt2x00: Fix queue index handling

When Q_INDEX is increased, the queue->length should be increased,
only when Q_INDEX_DONE is increased should queue_length be descreased.
Signed-off-by: default avatarIvo van Doorn <>
Signed-off-by: default avatarJohn W. Linville <>
parent 5957da4c
......@@ -84,8 +84,12 @@ void rt2x00queue_index_inc(struct data_queue *queue, enum queue_index index)
if (queue->index[index] >= queue->limit)
queue->index[index] = 0;
queue->count += (index == Q_INDEX_DONE);
if (index == Q_INDEX) {
} else if (index == Q_INDEX_DONE) {
queue->count ++;
Supports Markdown
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