Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89940
b: refs/heads/master
c: 8f53927
h: refs/heads/master
v: v3
  • Loading branch information
Ivo van Doorn authored and John W. Linville committed Feb 29, 2008
1 parent cba52ec commit 7de9b12
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 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: 647d0ca905f7d975e0bf41f571de6f443c814913
refs/heads/master: 8f539276ee97bd174f644fb6c18bb9965b596032
33 changes: 18 additions & 15 deletions trunk/drivers/net/wireless/rt2x00/rt2x00queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,18 @@ 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);

queue->rt2x00dev = rt2x00dev;
queue->qid = qid;
queue->aifs = 2;
queue->cw_min = 5;
queue->cw_max = 10;
}

int rt2x00queue_allocate(struct rt2x00_dev *rt2x00dev)
{
struct data_queue *queue;
Expand Down Expand Up @@ -265,24 +277,15 @@ int rt2x00queue_allocate(struct rt2x00_dev *rt2x00dev)
* TX: cw_max: 2^10 = 1024.
* BCN & Atim: qid = QID_MGMT
*/
qid = QID_AC_BE;
queue_for_each(rt2x00dev, queue) {
spin_lock_init(&queue->lock);
rt2x00queue_init(rt2x00dev, rt2x00dev->rx, QID_RX);

queue->rt2x00dev = rt2x00dev;
queue->qid = qid++;
queue->aifs = 2;
queue->cw_min = 5;
queue->cw_max = 10;
}
qid = QID_AC_BE;
tx_queue_for_each(rt2x00dev, queue)
rt2x00queue_init(rt2x00dev, queue, qid++);

/*
* Fix non-TX data qid's
*/
rt2x00dev->rx->qid = QID_RX;
rt2x00dev->bcn[0].qid = QID_MGMT;
rt2x00queue_init(rt2x00dev, &rt2x00dev->bcn[0], QID_MGMT);
if (req_atim)
rt2x00dev->bcn[1].qid = QID_MGMT;
rt2x00queue_init(rt2x00dev, &rt2x00dev->bcn[1], QID_MGMT);

return 0;
}
Expand Down

0 comments on commit 7de9b12

Please sign in to comment.