aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 52bb57ddc05f..fde64ea3f4ef 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -84,8 +84,12 @@ void rt2x00queue_index_inc(struct data_queue *queue, enum queue_index index)
84 if (queue->index[index] >= queue->limit) 84 if (queue->index[index] >= queue->limit)
85 queue->index[index] = 0; 85 queue->index[index] = 0;
86 86
87 queue->length--; 87 if (index == Q_INDEX) {
88 queue->count += (index == Q_INDEX_DONE); 88 queue->length++;
89 } else if (index == Q_INDEX_DONE) {
90 queue->length--;
91 queue->count ++;
92 }
89 93
90 spin_unlock(&queue->lock); 94 spin_unlock(&queue->lock);
91} 95}