aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00queue.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 2fd830103415..f7e74a0a7759 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -774,9 +774,7 @@ int rt2x00queue_update_beacon(struct rt2x00_dev *rt2x00dev,
774bool rt2x00queue_for_each_entry(struct data_queue *queue, 774bool rt2x00queue_for_each_entry(struct data_queue *queue,
775 enum queue_index start, 775 enum queue_index start,
776 enum queue_index end, 776 enum queue_index end,
777 void *data, 777 bool (*fn)(struct queue_entry *entry))
778 bool (*fn)(struct queue_entry *entry,
779 void *data))
780{ 778{
781 unsigned long irqflags; 779 unsigned long irqflags;
782 unsigned int index_start; 780 unsigned int index_start;
@@ -807,17 +805,17 @@ bool rt2x00queue_for_each_entry(struct data_queue *queue,
807 */ 805 */
808 if (index_start < index_end) { 806 if (index_start < index_end) {
809 for (i = index_start; i < index_end; i++) { 807 for (i = index_start; i < index_end; i++) {
810 if (fn(&queue->entries[i], data)) 808 if (fn(&queue->entries[i]))
811 return true; 809 return true;
812 } 810 }
813 } else { 811 } else {
814 for (i = index_start; i < queue->limit; i++) { 812 for (i = index_start; i < queue->limit; i++) {
815 if (fn(&queue->entries[i], data)) 813 if (fn(&queue->entries[i]))
816 return true; 814 return true;
817 } 815 }
818 816
819 for (i = 0; i < index_end; i++) { 817 for (i = 0; i < index_end; i++) {
820 if (fn(&queue->entries[i], data)) 818 if (fn(&queue->entries[i]))
821 return true; 819 return true;
822 } 820 }
823 } 821 }