Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224318
b: refs/heads/master
c: 813f033
h: refs/heads/master
v: v3
  • Loading branch information
Ivo van Doorn authored and John W. Linville committed Nov 15, 2010
1 parent c52ae18 commit 73c399d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 821cde63b5bd04bc3ca0f95e2abf17b04e640488
refs/heads/master: 813f0339dd739c48607f12dac79ec26c61874226
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/rt2x00/rt2x00debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,15 +342,15 @@ static ssize_t rt2x00debug_read_queue_stats(struct file *file,
sprintf(data, "qid\tcount\tlimit\tlength\tindex\tdma done\tdone\n");

queue_for_each(intf->rt2x00dev, queue) {
spin_lock_irqsave(&queue->lock, irqflags);
spin_lock_irqsave(&queue->index_lock, irqflags);

temp += sprintf(temp, "%d\t%d\t%d\t%d\t%d\t%d\t%d\n", queue->qid,
queue->count, queue->limit, queue->length,
queue->index[Q_INDEX],
queue->index[Q_INDEX_DMA_DONE],
queue->index[Q_INDEX_DONE]);

spin_unlock_irqrestore(&queue->lock, irqflags);
spin_unlock_irqrestore(&queue->index_lock, irqflags);
}

size = strlen(data);
Expand Down
18 changes: 9 additions & 9 deletions trunk/drivers/net/wireless/rt2x00/rt2x00queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,10 +641,10 @@ void rt2x00queue_for_each_entry(struct data_queue *queue,
* it should not be kicked during this run, since it
* is part of another TX operation.
*/
spin_lock_irqsave(&queue->lock, irqflags);
spin_lock_irqsave(&queue->index_lock, irqflags);
index_start = queue->index[start];
index_end = queue->index[end];
spin_unlock_irqrestore(&queue->lock, irqflags);
spin_unlock_irqrestore(&queue->index_lock, irqflags);

/*
* Start from the TX done pointer, this guarentees that we will
Expand Down Expand Up @@ -698,11 +698,11 @@ struct queue_entry *rt2x00queue_get_entry(struct data_queue *queue,
return NULL;
}

spin_lock_irqsave(&queue->lock, irqflags);
spin_lock_irqsave(&queue->index_lock, irqflags);

entry = &queue->entries[queue->index[index]];

spin_unlock_irqrestore(&queue->lock, irqflags);
spin_unlock_irqrestore(&queue->index_lock, irqflags);

return entry;
}
Expand All @@ -718,7 +718,7 @@ void rt2x00queue_index_inc(struct data_queue *queue, enum queue_index index)
return;
}

spin_lock_irqsave(&queue->lock, irqflags);
spin_lock_irqsave(&queue->index_lock, irqflags);

queue->index[index]++;
if (queue->index[index] >= queue->limit)
Expand All @@ -733,15 +733,15 @@ void rt2x00queue_index_inc(struct data_queue *queue, enum queue_index index)
queue->count++;
}

spin_unlock_irqrestore(&queue->lock, irqflags);
spin_unlock_irqrestore(&queue->index_lock, irqflags);
}

static void rt2x00queue_reset(struct data_queue *queue)
{
unsigned long irqflags;
unsigned int i;

spin_lock_irqsave(&queue->lock, irqflags);
spin_lock_irqsave(&queue->index_lock, irqflags);

queue->count = 0;
queue->length = 0;
Expand All @@ -751,7 +751,7 @@ static void rt2x00queue_reset(struct data_queue *queue)
queue->last_action[i] = jiffies;
}

spin_unlock_irqrestore(&queue->lock, irqflags);
spin_unlock_irqrestore(&queue->index_lock, irqflags);
}

void rt2x00queue_stop_queues(struct rt2x00_dev *rt2x00dev)
Expand Down Expand Up @@ -903,7 +903,7 @@ void rt2x00queue_uninitialize(struct rt2x00_dev *rt2x00dev)
static void rt2x00queue_init(struct rt2x00_dev *rt2x00dev,
struct data_queue *queue, enum data_queue_qid qid)
{
spin_lock_init(&queue->lock);
spin_lock_init(&queue->index_lock);

queue->rt2x00dev = rt2x00dev;
queue->qid = qid;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/rt2x00/rt2x00queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ enum queue_index {
* @entries: Base address of the &struct queue_entry which are
* part of this queue.
* @qid: The queue identification, see &enum data_queue_qid.
* @lock: Spinlock to protect index handling. Whenever @index, @index_done or
* @index_lock: Spinlock to protect index handling. Whenever @index, @index_done or
* @index_crypt needs to be changed this lock should be grabbed to prevent
* index corruption due to concurrency.
* @count: Number of frames handled in the queue.
Expand All @@ -422,7 +422,7 @@ struct data_queue {

enum data_queue_qid qid;

spinlock_t lock;
spinlock_t index_lock;
unsigned int count;
unsigned short limit;
unsigned short threshold;
Expand Down

0 comments on commit 73c399d

Please sign in to comment.